@erpsquad/common 1.8.65 → 1.8.66

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 (1110) hide show
  1. package/dist/_virtual/extends/index.esm.js +4 -2
  2. package/dist/_virtual/extends/index.esm.js.map +1 -1
  3. package/dist/_virtual/extends/index.js +1 -1
  4. package/dist/_virtual/index/index.esm.js +2 -4
  5. package/dist/_virtual/index/index.esm.js.map +1 -1
  6. package/dist/_virtual/index/index.esm10.js +3 -3
  7. package/dist/_virtual/index/index.esm11.js +3 -3
  8. package/dist/_virtual/index/index.esm3.js +4 -2
  9. package/dist/_virtual/index/index.esm3.js.map +1 -1
  10. package/dist/_virtual/index/index.esm4.js +1 -1
  11. package/dist/_virtual/index/index.esm5.js +3 -3
  12. package/dist/_virtual/index/index.esm6.js +3 -3
  13. package/dist/_virtual/index/index.esm7.js +3 -3
  14. package/dist/_virtual/index/index.esm8.js +3 -3
  15. package/dist/_virtual/index/index.esm9.js +3 -3
  16. package/dist/_virtual/index/index.js +1 -1
  17. package/dist/_virtual/index/index10.js +1 -1
  18. package/dist/_virtual/index/index11.js +1 -1
  19. package/dist/_virtual/index/index3.js +1 -1
  20. package/dist/_virtual/index/index4.js +1 -1
  21. package/dist/_virtual/index/index5.js +1 -1
  22. package/dist/_virtual/index/index6.js +1 -1
  23. package/dist/_virtual/index/index7.js +1 -1
  24. package/dist/_virtual/index/index8.js +1 -1
  25. package/dist/_virtual/index/index9.js +1 -1
  26. package/dist/components/action-bar/action-bar/index.esm.js +1 -2
  27. package/dist/components/action-bar/action-bar/index.esm.js.map +1 -1
  28. package/dist/components/action-bar/action-bar/index.js +19 -19
  29. package/dist/components/action-bar/action-bar/index.js.map +1 -1
  30. package/dist/components/editor/custom-editor/index.esm.js +1 -2
  31. package/dist/components/editor/custom-editor/index.esm.js.map +1 -1
  32. package/dist/components/editor/custom-editor/index.js +2 -2
  33. package/dist/components/editor/custom-editor/index.js.map +1 -1
  34. package/dist/components/filter/filter/index.esm.js +1 -2
  35. package/dist/components/filter/filter/index.esm.js.map +1 -1
  36. package/dist/components/filter/filter/index.js +15 -15
  37. package/dist/components/filter/filter/index.js.map +1 -1
  38. package/dist/components/header/header/index.esm.js +1 -1
  39. package/dist/components/header/header/index.esm.js.map +1 -1
  40. package/dist/components/header/header/index.js +12 -12
  41. package/dist/components/header/header/index.js.map +1 -1
  42. package/dist/components/header/redux/actionCreator/index.esm.js +1 -2
  43. package/dist/components/header/redux/actionCreator/index.esm.js.map +1 -1
  44. package/dist/components/header/redux/actionCreator/index.js +1 -1
  45. package/dist/components/header/redux/actionCreator/index.js.map +1 -1
  46. package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.esm.js +1 -2
  47. package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.esm.js.map +1 -1
  48. package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js +1 -1
  49. package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js.map +1 -1
  50. package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js +1 -2
  51. package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js.map +1 -1
  52. package/dist/components/reports-title-bar/redux/actionCreator/index.js +1 -1
  53. package/dist/components/reports-title-bar/redux/actionCreator/index.js.map +1 -1
  54. package/dist/components/share-modal/redux/actionCreator/index.esm.js +1 -2
  55. package/dist/components/share-modal/redux/actionCreator/index.esm.js.map +1 -1
  56. package/dist/components/share-modal/redux/actionCreator/index.js +1 -1
  57. package/dist/components/share-modal/redux/actionCreator/index.js.map +1 -1
  58. package/dist/components/upload/upload/index.esm.js +2 -2
  59. package/dist/components/upload/upload/index.esm.js.map +1 -1
  60. package/dist/components/upload/upload/index.js +19 -19
  61. package/dist/components/upload/upload/index.js.map +1 -1
  62. package/dist/config/index/index.esm.js +1 -26
  63. package/dist/config/index/index.esm.js.map +1 -1
  64. package/dist/config/index/index.js +1 -1
  65. package/dist/config/index/index.js.map +1 -1
  66. package/dist/config/index.d.ts +0 -15
  67. package/dist/contexts/AuthContext/index.esm.js +2 -3
  68. package/dist/contexts/AuthContext/index.esm.js.map +1 -1
  69. package/dist/contexts/AuthContext/index.js +2 -2
  70. package/dist/contexts/AuthContext/index.js.map +1 -1
  71. package/dist/contexts/languageContext/index.esm.js +1 -2
  72. package/dist/contexts/languageContext/index.esm.js.map +1 -1
  73. package/dist/contexts/languageContext/index.js +2 -2
  74. package/dist/contexts/languageContext/index.js.map +1 -1
  75. package/dist/hooks/use-material-calculations/index.esm.js +2 -1
  76. package/dist/hooks/use-material-calculations/index.esm.js.map +1 -1
  77. package/dist/hooks/use-material-calculations/index.js +1 -1
  78. package/dist/hooks/use-material-calculations/index.js.map +1 -1
  79. package/dist/hooks/useLangauge/index.esm.js +2 -1
  80. package/dist/hooks/useLangauge/index.esm.js.map +1 -1
  81. package/dist/hooks/useLangauge/index.js +1 -1
  82. package/dist/hooks/useLangauge/index.js.map +1 -1
  83. package/dist/index.esm.js +1 -6
  84. package/dist/index.js +1 -1
  85. package/dist/node_modules/@hookform/resolvers/yup/dist/yup/index.esm.js +15 -14
  86. package/dist/node_modules/@hookform/resolvers/yup/dist/yup/index.esm.js.map +1 -1
  87. package/dist/node_modules/@hookform/resolvers/yup/dist/yup/index.js +1 -1
  88. package/dist/node_modules/@hookform/resolvers/yup/dist/yup/index.js.map +1 -1
  89. package/dist/node_modules/@mui/base/TextareaAutosize/TextareaAutosize/index.esm.js +3 -2
  90. package/dist/node_modules/@mui/base/TextareaAutosize/TextareaAutosize/index.esm.js.map +1 -1
  91. package/dist/node_modules/@mui/base/TextareaAutosize/TextareaAutosize/index.js +1 -1
  92. package/dist/node_modules/@mui/base/TextareaAutosize/TextareaAutosize/index.js.map +1 -1
  93. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
  94. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
  95. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js.map +1 -1
  96. package/dist/node_modules/@mui/lab/TabContext/TabContext/index.esm.js +3 -2
  97. package/dist/node_modules/@mui/lab/TabContext/TabContext/index.esm.js.map +1 -1
  98. package/dist/node_modules/@mui/lab/TabContext/TabContext/index.js +2 -2
  99. package/dist/node_modules/@mui/lab/TabContext/TabContext/index.js.map +1 -1
  100. package/dist/node_modules/@mui/lab/TabList/TabList/index.esm.js +2 -1
  101. package/dist/node_modules/@mui/lab/TabList/TabList/index.esm.js.map +1 -1
  102. package/dist/node_modules/@mui/lab/TabList/TabList/index.js +1 -1
  103. package/dist/node_modules/@mui/lab/TabList/TabList/index.js.map +1 -1
  104. package/dist/node_modules/@mui/lab/TabPanel/TabPanel/index.esm.js +2 -1
  105. package/dist/node_modules/@mui/lab/TabPanel/TabPanel/index.esm.js.map +1 -1
  106. package/dist/node_modules/@mui/lab/TabPanel/TabPanel/index.js +2 -2
  107. package/dist/node_modules/@mui/lab/TabPanel/TabPanel/index.js.map +1 -1
  108. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.esm.js +2 -1
  109. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.esm.js.map +1 -1
  110. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js +2 -2
  111. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js.map +1 -1
  112. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js +2 -1
  113. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js.map +1 -1
  114. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js +1 -1
  115. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js.map +1 -1
  116. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js +2 -1
  117. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js.map +1 -1
  118. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js +2 -2
  119. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js.map +1 -1
  120. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js +2 -1
  121. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js.map +1 -1
  122. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js +1 -1
  123. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js.map +1 -1
  124. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js +2 -1
  125. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js.map +1 -1
  126. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js +2 -2
  127. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js.map +1 -1
  128. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js +2 -1
  129. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js.map +1 -1
  130. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js +2 -2
  131. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js.map +1 -1
  132. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js +2 -1
  133. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js.map +1 -1
  134. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js +2 -2
  135. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js.map +1 -1
  136. package/dist/node_modules/@mui/material/Accordion/Accordion/index.esm.js +2 -1
  137. package/dist/node_modules/@mui/material/Accordion/Accordion/index.esm.js.map +1 -1
  138. package/dist/node_modules/@mui/material/Accordion/Accordion/index.js +2 -2
  139. package/dist/node_modules/@mui/material/Accordion/Accordion/index.js.map +1 -1
  140. package/dist/node_modules/@mui/material/Accordion/AccordionContext/index.esm.js +2 -1
  141. package/dist/node_modules/@mui/material/Accordion/AccordionContext/index.esm.js.map +1 -1
  142. package/dist/node_modules/@mui/material/Accordion/AccordionContext/index.js +1 -1
  143. package/dist/node_modules/@mui/material/Accordion/AccordionContext/index.js.map +1 -1
  144. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js +2 -1
  145. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js.map +1 -1
  146. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js +1 -1
  147. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js.map +1 -1
  148. package/dist/node_modules/@mui/material/AccordionDetails/AccordionDetails/index.esm.js +2 -1
  149. package/dist/node_modules/@mui/material/AccordionDetails/AccordionDetails/index.esm.js.map +1 -1
  150. package/dist/node_modules/@mui/material/AccordionDetails/AccordionDetails/index.js +2 -2
  151. package/dist/node_modules/@mui/material/AccordionDetails/AccordionDetails/index.js.map +1 -1
  152. package/dist/node_modules/@mui/material/AccordionSummary/AccordionSummary/index.esm.js +2 -1
  153. package/dist/node_modules/@mui/material/AccordionSummary/AccordionSummary/index.esm.js.map +1 -1
  154. package/dist/node_modules/@mui/material/AccordionSummary/AccordionSummary/index.js +2 -2
  155. package/dist/node_modules/@mui/material/AccordionSummary/AccordionSummary/index.js.map +1 -1
  156. package/dist/node_modules/@mui/material/Alert/Alert/index.esm.js +2 -1
  157. package/dist/node_modules/@mui/material/Alert/Alert/index.esm.js.map +1 -1
  158. package/dist/node_modules/@mui/material/Alert/Alert/index.js +1 -1
  159. package/dist/node_modules/@mui/material/Alert/Alert/index.js.map +1 -1
  160. package/dist/node_modules/@mui/material/AlertTitle/AlertTitle/index.esm.js +2 -1
  161. package/dist/node_modules/@mui/material/AlertTitle/AlertTitle/index.esm.js.map +1 -1
  162. package/dist/node_modules/@mui/material/AlertTitle/AlertTitle/index.js +1 -1
  163. package/dist/node_modules/@mui/material/AlertTitle/AlertTitle/index.js.map +1 -1
  164. package/dist/node_modules/@mui/material/AppBar/AppBar/index.esm.js +2 -1
  165. package/dist/node_modules/@mui/material/AppBar/AppBar/index.esm.js.map +1 -1
  166. package/dist/node_modules/@mui/material/AppBar/AppBar/index.js +1 -1
  167. package/dist/node_modules/@mui/material/AppBar/AppBar/index.js.map +1 -1
  168. package/dist/node_modules/@mui/material/Autocomplete/Autocomplete/index.esm.js +2 -1
  169. package/dist/node_modules/@mui/material/Autocomplete/Autocomplete/index.esm.js.map +1 -1
  170. package/dist/node_modules/@mui/material/Autocomplete/Autocomplete/index.js +1 -1
  171. package/dist/node_modules/@mui/material/Autocomplete/Autocomplete/index.js.map +1 -1
  172. package/dist/node_modules/@mui/material/Avatar/Avatar/index.esm.js +2 -1
  173. package/dist/node_modules/@mui/material/Avatar/Avatar/index.esm.js.map +1 -1
  174. package/dist/node_modules/@mui/material/Avatar/Avatar/index.js +1 -1
  175. package/dist/node_modules/@mui/material/Avatar/Avatar/index.js.map +1 -1
  176. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js +3 -2
  177. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js.map +1 -1
  178. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js +2 -2
  179. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js.map +1 -1
  180. package/dist/node_modules/@mui/material/Backdrop/Backdrop/index.esm.js +2 -1
  181. package/dist/node_modules/@mui/material/Backdrop/Backdrop/index.esm.js.map +1 -1
  182. package/dist/node_modules/@mui/material/Backdrop/Backdrop/index.js +1 -1
  183. package/dist/node_modules/@mui/material/Backdrop/Backdrop/index.js.map +1 -1
  184. package/dist/node_modules/@mui/material/Badge/Badge/index.esm.js +2 -1
  185. package/dist/node_modules/@mui/material/Badge/Badge/index.esm.js.map +1 -1
  186. package/dist/node_modules/@mui/material/Badge/Badge/index.js +1 -1
  187. package/dist/node_modules/@mui/material/Badge/Badge/index.js.map +1 -1
  188. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js +3 -2
  189. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js.map +1 -1
  190. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js +3 -3
  191. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js.map +1 -1
  192. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js +2 -1
  193. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js.map +1 -1
  194. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js +2 -2
  195. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js.map +1 -1
  196. package/dist/node_modules/@mui/material/Box/Box/index.esm.js +2 -1
  197. package/dist/node_modules/@mui/material/Box/Box/index.esm.js.map +1 -1
  198. package/dist/node_modules/@mui/material/Box/Box/index.js +1 -1
  199. package/dist/node_modules/@mui/material/Box/Box/index.js.map +1 -1
  200. package/dist/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed/index.esm.js +2 -1
  201. package/dist/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed/index.esm.js.map +1 -1
  202. package/dist/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed/index.js +2 -2
  203. package/dist/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed/index.js.map +1 -1
  204. package/dist/node_modules/@mui/material/Breadcrumbs/Breadcrumbs/index.esm.js +4 -3
  205. package/dist/node_modules/@mui/material/Breadcrumbs/Breadcrumbs/index.esm.js.map +1 -1
  206. package/dist/node_modules/@mui/material/Breadcrumbs/Breadcrumbs/index.js +2 -2
  207. package/dist/node_modules/@mui/material/Breadcrumbs/Breadcrumbs/index.js.map +1 -1
  208. package/dist/node_modules/@mui/material/Button/Button/index.esm.js +2 -1
  209. package/dist/node_modules/@mui/material/Button/Button/index.esm.js.map +1 -1
  210. package/dist/node_modules/@mui/material/Button/Button/index.js +1 -1
  211. package/dist/node_modules/@mui/material/Button/Button/index.js.map +1 -1
  212. package/dist/node_modules/@mui/material/ButtonBase/ButtonBase/index.esm.js +3 -2
  213. package/dist/node_modules/@mui/material/ButtonBase/ButtonBase/index.esm.js.map +1 -1
  214. package/dist/node_modules/@mui/material/ButtonBase/ButtonBase/index.js +3 -3
  215. package/dist/node_modules/@mui/material/ButtonBase/ButtonBase/index.js.map +1 -1
  216. package/dist/node_modules/@mui/material/ButtonBase/Ripple/index.esm.js +2 -1
  217. package/dist/node_modules/@mui/material/ButtonBase/Ripple/index.esm.js.map +1 -1
  218. package/dist/node_modules/@mui/material/ButtonBase/Ripple/index.js +1 -1
  219. package/dist/node_modules/@mui/material/ButtonBase/Ripple/index.js.map +1 -1
  220. package/dist/node_modules/@mui/material/ButtonBase/TouchRipple/index.esm.js +2 -1
  221. package/dist/node_modules/@mui/material/ButtonBase/TouchRipple/index.esm.js.map +1 -1
  222. package/dist/node_modules/@mui/material/ButtonBase/TouchRipple/index.js +1 -1
  223. package/dist/node_modules/@mui/material/ButtonBase/TouchRipple/index.js.map +1 -1
  224. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroup/index.esm.js +2 -1
  225. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroup/index.esm.js.map +1 -1
  226. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroup/index.js +1 -1
  227. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroup/index.js.map +1 -1
  228. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext/index.esm.js +2 -1
  229. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext/index.esm.js.map +1 -1
  230. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext/index.js +1 -1
  231. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext/index.js.map +1 -1
  232. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupContext/index.esm.js +2 -1
  233. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupContext/index.esm.js.map +1 -1
  234. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupContext/index.js +1 -1
  235. package/dist/node_modules/@mui/material/ButtonGroup/ButtonGroupContext/index.js.map +1 -1
  236. package/dist/node_modules/@mui/material/Card/Card/index.esm.js +2 -1
  237. package/dist/node_modules/@mui/material/Card/Card/index.esm.js.map +1 -1
  238. package/dist/node_modules/@mui/material/Card/Card/index.js +1 -1
  239. package/dist/node_modules/@mui/material/Card/Card/index.js.map +1 -1
  240. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js +2 -1
  241. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js.map +1 -1
  242. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js +2 -2
  243. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js.map +1 -1
  244. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js +2 -1
  245. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js.map +1 -1
  246. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js +2 -2
  247. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js.map +1 -1
  248. package/dist/node_modules/@mui/material/CardContent/CardContent/index.esm.js +2 -1
  249. package/dist/node_modules/@mui/material/CardContent/CardContent/index.esm.js.map +1 -1
  250. package/dist/node_modules/@mui/material/CardContent/CardContent/index.js +1 -1
  251. package/dist/node_modules/@mui/material/CardContent/CardContent/index.js.map +1 -1
  252. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js +2 -1
  253. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js.map +1 -1
  254. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js +1 -1
  255. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js.map +1 -1
  256. package/dist/node_modules/@mui/material/CardMedia/CardMedia/index.esm.js +2 -1
  257. package/dist/node_modules/@mui/material/CardMedia/CardMedia/index.esm.js.map +1 -1
  258. package/dist/node_modules/@mui/material/CardMedia/CardMedia/index.js +2 -2
  259. package/dist/node_modules/@mui/material/CardMedia/CardMedia/index.js.map +1 -1
  260. package/dist/node_modules/@mui/material/Checkbox/Checkbox/index.esm.js +2 -1
  261. package/dist/node_modules/@mui/material/Checkbox/Checkbox/index.esm.js.map +1 -1
  262. package/dist/node_modules/@mui/material/Checkbox/Checkbox/index.js +1 -1
  263. package/dist/node_modules/@mui/material/Checkbox/Checkbox/index.js.map +1 -1
  264. package/dist/node_modules/@mui/material/Chip/Chip/index.esm.js +3 -2
  265. package/dist/node_modules/@mui/material/Chip/Chip/index.esm.js.map +1 -1
  266. package/dist/node_modules/@mui/material/Chip/Chip/index.js +1 -1
  267. package/dist/node_modules/@mui/material/Chip/Chip/index.js.map +1 -1
  268. package/dist/node_modules/@mui/material/CircularProgress/CircularProgress/index.esm.js +2 -1
  269. package/dist/node_modules/@mui/material/CircularProgress/CircularProgress/index.esm.js.map +1 -1
  270. package/dist/node_modules/@mui/material/CircularProgress/CircularProgress/index.js +6 -6
  271. package/dist/node_modules/@mui/material/CircularProgress/CircularProgress/index.js.map +1 -1
  272. package/dist/node_modules/@mui/material/ClickAwayListener/ClickAwayListener/index.esm.js +3 -2
  273. package/dist/node_modules/@mui/material/ClickAwayListener/ClickAwayListener/index.esm.js.map +1 -1
  274. package/dist/node_modules/@mui/material/ClickAwayListener/ClickAwayListener/index.js +1 -1
  275. package/dist/node_modules/@mui/material/ClickAwayListener/ClickAwayListener/index.js.map +1 -1
  276. package/dist/node_modules/@mui/material/Collapse/Collapse/index.esm.js +2 -1
  277. package/dist/node_modules/@mui/material/Collapse/Collapse/index.esm.js.map +1 -1
  278. package/dist/node_modules/@mui/material/Collapse/Collapse/index.js +1 -1
  279. package/dist/node_modules/@mui/material/Collapse/Collapse/index.js.map +1 -1
  280. package/dist/node_modules/@mui/material/Container/Container/index.esm.js +2 -1
  281. package/dist/node_modules/@mui/material/Container/Container/index.esm.js.map +1 -1
  282. package/dist/node_modules/@mui/material/Container/Container/index.js +1 -1
  283. package/dist/node_modules/@mui/material/Container/Container/index.js.map +1 -1
  284. package/dist/node_modules/@mui/material/CssBaseline/CssBaseline/index.esm.js +2 -1
  285. package/dist/node_modules/@mui/material/CssBaseline/CssBaseline/index.esm.js.map +1 -1
  286. package/dist/node_modules/@mui/material/CssBaseline/CssBaseline/index.js +2 -2
  287. package/dist/node_modules/@mui/material/CssBaseline/CssBaseline/index.js.map +1 -1
  288. package/dist/node_modules/@mui/material/Dialog/Dialog/index.esm.js +2 -1
  289. package/dist/node_modules/@mui/material/Dialog/Dialog/index.esm.js.map +1 -1
  290. package/dist/node_modules/@mui/material/Dialog/Dialog/index.js +1 -1
  291. package/dist/node_modules/@mui/material/Dialog/Dialog/index.js.map +1 -1
  292. package/dist/node_modules/@mui/material/Dialog/DialogContext/index.esm.js +2 -1
  293. package/dist/node_modules/@mui/material/Dialog/DialogContext/index.esm.js.map +1 -1
  294. package/dist/node_modules/@mui/material/Dialog/DialogContext/index.js +1 -1
  295. package/dist/node_modules/@mui/material/Dialog/DialogContext/index.js.map +1 -1
  296. package/dist/node_modules/@mui/material/DialogActions/DialogActions/index.esm.js +2 -1
  297. package/dist/node_modules/@mui/material/DialogActions/DialogActions/index.esm.js.map +1 -1
  298. package/dist/node_modules/@mui/material/DialogActions/DialogActions/index.js +1 -1
  299. package/dist/node_modules/@mui/material/DialogActions/DialogActions/index.js.map +1 -1
  300. package/dist/node_modules/@mui/material/DialogContent/DialogContent/index.esm.js +2 -1
  301. package/dist/node_modules/@mui/material/DialogContent/DialogContent/index.esm.js.map +1 -1
  302. package/dist/node_modules/@mui/material/DialogContent/DialogContent/index.js +2 -2
  303. package/dist/node_modules/@mui/material/DialogContent/DialogContent/index.js.map +1 -1
  304. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js +2 -1
  305. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js.map +1 -1
  306. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js +1 -1
  307. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js.map +1 -1
  308. package/dist/node_modules/@mui/material/DialogTitle/DialogTitle/index.esm.js +2 -1
  309. package/dist/node_modules/@mui/material/DialogTitle/DialogTitle/index.esm.js.map +1 -1
  310. package/dist/node_modules/@mui/material/DialogTitle/DialogTitle/index.js +1 -1
  311. package/dist/node_modules/@mui/material/DialogTitle/DialogTitle/index.js.map +1 -1
  312. package/dist/node_modules/@mui/material/Divider/Divider/index.esm.js +2 -1
  313. package/dist/node_modules/@mui/material/Divider/Divider/index.esm.js.map +1 -1
  314. package/dist/node_modules/@mui/material/Divider/Divider/index.js +1 -1
  315. package/dist/node_modules/@mui/material/Divider/Divider/index.js.map +1 -1
  316. package/dist/node_modules/@mui/material/Drawer/Drawer/index.esm.js +2 -1
  317. package/dist/node_modules/@mui/material/Drawer/Drawer/index.esm.js.map +1 -1
  318. package/dist/node_modules/@mui/material/Drawer/Drawer/index.js +1 -1
  319. package/dist/node_modules/@mui/material/Drawer/Drawer/index.js.map +1 -1
  320. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js +2 -1
  321. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js.map +1 -1
  322. package/dist/node_modules/@mui/material/Fab/Fab/index.js +2 -2
  323. package/dist/node_modules/@mui/material/Fab/Fab/index.js.map +1 -1
  324. package/dist/node_modules/@mui/material/Fade/Fade/index.esm.js +2 -1
  325. package/dist/node_modules/@mui/material/Fade/Fade/index.esm.js.map +1 -1
  326. package/dist/node_modules/@mui/material/Fade/Fade/index.js +1 -1
  327. package/dist/node_modules/@mui/material/Fade/Fade/index.js.map +1 -1
  328. package/dist/node_modules/@mui/material/FilledInput/FilledInput/index.esm.js +2 -1
  329. package/dist/node_modules/@mui/material/FilledInput/FilledInput/index.esm.js.map +1 -1
  330. package/dist/node_modules/@mui/material/FilledInput/FilledInput/index.js +1 -1
  331. package/dist/node_modules/@mui/material/FilledInput/FilledInput/index.js.map +1 -1
  332. package/dist/node_modules/@mui/material/FormControl/FormControl/index.esm.js +3 -2
  333. package/dist/node_modules/@mui/material/FormControl/FormControl/index.esm.js.map +1 -1
  334. package/dist/node_modules/@mui/material/FormControl/FormControl/index.js +2 -2
  335. package/dist/node_modules/@mui/material/FormControl/FormControl/index.js.map +1 -1
  336. package/dist/node_modules/@mui/material/FormControl/FormControlContext/index.esm.js +2 -1
  337. package/dist/node_modules/@mui/material/FormControl/FormControlContext/index.esm.js.map +1 -1
  338. package/dist/node_modules/@mui/material/FormControl/FormControlContext/index.js +1 -1
  339. package/dist/node_modules/@mui/material/FormControl/FormControlContext/index.js.map +1 -1
  340. package/dist/node_modules/@mui/material/FormControlLabel/FormControlLabel/index.esm.js +2 -1
  341. package/dist/node_modules/@mui/material/FormControlLabel/FormControlLabel/index.esm.js.map +1 -1
  342. package/dist/node_modules/@mui/material/FormControlLabel/FormControlLabel/index.js +1 -1
  343. package/dist/node_modules/@mui/material/FormControlLabel/FormControlLabel/index.js.map +1 -1
  344. package/dist/node_modules/@mui/material/FormGroup/FormGroup/index.esm.js +2 -1
  345. package/dist/node_modules/@mui/material/FormGroup/FormGroup/index.esm.js.map +1 -1
  346. package/dist/node_modules/@mui/material/FormGroup/FormGroup/index.js +1 -1
  347. package/dist/node_modules/@mui/material/FormGroup/FormGroup/index.js.map +1 -1
  348. package/dist/node_modules/@mui/material/FormHelperText/FormHelperText/index.esm.js +2 -1
  349. package/dist/node_modules/@mui/material/FormHelperText/FormHelperText/index.esm.js.map +1 -1
  350. package/dist/node_modules/@mui/material/FormHelperText/FormHelperText/index.js +2 -2
  351. package/dist/node_modules/@mui/material/FormHelperText/FormHelperText/index.js.map +1 -1
  352. package/dist/node_modules/@mui/material/FormLabel/FormLabel/index.esm.js +2 -1
  353. package/dist/node_modules/@mui/material/FormLabel/FormLabel/index.esm.js.map +1 -1
  354. package/dist/node_modules/@mui/material/FormLabel/FormLabel/index.js +1 -1
  355. package/dist/node_modules/@mui/material/FormLabel/FormLabel/index.js.map +1 -1
  356. package/dist/node_modules/@mui/material/GlobalStyles/GlobalStyles/index.esm.js +2 -1
  357. package/dist/node_modules/@mui/material/GlobalStyles/GlobalStyles/index.esm.js.map +1 -1
  358. package/dist/node_modules/@mui/material/GlobalStyles/GlobalStyles/index.js +2 -2
  359. package/dist/node_modules/@mui/material/GlobalStyles/GlobalStyles/index.js.map +1 -1
  360. package/dist/node_modules/@mui/material/Grid/Grid/index.esm.js +3 -2
  361. package/dist/node_modules/@mui/material/Grid/Grid/index.esm.js.map +1 -1
  362. package/dist/node_modules/@mui/material/Grid/Grid/index.js +2 -2
  363. package/dist/node_modules/@mui/material/Grid/Grid/index.js.map +1 -1
  364. package/dist/node_modules/@mui/material/Grid/GridContext/index.esm.js +2 -1
  365. package/dist/node_modules/@mui/material/Grid/GridContext/index.esm.js.map +1 -1
  366. package/dist/node_modules/@mui/material/Grid/GridContext/index.js +1 -1
  367. package/dist/node_modules/@mui/material/Grid/GridContext/index.js.map +1 -1
  368. package/dist/node_modules/@mui/material/Grow/Grow/index.esm.js +2 -1
  369. package/dist/node_modules/@mui/material/Grow/Grow/index.esm.js.map +1 -1
  370. package/dist/node_modules/@mui/material/Grow/Grow/index.js +2 -2
  371. package/dist/node_modules/@mui/material/Grow/Grow/index.js.map +1 -1
  372. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js +2 -1
  373. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js.map +1 -1
  374. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js +1 -1
  375. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js.map +1 -1
  376. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js +3 -2
  377. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js.map +1 -1
  378. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js +2 -2
  379. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js.map +1 -1
  380. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js +4 -3
  381. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js.map +1 -1
  382. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js +1 -1
  383. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js.map +1 -1
  384. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js +3 -2
  385. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js.map +1 -1
  386. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js +1 -1
  387. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js.map +1 -1
  388. package/dist/node_modules/@mui/material/Icon/Icon/index.esm.js +2 -1
  389. package/dist/node_modules/@mui/material/Icon/Icon/index.esm.js.map +1 -1
  390. package/dist/node_modules/@mui/material/Icon/Icon/index.js +2 -2
  391. package/dist/node_modules/@mui/material/Icon/Icon/index.js.map +1 -1
  392. package/dist/node_modules/@mui/material/IconButton/IconButton/index.esm.js +2 -1
  393. package/dist/node_modules/@mui/material/IconButton/IconButton/index.esm.js.map +1 -1
  394. package/dist/node_modules/@mui/material/IconButton/IconButton/index.js +1 -1
  395. package/dist/node_modules/@mui/material/IconButton/IconButton/index.js.map +1 -1
  396. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js +3 -2
  397. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js.map +1 -1
  398. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js +2 -2
  399. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js.map +1 -1
  400. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js +2 -1
  401. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js.map +1 -1
  402. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js +1 -1
  403. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js.map +1 -1
  404. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js +3 -2
  405. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js.map +1 -1
  406. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js +2 -2
  407. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js.map +1 -1
  408. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js +2 -1
  409. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js.map +1 -1
  410. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js +1 -1
  411. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js.map +1 -1
  412. package/dist/node_modules/@mui/material/Input/Input/index.esm.js +2 -1
  413. package/dist/node_modules/@mui/material/Input/Input/index.esm.js.map +1 -1
  414. package/dist/node_modules/@mui/material/Input/Input/index.js +2 -2
  415. package/dist/node_modules/@mui/material/Input/Input/index.js.map +1 -1
  416. package/dist/node_modules/@mui/material/InputAdornment/InputAdornment/index.esm.js +3 -2
  417. package/dist/node_modules/@mui/material/InputAdornment/InputAdornment/index.esm.js.map +1 -1
  418. package/dist/node_modules/@mui/material/InputAdornment/InputAdornment/index.js +2 -2
  419. package/dist/node_modules/@mui/material/InputAdornment/InputAdornment/index.js.map +1 -1
  420. package/dist/node_modules/@mui/material/InputBase/InputBase/index.esm.js +6 -5
  421. package/dist/node_modules/@mui/material/InputBase/InputBase/index.esm.js.map +1 -1
  422. package/dist/node_modules/@mui/material/InputBase/InputBase/index.js +1 -1
  423. package/dist/node_modules/@mui/material/InputBase/InputBase/index.js.map +1 -1
  424. package/dist/node_modules/@mui/material/InputLabel/InputLabel/index.esm.js +2 -1
  425. package/dist/node_modules/@mui/material/InputLabel/InputLabel/index.esm.js.map +1 -1
  426. package/dist/node_modules/@mui/material/InputLabel/InputLabel/index.js +1 -1
  427. package/dist/node_modules/@mui/material/InputLabel/InputLabel/index.js.map +1 -1
  428. package/dist/node_modules/@mui/material/LinearProgress/LinearProgress/index.esm.js +4 -3
  429. package/dist/node_modules/@mui/material/LinearProgress/LinearProgress/index.esm.js.map +1 -1
  430. package/dist/node_modules/@mui/material/LinearProgress/LinearProgress/index.js +5 -5
  431. package/dist/node_modules/@mui/material/LinearProgress/LinearProgress/index.js.map +1 -1
  432. package/dist/node_modules/@mui/material/Link/Link/index.esm.js +2 -1
  433. package/dist/node_modules/@mui/material/Link/Link/index.esm.js.map +1 -1
  434. package/dist/node_modules/@mui/material/Link/Link/index.js +1 -1
  435. package/dist/node_modules/@mui/material/Link/Link/index.js.map +1 -1
  436. package/dist/node_modules/@mui/material/List/List/index.esm.js +2 -1
  437. package/dist/node_modules/@mui/material/List/List/index.esm.js.map +1 -1
  438. package/dist/node_modules/@mui/material/List/List/index.js +2 -2
  439. package/dist/node_modules/@mui/material/List/List/index.js.map +1 -1
  440. package/dist/node_modules/@mui/material/List/ListContext/index.esm.js +2 -1
  441. package/dist/node_modules/@mui/material/List/ListContext/index.esm.js.map +1 -1
  442. package/dist/node_modules/@mui/material/List/ListContext/index.js +1 -1
  443. package/dist/node_modules/@mui/material/List/ListContext/index.js.map +1 -1
  444. package/dist/node_modules/@mui/material/ListItem/ListItem/index.esm.js +3 -2
  445. package/dist/node_modules/@mui/material/ListItem/ListItem/index.esm.js.map +1 -1
  446. package/dist/node_modules/@mui/material/ListItem/ListItem/index.js +1 -1
  447. package/dist/node_modules/@mui/material/ListItem/ListItem/index.js.map +1 -1
  448. package/dist/node_modules/@mui/material/ListItemAvatar/ListItemAvatar/index.esm.js +2 -1
  449. package/dist/node_modules/@mui/material/ListItemAvatar/ListItemAvatar/index.esm.js.map +1 -1
  450. package/dist/node_modules/@mui/material/ListItemAvatar/ListItemAvatar/index.js +1 -1
  451. package/dist/node_modules/@mui/material/ListItemAvatar/ListItemAvatar/index.js.map +1 -1
  452. package/dist/node_modules/@mui/material/ListItemButton/ListItemButton/index.esm.js +3 -2
  453. package/dist/node_modules/@mui/material/ListItemButton/ListItemButton/index.esm.js.map +1 -1
  454. package/dist/node_modules/@mui/material/ListItemButton/ListItemButton/index.js +2 -2
  455. package/dist/node_modules/@mui/material/ListItemButton/ListItemButton/index.js.map +1 -1
  456. package/dist/node_modules/@mui/material/ListItemIcon/ListItemIcon/index.esm.js +2 -1
  457. package/dist/node_modules/@mui/material/ListItemIcon/ListItemIcon/index.esm.js.map +1 -1
  458. package/dist/node_modules/@mui/material/ListItemIcon/ListItemIcon/index.js +2 -2
  459. package/dist/node_modules/@mui/material/ListItemIcon/ListItemIcon/index.js.map +1 -1
  460. package/dist/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction/index.esm.js +2 -1
  461. package/dist/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction/index.esm.js.map +1 -1
  462. package/dist/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction/index.js +2 -2
  463. package/dist/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction/index.js.map +1 -1
  464. package/dist/node_modules/@mui/material/ListItemText/ListItemText/index.esm.js +2 -1
  465. package/dist/node_modules/@mui/material/ListItemText/ListItemText/index.esm.js.map +1 -1
  466. package/dist/node_modules/@mui/material/ListItemText/ListItemText/index.js +1 -1
  467. package/dist/node_modules/@mui/material/ListItemText/ListItemText/index.js.map +1 -1
  468. package/dist/node_modules/@mui/material/ListSubheader/ListSubheader/index.esm.js +2 -1
  469. package/dist/node_modules/@mui/material/ListSubheader/ListSubheader/index.esm.js.map +1 -1
  470. package/dist/node_modules/@mui/material/ListSubheader/ListSubheader/index.js +2 -2
  471. package/dist/node_modules/@mui/material/ListSubheader/ListSubheader/index.js.map +1 -1
  472. package/dist/node_modules/@mui/material/Menu/Menu/index.esm.js +3 -2
  473. package/dist/node_modules/@mui/material/Menu/Menu/index.esm.js.map +1 -1
  474. package/dist/node_modules/@mui/material/Menu/Menu/index.js +2 -2
  475. package/dist/node_modules/@mui/material/Menu/Menu/index.js.map +1 -1
  476. package/dist/node_modules/@mui/material/MenuItem/MenuItem/index.esm.js +3 -2
  477. package/dist/node_modules/@mui/material/MenuItem/MenuItem/index.esm.js.map +1 -1
  478. package/dist/node_modules/@mui/material/MenuItem/MenuItem/index.js +1 -1
  479. package/dist/node_modules/@mui/material/MenuItem/MenuItem/index.js.map +1 -1
  480. package/dist/node_modules/@mui/material/MenuList/MenuList/index.esm.js +3 -2
  481. package/dist/node_modules/@mui/material/MenuList/MenuList/index.esm.js.map +1 -1
  482. package/dist/node_modules/@mui/material/MenuList/MenuList/index.js +2 -2
  483. package/dist/node_modules/@mui/material/MenuList/MenuList/index.js.map +1 -1
  484. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js +2 -1
  485. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js.map +1 -1
  486. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js +1 -1
  487. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js.map +1 -1
  488. package/dist/node_modules/@mui/material/Modal/Modal/index.esm.js +2 -1
  489. package/dist/node_modules/@mui/material/Modal/Modal/index.esm.js.map +1 -1
  490. package/dist/node_modules/@mui/material/Modal/Modal/index.js +1 -1
  491. package/dist/node_modules/@mui/material/Modal/Modal/index.js.map +1 -1
  492. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js +2 -1
  493. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js.map +1 -1
  494. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js +2 -2
  495. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js.map +1 -1
  496. package/dist/node_modules/@mui/material/NativeSelect/NativeSelectInput/index.esm.js +2 -1
  497. package/dist/node_modules/@mui/material/NativeSelect/NativeSelectInput/index.esm.js.map +1 -1
  498. package/dist/node_modules/@mui/material/NativeSelect/NativeSelectInput/index.js +1 -1
  499. package/dist/node_modules/@mui/material/NativeSelect/NativeSelectInput/index.js.map +1 -1
  500. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js +3 -2
  501. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js.map +1 -1
  502. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js +1 -1
  503. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js.map +1 -1
  504. package/dist/node_modules/@mui/material/OutlinedInput/NotchedOutline/index.esm.js +2 -1
  505. package/dist/node_modules/@mui/material/OutlinedInput/NotchedOutline/index.esm.js.map +1 -1
  506. package/dist/node_modules/@mui/material/OutlinedInput/NotchedOutline/index.js +1 -1
  507. package/dist/node_modules/@mui/material/OutlinedInput/NotchedOutline/index.js.map +1 -1
  508. package/dist/node_modules/@mui/material/OutlinedInput/OutlinedInput/index.esm.js +2 -1
  509. package/dist/node_modules/@mui/material/OutlinedInput/OutlinedInput/index.esm.js.map +1 -1
  510. package/dist/node_modules/@mui/material/OutlinedInput/OutlinedInput/index.js +2 -2
  511. package/dist/node_modules/@mui/material/OutlinedInput/OutlinedInput/index.js.map +1 -1
  512. package/dist/node_modules/@mui/material/Pagination/Pagination/index.esm.js +2 -1
  513. package/dist/node_modules/@mui/material/Pagination/Pagination/index.esm.js.map +1 -1
  514. package/dist/node_modules/@mui/material/Pagination/Pagination/index.js +1 -1
  515. package/dist/node_modules/@mui/material/Pagination/Pagination/index.js.map +1 -1
  516. package/dist/node_modules/@mui/material/PaginationItem/PaginationItem/index.esm.js +2 -1
  517. package/dist/node_modules/@mui/material/PaginationItem/PaginationItem/index.esm.js.map +1 -1
  518. package/dist/node_modules/@mui/material/PaginationItem/PaginationItem/index.js +1 -1
  519. package/dist/node_modules/@mui/material/PaginationItem/PaginationItem/index.js.map +1 -1
  520. package/dist/node_modules/@mui/material/Paper/Paper/index.esm.js +3 -2
  521. package/dist/node_modules/@mui/material/Paper/Paper/index.esm.js.map +1 -1
  522. package/dist/node_modules/@mui/material/Paper/Paper/index.js +1 -1
  523. package/dist/node_modules/@mui/material/Paper/Paper/index.js.map +1 -1
  524. package/dist/node_modules/@mui/material/Popover/Popover/index.esm.js +7 -6
  525. package/dist/node_modules/@mui/material/Popover/Popover/index.esm.js.map +1 -1
  526. package/dist/node_modules/@mui/material/Popover/Popover/index.js +2 -2
  527. package/dist/node_modules/@mui/material/Popover/Popover/index.js.map +1 -1
  528. package/dist/node_modules/@mui/material/Popper/BasePopper/index.esm.js +5 -4
  529. package/dist/node_modules/@mui/material/Popper/BasePopper/index.esm.js.map +1 -1
  530. package/dist/node_modules/@mui/material/Popper/BasePopper/index.js +3 -3
  531. package/dist/node_modules/@mui/material/Popper/BasePopper/index.js.map +1 -1
  532. package/dist/node_modules/@mui/material/Popper/Popper/index.esm.js +2 -1
  533. package/dist/node_modules/@mui/material/Popper/Popper/index.esm.js.map +1 -1
  534. package/dist/node_modules/@mui/material/Popper/Popper/index.js +1 -1
  535. package/dist/node_modules/@mui/material/Popper/Popper/index.js.map +1 -1
  536. package/dist/node_modules/@mui/material/Portal/Portal/index.esm.js +3 -2
  537. package/dist/node_modules/@mui/material/Portal/Portal/index.esm.js.map +1 -1
  538. package/dist/node_modules/@mui/material/Portal/Portal/index.js +4 -4
  539. package/dist/node_modules/@mui/material/Portal/Portal/index.js.map +1 -1
  540. package/dist/node_modules/@mui/material/Radio/Radio/index.esm.js +2 -1
  541. package/dist/node_modules/@mui/material/Radio/Radio/index.esm.js.map +1 -1
  542. package/dist/node_modules/@mui/material/Radio/Radio/index.js +1 -1
  543. package/dist/node_modules/@mui/material/Radio/Radio/index.js.map +1 -1
  544. package/dist/node_modules/@mui/material/Radio/RadioButtonIcon/index.esm.js +2 -1
  545. package/dist/node_modules/@mui/material/Radio/RadioButtonIcon/index.esm.js.map +1 -1
  546. package/dist/node_modules/@mui/material/Radio/RadioButtonIcon/index.js +2 -2
  547. package/dist/node_modules/@mui/material/Radio/RadioButtonIcon/index.js.map +1 -1
  548. package/dist/node_modules/@mui/material/RadioGroup/RadioGroup/index.esm.js +2 -1
  549. package/dist/node_modules/@mui/material/RadioGroup/RadioGroup/index.esm.js.map +1 -1
  550. package/dist/node_modules/@mui/material/RadioGroup/RadioGroup/index.js +2 -2
  551. package/dist/node_modules/@mui/material/RadioGroup/RadioGroup/index.js.map +1 -1
  552. package/dist/node_modules/@mui/material/RadioGroup/RadioGroupContext/index.esm.js +2 -1
  553. package/dist/node_modules/@mui/material/RadioGroup/RadioGroupContext/index.esm.js.map +1 -1
  554. package/dist/node_modules/@mui/material/RadioGroup/RadioGroupContext/index.js +1 -1
  555. package/dist/node_modules/@mui/material/RadioGroup/RadioGroupContext/index.js.map +1 -1
  556. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js +4 -3
  557. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js.map +1 -1
  558. package/dist/node_modules/@mui/material/Rating/Rating/index.js +6 -6
  559. package/dist/node_modules/@mui/material/Rating/Rating/index.js.map +1 -1
  560. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js +2 -1
  561. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js.map +1 -1
  562. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js +2 -2
  563. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js.map +1 -1
  564. package/dist/node_modules/@mui/material/Select/Select/index.esm.js +2 -1
  565. package/dist/node_modules/@mui/material/Select/Select/index.esm.js.map +1 -1
  566. package/dist/node_modules/@mui/material/Select/Select/index.js +1 -1
  567. package/dist/node_modules/@mui/material/Select/Select/index.js.map +1 -1
  568. package/dist/node_modules/@mui/material/Select/SelectInput/index.esm.js +5 -4
  569. package/dist/node_modules/@mui/material/Select/SelectInput/index.esm.js.map +1 -1
  570. package/dist/node_modules/@mui/material/Select/SelectInput/index.js +2 -2
  571. package/dist/node_modules/@mui/material/Select/SelectInput/index.js.map +1 -1
  572. package/dist/node_modules/@mui/material/Skeleton/Skeleton/index.esm.js +2 -1
  573. package/dist/node_modules/@mui/material/Skeleton/Skeleton/index.esm.js.map +1 -1
  574. package/dist/node_modules/@mui/material/Skeleton/Skeleton/index.js +1 -1
  575. package/dist/node_modules/@mui/material/Skeleton/Skeleton/index.js.map +1 -1
  576. package/dist/node_modules/@mui/material/Slide/Slide/index.esm.js +3 -2
  577. package/dist/node_modules/@mui/material/Slide/Slide/index.esm.js.map +1 -1
  578. package/dist/node_modules/@mui/material/Slide/Slide/index.js +1 -1
  579. package/dist/node_modules/@mui/material/Slide/Slide/index.js.map +1 -1
  580. package/dist/node_modules/@mui/material/Slider/Slider/index.esm.js +2 -1
  581. package/dist/node_modules/@mui/material/Slider/Slider/index.esm.js.map +1 -1
  582. package/dist/node_modules/@mui/material/Slider/Slider/index.js +1 -1
  583. package/dist/node_modules/@mui/material/Slider/Slider/index.js.map +1 -1
  584. package/dist/node_modules/@mui/material/Slider/SliderValueLabel/index.esm.js +2 -1
  585. package/dist/node_modules/@mui/material/Slider/SliderValueLabel/index.esm.js.map +1 -1
  586. package/dist/node_modules/@mui/material/Slider/SliderValueLabel/index.js +1 -1
  587. package/dist/node_modules/@mui/material/Slider/SliderValueLabel/index.js.map +1 -1
  588. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.esm.js +2 -1
  589. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.esm.js.map +1 -1
  590. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.js +1 -1
  591. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.js.map +1 -1
  592. package/dist/node_modules/@mui/material/SnackbarContent/SnackbarContent/index.esm.js +2 -1
  593. package/dist/node_modules/@mui/material/SnackbarContent/SnackbarContent/index.esm.js.map +1 -1
  594. package/dist/node_modules/@mui/material/SnackbarContent/SnackbarContent/index.js +1 -1
  595. package/dist/node_modules/@mui/material/SnackbarContent/SnackbarContent/index.js.map +1 -1
  596. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js +3 -2
  597. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js.map +1 -1
  598. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js +3 -3
  599. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js.map +1 -1
  600. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js +2 -1
  601. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js.map +1 -1
  602. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js +1 -1
  603. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js.map +1 -1
  604. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js +2 -1
  605. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js.map +1 -1
  606. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js +2 -2
  607. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js.map +1 -1
  608. package/dist/node_modules/@mui/material/Stack/Stack/index.esm.js +2 -1
  609. package/dist/node_modules/@mui/material/Stack/Stack/index.esm.js.map +1 -1
  610. package/dist/node_modules/@mui/material/Stack/Stack/index.js +1 -1
  611. package/dist/node_modules/@mui/material/Stack/Stack/index.js.map +1 -1
  612. package/dist/node_modules/@mui/material/Step/Step/index.esm.js +2 -1
  613. package/dist/node_modules/@mui/material/Step/Step/index.esm.js.map +1 -1
  614. package/dist/node_modules/@mui/material/Step/Step/index.js +1 -1
  615. package/dist/node_modules/@mui/material/Step/Step/index.js.map +1 -1
  616. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js +2 -1
  617. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js.map +1 -1
  618. package/dist/node_modules/@mui/material/Step/StepContext/index.js +1 -1
  619. package/dist/node_modules/@mui/material/Step/StepContext/index.js.map +1 -1
  620. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js +2 -1
  621. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js.map +1 -1
  622. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js +1 -1
  623. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js.map +1 -1
  624. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js +2 -1
  625. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js.map +1 -1
  626. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js +1 -1
  627. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js.map +1 -1
  628. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js +3 -2
  629. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js.map +1 -1
  630. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js +1 -1
  631. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js.map +1 -1
  632. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js +2 -1
  633. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js.map +1 -1
  634. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js +1 -1
  635. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js.map +1 -1
  636. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js +2 -1
  637. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js.map +1 -1
  638. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js +2 -2
  639. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js.map +1 -1
  640. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js +2 -1
  641. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js.map +1 -1
  642. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js +2 -2
  643. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js.map +1 -1
  644. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js +2 -1
  645. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js.map +1 -1
  646. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js +1 -1
  647. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js.map +1 -1
  648. package/dist/node_modules/@mui/material/SvgIcon/SvgIcon/index.esm.js +2 -1
  649. package/dist/node_modules/@mui/material/SvgIcon/SvgIcon/index.esm.js.map +1 -1
  650. package/dist/node_modules/@mui/material/SvgIcon/SvgIcon/index.js +2 -2
  651. package/dist/node_modules/@mui/material/SvgIcon/SvgIcon/index.js.map +1 -1
  652. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js +2 -1
  653. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js.map +1 -1
  654. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js +2 -2
  655. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js.map +1 -1
  656. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js +2 -1
  657. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js.map +1 -1
  658. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js +1 -1
  659. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js.map +1 -1
  660. package/dist/node_modules/@mui/material/Switch/Switch/index.esm.js +2 -1
  661. package/dist/node_modules/@mui/material/Switch/Switch/index.esm.js.map +1 -1
  662. package/dist/node_modules/@mui/material/Switch/Switch/index.js +2 -2
  663. package/dist/node_modules/@mui/material/Switch/Switch/index.js.map +1 -1
  664. package/dist/node_modules/@mui/material/Tab/Tab/index.esm.js +2 -1
  665. package/dist/node_modules/@mui/material/Tab/Tab/index.esm.js.map +1 -1
  666. package/dist/node_modules/@mui/material/Tab/Tab/index.js +1 -1
  667. package/dist/node_modules/@mui/material/Tab/Tab/index.js.map +1 -1
  668. package/dist/node_modules/@mui/material/TabScrollButton/TabScrollButton/index.esm.js +2 -1
  669. package/dist/node_modules/@mui/material/TabScrollButton/TabScrollButton/index.esm.js.map +1 -1
  670. package/dist/node_modules/@mui/material/TabScrollButton/TabScrollButton/index.js +2 -2
  671. package/dist/node_modules/@mui/material/TabScrollButton/TabScrollButton/index.js.map +1 -1
  672. package/dist/node_modules/@mui/material/Table/Table/index.esm.js +2 -1
  673. package/dist/node_modules/@mui/material/Table/Table/index.esm.js.map +1 -1
  674. package/dist/node_modules/@mui/material/Table/Table/index.js +2 -2
  675. package/dist/node_modules/@mui/material/Table/Table/index.js.map +1 -1
  676. package/dist/node_modules/@mui/material/Table/TableContext/index.esm.js +2 -1
  677. package/dist/node_modules/@mui/material/Table/TableContext/index.esm.js.map +1 -1
  678. package/dist/node_modules/@mui/material/Table/TableContext/index.js +1 -1
  679. package/dist/node_modules/@mui/material/Table/TableContext/index.js.map +1 -1
  680. package/dist/node_modules/@mui/material/Table/Tablelvl2Context/index.esm.js +2 -1
  681. package/dist/node_modules/@mui/material/Table/Tablelvl2Context/index.esm.js.map +1 -1
  682. package/dist/node_modules/@mui/material/Table/Tablelvl2Context/index.js +1 -1
  683. package/dist/node_modules/@mui/material/Table/Tablelvl2Context/index.js.map +1 -1
  684. package/dist/node_modules/@mui/material/TableBody/TableBody/index.esm.js +2 -1
  685. package/dist/node_modules/@mui/material/TableBody/TableBody/index.esm.js.map +1 -1
  686. package/dist/node_modules/@mui/material/TableBody/TableBody/index.js +1 -1
  687. package/dist/node_modules/@mui/material/TableBody/TableBody/index.js.map +1 -1
  688. package/dist/node_modules/@mui/material/TableCell/TableCell/index.esm.js +2 -1
  689. package/dist/node_modules/@mui/material/TableCell/TableCell/index.esm.js.map +1 -1
  690. package/dist/node_modules/@mui/material/TableCell/TableCell/index.js +1 -1
  691. package/dist/node_modules/@mui/material/TableCell/TableCell/index.js.map +1 -1
  692. package/dist/node_modules/@mui/material/TableContainer/TableContainer/index.esm.js +2 -1
  693. package/dist/node_modules/@mui/material/TableContainer/TableContainer/index.esm.js.map +1 -1
  694. package/dist/node_modules/@mui/material/TableContainer/TableContainer/index.js +2 -2
  695. package/dist/node_modules/@mui/material/TableContainer/TableContainer/index.js.map +1 -1
  696. package/dist/node_modules/@mui/material/TableFooter/TableFooter/index.esm.js +2 -1
  697. package/dist/node_modules/@mui/material/TableFooter/TableFooter/index.esm.js.map +1 -1
  698. package/dist/node_modules/@mui/material/TableFooter/TableFooter/index.js +1 -1
  699. package/dist/node_modules/@mui/material/TableFooter/TableFooter/index.js.map +1 -1
  700. package/dist/node_modules/@mui/material/TableHead/TableHead/index.esm.js +2 -1
  701. package/dist/node_modules/@mui/material/TableHead/TableHead/index.esm.js.map +1 -1
  702. package/dist/node_modules/@mui/material/TableHead/TableHead/index.js +1 -1
  703. package/dist/node_modules/@mui/material/TableHead/TableHead/index.js.map +1 -1
  704. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js +2 -1
  705. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js.map +1 -1
  706. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js +2 -2
  707. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js.map +1 -1
  708. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js +2 -1
  709. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js.map +1 -1
  710. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js +2 -2
  711. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js.map +1 -1
  712. package/dist/node_modules/@mui/material/TableRow/TableRow/index.esm.js +2 -1
  713. package/dist/node_modules/@mui/material/TableRow/TableRow/index.esm.js.map +1 -1
  714. package/dist/node_modules/@mui/material/TableRow/TableRow/index.js +1 -1
  715. package/dist/node_modules/@mui/material/TableRow/TableRow/index.js.map +1 -1
  716. package/dist/node_modules/@mui/material/TableSortLabel/TableSortLabel/index.esm.js +2 -1
  717. package/dist/node_modules/@mui/material/TableSortLabel/TableSortLabel/index.esm.js.map +1 -1
  718. package/dist/node_modules/@mui/material/TableSortLabel/TableSortLabel/index.js +1 -1
  719. package/dist/node_modules/@mui/material/TableSortLabel/TableSortLabel/index.js.map +1 -1
  720. package/dist/node_modules/@mui/material/Tabs/ScrollbarSize/index.esm.js +2 -1
  721. package/dist/node_modules/@mui/material/Tabs/ScrollbarSize/index.esm.js.map +1 -1
  722. package/dist/node_modules/@mui/material/Tabs/ScrollbarSize/index.js +1 -1
  723. package/dist/node_modules/@mui/material/Tabs/ScrollbarSize/index.js.map +1 -1
  724. package/dist/node_modules/@mui/material/Tabs/Tabs/index.esm.js +7 -6
  725. package/dist/node_modules/@mui/material/Tabs/Tabs/index.esm.js.map +1 -1
  726. package/dist/node_modules/@mui/material/Tabs/Tabs/index.js +2 -2
  727. package/dist/node_modules/@mui/material/Tabs/Tabs/index.js.map +1 -1
  728. package/dist/node_modules/@mui/material/TextField/TextField/index.esm.js +3 -2
  729. package/dist/node_modules/@mui/material/TextField/TextField/index.esm.js.map +1 -1
  730. package/dist/node_modules/@mui/material/TextField/TextField/index.js +2 -2
  731. package/dist/node_modules/@mui/material/TextField/TextField/index.js.map +1 -1
  732. package/dist/node_modules/@mui/material/TextareaAutosize/TextareaAutosize/index.esm.js +2 -1
  733. package/dist/node_modules/@mui/material/TextareaAutosize/TextareaAutosize/index.esm.js.map +1 -1
  734. package/dist/node_modules/@mui/material/TextareaAutosize/TextareaAutosize/index.js +1 -1
  735. package/dist/node_modules/@mui/material/TextareaAutosize/TextareaAutosize/index.js.map +1 -1
  736. package/dist/node_modules/@mui/material/ToggleButton/ToggleButton/index.esm.js +2 -1
  737. package/dist/node_modules/@mui/material/ToggleButton/ToggleButton/index.esm.js.map +1 -1
  738. package/dist/node_modules/@mui/material/ToggleButton/ToggleButton/index.js +1 -1
  739. package/dist/node_modules/@mui/material/ToggleButton/ToggleButton/index.js.map +1 -1
  740. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup/index.esm.js +3 -2
  741. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup/index.esm.js.map +1 -1
  742. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup/index.js +2 -2
  743. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup/index.js.map +1 -1
  744. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext/index.esm.js +2 -1
  745. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext/index.esm.js.map +1 -1
  746. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext/index.js +1 -1
  747. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext/index.js.map +1 -1
  748. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext/index.esm.js +2 -1
  749. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext/index.esm.js.map +1 -1
  750. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext/index.js +1 -1
  751. package/dist/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext/index.js.map +1 -1
  752. package/dist/node_modules/@mui/material/Toolbar/Toolbar/index.esm.js +2 -1
  753. package/dist/node_modules/@mui/material/Toolbar/Toolbar/index.esm.js.map +1 -1
  754. package/dist/node_modules/@mui/material/Toolbar/Toolbar/index.js +2 -2
  755. package/dist/node_modules/@mui/material/Toolbar/Toolbar/index.js.map +1 -1
  756. package/dist/node_modules/@mui/material/Tooltip/Tooltip/index.esm.js +5 -4
  757. package/dist/node_modules/@mui/material/Tooltip/Tooltip/index.esm.js.map +1 -1
  758. package/dist/node_modules/@mui/material/Tooltip/Tooltip/index.js +2 -2
  759. package/dist/node_modules/@mui/material/Tooltip/Tooltip/index.js.map +1 -1
  760. package/dist/node_modules/@mui/material/Typography/Typography/index.esm.js +2 -1
  761. package/dist/node_modules/@mui/material/Typography/Typography/index.esm.js.map +1 -1
  762. package/dist/node_modules/@mui/material/Typography/Typography/index.js +2 -2
  763. package/dist/node_modules/@mui/material/Typography/Typography/index.js.map +1 -1
  764. package/dist/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap/index.esm.js +4 -3
  765. package/dist/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap/index.esm.js.map +1 -1
  766. package/dist/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap/index.js +2 -2
  767. package/dist/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap/index.js.map +1 -1
  768. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js +2 -1
  769. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js.map +1 -1
  770. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js +1 -1
  771. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js.map +1 -1
  772. package/dist/node_modules/@mui/material/internal/SwitchBase/index.esm.js +2 -1
  773. package/dist/node_modules/@mui/material/internal/SwitchBase/index.esm.js.map +1 -1
  774. package/dist/node_modules/@mui/material/internal/SwitchBase/index.js +2 -2
  775. package/dist/node_modules/@mui/material/internal/SwitchBase/index.js.map +1 -1
  776. package/dist/node_modules/@mui/material/styles/ThemeProvider/index.esm.js +2 -1
  777. package/dist/node_modules/@mui/material/styles/ThemeProvider/index.esm.js.map +1 -1
  778. package/dist/node_modules/@mui/material/styles/ThemeProvider/index.js +1 -1
  779. package/dist/node_modules/@mui/material/styles/ThemeProvider/index.js.map +1 -1
  780. package/dist/node_modules/@mui/material/styles/createPalette/index.esm.js +5 -4
  781. package/dist/node_modules/@mui/material/styles/createPalette/index.esm.js.map +1 -1
  782. package/dist/node_modules/@mui/material/styles/createPalette/index.js +1 -1
  783. package/dist/node_modules/@mui/material/styles/createPalette/index.js.map +1 -1
  784. package/dist/node_modules/@mui/material/styles/createTheme/index.esm.js +4 -3
  785. package/dist/node_modules/@mui/material/styles/createTheme/index.esm.js.map +1 -1
  786. package/dist/node_modules/@mui/material/styles/createTheme/index.js +1 -1
  787. package/dist/node_modules/@mui/material/styles/createTheme/index.js.map +1 -1
  788. package/dist/node_modules/@mui/material/styles/createTransitions/index.esm.js +2 -1
  789. package/dist/node_modules/@mui/material/styles/createTransitions/index.esm.js.map +1 -1
  790. package/dist/node_modules/@mui/material/styles/createTransitions/index.js +1 -1
  791. package/dist/node_modules/@mui/material/styles/createTransitions/index.js.map +1 -1
  792. package/dist/node_modules/@mui/material/styles/createTypography/index.esm.js +2 -1
  793. package/dist/node_modules/@mui/material/styles/createTypography/index.esm.js.map +1 -1
  794. package/dist/node_modules/@mui/material/styles/createTypography/index.js +1 -1
  795. package/dist/node_modules/@mui/material/styles/createTypography/index.js.map +1 -1
  796. package/dist/node_modules/@mui/material/styles/useTheme/index.esm.js +2 -1
  797. package/dist/node_modules/@mui/material/styles/useTheme/index.esm.js.map +1 -1
  798. package/dist/node_modules/@mui/material/styles/useTheme/index.js +1 -1
  799. package/dist/node_modules/@mui/material/styles/useTheme/index.js.map +1 -1
  800. package/dist/node_modules/@mui/material/useAutocomplete/useAutocomplete/index.esm.js +6 -5
  801. package/dist/node_modules/@mui/material/useAutocomplete/useAutocomplete/index.esm.js.map +1 -1
  802. package/dist/node_modules/@mui/material/useAutocomplete/useAutocomplete/index.js +1 -1
  803. package/dist/node_modules/@mui/material/useAutocomplete/useAutocomplete/index.js.map +1 -1
  804. package/dist/node_modules/@mui/material/utils/createSvgIcon/index.esm.js +2 -1
  805. package/dist/node_modules/@mui/material/utils/createSvgIcon/index.esm.js.map +1 -1
  806. package/dist/node_modules/@mui/material/utils/createSvgIcon/index.js +2 -2
  807. package/dist/node_modules/@mui/material/utils/createSvgIcon/index.js.map +1 -1
  808. package/dist/node_modules/@mui/material/utils/index/index.esm.js +2 -1
  809. package/dist/node_modules/@mui/material/utils/index/index.esm.js.map +1 -1
  810. package/dist/node_modules/@mui/material/utils/index/index.js +1 -1
  811. package/dist/node_modules/@mui/material/utils/index/index.js.map +1 -1
  812. package/dist/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider/index.esm.js +6 -5
  813. package/dist/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider/index.esm.js.map +1 -1
  814. package/dist/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider/index.js +2 -2
  815. package/dist/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider/index.js.map +1 -1
  816. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext/index.esm.js +2 -1
  817. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext/index.esm.js.map +1 -1
  818. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext/index.js +1 -1
  819. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext/index.js.map +1 -1
  820. package/dist/node_modules/@mui/private-theming/useTheme/useTheme/index.esm.js +2 -1
  821. package/dist/node_modules/@mui/private-theming/useTheme/useTheme/index.esm.js.map +1 -1
  822. package/dist/node_modules/@mui/private-theming/useTheme/useTheme/index.js +1 -1
  823. package/dist/node_modules/@mui/private-theming/useTheme/useTheme/index.js.map +1 -1
  824. package/dist/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles/index.esm.js +2 -1
  825. package/dist/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles/index.esm.js.map +1 -1
  826. package/dist/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles/index.js +1 -1
  827. package/dist/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles/index.js.map +1 -1
  828. package/dist/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider/index.esm.js +2 -1
  829. package/dist/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider/index.esm.js.map +1 -1
  830. package/dist/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider/index.js +1 -1
  831. package/dist/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider/index.js.map +1 -1
  832. package/dist/node_modules/@mui/styled-engine/index/index.esm.js +2 -8
  833. package/dist/node_modules/@mui/styled-engine/index/index.esm.js.map +1 -1
  834. package/dist/node_modules/@mui/styled-engine/index/index.js +1 -1
  835. package/dist/node_modules/@mui/styled-engine/index/index.js.map +1 -1
  836. package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +11 -10
  837. package/dist/node_modules/@mui/system/colorManipulator/index.esm.js.map +1 -1
  838. package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
  839. package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
  840. package/dist/node_modules/@mui/system/createStyled/index.esm.js +12 -11
  841. package/dist/node_modules/@mui/system/createStyled/index.esm.js.map +1 -1
  842. package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
  843. package/dist/node_modules/@mui/system/createStyled/index.js.map +1 -1
  844. package/dist/node_modules/@mui/system/esm/Container/createContainer/index.esm.js +2 -1
  845. package/dist/node_modules/@mui/system/esm/Container/createContainer/index.esm.js.map +1 -1
  846. package/dist/node_modules/@mui/system/esm/Container/createContainer/index.js +2 -2
  847. package/dist/node_modules/@mui/system/esm/Container/createContainer/index.js.map +1 -1
  848. package/dist/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider/index.esm.js +2 -1
  849. package/dist/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider/index.esm.js.map +1 -1
  850. package/dist/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider/index.js +2 -2
  851. package/dist/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider/index.js.map +1 -1
  852. package/dist/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles/index.esm.js +2 -1
  853. package/dist/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles/index.esm.js.map +1 -1
  854. package/dist/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles/index.js +1 -1
  855. package/dist/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles/index.js.map +1 -1
  856. package/dist/node_modules/@mui/system/esm/RtlProvider/index/index.esm.js +2 -1
  857. package/dist/node_modules/@mui/system/esm/RtlProvider/index/index.esm.js.map +1 -1
  858. package/dist/node_modules/@mui/system/esm/RtlProvider/index/index.js +1 -1
  859. package/dist/node_modules/@mui/system/esm/RtlProvider/index/index.js.map +1 -1
  860. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.esm.js +2 -1
  861. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.esm.js.map +1 -1
  862. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.js +2 -2
  863. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.js.map +1 -1
  864. package/dist/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider/index.esm.js +5 -4
  865. package/dist/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider/index.esm.js.map +1 -1
  866. package/dist/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider/index.js +2 -2
  867. package/dist/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider/index.js.map +1 -1
  868. package/dist/node_modules/@mui/system/esm/borders/index.esm.js +2 -1
  869. package/dist/node_modules/@mui/system/esm/borders/index.esm.js.map +1 -1
  870. package/dist/node_modules/@mui/system/esm/borders/index.js +1 -1
  871. package/dist/node_modules/@mui/system/esm/borders/index.js.map +1 -1
  872. package/dist/node_modules/@mui/system/esm/breakpoints/index.esm.js.map +1 -1
  873. package/dist/node_modules/@mui/system/esm/breakpoints/index.js.map +1 -1
  874. package/dist/node_modules/@mui/system/esm/colorManipulator/index.esm.js +4 -3
  875. package/dist/node_modules/@mui/system/esm/colorManipulator/index.esm.js.map +1 -1
  876. package/dist/node_modules/@mui/system/esm/colorManipulator/index.js +1 -1
  877. package/dist/node_modules/@mui/system/esm/colorManipulator/index.js.map +1 -1
  878. package/dist/node_modules/@mui/system/esm/compose/index.esm.js +2 -1
  879. package/dist/node_modules/@mui/system/esm/compose/index.esm.js.map +1 -1
  880. package/dist/node_modules/@mui/system/esm/compose/index.js +1 -1
  881. package/dist/node_modules/@mui/system/esm/compose/index.js.map +1 -1
  882. package/dist/node_modules/@mui/system/esm/createStyled/index.esm.js +3 -2
  883. package/dist/node_modules/@mui/system/esm/createStyled/index.esm.js.map +1 -1
  884. package/dist/node_modules/@mui/system/esm/createStyled/index.js +1 -1
  885. package/dist/node_modules/@mui/system/esm/createStyled/index.js.map +1 -1
  886. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing/index.esm.js +2 -1
  887. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing/index.esm.js.map +1 -1
  888. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing/index.js +1 -1
  889. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing/index.js.map +1 -1
  890. package/dist/node_modules/@mui/system/esm/cssGrid/index.esm.js +4 -3
  891. package/dist/node_modules/@mui/system/esm/cssGrid/index.esm.js.map +1 -1
  892. package/dist/node_modules/@mui/system/esm/cssGrid/index.js +1 -1
  893. package/dist/node_modules/@mui/system/esm/cssGrid/index.js.map +1 -1
  894. package/dist/node_modules/@mui/system/esm/responsivePropType/index.esm.js +2 -1
  895. package/dist/node_modules/@mui/system/esm/responsivePropType/index.esm.js.map +1 -1
  896. package/dist/node_modules/@mui/system/esm/responsivePropType/index.js +1 -1
  897. package/dist/node_modules/@mui/system/esm/responsivePropType/index.js.map +1 -1
  898. package/dist/node_modules/@mui/system/esm/spacing/index.esm.js +7 -6
  899. package/dist/node_modules/@mui/system/esm/spacing/index.esm.js.map +1 -1
  900. package/dist/node_modules/@mui/system/esm/spacing/index.js +1 -1
  901. package/dist/node_modules/@mui/system/esm/spacing/index.js.map +1 -1
  902. package/dist/node_modules/@mui/system/esm/style/index.esm.js +2 -1
  903. package/dist/node_modules/@mui/system/esm/style/index.esm.js.map +1 -1
  904. package/dist/node_modules/@mui/system/esm/style/index.js +1 -1
  905. package/dist/node_modules/@mui/system/esm/style/index.js.map +1 -1
  906. package/dist/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery/index.esm.js +3 -2
  907. package/dist/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery/index.esm.js.map +1 -1
  908. package/dist/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery/index.js +1 -1
  909. package/dist/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery/index.js.map +1 -1
  910. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
  911. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
  912. package/dist/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType/index.esm.js +2 -1
  913. package/dist/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType/index.esm.js.map +1 -1
  914. package/dist/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType/index.js +1 -1
  915. package/dist/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType/index.js.map +1 -1
  916. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize/index.esm.js +2 -1
  917. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize/index.esm.js.map +1 -1
  918. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize/index.js +1 -1
  919. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize/index.js.map +1 -1
  920. package/dist/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes/index.esm.js +2 -1
  921. package/dist/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes/index.esm.js.map +1 -1
  922. package/dist/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes/index.js +1 -1
  923. package/dist/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes/index.js.map +1 -1
  924. package/dist/node_modules/@mui/utils/esm/deprecatedPropType/deprecatedPropType/index.esm.js +2 -1
  925. package/dist/node_modules/@mui/utils/esm/deprecatedPropType/deprecatedPropType/index.esm.js.map +1 -1
  926. package/dist/node_modules/@mui/utils/esm/deprecatedPropType/deprecatedPropType/index.js +1 -1
  927. package/dist/node_modules/@mui/utils/esm/deprecatedPropType/deprecatedPropType/index.js.map +1 -1
  928. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp/index.esm.js +2 -1
  929. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp/index.esm.js.map +1 -1
  930. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp/index.js +1 -1
  931. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp/index.js.map +1 -1
  932. package/dist/node_modules/@mui/utils/esm/integerPropType/integerPropType/index.esm.js +2 -1
  933. package/dist/node_modules/@mui/utils/esm/integerPropType/integerPropType/index.esm.js.map +1 -1
  934. package/dist/node_modules/@mui/utils/esm/integerPropType/integerPropType/index.js +1 -1
  935. package/dist/node_modules/@mui/utils/esm/integerPropType/integerPropType/index.js.map +1 -1
  936. package/dist/node_modules/@mui/utils/esm/requirePropFactory/requirePropFactory/index.esm.js +2 -1
  937. package/dist/node_modules/@mui/utils/esm/requirePropFactory/requirePropFactory/index.esm.js.map +1 -1
  938. package/dist/node_modules/@mui/utils/esm/requirePropFactory/requirePropFactory/index.js +1 -1
  939. package/dist/node_modules/@mui/utils/esm/requirePropFactory/requirePropFactory/index.js.map +1 -1
  940. package/dist/node_modules/@mui/utils/esm/unsupportedProp/unsupportedProp/index.esm.js +2 -1
  941. package/dist/node_modules/@mui/utils/esm/unsupportedProp/unsupportedProp/index.esm.js.map +1 -1
  942. package/dist/node_modules/@mui/utils/esm/unsupportedProp/unsupportedProp/index.js +1 -1
  943. package/dist/node_modules/@mui/utils/esm/unsupportedProp/unsupportedProp/index.js.map +1 -1
  944. package/dist/node_modules/@mui/utils/esm/useControlled/useControlled/index.esm.js +2 -1
  945. package/dist/node_modules/@mui/utils/esm/useControlled/useControlled/index.esm.js.map +1 -1
  946. package/dist/node_modules/@mui/utils/esm/useControlled/useControlled/index.js +1 -1
  947. package/dist/node_modules/@mui/utils/esm/useControlled/useControlled/index.js.map +1 -1
  948. package/dist/node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar/index.esm.js +2 -1
  949. package/dist/node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar/index.esm.js.map +1 -1
  950. package/dist/node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar/index.js +1 -1
  951. package/dist/node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar/index.js.map +1 -1
  952. package/dist/node_modules/@mui/x-date-pickers/DateField/DateField/index.esm.js +2 -1
  953. package/dist/node_modules/@mui/x-date-pickers/DateField/DateField/index.esm.js.map +1 -1
  954. package/dist/node_modules/@mui/x-date-pickers/DateField/DateField/index.js +2 -2
  955. package/dist/node_modules/@mui/x-date-pickers/DateField/DateField/index.js.map +1 -1
  956. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePicker/index.esm.js +2 -1
  957. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePicker/index.esm.js.map +1 -1
  958. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePicker/index.js +1 -1
  959. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePicker/index.js.map +1 -1
  960. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar/index.esm.js +2 -1
  961. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar/index.esm.js.map +1 -1
  962. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar/index.js +1 -1
  963. package/dist/node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar/index.js.map +1 -1
  964. package/dist/node_modules/@mui/x-date-pickers/DateTimeField/DateTimeField/index.esm.js +2 -1
  965. package/dist/node_modules/@mui/x-date-pickers/DateTimeField/DateTimeField/index.esm.js.map +1 -1
  966. package/dist/node_modules/@mui/x-date-pickers/DateTimeField/DateTimeField/index.js +2 -2
  967. package/dist/node_modules/@mui/x-date-pickers/DateTimeField/DateTimeField/index.js.map +1 -1
  968. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker/index.esm.js +2 -1
  969. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker/index.esm.js.map +1 -1
  970. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker/index.js +1 -1
  971. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker/index.js.map +1 -1
  972. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs/index.esm.js +2 -1
  973. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs/index.esm.js.map +1 -1
  974. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs/index.js +1 -1
  975. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs/index.js.map +1 -1
  976. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar/index.esm.js +2 -1
  977. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar/index.esm.js.map +1 -1
  978. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar/index.js +1 -1
  979. package/dist/node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar/index.js.map +1 -1
  980. package/dist/node_modules/@mui/x-date-pickers/DigitalClock/DigitalClock/index.esm.js +2 -1
  981. package/dist/node_modules/@mui/x-date-pickers/DigitalClock/DigitalClock/index.esm.js.map +1 -1
  982. package/dist/node_modules/@mui/x-date-pickers/DigitalClock/DigitalClock/index.js +1 -1
  983. package/dist/node_modules/@mui/x-date-pickers/DigitalClock/DigitalClock/index.js.map +1 -1
  984. package/dist/node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider/index.esm.js +3 -2
  985. package/dist/node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider/index.esm.js.map +1 -1
  986. package/dist/node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider/index.js +2 -2
  987. package/dist/node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider/index.js.map +1 -1
  988. package/dist/node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar/index.esm.js +2 -1
  989. package/dist/node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar/index.esm.js.map +1 -1
  990. package/dist/node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar/index.js +1 -1
  991. package/dist/node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar/index.js.map +1 -1
  992. package/dist/node_modules/@mui/x-date-pickers/MultiSectionDigitalClock/MultiSectionDigitalClock/index.esm.js +2 -1
  993. package/dist/node_modules/@mui/x-date-pickers/MultiSectionDigitalClock/MultiSectionDigitalClock/index.esm.js.map +1 -1
  994. package/dist/node_modules/@mui/x-date-pickers/MultiSectionDigitalClock/MultiSectionDigitalClock/index.js +1 -1
  995. package/dist/node_modules/@mui/x-date-pickers/MultiSectionDigitalClock/MultiSectionDigitalClock/index.js.map +1 -1
  996. package/dist/node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar/index.esm.js +2 -1
  997. package/dist/node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar/index.esm.js.map +1 -1
  998. package/dist/node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar/index.js +4 -4
  999. package/dist/node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar/index.js.map +1 -1
  1000. package/dist/node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader/index.esm.js +2 -1
  1001. package/dist/node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader/index.esm.js.map +1 -1
  1002. package/dist/node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader/index.js +1 -1
  1003. package/dist/node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader/index.js.map +1 -1
  1004. package/dist/node_modules/@mui/x-date-pickers/PickersDay/PickersDay/index.esm.js +5 -4
  1005. package/dist/node_modules/@mui/x-date-pickers/PickersDay/PickersDay/index.esm.js.map +1 -1
  1006. package/dist/node_modules/@mui/x-date-pickers/PickersDay/PickersDay/index.js +1 -1
  1007. package/dist/node_modules/@mui/x-date-pickers/PickersDay/PickersDay/index.js.map +1 -1
  1008. package/dist/node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout/index.esm.js +2 -1
  1009. package/dist/node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout/index.esm.js.map +1 -1
  1010. package/dist/node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout/index.js +1 -1
  1011. package/dist/node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout/index.js.map +1 -1
  1012. package/dist/node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts/index.esm.js +2 -1
  1013. package/dist/node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts/index.esm.js.map +1 -1
  1014. package/dist/node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts/index.js +2 -2
  1015. package/dist/node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts/index.js.map +1 -1
  1016. package/dist/node_modules/@mui/x-date-pickers/TimeClock/TimeClock/index.esm.js +2 -1
  1017. package/dist/node_modules/@mui/x-date-pickers/TimeClock/TimeClock/index.esm.js.map +1 -1
  1018. package/dist/node_modules/@mui/x-date-pickers/TimeClock/TimeClock/index.js +2 -2
  1019. package/dist/node_modules/@mui/x-date-pickers/TimeClock/TimeClock/index.js.map +1 -1
  1020. package/dist/node_modules/@mui/x-date-pickers/TimeField/TimeField/index.esm.js +2 -1
  1021. package/dist/node_modules/@mui/x-date-pickers/TimeField/TimeField/index.esm.js.map +1 -1
  1022. package/dist/node_modules/@mui/x-date-pickers/TimeField/TimeField/index.js +1 -1
  1023. package/dist/node_modules/@mui/x-date-pickers/TimeField/TimeField/index.js.map +1 -1
  1024. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePicker/index.esm.js +2 -1
  1025. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePicker/index.esm.js.map +1 -1
  1026. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePicker/index.js +1 -1
  1027. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePicker/index.js.map +1 -1
  1028. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePickerToolbar/index.esm.js +2 -1
  1029. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePickerToolbar/index.esm.js.map +1 -1
  1030. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePickerToolbar/index.js +2 -2
  1031. package/dist/node_modules/@mui/x-date-pickers/TimePicker/TimePickerToolbar/index.js.map +1 -1
  1032. package/dist/node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar/index.esm.js +2 -1
  1033. package/dist/node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar/index.esm.js.map +1 -1
  1034. package/dist/node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar/index.js +2 -2
  1035. package/dist/node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar/index.js.map +1 -1
  1036. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils/index.esm.js +4 -3
  1037. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils/index.esm.js.map +1 -1
  1038. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils/index.js +1 -1
  1039. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils/index.js.map +1 -1
  1040. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker/index.esm.js +2 -1
  1041. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker/index.esm.js.map +1 -1
  1042. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker/index.js +1 -1
  1043. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker/index.js.map +1 -1
  1044. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue/index.esm.js +2 -1
  1045. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue/index.esm.js.map +1 -1
  1046. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue/index.js +1 -1
  1047. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue/index.js.map +1 -1
  1048. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useViews/index.esm.js +2 -1
  1049. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useViews/index.esm.js.map +1 -1
  1050. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useViews/index.js +1 -1
  1051. package/dist/node_modules/@mui/x-date-pickers/internals/hooks/useViews/index.js.map +1 -1
  1052. package/dist/node_modules/@mui/x-date-pickers/internals/utils/warning/index.esm.js.map +1 -1
  1053. package/dist/node_modules/@react-querybuilder/material/dist/react-querybuilder_material/index.esm.js.map +1 -1
  1054. package/dist/node_modules/@react-querybuilder/material/dist/react-querybuilder_material/index.js.map +1 -1
  1055. package/dist/node_modules/@tanstack/table-core/build/lib/index/index.esm.js +11 -20
  1056. package/dist/node_modules/@tanstack/table-core/build/lib/index/index.esm.js.map +1 -1
  1057. package/dist/node_modules/@tanstack/table-core/build/lib/index/index.js +1 -1
  1058. package/dist/node_modules/@tanstack/table-core/build/lib/index/index.js.map +1 -1
  1059. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index/index.esm.js +7 -6
  1060. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index/index.esm.js.map +1 -1
  1061. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index/index.js +1 -1
  1062. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index/index.js.map +1 -1
  1063. package/dist/node_modules/notistack/notistack.esm/index.esm.js +3 -2
  1064. package/dist/node_modules/notistack/notistack.esm/index.esm.js.map +1 -1
  1065. package/dist/node_modules/notistack/notistack.esm/index.js +1 -1
  1066. package/dist/node_modules/notistack/notistack.esm/index.js.map +1 -1
  1067. package/dist/node_modules/prop-types/checkPropTypes/index.esm.js +4 -3
  1068. package/dist/node_modules/prop-types/checkPropTypes/index.esm.js.map +1 -1
  1069. package/dist/node_modules/prop-types/checkPropTypes/index.js +1 -1
  1070. package/dist/node_modules/prop-types/checkPropTypes/index.js.map +1 -1
  1071. package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js +6 -5
  1072. package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js.map +1 -1
  1073. package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js +1 -1
  1074. package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js.map +1 -1
  1075. package/dist/node_modules/prop-types/index/index.esm.js +3 -2
  1076. package/dist/node_modules/prop-types/index/index.esm.js.map +1 -1
  1077. package/dist/node_modules/prop-types/index/index.js +1 -1
  1078. package/dist/node_modules/prop-types/index/index.js.map +1 -1
  1079. package/dist/src/config/index.d.ts +0 -15
  1080. package/dist/src/index.d.ts +1 -16
  1081. package/dist/style.css +8 -4
  1082. package/dist/styles/index.esm.js +2 -0
  1083. package/dist/styles/index.esm.js.map +1 -1
  1084. package/dist/styles/index.js +1 -1
  1085. package/dist/utils/api/index.esm.js +4 -5
  1086. package/dist/utils/api/index.esm.js.map +1 -1
  1087. package/dist/utils/api/index.js +1 -1
  1088. package/dist/utils/api/index.js.map +1 -1
  1089. package/dist/utils/common/index.esm.js +7 -8
  1090. package/dist/utils/common/index.esm.js.map +1 -1
  1091. package/dist/utils/common/index.js +1 -1
  1092. package/dist/utils/common/index.js.map +1 -1
  1093. package/dist/views/form-builder/redux/actionCreator/index.esm.js +1 -2
  1094. package/dist/views/form-builder/redux/actionCreator/index.esm.js.map +1 -1
  1095. package/dist/views/form-builder/redux/actionCreator/index.js +1 -1
  1096. package/dist/views/form-builder/redux/actionCreator/index.js.map +1 -1
  1097. package/dist/views/template-editor/components/EditorSidebar/index.esm.js +3 -4
  1098. package/dist/views/template-editor/components/EditorSidebar/index.esm.js.map +1 -1
  1099. package/dist/views/template-editor/components/EditorSidebar/index.js +18 -18
  1100. package/dist/views/template-editor/components/EditorSidebar/index.js.map +1 -1
  1101. package/dist/views/template-editor/templates/index.esm.js +1 -2
  1102. package/dist/views/template-editor/templates/index.esm.js.map +1 -1
  1103. package/dist/views/template-editor/templates/index.js +5 -5
  1104. package/dist/views/template-editor/templates/index.js.map +1 -1
  1105. package/package.json +1 -1
  1106. package/src/styles/index.ts +3 -0
  1107. package/dist/node_modules/@babel/runtime/helpers/extends/index.esm.js +0 -23
  1108. package/dist/node_modules/@babel/runtime/helpers/extends/index.esm.js.map +0 -1
  1109. package/dist/node_modules/@babel/runtime/helpers/extends/index.js +0 -2
  1110. package/dist/node_modules/@babel/runtime/helpers/extends/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/upload/upload.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Typography from \"../typography/typography\";\nimport Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport \"./upload.scss\";\nimport { useDropzone } from \"react-dropzone\";\nimport Toast from '../toast/toast';\nimport {\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n} from \"@mui/material\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport { Add } from \"@mui/icons-material\";\nimport Button from \"../button/button\";\nimport Checkbox from \"../checkbox/checkbox\";\nimport Avatar from \"../avatar/avatar\";\nimport images from \"../../assets/images\";\nimport Chip from \"../chip/chip\";\nimport { auth } from \"../../constants/auth\";\nimport { KeyboardArrowDown, KeyboardArrowUp, Clear } from \"@mui/icons-material\";\nimport FileConfirmationDialog from \"./file-confirmation\"\n\n\ninterface UploadProps {\n open: boolean;\n title: string;\n multiple?: boolean;\n accept?: string;\n onClose: () => void;\n onConfirm: () => void;\n onSubmit: (files: any[]) => void;\n existingDriveData?: any;\n fileUploaded?: (value: boolean) => void | undefined;\n type: any\n\n\n}\ninterface CustomNavigator extends Navigator {\n connection?: {\n downlink?: number;\n };\n}\nconst formatBytes = (bytes: number, decimals = 2) => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n};\n\nconst Upload = (props: UploadProps) => {\n const {\n open,\n title,\n onClose,\n onConfirm,\n accept = \"*\",\n onSubmit,\n multiple = true,\n existingDriveData,\n fileUploaded , \n type\n \n } = props;\n\n const [files, setFiles] = useState<\n {\n file: File;\n isPrivate: boolean;\n checkboxDisabled: boolean;\n status: string;\n uploadProgress: number;\n fileSize: number;\n fileName: string;\n fileType: string;\n location: string;\n message: string;\n }[]\n >([]);\n\n interface IToast {\n type: 'normal' | 'alert';\n message: string;\n }\n const [isUploading, setIsUploading] = useState(false);\n const [isCollapsed, setIsCollapsed] = useState(false);\n const [isDialogMinimized, setIsDialogMinimized] = useState(false);\n const [isDragOver, setIsDragOver] = useState(false);\n const [abortController, setAbortController] = useState(new AbortController());\n const authToken = localStorage.getItem(auth.storageTokenKeyName);\n const [allDriveData, setAllDriveData] = useState();\n const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);\n const [selectedFileTitle, setSelectedFileTitle] = useState();\n const [toast, setToast] = useState<IToast | null>(null);\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDropAccepted: (newFiles) => {\n setFiles([\n ...files,\n ...newFiles.map((file) => ({\n file,\n isPrivate: false,\n checkboxDisabled: false,\n status: \"pending\",\n uploadProgress: 0,\n fileSize: file.size,\n fileName: file.name,\n fileType: file.type,\n location: \"\",\n message: \"\",\n })),\n ]);\n setIsDragOver(false);\n },\n onDragEnter: () => {\n setIsDragOver(true);\n },\n onDragLeave: () => {\n setIsDragOver(false);\n },\n noClick: true,\n noKeyboard: true,\n multiple: multiple,\n accept: accept ? convertAcceptObject(accept) : accept,\n });\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const driveTitles = existingDriveData?.map(item => item['title'])\n setAllDriveData(driveTitles);\n }, [existingDriveData]);\n\n useEffect(() => {\n const handleBeforeUnload = (event: any) => {\n if (isUploading) {\n const message =\n \"Are you sure you want to leave? Your uploads are not complete.\";\n event.returnValue = message; // Standard for most browsers\n return message; // For some older browsers\n }\n };\n if (fileInputRef.current) {\n fileInputRef.current.multiple = multiple;\n }\n\n window.addEventListener(\"beforeunload\", handleBeforeUnload);\n\n return () => {\n // Clean up the event listener when the component unmounts\n window.removeEventListener(\"beforeunload\", handleBeforeUnload);\n };\n }, [isUploading, multiple]);\n\n const getInternetSpeed = () => {\n const customNavigator = navigator as CustomNavigator;\n if (\"connection\" in customNavigator && customNavigator.connection) {\n return customNavigator.connection.downlink;\n } else {\n return null;\n }\n };\n\n function convertAcceptObject(types: string) {\n const accepts = types.split(\",\").map((item) => item.trim());\n const acceptObject = accepts.reduce((acc: any, type: string) => {\n acc[type] = [];\n return acc;\n }, {});\n return acceptObject;\n }\n\n const renderFileIcon = (file: any) => {\n const fileType = file?.type.split(\"/\")[0];\n switch (fileType) {\n case \"image\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#FFEBEB\" }}\n >\n <Avatar size={20} src={images.upload.documentPDF}></Avatar>\n </div>\n );\n case \"application\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#FFEBEB\" }}\n >\n <Avatar size={20} src={images.upload.documentPDF}></Avatar>\n </div>\n );\n case \"text\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#EBF9F2\" }}\n >\n <Avatar size={20} src={images.upload.docFile}></Avatar>\n </div>\n );\n default:\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#EBF9F2\" }}\n >\n <Avatar size={20} src={images.upload.docFile}></Avatar>\n </div>\n );\n }\n };\n\n const BASE_URL = `${getBackendBaseUrl()}/document/v1/file-upload/`;\n\n const handleConfirm = async () => {\n setIsUploading(true);\n // Create a new AbortController for each confirmation\n const controller = new AbortController();\n setAbortController(controller);\n \n const filteredFiles = files.filter((file : any) => file.status !== \"canceled\").length;\n for (let i = 0; i < files.length; i++) {\n if (files[i].uploadProgress === 100 || files[i].status !== \"pending\") {\n continue;\n }\n\n const file = files[i];\n \n const fileSize = file?.fileSize;\n try {\n if (fileSize > 10 * 1024 * 1024) {\n const uploadResponse = await handleMultipartUpload(file, i, controller);\n if (uploadResponse) {\n setTimeout(()=>{fileUploaded(true) } , 1000);\n }\n } else {\n await handleRegularUpload(file, i, controller, filteredFiles);\n }\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[i] = {\n ...updatedFiles[i],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n } finally {\n setIsUploading(false);\n }\n }\n };\n\n\n \n\n let tempCount = 0;\n const handleRegularUpload = async (\n file: any,\n index: number,\n controller: any,\n fileCount : number\n ) => {\n try {\n const format = ['docx', 'doc', 'csv', 'pdf', 'xls', 'xlsx', 'vnd.ms-excel', 'excel', 'txt'];\n const mimeType = file?.mimeType || file?.fileType || '';\n\t\t\tconst isValid = format.some(f => mimeType.includes(f));\n \n if (isValid && file?.fileSize && file?.fileSize >= 5242880) {\n return setToast({\n type: 'alert',\n message: 'File size must be within 5 MB!'\n });\n }\n const preSignedUrlsResponse = await fetch(\n `${BASE_URL}?key=${file?.fileName}&partCount=1&mimeType=${file?.fileType}&is_private=${!file?.isPrivate}`,\n {\n headers: {\n \"Content-Type\": \"application/json\",\n \"file-size\": file?.fileSize,\n \"x-token\": authToken,\n },\n signal: controller.signal\n },\n );\n const preSignedUrlsData = await preSignedUrlsResponse.json();\n if (preSignedUrlsData?.status_code == 400) {\n // alert(preSignedUrlsData?.message);\n setToast({\n type: 'alert',\n message: preSignedUrlsData?.message\n });\n return;\n }\n const preSignedUrl = preSignedUrlsData.data?.preSignedData?.presignedUrl;\n const location = preSignedUrlsData.data?.preSignedData?.location;\n const partParams = {\n Body: file?.file.slice(0, file?.fileSize),\n url: preSignedUrl,\n };\n const contentLength = file.fileSize;\n // const maxChunkSize = 1024 * 1024 * 1024; // 10 MB maximum chunk size\n // const chunkSize = Math.min(contentLength * 0.1, maxChunkSize);\n const chunkSize = 1024 * 1024 * 1024 * 1024 // 1MB chunk size\n let bytesUploaded = 0;\n\n while (bytesUploaded < contentLength) {\n const start = bytesUploaded;\n const end = Math.min(bytesUploaded + chunkSize, contentLength);\n\n // Send chunk of the file\n await fetch(partParams.url, {\n method: \"PUT\",\n body: file.file.slice(start, end),\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n },\n });\n\n // Update progress\n bytesUploaded = end;\n const progress = Math.round((bytesUploaded / contentLength) * 100);\n\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n checkboxDisabled: true,\n status: \"uploading\",\n uploadProgress: progress,\n };\n return updatedFiles;\n });\n }\n \n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"completed\",\n location ,\n message: \"Uploaded Successfully\",\n };\n tempCount = tempCount + 1;\n \n if(fileCount == tempCount){\n onSubmit(updatedFiles);\n tempCount = 0;\n \n }\n return updatedFiles;\n });\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n }\n \n };\n\n const handleMultipartUpload = async (\n file: any,\n index: number,\n controller: any,\n ) => {\n\n try {\n const partSize =\n (getInternetSpeed() || 10) * 1024 * 1024 < 5 * 1024 * 1024\n ? 5 * 1024 * 1024\n : (getInternetSpeed() || 10) * 1024 * 1024;\n const parts = Math.ceil(file?.fileSize / partSize);\n const preSignedUrlsResponse = await fetch(\n `${BASE_URL}?key=${file?.fileName}&partCount=${parts}&mimeType=${file?.fileType}&is_private=${!file?.isPrivate}`,\n {\n headers: {\n \"Content-Type\": \"application/json\",\n \"file-size\": file?.fileSize,\n \"x-token\": authToken,\n },\n signal: controller.signal,\n },\n );\n const preSignedUrlsData = await preSignedUrlsResponse.json();\n\n if (preSignedUrlsData && preSignedUrlsData?.status_code && preSignedUrlsData?.status_code == 400) {\n setToast({ message: preSignedUrlsData?.message || \"Internal Server Error\", type: \"error\" });\n return null;\n }\n\n const preSignedUrls = preSignedUrlsData.data.preSignedData?.preSignedUrls;\n if (preSignedUrls.length > 0) { \n const uploadId =\n preSignedUrls[0].presignedUrl.match(/uploadId=([^&]+)/)[1];\n for (let i = 0; i < preSignedUrls.length; i++) {\n const partNum = preSignedUrls[i].partNumber;\n const preSignedUrl = preSignedUrls[i].presignedUrl;\n const start = (partNum - 1) * partSize;\n const end = Math.min(start + partSize, file?.fileSize);\n const partParams = {\n Body: file?.file?.slice(start, end),\n url: preSignedUrl,\n };\n await fetch(partParams.url, {\n method: \"PUT\",\n body: partParams.Body,\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n },\n });\n const progress = Math.round(((i + 1) * 100) / parts);\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n checkboxDisabled: true,\n status: \"uploading\",\n uploadProgress: progress,\n };\n return updatedFiles;\n });\n }\n const markCompleteResponse = await fetch(`${BASE_URL}mark-complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-token\": authToken,\n },\n body: JSON.stringify({\n fileName: file?.fileName,\n uploadId: uploadId,\n }),\n });\n const markCompleteData = await markCompleteResponse.json();\n const location = markCompleteData?.data?.location;\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"completed\",\n location: location,\n message: \"Uploaded Successfully\",\n };\n \n onSubmit(updatedFiles);\n return updatedFiles;\n });\n } else {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: \"Did not get pre-signed URLs\",\n };\n return updatedFiles;\n });\n }\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n }\n };\n\n const handleChipClick = () => {\n if (fileInputRef.current) {\n // If multiple is true, set input for multiple files\n if (props.multiple) {\n fileInputRef.current.setAttribute(\"multiple\", \"true\");\n } else {\n // If multiple is false, set input for a single file\n fileInputRef.current.removeAttribute(\"multiple\");\n }\n fileInputRef.current.click();\n }\n };\n\n //checking if the file already exists or not in the drive \n const handleFileChange = (e: any) => {\n \n const selectedFiles = e.target.files;\n \n const fileTitles = Array.from(selectedFiles).map(file => {\n const fileName = file.name;\n const nameWithoutExtension = fileName.substring(0, fileName.lastIndexOf('.')) || fileName;\n return nameWithoutExtension;\n })[0];\n\n setSelectedFileTitle(fileTitles);\n\n setIsConfirmDialogOpen(allDriveData?.includes(fileTitles));\n const newFiles = Array.from(selectedFiles).map((file: any) => ({\n file,\n isPrivate: false,\n checkboxDisabled: false,\n status: \"pending\",\n uploadProgress: 0,\n fileSize: file?.size,\n fileName: file?.name,\n fileType: file?.type,\n location: \"\",\n message: \"\",\n }));\n setFiles((prevFiles: any) => [...prevFiles, ...newFiles]);\n setIsUploading(false);\n \n\n };\n\n const removeFile = (indexToRemove: number) => {\n \n setFiles((prevFiles) =>\n prevFiles.map((file, index) =>\n index === indexToRemove ? { ...file, status: \"canceled\" } : file,\n ),\n );\n\n };\n\n\n\n const toggleIsPrivate = (index: number) => {\n setFiles((prevFiles) =>\n prevFiles.map((item, i) =>\n i === index ? { ...item, isPrivate: !item.isPrivate } : item,\n ),\n );\n };\n\n const toggleCollapse = () => {\n setIsCollapsed((prevIsCollapsed) => !prevIsCollapsed);\n };\n\n const handleMinimizeClick = () => {\n setIsDialogMinimized(!isDialogMinimized);\n isDialogMinimized ? onConfirm() : onClose();\n };\n\n const handleDialogClose = () => {\n if (files.length > 0) {\n if (\n confirm(\n \"Your uploads are not complete. Would you like to cancel all ongoing uploads?\",\n )\n ) {\n // Abort the ongoing requests when the dialog is closed\n abortController.abort();\n if (abortController?.signal?.aborted) {\n onClose();\n }\n setFiles([]);\n }\n } else {\n onClose();\n }\n };\n useEffect(() => {\n open && setFiles([]);\n }, [open]);\n\n const onCloseConfirmPopup = () => {\n setIsConfirmDialogOpen(false);\n }\n\n const onReplace = async () => {\n const baseUrl = `${getBackendBaseUrl()}`;\n const fileId = existingDriveData?.filter(file => file.title === selectedFileTitle)[0].id;\n const headers = {\n \"Content-type\": \"application/json; charset=utf-8\",\n };\n const authToken = localStorage.getItem(auth.storageTokenKeyName) || '';\n headers[\"x-token\"] = authToken;\n await fetch(`${baseUrl}/document/v1/drive/${fileId}`, {\n method: \"DELETE\",\n headers,\n });\n\n onCloseConfirmPopup();\n }\n\n const onKeepBoth = () => {\n onCloseConfirmPopup();\n }\n return (\n <>\n <Dialog open={open} onClose={onClose} className=\"upload\">\n <DialogTitle className=\"upload--head\">\n <Box className=\"upload--title\">\n <Typography\n type=\"s3\"\n ml={1}\n weight=\"medium\"\n color=\"theme.secondary.1000\"\n >\n {title}\n </Typography>\n </Box>\n <div>\n <IconButton disableRipple onClick={handleMinimizeClick}>\n <RemoveIcon />\n </IconButton>\n <IconButton disableRipple onClick={handleDialogClose}>\n <CloseIcon />\n </IconButton>\n </div>\n </DialogTitle>\n <Divider />\n <DialogContent className=\"upload--content\">\n {files.length === 0 ? (\n <div\n className={`upload--fileContent ${isDragActive ? \"drag-active\" : \"\"\n }`}\n >\n <div {...getRootProps()} className=\"drop-view\">\n {!isDragOver ? (\n <>\n <input {...getInputProps()} ref={fileInputRef} />\n <p className=\"upload--text\">\n Drag and Drop files here or upload from\n </p>\n\n <div className=\"device-wrap\">\n <div className=\"select-button\" onClick={handleChipClick}>\n <img src={images.upload.monitor} />\n <Typography type=\"s5\">My Device</Typography>\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={async () => {\n // handleFileChange(e) ; \n handleConfirm();\n }}\n accept={accept}\n />\n </div>\n <div className=\"select-button\" onClick={handleChipClick}>\n <img src={images.upload.camera} />\n <Typography type=\"s5\">Camera</Typography>\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={handleFileChange}\n accept={accept}\n />\n </div>\n </div>\n </>\n ) : (\n <div className=\"after-drop\">\n <img src={images.upload.documentUpload} />\n <Typography type=\"s3\">\n Drag & Drop your files here\n </Typography>\n </div>\n )}\n </div>\n </div>\n ) : (\n <div className=\"main-container\">\n <div className=\"body-section\">\n <div className=\"document-section\">\n <div className=\"document-body\">\n {files.map((file: any, index: number) => (\n <div className=\"upload-list\" key={index}>\n <div className=\"document-cover\" key={file?.file?.name}>\n <div className=\"document-name\">\n {renderFileIcon(file?.file)}\n <div className=\"document-title\">\n <div className=\"document-box\">\n <div className=\"document-desc\">\n {file?.file?.name}\n </div>\n <div className=\"document-size\">\n {formatBytes(file?.file?.size)}\n <span\n className={\n file?.status === \"completed\" &&\n file?.message.length > 0\n ? \"success-file\"\n : \"fail-file\"\n }\n >\n {file?.message}\n </span>\n </div>\n </div>\n </div>\n </div>\n <div className=\"document-choices\">\n {file?.status !== \"canceled\" ? (\n <>\n <div className=\"checkbox\">\n <Checkbox\n checked={file?.isPrivate || type == 'public'}\n onChange={() => toggleIsPrivate(index)}\n disabled={file?.checkboxDisabled || type == 'public'}\n />\n <div className=\"checkbox-text\">Public</div>\n </div>\n <div\n className=\"delete-icon\"\n onClick={() => removeFile(index)}\n >\n <Avatar\n size={24}\n src={images.upload.trash}\n ></Avatar>\n </div>\n </>\n ) : (\n <Typography type=\"s4\" className=\"canceled-text\">\n Upload Canceled\n </Typography>\n )}\n </div>\n </div>\n <div className=\"document-progress\">\n {file?.uploadProgress > 0 && (\n <LinearProgress\n color=\"success\"\n variant=\"determinate\"\n value={file?.uploadProgress}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n {multiple && (\n <>\n <Chip\n className=\"add-file\"\n variant=\"outlined\"\n type=\"normal\"\n label={\"Add File\"}\n icon={<Add />}\n onClick={handleChipClick}\n />\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={handleFileChange}\n accept={accept}\n />\n </>\n )}\n </div>\n </div>\n )}\n </DialogContent>\n <Divider />\n <DialogActions className=\"upload--actions\">\n <Button variant=\"text\" onClick={handleDialogClose}>\n Cancel\n </Button>\n <Button\n color=\"secondary\"\n onClick={handleConfirm}\n disabled={!files.length || isUploading}\n >\n Upload\n </Button>\n </DialogActions>\n </Dialog>\n {isDialogMinimized && (\n <div className=\"bottom-corner-box\">\n <div className=\"top-section\">\n <div className=\"top-text\">\n Uploading {files.length} Item{files.length !== 1 ? \"s\" : \"\"}\n </div>\n <div className=\"top-options\">\n <div className=\"btn\" onClick={handleMinimizeClick}>\n <RemoveIcon />\n </div>\n <div className=\"btn\" onClick={toggleCollapse}>\n <div className=\"arrow-btn\">\n {isCollapsed ? <KeyboardArrowUp /> : <KeyboardArrowDown />}\n </div>\n </div>\n <div className=\"btn\" onClick={handleDialogClose}>\n <Clear />\n </div>\n </div>\n </div>\n <div className=\"box-list\">\n {!isCollapsed &&\n files.map((file: any, index: number) => (\n <div className=\"bottom-section\">\n <div className=\"doc-icon\">{renderFileIcon(file?.file)}</div>\n <div className=\"file-detail\">\n <div className=\"file-name\">\n <div className=\"file-text\">\n {file?.file?.name}\n {index}\n </div>\n </div>\n <div className=\"file-status\">\n {file?.status !== \"canceled\" ? (\n <>\n {file.uploadProgress === 0 && (\n <div className=\"avatar-container\">\n <Avatar\n size={20}\n className=\"avatar\"\n src={images.upload.empty}\n ></Avatar>\n <Avatar\n size={20}\n onClick={() => removeFile(index)}\n src={images.upload.close}\n className=\"close-icon\"\n ></Avatar>\n </div>\n )}\n {file?.uploadProgress > 0 &&\n file?.uploadProgress < 100 && (\n <CircularProgress\n color=\"success\"\n variant=\"determinate\"\n value={file?.uploadProgress}\n />\n )}\n {file?.uploadProgress === 100 && (\n <div className=\"avatar-container\">\n <Avatar\n size={20}\n className=\"avatar\"\n src={images.upload.tick}\n ></Avatar>\n <Avatar\n size={20}\n src={images.upload.folder}\n className=\"close-icon\"\n ></Avatar>\n </div>\n )}\n </>\n ) : (\n <Typography type=\"s4\" className=\"canceled-text\">\n Upload Canceled\n </Typography>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n {isConfirmDialogOpen && <FileConfirmationDialog title={selectedFileTitle} open={isConfirmDialogOpen} onClose={onCloseConfirmPopup} onReplace={onReplace} onKeepBoth={onKeepBoth} isFile = {true} />}\n\n <Toast\n open={Boolean(toast)}\n type={toast?.type}\n message={toast?.message}\n handleClose={() => setToast(null)}\n anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\n />\n </>\n );\n};\n\nexport { Upload };\nexport default Upload;\n"],"names":["formatBytes","bytes","decimals","dm","i","Math","floor","log","parseFloat","pow","toFixed","Upload","props","open","title","onClose","onConfirm","accept","onSubmit","multiple","existingDriveData","fileUploaded","type","files","setFiles","useState","isUploading","setIsUploading","isCollapsed","setIsCollapsed","isDialogMinimized","setIsDialogMinimized","isDragOver","setIsDragOver","abortController","setAbortController","AbortController","authToken","localStorage","getItem","auth","storageTokenKeyName","allDriveData","setAllDriveData","isConfirmDialogOpen","setIsConfirmDialogOpen","selectedFileTitle","setSelectedFileTitle","toast","setToast","getRootProps","getInputProps","isDragActive","useDropzone","onDropAccepted","newFiles","map","file","isPrivate","checkboxDisabled","status","uploadProgress","fileSize","size","fileName","name","fileType","location","message","onDragEnter","onDragLeave","noClick","noKeyboard","types","split","item","trim","reduce","acc","fileInputRef","useRef","useEffect","driveTitles","handleBeforeUnload","event","returnValue","current","window","addEventListener","removeEventListener","getInternetSpeed","customNavigator","navigator","connection","downlink","renderFileIcon","jsx","className","style","backgroundColor","children","Avatar","src","images","upload","documentPDF","docFile","BASE_URL","getBackendBaseUrl","handleConfirm","async","controller","filteredFiles","filter","length","handleMultipartUpload","setTimeout","handleRegularUpload","error","prevFiles","updatedFiles","tempCount","index","fileCount","format","mimeType","some","includes","f","preSignedUrlsResponse","fetch","headers","signal","preSignedUrlsData","json","status_code","preSignedUrl","_b","_a","data","preSignedData","presignedUrl","_d","_c","partParams","Body","slice","url","contentLength","chunkSize","bytesUploaded","start","end","min","method","body","progress","round","partSize","parts","ceil","preSignedUrls","uploadId","match","partNum","partNumber","markCompleteResponse","JSON","stringify","markCompleteData","handleChipClick","setAttribute","removeAttribute","click","handleFileChange","e","selectedFiles","target","fileTitles","Array","from","substring","lastIndexOf","removeFile","indexToRemove","handleMinimizeClick","handleDialogClose","confirm","abort","aborted","onCloseConfirmPopup","jsxs","Fragment","Dialog","DialogTitle","Box","Typography","ml","weight","color","IconButton","disableRipple","onClick","RemoveIcon","CloseIcon","Divider","DialogContent","documentUpload","ref","monitor","display","onChange","camera","Checkbox","checked","toggleIsPrivate","disabled","trash","LinearProgress","variant","value","Chip","label","icon","Add","DialogActions","Button","prevIsCollapsed","KeyboardArrowUp","KeyboardArrowDown","Clear","empty","close","CircularProgress","tick","folder","FileConfirmationDialog","onReplace","baseUrl","fileId","id","onKeepBoth","isFile","Toast","Boolean","handleClose","anchorOrigin","horizontal","vertical"],"mappings":"6tDAiDA,MAAMA,EAAc,CAACC,EAAeC,EAAW,KAC7C,GAAc,IAAVD,EAAa,MAAO,UACxB,MACME,EAAKD,EAAW,EAAI,EAAIA,EAExBE,EAAIC,KAAKC,MAAMD,KAAKE,IAAIN,GAASI,KAAKE,IAHlC,OAIV,OAAOC,YAAYP,EAAQI,KAAKI,IAJtB,KAI6BL,IAAIM,QAAQP,IAAO,IAF5C,CAAC,QAAS,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MAEIC,IAGlEO,EAAUC,IACd,MAAMC,KACJA,EAAAC,MACAA,EAAAC,QACAA,EAAAC,UACAA,EAAAC,OACAA,EAAS,IAAA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BAAwB,GACpE0F,EAAQ,WAAa9F,QACf6F,MAAM,GAAG4G,uBAA6BC,IAAU,CACpDrF,OAAQ,SACRvB,YAGF2D,MAuR2JmD,WApR1I,KACjBnD,MAmRoLoD,QAAU;eAE5LlJ,EAAAA,IAACmJ,EAAAA,MAAA,CACGtO,KAAMuO,QAAQpM,IACd1B,KAAM0B,MAAAA,QAAAA,EAAAA,GAAO1B,KACb8C,QAASpB,MAAAA,QAAAA,EAAAA,GAAOoB,QAChBiL,YAAa,IAAMpM,GAAS,MAC5BqM,aAAc,CAAEC,WAAY,QAASC,SAAU"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/upload/upload.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Typography from \"../typography/typography\";\nimport Box from \"@mui/material/Box\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport \"./upload.scss\";\nimport { useDropzone } from \"react-dropzone\";\nimport Toast from '../toast/toast';\nimport {\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n} from \"@mui/material\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport { Add } from \"@mui/icons-material\";\nimport Button from \"../button/button\";\nimport Checkbox from \"../checkbox/checkbox\";\nimport Avatar from \"../avatar/avatar\";\nimport images from \"../../assets/images\";\nimport Chip from \"../chip/chip\";\nimport { auth } from \"../../constants/auth\";\nimport { KeyboardArrowDown, KeyboardArrowUp, Clear } from \"@mui/icons-material\";\nimport FileConfirmationDialog from \"./file-confirmation\"\n\n\ninterface UploadProps {\n open: boolean;\n title: string;\n multiple?: boolean;\n accept?: string;\n onClose: () => void;\n onConfirm: () => void;\n onSubmit: (files: any[]) => void;\n existingDriveData?: any;\n fileUploaded?: (value: boolean) => void | undefined;\n type: any\n\n\n}\ninterface CustomNavigator extends Navigator {\n connection?: {\n downlink?: number;\n };\n}\nconst formatBytes = (bytes: number, decimals = 2) => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n};\n\nconst Upload = (props: UploadProps) => {\n const {\n open,\n title,\n onClose,\n onConfirm,\n accept = \"*\",\n onSubmit,\n multiple = true,\n existingDriveData,\n fileUploaded , \n type\n \n } = props;\n\n const [files, setFiles] = useState<\n {\n file: File;\n isPrivate: boolean;\n checkboxDisabled: boolean;\n status: string;\n uploadProgress: number;\n fileSize: number;\n fileName: string;\n fileType: string;\n location: string;\n message: string;\n }[]\n >([]);\n\n interface IToast {\n type: 'normal' | 'alert';\n message: string;\n }\n const [isUploading, setIsUploading] = useState(false);\n const [isCollapsed, setIsCollapsed] = useState(false);\n const [isDialogMinimized, setIsDialogMinimized] = useState(false);\n const [isDragOver, setIsDragOver] = useState(false);\n const [abortController, setAbortController] = useState(new AbortController());\n const authToken = localStorage.getItem(auth.storageTokenKeyName);\n const [allDriveData, setAllDriveData] = useState();\n const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);\n const [selectedFileTitle, setSelectedFileTitle] = useState();\n const [toast, setToast] = useState<IToast | null>(null);\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDropAccepted: (newFiles) => {\n setFiles([\n ...files,\n ...newFiles.map((file) => ({\n file,\n isPrivate: false,\n checkboxDisabled: false,\n status: \"pending\",\n uploadProgress: 0,\n fileSize: file.size,\n fileName: file.name,\n fileType: file.type,\n location: \"\",\n message: \"\",\n })),\n ]);\n setIsDragOver(false);\n },\n onDragEnter: () => {\n setIsDragOver(true);\n },\n onDragLeave: () => {\n setIsDragOver(false);\n },\n noClick: true,\n noKeyboard: true,\n multiple: multiple,\n accept: accept ? convertAcceptObject(accept) : accept,\n });\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const driveTitles = existingDriveData?.map(item => item['title'])\n setAllDriveData(driveTitles);\n }, [existingDriveData]);\n\n useEffect(() => {\n const handleBeforeUnload = (event: any) => {\n if (isUploading) {\n const message =\n \"Are you sure you want to leave? Your uploads are not complete.\";\n event.returnValue = message; // Standard for most browsers\n return message; // For some older browsers\n }\n };\n if (fileInputRef.current) {\n fileInputRef.current.multiple = multiple;\n }\n\n window.addEventListener(\"beforeunload\", handleBeforeUnload);\n\n return () => {\n // Clean up the event listener when the component unmounts\n window.removeEventListener(\"beforeunload\", handleBeforeUnload);\n };\n }, [isUploading, multiple]);\n\n const getInternetSpeed = () => {\n const customNavigator = navigator as CustomNavigator;\n if (\"connection\" in customNavigator && customNavigator.connection) {\n return customNavigator.connection.downlink;\n } else {\n return null;\n }\n };\n\n function convertAcceptObject(types: string) {\n const accepts = types.split(\",\").map((item) => item.trim());\n const acceptObject = accepts.reduce((acc: any, type: string) => {\n acc[type] = [];\n return acc;\n }, {});\n return acceptObject;\n }\n\n const renderFileIcon = (file: any) => {\n const fileType = file?.type.split(\"/\")[0];\n switch (fileType) {\n case \"image\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#FFEBEB\" }}\n >\n <Avatar size={20} src={images.upload.documentPDF}></Avatar>\n </div>\n );\n case \"application\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#FFEBEB\" }}\n >\n <Avatar size={20} src={images.upload.documentPDF}></Avatar>\n </div>\n );\n case \"text\":\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#EBF9F2\" }}\n >\n <Avatar size={20} src={images.upload.docFile}></Avatar>\n </div>\n );\n default:\n return (\n <div\n className={\n isDialogMinimized ? \"document-icon-sm\" : \"document-icon-lg\"\n }\n style={{ backgroundColor: \"#EBF9F2\" }}\n >\n <Avatar size={20} src={images.upload.docFile}></Avatar>\n </div>\n );\n }\n };\n\n const BASE_URL = `${import.meta.env.VITE_BACKEND_BASE_URL}/document/v1/file-upload/`;\n\n const handleConfirm = async () => {\n setIsUploading(true);\n // Create a new AbortController for each confirmation\n const controller = new AbortController();\n setAbortController(controller);\n \n const filteredFiles = files.filter((file : any) => file.status !== \"canceled\").length;\n for (let i = 0; i < files.length; i++) {\n if (files[i].uploadProgress === 100 || files[i].status !== \"pending\") {\n continue;\n }\n\n const file = files[i];\n \n const fileSize = file?.fileSize;\n try {\n if (fileSize > 10 * 1024 * 1024) {\n const uploadResponse = await handleMultipartUpload(file, i, controller);\n if (uploadResponse) {\n setTimeout(()=>{fileUploaded(true) } , 1000);\n }\n } else {\n await handleRegularUpload(file, i, controller, filteredFiles);\n }\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[i] = {\n ...updatedFiles[i],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n } finally {\n setIsUploading(false);\n }\n }\n };\n\n\n \n\n let tempCount = 0;\n const handleRegularUpload = async (\n file: any,\n index: number,\n controller: any,\n fileCount : number\n ) => {\n try {\n const format = ['docx', 'doc', 'csv', 'pdf', 'xls', 'xlsx', 'vnd.ms-excel', 'excel', 'txt'];\n const mimeType = file?.mimeType || file?.fileType || '';\n\t\t\tconst isValid = format.some(f => mimeType.includes(f));\n \n if (isValid && file?.fileSize && file?.fileSize >= 5242880) {\n return setToast({\n type: 'alert',\n message: 'File size must be within 5 MB!'\n });\n }\n const preSignedUrlsResponse = await fetch(\n `${BASE_URL}?key=${file?.fileName}&partCount=1&mimeType=${file?.fileType}&is_private=${!file?.isPrivate}`,\n {\n headers: {\n \"Content-Type\": \"application/json\",\n \"file-size\": file?.fileSize,\n \"x-token\": authToken,\n },\n signal: controller.signal\n },\n );\n const preSignedUrlsData = await preSignedUrlsResponse.json();\n if (preSignedUrlsData?.status_code == 400) {\n // alert(preSignedUrlsData?.message);\n setToast({\n type: 'alert',\n message: preSignedUrlsData?.message\n });\n return;\n }\n const preSignedUrl = preSignedUrlsData.data?.preSignedData?.presignedUrl;\n const location = preSignedUrlsData.data?.preSignedData?.location;\n const partParams = {\n Body: file?.file.slice(0, file?.fileSize),\n url: preSignedUrl,\n };\n const contentLength = file.fileSize;\n // const maxChunkSize = 1024 * 1024 * 1024; // 10 MB maximum chunk size\n // const chunkSize = Math.min(contentLength * 0.1, maxChunkSize);\n const chunkSize = 1024 * 1024 * 1024 * 1024 // 1MB chunk size\n let bytesUploaded = 0;\n\n while (bytesUploaded < contentLength) {\n const start = bytesUploaded;\n const end = Math.min(bytesUploaded + chunkSize, contentLength);\n\n // Send chunk of the file\n await fetch(partParams.url, {\n method: \"PUT\",\n body: file.file.slice(start, end),\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n },\n });\n\n // Update progress\n bytesUploaded = end;\n const progress = Math.round((bytesUploaded / contentLength) * 100);\n\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n checkboxDisabled: true,\n status: \"uploading\",\n uploadProgress: progress,\n };\n return updatedFiles;\n });\n }\n \n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"completed\",\n location ,\n message: \"Uploaded Successfully\",\n };\n tempCount = tempCount + 1;\n \n if(fileCount == tempCount){\n onSubmit(updatedFiles);\n tempCount = 0;\n \n }\n return updatedFiles;\n });\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n }\n \n };\n\n const handleMultipartUpload = async (\n file: any,\n index: number,\n controller: any,\n ) => {\n\n try {\n const partSize =\n (getInternetSpeed() || 10) * 1024 * 1024 < 5 * 1024 * 1024\n ? 5 * 1024 * 1024\n : (getInternetSpeed() || 10) * 1024 * 1024;\n const parts = Math.ceil(file?.fileSize / partSize);\n const preSignedUrlsResponse = await fetch(\n `${BASE_URL}?key=${file?.fileName}&partCount=${parts}&mimeType=${file?.fileType}&is_private=${!file?.isPrivate}`,\n {\n headers: {\n \"Content-Type\": \"application/json\",\n \"file-size\": file?.fileSize,\n \"x-token\": authToken,\n },\n signal: controller.signal,\n },\n );\n const preSignedUrlsData = await preSignedUrlsResponse.json();\n\n if (preSignedUrlsData && preSignedUrlsData?.status_code && preSignedUrlsData?.status_code == 400) {\n setToast({ message: preSignedUrlsData?.message || \"Internal Server Error\", type: \"error\" });\n return null;\n }\n\n const preSignedUrls = preSignedUrlsData.data.preSignedData?.preSignedUrls;\n if (preSignedUrls.length > 0) { \n const uploadId =\n preSignedUrls[0].presignedUrl.match(/uploadId=([^&]+)/)[1];\n for (let i = 0; i < preSignedUrls.length; i++) {\n const partNum = preSignedUrls[i].partNumber;\n const preSignedUrl = preSignedUrls[i].presignedUrl;\n const start = (partNum - 1) * partSize;\n const end = Math.min(start + partSize, file?.fileSize);\n const partParams = {\n Body: file?.file?.slice(start, end),\n url: preSignedUrl,\n };\n await fetch(partParams.url, {\n method: \"PUT\",\n body: partParams.Body,\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n },\n });\n const progress = Math.round(((i + 1) * 100) / parts);\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n checkboxDisabled: true,\n status: \"uploading\",\n uploadProgress: progress,\n };\n return updatedFiles;\n });\n }\n const markCompleteResponse = await fetch(`${BASE_URL}mark-complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-token\": authToken,\n },\n body: JSON.stringify({\n fileName: file?.fileName,\n uploadId: uploadId,\n }),\n });\n const markCompleteData = await markCompleteResponse.json();\n const location = markCompleteData?.data?.location;\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"completed\",\n location: location,\n message: \"Uploaded Successfully\",\n };\n \n onSubmit(updatedFiles);\n return updatedFiles;\n });\n } else {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: \"Did not get pre-signed URLs\",\n };\n return updatedFiles;\n });\n }\n } catch (error: any) {\n setFiles((prevFiles) => {\n const updatedFiles = [...prevFiles];\n updatedFiles[index] = {\n ...updatedFiles[index],\n status: \"failed\",\n message: error.message || \"Internal Server Error\",\n };\n return updatedFiles;\n });\n }\n };\n\n const handleChipClick = () => {\n if (fileInputRef.current) {\n // If multiple is true, set input for multiple files\n if (props.multiple) {\n fileInputRef.current.setAttribute(\"multiple\", \"true\");\n } else {\n // If multiple is false, set input for a single file\n fileInputRef.current.removeAttribute(\"multiple\");\n }\n fileInputRef.current.click();\n }\n };\n\n //checking if the file already exists or not in the drive \n const handleFileChange = (e: any) => {\n \n const selectedFiles = e.target.files;\n \n const fileTitles = Array.from(selectedFiles).map(file => {\n const fileName = file.name;\n const nameWithoutExtension = fileName.substring(0, fileName.lastIndexOf('.')) || fileName;\n return nameWithoutExtension;\n })[0];\n\n setSelectedFileTitle(fileTitles);\n\n setIsConfirmDialogOpen(allDriveData?.includes(fileTitles));\n const newFiles = Array.from(selectedFiles).map((file: any) => ({\n file,\n isPrivate: false,\n checkboxDisabled: false,\n status: \"pending\",\n uploadProgress: 0,\n fileSize: file?.size,\n fileName: file?.name,\n fileType: file?.type,\n location: \"\",\n message: \"\",\n }));\n setFiles((prevFiles: any) => [...prevFiles, ...newFiles]);\n setIsUploading(false);\n \n\n };\n\n const removeFile = (indexToRemove: number) => {\n \n setFiles((prevFiles) =>\n prevFiles.map((file, index) =>\n index === indexToRemove ? { ...file, status: \"canceled\" } : file,\n ),\n );\n\n };\n\n\n\n const toggleIsPrivate = (index: number) => {\n setFiles((prevFiles) =>\n prevFiles.map((item, i) =>\n i === index ? { ...item, isPrivate: !item.isPrivate } : item,\n ),\n );\n };\n\n const toggleCollapse = () => {\n setIsCollapsed((prevIsCollapsed) => !prevIsCollapsed);\n };\n\n const handleMinimizeClick = () => {\n setIsDialogMinimized(!isDialogMinimized);\n isDialogMinimized ? onConfirm() : onClose();\n };\n\n const handleDialogClose = () => {\n if (files.length > 0) {\n if (\n confirm(\n \"Your uploads are not complete. Would you like to cancel all ongoing uploads?\",\n )\n ) {\n // Abort the ongoing requests when the dialog is closed\n abortController.abort();\n if (abortController?.signal?.aborted) {\n onClose();\n }\n setFiles([]);\n }\n } else {\n onClose();\n }\n };\n useEffect(() => {\n open && setFiles([]);\n }, [open]);\n\n const onCloseConfirmPopup = () => {\n setIsConfirmDialogOpen(false);\n }\n\n const onReplace = async () => {\n const baseUrl = `${import.meta.env.VITE_BACKEND_BASE_URL}`;\n const fileId = existingDriveData?.filter(file => file.title === selectedFileTitle)[0].id;\n const headers = {\n \"Content-type\": \"application/json; charset=utf-8\",\n };\n const authToken = localStorage.getItem(auth.storageTokenKeyName) || '';\n headers[\"x-token\"] = authToken;\n await fetch(`${baseUrl}/document/v1/drive/${fileId}`, {\n method: \"DELETE\",\n headers,\n });\n\n onCloseConfirmPopup();\n }\n\n const onKeepBoth = () => {\n onCloseConfirmPopup();\n }\n return (\n <>\n <Dialog open={open} onClose={onClose} className=\"upload\">\n <DialogTitle className=\"upload--head\">\n <Box className=\"upload--title\">\n <Typography\n type=\"s3\"\n ml={1}\n weight=\"medium\"\n color=\"theme.secondary.1000\"\n >\n {title}\n </Typography>\n </Box>\n <div>\n <IconButton disableRipple onClick={handleMinimizeClick}>\n <RemoveIcon />\n </IconButton>\n <IconButton disableRipple onClick={handleDialogClose}>\n <CloseIcon />\n </IconButton>\n </div>\n </DialogTitle>\n <Divider />\n <DialogContent className=\"upload--content\">\n {files.length === 0 ? (\n <div\n className={`upload--fileContent ${isDragActive ? \"drag-active\" : \"\"\n }`}\n >\n <div {...getRootProps()} className=\"drop-view\">\n {!isDragOver ? (\n <>\n <input {...getInputProps()} ref={fileInputRef} />\n <p className=\"upload--text\">\n Drag and Drop files here or upload from\n </p>\n\n <div className=\"device-wrap\">\n <div className=\"select-button\" onClick={handleChipClick}>\n <img src={images.upload.monitor} />\n <Typography type=\"s5\">My Device</Typography>\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={async () => {\n // handleFileChange(e) ; \n handleConfirm();\n }}\n accept={accept}\n />\n </div>\n <div className=\"select-button\" onClick={handleChipClick}>\n <img src={images.upload.camera} />\n <Typography type=\"s5\">Camera</Typography>\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={handleFileChange}\n accept={accept}\n />\n </div>\n </div>\n </>\n ) : (\n <div className=\"after-drop\">\n <img src={images.upload.documentUpload} />\n <Typography type=\"s3\">\n Drag & Drop your files here\n </Typography>\n </div>\n )}\n </div>\n </div>\n ) : (\n <div className=\"main-container\">\n <div className=\"body-section\">\n <div className=\"document-section\">\n <div className=\"document-body\">\n {files.map((file: any, index: number) => (\n <div className=\"upload-list\" key={index}>\n <div className=\"document-cover\" key={file?.file?.name}>\n <div className=\"document-name\">\n {renderFileIcon(file?.file)}\n <div className=\"document-title\">\n <div className=\"document-box\">\n <div className=\"document-desc\">\n {file?.file?.name}\n </div>\n <div className=\"document-size\">\n {formatBytes(file?.file?.size)}\n <span\n className={\n file?.status === \"completed\" &&\n file?.message.length > 0\n ? \"success-file\"\n : \"fail-file\"\n }\n >\n {file?.message}\n </span>\n </div>\n </div>\n </div>\n </div>\n <div className=\"document-choices\">\n {file?.status !== \"canceled\" ? (\n <>\n <div className=\"checkbox\">\n <Checkbox\n checked={file?.isPrivate || type == 'public'}\n onChange={() => toggleIsPrivate(index)}\n disabled={file?.checkboxDisabled || type == 'public'}\n />\n <div className=\"checkbox-text\">Public</div>\n </div>\n <div\n className=\"delete-icon\"\n onClick={() => removeFile(index)}\n >\n <Avatar\n size={24}\n src={images.upload.trash}\n ></Avatar>\n </div>\n </>\n ) : (\n <Typography type=\"s4\" className=\"canceled-text\">\n Upload Canceled\n </Typography>\n )}\n </div>\n </div>\n <div className=\"document-progress\">\n {file?.uploadProgress > 0 && (\n <LinearProgress\n color=\"success\"\n variant=\"determinate\"\n value={file?.uploadProgress}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n {multiple && (\n <>\n <Chip\n className=\"add-file\"\n variant=\"outlined\"\n type=\"normal\"\n label={\"Add File\"}\n icon={<Add />}\n onClick={handleChipClick}\n />\n <input\n type=\"file\"\n {...getInputProps({ multiple: true })}\n ref={fileInputRef}\n style={{ display: \"none\" }}\n onChange={handleFileChange}\n accept={accept}\n />\n </>\n )}\n </div>\n </div>\n )}\n </DialogContent>\n <Divider />\n <DialogActions className=\"upload--actions\">\n <Button variant=\"text\" onClick={handleDialogClose}>\n Cancel\n </Button>\n <Button\n color=\"secondary\"\n onClick={handleConfirm}\n disabled={!files.length || isUploading}\n >\n Upload\n </Button>\n </DialogActions>\n </Dialog>\n {isDialogMinimized && (\n <div className=\"bottom-corner-box\">\n <div className=\"top-section\">\n <div className=\"top-text\">\n Uploading {files.length} Item{files.length !== 1 ? \"s\" : \"\"}\n </div>\n <div className=\"top-options\">\n <div className=\"btn\" onClick={handleMinimizeClick}>\n <RemoveIcon />\n </div>\n <div className=\"btn\" onClick={toggleCollapse}>\n <div className=\"arrow-btn\">\n {isCollapsed ? <KeyboardArrowUp /> : <KeyboardArrowDown />}\n </div>\n </div>\n <div className=\"btn\" onClick={handleDialogClose}>\n <Clear />\n </div>\n </div>\n </div>\n <div className=\"box-list\">\n {!isCollapsed &&\n files.map((file: any, index: number) => (\n <div className=\"bottom-section\">\n <div className=\"doc-icon\">{renderFileIcon(file?.file)}</div>\n <div className=\"file-detail\">\n <div className=\"file-name\">\n <div className=\"file-text\">\n {file?.file?.name}\n {index}\n </div>\n </div>\n <div className=\"file-status\">\n {file?.status !== \"canceled\" ? (\n <>\n {file.uploadProgress === 0 && (\n <div className=\"avatar-container\">\n <Avatar\n size={20}\n className=\"avatar\"\n src={images.upload.empty}\n ></Avatar>\n <Avatar\n size={20}\n onClick={() => removeFile(index)}\n src={images.upload.close}\n className=\"close-icon\"\n ></Avatar>\n </div>\n )}\n {file?.uploadProgress > 0 &&\n file?.uploadProgress < 100 && (\n <CircularProgress\n color=\"success\"\n variant=\"determinate\"\n value={file?.uploadProgress}\n />\n )}\n {file?.uploadProgress === 100 && (\n <div className=\"avatar-container\">\n <Avatar\n size={20}\n className=\"avatar\"\n src={images.upload.tick}\n ></Avatar>\n <Avatar\n size={20}\n src={images.upload.folder}\n className=\"close-icon\"\n ></Avatar>\n </div>\n )}\n </>\n ) : (\n <Typography type=\"s4\" className=\"canceled-text\">\n Upload Canceled\n </Typography>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n {isConfirmDialogOpen && <FileConfirmationDialog title={selectedFileTitle} open={isConfirmDialogOpen} onClose={onCloseConfirmPopup} onReplace={onReplace} onKeepBoth={onKeepBoth} isFile = {true} />}\n\n <Toast\n open={Boolean(toast)}\n type={toast?.type}\n message={toast?.message}\n handleClose={() => setToast(null)}\n anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\n />\n </>\n );\n};\n\nexport { Upload };\nexport default Upload;\n"],"names":["formatBytes","bytes","decimals","dm","i","Math","floor","log","parseFloat","pow","toFixed","Upload","props","open","title","onClose","onConfirm","accept","onSubmit","multiple","existingDriveData","fileUploaded","type","files","setFiles","useState","isUploading","setIsUploading","isCollapsed","setIsCollapsed","isDialogMinimized","setIsDialogMinimized","isDragOver","setIsDragOver","abortController","setAbortController","AbortController","authToken","localStorage","getItem","auth","storageTokenKeyName","allDriveData","setAllDriveData","isConfirmDialogOpen","setIsConfirmDialogOpen","selectedFileTitle","setSelectedFileTitle","toast","setToast","getRootProps","getInputProps","isDragActive","useDropzone","onDropAccepted","newFiles","map","file","isPrivate","checkboxDisabled","status","uploadProgress","fileSize","size","fileName","name","fileType","location","message","onDragEnter","onDragLeave","noClick","noKeyboard","types","split","item","trim","reduce","acc","fileInputRef","useRef","useEffect","driveTitles","handleBeforeUnload","event","returnValue","current","window","addEventListener","removeEventListener","getInternetSpeed","customNavigator","navigator","connection","downlink","renderFileIcon","jsx","className","style","backgroundColor","children","Avatar","src","images","upload","documentPDF","docFile","BASE_URL","handleConfirm","async","controller","filteredFiles","filter","length","handleMultipartUpload","setTimeout","handleRegularUpload","error","prevFiles","updatedFiles","tempCount","index","fileCount","format","mimeType","some","includes","f","preSignedUrlsResponse","fetch","headers","signal","preSignedUrlsData","json","status_code","preSignedUrl","_b","_a","data","preSignedData","presignedUrl","_d","_c","partParams","Body","slice","url","contentLength","chunkSize","bytesUploaded","start","end","min","method","body","progress","round","partSize","parts","ceil","preSignedUrls","uploadId","match","partNum","partNumber","markCompleteResponse","JSON","stringify","markCompleteData","handleChipClick","setAttribute","removeAttribute","click","handleFileChange","e","selectedFiles","target","fileTitles","Array","from","substring","lastIndexOf","removeFile","indexToRemove","handleMinimizeClick","handleDialogClose","confirm","abort","aborted","onCloseConfirmPopup","jsxs","Fragment","Dialog","DialogTitle","Box","Typography","ml","weight","color","IconButton","disableRipple","onClick","RemoveIcon","CloseIcon","Divider","DialogContent","documentUpload","ref","monitor","display","onChange","camera","Checkbox","checked","toggleIsPrivate","disabled","trash","LinearProgress","variant","value","Chip","label","icon","Add","DialogActions","Button","prevIsCollapsed","KeyboardArrowUp","KeyboardArrowDown","Clear","empty","close","CircularProgress","tick","folder","FileConfirmationDialog","onReplace","fileId","id","onKeepBoth","isFile","Toast","Boolean","handleClose","anchorOrigin","horizontal","vertical"],"mappings":"6tDAiDA,MAAMA,EAAc,CAACC,EAAeC,EAAW,KAC7C,GAAc,IAAVD,EAAa,MAAO,UACxB,MACME,EAAKD,EAAW,EAAI,EAAIA,EAExBE,EAAI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GAChF5G,EAAU,CACd,eAAgB,mCAEZ7F,EAAYC,aAAaC,QAAQC,EAAAA,KAAKC,sBAAwB,GACpEyF,EAAQ,WAAa7F,QACf4F,MAAM,gDAAgC4G,IAAU,CACpDpF,OAAQ,SACRvB,YAGF2D,MAuR2JkD,WApR1I,KACjBlD,MAmRoLmD,QAAU;eAE5LhJ,EAAAA,IAACiJ,EAAAA,MAAA,CACGpO,KAAMqO,QAAQlM,IACd1B,KAAM0B,MAAAA,QAAAA,EAAAA,GAAO1B,KACb8C,QAASpB,MAAAA,QAAAA,EAAAA,GAAOoB,QAChB+K,YAAa,IAAMlM,GAAS,MAC5BmM,aAAc,CAAEC,WAAY,QAASC,SAAU"}
@@ -3,26 +3,6 @@ const configureLibrary = (config) => {
3
3
  libraryConfig = { ...libraryConfig, ...config };
4
4
  };
5
5
  const getLibraryConfig = () => libraryConfig;
6
- const getEnvVar = (key) => {
7
- var _a;
8
- if ((_a = libraryConfig.env) == null ? void 0 : _a[key]) {
9
- return libraryConfig.env[key];
10
- }
11
- try {
12
- const metaEnv = globalThis.__VITE_ENV__;
13
- if (metaEnv == null ? void 0 : metaEnv[key]) {
14
- return metaEnv[key];
15
- }
16
- } catch {
17
- }
18
- throw new Error(
19
- `Environment variable ${key} is not configured. Please configure it using configureLibrary({ env: { ${key}: 'your-value' } }) in your host application.`
20
- );
21
- };
22
- const getBackendBaseUrl = () => getEnvVar("VITE_BACKEND_BASE_URL");
23
- const getSocketBaseUrl = () => getEnvVar("VITE_SOCKET_BASE_URL");
24
- const getBucketUrl = () => getEnvVar("VITE_BUCKET_URL");
25
- const getS3BucketUrl = () => getEnvVar("VITE_S3_BUCKET_URL");
26
6
  const getConfigFunction = (category, functionName) => {
27
7
  const categoryConfig = libraryConfig[category];
28
8
  if (categoryConfig && categoryConfig[functionName]) {
@@ -55,12 +35,7 @@ const getConfigFunction = (category, functionName) => {
55
35
  };
56
36
  export {
57
37
  configureLibrary,
58
- getBackendBaseUrl,
59
- getBucketUrl,
60
38
  getConfigFunction,
61
- getEnvVar,
62
- getLibraryConfig,
63
- getS3BucketUrl,
64
- getSocketBaseUrl
39
+ getLibraryConfig
65
40
  };
66
41
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Environment variables - should be provided by the host application\n env?: {\n /** Base URL for API requests */\n VITE_BACKEND_BASE_URL?: string;\n /** WebSocket server URL */\n VITE_SOCKET_BASE_URL?: string;\n /** Base URL for file storage */\n VITE_BUCKET_URL?: string;\n /** Alternative URL for S3 bucket access */\n VITE_S3_BUCKET_URL?: string;\n };\n \n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Environment variable accessors - these will use config first, then fallback to import.meta.env for backward compatibility\nexport const getEnvVar = (key: keyof NonNullable<LibraryConfig['env']>): string => {\n // First try to get from config (provided by host app)\n if (libraryConfig.env?.[key]) {\n return libraryConfig.env[key];\n }\n \n // Fallback to import.meta.env for backward compatibility during migration\n // This allows gradual migration and works if host app hasn't configured yet\n // Note: In a library context, import.meta.env may not be available at runtime,\n // so the host app should configure these values using configureLibrary()\n try {\n // Access import.meta.env using bracket notation to avoid TypeScript issues\n const metaEnv = (globalThis as any).__VITE_ENV__;\n if (metaEnv?.[key]) {\n return metaEnv[key];\n }\n } catch {\n // Ignore errors when checking for import.meta.env\n }\n \n // If neither is available, throw an error to make it clear configuration is needed\n throw new Error(\n `Environment variable ${key} is not configured. Please configure it using configureLibrary({ env: { ${key}: 'your-value' } }) in your host application.`\n );\n};\n\n// Convenience functions for each env var\nexport const getBackendBaseUrl = (): string => getEnvVar('VITE_BACKEND_BASE_URL');\nexport const getSocketBaseUrl = (): string => getEnvVar('VITE_SOCKET_BASE_URL');\nexport const getBucketUrl = (): string => getEnvVar('VITE_BUCKET_URL');\nexport const getS3BucketUrl = (): string => getEnvVar('VITE_S3_BUCKET_URL');\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":[],"mappings":"AAoFA,IAAI,gBAA+B,CAAA;AAE5B,MAAM,mBAAmB,CAAC,WAA0B;AACzD,kBAAgB,EAAE,GAAG,eAAe,GAAG,OAAA;AACzC;AAEO,MAAM,mBAAmB,MAAM;AAG/B,MAAM,YAAY,CAAC,QAAyD;AATnF;AAWE,OAAI,mBAAc,QAAd,mBAAoB,MAAM;AAC5B,WAAO,cAAc,IAAI,GAAG;AAAA,EAC9B;AAMA,MAAI;AAEF,UAAM,UAAW,WAAmB;AACpC,QAAI,mCAAU,MAAM;AAClB,aAAO,QAAQ,GAAG;AAAA,IACpB;AAAA,EACF,QAAQ;AAAA,EAER;AAGA,QAAM,IAAI;AAAA,IACR,wBAAwB,GAAG,2EAA2E,GAAG;AAAA,EAAA;AAE7G;AAGO,MAAM,oBAAoB,MAAc,UAAU,uBAAuB;AACzE,MAAM,mBAAmB,MAAc,UAAU,sBAAsB;AACvE,MAAM,eAAe,MAAc,UAAU,iBAAiB;AAC9D,MAAM,iBAAiB,MAAc,UAAU,oBAAoB;AAGnE,MAAM,oBAAoB,CAC/B,UACA,iBACQ;AACR,QAAM,iBAAiB,cAAc,QAAQ;AAC7C,MAAI,kBAAkB,eAAe,YAAY,GAAG;AAClD,WAAO,eAAe,YAAY;AAAA,EACpC;AAGA,UAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,IAAA;AAAA,IACjD,KAAK;AACH,aAAO,CAAC,MAAc,OAAwB,KAAK,QAAQ,OAAO,OAAO,EAAE,CAAC;AAAA,IAE9E,KAAK;AACH,aAAO,CAAC,QAAgB,WAAW,UAAU,GAAG,QAAQ,IAAI,OAAO,QAAQ,CAAC,CAAC;AAAA,IAE/E,KAAK;AACH,aAAO,CAAC,SAAc,IAAI,KAAK,IAAI,EAAE,mBAAA;AAAA,IAEvC,KAAK;AACH,aAAO,CAAC,UAAkB,6BAA6B,KAAK,KAAK;AAAA,IAEnE,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,CAAC,QAAgB;AAAA,IAE1B,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,CAAC,YAAoB,QAAQ,IAAI,OAAO;AAAA,IAEjD;AACE,aAAO,IAAI,SAAgB;AACzB,cAAM,IAAI,MAAM,kCAAkC,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,wDAAwD;AAAA,MACpJ;AAAA,EAAA;AAEN;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":[],"mappings":"AAwEA,IAAI,gBAA+B,CAAA;AAE5B,MAAM,mBAAmB,CAAC,WAA0B;AACzD,kBAAgB,EAAE,GAAG,eAAe,GAAG,OAAA;AACzC;AAEO,MAAM,mBAAmB,MAAM;AAG/B,MAAM,oBAAoB,CAC/B,UACA,iBACQ;AACR,QAAM,iBAAiB,cAAc,QAAQ;AAC7C,MAAI,kBAAkB,eAAe,YAAY,GAAG;AAClD,WAAO,eAAe,YAAY;AAAA,EACpC;AAGA,UAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,IAAA;AAAA,IACjD,KAAK;AACH,aAAO,CAAC,MAAc,OAAwB,KAAK,QAAQ,OAAO,OAAO,EAAE,CAAC;AAAA,IAE9E,KAAK;AACH,aAAO,CAAC,QAAgB,WAAW,UAAU,GAAG,QAAQ,IAAI,OAAO,QAAQ,CAAC,CAAC;AAAA,IAE/E,KAAK;AACH,aAAO,CAAC,SAAc,IAAI,KAAK,IAAI,EAAE,mBAAA;AAAA,IAEvC,KAAK;AACH,aAAO,CAAC,UAAkB,6BAA6B,KAAK,KAAK;AAAA,IAEnE,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,CAAC,QAAgB;AAAA,IAE1B,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,CAAC,YAAoB,QAAQ,IAAI,OAAO;AAAA,IAEjD;AACE,aAAO,IAAI,SAAgB;AACzB,cAAM,IAAI,MAAM,kCAAkC,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,wDAAwD;AAAA,MACpJ;AAAA,EAAA;AAEN;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});let e={};const r=r=>{var t;if(null==(t=e.env)?void 0:t[r])return e.env[r];try{const e=globalThis.__VITE_ENV__;if(null==e?void 0:e[r])return e[r]}catch{}throw new Error(`Environment variable ${r} is not configured. Please configure it using configureLibrary({ env: { ${r}: 'your-value' } }) in your host application.`)};exports.configureLibrary=r=>{e={...e,...r}},exports.getBackendBaseUrl=()=>r("VITE_BACKEND_BASE_URL"),exports.getBucketUrl=()=>r("VITE_BUCKET_URL"),exports.getConfigFunction=(r,t)=>{const n=e[r];if(n&&n[t])return n[t];switch(`${String(r)}.${String(t)}`){case"routes.generatePathWithId":return(e,r)=>e.replace(":id",String(r));case"dataTransforms.formatCurrency":return(e,r="USD")=>`${r} ${e.toFixed(2)}`;case"dataTransforms.formatDate":return e=>new Date(e).toLocaleDateString();case"validation.validateEmail":return e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);case"permissions.hasPermission":return()=>!0;case"localization.getCurrentLanguage":return()=>"en";case"localization.translate":return e=>e;case"notifications.showSuccess":case"notifications.showError":case"notifications.showInfo":return e=>{};default:return(...e)=>{throw new Error(`Configuration not provided for ${String(r)}.${String(t)}. Please configure this in your consuming application.`)}}},exports.getEnvVar=r,exports.getLibraryConfig=()=>e,exports.getS3BucketUrl=()=>r("VITE_S3_BUCKET_URL"),exports.getSocketBaseUrl=()=>r("VITE_SOCKET_BASE_URL");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});let r={};exports.configureLibrary=e=>{r={...r,...e}},exports.getConfigFunction=(e,t)=>{const n=r[e];if(n&&n[t])return n[t];switch(`${String(e)}.${String(t)}`){case"routes.generatePathWithId":return(r,e)=>r.replace(":id",String(e));case"dataTransforms.formatCurrency":return(r,e="USD")=>`${e} ${r.toFixed(2)}`;case"dataTransforms.formatDate":return r=>new Date(r).toLocaleDateString();case"validation.validateEmail":return r=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r);case"permissions.hasPermission":return()=>!0;case"localization.getCurrentLanguage":return()=>"en";case"localization.translate":return r=>r;case"notifications.showSuccess":case"notifications.showError":case"notifications.showInfo":return r=>{};default:return(...r)=>{throw new Error(`Configuration not provided for ${String(e)}.${String(t)}. Please configure this in your consuming application.`)}}},exports.getLibraryConfig=()=>r;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Environment variables - should be provided by the host application\n env?: {\n /** Base URL for API requests */\n VITE_BACKEND_BASE_URL?: string;\n /** WebSocket server URL */\n VITE_SOCKET_BASE_URL?: string;\n /** Base URL for file storage */\n VITE_BUCKET_URL?: string;\n /** Alternative URL for S3 bucket access */\n VITE_S3_BUCKET_URL?: string;\n };\n \n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Environment variable accessors - these will use config first, then fallback to import.meta.env for backward compatibility\nexport const getEnvVar = (key: keyof NonNullable<LibraryConfig['env']>): string => {\n // First try to get from config (provided by host app)\n if (libraryConfig.env?.[key]) {\n return libraryConfig.env[key];\n }\n \n // Fallback to import.meta.env for backward compatibility during migration\n // This allows gradual migration and works if host app hasn't configured yet\n // Note: In a library context, import.meta.env may not be available at runtime,\n // so the host app should configure these values using configureLibrary()\n try {\n // Access import.meta.env using bracket notation to avoid TypeScript issues\n const metaEnv = (globalThis as any).__VITE_ENV__;\n if (metaEnv?.[key]) {\n return metaEnv[key];\n }\n } catch {\n // Ignore errors when checking for import.meta.env\n }\n \n // If neither is available, throw an error to make it clear configuration is needed\n throw new Error(\n `Environment variable ${key} is not configured. Please configure it using configureLibrary({ env: { ${key}: 'your-value' } }) in your host application.`\n );\n};\n\n// Convenience functions for each env var\nexport const getBackendBaseUrl = (): string => getEnvVar('VITE_BACKEND_BASE_URL');\nexport const getSocketBaseUrl = (): string => getEnvVar('VITE_SOCKET_BASE_URL');\nexport const getBucketUrl = (): string => getEnvVar('VITE_BUCKET_URL');\nexport const getS3BucketUrl = (): string => getEnvVar('VITE_S3_BUCKET_URL');\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":["libraryConfig","getEnvVar","key","_a","env","metaEnv","globalThis","__VITE_ENV__","Error","config","category","functionName","categoryConfig","String","path","id","replace","amount","currency","toFixed","date","Date","toLocaleDateString","email","test","message","args"],"mappings":"oEAoFA,IAAIA,EAA+B,CAAA,EAE5B,MAOMC,EAAaC,UAExB,GAAI,OAAAC,EAAAH,EAAcI,UAAd,EAAAD,EAAoBD,GACtB,OAAOF,EAAcI,IAAIF,GAO3B,IAEE,MAAMG,EAAWC,WAAmBC,aACpC,SAAIF,WAAUH,GACZ,OAAOG,EAAQH,EAEnB,CAAA,MAEA,CAGA,MAAM,IAAIM,MACR,wBAAwBN,4EAA8EA,4EA7BzEO,IAC/BT,EAAgB,IAAKA,KAAkBS,8BAiCR,IAAcR,EAAU,8CAE7B,IAAcA,EAAU,6CAInB,CAC/BS,EACAC,KAEA,MAAMC,EAAiBZ,EAAcU,GACrC,GAAIE,GAAkBA,EAAeD,GACnC,OAAOC,EAAeD,GAIxB,OAAQ,GAAGE,OAAOH,MAAaG,OAAOF,MACpC,IAAK,4BACH,MAAO,CAACG,EAAcC,IAAwBD,EAAKE,QAAQ,MAAOH,OAAOE,IAE3E,IAAK,gCACH,MAAO,CAACE,EAAgBC,EAAW,QAAU,GAAGA,KAAYD,EAAOE,QAAQ,KAE7E,IAAK,4BACH,OAAQC,GAAc,IAAIC,KAAKD,GAAME,qBAEvC,IAAK,2BACH,OAAQC,GAAkB,6BAA6BC,KAAKD,GAE9D,IAAK,4BACH,MAAO,KAAM,EAEf,IAAK,kCACH,MAAO,IAAM,KAEf,IAAK,yBACH,OAAQrB,GAAgBA,EAE1B,IAAK,4BACL,IAAK,0BACL,IAAK,yBACH,OAAQuB,MAEV,QACE,MAAO,IAAIC,KACT,MAAM,IAAIlB,MAAM,kCAAkCK,OAAOH,MAAaG,OAAOF,4GA3ErD,IAAMX,yBAiCR,IAAcC,EAAU,+CAFtB,IAAcA,EAAU"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":["libraryConfig","config","category","functionName","categoryConfig","String","path","id","replace","amount","currency","toFixed","date","Date","toLocaleDateString","email","test","key","message","args","Error"],"mappings":"oEAwEA,IAAIA,EAA+B,CAAA,2BAEFC,IAC/BD,EAAgB,IAAKA,KAAkBC,8BAMR,CAC/BC,EACAC,KAEA,MAAMC,EAAiBJ,EAAcE,GACrC,GAAIE,GAAkBA,EAAeD,GACnC,OAAOC,EAAeD,GAIxB,OAAQ,GAAGE,OAAOH,MAAaG,OAAOF,MACpC,IAAK,4BACH,MAAO,CAACG,EAAcC,IAAwBD,EAAKE,QAAQ,MAAOH,OAAOE,IAE3E,IAAK,gCACH,MAAO,CAACE,EAAgBC,EAAW,QAAU,GAAGA,KAAYD,EAAOE,QAAQ,KAE7E,IAAK,4BACH,OAAQC,GAAc,IAAIC,KAAKD,GAAME,qBAEvC,IAAK,2BACH,OAAQC,GAAkB,6BAA6BC,KAAKD,GAE9D,IAAK,4BACH,MAAO,KAAM,EAEf,IAAK,kCACH,MAAO,IAAM,KAEf,IAAK,yBACH,OAAQE,GAAgBA,EAE1B,IAAK,4BACL,IAAK,0BACL,IAAK,yBACH,OAAQC,MAEV,QACE,MAAO,IAAIC,KACT,MAAM,IAAIC,MAAM,kCAAkCf,OAAOH,MAAaG,OAAOF,wFA1CrD,IAAMH"}
@@ -1,14 +1,4 @@
1
1
  export interface LibraryConfig {
2
- env?: {
3
- /** Base URL for API requests */
4
- VITE_BACKEND_BASE_URL?: string;
5
- /** WebSocket server URL */
6
- VITE_SOCKET_BASE_URL?: string;
7
- /** Base URL for file storage */
8
- VITE_BUCKET_URL?: string;
9
- /** Alternative URL for S3 bucket access */
10
- VITE_S3_BUCKET_URL?: string;
11
- };
12
2
  routes?: {
13
3
  generatePathWithId?: (path: string, id: string | number) => string;
14
4
  basePaths?: {
@@ -50,9 +40,4 @@ export interface LibraryConfig {
50
40
  }
51
41
  export declare const configureLibrary: (config: LibraryConfig) => void;
52
42
  export declare const getLibraryConfig: () => LibraryConfig;
53
- export declare const getEnvVar: (key: keyof NonNullable<LibraryConfig["env"]>) => string;
54
- export declare const getBackendBaseUrl: () => string;
55
- export declare const getSocketBaseUrl: () => string;
56
- export declare const getBucketUrl: () => string;
57
- export declare const getS3BucketUrl: () => string;
58
43
  export declare const getConfigFunction: <T extends keyof LibraryConfig>(category: T, functionName: keyof LibraryConfig[T]) => any;
@@ -15,7 +15,6 @@ import { PathnameGenerator as PathnameGenerator$2, PathnamePurchase } from "../.
15
15
  import { PathnameGenerator as PathnameGenerator$1, PathnameCrm } from "../../constants/pathnames/pathname.crm/index.esm.js";
16
16
  import { PathnameGenerator, PathnameRental, ROUTES } from "../../constants/pathnames/pathname.rental/index.esm.js";
17
17
  import { CustomSnackbar } from "../../components/custom-snackbar/custom-snackbar/index.esm.js";
18
- import { getSocketBaseUrl, getBackendBaseUrl } from "../../config/index/index.esm.js";
19
18
  const defaultProvider = {
20
19
  user: null,
21
20
  loading: true,
@@ -30,7 +29,7 @@ const defaultProvider = {
30
29
  changeUserPassword: () => Promise.resolve()
31
30
  };
32
31
  const AuthContext = createContext(defaultProvider);
33
- setBaseUrl(`${getBackendBaseUrl()}/rbac`);
32
+ setBaseUrl(`${"https://apidev.erpforce.co"}/rbac`);
34
33
  const AuthProvider = ({ children }) => {
35
34
  const [user, setUser] = useState(defaultProvider.user);
36
35
  const [authToken, setAuthToken] = useState("");
@@ -106,7 +105,7 @@ const AuthProvider = ({ children }) => {
106
105
  console.warn("No auth token found, not connecting to socket.");
107
106
  return;
108
107
  }
109
- const socket = io(getSocketBaseUrl(), {
108
+ const socket = io("https://apidev.erpforce.co", {
110
109
  transports: ["websocket"],
111
110
  auth: { token: authToken },
112
111
  path: "/socket.io/"
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../src/contexts/AuthContext.tsx"],"sourcesContent":["import React, { createContext, useEffect, useRef, useState } from 'react';\nimport {\n\tpostV1AuthChangePassword,\n\tpostV1AuthForgotPassword,\n\tpostV1AuthChangeUserPassword,\n\t// getV1UserId,\n\tpostV1AuthLogin,\n\tpostV1AuthResetPassword,\n\tsetBaseUrl,\n\tpostV1AuthChangeUserPasswordByAdmin\n} from '../api-client/api.rbac/api';\nimport { auth } from '../constants/auth';\nimport { /* useLocation, */ useNavigate } from 'react-router-dom';\nimport { Pathname } from '../constants/pathnames/pathname'; // Removed - should be passed as props or configured by consuming app\nimport { getToken } from '../utils/common';\nimport { enqueueSnackbar } from 'notistack';\nimport { Socket, io } from 'socket.io-client';\nimport { generateRouteWithId } from '../utils/route-utils';\nimport {\n\tPathnameAccounting,\n\tPathnameGenerator\n} from '../constants/pathnames/pathname.accounting';\n\nimport {\n\tPathnameInventory,\n\tPathnameGenerator as PathnameGeneratorInventory\n} from '../constants/pathnames/pathname.inventory';\n\nimport {\n\tPathnameManufacturing,\n\tPathnameGenerator as PathnameGeneratorManufacuring\n} from '../constants/pathnames/pathname.manufacturing';\n\nimport {\n\tPathnamePurchase,\n\tPathnameGenerator as PathnameGeneratorPurchase\n} from '../constants/pathnames/pathname.procurement';\n\nimport {\n\tPathnameCrm,\n\tPathnameGenerator as PathnameGeneratorCrm\n} from '../constants/pathnames/pathname.crm';\n\nimport {\n\tPathnameRental,\n\tPathnameGenerator as PathnameGeneratorRental\n} from '../constants/pathnames/pathname.rental';\n\nimport { ROUTES as RENTALROUTES } from '../constants/pathnames/pathname.rental';\n\nimport CustomSnackbar from '../components/custom-snackbar/custom-snackbar.tsx';\nexport interface LoginFormValues {\n\temail: string;\n\tpassword: string;\n}\n\nexport interface resetFormValues {\n\temail: string;\n}\n\nexport interface resetPasswordValues {\n\ttoken: string;\n}\n\nexport interface changePasswordValues {\n\tpassword: string;\n}\n\nexport interface changeUserPasswordValues {\n\tpassword: string;\n}\n\ninterface ERPApiUser {\n\tid: string | number;\n\tfirst_name: string;\n\tlast_name: string;\n\tmiddle_name: string;\n\tcountry_code: string;\n\temail: string;\n\tcreated_by: any;\n\tupdated_by: any;\n\tcreated_at: string;\n\tupdated_at: string;\n\trole_id: string;\n\tdepartment_id: number;\n\tis_deleted: number;\n\tdeleted_at: string | null;\n\tdeleted_by: any;\n\ttoken: string;\n\tprofile_image: string;\n\tcurrency_data?: {\n\t\tid: number;\n\t\tsymbol: string;\n\t\tcurrency_name: string;\n\t\tnumber_format:string;\n\t\tposition: string | null;\n\t\tfraction_unit: string | null\n\t};\n\taccessCompanies?: any[]\n}\ninterface ERPUser extends Omit<ERPApiUser, 'token'> {\n\tfull_name: string;\n\tcompany_id: string;\n}\n\ninterface DefaultProviderProps {\n\tuser: ERPUser | null;\n\tloading: boolean;\n\tauthToken: string;\n\tsetUser: React.Dispatch<React.SetStateAction<ERPUser | null>>;\n\tsetLoading: React.Dispatch<React.SetStateAction<boolean>>;\n\tlogin: (\n\t\tparams: LoginFormValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tlogout: () => Promise<void>;\n\tforgotPassword: (\n\t\tparams: resetFormValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tresetPassword: (\n\t\tparams: resetPasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tchangePassword: (\n\t\tparams: changePasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tchangeUserPassword: (\n\t\tparams: changeUserPasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n}\n\nconst defaultProvider: DefaultProviderProps = {\n\tuser: null,\n\tloading: true,\n\tauthToken: '',\n\tsetUser: () => null,\n\tsetLoading: () => Boolean,\n\tlogin: () => Promise.resolve(),\n\tlogout: () => Promise.resolve(),\n\tforgotPassword: () => Promise.resolve(),\n\tresetPassword: () => Promise.resolve(),\n\tchangePassword: () => Promise.resolve(),\n\tchangeUserPassword: () => Promise.resolve()\n};\n\nconst AuthContext = createContext(defaultProvider);\n\ninterface AuthProviderProps {\n\tchildren: React.ReactNode;\n}\n\nimport { getBackendBaseUrl, getSocketBaseUrl } from '../config';\n\nsetBaseUrl(`${getBackendBaseUrl()}/rbac`);\n\nconst AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {\n\t// ** States\n\tconst [user, setUser] = useState(defaultProvider.user);\n\tconst [authToken, setAuthToken] = useState<string>('');\n\tconst [loading, setLoading] = useState(defaultProvider.loading);\n\tconst socketRef = useRef<Socket | null>(null);\n\n\t// ** Hooks\n\tconst navigate = useNavigate();\n\t// const location = useLocation();\n\tconst isJsonParse = (string?: string | null) => {\n\t\tif (!string) return false;\n\n\t\ttry {\n\t\t\treturn JSON.parse(string);\n\t\t} catch (error) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tconst getNotificationUrl = (data: any) => {\n\t\tconst { moduleName = '', moduleId = '', notificationData = {} } = data;\n\t\tconst key = moduleName.toLowerCase();\n\n\t\tconst routeMap: Record<string, () => string> = {\n\t\t\t'sales invoice': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\n\n\t\t\t'asset transfers': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\n\n\t\t\t'budgets': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\n\n\t\t\t'cash expense': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\n\n\t\t\t'credit notes': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\n\n\t\t\t'debit notes': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\n\n\t\t\t'expense reimbursement': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\n\n\t\t\t'journal entries': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\n\n\t\t\t'payment entries': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\n\n\t\t\t'purchase invoice': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\n\n\t\t\t'stock transfer': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\n\n\t\t\t'bills of materials': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL), moduleId.toString()),\n\n\t\t\t'purchase agreement': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\n\n\t\t\t'purchase orders': () =>\n\t\t\tgenerateRouteWithId(notificationData?.data?.is_rental == 1 ? RENTALROUTES.VIEW : PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER) , moduleId.toString()),\n\n\t\t\t'purchase request': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\n\n\t\t\t'vra': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\n\n\t\t\t'sl customer returns': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\n\n\t\t\t'sales order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\n\n\t\t\t'rental order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\t\t'replacement order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\t\t'rental agreement': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\n\n\t\t\t'cross hire order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\n\n\t\t\t'cross hire request': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\n\t\t};\n\n\t\treturn routeMap[key]?.() || '/dashboard';\n\t};\n\n\n\t// const initAuth = async () => {\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tconst storedUser: ERPUser =\n\t// \t\tisJsonParse(window.localStorage.getItem(auth.storageUserKeyName)) || null;\n\t// \tif (storedToken && storedUser) {\n\t// \t\ttry {\n\t// \t\t\tconst userData = await getV1UserId({\n\t// \t\t\t\t'x-token': storedToken,\n\t// \t\t\t\tid: String(storedUser.id)\n\t// \t\t\t});\n\t// \t\t} catch (error) {\n\t// \t\t}\n\t// \t} else {\n\t// \t\tsetLoading(false);\n\t// \t}\n\t// \tif (storedToken && storedUser) {\n\t// \t\tsetUser(storedUser);\n\t// setLoading(false);\n\t// \t} else {\n\t// \t\thandleLogout();\n\t// setLoading(false);\n\t// \t}\n\t// };\n\n\t// useEffect(() => {\n\t// setLoading(true)\n\t// \tinitAuth();\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tif (!storedToken) {\n\t// \t\tsetUser(null);\n\t// \t} else {\n\t// \t\tsetLoading(false);\n\t// \t}\n\t// \teslint-disable-next-line react-hooks/exhaustive-deps\n\t// }, [location.pathname]);\n\n\t// useEffect(() => {\n\t// \tsetLoading(true);\n\t// \tinitAuth();\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tif (!storedToken) {\n\t// \t\tsetLoading(false);\n\t// \t\tnavigate(Pathname.LOGIN);\n\t// \t}\n\t// \t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t// }, []);\n\n\tuseEffect(() => {\n\t\tsetLoading(true);\n\t\t// initAuth()\n\t\tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t\tconst storedUser =\n\t\t\tisJsonParse(window.localStorage.getItem(auth.storageUserKeyName)) ?? null;\n\t\tconst publicRoutes = [Pathname.LOGIN, Pathname.FORGOT_PASSWORD, Pathname.RESET_PASSWORD, Pathname.CHANGE_PASSWORD];\n\t\tconst currentPath = window.location.pathname;\n\t\tif (!storedToken && !storedUser) {\n\t\t\tif (!publicRoutes.includes(currentPath)) {\n\t\t\t\tnavigate(Pathname.LOGIN);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t} else {\n\t\t\tsetUser(storedUser);\n\t\t\tsetAuthToken(storedToken || '');\n\t\t\tsetLoading(false);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!authToken) {\n\t\t\tif (socketRef.current) {\n\t\t\t\tsocketRef.current?.disconnect();\n\t\t\t\tsocketRef.current = null\n\t\t\t}\n\t\t\tconsole.warn(\"No auth token found, not connecting to socket.\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst socket = io(getSocketBaseUrl(), {\n\t\t\ttransports: [\"websocket\"],\n\t\t\tauth: { token: authToken },\n\t\t\tpath: \"/socket.io/\",\n\t\t\t\n\t\t});\n\t\tsocketRef.current = socket;\n\n\t\tsocket.on(\"connect\", () => {\n\t\t\tconsole.log(\"Socket connected:\", socket.id);\n\t\t\tsocket.onAny((event, ...args) => {\n\t\t\t\tconsole.log(`Received event: ${event}`, args);\n\t\t\t});\n\t\t});\n\t\t\n\t\t// socket event handler\n\t\tsocket.on('notification', (data) => {\n\t\tconst { message, notificationData } = data || {};\n\t\tlet notificationContent: React.ReactNode = message;\n\t\tconst url = getNotificationUrl(data);\n\n\t\tif (notificationData) {\n\t\t\tconst { notification_type } = notificationData;\n\n\t\t\tswitch (notification_type) {\n\t\t\t\tcase 'addApprovers': {\n\t\t\t\t\t\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'change_approval_status': {\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tenqueueSnackbar(String(message), {\n\t\t\tvariant: 'default',\n\t\t\tanchorOrigin: { vertical: 'top', horizontal: 'center' },\n\t\t\tautoHideDuration: 5000,\n\t\t\tcontent: (key) => (\n\t\t\t<CustomSnackbar snackbarKey={key} message={notificationContent} data={notificationData} variant=\"default\" linkUrl={url}/>\n\t\t\t),\n\t\t});\n\t\t});\n\n\n\t\tsocket.on(\"sales_invoice_viewed\", (data) => {\n\t\t\tconsole.log(\"Invoice viewed:\", data.invoiceId, \"by user:\", data.userId);\n\t\t});\n\n\t\tsocket.on(\"error\", (errMsg) => {\n\t\t\tenqueueSnackbar(`Socket error: ${errMsg}`, { variant: \"error\" });\n\t\t\tconsole.error(\"Socket error:\", errMsg);\n\t\t});\n\n\t\t// Clean up on unmount\n\t\treturn () => {\n\t\t\tif (socketRef.current) {\n\t\t\t\tsocketRef.current.disconnect();\n\t\t\t\tsocketRef.current = null\n\t\t\t}\n\t\t};\n\t}, [authToken]);\n\n\tconst handleLogin = async (\n\t\tparams: LoginFormValues,\n\t\tcallback: (err: string) => void\n\t) => {\n\t\tsetLoading(true);\n\t\tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t\tif (storedToken && user) {\n\t\t\treturn navigate(Pathname.DASHBOARD);\n\t\t}\n\n\t\ttry {\n\t\t\tconst loginUser = await postV1AuthLogin({ ...params, ...getToken() });\n\t\t\tif (loginUser.success) {\n\t\t\t\tconst data: ERPApiUser | null = loginUser?.data?.login || null;\n\t\t\t\tif (data) {\n\t\t\t\t\twindow.localStorage.setItem(auth.storageTokenKeyName, data.token);\n\t\t\t\t\tconst userData: ERPUser = {\n\t\t\t\t\t\t...data,\n\t\t\t\t\t\tfull_name: `${data.first_name} ${data.last_name}`\n\t\t\t\t\t};\n\t\t\t\t\twindow.localStorage.setItem(\n\t\t\t\t\t\tauth.storageUserKeyName,\n\t\t\t\t\t\tJSON.stringify(userData)\n\t\t\t\t\t);\n\t\t\t\t\tsetUser(userData);\n\t\t\t\t\tsetAuthToken(data.token);\n\t\t\t\t\tnavigate(Pathname.DASHBOARD);\n\t\t\t\t\tsetLoading(false);\n\t\t\t\t\tdelete data.token;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t}\n\n\t\t\tcallback(message);\n\t\t}\n\t};\n\n\tconst handleLogout = async () => {\n\t\twindow.localStorage.removeItem(auth.storageTokenKeyName);\n\t\twindow.localStorage.removeItem(auth.storageUserKeyName);\n\t\twindow.localStorage.removeItem(auth.storageAccessKeyName);\n\t\tsetUser(null);\n\t\tsetAuthToken('');\n\t\tnavigate(Pathname.LOGIN);\n\t};\n\n\tconst handleForgotPassword = async (params: resetFormValues,\n\t\tcallback: (type: boolean, err: string) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthForgotPassword({ ...params, ...getToken() });\n\t\t\tcallback(true, \"Reset Link sent to your email\");\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t}\n\n\t\t\tcallback(false, message);\n\t\t}\n\t};\n\n\tconst handleResetPassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string) => void) => {\n\t\ttry {\n\t\t\tconst response = await postV1AuthResetPassword({ ...params, ...getToken() });\n\t\t\tcallback(response);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tconsole.log(\"Error \", error)\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst handleChangePassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangePassword({ ...params, ...getToken() });\n\t\t\tcallback(null);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tconsole.log(\"Error \", error)\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message);\n\t\t\t}\n\t\t}\n\t\tcallback(\"reset\");\n\t}\n\n\tconst handleChangeUserPassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string, resType: boolean) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangeUserPassword({ ...params, ...getToken() });\n\t\t\tcallback('Password Changed Successfully', true);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message, false);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst handleChangeUserPasswordByAdmin = async (params: changePasswordValues,\n\t\tcallback: (err: string, resType: boolean) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangeUserPasswordByAdmin({ ...params, ...getToken() });\n\t\t\tcallback('Password Changed Successfully', true);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message, false);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tconst values = {\n\t\tuser,\n\t\tauthToken,\n\t\tloading,\n\t\tsetUser,\n\t\tsetLoading,\n\t\tlogin: handleLogin,\n\t\tlogout: handleLogout,\n\t\tforgotPassword: handleForgotPassword,\n\t\tresetPassword: handleResetPassword,\n\t\tchangePassword: handleChangePassword,\n\t\tchangeUserPassword: handleChangeUserPassword,\n\t\tchangeUserPasswordByAdmin: handleChangeUserPasswordByAdmin\n\t};\n\n\treturn <AuthContext.Provider value={values}>{children}</AuthContext.Provider>;\n};\n\nexport { AuthContext, AuthProvider };\n"],"names":["PathnameGenerator","PathnameGeneratorInventory","PathnameGeneratorManufacuring","PathnameGeneratorPurchase","_a","RENTALROUTES","PathnameGeneratorCrm","PathnameGeneratorRental"],"mappings":";;;;;;;;;;;;;;;;;;AAsIA,MAAM,kBAAwC;AAAA,EAC7C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS,MAAM;AAAA,EACf,YAAY,MAAM;AAAA,EAClB,OAAO,MAAM,QAAQ,QAAA;AAAA,EACrB,QAAQ,MAAM,QAAQ,QAAA;AAAA,EACtB,gBAAgB,MAAM,QAAQ,QAAA;AAAA,EAC9B,eAAe,MAAM,QAAQ,QAAA;AAAA,EAC7B,gBAAgB,MAAM,QAAQ,QAAA;AAAA,EAC9B,oBAAoB,MAAM,QAAQ,QAAA;AACnC;AAEA,MAAM,cAAc,cAAc,eAAe;AAQjD,WAAW,GAAG,mBAAmB,OAAO;AAExC,MAAM,eAA4C,CAAC,EAAE,eAAe;AAEnE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,gBAAgB,IAAI;AACrD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAiB,EAAE;AACrD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,gBAAgB,OAAO;AAC9D,QAAM,YAAY,OAAsB,IAAI;AAG5C,QAAM,WAAW,YAAA;AAEjB,QAAM,cAAc,CAAC,WAA2B;AAC/C,QAAI,CAAC,OAAQ,QAAO;AAEpB,QAAI;AACH,aAAO,KAAK,MAAM,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,SAAS,OAAO;AACf,UAAI,UAAkB;AACtB,cAAQ,IAAI,UAAU,KAAK;AAC3B,UAAI,iBAAiB,OAAO;AAC3B,kBAAU,YAAY,MAAM,OAAO,EAAE,WAAW,MAAM;AACtD,iBAAS,OAAO;AAAA,MACjB;AAAA,IACD;AACA,aAAS,OAAO;AAAA,EACjB;AAEA,QAAM,2BAA2B,OAAO,QACvC,aAAsD;AACtD,QAAI;AACH,YAAM,6BAA6B,EAAE,GAAG,QAAQ,GAAG,SAAA,GAAY;AAC/D,eAAS,iCAAiC,IAAI;AAAA,IAC/C,SAAS,OAAO;AACf,UAAI,UAAkB;AACtB,UAAI,iBAAiB,OAAO;AAC3B,kBAAU,YAAY,MAAM,OAAO,EAAE,WAAW,MAAM;AACtD,iBAAS,SAAS,KAAK;AAAA,MACxB;AAAA,IACD;AAAA,EACD;AAEA,QAAM,kCAAkC,OAAO,QAC9C,aAAsD;AACtD,QAAI;AACH,YAAM,oCAAoC,EAAE,GAAG,QAAQ,GAAG,SAAA,GAAY;AACtE,eAAS,iCAAiC,IAAI;AAAA,IAC/C,SAAS,OAAO;AACf,UAAI,UAAkB;AACtB,UAAI,iBAAiB,OAAO;AAC3B,kBAAU,YAAY,MAAM,OAAO,EAAE,WAAW,MAAM;AACtD,iBAAS,SAAS,KAAK;AAAA,MACxB;AAAA,IACD;AAAA,EACD;AAGA,QAAM,SAAS;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,2BAA2B;AAAA,EAAA;AAG5B,6BAAQ,YAAY,UAAZ,EAAqB,OAAO,QAAS,UAAS;AACvD;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/contexts/AuthContext.tsx"],"sourcesContent":["import React, { createContext, useEffect, useRef, useState } from 'react';\nimport {\n\tpostV1AuthChangePassword,\n\tpostV1AuthForgotPassword,\n\tpostV1AuthChangeUserPassword,\n\t// getV1UserId,\n\tpostV1AuthLogin,\n\tpostV1AuthResetPassword,\n\tsetBaseUrl,\n\tpostV1AuthChangeUserPasswordByAdmin\n} from '../api-client/api.rbac/api';\nimport { auth } from '../constants/auth';\nimport { /* useLocation, */ useNavigate } from 'react-router-dom';\nimport { Pathname } from '../constants/pathnames/pathname'; // Removed - should be passed as props or configured by consuming app\nimport { getToken } from '../utils/common';\nimport { enqueueSnackbar } from 'notistack';\nimport { Socket, io } from 'socket.io-client';\nimport { generateRouteWithId } from '../utils/route-utils';\nimport {\n\tPathnameAccounting,\n\tPathnameGenerator\n} from '../constants/pathnames/pathname.accounting';\n\nimport {\n\tPathnameInventory,\n\tPathnameGenerator as PathnameGeneratorInventory\n} from '../constants/pathnames/pathname.inventory';\n\nimport {\n\tPathnameManufacturing,\n\tPathnameGenerator as PathnameGeneratorManufacuring\n} from '../constants/pathnames/pathname.manufacturing';\n\nimport {\n\tPathnamePurchase,\n\tPathnameGenerator as PathnameGeneratorPurchase\n} from '../constants/pathnames/pathname.procurement';\n\nimport {\n\tPathnameCrm,\n\tPathnameGenerator as PathnameGeneratorCrm\n} from '../constants/pathnames/pathname.crm';\n\nimport {\n\tPathnameRental,\n\tPathnameGenerator as PathnameGeneratorRental\n} from '../constants/pathnames/pathname.rental';\n\nimport { ROUTES as RENTALROUTES } from '../constants/pathnames/pathname.rental';\n\nimport CustomSnackbar from '../components/custom-snackbar/custom-snackbar.tsx';\nexport interface LoginFormValues {\n\temail: string;\n\tpassword: string;\n}\n\nexport interface resetFormValues {\n\temail: string;\n}\n\nexport interface resetPasswordValues {\n\ttoken: string;\n}\n\nexport interface changePasswordValues {\n\tpassword: string;\n}\n\nexport interface changeUserPasswordValues {\n\tpassword: string;\n}\n\ninterface ERPApiUser {\n\tid: string | number;\n\tfirst_name: string;\n\tlast_name: string;\n\tmiddle_name: string;\n\tcountry_code: string;\n\temail: string;\n\tcreated_by: any;\n\tupdated_by: any;\n\tcreated_at: string;\n\tupdated_at: string;\n\trole_id: string;\n\tdepartment_id: number;\n\tis_deleted: number;\n\tdeleted_at: string | null;\n\tdeleted_by: any;\n\ttoken: string;\n\tprofile_image: string;\n\tcurrency_data?: {\n\t\tid: number;\n\t\tsymbol: string;\n\t\tcurrency_name: string;\n\t\tnumber_format:string;\n\t\tposition: string | null;\n\t\tfraction_unit: string | null\n\t};\n\taccessCompanies?: any[]\n}\ninterface ERPUser extends Omit<ERPApiUser, 'token'> {\n\tfull_name: string;\n\tcompany_id: string;\n}\n\ninterface DefaultProviderProps {\n\tuser: ERPUser | null;\n\tloading: boolean;\n\tauthToken: string;\n\tsetUser: React.Dispatch<React.SetStateAction<ERPUser | null>>;\n\tsetLoading: React.Dispatch<React.SetStateAction<boolean>>;\n\tlogin: (\n\t\tparams: LoginFormValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tlogout: () => Promise<void>;\n\tforgotPassword: (\n\t\tparams: resetFormValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tresetPassword: (\n\t\tparams: resetPasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tchangePassword: (\n\t\tparams: changePasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n\tchangeUserPassword: (\n\t\tparams: changeUserPasswordValues,\n\t\tcallback: (err: string) => void\n\t) => Promise<void>;\n}\n\nconst defaultProvider: DefaultProviderProps = {\n\tuser: null,\n\tloading: true,\n\tauthToken: '',\n\tsetUser: () => null,\n\tsetLoading: () => Boolean,\n\tlogin: () => Promise.resolve(),\n\tlogout: () => Promise.resolve(),\n\tforgotPassword: () => Promise.resolve(),\n\tresetPassword: () => Promise.resolve(),\n\tchangePassword: () => Promise.resolve(),\n\tchangeUserPassword: () => Promise.resolve()\n};\n\nconst AuthContext = createContext(defaultProvider);\n\ninterface AuthProviderProps {\n\tchildren: React.ReactNode;\n}\n\nsetBaseUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/rbac`);\n\nconst AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {\n\t// ** States\n\tconst [user, setUser] = useState(defaultProvider.user);\n\tconst [authToken, setAuthToken] = useState<string>('');\n\tconst [loading, setLoading] = useState(defaultProvider.loading);\n\tconst socketRef = useRef<Socket | null>(null);\n\n\t// ** Hooks\n\tconst navigate = useNavigate();\n\t// const location = useLocation();\n\tconst isJsonParse = (string?: string | null) => {\n\t\tif (!string) return false;\n\n\t\ttry {\n\t\t\treturn JSON.parse(string);\n\t\t} catch (error) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tconst getNotificationUrl = (data: any) => {\n\t\tconst { moduleName = '', moduleId = '', notificationData = {} } = data;\n\t\tconst key = moduleName.toLowerCase();\n\n\t\tconst routeMap: Record<string, () => string> = {\n\t\t\t'sales invoice': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\n\n\t\t\t'asset transfers': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\n\n\t\t\t'budgets': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\n\n\t\t\t'cash expense': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\n\n\t\t\t'credit notes': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\n\n\t\t\t'debit notes': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\n\n\t\t\t'expense reimbursement': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\n\n\t\t\t'journal entries': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\n\n\t\t\t'payment entries': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\n\n\t\t\t'purchase invoice': () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\n\n\t\t\t'stock transfer': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\n\n\t\t\t'bills of materials': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL), moduleId.toString()),\n\n\t\t\t'purchase agreement': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\n\n\t\t\t'purchase orders': () =>\n\t\t\tgenerateRouteWithId(notificationData?.data?.is_rental == 1 ? RENTALROUTES.VIEW : PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER) , moduleId.toString()),\n\n\t\t\t'purchase request': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\n\n\t\t\t'vra': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\n\n\t\t\t'sl customer returns': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\n\n\t\t\t'sales order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\n\n\t\t\t'rental order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\t\t'replacement order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\t\t'rental agreement': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\n\n\t\t\t'cross hire order': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\n\n\t\t\t'cross hire request': () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\n\t\t};\n\n\t\treturn routeMap[key]?.() || '/dashboard';\n\t};\n\n\n\t// const initAuth = async () => {\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tconst storedUser: ERPUser =\n\t// \t\tisJsonParse(window.localStorage.getItem(auth.storageUserKeyName)) || null;\n\t// \tif (storedToken && storedUser) {\n\t// \t\ttry {\n\t// \t\t\tconst userData = await getV1UserId({\n\t// \t\t\t\t'x-token': storedToken,\n\t// \t\t\t\tid: String(storedUser.id)\n\t// \t\t\t});\n\t// \t\t} catch (error) {\n\t// \t\t}\n\t// \t} else {\n\t// \t\tsetLoading(false);\n\t// \t}\n\t// \tif (storedToken && storedUser) {\n\t// \t\tsetUser(storedUser);\n\t// setLoading(false);\n\t// \t} else {\n\t// \t\thandleLogout();\n\t// setLoading(false);\n\t// \t}\n\t// };\n\n\t// useEffect(() => {\n\t// setLoading(true)\n\t// \tinitAuth();\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tif (!storedToken) {\n\t// \t\tsetUser(null);\n\t// \t} else {\n\t// \t\tsetLoading(false);\n\t// \t}\n\t// \teslint-disable-next-line react-hooks/exhaustive-deps\n\t// }, [location.pathname]);\n\n\t// useEffect(() => {\n\t// \tsetLoading(true);\n\t// \tinitAuth();\n\t// \tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t// \tif (!storedToken) {\n\t// \t\tsetLoading(false);\n\t// \t\tnavigate(Pathname.LOGIN);\n\t// \t}\n\t// \t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t// }, []);\n\n\tuseEffect(() => {\n\t\tsetLoading(true);\n\t\t// initAuth()\n\t\tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t\tconst storedUser =\n\t\t\tisJsonParse(window.localStorage.getItem(auth.storageUserKeyName)) ?? null;\n\t\tconst publicRoutes = [Pathname.LOGIN, Pathname.FORGOT_PASSWORD, Pathname.RESET_PASSWORD, Pathname.CHANGE_PASSWORD];\n\t\tconst currentPath = window.location.pathname;\n\t\tif (!storedToken && !storedUser) {\n\t\t\tif (!publicRoutes.includes(currentPath)) {\n\t\t\t\tnavigate(Pathname.LOGIN);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t} else {\n\t\t\tsetUser(storedUser);\n\t\t\tsetAuthToken(storedToken || '');\n\t\t\tsetLoading(false);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!authToken) {\n\t\t\tif (socketRef.current) {\n\t\t\t\tsocketRef.current?.disconnect();\n\t\t\t\tsocketRef.current = null\n\t\t\t}\n\t\t\tconsole.warn(\"No auth token found, not connecting to socket.\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst socket = io(import.meta.env.VITE_SOCKET_BASE_URL, {\n\t\t\ttransports: [\"websocket\"],\n\t\t\tauth: { token: authToken },\n\t\t\tpath: \"/socket.io/\",\n\t\t\t\n\t\t});\n\t\tsocketRef.current = socket;\n\n\t\tsocket.on(\"connect\", () => {\n\t\t\tconsole.log(\"Socket connected:\", socket.id);\n\t\t\tsocket.onAny((event, ...args) => {\n\t\t\t\tconsole.log(`Received event: ${event}`, args);\n\t\t\t});\n\t\t});\n\t\t\n\t\t// socket event handler\n\t\tsocket.on('notification', (data) => {\n\t\tconst { message, notificationData } = data || {};\n\t\tlet notificationContent: React.ReactNode = message;\n\t\tconst url = getNotificationUrl(data);\n\n\t\tif (notificationData) {\n\t\t\tconst { notification_type } = notificationData;\n\n\t\t\tswitch (notification_type) {\n\t\t\t\tcase 'addApprovers': {\n\t\t\t\t\t\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'change_approval_status': {\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tnotificationContent = message;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tenqueueSnackbar(String(message), {\n\t\t\tvariant: 'default',\n\t\t\tanchorOrigin: { vertical: 'top', horizontal: 'center' },\n\t\t\tautoHideDuration: 5000,\n\t\t\tcontent: (key) => (\n\t\t\t<CustomSnackbar snackbarKey={key} message={notificationContent} data={notificationData} variant=\"default\" linkUrl={url}/>\n\t\t\t),\n\t\t});\n\t\t});\n\n\n\t\tsocket.on(\"sales_invoice_viewed\", (data) => {\n\t\t\tconsole.log(\"Invoice viewed:\", data.invoiceId, \"by user:\", data.userId);\n\t\t});\n\n\t\tsocket.on(\"error\", (errMsg) => {\n\t\t\tenqueueSnackbar(`Socket error: ${errMsg}`, { variant: \"error\" });\n\t\t\tconsole.error(\"Socket error:\", errMsg);\n\t\t});\n\n\t\t// Clean up on unmount\n\t\treturn () => {\n\t\t\tif (socketRef.current) {\n\t\t\t\tsocketRef.current.disconnect();\n\t\t\t\tsocketRef.current = null\n\t\t\t}\n\t\t};\n\t}, [authToken]);\n\n\tconst handleLogin = async (\n\t\tparams: LoginFormValues,\n\t\tcallback: (err: string) => void\n\t) => {\n\t\tsetLoading(true);\n\t\tconst storedToken = window.localStorage.getItem(auth.storageTokenKeyName);\n\t\tif (storedToken && user) {\n\t\t\treturn navigate(Pathname.DASHBOARD);\n\t\t}\n\n\t\ttry {\n\t\t\tconst loginUser = await postV1AuthLogin({ ...params, ...getToken() });\n\t\t\tif (loginUser.success) {\n\t\t\t\tconst data: ERPApiUser | null = loginUser?.data?.login || null;\n\t\t\t\tif (data) {\n\t\t\t\t\twindow.localStorage.setItem(auth.storageTokenKeyName, data.token);\n\t\t\t\t\tconst userData: ERPUser = {\n\t\t\t\t\t\t...data,\n\t\t\t\t\t\tfull_name: `${data.first_name} ${data.last_name}`\n\t\t\t\t\t};\n\t\t\t\t\twindow.localStorage.setItem(\n\t\t\t\t\t\tauth.storageUserKeyName,\n\t\t\t\t\t\tJSON.stringify(userData)\n\t\t\t\t\t);\n\t\t\t\t\tsetUser(userData);\n\t\t\t\t\tsetAuthToken(data.token);\n\t\t\t\t\tnavigate(Pathname.DASHBOARD);\n\t\t\t\t\tsetLoading(false);\n\t\t\t\t\tdelete data.token;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t}\n\n\t\t\tcallback(message);\n\t\t}\n\t};\n\n\tconst handleLogout = async () => {\n\t\twindow.localStorage.removeItem(auth.storageTokenKeyName);\n\t\twindow.localStorage.removeItem(auth.storageUserKeyName);\n\t\twindow.localStorage.removeItem(auth.storageAccessKeyName);\n\t\tsetUser(null);\n\t\tsetAuthToken('');\n\t\tnavigate(Pathname.LOGIN);\n\t};\n\n\tconst handleForgotPassword = async (params: resetFormValues,\n\t\tcallback: (type: boolean, err: string) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthForgotPassword({ ...params, ...getToken() });\n\t\t\tcallback(true, \"Reset Link sent to your email\");\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t}\n\n\t\t\tcallback(false, message);\n\t\t}\n\t};\n\n\tconst handleResetPassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string) => void) => {\n\t\ttry {\n\t\t\tconst response = await postV1AuthResetPassword({ ...params, ...getToken() });\n\t\t\tcallback(response);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tconsole.log(\"Error \", error)\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst handleChangePassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangePassword({ ...params, ...getToken() });\n\t\t\tcallback(null);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tconsole.log(\"Error \", error)\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message);\n\t\t\t}\n\t\t}\n\t\tcallback(\"reset\");\n\t}\n\n\tconst handleChangeUserPassword = async (params: resetPasswordValues,\n\t\tcallback: (err: string, resType: boolean) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangeUserPassword({ ...params, ...getToken() });\n\t\t\tcallback('Password Changed Successfully', true);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message, false);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst handleChangeUserPasswordByAdmin = async (params: changePasswordValues,\n\t\tcallback: (err: string, resType: boolean) => void) => {\n\t\ttry {\n\t\t\tawait postV1AuthChangeUserPasswordByAdmin({ ...params, ...getToken() });\n\t\t\tcallback('Password Changed Successfully', true);\n\t\t} catch (error) {\n\t\t\tlet message: string = 'Something went wrong';\n\t\t\tif (error instanceof Error) {\n\t\t\t\tmessage = isJsonParse(error.message).message || error.message;\n\t\t\t\tcallback(message, false);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tconst values = {\n\t\tuser,\n\t\tauthToken,\n\t\tloading,\n\t\tsetUser,\n\t\tsetLoading,\n\t\tlogin: handleLogin,\n\t\tlogout: handleLogout,\n\t\tforgotPassword: handleForgotPassword,\n\t\tresetPassword: handleResetPassword,\n\t\tchangePassword: handleChangePassword,\n\t\tchangeUserPassword: handleChangeUserPassword,\n\t\tchangeUserPasswordByAdmin: handleChangeUserPasswordByAdmin\n\t};\n\n\treturn <AuthContext.Provider value={values}>{children}</AuthContext.Provider>;\n};\n\nexport { AuthContext, AuthProvider };\n"],"names":["PathnameGenerator","PathnameGeneratorInventory","PathnameGeneratorManufacuring","PathnameGeneratorPurchase","_a","RENTALROUTES","PathnameGeneratorCrm","PathnameGeneratorRental"],"mappings":";;;;;;;;;;;;;;;;;AAsIA,MAAM,kBAAwC;AAAA,EAC7C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS,MAAM;AAAA,EACf,YAAY,MAAM;AAAA,EAClB,OAAO,MAAM,QAAQ,QAAA;AAAA,EACrB,QAAQ,MAAM,QAAQ,QAAA;AAAA,EACtB,gBAAgB,MAAM,QAAQ,QAAA;AAAA,EAC9B,eAAe,MAAM,QAAQ,QAAA;AAAA,EAC7B,gBAAgB,MAAM,QAAQ,QAAA;AAAA,EAC9B,oBAAoB,MAAM,QAAQ,QAAA;AACnC;AAEA,MAAM,cAAc,cAAc,eAAe;AAMjD,WAAW,GAAG,4BAAqC,OAAO;AAE1D,MAAM,eAA4C,CAAC,EAAE,eAAe;AAEnE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,gBAAgB,IAAI;AACrD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAiB,EAAE;AACrD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,gBAAgB,OAAO;AAC9D,QAAM,YAAY,OAAsB,IAAI;AAG5C,QAAM,WAAW,YAAA;AAEjB,QAAM,cAAc,CAAC,WAA2B;AAC/C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