impact-ui 3.7.25 → 4.0.0-alpha.10

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 (465) hide show
  1. package/MIGRATION_GUIDE.md +328 -0
  2. package/README.md +154 -15
  3. package/bin/migrate-image-paths.cjs +127 -0
  4. package/bin/migrate.js +293 -0
  5. package/codemods/component-map.js +153 -0
  6. package/codemods/image-paths-transform.js +69 -0
  7. package/codemods/transform.js +136 -0
  8. package/dist/components/Accordion/index.js +2 -1
  9. package/dist/components/AccordionModern/index.js +2 -1
  10. package/dist/components/Alert/index.js +2 -1
  11. package/dist/components/Avatar/index.js +2 -1
  12. package/dist/components/Badge/filled/filledIconLabelBadges/index.js +2 -1
  13. package/dist/components/Badge/filled/filledOnlyIconBadges/index.js +2 -1
  14. package/dist/components/Badge/filled/filledOnlyLabelBadges/index.js +2 -1
  15. package/dist/components/Badge/index.js +3 -2
  16. package/dist/components/Badge/stroke/strokeIconLabelBadges/index.js +2 -1
  17. package/dist/components/Badge/stroke/strokeOnlyIconBadges/index.js +2 -1
  18. package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +2 -1
  19. package/dist/components/Badge/subtle/subtleIOnlyIconBadges/index.js +2 -1
  20. package/dist/components/Badge/subtle/subtleIconLabelBadges/index.js +2 -1
  21. package/dist/components/Badge/subtle/subtleOnlyLabelBadges/index.js +2 -1
  22. package/dist/components/BottomSheet/index.js +2 -1
  23. package/dist/components/Breadcrumbs/index.js +2 -1
  24. package/dist/components/Button/index.js +2 -1
  25. package/dist/components/ButtonGroup/index.js +2 -1
  26. package/dist/components/Card/index.js +2 -1
  27. package/dist/components/Chart/index.js +2 -1
  28. package/dist/components/Chatbot/index.js +2 -1
  29. package/dist/components/Checkbox/index.js +2 -1
  30. package/dist/components/Chips/index.js +2 -1
  31. package/dist/components/CreateItemFlow/index.js +2 -1
  32. package/dist/components/DatePicker/datePickerDropdown.js +2 -1
  33. package/dist/components/DatePicker/index.js +3 -2
  34. package/dist/components/DateRangePicker/dateRangePickerDropdown.js +2 -1
  35. package/dist/components/DateRangePicker/index.js +3 -2
  36. package/dist/components/DynamicLayout/index.js +2 -1
  37. package/dist/components/EmptyState/EmptyStateImage.d.ts.map +1 -1
  38. package/dist/components/EmptyState/EmptyStateImage.js +3 -2
  39. package/dist/components/EmptyState/index.js +2 -1
  40. package/dist/components/FileUpload/index.js +2 -1
  41. package/dist/components/FilterPanel/index.js +2 -1
  42. package/dist/components/FiltersStrip/index.js +2 -1
  43. package/dist/components/Header/index.js +2 -1
  44. package/dist/components/HomePage/index.js +2 -1
  45. package/dist/components/Input/index.js +2 -1
  46. package/dist/components/Loader/index.js +2 -1
  47. package/dist/components/Menu/IconMenuItem.js +2 -1
  48. package/dist/components/Menu/MenuHeaderInfo.js +2 -1
  49. package/dist/components/Menu/NestedMenuItem.js +2 -1
  50. package/dist/components/Menu/index.js +2 -1
  51. package/dist/components/Menu/nestedMenuItemsFromObject.js +2 -1
  52. package/dist/components/Modal/index.js +2 -1
  53. package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +2 -1
  54. package/dist/components/Notification/index.js +2 -1
  55. package/dist/components/Panel/index.js +2 -1
  56. package/dist/components/Popover/index.js +2 -1
  57. package/dist/components/ProgressBar/index.js +2 -1
  58. package/dist/components/Prompt/index.js +2 -1
  59. package/dist/components/RadioButtonGroup/index.js +2 -1
  60. package/dist/components/Select/index.js +2 -1
  61. package/dist/components/Sidebar/index.js +2 -1
  62. package/dist/components/Slider/index.js +2 -1
  63. package/dist/components/Stepper/index.js +2 -1
  64. package/dist/components/Switch/index.js +2 -1
  65. package/dist/components/Table/TableImpl.js +4 -3
  66. package/dist/components/TableChat/EmptyContainer.js +2 -1
  67. package/dist/components/TableChat/TableChatSidePanel.js +2 -1
  68. package/dist/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.js +2 -1
  69. package/dist/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.js +2 -1
  70. package/dist/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.js +2 -1
  71. package/dist/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.js +2 -1
  72. package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +2 -1
  73. package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +2 -1
  74. package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +2 -1
  75. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +2 -1
  76. package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -1
  77. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +2 -1
  78. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +2 -1
  79. package/dist/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.js +2 -1
  80. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +2 -1
  81. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +2 -1
  82. package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +2 -1
  83. package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +2 -1
  84. package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +2 -1
  85. package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +2 -1
  86. package/dist/components/TableChat/components/TextEditor/Mention.js +2 -1
  87. package/dist/components/TableChat/components/TextEditor/MentionList.js +2 -1
  88. package/dist/components/Tabs/index.js +2 -1
  89. package/dist/components/Tag/index.js +2 -1
  90. package/dist/components/TagGroup/index.js +2 -1
  91. package/dist/components/TextArea/index.js +2 -1
  92. package/dist/components/Toast/index.js +2 -1
  93. package/dist/components/Tooltip/index.js +2 -1
  94. package/dist/components/common/HelperText/index.js +2 -1
  95. package/dist/components/index.d.ts +0 -1
  96. package/dist/components/index.d.ts.map +1 -1
  97. package/dist/components/index.js +0 -1
  98. package/dist/mcp-component-registry.json +1 -1
  99. package/dist/styles/entry.d.ts +2 -0
  100. package/dist/styles/entry.d.ts.map +1 -0
  101. package/dist/styles/entry.js +1 -0
  102. package/dist/styles/style.css +1 -1
  103. package/eslint-plugin/index.js +91 -0
  104. package/eslint-plugin/rules/no-barrel-import.js +224 -0
  105. package/package.json +153 -89
  106. package/dist/0db32db10ae1525f.svg +0 -9
  107. package/dist/2bc76319b1fa572e.svg +0 -9
  108. package/dist/39d49e4daed1a992.svg +0 -9
  109. package/dist/44beedf64dc29d19.svg +0 -9
  110. package/dist/49a4f914058314f1.svg +0 -9
  111. package/dist/6fc8a59d621a04a1.svg +0 -13
  112. package/dist/78f845dcfc981491.svg +0 -9
  113. package/dist/b31c0c2a19c1c19a.svg +0 -9
  114. package/dist/index.js +0 -308
  115. package/dist/index.js.map +0 -1
  116. package/src/components/Accordion/Accordion.styles.scss +0 -118
  117. package/src/components/Accordion/index.js +0 -104
  118. package/src/components/AccordionModern/AccordionModern.styles.scss +0 -121
  119. package/src/components/AccordionModern/SortableAccordionComp.js +0 -156
  120. package/src/components/AccordionModern/index.js +0 -103
  121. package/src/components/Alert/Alert.styles.scss +0 -131
  122. package/src/components/Alert/index.js +0 -71
  123. package/src/components/Avatar/Avatar.styles.scss +0 -25
  124. package/src/components/Avatar/index.js +0 -58
  125. package/src/components/Badge/Badges.style.scss +0 -55
  126. package/src/components/Badge/filled/filledIconLabelBadges/filledIconLabelBadges.styles.scss +0 -32
  127. package/src/components/Badge/filled/filledIconLabelBadges/index.js +0 -38
  128. package/src/components/Badge/filled/filledOnlyIconBadges/filledOnlyIconBadges.styles.scss +0 -26
  129. package/src/components/Badge/filled/filledOnlyIconBadges/index.js +0 -31
  130. package/src/components/Badge/filled/filledOnlyLabelBadges/filledOnlyLabelBadges.styles.scss +0 -66
  131. package/src/components/Badge/filled/filledOnlyLabelBadges/index.js +0 -31
  132. package/src/components/Badge/filled/index.js +0 -30
  133. package/src/components/Badge/index.js +0 -53
  134. package/src/components/Badge/stroke/index.js +0 -43
  135. package/src/components/Badge/stroke/strokeIconLabelBadges/index.js +0 -38
  136. package/src/components/Badge/stroke/strokeIconLabelBadges/strokeIconLabelBadges.styles.scss +0 -33
  137. package/src/components/Badge/stroke/strokeOnlyIconBadges/index.js +0 -31
  138. package/src/components/Badge/stroke/strokeOnlyIconBadges/strokeOnlyIconBadges.styles.scss +0 -27
  139. package/src/components/Badge/stroke/strokeOnlyLabelBadges/index.js +0 -31
  140. package/src/components/Badge/stroke/strokeOnlyLabelBadges/strokeOnlyLabelBadges.styles.scss +0 -89
  141. package/src/components/Badge/styles.css +0 -52
  142. package/src/components/Badge/subtle/index.js +0 -41
  143. package/src/components/Badge/subtle/subtleIOnlyIconBadges/index.js +0 -31
  144. package/src/components/Badge/subtle/subtleIOnlyIconBadges/subtleIOnlyIconBadges.scss +0 -26
  145. package/src/components/Badge/subtle/subtleIconLabelBadges/index.js +0 -38
  146. package/src/components/Badge/subtle/subtleIconLabelBadges/subtleIconLabelBadges.scss +0 -56
  147. package/src/components/Badge/subtle/subtleOnlyLabelBadges/index.js +0 -31
  148. package/src/components/Badge/subtle/subtleOnlyLabelBadges/subtleOnlyLabelBadges.scss +0 -70
  149. package/src/components/BottomSheet/BottomSheet.styles.scss +0 -46
  150. package/src/components/BottomSheet/index.js +0 -60
  151. package/src/components/Breadcrumbs/Breadcrumbs.styles.scss +0 -65
  152. package/src/components/Breadcrumbs/index.js +0 -121
  153. package/src/components/Button/Button.styles.scss +0 -345
  154. package/src/components/Button/index.js +0 -171
  155. package/src/components/ButtonGroup/ButtonGroup.styles.scss +0 -125
  156. package/src/components/ButtonGroup/index.js +0 -84
  157. package/src/components/Card/Card.styles.scss +0 -33
  158. package/src/components/Card/index.js +0 -21
  159. package/src/components/Chart/Chart.style.scss +0 -142
  160. package/src/components/Chart/index.js +0 -752
  161. package/src/components/ChatBot/bookMarkPanel.js +0 -74
  162. package/src/components/ChatBot/chatBot.style.scss +0 -1295
  163. package/src/components/ChatBot/chatBotFooter.js +0 -14
  164. package/src/components/ChatBot/chatBotLandingScreen.js +0 -26
  165. package/src/components/ChatBot/chatInput.js +0 -206
  166. package/src/components/ChatBot/chatbotModuleMenu.js +0 -278
  167. package/src/components/ChatBot/constant.js +0 -32
  168. package/src/components/ChatBot/conversationScreen.js +0 -281
  169. package/src/components/ChatBot/customScreen.js +0 -69
  170. package/src/components/ChatBot/historyPanel.js +0 -579
  171. package/src/components/ChatBot/index.js +0 -473
  172. package/src/components/ChatBot/newChatComponent.js +0 -105
  173. package/src/components/ChatBot/utils.js +0 -27
  174. package/src/components/Checkbox/Checkbox.styles.scss +0 -232
  175. package/src/components/Checkbox/dashed/index.js +0 -34
  176. package/src/components/Checkbox/default/index.js +0 -70
  177. package/src/components/Checkbox/index.js +0 -50
  178. package/src/components/Checkbox/withDropDown/index.js +0 -96
  179. package/src/components/Checkbox/withoutFormLabel/index.js +0 -46
  180. package/src/components/Chips/Chip.style.scss +0 -134
  181. package/src/components/Chips/index.js +0 -34
  182. package/src/components/CreateItemFlow/CreateItemFlow.styles.scss +0 -37
  183. package/src/components/CreateItemFlow/index.js +0 -145
  184. package/src/components/DatePicker/DatePicker.styles.scss +0 -519
  185. package/src/components/DatePicker/datePickerDropdown.js +0 -282
  186. package/src/components/DatePicker/datePickerFooter.js +0 -76
  187. package/src/components/DatePicker/datePickerInput.js +0 -333
  188. package/src/components/DatePicker/index.js +0 -288
  189. package/src/components/DatePicker/showMonthYearSelect.js +0 -119
  190. package/src/components/DateRangePicker/DateRangePicker.styles.scss +0 -635
  191. package/src/components/DateRangePicker/dateRangePickerCustom.js +0 -22
  192. package/src/components/DateRangePicker/dateRangePickerDropdown.js +0 -320
  193. package/src/components/DateRangePicker/dateRangePickerFooter.js +0 -50
  194. package/src/components/DateRangePicker/dateRangePickerInput.js +0 -544
  195. package/src/components/DateRangePicker/index.js +0 -393
  196. package/src/components/DateRangePicker/showMonthYearSelect.js +0 -103
  197. package/src/components/DateRangePicker/utils.js +0 -71
  198. package/src/components/DynamicLayout/DynamicLayout.styles.scss +0 -153
  199. package/src/components/DynamicLayout/index.js +0 -73
  200. package/src/components/EmptyState/EmptyState.styles.scss +0 -88
  201. package/src/components/EmptyState/EmptyStateImageComponent.jsx +0 -36
  202. package/src/components/EmptyState/index.js +0 -54
  203. package/src/components/FileUpload/FileUpload.styles.scss +0 -449
  204. package/src/components/FileUpload/index.js +0 -641
  205. package/src/components/FilterPanel/FilterPanel.styles.scss +0 -241
  206. package/src/components/FilterPanel/FilterPanelHeader.js +0 -15
  207. package/src/components/FilterPanel/PanelFooter.js +0 -65
  208. package/src/components/FilterPanel/PanelSidebar.js +0 -85
  209. package/src/components/FilterPanel/index.js +0 -147
  210. package/src/components/FiltersStrip/FiltersStrip.styles.scss +0 -343
  211. package/src/components/FiltersStrip/Slider/FilterSlider.styles.scss +0 -85
  212. package/src/components/FiltersStrip/Slider/Portal.js +0 -59
  213. package/src/components/FiltersStrip/Slider/index.js +0 -233
  214. package/src/components/FiltersStrip/appliedFilter.js +0 -180
  215. package/src/components/FiltersStrip/filterDropDown.js +0 -96
  216. package/src/components/FiltersStrip/index.js +0 -127
  217. package/src/components/FiltersStrip/mockData.js +0 -227
  218. package/src/components/Header/Header.styles.scss +0 -223
  219. package/src/components/Header/index.js +0 -156
  220. package/src/components/HomePage/HomePage.styles.scss +0 -1638
  221. package/src/components/HomePage/constant.js +0 -331
  222. package/src/components/HomePage/index.js +0 -675
  223. package/src/components/Input/Input.styles.scss +0 -318
  224. package/src/components/Input/helperText.js +0 -19
  225. package/src/components/Input/index.js +0 -60
  226. package/src/components/Input/inputWithIcon.js +0 -134
  227. package/src/components/Input/vanilaInput.js +0 -68
  228. package/src/components/Loader/Loader.styles.scss +0 -90
  229. package/src/components/Loader/index.js +0 -69
  230. package/src/components/Menu/IconMenuItem.js +0 -100
  231. package/src/components/Menu/Menu.styles.scss +0 -190
  232. package/src/components/Menu/MenuHeader.jsx +0 -84
  233. package/src/components/Menu/MenuHeaderInfo.jsx +0 -319
  234. package/src/components/Menu/MenuHeaderInfo.styles.scss +0 -123
  235. package/src/components/Menu/NestedMenuItem.js +0 -189
  236. package/src/components/Menu/index.js +0 -254
  237. package/src/components/Menu/nestedMenuItemsFromObject.js +0 -100
  238. package/src/components/Modal/Modal.styles.scss +0 -129
  239. package/src/components/Modal/index.js +0 -141
  240. package/src/components/MonthPicker/MonthPicker.styles.scss +0 -255
  241. package/src/components/MonthPicker/constant.js +0 -1
  242. package/src/components/MonthPicker/index.js +0 -373
  243. package/src/components/MonthRangePicker/MonthRangePicker.styles.scss +0 -383
  244. package/src/components/MonthRangePicker/constant.js +0 -1
  245. package/src/components/MonthRangePicker/index.js +0 -574
  246. package/src/components/Notification/Notification.styles.scss +0 -594
  247. package/src/components/Notification/NotificationBody/NotificationInfoList/chipsLists.js +0 -144
  248. package/src/components/Notification/NotificationBody/NotificationInfoList/index.js +0 -128
  249. package/src/components/Notification/NotificationBody/NotificationInfoList/notificationList.js +0 -165
  250. package/src/components/Notification/NotificationBody/NotificationPanels/chipsLists.js +0 -85
  251. package/src/components/Notification/NotificationBody/NotificationPanels/index.js +0 -259
  252. package/src/components/Notification/NotificationBody/NotificationPanels/notificationList.js +0 -637
  253. package/src/components/Notification/NotificationBody/index.js +0 -117
  254. package/src/components/Notification/index.js +0 -128
  255. package/src/components/Notification/mockData.js +0 -389
  256. package/src/components/Notification/notificationFooter.js +0 -31
  257. package/src/components/Notification/notificationHeader.js +0 -28
  258. package/src/components/Panel/Panel.styles.scss +0 -71
  259. package/src/components/Panel/index.js +0 -144
  260. package/src/components/Popover/Popover.styles.scss +0 -52
  261. package/src/components/Popover/index.js +0 -71
  262. package/src/components/Portal/index.js +0 -31
  263. package/src/components/ProgressBar/ProgressBar.styles.scss +0 -62
  264. package/src/components/ProgressBar/index.js +0 -40
  265. package/src/components/Prompt/Prompt.styles.scss +0 -107
  266. package/src/components/Prompt/index.js +0 -107
  267. package/src/components/RadioButtonGroup/RadioButtonGroup.styles.scss +0 -136
  268. package/src/components/RadioButtonGroup/index.js +0 -107
  269. package/src/components/Select/SearchFilter.js +0 -72
  270. package/src/components/Select/Select.styles.scss +0 -748
  271. package/src/components/Select/customGroupHeading.js +0 -24
  272. package/src/components/Select/dropdown.js +0 -65
  273. package/src/components/Select/hooks/index.js +0 -2
  274. package/src/components/Select/hooks/useClickOutside.js +0 -61
  275. package/src/components/Select/hooks/useMenuPosition.js +0 -288
  276. package/src/components/Select/index.js +0 -1307
  277. package/src/components/Select/menuList.js +0 -119
  278. package/src/components/Select/optionList.js +0 -215
  279. package/src/components/Select/selected-option-tags.js +0 -99
  280. package/src/components/Select/utils.js +0 -232
  281. package/src/components/Sidebar/Menus/childMenu.js +0 -88
  282. package/src/components/Sidebar/Menus/index.js +0 -130
  283. package/src/components/Sidebar/Menus/parentMenu.js +0 -173
  284. package/src/components/Sidebar/Sidebar.styles.scss +0 -411
  285. package/src/components/Sidebar/actions.js +0 -31
  286. package/src/components/Sidebar/index.js +0 -84
  287. package/src/components/Sidebar/mock.js +0 -202
  288. package/src/components/Slider/Sliders.styles.scss +0 -260
  289. package/src/components/Slider/index.js +0 -314
  290. package/src/components/Stepper/Stepper.styles.scss +0 -355
  291. package/src/components/Stepper/index.js +0 -101
  292. package/src/components/Switch/Switch.styles.scss +0 -96
  293. package/src/components/Switch/index.js +0 -59
  294. package/src/components/Table/AdvanceSearchModalItem.js +0 -392
  295. package/src/components/Table/AdvanceSortModal.js +0 -332
  296. package/src/components/Table/AgGridHeader.js +0 -1009
  297. package/src/components/Table/CommentsPortal.js +0 -428
  298. package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +0 -323
  299. package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +0 -476
  300. package/src/components/Table/NoComments.js +0 -295
  301. package/src/components/Table/Table.styles.scss +0 -3859
  302. package/src/components/Table/actionBar.js +0 -43
  303. package/src/components/Table/advanceSearchModal.js +0 -797
  304. package/src/components/Table/commentPanel.js +0 -421
  305. package/src/components/Table/filterUtils.js +0 -850
  306. package/src/components/Table/index.js +0 -2175
  307. package/src/components/Table/mockData.js +0 -1344
  308. package/src/components/Table/tableFunctions.js +0 -1676
  309. package/src/components/Table/tableHeader.js +0 -476
  310. package/src/components/Table/tableIcons.js +0 -61
  311. package/src/components/Table/tableMoreOptions.js +0 -293
  312. package/src/components/Table/tablePagination.js +0 -63
  313. package/src/components/Table/tableSettings.js +0 -287
  314. package/src/components/Table/withCommentIcon.js +0 -107
  315. package/src/components/TableChat/EmptyContainer.jsx +0 -13
  316. package/src/components/TableChat/README.md +0 -588
  317. package/src/components/TableChat/TableChatSidePanel.jsx +0 -832
  318. package/src/components/TableChat/TableChatSidePanel.styles.scss +0 -57
  319. package/src/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.jsx +0 -43
  320. package/src/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.jsx +0 -55
  321. package/src/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.jsx +0 -94
  322. package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.jsx +0 -22
  323. package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.scss +0 -179
  324. package/src/components/TableChat/components/SkeletonList.jsx +0 -12
  325. package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.jsx +0 -171
  326. package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.styles.scss +0 -37
  327. package/src/components/TableChat/components/TableChatLeftSection/ChannelCheckbox/ChannelCheckbox.jsx +0 -28
  328. package/src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.jsx +0 -116
  329. package/src/components/TableChat/components/TableChatLeftSection/ChatChannelList.jsx +0 -89
  330. package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.jsx +0 -27
  331. package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.jsx +0 -191
  332. package/src/components/TableChat/components/TableChatLeftSection/ChatIconButton/ChatIconButton.jsx +0 -23
  333. package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.jsx +0 -117
  334. package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.styles.scss +0 -469
  335. package/src/components/TableChat/components/TableChatLeftSection/UnreadBadge/UnreadBadge.jsx +0 -16
  336. package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.jsx +0 -119
  337. package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.styles.scss +0 -87
  338. package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.jsx +0 -216
  339. package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.styles.scss +0 -291
  340. package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.jsx +0 -19
  341. package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/DeletedMessage.styles.scss +0 -55
  342. package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.jsx +0 -61
  343. package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.styles.scss +0 -13
  344. package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.jsx +0 -432
  345. package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.jsx +0 -365
  346. package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.jsx +0 -42
  347. package/src/components/TableChat/components/TableChatRightSection/ChatHeader/chatHeader.styles.scss +0 -323
  348. package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.jsx +0 -793
  349. package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.styles.scss +0 -394
  350. package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.jsx +0 -61
  351. package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.styles.scss +0 -28
  352. package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.jsx +0 -11
  353. package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.styles.scss +0 -3
  354. package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.jsx +0 -220
  355. package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.styles.scss +0 -128
  356. package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.jsx +0 -246
  357. package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.styles.scss +0 -210
  358. package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.jsx +0 -52
  359. package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.styles.scss +0 -34
  360. package/src/components/TableChat/components/TableChatRightSection/EmojiPicker/EmojiPicker.jsx +0 -31
  361. package/src/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.jsx +0 -170
  362. package/src/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.jsx +0 -165
  363. package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChat.styles.scss +0 -587
  364. package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.jsx +0 -244
  365. package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.jsx +0 -29
  366. package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.styles.scss +0 -47
  367. package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.jsx +0 -1340
  368. package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.styles.scss +0 -147
  369. package/src/components/TableChat/components/TextEditor/EditorToolbar.jsx +0 -209
  370. package/src/components/TableChat/components/TextEditor/EditorToolbar.styles.scss +0 -61
  371. package/src/components/TableChat/components/TextEditor/Mention.jsx +0 -234
  372. package/src/components/TableChat/components/TextEditor/MentionList.jsx +0 -118
  373. package/src/components/TableChat/components/TextEditor/MentionList.scss +0 -146
  374. package/src/components/TableChat/components/TextEditor/styles.scss +0 -278
  375. package/src/components/TableChat/components/TextEditor/suggestion.js +0 -124
  376. package/src/components/TableChat/components/chatConfig.js +0 -64
  377. package/src/components/TableChat/hooks/useInfiniteScroll.js +0 -256
  378. package/src/components/TableOld/AgGridHeader.js +0 -545
  379. package/src/components/TableOld/Table.styles.scss +0 -2192
  380. package/src/components/TableOld/actionBar.js +0 -43
  381. package/src/components/TableOld/index.js +0 -598
  382. package/src/components/TableOld/mockData.js +0 -1344
  383. package/src/components/TableOld/tableFunctions.js +0 -1734
  384. package/src/components/TableOld/tableHeader.js +0 -251
  385. package/src/components/TableOld/tableIcons.js +0 -61
  386. package/src/components/TableOld/tablePagination.js +0 -64
  387. package/src/components/TableOld/tableSettings.js +0 -166
  388. package/src/components/Tabs/Tabs.styles.scss +0 -120
  389. package/src/components/Tabs/index.js +0 -91
  390. package/src/components/Tabs/tabPanel.js +0 -38
  391. package/src/components/Tag/Tags.styles.scss +0 -71
  392. package/src/components/Tag/filled.js +0 -48
  393. package/src/components/Tag/index.js +0 -54
  394. package/src/components/Tag/solid.js +0 -47
  395. package/src/components/Tag/stroke.js +0 -47
  396. package/src/components/Tag/utils.js +0 -12
  397. package/src/components/TagGroup/TagGroup.styles.scss +0 -7
  398. package/src/components/TagGroup/index.js +0 -6
  399. package/src/components/TextArea/TextArea.styles.scss +0 -158
  400. package/src/components/TextArea/index.js +0 -121
  401. package/src/components/Toast/Toast.styles.scss +0 -66
  402. package/src/components/Toast/index.js +0 -35
  403. package/src/components/Tooltip/Tooltips.styles.scss +0 -111
  404. package/src/components/Tooltip/index.js +0 -68
  405. package/src/components/common/HelperText/HelperText.styles.scss +0 -18
  406. package/src/components/common/HelperText/index.js +0 -44
  407. package/src/components/common/MentionEditor/MentionEditor.styles.scss +0 -301
  408. package/src/components/common/MentionEditor/MentionList/MentionList.styles.scss +0 -146
  409. package/src/components/common/MentionEditor/MentionList/index.js +0 -130
  410. package/src/components/common/MentionEditor/index.js +0 -246
  411. package/src/components/common/MentionEditor/suggestion.js +0 -124
  412. package/src/components/index.js +0 -53
  413. package/src/stories/Accordion.stories.js +0 -151
  414. package/src/stories/AccordionModern.stories.js +0 -263
  415. package/src/stories/Alert.stories.js +0 -103
  416. package/src/stories/Avatar.stories.js +0 -79
  417. package/src/stories/Badge.stories.js +0 -112
  418. package/src/stories/BottomSheet.stories.js +0 -224
  419. package/src/stories/Breadcrumbs.stories.js +0 -143
  420. package/src/stories/Button.stories.js +0 -190
  421. package/src/stories/ButtonGroup.stories.js +0 -123
  422. package/src/stories/Card.stories.js +0 -73
  423. package/src/stories/Changelog.mdx +0 -1006
  424. package/src/stories/Chart.stories.js +0 -2017
  425. package/src/stories/ChatBot.stories.js +0 -668
  426. package/src/stories/Checkbox.stories.js +0 -209
  427. package/src/stories/Chips.stories.js +0 -106
  428. package/src/stories/CreateItemFlow.stories.js +0 -255
  429. package/src/stories/DatePicker.stories.js +0 -311
  430. package/src/stories/DateRangePicker.stories.js +0 -364
  431. package/src/stories/EmptyState.stories.js +0 -110
  432. package/src/stories/FileUpload.stories.js +0 -169
  433. package/src/stories/FilterPanel.stories.js +0 -309
  434. package/src/stories/FiltersStrip.stories.js +0 -244
  435. package/src/stories/GettingStarted.mdx +0 -153
  436. package/src/stories/Header.stories.js +0 -185
  437. package/src/stories/HomePage.stories.js +0 -201
  438. package/src/stories/Input.stories.js +0 -165
  439. package/src/stories/Loader.stories.js +0 -33
  440. package/src/stories/Menu.stories.js +0 -309
  441. package/src/stories/Modal.stories.js +0 -185
  442. package/src/stories/MonthPicker.stories.js +0 -313
  443. package/src/stories/MonthRangePicker.stories.js +0 -255
  444. package/src/stories/Notification.stories.js +0 -500
  445. package/src/stories/Panel.stories.js +0 -179
  446. package/src/stories/Popover.stories.js +0 -125
  447. package/src/stories/ProgressBar.stories.js +0 -93
  448. package/src/stories/Prompt.stories.js +0 -120
  449. package/src/stories/RadioButtonGroup.stories.js +0 -83
  450. package/src/stories/Select.stories.js +0 -753
  451. package/src/stories/Sidebar.stories.js +0 -177
  452. package/src/stories/Slider.stories.js +0 -226
  453. package/src/stories/Stepper.stories.js +0 -158
  454. package/src/stories/Switch.stories.js +0 -72
  455. package/src/stories/Table.stories.js +0 -4323
  456. package/src/stories/TableChat.mdx +0 -992
  457. package/src/stories/TableChat.stories.js +0 -1712
  458. package/src/stories/TableOld.stories.js +0 -954
  459. package/src/stories/Tabs.stories.js +0 -253
  460. package/src/stories/Tag.stories.js +0 -92
  461. package/src/stories/TagGroup.stories.js +0 -39
  462. package/src/stories/TextArea.stories.js +0 -148
  463. package/src/stories/Toast.stories.js +0 -113
  464. package/src/stories/Tooltip.stories.js +0 -86
  465. package/src/stories/storybookLinks.mdx +0 -20
@@ -1,57 +0,0 @@
1
- @import "../../styles/index.scss";
2
-
3
- #table-chat-side-panel {
4
- .impact_drawer_container {
5
- background: $whiteColor;
6
- }
7
-
8
- .impact_drawer_header {
9
- background: $lightBlueColor;
10
- border-bottom: 1px solid $disabledSecondaryBorder;
11
- }
12
-
13
- .impact_drawer_body {
14
- padding: 0;
15
- }
16
- }
17
-
18
- .table-chat-container {
19
- display: flex;
20
- height: 100%;
21
- width: 100%;
22
- gap: 10px;
23
- flex-direction: row;
24
- }
25
-
26
- .empty-container {
27
- display: flex;
28
- justify-content: center;
29
- align-items: center;
30
-
31
- img {
32
- width: 190px;
33
- height: 197px;
34
- }
35
- p:nth-of-type(1) {
36
- color: $mainFontColor;
37
-
38
- font-size: 20px;
39
- font-style: normal;
40
- font-weight: $ExtraFontWeight;
41
- line-height: 30px; /* 150% */
42
- }
43
-
44
- p:nth-of-type(2) {
45
- color: $inputInfoColor;
46
- text-align: center;
47
- font-size: 16px;
48
- font-style: normal;
49
- font-weight: $normalFontWeight;
50
- line-height: 125%; /* 20px */
51
- }
52
- }
53
-
54
- .loader-padding {
55
- padding: 16px;
56
- width: 100%;
57
- }
@@ -1,43 +0,0 @@
1
- // components/chat/skeletons/ChatFooterSkeleton.jsx
2
- import React from "react";
3
- import Skeleton from "@mui/material/Skeleton";
4
- import "./ChatSkeleton.scss";
5
-
6
- const ChatFooterSkeleton = () => {
7
- return (
8
- <div className="chat-footer-skeleton">
9
- <div className="chat-actions">
10
- <Skeleton
11
- variant="rectangular"
12
- width={80}
13
- height={24}
14
- className="action-skeleton"
15
- style={{ borderRadius: "12px" }}
16
- />
17
- </div>
18
- <div className="chat-input-container">
19
- <Skeleton
20
- variant="rectangular"
21
- width="100%"
22
- height={40}
23
- className="input-skeleton"
24
- style={{ borderRadius: "20px" }}
25
- />
26
- <Skeleton
27
- variant="circular"
28
- width={36}
29
- height={36}
30
- className="emoji-skeleton"
31
- />
32
- <Skeleton
33
- variant="circular"
34
- width={40}
35
- height={40}
36
- className="send-skeleton"
37
- />
38
- </div>
39
- </div>
40
- );
41
- };
42
-
43
- export default ChatFooterSkeleton;
@@ -1,55 +0,0 @@
1
- // components/chat/skeletons/ChatHeaderSkeleton.jsx
2
- import React from "react";
3
- import Skeleton from "@mui/material/Skeleton";
4
- import "./ChatSkeleton.scss";
5
-
6
- const ChatHeaderSkeleton = () => {
7
- return (
8
- <div className="chat-header-skeleton">
9
- <div className="chat-header-left">
10
- <Skeleton
11
- variant="circular"
12
- width={40}
13
- height={40}
14
- className="avatar-skeleton"
15
- />
16
- <div className="chat-info">
17
- <Skeleton
18
- variant="text"
19
- width={120}
20
- height={24}
21
- className="title-skeleton"
22
- />
23
- <Skeleton
24
- variant="text"
25
- width={80}
26
- height={16}
27
- className="status-skeleton"
28
- />
29
- </div>
30
- </div>
31
- <div className="chat-header-right">
32
- <Skeleton
33
- variant="circular"
34
- width={36}
35
- height={36}
36
- className="icon-skeleton"
37
- />
38
- <Skeleton
39
- variant="circular"
40
- width={36}
41
- height={36}
42
- className="icon-skeleton"
43
- />
44
- <Skeleton
45
- variant="circular"
46
- width={36}
47
- height={36}
48
- className="icon-skeleton"
49
- />
50
- </div>
51
- </div>
52
- );
53
- };
54
-
55
- export default ChatHeaderSkeleton;
@@ -1,94 +0,0 @@
1
- // components/chat/skeletons/ChatMessageListSkeleton.jsx
2
- import React from "react";
3
- import Skeleton from "@mui/material/Skeleton";
4
- import "./ChatSkeleton.scss";
5
-
6
- const ChatMessageListSkeleton = ({ className, messageCount = 8 }) => {
7
- // Generate skeleton messages with different widths for variety
8
- const renderSkeletonMessages = () => {
9
- const messages = [];
10
- // const messageCount = 8; // Number of skeleton messages to show
11
-
12
- for (let i = 0; i < messageCount; i++) {
13
- const isOwnMessage = i % 3 === 0; // Every third message is "own" message
14
- const hasDateSeparator = i % 4 === 0; // Every fourth message has a date separator
15
-
16
- if (hasDateSeparator) {
17
- messages.push(
18
- <div key={`date-${i}`} className="date-separator-skeleton">
19
- <Skeleton
20
- variant="text"
21
- width={80}
22
- height={16}
23
- className="date-skeleton"
24
- />
25
- </div>
26
- );
27
- }
28
-
29
- messages.push(
30
- <div
31
- key={`msg-${i}`}
32
- className={`message-skeleton ${isOwnMessage ? "own-message" : ""}`}
33
- >
34
- {!isOwnMessage && (
35
- <Skeleton
36
- variant="circular"
37
- width={32}
38
- height={32}
39
- className="message-avatar-skeleton"
40
- />
41
- )}
42
- <div className="message-content-skeleton">
43
- {!isOwnMessage && (
44
- <Skeleton
45
- variant="text"
46
- width={100}
47
- height={16}
48
- className="sender-skeleton"
49
- />
50
- )}
51
- <Skeleton
52
- variant="text"
53
- width={isOwnMessage ? 200 : 180}
54
- height={20}
55
- className="text-skeleton"
56
- />
57
- <Skeleton
58
- variant="text"
59
- width={isOwnMessage ? 160 : 220}
60
- height={20}
61
- className="text-skeleton"
62
- />
63
- <div className="message-meta-skeleton">
64
- <Skeleton
65
- variant="text"
66
- width={60}
67
- height={14}
68
- className="time-skeleton"
69
- />
70
- {isOwnMessage && (
71
- <Skeleton
72
- variant="circular"
73
- width={16}
74
- height={16}
75
- className="status-skeleton"
76
- />
77
- )}
78
- </div>
79
- </div>
80
- </div>
81
- );
82
- }
83
-
84
- return messages;
85
- };
86
-
87
- return (
88
- <div className={`chat-message-list-skeleton ${className}`}>
89
- {renderSkeletonMessages()}
90
- </div>
91
- );
92
- };
93
-
94
- export default ChatMessageListSkeleton;
@@ -1,22 +0,0 @@
1
- // components/chat/skeletons/ChatSkeleton.jsx
2
- import React from "react";
3
- import ChatHeaderSkeleton from "./ChatHeaderSkeleton";
4
- import ChatMessageListSkeleton from "./ChatMessageListSkeleton";
5
- import ChatFooterSkeleton from "./ChatFooterSkeleton";
6
- import "./ChatSkeleton.scss";
7
-
8
- const ChatSkeleton = () => {
9
- return (
10
- <div className="chat-skeleton-container">
11
- <div className="chat-skeleton">
12
- <ChatHeaderSkeleton />
13
- <div className="chat-body">
14
- <ChatMessageListSkeleton />
15
- </div>
16
- <ChatFooterSkeleton />
17
- </div>
18
- </div>
19
- );
20
- };
21
-
22
- export default ChatSkeleton;
@@ -1,179 +0,0 @@
1
- // components/chat/skeletons/ChatSkeleton.scss
2
- .chat-skeleton-container {
3
- width: 100%;
4
- max-width: 610px;
5
- height: 100%;
6
- display: flex;
7
- flex-direction: column;
8
- background-color: #f9f9f9;
9
- border-radius: 8px;
10
- overflow: hidden;
11
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
12
- }
13
-
14
- .chat-skeleton {
15
- display: flex;
16
- flex-direction: column;
17
- height: 100%;
18
- width: 100%;
19
- }
20
-
21
- // Header Skeleton Styles
22
- .chat-header-skeleton {
23
- display: flex;
24
- justify-content: space-between;
25
- align-items: center;
26
- padding: 12px 16px;
27
- border-bottom: 1px solid #e0e0e0;
28
- background-color: #fff;
29
- }
30
-
31
- .chat-header-left {
32
- display: flex;
33
- align-items: center;
34
- gap: 12px;
35
- }
36
-
37
- .chat-info {
38
- display: flex;
39
- flex-direction: column;
40
- gap: 4px;
41
- }
42
-
43
- .chat-header-right {
44
- display: flex;
45
- align-items: center;
46
- gap: 8px;
47
- }
48
-
49
- // Message List Skeleton Styles
50
- .chat-body {
51
- flex: 1;
52
- overflow-y: auto;
53
- padding: 16px;
54
- background-color: #f5f5f5;
55
- }
56
-
57
- .chat-message-list-skeleton {
58
- display: flex;
59
- flex-direction: column;
60
- gap: 16px;
61
- width: 100%;
62
- }
63
-
64
- .thread-skeleton {
65
- max-width: 550px;
66
- }
67
-
68
- .date-separator-skeleton {
69
- display: flex;
70
- justify-content: center;
71
- margin: 8px 0;
72
- }
73
-
74
- .message-skeleton {
75
- display: flex;
76
- gap: 8px;
77
- width: 100%;
78
- max-width: 70%;
79
-
80
- &.own-message {
81
- align-self: flex-end;
82
- flex-direction: row-reverse;
83
- }
84
- }
85
-
86
- .message-content-skeleton {
87
- display: flex;
88
- flex-direction: column;
89
- gap: 4px;
90
- }
91
-
92
- .message-meta-skeleton {
93
- display: flex;
94
- align-items: center;
95
- gap: 4px;
96
- margin-top: 4px;
97
- }
98
-
99
- // Footer Skeleton Styles
100
- .chat-footer-skeleton {
101
- padding: 12px 16px;
102
- border-top: 1px solid #e0e0e0;
103
- background-color: #fff;
104
- }
105
-
106
- .chat-input-container {
107
- display: flex;
108
- align-items: center;
109
- gap: 8px;
110
- }
111
-
112
- .chat-actions {
113
- display: flex;
114
- gap: 8px;
115
- align-items: center;
116
- justify-content: flex-end;
117
- margin-bottom: 4px;
118
- }
119
-
120
- // Skeleton specific styles
121
- .avatar-skeleton {
122
- background-color: #e0e0e0;
123
- }
124
-
125
- .title-skeleton {
126
- background-color: #e0e0e0;
127
- }
128
-
129
- .status-skeleton {
130
- background-color: #e0e0e0;
131
- }
132
-
133
- .icon-skeleton {
134
- background-color: #e0e0e0;
135
- }
136
-
137
- .date-skeleton {
138
- background-color: #e0e0e0;
139
- }
140
-
141
- .message-avatar-skeleton {
142
- background-color: #e0e0e0;
143
- }
144
-
145
- .sender-skeleton {
146
- background-color: #e0e0e0;
147
- }
148
-
149
- .text-skeleton {
150
- background-color: #e0e0e0;
151
- }
152
-
153
- .time-skeleton {
154
- background-color: #e0e0e0;
155
- }
156
-
157
- .status-skeleton {
158
- background-color: #e0e0e0;
159
- }
160
-
161
- .attach-skeleton {
162
- background-color: #e0e0e0;
163
- }
164
-
165
- .input-skeleton {
166
- background-color: #e0e0e0;
167
- }
168
-
169
- .emoji-skeleton {
170
- background-color: #e0e0e0;
171
- }
172
-
173
- .send-skeleton {
174
- background-color: #e0e0e0;
175
- }
176
-
177
- .action-skeleton {
178
- background-color: #e0e0e0;
179
- }
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Loader } from "../../Loader";
3
-
4
- export const SkeletonList = ({ count = 5, text = "Loading..." }) => (
5
- <div className="table-chat-right-section-container-empty loader-padding">
6
- {[...Array(count)].map((_, i) => (
7
- <div key={i} style={{ marginBottom: 20 }}>
8
- <Loader progress="100%" showSkeleton size="large" text={text} />
9
- </div>
10
- ))}
11
- </div>
12
- );
@@ -1,171 +0,0 @@
1
- import React, { useEffect, useRef } from "react";
2
- import { useForm, Controller } from "react-hook-form";
3
- import { Input } from "../../../../Input";
4
- import { TextArea } from "../../../../TextArea";
5
- import { Button } from "../../../../Button";
6
- import "./AddChatContainer.styles.scss";
7
-
8
- // Validation rules
9
- const validationRules = {
10
- chatName: {
11
- required: "Chat name is required",
12
- minLength: {
13
- value: 2,
14
- message: "Chat name must be at least 2 characters long",
15
- },
16
- maxLength: {
17
- value: 50,
18
- message: "Chat name cannot exceed 50 characters",
19
- },
20
- // pattern: {
21
- // value: /^[a-zA-Z0-9\s\-_]+$/,
22
- // message:
23
- // "Chat name can only contain letters, numbers, spaces, hyphens, and underscores",
24
- // },
25
- },
26
- chatDescription: {
27
- maxLength: {
28
- value: 100,
29
- message: "Description cannot exceed 100 characters",
30
- },
31
- },
32
- };
33
-
34
- const AddChat = ({
35
- setShowAddChat,
36
- handleChatName,
37
- selectedChannelInfo,
38
- handleToast,
39
- setIsCreateNewChatOpen,
40
- }) => {
41
- const containerRef = useRef(null);
42
-
43
- const {
44
- control,
45
- handleSubmit,
46
- formState: { errors, isSubmitting, isValid },
47
- reset,
48
- } = useForm({
49
- mode: "onSubmit", // Validate on change for real-time feedback
50
- defaultValues: {
51
- chatName: "",
52
- chatDescription: "",
53
- },
54
- });
55
-
56
- useEffect(() => {
57
- function handleClickOutside(event) {
58
- if (
59
- containerRef.current &&
60
- !containerRef.current.contains(event.target)
61
- ) {
62
- handleCancel();
63
- }
64
- }
65
- document.addEventListener("mousedown", handleClickOutside);
66
- return () => {
67
- document.removeEventListener("mousedown", handleClickOutside);
68
- };
69
- }, []);
70
-
71
- // Form submission handler
72
- const onSubmit = async (data) => {
73
- try {
74
- // 👇 Call the root function with validated data
75
- const response = await handleChatName(data, selectedChannelInfo);
76
-
77
- handleToast(true, "Chat saved successfully", "success");
78
-
79
- // ✅ Close container after success and reset form
80
- handleCancel();
81
- } catch (err) {
82
- console.error("Error while saving chat:", err);
83
- handleToast(true, "Error while saving chat", "error");
84
- // TODO: Add proper error handling/toast notification
85
- }
86
- };
87
-
88
- // Cancel handler - resets form and closes modal
89
- const handleCancel = () => {
90
- reset();
91
- setShowAddChat(false);
92
- setIsCreateNewChatOpen(false);
93
- };
94
-
95
- return (
96
- <div ref={containerRef} className="addChat_container">
97
- <form
98
- className="chatcontainer"
99
- onSubmit={handleSubmit(onSubmit)}
100
- noValidate
101
- >
102
- <Controller
103
- name="chatName"
104
- control={control}
105
- rules={validationRules.chatName}
106
- render={({ field }) => (
107
- <Input
108
- label="Chat name"
109
- placeholder="Price negotiation"
110
- type="text"
111
- isDisabled={isSubmitting}
112
- isError={!!errors.chatName}
113
- isHelperText={!!errors.chatName}
114
- helperText={errors.chatName?.message}
115
- value={field.value}
116
- onChange={field.onChange}
117
- onBlur={field.onBlur}
118
- name={field.name}
119
- />
120
- )}
121
- />
122
-
123
- <Controller
124
- name="chatDescription"
125
- control={control}
126
- rules={validationRules.chatDescription}
127
- render={({ field }) => (
128
- <TextArea
129
- label="Add description"
130
- placeholder="Lets review the latest changes"
131
- isDisabled={isSubmitting}
132
- height="80px"
133
- maxRows={2}
134
- characterLimit={100}
135
- width="100%"
136
- isError={!!errors.chatDescription}
137
- secondaryLabel={errors.chatDescription?.message}
138
- value={field.value || ""} // Ensure value is never undefined
139
- onChange={field.onChange}
140
- onBlur={field.onBlur}
141
- name={field.name}
142
- />
143
- )}
144
- />
145
-
146
- <div className="chatFooterContainer">
147
- <Button
148
- variant="tertiary"
149
- size="large"
150
- type="button"
151
- disabled={isSubmitting}
152
- onClick={handleCancel}
153
- >
154
- Cancel
155
- </Button>
156
- <Button
157
- className="chat_save_btn"
158
- variant="primary"
159
- size="large"
160
- type="submit"
161
- disabled={isSubmitting}
162
- >
163
- {isSubmitting ? <>Saving...</> : "Save"}
164
- </Button>
165
- </div>
166
- </form>
167
- </div>
168
- );
169
- };
170
-
171
- export default AddChat;
@@ -1,37 +0,0 @@
1
- @import "../../../../../styles/index.scss";
2
-
3
- .chatcontainer {
4
- background: $whiteColor;
5
- position: fixed;
6
- top: 120px;
7
- width: 231px;
8
- padding: 10px;
9
- border-radius: 10px;
10
- display: grid;
11
- grid-auto-flow: row;
12
- row-gap: 10px;
13
- box-shadow: 0 0 4px 0 $boxShadowMedium;
14
- z-index: 9999;
15
- .chat-header-navigation .nav-right button {
16
- border: 1px solid $deactivateColor;
17
- }
18
- .chat-header-navigation .nav-right button {
19
- background-color: $primaryColor !important;
20
- }
21
- .MuiInputBase-root input.MuiInputBase-input {
22
- min-width: 210px !important;
23
- }
24
- }
25
-
26
- .chatFooterContainer {
27
- display: flex;
28
- justify-content: flex-end;
29
- gap: 8px;
30
- }
31
-
32
- .addChat_container {
33
- position: absolute;
34
- }
35
- .chat_save_btn {
36
- background-color: $primaryColor !important;
37
- }
@@ -1,28 +0,0 @@
1
- import { selectClasses } from "@mui/material";
2
- import React from "react";
3
- import { Checkbox } from "../../../../Checkbox";
4
-
5
- export const ChannelCheckbox = ({
6
- checked = false,
7
- onChange,
8
- id,
9
- className = "channel-checkbox-input",
10
- disabled = false,
11
- handleChatSelect,
12
- selectedChat,
13
- ...props
14
- }) => {
15
- return (
16
- <div className="channel-checkbox" onClick={(e) => e.stopPropagation()}>
17
- <Checkbox
18
- checked={selectedChat?.includes(id)}
19
- label=""
20
- onChange={(e) => {
21
- e.stopPropagation();
22
- handleChatSelect(id);
23
- }}
24
- variant="default"
25
- />
26
- </div>
27
- );
28
- };