@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,8 +1,7 @@
1
1
  import { patchV1FormBuilderId, getV1FormBuilderId, getV1FormBuilderFieldsId, setBaseUrl } from "../../../../api-client/api.system-feature/api/index.esm.js";
2
2
  import { createAsyncThunk } from "@reduxjs/toolkit";
3
- import { getBackendBaseUrl } from "../../../../config/index/index.esm.js";
4
3
  import { getToken } from "../../../../utils/common/index.esm.js";
5
- setBaseUrl(`${getBackendBaseUrl()}/system-feature`);
4
+ setBaseUrl(`${"https://apidev.erpforce.co"}/system-feature`);
6
5
  const patchFormDataById = createAsyncThunk(
7
6
  "formBuilder/put",
8
7
  async ({ id, data }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../../src/views/form-builder/redux/actionCreator.ts"],"sourcesContent":["import { getV1FormBuilderFieldsId, getV1FormBuilderId, patchV1FormBuilderId, setBaseUrl } from \"@/api-client/api.system-feature/api\";\r\nimport { GetV1FormBuilderFieldsIdRequest } from \"@/api-client/api.system-feature/api-types\";\r\nimport { getToken } from \"@/utils\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\n\r\nimport { getBackendBaseUrl } from '@/config';\r\n\r\nsetBaseUrl(`${getBackendBaseUrl()}/system-feature`);\r\n\r\nexport const patchFormDataById = createAsyncThunk(\r\n\r\n \"formBuilder/put\",\r\n async ({ id, data }: any) => {\r\n const response = await patchV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n ...data,\r\n });\r\n return response;\r\n },\r\n);\r\n\r\nexport const getFormDataById = createAsyncThunk(\r\n \"formBuilder/getById\",\r\n async (id: string) => {\r\n const response = await getV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response;\r\n }\r\n);\r\n\r\n\r\n\r\nexport const getFieldsByFormId = createAsyncThunk(\r\n \"formBuilder/fields/get\",\r\n async ({ id }: GetV1FormBuilderFieldsIdRequest) => {\r\n // id = \"661537c19ac80d3d5d0a915a\";\r\n const response: any = await getV1FormBuilderFieldsId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response?.data.fields;\r\n },\r\n);\r\n"],"names":[],"mappings":";;;;AAOA,WAAW,GAAG,mBAAmB,iBAAiB;AAE3C,MAAM,oBAAoB;AAAA,EAE/B;AAAA,EACA,OAAO,EAAE,IAAI,WAAgB;AAC3B,UAAM,WAAW,MAAM,qBAAqB;AAAA,MAC1C,GAAG,SAAA;AAAA,MACH;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AACD,WAAO;AAAA,EACT;AACF;AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA,OAAO,OAAe;AACpB,UAAM,WAAW,MAAM,mBAAmB;AAAA,MACxC,GAAG,SAAA;AAAA,MACH;AAAA,IAAA,CACD;AACD,WAAO;AAAA,EACT;AACF;AAIO,MAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA,OAAO,EAAE,GAAA,MAA0C;AAEjD,UAAM,WAAgB,MAAM,yBAAyB;AAAA,MACnD,GAAG,SAAA;AAAA,MACH;AAAA,IAAA,CACD;AACD,WAAO,qCAAU,KAAK;AAAA,EACxB;AACF;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/views/form-builder/redux/actionCreator.ts"],"sourcesContent":["import { getV1FormBuilderFieldsId, getV1FormBuilderId, patchV1FormBuilderId, setBaseUrl } from \"@/api-client/api.system-feature/api\";\r\nimport { GetV1FormBuilderFieldsIdRequest } from \"@/api-client/api.system-feature/api-types\";\r\nimport { getToken } from \"@/utils\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\n\r\nsetBaseUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/system-feature`);\r\n\r\nexport const patchFormDataById = createAsyncThunk(\r\n\r\n \"formBuilder/put\",\r\n async ({ id, data }: any) => {\r\n const response = await patchV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n ...data,\r\n });\r\n return response;\r\n },\r\n);\r\n\r\nexport const getFormDataById = createAsyncThunk(\r\n \"formBuilder/getById\",\r\n async (id: string) => {\r\n const response = await getV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response;\r\n }\r\n);\r\n\r\n\r\n\r\nexport const getFieldsByFormId = createAsyncThunk(\r\n \"formBuilder/fields/get\",\r\n async ({ id }: GetV1FormBuilderFieldsIdRequest) => {\r\n // id = \"661537c19ac80d3d5d0a915a\";\r\n const response: any = await getV1FormBuilderFieldsId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response?.data.fields;\r\n },\r\n);\r\n"],"names":[],"mappings":";;;AAKA,WAAW,GAAG,4BAAqC,iBAAiB;AAE7D,MAAM,oBAAoB;AAAA,EAE/B;AAAA,EACA,OAAO,EAAE,IAAI,WAAgB;AAC3B,UAAM,WAAW,MAAM,qBAAqB;AAAA,MAC1C,GAAG,SAAA;AAAA,MACH;AAAA,MACA,GAAG;AAAA,IAAA,CACJ;AACD,WAAO;AAAA,EACT;AACF;AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA,OAAO,OAAe;AACpB,UAAM,WAAW,MAAM,mBAAmB;AAAA,MACxC,GAAG,SAAA;AAAA,MACH;AAAA,IAAA,CACD;AACD,WAAO;AAAA,EACT;AACF;AAIO,MAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA,OAAO,EAAE,GAAA,MAA0C;AAEjD,UAAM,WAAgB,MAAM,yBAAyB;AAAA,MACnD,GAAG,SAAA;AAAA,MACH;AAAA,IAAA,CACD;AACD,WAAO,qCAAU,KAAK;AAAA,EACxB;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../api-client/api.system-feature/api/index.js"),t=require("@reduxjs/toolkit"),r=require("../../../../config/index/index.js"),i=require("../../../../utils/common/index.js");e.setBaseUrl(`${r.getBackendBaseUrl()}/system-feature`);const d=t.createAsyncThunk("formBuilder/put",async({id:t,data:r})=>await e.patchV1FormBuilderId({...i.getToken(),id:t,...r})),a=t.createAsyncThunk("formBuilder/getById",async t=>await e.getV1FormBuilderId({...i.getToken(),id:t})),s=t.createAsyncThunk("formBuilder/fields/get",async({id:t})=>{const r=await e.getV1FormBuilderFieldsId({...i.getToken(),id:t});return null==r?void 0:r.data.fields});exports.getFieldsByFormId=s,exports.getFormDataById=a,exports.patchFormDataById=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../api-client/api.system-feature/api/index.js"),t=require("@reduxjs/toolkit"),r=require("../../../../utils/common/index.js");e.setBaseUrl("https://apidev.erpforce.co/system-feature");const i=t.createAsyncThunk("formBuilder/put",async({id:t,data:i})=>await e.patchV1FormBuilderId({...r.getToken(),id:t,...i})),a=t.createAsyncThunk("formBuilder/getById",async t=>await e.getV1FormBuilderId({...r.getToken(),id:t})),d=t.createAsyncThunk("formBuilder/fields/get",async({id:t})=>{const i=await e.getV1FormBuilderFieldsId({...r.getToken(),id:t});return null==i?void 0:i.data.fields});exports.getFieldsByFormId=d,exports.getFormDataById=a,exports.patchFormDataById=i;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/views/form-builder/redux/actionCreator.ts"],"sourcesContent":["import { getV1FormBuilderFieldsId, getV1FormBuilderId, patchV1FormBuilderId, setBaseUrl } from \"@/api-client/api.system-feature/api\";\r\nimport { GetV1FormBuilderFieldsIdRequest } from \"@/api-client/api.system-feature/api-types\";\r\nimport { getToken } from \"@/utils\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\n\r\nimport { getBackendBaseUrl } from '@/config';\r\n\r\nsetBaseUrl(`${getBackendBaseUrl()}/system-feature`);\r\n\r\nexport const patchFormDataById = createAsyncThunk(\r\n\r\n \"formBuilder/put\",\r\n async ({ id, data }: any) => {\r\n const response = await patchV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n ...data,\r\n });\r\n return response;\r\n },\r\n);\r\n\r\nexport const getFormDataById = createAsyncThunk(\r\n \"formBuilder/getById\",\r\n async (id: string) => {\r\n const response = await getV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response;\r\n }\r\n);\r\n\r\n\r\n\r\nexport const getFieldsByFormId = createAsyncThunk(\r\n \"formBuilder/fields/get\",\r\n async ({ id }: GetV1FormBuilderFieldsIdRequest) => {\r\n // id = \"661537c19ac80d3d5d0a915a\";\r\n const response: any = await getV1FormBuilderFieldsId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response?.data.fields;\r\n },\r\n);\r\n"],"names":["setBaseUrl","getBackendBaseUrl","patchFormDataById","createAsyncThunk","async","id","data","patchV1FormBuilderId","getToken","getFormDataById","getV1FormBuilderId","getFieldsByFormId","response","getV1FormBuilderFieldsId","fields"],"mappings":"wQAOAA,EAAAA,WAAW,GAAGC,EAAAA,sCAEP,MAAMC,EAAoBC,EAAAA,iBAE/B,kBACAC,OAASC,KAAIC,gBACYC,uBAAqB,IACvCC,aACHH,QACGC,KAMIG,EAAkBN,EAAAA,iBAC7B,sBACAC,MAAOC,SACkBK,qBAAmB,IACrCF,aACHH,QAQOM,EAAoBR,EAAAA,iBAC/B,yBACAC,OAASC,SAEP,MAAMO,QAAsBC,2BAAyB,IAChDL,aACHH,OAEF,aAAOO,WAAUN,KAAKQ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/views/form-builder/redux/actionCreator.ts"],"sourcesContent":["import { getV1FormBuilderFieldsId, getV1FormBuilderId, patchV1FormBuilderId, setBaseUrl } from \"@/api-client/api.system-feature/api\";\r\nimport { GetV1FormBuilderFieldsIdRequest } from \"@/api-client/api.system-feature/api-types\";\r\nimport { getToken } from \"@/utils\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\n\r\nsetBaseUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/system-feature`);\r\n\r\nexport const patchFormDataById = createAsyncThunk(\r\n\r\n \"formBuilder/put\",\r\n async ({ id, data }: any) => {\r\n const response = await patchV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n ...data,\r\n });\r\n return response;\r\n },\r\n);\r\n\r\nexport const getFormDataById = createAsyncThunk(\r\n \"formBuilder/getById\",\r\n async (id: string) => {\r\n const response = await getV1FormBuilderId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response;\r\n }\r\n);\r\n\r\n\r\n\r\nexport const getFieldsByFormId = createAsyncThunk(\r\n \"formBuilder/fields/get\",\r\n async ({ id }: GetV1FormBuilderFieldsIdRequest) => {\r\n // id = \"661537c19ac80d3d5d0a915a\";\r\n const response: any = await getV1FormBuilderFieldsId({\r\n ...getToken(),\r\n id: id,\r\n });\r\n return response?.data.fields;\r\n },\r\n);\r\n"],"names":["setBaseUrl","patchFormDataById","createAsyncThunk","async","id","data","patchV1FormBuilderId","getToken","getFormDataById","getV1FormBuilderId","getFieldsByFormId","response","getV1FormBuilderFieldsId","fields"],"mappings":"yNAKAA,EAAAA,WAAW,6CAEJ,MAAMC,EAAoBC,EAAAA,iBAE/B,kBACAC,OAASC,KAAIC,gBACYC,uBAAqB,IACvCC,aACHH,QACGC,KAMIG,EAAkBN,EAAAA,iBAC7B,sBACAC,MAAOC,SACkBK,qBAAmB,IACrCF,aACHH,QAQOM,EAAoBR,EAAAA,iBAC/B,yBACAC,OAASC,SAEP,MAAMO,QAAsBC,2BAAyB,IAChDL,aACHH,OAEF,aAAOO,WAAUN,KAAKQ"}
@@ -6,7 +6,6 @@ import default_1 from "../../../../node_modules/@mui/icons-material/ExpandMore/i
6
6
  import { postV1Drive, getV1Drive, setBaseUrl } from "../../../../api-client/api.drive/api/index.esm.js";
7
7
  import { SearchBar } from "../../../../components/search-bar/search-bar/index.esm.js";
8
8
  import { uploadFiles, getToken } from "../../../../utils/common/index.esm.js";
9
- import { getS3BucketUrl, getBackendBaseUrl } from "../../../../config/index/index.esm.js";
10
9
  import Box from "../../../../node_modules/@mui/material/Box/Box/index.esm.js";
11
10
  import Heading from "../../../../node_modules/lucide-react/dist/esm/icons/heading/index.esm.js";
12
11
  import Text from "../../../../node_modules/lucide-react/dist/esm/icons/text/index.esm.js";
@@ -27,7 +26,7 @@ import AccordionDetails from "../../../../node_modules/@mui/material/AccordionDe
27
26
  import ListItemIcon from "../../../../node_modules/@mui/material/ListItemIcon/ListItemIcon/index.esm.js";
28
27
  import ListItemText from "../../../../node_modules/@mui/material/ListItemText/ListItemText/index.esm.js";
29
28
  import ListItem from "../../../../node_modules/@mui/material/ListItem/ListItem/index.esm.js";
30
- setBaseUrl(`${getBackendBaseUrl()}/document`);
29
+ setBaseUrl(`${"https://apidev.erpforce.co"}/document`);
31
30
  const StyledListItem = styled(ListItem)(({ theme }) => ({
32
31
  padding: theme.spacing(1.5),
33
32
  cursor: "grab",
@@ -110,14 +109,14 @@ const EditorSidebar = () => {
110
109
  "file_extension": file == null ? void 0 : file.name.split(".")[1],
111
110
  "type": "image",
112
111
  "mime_type": file.type,
113
- "url": `${getS3BucketUrl()}${uFiles[0]}`
112
+ "url": `${"https://erpforce-dev.s3.eu-west-1.amazonaws.com/"}${uFiles[0]}`
114
113
  };
115
114
  await postV1Drive(payload);
116
115
  setUploadedImages((prev) => [
117
116
  ...prev,
118
117
  {
119
118
  id: `uploaded-image-${Date.now()}-${Math.random()}`,
120
- url: `${getS3BucketUrl()}${uFiles[0]}`,
119
+ url: `${"https://erpforce-dev.s3.eu-west-1.amazonaws.com/"}${uFiles[0]}`,
121
120
  // Assume API returns imageUrl
122
121
  name: file.name
123
122
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../../src/views/template-editor/components/EditorSidebar.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport React, { useState, useCallback, useEffect } from 'react';\r\nimport { useDraggable } from '@dnd-kit/core';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n Box,\r\n Divider,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Grid,\r\n Accordion,\r\n AccordionSummary,\r\n AccordionDetails,\r\n Typography,\r\n CircularProgress,\r\n Alert,\r\n} from '@mui/material';\r\nimport {\r\n Heading,\r\n Text as TextIcon,\r\n Image as ImageIcon,\r\n Table as TableIcon,\r\n Blocks as SignatureIcon,\r\n QrCode as QrCodeIcon,\r\n Barcode as BarcodeIcon,\r\n} from 'lucide-react';\r\nimport { styled } from '@mui/material/styles';\r\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\r\nimport { getV1Drive, postV1Drive, setBaseUrl as setDriveUrl } from '../../../api-client/api.drive/api';\r\nimport SearchBar from '../../../components/search-bar/search-bar';\r\nimport { getToken, uploadFiles } from '../../../utils/common';\r\n\r\nimport { getBackendBaseUrl, getS3BucketUrl } from '../../../config';\r\n\r\nsetDriveUrl(`${getBackendBaseUrl()}/document`);\r\n\r\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\r\n padding: theme.spacing(1.5),\r\n cursor: 'grab',\r\n borderRadius: theme.shape.borderRadius,\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n '&.dragging': {\r\n opacity: 0.5,\r\n },\r\n}));\r\n\r\nconst DropzoneBox = styled(Box)(({ theme }) => ({\r\n border: `2px dashed ${theme.palette.grey[400]}`,\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(2),\r\n textAlign: 'center',\r\n backgroundColor: theme.palette.grey[50],\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n}));\r\n\r\nconst SidebarItem = ({ id, icon, label, imageUrl }: { id: string; icon?: React.ReactElement; label: string; imageUrl?: string }) => {\r\n // Extract the element type from the sidebar item id\r\n const elementType = typeof id === 'string' ? id.replace('sidebar-', '') : id;\r\n \r\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\r\n id,\r\n data: {\r\n // Pass the correct type based on the id\r\n type: imageUrl ? 'image' : elementType,\r\n imageUrl,\r\n label,\r\n },\r\n });\r\n \r\n return (\r\n <StyledListItem\r\n ref={setNodeRef}\r\n {...listeners}\r\n {...attributes}\r\n className={isDragging ? 'dragging' : ''}\r\n sx={{ border: '1px solid', borderColor: 'grey.200', p: 0.75 }}\r\n >\r\n {imageUrl ? (\r\n <img\r\n src={imageUrl}\r\n alt={label}\r\n style={{ width: '100%', height: 140, objectFit: 'cover', marginRight: 8 }}\r\n />\r\n ) : (\r\n <>\r\n <ListItemIcon sx={{ minWidth: 40 }}>{icon}</ListItemIcon>\r\n <ListItemText primary={label} primaryTypographyProps={{ variant: 'body2' }} />\r\n </>\r\n )}\r\n </StyledListItem>\r\n );\r\n};\r\n\r\nconst EditorSidebar = () => {\r\n const [expanded, setExpanded] = useState('text');\r\n const [uploadedImages, setUploadedImages] = useState([]);\r\n const [uploading, setUploading] = useState(false);\r\n const [error, setError] = useState(null);\r\n\r\n const handleChange = (panel) => (event, isExpanded) => {\r\n setExpanded(isExpanded ? panel : false);\r\n };\r\n\r\n const onDrop = useCallback(async (acceptedFiles) => {\r\n setUploading(true);\r\n setError(null);\r\n try {\r\n for (const file of acceptedFiles) {\r\n const uFiles = await uploadFiles([file], \"document\");\r\n const token = getToken();\r\n const payload = {\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n \"title\": file?.name.split(\".\")[0],\r\n \"path\": \"/\",\r\n \"is_private\": true,\r\n \"is_directory\": false,\r\n \"file_size\": file.size,\r\n \"is_child\": false,\r\n \"file_extension\": file?.name.split(\".\")[1],\r\n \"type\": \"image\",\r\n \"mime_type\": file.type,\r\n \"url\": `${getS3BucketUrl()}${uFiles[0]}`\r\n }\r\n // Replace with your actual API endpoint\r\n await postV1Drive(payload);\r\n\r\n setUploadedImages((prev) => [\r\n ...prev,\r\n {\r\n id: `uploaded-image-${Date.now()}-${Math.random()}`,\r\n url: `${getS3BucketUrl()}${uFiles[0]}`, // Assume API returns imageUrl\r\n name: file.name,\r\n },\r\n ]);\r\n }\r\n } catch (err) {\r\n setError('Failed to upload image. Please try again.');\r\n } finally {\r\n setUploading(false);\r\n }\r\n }, []);\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop,\r\n accept: { 'image/*': ['.jpeg', '.png', '.jpg', '.gif'] },\r\n multiple: true,\r\n });\r\n\r\n const sections = [\r\n {\r\n id: 'text',\r\n icon: <TextIcon size={18} />,\r\n label: 'Text',\r\n content: (\r\n <Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 1 }}>\r\n <SidebarItem id=\"sidebar-heading\" icon={<Heading size={20} />} label=\"Heading 1\" />\r\n <SidebarItem id=\"sidebar-heading-2\" icon={<Heading size={18} />} label=\"Heading 2\" />\r\n <SidebarItem id=\"sidebar-heading-3\" icon={<Heading size={16} />} label=\"Heading 3\" />\r\n <SidebarItem id=\"sidebar-heading-4\" icon={<Heading size={14} />} label=\"Heading 4\" />\r\n <SidebarItem id=\"sidebar-text\" icon={<TextIcon size={20} />} label=\"Body\" />\r\n <SidebarItem id=\"sidebar-text-block\" icon={<TextIcon size={20} />} label=\"Text Block\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'images',\r\n icon: <ImageIcon size={18} />,\r\n label: 'Images',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <Box sx={{ mt: 2 }}>\r\n <DropzoneBox {...getRootProps()}>\r\n <input {...getInputProps()} />\r\n {isDragActive ? (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drop the images here...\r\n </Typography>\r\n ) : (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drag and drop images here, or click to select\r\n </Typography>\r\n )}\r\n {uploading && (\r\n <Box sx={{ mt: 1 }}>\r\n <CircularProgress size={20} />\r\n </Box>\r\n )}\r\n </DropzoneBox>\r\n {error && (\r\n <Alert severity=\"error\" sx={{ mt: 2 }}>\r\n {error}\r\n </Alert>\r\n )}\r\n {uploadedImages.length > 0 && (\r\n <Box sx={{ mt: 2 }}>\r\n <Typography variant=\"body2\" sx={{ mb: 1, color: 'grey.500' }}>\r\n Uploaded Images\r\n </Typography>\r\n <Grid container spacing={1}>\r\n {uploadedImages.map((image) => (\r\n <Grid item xs={6} key={image.id}>\r\n <SidebarItem\r\n id={image.id}\r\n label={image.name}\r\n imageUrl={image.url}\r\n />\r\n </Grid>\r\n ))}\r\n </Grid>\r\n </Box>\r\n )}\r\n </Box>\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'buttons',\r\n icon: (\r\n <Box\r\n sx={{\r\n width: 16,\r\n height: 16,\r\n bgcolor: 'grey.400',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '8px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n ),\r\n label: 'Buttons',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem\r\n id=\"sidebar-buttons\"\r\n icon={\r\n <Box\r\n sx={{\r\n width: 20,\r\n height: 20,\r\n bgcolor: 'success.main',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '10px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n }\r\n label=\"Buttons\"\r\n />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'divider',\r\n icon: <Divider sx={{ width: 18 }} />,\r\n label: 'Divider',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-divider\" icon={<Divider sx={{ width: 20 }} />} label=\"Divider\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'table',\r\n icon: <TableIcon size={18} />,\r\n label: 'Table',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-table\" icon={<TableIcon size={20} />} label=\"Table\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'signature',\r\n icon: <SignatureIcon size={18} />,\r\n label: 'Signature',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-signature\" icon={<SignatureIcon size={20} />} label=\"Signature\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'qr-code',\r\n icon: <QrCodeIcon size={18} />,\r\n label: 'QR Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-qr-code\" icon={<QrCodeIcon size={20} />} label=\"QR Code\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'bar-code',\r\n icon: <BarcodeIcon size={18} />,\r\n label: 'Bar Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-bar-code\" icon={<BarcodeIcon size={20} />} label=\"Bar Code\" />\r\n </Box>\r\n ),\r\n },\r\n ];\r\n\r\n const getDriveFiles = async () => {\r\n try {\r\n const token = getToken();\r\n const response = await getV1Drive({\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n skip: 0,\r\n limit: 10,\r\n filters: `(is_directory.eq=0)`\r\n });\r\n // Check if response is successful and has data\r\n if ('data' in response && response.data && typeof response.data === 'object' && 'drive' in response.data) {\r\n const files = (response.data as any).drive || [];\r\n setUploadedImages(files);\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n getDriveFiles()\r\n }, [])\r\n\r\n return (\r\n <Box\r\n sx={{\r\n bgcolor: 'background.paper',\r\n borderRight: 1,\r\n borderColor: 'grey.200',\r\n width: 390,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: 'calc(100vh - 104px)',\r\n boxShadow: '0 2px 8px rgba(0,0,0,0.05)',\r\n fontFamily: 'Inter, system-ui, Avenir, Helvetica, Arial, sans-serif',\r\n }}\r\n >\r\n <Box sx={{ p: 2, borderBottom: 1, borderColor: 'grey.200' }}>\r\n <SearchBar \r\n handleSearch={(key) => console.log('Search:', key)}\r\n sx={{ backgroundColor: \"#fff !important\", border: \"1px solid grey\" }}\r\n />\r\n </Box>\r\n <Box sx={{ flexGrow: 1, overflowY: 'auto', p: 1 }}>\r\n {sections.map((section) => (\r\n <Accordion\r\n key={section.id}\r\n expanded={expanded === section.id}\r\n onChange={handleChange(section.id)}\r\n sx={{\r\n border: 'none',\r\n boxShadow: 'none',\r\n backgroundColor: 'transparent',\r\n '&:before': { display: 'none' },\r\n marginBottom: 1,\r\n }}\r\n >\r\n <AccordionSummary\r\n expandIcon={<ExpandMoreIcon sx={{ color: 'grey.600' }} />}\r\n sx={{\r\n borderRadius: '8px',\r\n padding: '0 12px',\r\n backgroundColor: expanded === section.id ? 'grey.200' : 'grey.50',\r\n '&:hover': {\r\n backgroundColor: 'grey.50',\r\n },\r\n transition: 'background-color 0.2s ease',\r\n minHeight: 42,\r\n '& .MuiAccordionSummary-content': {\r\n alignItems: 'center',\r\n margin: '8px 0',\r\n },\r\n '&.Mui-expanded': {\r\n minHeight: 42,\r\n },\r\n }}\r\n >\r\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\r\n {section.icon}\r\n <Typography\r\n variant=\"body2\"\r\n sx={{ fontWeight: 500, color: 'text.primary' }}\r\n >\r\n {section.label}\r\n </Typography>\r\n </Box>\r\n </AccordionSummary>\r\n <AccordionDetails sx={{ padding: '8px 16px' }}>\r\n {section.content}\r\n </AccordionDetails>\r\n </Accordion>\r\n ))}\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport { EditorSidebar };\r\nexport default EditorSidebar;"],"names":["setDriveUrl","TextIcon","ImageIcon","TableIcon","SignatureIcon","QrCodeIcon","BarcodeIcon","error","ExpandMoreIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCAA,WAAY,GAAG,mBAAmB,WAAW;AAE7C,MAAM,iBAAiB,OAAO,QAAQ,EAAE,CAAC,EAAE,aAAa;AAAA,EACtD,SAAS,MAAM,QAAQ,GAAG;AAAA,EAC1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A,gBAAC;AAAA,gBAAA;AAAA,kBACC,YAAY,oBAACC,WAAA,EAAe,IAAI,EAAE,OAAO,cAAc;AAAA,kBACvD,IAAI;AAAA,oBACF,cAAc;AAAA,oBACd,SAAS;AAAA,oBACT,iBAAiB,aAAa,QAAQ,KAAK,aAAa;AAAA,oBACxD,WAAW;AAAA,sBACT,iBAAiB;AAAA,oBAAA;AAAA,oBAEnB,YAAY;AAAA,oBACZ,WAAW;AAAA,oBACX,kCAAkC;AAAA,sBAChC,YAAY;AAAA,sBACZ,QAAQ;AAAA,oBAAA;AAAA,oBAEV,kBAAkB;AAAA,sBAChB,WAAW;AAAA,oBAAA;AAAA,kBACb;AAAA,kBAGF,UAAA,qBAAC,KAAA,EAAI,IAAI,EAAE,SAAS,QAAQ,YAAY,UAAU,KAAK,EAAA,GACpD,UAAA;AAAA,oBAAA,QAAQ;AAAA,oBACT;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,IAAI,EAAE,YAAY,KAAK,OAAO,eAAA;AAAA,wBAE7B,UAAA,QAAQ;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACX,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEF,oBAAC,oBAAiB,IAAI,EAAE,SAAS,cAC9B,kBAAQ,QAAA,CACX;AAAA,YAAA;AAAA,UAAA;AAAA,UA3CK,QAAQ;AAAA,QAAA,CA6ChB,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/views/template-editor/components/EditorSidebar.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport React, { useState, useCallback, useEffect } from 'react';\r\nimport { useDraggable } from '@dnd-kit/core';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n Box,\r\n Divider,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Grid,\r\n Accordion,\r\n AccordionSummary,\r\n AccordionDetails,\r\n Typography,\r\n CircularProgress,\r\n Alert,\r\n} from '@mui/material';\r\nimport {\r\n Heading,\r\n Text as TextIcon,\r\n Image as ImageIcon,\r\n Table as TableIcon,\r\n Blocks as SignatureIcon,\r\n QrCode as QrCodeIcon,\r\n Barcode as BarcodeIcon,\r\n} from 'lucide-react';\r\nimport { styled } from '@mui/material/styles';\r\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\r\nimport { getV1Drive, postV1Drive, setBaseUrl as setDriveUrl } from '../../../api-client/api.drive/api';\r\nimport SearchBar from '../../../components/search-bar/search-bar';\r\nimport { getToken, uploadFiles } from '../../../utils/common';\r\n\r\nsetDriveUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/document`);\r\n\r\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\r\n padding: theme.spacing(1.5),\r\n cursor: 'grab',\r\n borderRadius: theme.shape.borderRadius,\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n '&.dragging': {\r\n opacity: 0.5,\r\n },\r\n}));\r\n\r\nconst DropzoneBox = styled(Box)(({ theme }) => ({\r\n border: `2px dashed ${theme.palette.grey[400]}`,\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(2),\r\n textAlign: 'center',\r\n backgroundColor: theme.palette.grey[50],\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n}));\r\n\r\nconst SidebarItem = ({ id, icon, label, imageUrl }: { id: string; icon?: React.ReactElement; label: string; imageUrl?: string }) => {\r\n // Extract the element type from the sidebar item id\r\n const elementType = typeof id === 'string' ? id.replace('sidebar-', '') : id;\r\n \r\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\r\n id,\r\n data: {\r\n // Pass the correct type based on the id\r\n type: imageUrl ? 'image' : elementType,\r\n imageUrl,\r\n label,\r\n },\r\n });\r\n \r\n return (\r\n <StyledListItem\r\n ref={setNodeRef}\r\n {...listeners}\r\n {...attributes}\r\n className={isDragging ? 'dragging' : ''}\r\n sx={{ border: '1px solid', borderColor: 'grey.200', p: 0.75 }}\r\n >\r\n {imageUrl ? (\r\n <img\r\n src={imageUrl}\r\n alt={label}\r\n style={{ width: '100%', height: 140, objectFit: 'cover', marginRight: 8 }}\r\n />\r\n ) : (\r\n <>\r\n <ListItemIcon sx={{ minWidth: 40 }}>{icon}</ListItemIcon>\r\n <ListItemText primary={label} primaryTypographyProps={{ variant: 'body2' }} />\r\n </>\r\n )}\r\n </StyledListItem>\r\n );\r\n};\r\n\r\nconst EditorSidebar = () => {\r\n const [expanded, setExpanded] = useState('text');\r\n const [uploadedImages, setUploadedImages] = useState([]);\r\n const [uploading, setUploading] = useState(false);\r\n const [error, setError] = useState(null);\r\n\r\n const handleChange = (panel) => (event, isExpanded) => {\r\n setExpanded(isExpanded ? panel : false);\r\n };\r\n\r\n const onDrop = useCallback(async (acceptedFiles) => {\r\n setUploading(true);\r\n setError(null);\r\n try {\r\n for (const file of acceptedFiles) {\r\n const uFiles = await uploadFiles([file], \"document\");\r\n const token = getToken();\r\n const payload = {\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n \"title\": file?.name.split(\".\")[0],\r\n \"path\": \"/\",\r\n \"is_private\": true,\r\n \"is_directory\": false,\r\n \"file_size\": file.size,\r\n \"is_child\": false,\r\n \"file_extension\": file?.name.split(\".\")[1],\r\n \"type\": \"image\",\r\n \"mime_type\": file.type,\r\n \"url\": `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\r\n }\r\n // Replace with your actual API endpoint\r\n await postV1Drive(payload);\r\n\r\n setUploadedImages((prev) => [\r\n ...prev,\r\n {\r\n id: `uploaded-image-${Date.now()}-${Math.random()}`,\r\n url: `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`, // Assume API returns imageUrl\r\n name: file.name,\r\n },\r\n ]);\r\n }\r\n } catch (err) {\r\n setError('Failed to upload image. Please try again.');\r\n } finally {\r\n setUploading(false);\r\n }\r\n }, []);\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop,\r\n accept: { 'image/*': ['.jpeg', '.png', '.jpg', '.gif'] },\r\n multiple: true,\r\n });\r\n\r\n const sections = [\r\n {\r\n id: 'text',\r\n icon: <TextIcon size={18} />,\r\n label: 'Text',\r\n content: (\r\n <Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 1 }}>\r\n <SidebarItem id=\"sidebar-heading\" icon={<Heading size={20} />} label=\"Heading 1\" />\r\n <SidebarItem id=\"sidebar-heading-2\" icon={<Heading size={18} />} label=\"Heading 2\" />\r\n <SidebarItem id=\"sidebar-heading-3\" icon={<Heading size={16} />} label=\"Heading 3\" />\r\n <SidebarItem id=\"sidebar-heading-4\" icon={<Heading size={14} />} label=\"Heading 4\" />\r\n <SidebarItem id=\"sidebar-text\" icon={<TextIcon size={20} />} label=\"Body\" />\r\n <SidebarItem id=\"sidebar-text-block\" icon={<TextIcon size={20} />} label=\"Text Block\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'images',\r\n icon: <ImageIcon size={18} />,\r\n label: 'Images',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <Box sx={{ mt: 2 }}>\r\n <DropzoneBox {...getRootProps()}>\r\n <input {...getInputProps()} />\r\n {isDragActive ? (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drop the images here...\r\n </Typography>\r\n ) : (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drag and drop images here, or click to select\r\n </Typography>\r\n )}\r\n {uploading && (\r\n <Box sx={{ mt: 1 }}>\r\n <CircularProgress size={20} />\r\n </Box>\r\n )}\r\n </DropzoneBox>\r\n {error && (\r\n <Alert severity=\"error\" sx={{ mt: 2 }}>\r\n {error}\r\n </Alert>\r\n )}\r\n {uploadedImages.length > 0 && (\r\n <Box sx={{ mt: 2 }}>\r\n <Typography variant=\"body2\" sx={{ mb: 1, color: 'grey.500' }}>\r\n Uploaded Images\r\n </Typography>\r\n <Grid container spacing={1}>\r\n {uploadedImages.map((image) => (\r\n <Grid item xs={6} key={image.id}>\r\n <SidebarItem\r\n id={image.id}\r\n label={image.name}\r\n imageUrl={image.url}\r\n />\r\n </Grid>\r\n ))}\r\n </Grid>\r\n </Box>\r\n )}\r\n </Box>\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'buttons',\r\n icon: (\r\n <Box\r\n sx={{\r\n width: 16,\r\n height: 16,\r\n bgcolor: 'grey.400',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '8px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n ),\r\n label: 'Buttons',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem\r\n id=\"sidebar-buttons\"\r\n icon={\r\n <Box\r\n sx={{\r\n width: 20,\r\n height: 20,\r\n bgcolor: 'success.main',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '10px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n }\r\n label=\"Buttons\"\r\n />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'divider',\r\n icon: <Divider sx={{ width: 18 }} />,\r\n label: 'Divider',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-divider\" icon={<Divider sx={{ width: 20 }} />} label=\"Divider\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'table',\r\n icon: <TableIcon size={18} />,\r\n label: 'Table',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-table\" icon={<TableIcon size={20} />} label=\"Table\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'signature',\r\n icon: <SignatureIcon size={18} />,\r\n label: 'Signature',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-signature\" icon={<SignatureIcon size={20} />} label=\"Signature\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'qr-code',\r\n icon: <QrCodeIcon size={18} />,\r\n label: 'QR Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-qr-code\" icon={<QrCodeIcon size={20} />} label=\"QR Code\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'bar-code',\r\n icon: <BarcodeIcon size={18} />,\r\n label: 'Bar Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-bar-code\" icon={<BarcodeIcon size={20} />} label=\"Bar Code\" />\r\n </Box>\r\n ),\r\n },\r\n ];\r\n\r\n const getDriveFiles = async () => {\r\n try {\r\n const token = getToken();\r\n const response = await getV1Drive({\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n skip: 0,\r\n limit: 10,\r\n filters: `(is_directory.eq=0)`\r\n });\r\n // Check if response is successful and has data\r\n if ('data' in response && response.data && typeof response.data === 'object' && 'drive' in response.data) {\r\n const files = (response.data as any).drive || [];\r\n setUploadedImages(files);\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n getDriveFiles()\r\n }, [])\r\n\r\n return (\r\n <Box\r\n sx={{\r\n bgcolor: 'background.paper',\r\n borderRight: 1,\r\n borderColor: 'grey.200',\r\n width: 390,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: 'calc(100vh - 104px)',\r\n boxShadow: '0 2px 8px rgba(0,0,0,0.05)',\r\n fontFamily: 'Inter, system-ui, Avenir, Helvetica, Arial, sans-serif',\r\n }}\r\n >\r\n <Box sx={{ p: 2, borderBottom: 1, borderColor: 'grey.200' }}>\r\n <SearchBar \r\n handleSearch={(key) => console.log('Search:', key)}\r\n sx={{ backgroundColor: \"#fff !important\", border: \"1px solid grey\" }}\r\n />\r\n </Box>\r\n <Box sx={{ flexGrow: 1, overflowY: 'auto', p: 1 }}>\r\n {sections.map((section) => (\r\n <Accordion\r\n key={section.id}\r\n expanded={expanded === section.id}\r\n onChange={handleChange(section.id)}\r\n sx={{\r\n border: 'none',\r\n boxShadow: 'none',\r\n backgroundColor: 'transparent',\r\n '&:before': { display: 'none' },\r\n marginBottom: 1,\r\n }}\r\n >\r\n <AccordionSummary\r\n expandIcon={<ExpandMoreIcon sx={{ color: 'grey.600' }} />}\r\n sx={{\r\n borderRadius: '8px',\r\n padding: '0 12px',\r\n backgroundColor: expanded === section.id ? 'grey.200' : 'grey.50',\r\n '&:hover': {\r\n backgroundColor: 'grey.50',\r\n },\r\n transition: 'background-color 0.2s ease',\r\n minHeight: 42,\r\n '& .MuiAccordionSummary-content': {\r\n alignItems: 'center',\r\n margin: '8px 0',\r\n },\r\n '&.Mui-expanded': {\r\n minHeight: 42,\r\n },\r\n }}\r\n >\r\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\r\n {section.icon}\r\n <Typography\r\n variant=\"body2\"\r\n sx={{ fontWeight: 500, color: 'text.primary' }}\r\n >\r\n {section.label}\r\n </Typography>\r\n </Box>\r\n </AccordionSummary>\r\n <AccordionDetails sx={{ padding: '8px 16px' }}>\r\n {section.content}\r\n </AccordionDetails>\r\n </Accordion>\r\n ))}\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport { EditorSidebar };\r\nexport default EditorSidebar;"],"names":["setDriveUrl","TextIcon","ImageIcon","TableIcon","SignatureIcon","QrCodeIcon","BarcodeIcon","error","ExpandMoreIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCAA,WAAY,GAAG,4BAAqC,WAAW;AAE/D,MAAM,iBAAiB,OAAO,QAAQ,EAAE,CAAC,EAAE,aAAa;AAAA,EACtD,SAAS,MAAM,QAAQ,GAAG;AAAA,EAC1B,QAAQ;AAAA,EACR,cAAc,MAAM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Aa,QAAQ,KAAK,aAAa;AAAA,oBACxD,WAAW;AAAA,sBACT,iBAAiB;AAAA,oBAAA;AAAA,oBAEnB,YAAY;AAAA,oBACZ,WAAW;AAAA,oBACX,kCAAkC;AAAA,sBAChC,YAAY;AAAA,sBACZ,QAAQ;AAAA,oBAAA;AAAA,oBAEV,kBAAkB;AAAA,sBAChB,WAAW;AAAA,oBAAA;AAAA,kBACb;AAAA,kBAGF,UAAA,qBAAC,KAAA,EAAI,IAAI,EAAE,SAAS,QAAQ,YAAY,UAAU,KAAK,EAAA,GACpD,UAAA;AAAA,oBAAA,QAAQ;AAAA,oBACT;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,IAAI,EAAE,YAAY,KAAK,OAAO,eAAA;AAAA,wBAE7B,UAAA,QAAQ;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACX,GACF;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEF,oBAAC,oBAAiB,IAAI,EAAE,SAAS,cAC9B,kBAAQ,QAAA,CACX;AAAA,YAAA;AAAA,UAAA;AAAA,UA3CK,QAAQ;AAAA,QAAA,CA6ChB,GACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,20 +1,20 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),r=require("../../../../node_modules/@dnd-kit/core/dist/core.esm/index.js"),d=require("react-dropzone"),t=require("../../../../node_modules/@mui/icons-material/ExpandMore/index.js"),a=require("../../../../api-client/api.drive/api/index.js"),s=require("../../../../components/search-bar/search-bar/index.js"),o=require("../../../../utils/common/index.js"),l=require("../../../../config/index/index.js"),n=require("../../../../node_modules/@mui/material/Box/Box/index.js"),c=require("../../../../node_modules/lucide-react/dist/esm/icons/heading/index.js"),u=require("../../../../node_modules/lucide-react/dist/esm/icons/text/index.js"),x=require("../../../../node_modules/@mui/material/styles/styled/index.js"),m=require("../../../../node_modules/@mui/material/Typography/Typography/index.js"),g=require("../../../../node_modules/@mui/material/CircularProgress/CircularProgress/index.js"),j=require("../../../../node_modules/@mui/material/Alert/Alert/index.js"),p=require("../../../../node_modules/@mui/material/Grid/Grid/index.js"),b=require("../../../../node_modules/lucide-react/dist/esm/icons/image/index.js"),f=require("../../../../node_modules/@mui/material/Divider/Divider/index.js"),h=require("../../../../node_modules/lucide-react/dist/esm/icons/table/index.js"),y=require("../../../../node_modules/lucide-react/dist/esm/icons/blocks/index.js"),q=require("../../../../node_modules/lucide-react/dist/esm/icons/qr-code/index.js"),v=require("../../../../node_modules/lucide-react/dist/esm/icons/barcode/index.js"),_=require("../../../../node_modules/@mui/material/Accordion/Accordion/index.js"),z=require("../../../../node_modules/@mui/material/AccordionSummary/AccordionSummary/index.js"),k=require("../../../../node_modules/@mui/material/AccordionDetails/AccordionDetails/index.js"),C=require("../../../../node_modules/@mui/material/ListItemIcon/ListItemIcon/index.js"),S=require("../../../../node_modules/@mui/material/ListItemText/ListItemText/index.js"),B=require("../../../../node_modules/@mui/material/ListItem/ListItem/index.js");a.setBaseUrl(`${l.getBackendBaseUrl()}/document`);const D=x.default(B.default)(({theme:e})=>({padding:e.spacing(1.5),cursor:"grab",borderRadius:e.shape.borderRadius,"&:hover":{backgroundColor:e.palette.grey[100]},"&.dragging":{opacity:.5}})),I=x.default(n.default)(({theme:e})=>({border:`2px dashed ${e.palette.grey[400]}`,borderRadius:e.shape.borderRadius,padding:e.spacing(2),textAlign:"center",backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),w=({id:i,icon:d,label:t,imageUrl:a})=>{const s="string"==typeof i?i.replace("sidebar-",""):i,{attributes:o,listeners:l,setNodeRef:n,isDragging:c}=r.useDraggable({id:i,data:{type:a?"image":s,imageUrl:a,label:t}});/* @__PURE__ */
2
- return e.jsx(D,{ref:n,...l,...o,className:c?"dragging":"",sx:{border:"1px solid",borderColor:"grey.200",p:.75},children:a?/* @__PURE__ */e.jsx("img",{src:a,alt:t,style:{width:"100%",height:140,objectFit:"cover",marginRight:8}}):/* @__PURE__ */e.jsxs(e.Fragment,{children:[
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),r=require("../../../../node_modules/@dnd-kit/core/dist/core.esm/index.js"),d=require("react-dropzone"),t=require("../../../../node_modules/@mui/icons-material/ExpandMore/index.js"),a=require("../../../../api-client/api.drive/api/index.js"),s=require("../../../../components/search-bar/search-bar/index.js"),o=require("../../../../utils/common/index.js"),l=require("../../../../node_modules/@mui/material/Box/Box/index.js"),n=require("../../../../node_modules/lucide-react/dist/esm/icons/heading/index.js"),c=require("../../../../node_modules/lucide-react/dist/esm/icons/text/index.js"),u=require("../../../../node_modules/@mui/material/styles/styled/index.js"),x=require("../../../../node_modules/@mui/material/Typography/Typography/index.js"),m=require("../../../../node_modules/@mui/material/CircularProgress/CircularProgress/index.js"),g=require("../../../../node_modules/@mui/material/Alert/Alert/index.js"),p=require("../../../../node_modules/@mui/material/Grid/Grid/index.js"),j=require("../../../../node_modules/lucide-react/dist/esm/icons/image/index.js"),b=require("../../../../node_modules/@mui/material/Divider/Divider/index.js"),f=require("../../../../node_modules/lucide-react/dist/esm/icons/table/index.js"),h=require("../../../../node_modules/lucide-react/dist/esm/icons/blocks/index.js"),y=require("../../../../node_modules/lucide-react/dist/esm/icons/qr-code/index.js"),v=require("../../../../node_modules/lucide-react/dist/esm/icons/barcode/index.js"),q=require("../../../../node_modules/@mui/material/Accordion/Accordion/index.js"),_=require("../../../../node_modules/@mui/material/AccordionSummary/AccordionSummary/index.js"),z=require("../../../../node_modules/@mui/material/AccordionDetails/AccordionDetails/index.js"),C=require("../../../../node_modules/@mui/material/ListItemIcon/ListItemIcon/index.js"),w=require("../../../../node_modules/@mui/material/ListItemText/ListItemText/index.js"),k=require("../../../../node_modules/@mui/material/ListItem/ListItem/index.js");a.setBaseUrl("https://apidev.erpforce.co/document");const S=u.default(k.default)(({theme:e})=>({padding:e.spacing(1.5),cursor:"grab",borderRadius:e.shape.borderRadius,"&:hover":{backgroundColor:e.palette.grey[100]},"&.dragging":{opacity:.5}})),D=u.default(l.default)(({theme:e})=>({border:`2px dashed ${e.palette.grey[400]}`,borderRadius:e.shape.borderRadius,padding:e.spacing(2),textAlign:"center",backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),I=({id:i,icon:d,label:t,imageUrl:a})=>{const s="string"==typeof i?i.replace("sidebar-",""):i,{attributes:o,listeners:l,setNodeRef:n,isDragging:c}=r.useDraggable({id:i,data:{type:a?"image":s,imageUrl:a,label:t}});/* @__PURE__ */
2
+ return e.jsx(S,{ref:n,...l,...o,className:c?"dragging":"",sx:{border:"1px solid",borderColor:"grey.200",p:.75},children:a?/* @__PURE__ */e.jsx("img",{src:a,alt:t,style:{width:"100%",height:140,objectFit:"cover",marginRight:8}}):/* @__PURE__ */e.jsxs(e.Fragment,{children:[
3
3
  /* @__PURE__ */e.jsx(C.default,{sx:{minWidth:40},children:d}),
4
- /* @__PURE__ */e.jsx(S.default,{primary:t,primaryTypographyProps:{variant:"body2"}})]})})},T=()=>{const[r,x]=i.useState("text"),[C,S]=i.useState([]),[B,D]=i.useState(!1),[T,A]=i.useState(null),R=i.useCallback(async e=>{D(!0),A(null);try{for(const i of e){const e=await o.uploadFiles([i],"document"),r=o.getToken(),d={...r,"x-timezone":String(r["x-timezone"]||""),title:null==i?void 0:i.name.split(".")[0],path:"/",is_private:!0,is_directory:!1,file_size:i.size,is_child:!1,file_extension:null==i?void 0:i.name.split(".")[1],type:"image",mime_type:i.type,url:`${l.getS3BucketUrl()}${e[0]}`};await a.postV1Drive(d),S(r=>[...r,{id:`uploaded-image-${Date.now()}-${Math.random()}`,url:`${l.getS3BucketUrl()}${e[0]}`,name:i.name}])}}catch(i){A("Failed to upload image. Please try again.")}finally{D(!1)}},[]),{getRootProps:U,getInputProps:$,isDragActive:H}=d.useDropzone({onDrop:R,accept:{"image/*":[".jpeg",".png",".jpg",".gif"]},multiple:!0}),P=[{id:"text",icon:/* @__PURE__ */e.jsx(u.default,{size:18}),label:"Text",content:/* @__PURE__ */e.jsxs(n.default,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:1},children:[
5
- /* @__PURE__ */e.jsx(w,{id:"sidebar-heading",icon:/* @__PURE__ */e.jsx(c.default,{size:20}),label:"Heading 1"}),
6
- /* @__PURE__ */e.jsx(w,{id:"sidebar-heading-2",icon:/* @__PURE__ */e.jsx(c.default,{size:18}),label:"Heading 2"}),
7
- /* @__PURE__ */e.jsx(w,{id:"sidebar-heading-3",icon:/* @__PURE__ */e.jsx(c.default,{size:16}),label:"Heading 3"}),
8
- /* @__PURE__ */e.jsx(w,{id:"sidebar-heading-4",icon:/* @__PURE__ */e.jsx(c.default,{size:14}),label:"Heading 4"}),
9
- /* @__PURE__ */e.jsx(w,{id:"sidebar-text",icon:/* @__PURE__ */e.jsx(u.default,{size:20}),label:"Body"}),
10
- /* @__PURE__ */e.jsx(w,{id:"sidebar-text-block",icon:/* @__PURE__ */e.jsx(u.default,{size:20}),label:"Text Block"})]})},{id:"images",icon:/* @__PURE__ */e.jsx(b.default,{size:18}),label:"Images",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsxs(n.default,{sx:{mt:2},children:[
11
- /* @__PURE__ */e.jsxs(I,{...U(),children:[
12
- /* @__PURE__ */e.jsx("input",{...$()}),H?/* @__PURE__ */e.jsx(m.default,{variant:"body2",color:"text.secondary",children:"Drop the images here..."}):/* @__PURE__ */e.jsx(m.default,{variant:"body2",color:"text.secondary",children:"Drag and drop images here, or click to select"}),B&&/* @__PURE__ */e.jsx(n.default,{sx:{mt:1},children:/* @__PURE__ */e.jsx(g.default,{size:20})})]}),T&&/* @__PURE__ */e.jsx(j.default,{severity:"error",sx:{mt:2},children:T}),C.length>0&&/* @__PURE__ */e.jsxs(n.default,{sx:{mt:2},children:[
13
- /* @__PURE__ */e.jsx(m.default,{variant:"body2",sx:{mb:1,color:"grey.500"},children:"Uploaded Images"}),
14
- /* @__PURE__ */e.jsx(p.default,{container:!0,spacing:1,children:C.map(i=>/* @__PURE__ */e.jsx(p.default,{item:!0,xs:6,children:/* @__PURE__ */e.jsx(w,{id:i.id,label:i.name,imageUrl:i.url})},i.id))})]})]})})},{id:"buttons",icon:/* @__PURE__ */e.jsx(n.default,{sx:{width:16,height:16,bgcolor:"grey.400",borderRadius:1,color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"8px"},children:"BTN"}),label:"Buttons",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-buttons",icon:/* @__PURE__ */e.jsx(n.default,{sx:{width:20,height:20,bgcolor:"success.main",borderRadius:1,color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:"BTN"}),label:"Buttons"})})},{id:"divider",icon:/* @__PURE__ */e.jsx(f.default,{sx:{width:18}}),label:"Divider",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-divider",icon:/* @__PURE__ */e.jsx(f.default,{sx:{width:20}}),label:"Divider"})})},{id:"table",icon:/* @__PURE__ */e.jsx(h.default,{size:18}),label:"Table",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-table",icon:/* @__PURE__ */e.jsx(h.default,{size:20}),label:"Table"})})},{id:"signature",icon:/* @__PURE__ */e.jsx(y.default,{size:18}),label:"Signature",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-signature",icon:/* @__PURE__ */e.jsx(y.default,{size:20}),label:"Signature"})})},{id:"qr-code",icon:/* @__PURE__ */e.jsx(q.default,{size:18}),label:"QR Code",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-qr-code",icon:/* @__PURE__ */e.jsx(q.default,{size:20}),label:"QR Code"})})},{id:"bar-code",icon:/* @__PURE__ */e.jsx(v.default,{size:18}),label:"Bar Code",content:/* @__PURE__ */e.jsx(n.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(w,{id:"sidebar-bar-code",icon:/* @__PURE__ */e.jsx(v.default,{size:20}),label:"Bar Code"})})}];return i.useEffect(()=>{(async()=>{try{const e=o.getToken(),i=await a.getV1Drive({...e,"x-timezone":String(e["x-timezone"]||""),skip:0,limit:10,filters:"(is_directory.eq=0)"});if("data"in i&&i.data&&"object"==typeof i.data&&"drive"in i.data){const e=i.data.drive||[];S(e)}}catch(e){}})()},[]),/* @__PURE__ */e.jsxs(n.default,{sx:{bgcolor:"background.paper",borderRight:1,borderColor:"grey.200",width:390,display:"flex",flexDirection:"column",height:"calc(100vh - 104px)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)",fontFamily:"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif"},children:[
15
- /* @__PURE__ */e.jsx(n.default,{sx:{p:2,borderBottom:1,borderColor:"grey.200"},children:/* @__PURE__ */e.jsx(s.SearchBar,{handleSearch:e=>{},sx:{backgroundColor:"#fff !important",border:"1px solid grey"}})}),
16
- /* @__PURE__ */e.jsx(n.default,{sx:{flexGrow:1,overflowY:"auto",p:1},children:P.map(i=>{/* @__PURE__ */return e.jsxs(_.default,{expanded:r===i.id,onChange:(d=i.id,(e,i)=>{x(!!i&&d)}),sx:{border:"none",boxShadow:"none",backgroundColor:"transparent","&:before":{display:"none"},marginBottom:1},children:[
17
- /* @__PURE__ */e.jsx(z.default,{expandIcon:/* @__PURE__ */e.jsx(t.default,{sx:{color:"grey.600"}}),sx:{borderRadius:"8px",padding:"0 12px",backgroundColor:r===i.id?"grey.200":"grey.50","&:hover":{backgroundColor:"grey.50"},transition:"background-color 0.2s ease",minHeight:42,"& .MuiAccordionSummary-content":{alignItems:"center",margin:"8px 0"},"&.Mui-expanded":{minHeight:42}},children:/* @__PURE__ */e.jsxs(n.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.icon,
18
- /* @__PURE__ */e.jsx(m.default,{variant:"body2",sx:{fontWeight:500,color:"text.primary"},children:i.label})]})}),
19
- /* @__PURE__ */e.jsx(k.default,{sx:{padding:"8px 16px"},children:i.content})]},i.id);var d})})]})};exports.EditorSidebar=T,exports.default=T;
4
+ /* @__PURE__ */e.jsx(w.default,{primary:t,primaryTypographyProps:{variant:"body2"}})]})})},B=()=>{const[r,u]=i.useState("text"),[C,w]=i.useState([]),[k,S]=i.useState(!1),[B,T]=i.useState(null),A=i.useCallback(async e=>{S(!0),T(null);try{for(const i of e){const e=await o.uploadFiles([i],"document"),r=o.getToken(),d={...r,"x-timezone":String(r["x-timezone"]||""),title:null==i?void 0:i.name.split(".")[0],path:"/",is_private:!0,is_directory:!1,file_size:i.size,is_child:!1,file_extension:null==i?void 0:i.name.split(".")[1],type:"image",mime_type:i.type,url:`https://erpforce-dev.s3.eu-west-1.amazonaws.com/${e[0]}`};await a.postV1Drive(d),w(r=>[...r,{id:`uploaded-image-${Date.now()}-${Math.random()}`,url:`https://erpforce-dev.s3.eu-west-1.amazonaws.com/${e[0]}`,name:i.name}])}}catch(i){T("Failed to upload image. Please try again.")}finally{S(!1)}},[]),{getRootProps:R,getInputProps:H,isDragActive:P}=d.useDropzone({onDrop:A,accept:{"image/*":[".jpeg",".png",".jpg",".gif"]},multiple:!0}),L=[{id:"text",icon:/* @__PURE__ */e.jsx(c.default,{size:18}),label:"Text",content:/* @__PURE__ */e.jsxs(l.default,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:1},children:[
5
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-heading",icon:/* @__PURE__ */e.jsx(n.default,{size:20}),label:"Heading 1"}),
6
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-heading-2",icon:/* @__PURE__ */e.jsx(n.default,{size:18}),label:"Heading 2"}),
7
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-heading-3",icon:/* @__PURE__ */e.jsx(n.default,{size:16}),label:"Heading 3"}),
8
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-heading-4",icon:/* @__PURE__ */e.jsx(n.default,{size:14}),label:"Heading 4"}),
9
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-text",icon:/* @__PURE__ */e.jsx(c.default,{size:20}),label:"Body"}),
10
+ /* @__PURE__ */e.jsx(I,{id:"sidebar-text-block",icon:/* @__PURE__ */e.jsx(c.default,{size:20}),label:"Text Block"})]})},{id:"images",icon:/* @__PURE__ */e.jsx(j.default,{size:18}),label:"Images",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsxs(l.default,{sx:{mt:2},children:[
11
+ /* @__PURE__ */e.jsxs(D,{...R(),children:[
12
+ /* @__PURE__ */e.jsx("input",{...H()}),P?/* @__PURE__ */e.jsx(x.default,{variant:"body2",color:"text.secondary",children:"Drop the images here..."}):/* @__PURE__ */e.jsx(x.default,{variant:"body2",color:"text.secondary",children:"Drag and drop images here, or click to select"}),k&&/* @__PURE__ */e.jsx(l.default,{sx:{mt:1},children:/* @__PURE__ */e.jsx(m.default,{size:20})})]}),B&&/* @__PURE__ */e.jsx(g.default,{severity:"error",sx:{mt:2},children:B}),C.length>0&&/* @__PURE__ */e.jsxs(l.default,{sx:{mt:2},children:[
13
+ /* @__PURE__ */e.jsx(x.default,{variant:"body2",sx:{mb:1,color:"grey.500"},children:"Uploaded Images"}),
14
+ /* @__PURE__ */e.jsx(p.default,{container:!0,spacing:1,children:C.map(i=>/* @__PURE__ */e.jsx(p.default,{item:!0,xs:6,children:/* @__PURE__ */e.jsx(I,{id:i.id,label:i.name,imageUrl:i.url})},i.id))})]})]})})},{id:"buttons",icon:/* @__PURE__ */e.jsx(l.default,{sx:{width:16,height:16,bgcolor:"grey.400",borderRadius:1,color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"8px"},children:"BTN"}),label:"Buttons",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-buttons",icon:/* @__PURE__ */e.jsx(l.default,{sx:{width:20,height:20,bgcolor:"success.main",borderRadius:1,color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:"BTN"}),label:"Buttons"})})},{id:"divider",icon:/* @__PURE__ */e.jsx(b.default,{sx:{width:18}}),label:"Divider",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-divider",icon:/* @__PURE__ */e.jsx(b.default,{sx:{width:20}}),label:"Divider"})})},{id:"table",icon:/* @__PURE__ */e.jsx(f.default,{size:18}),label:"Table",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-table",icon:/* @__PURE__ */e.jsx(f.default,{size:20}),label:"Table"})})},{id:"signature",icon:/* @__PURE__ */e.jsx(h.default,{size:18}),label:"Signature",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-signature",icon:/* @__PURE__ */e.jsx(h.default,{size:20}),label:"Signature"})})},{id:"qr-code",icon:/* @__PURE__ */e.jsx(y.default,{size:18}),label:"QR Code",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-qr-code",icon:/* @__PURE__ */e.jsx(y.default,{size:20}),label:"QR Code"})})},{id:"bar-code",icon:/* @__PURE__ */e.jsx(v.default,{size:18}),label:"Bar Code",content:/* @__PURE__ */e.jsx(l.default,{sx:{mt:2},children:/* @__PURE__ */e.jsx(I,{id:"sidebar-bar-code",icon:/* @__PURE__ */e.jsx(v.default,{size:20}),label:"Bar Code"})})}];return i.useEffect(()=>{(async()=>{try{const e=o.getToken(),i=await a.getV1Drive({...e,"x-timezone":String(e["x-timezone"]||""),skip:0,limit:10,filters:"(is_directory.eq=0)"});if("data"in i&&i.data&&"object"==typeof i.data&&"drive"in i.data){const e=i.data.drive||[];w(e)}}catch(e){}})()},[]),/* @__PURE__ */e.jsxs(l.default,{sx:{bgcolor:"background.paper",borderRight:1,borderColor:"grey.200",width:390,display:"flex",flexDirection:"column",height:"calc(100vh - 104px)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)",fontFamily:"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif"},children:[
15
+ /* @__PURE__ */e.jsx(l.default,{sx:{p:2,borderBottom:1,borderColor:"grey.200"},children:/* @__PURE__ */e.jsx(s.SearchBar,{handleSearch:e=>{},sx:{backgroundColor:"#fff !important",border:"1px solid grey"}})}),
16
+ /* @__PURE__ */e.jsx(l.default,{sx:{flexGrow:1,overflowY:"auto",p:1},children:L.map(i=>{/* @__PURE__ */return e.jsxs(q.default,{expanded:r===i.id,onChange:(d=i.id,(e,i)=>{u(!!i&&d)}),sx:{border:"none",boxShadow:"none",backgroundColor:"transparent","&:before":{display:"none"},marginBottom:1},children:[
17
+ /* @__PURE__ */e.jsx(_.default,{expandIcon:/* @__PURE__ */e.jsx(t.default,{sx:{color:"grey.600"}}),sx:{borderRadius:"8px",padding:"0 12px",backgroundColor:r===i.id?"grey.200":"grey.50","&:hover":{backgroundColor:"grey.50"},transition:"background-color 0.2s ease",minHeight:42,"& .MuiAccordionSummary-content":{alignItems:"center",margin:"8px 0"},"&.Mui-expanded":{minHeight:42}},children:/* @__PURE__ */e.jsxs(l.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.icon,
18
+ /* @__PURE__ */e.jsx(x.default,{variant:"body2",sx:{fontWeight:500,color:"text.primary"},children:i.label})]})}),
19
+ /* @__PURE__ */e.jsx(z.default,{sx:{padding:"8px 16px"},children:i.content})]},i.id);var d})})]})};exports.EditorSidebar=B,exports.default=B;
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/views/template-editor/components/EditorSidebar.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport React, { useState, useCallback, useEffect } from 'react';\r\nimport { useDraggable } from '@dnd-kit/core';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n Box,\r\n Divider,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Grid,\r\n Accordion,\r\n AccordionSummary,\r\n AccordionDetails,\r\n Typography,\r\n CircularProgress,\r\n Alert,\r\n} from '@mui/material';\r\nimport {\r\n Heading,\r\n Text as TextIcon,\r\n Image as ImageIcon,\r\n Table as TableIcon,\r\n Blocks as SignatureIcon,\r\n QrCode as QrCodeIcon,\r\n Barcode as BarcodeIcon,\r\n} from 'lucide-react';\r\nimport { styled } from '@mui/material/styles';\r\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\r\nimport { getV1Drive, postV1Drive, setBaseUrl as setDriveUrl } from '../../../api-client/api.drive/api';\r\nimport SearchBar from '../../../components/search-bar/search-bar';\r\nimport { getToken, uploadFiles } from '../../../utils/common';\r\n\r\nimport { getBackendBaseUrl, getS3BucketUrl } from '../../../config';\r\n\r\nsetDriveUrl(`${getBackendBaseUrl()}/document`);\r\n\r\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\r\n padding: theme.spacing(1.5),\r\n cursor: 'grab',\r\n borderRadius: theme.shape.borderRadius,\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n '&.dragging': {\r\n opacity: 0.5,\r\n },\r\n}));\r\n\r\nconst DropzoneBox = styled(Box)(({ theme }) => ({\r\n border: `2px dashed ${theme.palette.grey[400]}`,\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(2),\r\n textAlign: 'center',\r\n backgroundColor: theme.palette.grey[50],\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n}));\r\n\r\nconst SidebarItem = ({ id, icon, label, imageUrl }: { id: string; icon?: React.ReactElement; label: string; imageUrl?: string }) => {\r\n // Extract the element type from the sidebar item id\r\n const elementType = typeof id === 'string' ? id.replace('sidebar-', '') : id;\r\n \r\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\r\n id,\r\n data: {\r\n // Pass the correct type based on the id\r\n type: imageUrl ? 'image' : elementType,\r\n imageUrl,\r\n label,\r\n },\r\n });\r\n \r\n return (\r\n <StyledListItem\r\n ref={setNodeRef}\r\n {...listeners}\r\n {...attributes}\r\n className={isDragging ? 'dragging' : ''}\r\n sx={{ border: '1px solid', borderColor: 'grey.200', p: 0.75 }}\r\n >\r\n {imageUrl ? (\r\n <img\r\n src={imageUrl}\r\n alt={label}\r\n style={{ width: '100%', height: 140, objectFit: 'cover', marginRight: 8 }}\r\n />\r\n ) : (\r\n <>\r\n <ListItemIcon sx={{ minWidth: 40 }}>{icon}</ListItemIcon>\r\n <ListItemText primary={label} primaryTypographyProps={{ variant: 'body2' }} />\r\n </>\r\n )}\r\n </StyledListItem>\r\n );\r\n};\r\n\r\nconst EditorSidebar = () => {\r\n const [expanded, setExpanded] = useState('text');\r\n const [uploadedImages, setUploadedImages] = useState([]);\r\n const [uploading, setUploading] = useState(false);\r\n const [error, setError] = useState(null);\r\n\r\n const handleChange = (panel) => (event, isExpanded) => {\r\n setExpanded(isExpanded ? panel : false);\r\n };\r\n\r\n const onDrop = useCallback(async (acceptedFiles) => {\r\n setUploading(true);\r\n setError(null);\r\n try {\r\n for (const file of acceptedFiles) {\r\n const uFiles = await uploadFiles([file], \"document\");\r\n const token = getToken();\r\n const payload = {\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n \"title\": file?.name.split(\".\")[0],\r\n \"path\": \"/\",\r\n \"is_private\": true,\r\n \"is_directory\": false,\r\n \"file_size\": file.size,\r\n \"is_child\": false,\r\n \"file_extension\": file?.name.split(\".\")[1],\r\n \"type\": \"image\",\r\n \"mime_type\": file.type,\r\n \"url\": `${getS3BucketUrl()}${uFiles[0]}`\r\n }\r\n // Replace with your actual API endpoint\r\n await postV1Drive(payload);\r\n\r\n setUploadedImages((prev) => [\r\n ...prev,\r\n {\r\n id: `uploaded-image-${Date.now()}-${Math.random()}`,\r\n url: `${getS3BucketUrl()}${uFiles[0]}`, // Assume API returns imageUrl\r\n name: file.name,\r\n },\r\n ]);\r\n }\r\n } catch (err) {\r\n setError('Failed to upload image. Please try again.');\r\n } finally {\r\n setUploading(false);\r\n }\r\n }, []);\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop,\r\n accept: { 'image/*': ['.jpeg', '.png', '.jpg', '.gif'] },\r\n multiple: true,\r\n });\r\n\r\n const sections = [\r\n {\r\n id: 'text',\r\n icon: <TextIcon size={18} />,\r\n label: 'Text',\r\n content: (\r\n <Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 1 }}>\r\n <SidebarItem id=\"sidebar-heading\" icon={<Heading size={20} />} label=\"Heading 1\" />\r\n <SidebarItem id=\"sidebar-heading-2\" icon={<Heading size={18} />} label=\"Heading 2\" />\r\n <SidebarItem id=\"sidebar-heading-3\" icon={<Heading size={16} />} label=\"Heading 3\" />\r\n <SidebarItem id=\"sidebar-heading-4\" icon={<Heading size={14} />} label=\"Heading 4\" />\r\n <SidebarItem id=\"sidebar-text\" icon={<TextIcon size={20} />} label=\"Body\" />\r\n <SidebarItem id=\"sidebar-text-block\" icon={<TextIcon size={20} />} label=\"Text Block\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'images',\r\n icon: <ImageIcon size={18} />,\r\n label: 'Images',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <Box sx={{ mt: 2 }}>\r\n <DropzoneBox {...getRootProps()}>\r\n <input {...getInputProps()} />\r\n {isDragActive ? (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drop the images here...\r\n </Typography>\r\n ) : (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drag and drop images here, or click to select\r\n </Typography>\r\n )}\r\n {uploading && (\r\n <Box sx={{ mt: 1 }}>\r\n <CircularProgress size={20} />\r\n </Box>\r\n )}\r\n </DropzoneBox>\r\n {error && (\r\n <Alert severity=\"error\" sx={{ mt: 2 }}>\r\n {error}\r\n </Alert>\r\n )}\r\n {uploadedImages.length > 0 && (\r\n <Box sx={{ mt: 2 }}>\r\n <Typography variant=\"body2\" sx={{ mb: 1, color: 'grey.500' }}>\r\n Uploaded Images\r\n </Typography>\r\n <Grid container spacing={1}>\r\n {uploadedImages.map((image) => (\r\n <Grid item xs={6} key={image.id}>\r\n <SidebarItem\r\n id={image.id}\r\n label={image.name}\r\n imageUrl={image.url}\r\n />\r\n </Grid>\r\n ))}\r\n </Grid>\r\n </Box>\r\n )}\r\n </Box>\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'buttons',\r\n icon: (\r\n <Box\r\n sx={{\r\n width: 16,\r\n height: 16,\r\n bgcolor: 'grey.400',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '8px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n ),\r\n label: 'Buttons',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem\r\n id=\"sidebar-buttons\"\r\n icon={\r\n <Box\r\n sx={{\r\n width: 20,\r\n height: 20,\r\n bgcolor: 'success.main',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '10px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n }\r\n label=\"Buttons\"\r\n />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'divider',\r\n icon: <Divider sx={{ width: 18 }} />,\r\n label: 'Divider',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-divider\" icon={<Divider sx={{ width: 20 }} />} label=\"Divider\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'table',\r\n icon: <TableIcon size={18} />,\r\n label: 'Table',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-table\" icon={<TableIcon size={20} />} label=\"Table\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'signature',\r\n icon: <SignatureIcon size={18} />,\r\n label: 'Signature',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-signature\" icon={<SignatureIcon size={20} />} label=\"Signature\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'qr-code',\r\n icon: <QrCodeIcon size={18} />,\r\n label: 'QR Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-qr-code\" icon={<QrCodeIcon size={20} />} label=\"QR Code\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'bar-code',\r\n icon: <BarcodeIcon size={18} />,\r\n label: 'Bar Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-bar-code\" icon={<BarcodeIcon size={20} />} label=\"Bar Code\" />\r\n </Box>\r\n ),\r\n },\r\n ];\r\n\r\n const getDriveFiles = async () => {\r\n try {\r\n const token = getToken();\r\n const response = await getV1Drive({\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n skip: 0,\r\n limit: 10,\r\n filters: `(is_directory.eq=0)`\r\n });\r\n // Check if response is successful and has data\r\n if ('data' in response && response.data && typeof response.data === 'object' && 'drive' in response.data) {\r\n const files = (response.data as any).drive || [];\r\n setUploadedImages(files);\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n getDriveFiles()\r\n }, [])\r\n\r\n return (\r\n <Box\r\n sx={{\r\n bgcolor: 'background.paper',\r\n borderRight: 1,\r\n borderColor: 'grey.200',\r\n width: 390,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: 'calc(100vh - 104px)',\r\n boxShadow: '0 2px 8px rgba(0,0,0,0.05)',\r\n fontFamily: 'Inter, system-ui, Avenir, Helvetica, Arial, sans-serif',\r\n }}\r\n >\r\n <Box sx={{ p: 2, borderBottom: 1, borderColor: 'grey.200' }}>\r\n <SearchBar \r\n handleSearch={(key) => console.log('Search:', key)}\r\n sx={{ backgroundColor: \"#fff !important\", border: \"1px solid grey\" }}\r\n />\r\n </Box>\r\n <Box sx={{ flexGrow: 1, overflowY: 'auto', p: 1 }}>\r\n {sections.map((section) => (\r\n <Accordion\r\n key={section.id}\r\n expanded={expanded === section.id}\r\n onChange={handleChange(section.id)}\r\n sx={{\r\n border: 'none',\r\n boxShadow: 'none',\r\n backgroundColor: 'transparent',\r\n '&:before': { display: 'none' },\r\n marginBottom: 1,\r\n }}\r\n >\r\n <AccordionSummary\r\n expandIcon={<ExpandMoreIcon sx={{ color: 'grey.600' }} />}\r\n sx={{\r\n borderRadius: '8px',\r\n padding: '0 12px',\r\n backgroundColor: expanded === section.id ? 'grey.200' : 'grey.50',\r\n '&:hover': {\r\n backgroundColor: 'grey.50',\r\n },\r\n transition: 'background-color 0.2s ease',\r\n minHeight: 42,\r\n '& .MuiAccordionSummary-content': {\r\n alignItems: 'center',\r\n margin: '8px 0',\r\n },\r\n '&.Mui-expanded': {\r\n minHeight: 42,\r\n },\r\n }}\r\n >\r\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\r\n {section.icon}\r\n <Typography\r\n variant=\"body2\"\r\n sx={{ fontWeight: 500, color: 'text.primary' }}\r\n >\r\n {section.label}\r\n </Typography>\r\n </Box>\r\n </AccordionSummary>\r\n <AccordionDetails sx={{ padding: '8px 16px' }}>\r\n {section.content}\r\n </AccordionDetails>\r\n </Accordion>\r\n ))}\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport { EditorSidebar };\r\nexport default EditorSidebar;"],"names":["setDriveUrl","getBackendBaseUrl","StyledListItem","styled","ListItem","theme","padding","spacing","cursor","borderRadius","shape","backgroundColor","palette","grey","opacity","DropzoneBox","Box","border","textAlign","SidebarItem","id","icon","label","imageUrl","elementType","replace","attributes","listeners","setNodeRef","isDragging","useDraggable","data","type","jsx","ref","className","sx","borderColor","p","children","src","alt","style","width","height","objectFit","marginRight","jsxs","Fragment","ListItemIcon","minWidth","ListItemText","primary","primaryTypographyProps","variant","EditorSidebar","expanded","setExpanded","useState","uploadedImages","setUploadedImages","uploading","setUploading","error","setError","onDrop","useCallback","async","acceptedFiles","file","uFiles","uploadFiles","token","getToken","payload","String","title","name","split","path","is_private","is_directory","file_size","size","is_child","file_extension","mime_type","url","getS3BucketUrl","postV1Drive","prev","Date","now","Math","random","err","getRootProps","getInputProps","isDragActive","useDropzone","accept","multiple","sections","TextIcon","content","display","gridTemplateColumns","gap","Heading","ImageIcon","mt","Typography","color","CircularProgress","Alert","severity","length","mb","Grid","container","map","image","item","xs","bgcolor","alignItems","justifyContent","fontSize","Divider","TableIcon","SignatureIcon","QrCodeIcon","BarcodeIcon","useEffect","response","getV1Drive","skip","limit","filters","files","drive","getDriveFiles","borderRight","flexDirection","boxShadow","fontFamily","borderBottom","SearchBar","handleSearch","key","flexGrow","overflowY","section","Accordion","onChange","panel","event","isExpanded","marginBottom","AccordionSummary","expandIcon","ExpandMoreIcon","transition","minHeight","margin","fontWeight","AccordionDetails"],"mappings":"mnEAoCAA,EAAAA,WAAY,GAAGC,EAAAA,gCAEf,MAAMC,EAAiBC,EAAAA,QAAOC,EAAAA,QAAPD,CAAiB,EAAGE,aACzCC,QAASD,EAAME,QAAQ,KACvBC,OAAQ,OACRC,aAAcJ,EAAMK,MAAMD,aAC1B,UAAW,CACTE,gBAAiBN,EAAMO,QAAQC,KAAK,MAEtC,aAAc,CACZC,QAAS,OAIPC,EAAcZ,EAAAA,QAAOa,EAAAA,QAAPb,CAAY,EAAGE,aACjCY,OAAQ,cAAcZ,EAAMO,QAAQC,KAAK,OACzCJ,aAAcJ,EAAMK,MAAMD,aA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E9B,QAAS,YAC9BiC,WAAQiE,YA1CNgD,EAAQpI,IAtQF,IAACuI"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/views/template-editor/components/EditorSidebar.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport React, { useState, useCallback, useEffect } from 'react';\r\nimport { useDraggable } from '@dnd-kit/core';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n Box,\r\n Divider,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Grid,\r\n Accordion,\r\n AccordionSummary,\r\n AccordionDetails,\r\n Typography,\r\n CircularProgress,\r\n Alert,\r\n} from '@mui/material';\r\nimport {\r\n Heading,\r\n Text as TextIcon,\r\n Image as ImageIcon,\r\n Table as TableIcon,\r\n Blocks as SignatureIcon,\r\n QrCode as QrCodeIcon,\r\n Barcode as BarcodeIcon,\r\n} from 'lucide-react';\r\nimport { styled } from '@mui/material/styles';\r\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\r\nimport { getV1Drive, postV1Drive, setBaseUrl as setDriveUrl } from '../../../api-client/api.drive/api';\r\nimport SearchBar from '../../../components/search-bar/search-bar';\r\nimport { getToken, uploadFiles } from '../../../utils/common';\r\n\r\nsetDriveUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/document`);\r\n\r\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\r\n padding: theme.spacing(1.5),\r\n cursor: 'grab',\r\n borderRadius: theme.shape.borderRadius,\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n '&.dragging': {\r\n opacity: 0.5,\r\n },\r\n}));\r\n\r\nconst DropzoneBox = styled(Box)(({ theme }) => ({\r\n border: `2px dashed ${theme.palette.grey[400]}`,\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(2),\r\n textAlign: 'center',\r\n backgroundColor: theme.palette.grey[50],\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: theme.palette.grey[100],\r\n },\r\n}));\r\n\r\nconst SidebarItem = ({ id, icon, label, imageUrl }: { id: string; icon?: React.ReactElement; label: string; imageUrl?: string }) => {\r\n // Extract the element type from the sidebar item id\r\n const elementType = typeof id === 'string' ? id.replace('sidebar-', '') : id;\r\n \r\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\r\n id,\r\n data: {\r\n // Pass the correct type based on the id\r\n type: imageUrl ? 'image' : elementType,\r\n imageUrl,\r\n label,\r\n },\r\n });\r\n \r\n return (\r\n <StyledListItem\r\n ref={setNodeRef}\r\n {...listeners}\r\n {...attributes}\r\n className={isDragging ? 'dragging' : ''}\r\n sx={{ border: '1px solid', borderColor: 'grey.200', p: 0.75 }}\r\n >\r\n {imageUrl ? (\r\n <img\r\n src={imageUrl}\r\n alt={label}\r\n style={{ width: '100%', height: 140, objectFit: 'cover', marginRight: 8 }}\r\n />\r\n ) : (\r\n <>\r\n <ListItemIcon sx={{ minWidth: 40 }}>{icon}</ListItemIcon>\r\n <ListItemText primary={label} primaryTypographyProps={{ variant: 'body2' }} />\r\n </>\r\n )}\r\n </StyledListItem>\r\n );\r\n};\r\n\r\nconst EditorSidebar = () => {\r\n const [expanded, setExpanded] = useState('text');\r\n const [uploadedImages, setUploadedImages] = useState([]);\r\n const [uploading, setUploading] = useState(false);\r\n const [error, setError] = useState(null);\r\n\r\n const handleChange = (panel) => (event, isExpanded) => {\r\n setExpanded(isExpanded ? panel : false);\r\n };\r\n\r\n const onDrop = useCallback(async (acceptedFiles) => {\r\n setUploading(true);\r\n setError(null);\r\n try {\r\n for (const file of acceptedFiles) {\r\n const uFiles = await uploadFiles([file], \"document\");\r\n const token = getToken();\r\n const payload = {\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n \"title\": file?.name.split(\".\")[0],\r\n \"path\": \"/\",\r\n \"is_private\": true,\r\n \"is_directory\": false,\r\n \"file_size\": file.size,\r\n \"is_child\": false,\r\n \"file_extension\": file?.name.split(\".\")[1],\r\n \"type\": \"image\",\r\n \"mime_type\": file.type,\r\n \"url\": `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\r\n }\r\n // Replace with your actual API endpoint\r\n await postV1Drive(payload);\r\n\r\n setUploadedImages((prev) => [\r\n ...prev,\r\n {\r\n id: `uploaded-image-${Date.now()}-${Math.random()}`,\r\n url: `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`, // Assume API returns imageUrl\r\n name: file.name,\r\n },\r\n ]);\r\n }\r\n } catch (err) {\r\n setError('Failed to upload image. Please try again.');\r\n } finally {\r\n setUploading(false);\r\n }\r\n }, []);\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop,\r\n accept: { 'image/*': ['.jpeg', '.png', '.jpg', '.gif'] },\r\n multiple: true,\r\n });\r\n\r\n const sections = [\r\n {\r\n id: 'text',\r\n icon: <TextIcon size={18} />,\r\n label: 'Text',\r\n content: (\r\n <Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 1 }}>\r\n <SidebarItem id=\"sidebar-heading\" icon={<Heading size={20} />} label=\"Heading 1\" />\r\n <SidebarItem id=\"sidebar-heading-2\" icon={<Heading size={18} />} label=\"Heading 2\" />\r\n <SidebarItem id=\"sidebar-heading-3\" icon={<Heading size={16} />} label=\"Heading 3\" />\r\n <SidebarItem id=\"sidebar-heading-4\" icon={<Heading size={14} />} label=\"Heading 4\" />\r\n <SidebarItem id=\"sidebar-text\" icon={<TextIcon size={20} />} label=\"Body\" />\r\n <SidebarItem id=\"sidebar-text-block\" icon={<TextIcon size={20} />} label=\"Text Block\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'images',\r\n icon: <ImageIcon size={18} />,\r\n label: 'Images',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <Box sx={{ mt: 2 }}>\r\n <DropzoneBox {...getRootProps()}>\r\n <input {...getInputProps()} />\r\n {isDragActive ? (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drop the images here...\r\n </Typography>\r\n ) : (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n Drag and drop images here, or click to select\r\n </Typography>\r\n )}\r\n {uploading && (\r\n <Box sx={{ mt: 1 }}>\r\n <CircularProgress size={20} />\r\n </Box>\r\n )}\r\n </DropzoneBox>\r\n {error && (\r\n <Alert severity=\"error\" sx={{ mt: 2 }}>\r\n {error}\r\n </Alert>\r\n )}\r\n {uploadedImages.length > 0 && (\r\n <Box sx={{ mt: 2 }}>\r\n <Typography variant=\"body2\" sx={{ mb: 1, color: 'grey.500' }}>\r\n Uploaded Images\r\n </Typography>\r\n <Grid container spacing={1}>\r\n {uploadedImages.map((image) => (\r\n <Grid item xs={6} key={image.id}>\r\n <SidebarItem\r\n id={image.id}\r\n label={image.name}\r\n imageUrl={image.url}\r\n />\r\n </Grid>\r\n ))}\r\n </Grid>\r\n </Box>\r\n )}\r\n </Box>\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'buttons',\r\n icon: (\r\n <Box\r\n sx={{\r\n width: 16,\r\n height: 16,\r\n bgcolor: 'grey.400',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '8px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n ),\r\n label: 'Buttons',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem\r\n id=\"sidebar-buttons\"\r\n icon={\r\n <Box\r\n sx={{\r\n width: 20,\r\n height: 20,\r\n bgcolor: 'success.main',\r\n borderRadius: 1,\r\n color: 'white',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '10px',\r\n }}\r\n >\r\n BTN\r\n </Box>\r\n }\r\n label=\"Buttons\"\r\n />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'divider',\r\n icon: <Divider sx={{ width: 18 }} />,\r\n label: 'Divider',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-divider\" icon={<Divider sx={{ width: 20 }} />} label=\"Divider\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'table',\r\n icon: <TableIcon size={18} />,\r\n label: 'Table',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-table\" icon={<TableIcon size={20} />} label=\"Table\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'signature',\r\n icon: <SignatureIcon size={18} />,\r\n label: 'Signature',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-signature\" icon={<SignatureIcon size={20} />} label=\"Signature\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'qr-code',\r\n icon: <QrCodeIcon size={18} />,\r\n label: 'QR Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-qr-code\" icon={<QrCodeIcon size={20} />} label=\"QR Code\" />\r\n </Box>\r\n ),\r\n },\r\n {\r\n id: 'bar-code',\r\n icon: <BarcodeIcon size={18} />,\r\n label: 'Bar Code',\r\n content: (\r\n <Box sx={{ mt: 2 }}>\r\n <SidebarItem id=\"sidebar-bar-code\" icon={<BarcodeIcon size={20} />} label=\"Bar Code\" />\r\n </Box>\r\n ),\r\n },\r\n ];\r\n\r\n const getDriveFiles = async () => {\r\n try {\r\n const token = getToken();\r\n const response = await getV1Drive({\r\n ...token,\r\n \"x-timezone\": String(token[\"x-timezone\"] || \"\"),\r\n skip: 0,\r\n limit: 10,\r\n filters: `(is_directory.eq=0)`\r\n });\r\n // Check if response is successful and has data\r\n if ('data' in response && response.data && typeof response.data === 'object' && 'drive' in response.data) {\r\n const files = (response.data as any).drive || [];\r\n setUploadedImages(files);\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n getDriveFiles()\r\n }, [])\r\n\r\n return (\r\n <Box\r\n sx={{\r\n bgcolor: 'background.paper',\r\n borderRight: 1,\r\n borderColor: 'grey.200',\r\n width: 390,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: 'calc(100vh - 104px)',\r\n boxShadow: '0 2px 8px rgba(0,0,0,0.05)',\r\n fontFamily: 'Inter, system-ui, Avenir, Helvetica, Arial, sans-serif',\r\n }}\r\n >\r\n <Box sx={{ p: 2, borderBottom: 1, borderColor: 'grey.200' }}>\r\n <SearchBar \r\n handleSearch={(key) => console.log('Search:', key)}\r\n sx={{ backgroundColor: \"#fff !important\", border: \"1px solid grey\" }}\r\n />\r\n </Box>\r\n <Box sx={{ flexGrow: 1, overflowY: 'auto', p: 1 }}>\r\n {sections.map((section) => (\r\n <Accordion\r\n key={section.id}\r\n expanded={expanded === section.id}\r\n onChange={handleChange(section.id)}\r\n sx={{\r\n border: 'none',\r\n boxShadow: 'none',\r\n backgroundColor: 'transparent',\r\n '&:before': { display: 'none' },\r\n marginBottom: 1,\r\n }}\r\n >\r\n <AccordionSummary\r\n expandIcon={<ExpandMoreIcon sx={{ color: 'grey.600' }} />}\r\n sx={{\r\n borderRadius: '8px',\r\n padding: '0 12px',\r\n backgroundColor: expanded === section.id ? 'grey.200' : 'grey.50',\r\n '&:hover': {\r\n backgroundColor: 'grey.50',\r\n },\r\n transition: 'background-color 0.2s ease',\r\n minHeight: 42,\r\n '& .MuiAccordionSummary-content': {\r\n alignItems: 'center',\r\n margin: '8px 0',\r\n },\r\n '&.Mui-expanded': {\r\n minHeight: 42,\r\n },\r\n }}\r\n >\r\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\r\n {section.icon}\r\n <Typography\r\n variant=\"body2\"\r\n sx={{ fontWeight: 500, color: 'text.primary' }}\r\n >\r\n {section.label}\r\n </Typography>\r\n </Box>\r\n </AccordionSummary>\r\n <AccordionDetails sx={{ padding: '8px 16px' }}>\r\n {section.content}\r\n </AccordionDetails>\r\n </Accordion>\r\n ))}\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport { EditorSidebar };\r\nexport default EditorSidebar;"],"names":["setDriveUrl","StyledListItem","styled","ListItem","theme","padding","spacing","cursor","borderRadius","shape","backgroundColor","palette","grey","opacity","DropzoneBox","Box","border","textAlign","SidebarItem","id","icon","label","imageUrl","elementType","replace","attributes","listeners","setNodeRef","isDragging","useDraggable","data","type","jsx","ref","className","sx","borderColor","p","children","src","alt","style","width","height","objectFit","marginRight","jsxs","Fragment","ListItemIcon","minWidth","ListItemText","primary","primaryTypographyProps","variant","EditorSidebar","expanded","setExpanded","useState","uploadedImages","setUploadedImages","uploading","setUploading","error","setError","onDrop","useCallback","async","acceptedFiles","file","uFiles","uploadFiles","token","getToken","payload","String","title","name","split","path","is_private","is_directory","file_size","size","is_child","file_extension","mime_type","url","postV1Drive","prev","Date","now","Math","random","err","getRootProps","getInputProps","isDragActive","useDropzone","accept","multiple","sections","TextIcon","content","display","gridTemplateColumns","gap","Heading","ImageIcon","mt","Typography","color","CircularProgress","Alert","severity","length","mb","Grid","container","map","image","item","xs","bgcolor","alignItems","justifyContent","fontSize","Divider","TableIcon","SignatureIcon","QrCodeIcon","BarcodeIcon","useEffect","response","getV1Drive","skip","limit","filters","files","drive","getDriveFiles","borderRight","flexDirection","boxShadow","fontFamily","borderBottom","SearchBar","handleSearch","key","flexGrow","overflowY","section","Accordion","onChange","panel","event","isExpanded","marginBottom","AccordionSummary","expandIcon","ExpandMoreIcon","transition","minHeight","margin","fontWeight","AccordionDetails"],"mappings":"okEAkCAA,EAAAA,WAAY,uCAEZ,MAAMC,EAAiBC,EAAAA,QAAOC,EAAAA,QAAPD,CAAiB,EAAGE,aACzCC,QAASD,EAAME,QAAQ,KACvBC,OAAQ,OACRC,aAAcJ,EAAMK,MAAMD,aAC1B,UAAW,CACTE,gBAAiBN,EAAMO,QAAQC,KAAK,MAEtC,aAAc,CACZC,QAAS,OAIPC,EAAcZ,EAAAA,QAAOa,EAAAA,QAAPb,CAAY,EAAGE,aACjCY,O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 @@ import { TemplateModal } from "../template-modal/template-modal/index.esm.js";
23
23
  import CompanySelectionModal from "../company-selection-modal/company-selection-modal/index.esm.js";
24
24
  import { setBaseUrl } from "../../../api-client/api.rbac/api/index.esm.js";
25
25
  /* empty css */
26
- import { getBackendBaseUrl } from "../../../config/index/index.esm.js";
27
26
  import MenuItem from "../../../node_modules/@mui/material/MenuItem/MenuItem/index.esm.js";
28
- setBaseUrl(`${getBackendBaseUrl()}/rbac`);
27
+ setBaseUrl(`${"https://apidev.erpforce.co"}/rbac`);
29
28
  const Templates = ({ type, module, modulePath }) => {
30
29
  const { t } = useTranslation();
31
30
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/views/template-editor/templates.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport { useCallback, useEffect, useMemo, useState } from 'react';\r\n\r\nimport ActionBar from '../../components/action-bar/action-bar';\r\nimport viewTypes from '../../constants/action-bar';\r\nimport MaterialTable, { MaterialTableColumnProps } from '../../components/material-table/material-table';\r\nimport Typography from '../../components/typography/typography';\r\nimport Fallback from '../../components/fallback/fallback';\r\nimport Menu from '../../components/menu/menu';\r\nimport Footer from '../../components/footer/footer';\r\nimport useDeepMemo from '../../hooks/use-deep-memo';\r\nimport { PageState } from '../../contexts/page-context';\r\nimport { usePages } from '../../hooks/use-pages';\r\nimport { transformTableColumns } from '../../utils/common-utility';\r\nimport { appendConditionSafely, defaultCurrencySymbol, getToken } from '../../utils/common';\r\nimport logo from '../../assets/images';\r\nimport { IPaginationModel } from '../../@types/pagination-model';\r\nimport { fetchApi } from '../../utils/api';\r\n\r\nimport { MenuItem } from '@mui/material';\r\n\r\n// import GridCard from './grid-view/grid-view';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { enqueueSnackbar } from 'notistack';\r\n\r\nimport { templateRoutes } from './utils/common';\r\nimport { IEmail, ITemplateProps, Pagination } from './utils/types';\r\nimport { useNavigate } from 'react-router-dom';\r\n\r\nimport { usePermissions } from '../../hooks/use-permissions';\r\nimport { getV1Subjects } from '../../api-client/api.system-feature/api';\r\nimport TemplateModal from './template-modal/template-modal';\r\nimport CompanySelectionModal from './company-selection-modal/company-selection-modal';\r\nimport { setBaseUrl } from '../../api-client/api.rbac/api';\r\n\r\nimport './templates.scss';\r\n\r\nimport { getBackendBaseUrl } from '../../config';\r\n\r\nsetBaseUrl(`${getBackendBaseUrl()}/rbac`);\r\n\r\n\r\ninterface ActionData {\r\n\tlabel: string;\r\n\tposition: number;\r\n}\r\n\r\nconst Templates: React.FC<ITemplateProps> = ({ type, module, modulePath }) => {\r\n const { t } = useTranslation();\r\n\tconst {\r\n\t\tactivePage: aPage,\r\n\t\tupdatePageInfo,\r\n\t\tschemaFields,\r\n\t\tgeneratedColumns,\r\n\t\tupdateGeneratedColumns,\r\n\t\t// error: pageError\r\n\t} = usePages();\r\n\tconst activePage = useDeepMemo<PageState>(aPage);\r\n\t/* LOCAL STATES */\r\n\tconst [actionAnchorEl, setActionAnchorEl] = useState<null | HTMLElement>(null);\r\n const viewEmails = localStorage.getItem('email-subjects-view');\r\n const [actionBarData, setActionBarData] = useState<ActionData[]>(viewEmails ? JSON.parse(viewEmails) : [{ label: 'Table', position: 0 }]);\r\n\r\n const [actionBarActiveTab, setActionBarActiveTab] = useState<string>(viewTypes.TABLE);\r\n\tconst [paginationModel, setPaginationModel] = useState<Pagination>({ pageNo: 1, limit: 10, totalCount: 0, skip: 0 }); \r\n\tconst [rows, setRows] = useState<any[]>([]); \r\n\tconst [isFetching, setIsFetching] = useState<boolean>(false); \r\n\tconst [selectedRow, setSelectedRow] = useState([]);\r\n\tconst [showTemplateModal, setShowTemplateModal] = useState<IEmail | null>(null);\r\n\tconst [showCompanySelectionModal, setShowCompanySelectionModal] = useState<IEmail | null>(null);\r\n\tconst [companies, setCompanies] = useState<Record<string, any>[]>([]);\r\n\t/* VARS */\r\n\tconst navigate = useNavigate();\r\n\tconst { pageNo, limit: pLimit, totalCount } = paginationModel;\r\n\tconst limit = activePage.page_size || pLimit;\r\n\tconst total = limit ? Math.ceil(totalCount / limit) : 0;\r\n\tconst skip = limit * (pageNo - 1);\r\n\tconst permissions = usePermissions();\r\n\tconst ROUTES = templateRoutes(modulePath, type);\r\n\r\n\tconst SubjectPermissions = permissions?.Subjects || {};\r\n\tconst ConditionsImport = permissions?.RentalTerms?.ConditionsImport || {};\r\n\t\r\n\tconst {\r\n\t\tcanAdd = false,\r\n\t\tcanEdit = false,\r\n\t\tcanDelete = false,\r\n\t} = SubjectPermissions;\r\n\r\n\tconst { canAdd: canImport = false } = ConditionsImport;\r\n\r\n\tconst handleNewEmail = (email) => {\r\n\t\tif(!companies?.length) {\r\n\t\t\tenqueueSnackbar('Please add a company first', { variant: 'error' })\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif(companies?.length > 1) {\r\n\t\t\tsetShowCompanySelectionModal(email)\r\n\t\t} else{\r\n\t\t\tnavigate(ROUTES.ADD_TEMPLATE(email._id), { state: { company_id: companies[0]?.id || companies[0]?.value }})\r\n\t\t}\r\n\t};\r\n \r\n\tconst rowActionMenu = [\r\n\t\t{\r\n\t\t\tlabel: 'New Template',\r\n\t\t\thandleAction: (email: IEmail) => handleNewEmail(email),\r\n\t\t\tdisabled: (row: any) => !canEdit\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: 'Add From Template',\r\n\t\t\thandleAction: (email: IEmail) => setShowTemplateModal(email),\r\n\t\t\tdisabled: (row: any) => !canAdd\r\n\t\t}\r\n\t];\r\n\r\n\t/* LOCAL FUNCTIONS */\r\n\tconst getEmails = useCallback(\r\n\t\tasync () => {\r\n\t\t\tconst { sort, filterQueryString, search } = activePage;\r\n\t\t\tconst searchFiters = search ? `&subject.like=${search}` : '';\r\n\t\t\tconst types = [];\r\n\t\t\ttypes.push(type)\r\n\t\t\tif(type == \"email\"){\r\n\t\t\t\ttypes.push(\"approval_email\")\r\n\t\t\t}\r\n\t\t\tconst uFilters = appendConditionSafely(filterQueryString, `&type.in=[${types.join(\",\")}]&module.eq=${module}${searchFiters}`);\r\n\r\n\t\t\tconst response = await getV1Subjects({\r\n\t\t\t\t...getToken(),\r\n\t\t\t\tskip,\r\n\t\t\t\tlimit,\r\n\t\t\t\t// search,\r\n\t\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\r\n\t\t\t\t...(uFilters && uFilters !== '()' && { filters: uFilters })\r\n\t\t\t});\r\n\r\n\t\t\tsetRows(response?.data || []);\r\n\t\t\tsetPaginationModel({...paginationModel, ...(response?.pagination ||{})});\r\n\t\t},\r\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\r\n\t\t[\r\n\t\t\tlimit,\r\n\t\t\tskip,\r\n\t\t\tactivePage?.search,\r\n\t\t\tactivePage?.filterQueryString,\r\n\t\t\tactivePage?.sort\r\n\t\t]\r\n\t);\r\n\r\n\tconst getCopmanies = async () => {\r\n\t\t\tconst companiesArr = await fetchApi({apiKey: 'company', filters: { skip: 0, limit: 100, order: \"id:1\" }});\r\n\t\t\tsetCompanies(companiesArr?.data || []);\r\n\t\t}\r\n\r\n\tconst tableRows = useMemo(() => rows || [], [rows]);\r\n\r\n\tconst tableColumns = useMemo(\r\n\t\t() =>\r\n\t\t\ttransformTableColumns({\r\n\t\t\t\tcolumns: generatedColumns.columns,\r\n\t\t\t\tcurrencySymbol: (row) =>\r\n\t\t\t\t\trow.original?.currency_data?.symbol || defaultCurrencySymbol(),\r\n\t\t\t\ttranslationFn: t,\r\n\t\t\t\tenableFooter: true,\r\n\t\t\t\t// redirectionLink: ROUTES.VIEW,\r\n\t\t\t\t// redirectionLinkState: (row) => ({ termsAndCondition: row.original }),\r\n\t\t\t\trows: tableRows,\r\n\t\t\t\tstatusClasses: ``,\r\n\t\t\t}),\r\n\t\t[tableRows, t, generatedColumns.columns]\r\n\t);\r\n\r\n\tconst handlePaginationModel = (model: IPaginationModel) => {\r\n\t\tif (activePage.page_size != model?.limit) {\r\n\t\t\tupdatePageInfo({ page_size: model.limit });\r\n\t\t}\r\n\t\tsetPaginationModel(model);\r\n\t};\r\n\r\n\tconst cleanUp = () => {\r\n\t\tconst pModel = { pageNo: 1, limit: 10, totalCount: 0 };\r\n\t\tsetPaginationModel(pModel);\r\n\t};\r\n\r\n\t/* USE EFFECTS */\r\n\tuseEffect(() => {\r\n\t\tgetEmails();\r\n\t}, [getEmails]);\r\n\t\r\n\r\n\tuseEffect(() => {\r\n\t\tgetCopmanies();\r\n\t\treturn cleanUp;\r\n\t}, []);\r\n useEffect(() => {\r\n\t\tif (actionBarData?.length) {\r\n\t\t\tlocalStorage.setItem('email-subjects-view', JSON.stringify(actionBarData));\r\n\t\t}\r\n\t}, [actionBarData]);\r\n\r\n\t/* JSX STRUCTURE STARTED */\r\n\treturn (\r\n\t\t<section className='templates'>\r\n\t\t\t<ActionBar\r\n\t\t\t\ttitle={type === 'email' ? 'Emails' : 'PDFs'}\r\n\t\t\t\tdata={actionBarData}\r\n\t\t\t\tsetData={setActionBarData}\r\n\t\t\t\tactive={actionBarActiveTab}\r\n\t\t\t\tsetActive={setActionBarActiveTab}\r\n\t\t\t\thandleSearch={(search) => {\r\n\t\t\t\t\tupdatePageInfo({ search });\r\n\t\t\t\t\tsetPaginationModel({ ...paginationModel, pageNo: 1 });\r\n\t\t\t\t}}\r\n\t\t\t\tdisabledViews={['Kanban', 'Calendar', 'Gantt',viewTypes.GRID]}\r\n\t\t\t\tfields={schemaFields}\r\n\t\t\t\tselectedIds={selectedRow}\r\n\t\t\t\tbutton={false}\r\n\t\t\t/>\r\n\t\t\t\t\t{actionBarActiveTab === viewTypes.TABLE && (\r\n\t\t\t\t\t\t<MaterialTable\r\n\t\t\t\t\t\t\trows={tableRows || []}\r\n\t\t\t\t\t\t\tcolumns={tableColumns}\r\n\t\t\t\t\t\t\tpaginationModel={paginationModel}\r\n\t\t\t\t\t\t\ttotalPages={total}\r\n\t\t\t\t\t\t\tcolumnOrder={['mrt-row-select', ...generatedColumns.orderKeys]}\r\n\t\t\t\t\t\t\tstates={{ isLoading: isFetching }}\r\n\t\t\t\t\t\t\tonSortingChange={(sort) => updatePageInfo({ sort })}\r\n\t\t\t\t\t\t\tenableColumnDragging={false}\r\n\t\t\t\t\t\t\tenableEditing={false}\r\n\t\t\t\t\t\t\tonSelectRow={(r) =>\r\n\t\t\t\t\t\t\t\tsetSelectedRow(r.map((ele) => ele.original.id))\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tenableAddCustomField={false}\r\n\t\t\t\t\t\t\trowActionMenu={rowActionMenu}\r\n\t\t\t\t\t\t\tisResetRow={false}\r\n\t\t\t\t\t\t\thandleColumnOrdering={(colOrder) =>\r\n\t\t\t\t\t\t\t\tupdateGeneratedColumns({ orderKeys: colOrder.slice(1) })\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonColumnVisibility={(columns: MaterialTableColumnProps[]) =>\r\n\t\t\t\t\t\t\t\tupdateGeneratedColumns({ columns: columns })\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{actionBarActiveTab === viewTypes.GRID && (\r\n\t\t\t\t\t\t<GridCard\r\n\t\t\t\t\t\t\tdata={tableRows}\r\n\t\t\t\t\t\t\trowActionMenu={rowActionMenu}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t{!actionBarActiveTab && (\r\n\t\t\t\t\t\t<Fallback\r\n\t\t\t\t\t\t\theading={t('rental.settings.termsAndConditions.title')}\r\n\t\t\t\t\t\t\tsubHeading='No data available'\r\n\t\t\t\t\t\t\ticon={<img src={logo.invoiceFallback} />}>\r\n\t\t\t\t\t\t</Fallback>\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t<Footer\r\n\t\t\t\t\t\ttotal={total}\r\n\t\t\t\t\t\tpaginationModel={{\r\n\t\t\t\t\t\t\t...paginationModel,\r\n\t\t\t\t\t\t\tlimit: activePage.page_size\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t\thandlePaginationModel={handlePaginationModel}\r\n\t\t\t\t\t\tresource=''\r\n\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t{/* Action Menu */}\r\n\t\t\t\t\t<Menu\r\n\t\t\t\t\t\tanchorEl={actionAnchorEl}\r\n\t\t\t\t\t\topen={Boolean(actionAnchorEl)}\r\n\t\t\t\t\t\tonClose={() => setActionAnchorEl(null)}>\r\n\t\t\t\t\t\t<MenuItem>\r\n\t\t\t\t\t\t\t<Typography type='s4' color='theme.secondary.1000'>\r\n\t\t\t\t\t\t\t\t{t('common.upload')}\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t\t<MenuItem>\r\n\t\t\t\t\t\t\t<Typography type='s4' color='theme.secondary.1000'>\r\n\t\t\t\t\t\t\t\t{t('common.print')}\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t</Menu>\r\n\t\t\t\t\t{showTemplateModal && (\r\n\t\t\t\t\t\t<TemplateModal \r\n\t\t\t\t\t\t\temail={showTemplateModal} \r\n\t\t\t\t\t\t\tonClose={() => setShowTemplateModal(null)} \r\n\t\t\t\t\t\t\topen={showTemplateModal !== null} \r\n\t\t\t\t\t\t\tcompanies={companies}\r\n\t\t\t\t\t\t\ttemplateRoutes={ROUTES}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{showCompanySelectionModal && (\r\n\t\t\t\t\t\t<CompanySelectionModal \r\n\t\t\t\t\t\t\tisOpen={showCompanySelectionModal !== null} \r\n\t\t\t\t\t\t\tsetIsOpen={setShowCompanySelectionModal} \r\n\t\t\t\t\t\t\tcompanies={companies} \r\n\t\t\t\t\t\t\temail={showCompanySelectionModal}\r\n\t\t\t\t\t\t\tt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B,6BACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,QAAQ,8BAA8B;AAAA,QACtC,WAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACP,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACjB,GAEJ;AAEF;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/views/template-editor/templates.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport { useCallback, useEffect, useMemo, useState } from 'react';\r\n\r\nimport ActionBar from '../../components/action-bar/action-bar';\r\nimport viewTypes from '../../constants/action-bar';\r\nimport MaterialTable, { MaterialTableColumnProps } from '../../components/material-table/material-table';\r\nimport Typography from '../../components/typography/typography';\r\nimport Fallback from '../../components/fallback/fallback';\r\nimport Menu from '../../components/menu/menu';\r\nimport Footer from '../../components/footer/footer';\r\nimport useDeepMemo from '../../hooks/use-deep-memo';\r\nimport { PageState } from '../../contexts/page-context';\r\nimport { usePages } from '../../hooks/use-pages';\r\nimport { transformTableColumns } from '../../utils/common-utility';\r\nimport { appendConditionSafely, defaultCurrencySymbol, getToken } from '../../utils/common';\r\nimport logo from '../../assets/images';\r\nimport { IPaginationModel } from '../../@types/pagination-model';\r\nimport { fetchApi } from '../../utils/api';\r\n\r\nimport { MenuItem } from '@mui/material';\r\n\r\n// import GridCard from './grid-view/grid-view';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { enqueueSnackbar } from 'notistack';\r\n\r\nimport { templateRoutes } from './utils/common';\r\nimport { IEmail, ITemplateProps, Pagination } from './utils/types';\r\nimport { useNavigate } from 'react-router-dom';\r\n\r\nimport { usePermissions } from '../../hooks/use-permissions';\r\nimport { getV1Subjects } from '../../api-client/api.system-feature/api';\r\nimport TemplateModal from './template-modal/template-modal';\r\nimport CompanySelectionModal from './company-selection-modal/company-selection-modal';\r\nimport { setBaseUrl } from '../../api-client/api.rbac/api';\r\n\r\nimport './templates.scss';\r\n\r\nsetBaseUrl(`${import.meta.env.VITE_BACKEND_BASE_URL}/rbac`);\r\n\r\n\r\ninterface ActionData {\r\n\tlabel: string;\r\n\tposition: number;\r\n}\r\n\r\nconst Templates: React.FC<ITemplateProps> = ({ type, module, modulePath }) => {\r\n const { t } = useTranslation();\r\n\tconst {\r\n\t\tactivePage: aPage,\r\n\t\tupdatePageInfo,\r\n\t\tschemaFields,\r\n\t\tgeneratedColumns,\r\n\t\tupdateGeneratedColumns,\r\n\t\t// error: pageError\r\n\t} = usePages();\r\n\tconst activePage = useDeepMemo<PageState>(aPage);\r\n\t/* LOCAL STATES */\r\n\tconst [actionAnchorEl, setActionAnchorEl] = useState<null | HTMLElement>(null);\r\n const viewEmails = localStorage.getItem('email-subjects-view');\r\n const [actionBarData, setActionBarData] = useState<ActionData[]>(viewEmails ? JSON.parse(viewEmails) : [{ label: 'Table', position: 0 }]);\r\n\r\n const [actionBarActiveTab, setActionBarActiveTab] = useState<string>(viewTypes.TABLE);\r\n\tconst [paginationModel, setPaginationModel] = useState<Pagination>({ pageNo: 1, limit: 10, totalCount: 0, skip: 0 }); \r\n\tconst [rows, setRows] = useState<any[]>([]); \r\n\tconst [isFetching, setIsFetching] = useState<boolean>(false); \r\n\tconst [selectedRow, setSelectedRow] = useState([]);\r\n\tconst [showTemplateModal, setShowTemplateModal] = useState<IEmail | null>(null);\r\n\tconst [showCompanySelectionModal, setShowCompanySelectionModal] = useState<IEmail | null>(null);\r\n\tconst [companies, setCompanies] = useState<Record<string, any>[]>([]);\r\n\t/* VARS */\r\n\tconst navigate = useNavigate();\r\n\tconst { pageNo, limit: pLimit, totalCount } = paginationModel;\r\n\tconst limit = activePage.page_size || pLimit;\r\n\tconst total = limit ? Math.ceil(totalCount / limit) : 0;\r\n\tconst skip = limit * (pageNo - 1);\r\n\tconst permissions = usePermissions();\r\n\tconst ROUTES = templateRoutes(modulePath, type);\r\n\r\n\tconst SubjectPermissions = permissions?.Subjects || {};\r\n\tconst ConditionsImport = permissions?.RentalTerms?.ConditionsImport || {};\r\n\t\r\n\tconst {\r\n\t\tcanAdd = false,\r\n\t\tcanEdit = false,\r\n\t\tcanDelete = false,\r\n\t} = SubjectPermissions;\r\n\r\n\tconst { canAdd: canImport = false } = ConditionsImport;\r\n\r\n\tconst handleNewEmail = (email) => {\r\n\t\tif(!companies?.length) {\r\n\t\t\tenqueueSnackbar('Please add a company first', { variant: 'error' })\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif(companies?.length > 1) {\r\n\t\t\tsetShowCompanySelectionModal(email)\r\n\t\t} else{\r\n\t\t\tnavigate(ROUTES.ADD_TEMPLATE(email._id), { state: { company_id: companies[0]?.id || companies[0]?.value }})\r\n\t\t}\r\n\t};\r\n \r\n\tconst rowActionMenu = [\r\n\t\t{\r\n\t\t\tlabel: 'New Template',\r\n\t\t\thandleAction: (email: IEmail) => handleNewEmail(email),\r\n\t\t\tdisabled: (row: any) => !canEdit\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: 'Add From Template',\r\n\t\t\thandleAction: (email: IEmail) => setShowTemplateModal(email),\r\n\t\t\tdisabled: (row: any) => !canAdd\r\n\t\t}\r\n\t];\r\n\r\n\t/* LOCAL FUNCTIONS */\r\n\tconst getEmails = useCallback(\r\n\t\tasync () => {\r\n\t\t\tconst { sort, filterQueryString, search } = activePage;\r\n\t\t\tconst searchFiters = search ? `&subject.like=${search}` : '';\r\n\t\t\tconst types = [];\r\n\t\t\ttypes.push(type)\r\n\t\t\tif(type == \"email\"){\r\n\t\t\t\ttypes.push(\"approval_email\")\r\n\t\t\t}\r\n\t\t\tconst uFilters = appendConditionSafely(filterQueryString, `&type.in=[${types.join(\",\")}]&module.eq=${module}${searchFiters}`);\r\n\r\n\t\t\tconst response = await getV1Subjects({\r\n\t\t\t\t...getToken(),\r\n\t\t\t\tskip,\r\n\t\t\t\tlimit,\r\n\t\t\t\t// search,\r\n\t\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\r\n\t\t\t\t...(uFilters && uFilters !== '()' && { filters: uFilters })\r\n\t\t\t});\r\n\r\n\t\t\tsetRows(response?.data || []);\r\n\t\t\tsetPaginationModel({...paginationModel, ...(response?.pagination ||{})});\r\n\t\t},\r\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\r\n\t\t[\r\n\t\t\tlimit,\r\n\t\t\tskip,\r\n\t\t\tactivePage?.search,\r\n\t\t\tactivePage?.filterQueryString,\r\n\t\t\tactivePage?.sort\r\n\t\t]\r\n\t);\r\n\r\n\tconst getCopmanies = async () => {\r\n\t\t\tconst companiesArr = await fetchApi({apiKey: 'company', filters: { skip: 0, limit: 100, order: \"id:1\" }});\r\n\t\t\tsetCompanies(companiesArr?.data || []);\r\n\t\t}\r\n\r\n\tconst tableRows = useMemo(() => rows || [], [rows]);\r\n\r\n\tconst tableColumns = useMemo(\r\n\t\t() =>\r\n\t\t\ttransformTableColumns({\r\n\t\t\t\tcolumns: generatedColumns.columns,\r\n\t\t\t\tcurrencySymbol: (row) =>\r\n\t\t\t\t\trow.original?.currency_data?.symbol || defaultCurrencySymbol(),\r\n\t\t\t\ttranslationFn: t,\r\n\t\t\t\tenableFooter: true,\r\n\t\t\t\t// redirectionLink: ROUTES.VIEW,\r\n\t\t\t\t// redirectionLinkState: (row) => ({ termsAndCondition: row.original }),\r\n\t\t\t\trows: tableRows,\r\n\t\t\t\tstatusClasses: ``,\r\n\t\t\t}),\r\n\t\t[tableRows, t, generatedColumns.columns]\r\n\t);\r\n\r\n\tconst handlePaginationModel = (model: IPaginationModel) => {\r\n\t\tif (activePage.page_size != model?.limit) {\r\n\t\t\tupdatePageInfo({ page_size: model.limit });\r\n\t\t}\r\n\t\tsetPaginationModel(model);\r\n\t};\r\n\r\n\tconst cleanUp = () => {\r\n\t\tconst pModel = { pageNo: 1, limit: 10, totalCount: 0 };\r\n\t\tsetPaginationModel(pModel);\r\n\t};\r\n\r\n\t/* USE EFFECTS */\r\n\tuseEffect(() => {\r\n\t\tgetEmails();\r\n\t}, [getEmails]);\r\n\t\r\n\r\n\tuseEffect(() => {\r\n\t\tgetCopmanies();\r\n\t\treturn cleanUp;\r\n\t}, []);\r\n useEffect(() => {\r\n\t\tif (actionBarData?.length) {\r\n\t\t\tlocalStorage.setItem('email-subjects-view', JSON.stringify(actionBarData));\r\n\t\t}\r\n\t}, [actionBarData]);\r\n\r\n\t/* JSX STRUCTURE STARTED */\r\n\treturn (\r\n\t\t<section className='templates'>\r\n\t\t\t<ActionBar\r\n\t\t\t\ttitle={type === 'email' ? 'Emails' : 'PDFs'}\r\n\t\t\t\tdata={actionBarData}\r\n\t\t\t\tsetData={setActionBarData}\r\n\t\t\t\tactive={actionBarActiveTab}\r\n\t\t\t\tsetActive={setActionBarActiveTab}\r\n\t\t\t\thandleSearch={(search) => {\r\n\t\t\t\t\tupdatePageInfo({ search });\r\n\t\t\t\t\tsetPaginationModel({ ...paginationModel, pageNo: 1 });\r\n\t\t\t\t}}\r\n\t\t\t\tdisabledViews={['Kanban', 'Calendar', 'Gantt',viewTypes.GRID]}\r\n\t\t\t\tfields={schemaFields}\r\n\t\t\t\tselectedIds={selectedRow}\r\n\t\t\t\tbutton={false}\r\n\t\t\t/>\r\n\t\t\t\t\t{actionBarActiveTab === viewTypes.TABLE && (\r\n\t\t\t\t\t\t<MaterialTable\r\n\t\t\t\t\t\t\trows={tableRows || []}\r\n\t\t\t\t\t\t\tcolumns={tableColumns}\r\n\t\t\t\t\t\t\tpaginationModel={paginationModel}\r\n\t\t\t\t\t\t\ttotalPages={total}\r\n\t\t\t\t\t\t\tcolumnOrder={['mrt-row-select', ...generatedColumns.orderKeys]}\r\n\t\t\t\t\t\t\tstates={{ isLoading: isFetching }}\r\n\t\t\t\t\t\t\tonSortingChange={(sort) => updatePageInfo({ sort })}\r\n\t\t\t\t\t\t\tenableColumnDragging={false}\r\n\t\t\t\t\t\t\tenableEditing={false}\r\n\t\t\t\t\t\t\tonSelectRow={(r) =>\r\n\t\t\t\t\t\t\t\tsetSelectedRow(r.map((ele) => ele.original.id))\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tenableAddCustomField={false}\r\n\t\t\t\t\t\t\trowActionMenu={rowActionMenu}\r\n\t\t\t\t\t\t\tisResetRow={false}\r\n\t\t\t\t\t\t\thandleColumnOrdering={(colOrder) =>\r\n\t\t\t\t\t\t\t\tupdateGeneratedColumns({ orderKeys: colOrder.slice(1) })\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonColumnVisibility={(columns: MaterialTableColumnProps[]) =>\r\n\t\t\t\t\t\t\t\tupdateGeneratedColumns({ columns: columns })\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{actionBarActiveTab === viewTypes.GRID && (\r\n\t\t\t\t\t\t<GridCard\r\n\t\t\t\t\t\t\tdata={tableRows}\r\n\t\t\t\t\t\t\trowActionMenu={rowActionMenu}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t{!actionBarActiveTab && (\r\n\t\t\t\t\t\t<Fallback\r\n\t\t\t\t\t\t\theading={t('rental.settings.termsAndConditions.title')}\r\n\t\t\t\t\t\t\tsubHeading='No data available'\r\n\t\t\t\t\t\t\ticon={<img src={logo.invoiceFallback} />}>\r\n\t\t\t\t\t\t</Fallback>\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t<Footer\r\n\t\t\t\t\t\ttotal={total}\r\n\t\t\t\t\t\tpaginationModel={{\r\n\t\t\t\t\t\t\t...paginationModel,\r\n\t\t\t\t\t\t\tlimit: activePage.page_size\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t\thandlePaginationModel={handlePaginationModel}\r\n\t\t\t\t\t\tresource=''\r\n\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t{/* Action Menu */}\r\n\t\t\t\t\t<Menu\r\n\t\t\t\t\t\tanchorEl={actionAnchorEl}\r\n\t\t\t\t\t\topen={Boolean(actionAnchorEl)}\r\n\t\t\t\t\t\tonClose={() => setActionAnchorEl(null)}>\r\n\t\t\t\t\t\t<MenuItem>\r\n\t\t\t\t\t\t\t<Typography type='s4' color='theme.secondary.1000'>\r\n\t\t\t\t\t\t\t\t{t('common.upload')}\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t\t<MenuItem>\r\n\t\t\t\t\t\t\t<Typography type='s4' color='theme.secondary.1000'>\r\n\t\t\t\t\t\t\t\t{t('common.print')}\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t</Menu>\r\n\t\t\t\t\t{showTemplateModal && (\r\n\t\t\t\t\t\t<TemplateModal \r\n\t\t\t\t\t\t\temail={showTemplateModal} \r\n\t\t\t\t\t\t\tonClose={() => setShowTemplateModal(null)} \r\n\t\t\t\t\t\t\topen={showTemplateModal !== null} \r\n\t\t\t\t\t\t\tcompanies={companies}\r\n\t\t\t\t\t\t\ttemplateRoutes={ROUTES}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{showCompanySelectionModal && (\r\n\t\t\t\t\t\t<CompanySelectionModal \r\n\t\t\t\t\t\t\tisOpen={showCompanySelectionModal !== null} \r\n\t\t\t\t\t\t\tsetIsOpen={setShowCompanySelectionModal} \r\n\t\t\t\t\t\t\tcompanies={companies} \r\n\t\t\t\t\t\t\temail={showCompanySelectionModal}\r\n\t\t\t\t\t\t\ttemplateRoutes={ROUTES}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t</section>\r\n\t);\r\n};\r\n\r\nexport default Templates;\r\n"],"names":["logo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,WAAW,GAAG,4BAAqC,OAAO;AAQ1D,MAAM,YAAsC,CAAC,EAAE,MAAM,QAAQ,iBAAiB;AA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,MAAA;AAAA,IAAA;AAAA,IAID,CAAC,sBACD;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,SAAS,EAAE,0CAA0C;AAAA,QACrD,YAAW;AAAA,QACX,MAAM,oBAAC,OAAA,EAAI,KAAKA,OAAK,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAIxC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA;AAAA,QACA,iBAAiB;AAAA,UAChB,GAAG;AAAA,UACH,OAAO,WAAW;AAAA,QAAA;AAAA,QAEnB;AAAA,QACA,UAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAIV;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,UAAU;AAAA,QACV,MAAM,QAAQ,cAAc;AAAA,QAC5B,SAAS,MAAM,kBAAkB,IAAI;AAAA,QACrC,UAAA;AAAA,8BAAC,UAAA,EACA,UAAA,oBAAC,YAAA,EAAW,MAAK,MAAK,OAAM,wBAC1B,UAAA,EAAE,eAAe,EAAA,CACnB,GACD;AAAA,8BACC,UAAA,EACA,UAAA,oBAAC,YAAA,EAAW,MAAK,MAAK,OAAM,wBAC1B,UAAA,EAAE,cAAc,EAAA,CAClB,GACD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEA,qBACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,OAAO;AAAA,QACP,SAAS,MAAM,qBAAqB,IAAI;AAAA,QACxC,MAAM,sBAAsB;AAAA,QAC5B;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAGjB,6BACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,QAAQ,8BAA8B;AAAA,QACtC,WAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACP,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACjB,GAEJ;AAEF;"}
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),t=,/* empty css */i=,/* empty css */s=,/* empty css */n=,/* empty css */l=,/* empty css */o=,/* empty css */r=,/* empty css */u=,/* empty css */d=,/* empty css */c=,/* empty css */m=,/* empty css */p=,/* empty css */g=,/* empty css */j=require("react-i18next"),x=,/* empty css */b=,/* empty css */y=require("react-router-dom"),h=,/* empty css */f=,/* empty css */v=,/* empty css */q=,/* empty css */S=;/* empty css */;/* empty css */var C=,/* empty css */k=;/* empty css */S.setBaseUrl(`${C.getBackendBaseUrl()}/rbac`),exports.default=({type:S,module:C,modulePath:A})=>{const{t:M}=j.useTranslation(),{activePage:T,updatePageInfo:w,schemaFields:_,generatedColumns:E,updateGeneratedColumns:P}=d.usePages(),N=u.default(T),[F,I]=a.useState(null),R=localStorage.getItem("email-subjects-view"),[B,D]=a.useState(R?JSON.parse(R):[{label:"Table",position:0}]),[O,$]=a.useState(i.default.TABLE),[G,z]=a.useState({pageNo:1,limit:10,totalCount:0,skip:0}),[K,L]=a.useState([]),[V]=a.useState(!1),[J,Q]=a.useState([]),[U,H]=a.useState(null),[W,X]=a.useState(null),[Y,Z]=a.useState([]),ee=y.useNavigate(),{pageNo:ae,limit:te,totalCount:ie}=G,se=N.page_size||te,ne=se?Math.ceil(ie/se):0,le=se*(ae-1),oe=h.usePermissions(),re=b.templateRoutes(A,S),ue=(null==oe?void 0:oe.Subjects)||{},{canAdd:de=!1,canEdit:ce=!1}=ue,me=[{label:"New Template",handleAction:e=>(e=>{var a,t;(null==Y?void 0:Y.length)?(null==Y?void 0:Y.length)>1?X(e):ee(re.ADD_TEMPLATE(e._id),{state:{company_id:(null==(a=Y[0])?void 0:a.id)||(null==(t=Y[0])?void 0:t.value)}}):x.enqueueSnackbar("Please add a company first",{variant:"error"})})(e),disabled:e=>!ce},{label:"Add From Template",handleAction:e=>H(e),disabled:e=>!de}],pe=a.useCallback(async()=>{const{sort:e,filterQueryString:a,search:t}=N,i=t?`&subject.like=${t}`:"",s=[];s.push(S),"email"==S&&s.push("approval_email");const n=m.appendConditionSafely(a,`&type.in=[${s.join(",")}]&module.eq=${C}${i}`),l=await f.getV1Subjects({...m.getToken(),skip:le,limit:se,...e&&{order:`${e.id}:${e.desc?-1:1}`},...n&&"()"!==n&&{filters:n}});L((null==l?void 0:l.data)||[]),z({...G,...(null==l?void 0:l.pagination)||{}})},[se,le,null==N?void 0:N.search,null==N?void 0:N.filterQueryString,null==N?void 0:N.sort]),ge=a.useMemo(()=>K||[],[K]),je=a.useMemo(()=>c.transformTableColumns({columns:E.columns,currencySymbol:e=>{var a,t;return(null==(t=null==(a=e.original)?void 0:a.currency_data)?void 0:t.symbol)||m.defaultCurrencySymbol()},translationFn:M,enableFooter:!0,rows:ge,statusClasses:""}),[ge,M,E.columns]),xe=()=>{z({pageNo:1,limit:10,totalCount:0})};return a.useEffect(()=>{pe()},[pe]),a.useEffect(()=>((async()=>{const e=await g.fetchApi({apiKey:"company",filters:{skip:0,limit:100,order:"id:1"}});Z((null==e?void 0:e.data)||[])})(),xe),[]),a.useEffect(()=>{(null==B?void 0:B.length)&&localStorage.setItem("email-subjects-view",JSON.stringify(B))},[B]),/* @__PURE__ */e.jsxs("section",{className:"templates",children:[
2
- /* @__PURE__ */e.jsx(t.ActionBar,{title:"email"===S?"Emails":"PDFs",data:B,setData:D,active:O,setActive:$,handleSearch:e=>{w({search:e}),z({...G,pageNo:1})},disabledViews:["Kanban","Calendar","Gantt",i.default.GRID],fields:_,selectedIds:J,button:!1}),O===i.default.TABLE&&/* @__PURE__ */e.jsx(s.MaterialTable,{rows:ge||[],columns:je,paginationModel:G,totalPages:ne,columnOrder:["mrt-row-select",...E.orderKeys],states:{isLoading:V},onSortingChange:e=>w({sort:e}),enableColumnDragging:!1,enableEditing:!1,onSelectRow:e=>Q(e.map(e=>e.original.id)),enableAddCustomField:!1,rowActionMenu:me,isResetRow:!1,handleColumnOrdering:e=>P({orderKeys:e.slice(1)}),onColumnVisibility:e=>P({columns:e})}),O===i.default.GRID&&/* @__PURE__ */e.jsx(GridCard,{data:ge,rowActionMenu:me}),!O&&/* @__PURE__ */e.jsx(l.Fallback,{heading:M("rental.settings.termsAndConditions.title"),subHeading:"No data available",icon:/* @__PURE__ */e.jsx("img",{src:p.images.invoiceFallback})}),
3
- /* @__PURE__ */e.jsx(r.Footer,{total:ne,paginationModel:{...G,limit:N.page_size},handlePaginationModel:e=>{N.page_size!=(null==e?void 0:e.limit)&&w({page_size:e.limit}),z(e)},resource:""}),
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=,/* empty css */i=,/* empty css */s=,/* empty css */l=,/* empty css */n=,/* empty css */o=,/* empty css */r=,/* empty css */u=,/* empty css */d=,/* empty css */c=,/* empty css */m=,/* empty css */p=,/* empty css */g=,/* empty css */j=require("react-i18next"),b=,/* empty css */x=,/* empty css */y=require("react-router-dom"),h=,/* empty css */f=,/* empty css */v=,/* empty css */q=,/* empty css */S=;/* empty css */;/* empty css */var C=;/* empty css */S.setBaseUrl("https://apidev.erpforce.co/rbac"),exports.default=({type:S,module:k,modulePath:A})=>{const{t:M}=j.useTranslation(),{activePage:T,updatePageInfo:w,schemaFields:_,generatedColumns:E,updateGeneratedColumns:P}=d.usePages(),N=u.default(T),[F,I]=t.useState(null),R=localStorage.getItem("email-subjects-view"),[D,O]=t.useState(R?JSON.parse(R):[{label:"Table",position:0}]),[$,B]=t.useState(i.default.TABLE),[G,z]=t.useState({pageNo:1,limit:10,totalCount:0,skip:0}),[K,L]=t.useState([]),[V]=t.useState(!1),[J,Q]=t.useState([]),[H,U]=t.useState(null),[W,X]=t.useState(null),[Y,Z]=t.useState([]),ee=y.useNavigate(),{pageNo:te,limit:ae,totalCount:ie}=G,se=N.page_size||ae,le=se?Math.ceil(ie/se):0,ne=se*(te-1),oe=h.usePermissions(),re=x.templateRoutes(A,S),ue=(null==oe?void 0:oe.Subjects)||{},{canAdd:de=!1,canEdit:ce=!1}=ue,me=[{label:"New Template",handleAction:e=>(e=>{var t,a;(null==Y?void 0:Y.length)?(null==Y?void 0:Y.length)>1?X(e):ee(re.ADD_TEMPLATE(e._id),{state:{company_id:(null==(t=Y[0])?void 0:t.id)||(null==(a=Y[0])?void 0:a.value)}}):b.enqueueSnackbar("Please add a company first",{variant:"error"})})(e),disabled:e=>!ce},{label:"Add From Template",handleAction:e=>U(e),disabled:e=>!de}],pe=t.useCallback(async()=>{const{sort:e,filterQueryString:t,search:a}=N,i=a?`&subject.like=${a}`:"",s=[];s.push(S),"email"==S&&s.push("approval_email");const l=m.appendConditionSafely(t,`&type.in=[${s.join(",")}]&module.eq=${k}${i}`),n=await f.getV1Subjects({...m.getToken(),skip:ne,limit:se,...e&&{order:`${e.id}:${e.desc?-1:1}`},...l&&"()"!==l&&{filters:l}});L((null==n?void 0:n.data)||[]),z({...G,...(null==n?void 0:n.pagination)||{}})},[se,ne,null==N?void 0:N.search,null==N?void 0:N.filterQueryString,null==N?void 0:N.sort]),ge=t.useMemo(()=>K||[],[K]),je=t.useMemo(()=>c.transformTableColumns({columns:E.columns,currencySymbol:e=>{var t,a;return(null==(a=null==(t=e.original)?void 0:t.currency_data)?void 0:a.symbol)||m.defaultCurrencySymbol()},translationFn:M,enableFooter:!0,rows:ge,statusClasses:""}),[ge,M,E.columns]),be=()=>{z({pageNo:1,limit:10,totalCount:0})};return t.useEffect(()=>{pe()},[pe]),t.useEffect(()=>((async()=>{const e=await g.fetchApi({apiKey:"company",filters:{skip:0,limit:100,order:"id:1"}});Z((null==e?void 0:e.data)||[])})(),be),[]),t.useEffect(()=>{(null==D?void 0:D.length)&&localStorage.setItem("email-subjects-view",JSON.stringify(D))},[D]),/* @__PURE__ */e.jsxs("section",{className:"templates",children:[
2
+ /* @__PURE__ */e.jsx(a.ActionBar,{title:"email"===S?"Emails":"PDFs",data:D,setData:O,active:$,setActive:B,handleSearch:e=>{w({search:e}),z({...G,pageNo:1})},disabledViews:["Kanban","Calendar","Gantt",i.default.GRID],fields:_,selectedIds:J,button:!1}),$===i.default.TABLE&&/* @__PURE__ */e.jsx(s.MaterialTable,{rows:ge||[],columns:je,paginationModel:G,totalPages:le,columnOrder:["mrt-row-select",...E.orderKeys],states:{isLoading:V},onSortingChange:e=>w({sort:e}),enableColumnDragging:!1,enableEditing:!1,onSelectRow:e=>Q(e.map(e=>e.original.id)),enableAddCustomField:!1,rowActionMenu:me,isResetRow:!1,handleColumnOrdering:e=>P({orderKeys:e.slice(1)}),onColumnVisibility:e=>P({columns:e})}),$===i.default.GRID&&/* @__PURE__ */e.jsx(GridCard,{data:ge,rowActionMenu:me}),!$&&/* @__PURE__ */e.jsx(n.Fallback,{heading:M("rental.settings.termsAndConditions.title"),subHeading:"No data available",icon:/* @__PURE__ */e.jsx("img",{src:p.images.invoiceFallback})}),
3
+ /* @__PURE__ */e.jsx(r.Footer,{total:le,paginationModel:{...G,limit:N.page_size},handlePaginationModel:e=>{N.page_size!=(null==e?void 0:e.limit)&&w({page_size:e.limit}),z(e)},resource:""}),
4
4
  /* @__PURE__ */e.jsxs(o.Menu,{anchorEl:F,open:Boolean(F),onClose:()=>I(null),children:[
5
- /* @__PURE__ */e.jsx(k.default,{children:/* @__PURE__ */e.jsx(n.Typography,{type:"s4",color:"theme.secondary.1000",children:M("common.upload")})}),
6
- /* @__PURE__ */e.jsx(k.default,{children:/* @__PURE__ */e.jsx(n.Typography,{type:"s4",color:"theme.secondary.1000",children:M("common.print")})})]}),U&&/* @__PURE__ */e.jsx(v.TemplateModal,{email:U,onClose:()=>H(null),open:null!==U,companies:Y,templateRoutes:re}),W&&/* @__PURE__ */e.jsx(q.default,{isOpen:null!==W,setIsOpen:X,companies:Y,email:W,templateRoutes:re})]})};
5
+ /* @__PURE__ */e.jsx(C.default,{children:/* @__PURE__ */e.jsx(l.Typography,{type:"s4",color:"theme.secondary.1000",children:M("common.upload")})}),
6
+ /* @__PURE__ */e.jsx(C.default,{children:/* @__PURE__ */e.jsx(l.Typography,{type:"s4",color:"theme.secondary.1000",children:M("common.print")})})]}),H&&/* @__PURE__ */e.jsx(v.TemplateModal,{email:H,onClose:()=>U(null),open:null!==H,companies:Y,templateRoutes:re}),W&&/* @__PURE__ */e.jsx(q.default,{isOpen:null!==W,setIsOpen:X,companies:Y,email:W,templateRoutes:re})]})};
7
7
  //# sourceMappingURL=index.js.map