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.
- package/MIGRATION_GUIDE.md +328 -0
- package/README.md +154 -15
- package/bin/migrate-image-paths.cjs +127 -0
- package/bin/migrate.js +293 -0
- package/codemods/component-map.js +153 -0
- package/codemods/image-paths-transform.js +69 -0
- package/codemods/transform.js +136 -0
- package/dist/components/Accordion/index.js +2 -1
- package/dist/components/AccordionModern/index.js +2 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/Avatar/index.js +2 -1
- package/dist/components/Badge/filled/filledIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Badge/stroke/strokeIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleOnlyLabelBadges/index.js +2 -1
- package/dist/components/BottomSheet/index.js +2 -1
- package/dist/components/Breadcrumbs/index.js +2 -1
- package/dist/components/Button/index.js +2 -1
- package/dist/components/ButtonGroup/index.js +2 -1
- package/dist/components/Card/index.js +2 -1
- package/dist/components/Chart/index.js +2 -1
- package/dist/components/Chatbot/index.js +2 -1
- package/dist/components/Checkbox/index.js +2 -1
- package/dist/components/Chips/index.js +2 -1
- package/dist/components/CreateItemFlow/index.js +2 -1
- package/dist/components/DatePicker/datePickerDropdown.js +2 -1
- package/dist/components/DatePicker/index.js +3 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +2 -1
- package/dist/components/DateRangePicker/index.js +3 -2
- package/dist/components/DynamicLayout/index.js +2 -1
- package/dist/components/EmptyState/EmptyStateImage.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyStateImage.js +3 -2
- package/dist/components/EmptyState/index.js +2 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterPanel/index.js +2 -1
- package/dist/components/FiltersStrip/index.js +2 -1
- package/dist/components/Header/index.js +2 -1
- package/dist/components/HomePage/index.js +2 -1
- package/dist/components/Input/index.js +2 -1
- package/dist/components/Loader/index.js +2 -1
- package/dist/components/Menu/IconMenuItem.js +2 -1
- package/dist/components/Menu/MenuHeaderInfo.js +2 -1
- package/dist/components/Menu/NestedMenuItem.js +2 -1
- package/dist/components/Menu/index.js +2 -1
- package/dist/components/Menu/nestedMenuItemsFromObject.js +2 -1
- package/dist/components/Modal/index.js +2 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +2 -1
- package/dist/components/Notification/index.js +2 -1
- package/dist/components/Panel/index.js +2 -1
- package/dist/components/Popover/index.js +2 -1
- package/dist/components/ProgressBar/index.js +2 -1
- package/dist/components/Prompt/index.js +2 -1
- package/dist/components/RadioButtonGroup/index.js +2 -1
- package/dist/components/Select/index.js +2 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Slider/index.js +2 -1
- package/dist/components/Stepper/index.js +2 -1
- package/dist/components/Switch/index.js +2 -1
- package/dist/components/Table/TableImpl.js +4 -3
- package/dist/components/TableChat/EmptyContainer.js +2 -1
- package/dist/components/TableChat/TableChatSidePanel.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +2 -1
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +2 -1
- package/dist/components/TableChat/components/TextEditor/Mention.js +2 -1
- package/dist/components/TableChat/components/TextEditor/MentionList.js +2 -1
- package/dist/components/Tabs/index.js +2 -1
- package/dist/components/Tag/index.js +2 -1
- package/dist/components/TagGroup/index.js +2 -1
- package/dist/components/TextArea/index.js +2 -1
- package/dist/components/Toast/index.js +2 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/common/HelperText/index.js +2 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/mcp-component-registry.json +1 -1
- package/dist/styles/entry.d.ts +2 -0
- package/dist/styles/entry.d.ts.map +1 -0
- package/dist/styles/entry.js +1 -0
- package/dist/styles/style.css +1 -1
- package/eslint-plugin/index.js +91 -0
- package/eslint-plugin/rules/no-barrel-import.js +224 -0
- package/package.json +153 -89
- package/dist/0db32db10ae1525f.svg +0 -9
- package/dist/2bc76319b1fa572e.svg +0 -9
- package/dist/39d49e4daed1a992.svg +0 -9
- package/dist/44beedf64dc29d19.svg +0 -9
- package/dist/49a4f914058314f1.svg +0 -9
- package/dist/6fc8a59d621a04a1.svg +0 -13
- package/dist/78f845dcfc981491.svg +0 -9
- package/dist/b31c0c2a19c1c19a.svg +0 -9
- package/dist/index.js +0 -308
- package/dist/index.js.map +0 -1
- package/src/components/Accordion/Accordion.styles.scss +0 -118
- package/src/components/Accordion/index.js +0 -104
- package/src/components/AccordionModern/AccordionModern.styles.scss +0 -121
- package/src/components/AccordionModern/SortableAccordionComp.js +0 -156
- package/src/components/AccordionModern/index.js +0 -103
- package/src/components/Alert/Alert.styles.scss +0 -131
- package/src/components/Alert/index.js +0 -71
- package/src/components/Avatar/Avatar.styles.scss +0 -25
- package/src/components/Avatar/index.js +0 -58
- package/src/components/Badge/Badges.style.scss +0 -55
- package/src/components/Badge/filled/filledIconLabelBadges/filledIconLabelBadges.styles.scss +0 -32
- package/src/components/Badge/filled/filledIconLabelBadges/index.js +0 -38
- package/src/components/Badge/filled/filledOnlyIconBadges/filledOnlyIconBadges.styles.scss +0 -26
- package/src/components/Badge/filled/filledOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/filled/filledOnlyLabelBadges/filledOnlyLabelBadges.styles.scss +0 -66
- package/src/components/Badge/filled/filledOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/filled/index.js +0 -30
- package/src/components/Badge/index.js +0 -53
- package/src/components/Badge/stroke/index.js +0 -43
- package/src/components/Badge/stroke/strokeIconLabelBadges/index.js +0 -38
- package/src/components/Badge/stroke/strokeIconLabelBadges/strokeIconLabelBadges.styles.scss +0 -33
- package/src/components/Badge/stroke/strokeOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyIconBadges/strokeOnlyIconBadges.styles.scss +0 -27
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/strokeOnlyLabelBadges.styles.scss +0 -89
- package/src/components/Badge/styles.css +0 -52
- package/src/components/Badge/subtle/index.js +0 -41
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/subtleIOnlyIconBadges.scss +0 -26
- package/src/components/Badge/subtle/subtleIconLabelBadges/index.js +0 -38
- package/src/components/Badge/subtle/subtleIconLabelBadges/subtleIconLabelBadges.scss +0 -56
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/subtleOnlyLabelBadges.scss +0 -70
- package/src/components/BottomSheet/BottomSheet.styles.scss +0 -46
- package/src/components/BottomSheet/index.js +0 -60
- package/src/components/Breadcrumbs/Breadcrumbs.styles.scss +0 -65
- package/src/components/Breadcrumbs/index.js +0 -121
- package/src/components/Button/Button.styles.scss +0 -345
- package/src/components/Button/index.js +0 -171
- package/src/components/ButtonGroup/ButtonGroup.styles.scss +0 -125
- package/src/components/ButtonGroup/index.js +0 -84
- package/src/components/Card/Card.styles.scss +0 -33
- package/src/components/Card/index.js +0 -21
- package/src/components/Chart/Chart.style.scss +0 -142
- package/src/components/Chart/index.js +0 -752
- package/src/components/ChatBot/bookMarkPanel.js +0 -74
- package/src/components/ChatBot/chatBot.style.scss +0 -1295
- package/src/components/ChatBot/chatBotFooter.js +0 -14
- package/src/components/ChatBot/chatBotLandingScreen.js +0 -26
- package/src/components/ChatBot/chatInput.js +0 -206
- package/src/components/ChatBot/chatbotModuleMenu.js +0 -278
- package/src/components/ChatBot/constant.js +0 -32
- package/src/components/ChatBot/conversationScreen.js +0 -281
- package/src/components/ChatBot/customScreen.js +0 -69
- package/src/components/ChatBot/historyPanel.js +0 -579
- package/src/components/ChatBot/index.js +0 -473
- package/src/components/ChatBot/newChatComponent.js +0 -105
- package/src/components/ChatBot/utils.js +0 -27
- package/src/components/Checkbox/Checkbox.styles.scss +0 -232
- package/src/components/Checkbox/dashed/index.js +0 -34
- package/src/components/Checkbox/default/index.js +0 -70
- package/src/components/Checkbox/index.js +0 -50
- package/src/components/Checkbox/withDropDown/index.js +0 -96
- package/src/components/Checkbox/withoutFormLabel/index.js +0 -46
- package/src/components/Chips/Chip.style.scss +0 -134
- package/src/components/Chips/index.js +0 -34
- package/src/components/CreateItemFlow/CreateItemFlow.styles.scss +0 -37
- package/src/components/CreateItemFlow/index.js +0 -145
- package/src/components/DatePicker/DatePicker.styles.scss +0 -519
- package/src/components/DatePicker/datePickerDropdown.js +0 -282
- package/src/components/DatePicker/datePickerFooter.js +0 -76
- package/src/components/DatePicker/datePickerInput.js +0 -333
- package/src/components/DatePicker/index.js +0 -288
- package/src/components/DatePicker/showMonthYearSelect.js +0 -119
- package/src/components/DateRangePicker/DateRangePicker.styles.scss +0 -635
- package/src/components/DateRangePicker/dateRangePickerCustom.js +0 -22
- package/src/components/DateRangePicker/dateRangePickerDropdown.js +0 -320
- package/src/components/DateRangePicker/dateRangePickerFooter.js +0 -50
- package/src/components/DateRangePicker/dateRangePickerInput.js +0 -544
- package/src/components/DateRangePicker/index.js +0 -393
- package/src/components/DateRangePicker/showMonthYearSelect.js +0 -103
- package/src/components/DateRangePicker/utils.js +0 -71
- package/src/components/DynamicLayout/DynamicLayout.styles.scss +0 -153
- package/src/components/DynamicLayout/index.js +0 -73
- package/src/components/EmptyState/EmptyState.styles.scss +0 -88
- package/src/components/EmptyState/EmptyStateImageComponent.jsx +0 -36
- package/src/components/EmptyState/index.js +0 -54
- package/src/components/FileUpload/FileUpload.styles.scss +0 -449
- package/src/components/FileUpload/index.js +0 -641
- package/src/components/FilterPanel/FilterPanel.styles.scss +0 -241
- package/src/components/FilterPanel/FilterPanelHeader.js +0 -15
- package/src/components/FilterPanel/PanelFooter.js +0 -65
- package/src/components/FilterPanel/PanelSidebar.js +0 -85
- package/src/components/FilterPanel/index.js +0 -147
- package/src/components/FiltersStrip/FiltersStrip.styles.scss +0 -343
- package/src/components/FiltersStrip/Slider/FilterSlider.styles.scss +0 -85
- package/src/components/FiltersStrip/Slider/Portal.js +0 -59
- package/src/components/FiltersStrip/Slider/index.js +0 -233
- package/src/components/FiltersStrip/appliedFilter.js +0 -180
- package/src/components/FiltersStrip/filterDropDown.js +0 -96
- package/src/components/FiltersStrip/index.js +0 -127
- package/src/components/FiltersStrip/mockData.js +0 -227
- package/src/components/Header/Header.styles.scss +0 -223
- package/src/components/Header/index.js +0 -156
- package/src/components/HomePage/HomePage.styles.scss +0 -1638
- package/src/components/HomePage/constant.js +0 -331
- package/src/components/HomePage/index.js +0 -675
- package/src/components/Input/Input.styles.scss +0 -318
- package/src/components/Input/helperText.js +0 -19
- package/src/components/Input/index.js +0 -60
- package/src/components/Input/inputWithIcon.js +0 -134
- package/src/components/Input/vanilaInput.js +0 -68
- package/src/components/Loader/Loader.styles.scss +0 -90
- package/src/components/Loader/index.js +0 -69
- package/src/components/Menu/IconMenuItem.js +0 -100
- package/src/components/Menu/Menu.styles.scss +0 -190
- package/src/components/Menu/MenuHeader.jsx +0 -84
- package/src/components/Menu/MenuHeaderInfo.jsx +0 -319
- package/src/components/Menu/MenuHeaderInfo.styles.scss +0 -123
- package/src/components/Menu/NestedMenuItem.js +0 -189
- package/src/components/Menu/index.js +0 -254
- package/src/components/Menu/nestedMenuItemsFromObject.js +0 -100
- package/src/components/Modal/Modal.styles.scss +0 -129
- package/src/components/Modal/index.js +0 -141
- package/src/components/MonthPicker/MonthPicker.styles.scss +0 -255
- package/src/components/MonthPicker/constant.js +0 -1
- package/src/components/MonthPicker/index.js +0 -373
- package/src/components/MonthRangePicker/MonthRangePicker.styles.scss +0 -383
- package/src/components/MonthRangePicker/constant.js +0 -1
- package/src/components/MonthRangePicker/index.js +0 -574
- package/src/components/Notification/Notification.styles.scss +0 -594
- package/src/components/Notification/NotificationBody/NotificationInfoList/chipsLists.js +0 -144
- package/src/components/Notification/NotificationBody/NotificationInfoList/index.js +0 -128
- package/src/components/Notification/NotificationBody/NotificationInfoList/notificationList.js +0 -165
- package/src/components/Notification/NotificationBody/NotificationPanels/chipsLists.js +0 -85
- package/src/components/Notification/NotificationBody/NotificationPanels/index.js +0 -259
- package/src/components/Notification/NotificationBody/NotificationPanels/notificationList.js +0 -637
- package/src/components/Notification/NotificationBody/index.js +0 -117
- package/src/components/Notification/index.js +0 -128
- package/src/components/Notification/mockData.js +0 -389
- package/src/components/Notification/notificationFooter.js +0 -31
- package/src/components/Notification/notificationHeader.js +0 -28
- package/src/components/Panel/Panel.styles.scss +0 -71
- package/src/components/Panel/index.js +0 -144
- package/src/components/Popover/Popover.styles.scss +0 -52
- package/src/components/Popover/index.js +0 -71
- package/src/components/Portal/index.js +0 -31
- package/src/components/ProgressBar/ProgressBar.styles.scss +0 -62
- package/src/components/ProgressBar/index.js +0 -40
- package/src/components/Prompt/Prompt.styles.scss +0 -107
- package/src/components/Prompt/index.js +0 -107
- package/src/components/RadioButtonGroup/RadioButtonGroup.styles.scss +0 -136
- package/src/components/RadioButtonGroup/index.js +0 -107
- package/src/components/Select/SearchFilter.js +0 -72
- package/src/components/Select/Select.styles.scss +0 -748
- package/src/components/Select/customGroupHeading.js +0 -24
- package/src/components/Select/dropdown.js +0 -65
- package/src/components/Select/hooks/index.js +0 -2
- package/src/components/Select/hooks/useClickOutside.js +0 -61
- package/src/components/Select/hooks/useMenuPosition.js +0 -288
- package/src/components/Select/index.js +0 -1307
- package/src/components/Select/menuList.js +0 -119
- package/src/components/Select/optionList.js +0 -215
- package/src/components/Select/selected-option-tags.js +0 -99
- package/src/components/Select/utils.js +0 -232
- package/src/components/Sidebar/Menus/childMenu.js +0 -88
- package/src/components/Sidebar/Menus/index.js +0 -130
- package/src/components/Sidebar/Menus/parentMenu.js +0 -173
- package/src/components/Sidebar/Sidebar.styles.scss +0 -411
- package/src/components/Sidebar/actions.js +0 -31
- package/src/components/Sidebar/index.js +0 -84
- package/src/components/Sidebar/mock.js +0 -202
- package/src/components/Slider/Sliders.styles.scss +0 -260
- package/src/components/Slider/index.js +0 -314
- package/src/components/Stepper/Stepper.styles.scss +0 -355
- package/src/components/Stepper/index.js +0 -101
- package/src/components/Switch/Switch.styles.scss +0 -96
- package/src/components/Switch/index.js +0 -59
- package/src/components/Table/AdvanceSearchModalItem.js +0 -392
- package/src/components/Table/AdvanceSortModal.js +0 -332
- package/src/components/Table/AgGridHeader.js +0 -1009
- package/src/components/Table/CommentsPortal.js +0 -428
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +0 -323
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +0 -476
- package/src/components/Table/NoComments.js +0 -295
- package/src/components/Table/Table.styles.scss +0 -3859
- package/src/components/Table/actionBar.js +0 -43
- package/src/components/Table/advanceSearchModal.js +0 -797
- package/src/components/Table/commentPanel.js +0 -421
- package/src/components/Table/filterUtils.js +0 -850
- package/src/components/Table/index.js +0 -2175
- package/src/components/Table/mockData.js +0 -1344
- package/src/components/Table/tableFunctions.js +0 -1676
- package/src/components/Table/tableHeader.js +0 -476
- package/src/components/Table/tableIcons.js +0 -61
- package/src/components/Table/tableMoreOptions.js +0 -293
- package/src/components/Table/tablePagination.js +0 -63
- package/src/components/Table/tableSettings.js +0 -287
- package/src/components/Table/withCommentIcon.js +0 -107
- package/src/components/TableChat/EmptyContainer.jsx +0 -13
- package/src/components/TableChat/README.md +0 -588
- package/src/components/TableChat/TableChatSidePanel.jsx +0 -832
- package/src/components/TableChat/TableChatSidePanel.styles.scss +0 -57
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.jsx +0 -43
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.jsx +0 -55
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.jsx +0 -94
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.jsx +0 -22
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.scss +0 -179
- package/src/components/TableChat/components/SkeletonList.jsx +0 -12
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.jsx +0 -171
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.styles.scss +0 -37
- package/src/components/TableChat/components/TableChatLeftSection/ChannelCheckbox/ChannelCheckbox.jsx +0 -28
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.jsx +0 -116
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelList.jsx +0 -89
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.jsx +0 -27
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.jsx +0 -191
- package/src/components/TableChat/components/TableChatLeftSection/ChatIconButton/ChatIconButton.jsx +0 -23
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.jsx +0 -117
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.styles.scss +0 -469
- package/src/components/TableChat/components/TableChatLeftSection/UnreadBadge/UnreadBadge.jsx +0 -16
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.jsx +0 -119
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.styles.scss +0 -87
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.jsx +0 -216
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.styles.scss +0 -291
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.jsx +0 -19
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/DeletedMessage.styles.scss +0 -55
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.styles.scss +0 -13
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.jsx +0 -432
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.jsx +0 -365
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.jsx +0 -42
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/chatHeader.styles.scss +0 -323
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.jsx +0 -793
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.styles.scss +0 -394
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.styles.scss +0 -28
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.jsx +0 -11
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.styles.scss +0 -3
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.jsx +0 -220
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.styles.scss +0 -128
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.jsx +0 -246
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.styles.scss +0 -210
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.jsx +0 -52
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.styles.scss +0 -34
- package/src/components/TableChat/components/TableChatRightSection/EmojiPicker/EmojiPicker.jsx +0 -31
- package/src/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.jsx +0 -170
- package/src/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.jsx +0 -165
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChat.styles.scss +0 -587
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.jsx +0 -244
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.jsx +0 -29
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.styles.scss +0 -47
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.jsx +0 -1340
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.styles.scss +0 -147
- package/src/components/TableChat/components/TextEditor/EditorToolbar.jsx +0 -209
- package/src/components/TableChat/components/TextEditor/EditorToolbar.styles.scss +0 -61
- package/src/components/TableChat/components/TextEditor/Mention.jsx +0 -234
- package/src/components/TableChat/components/TextEditor/MentionList.jsx +0 -118
- package/src/components/TableChat/components/TextEditor/MentionList.scss +0 -146
- package/src/components/TableChat/components/TextEditor/styles.scss +0 -278
- package/src/components/TableChat/components/TextEditor/suggestion.js +0 -124
- package/src/components/TableChat/components/chatConfig.js +0 -64
- package/src/components/TableChat/hooks/useInfiniteScroll.js +0 -256
- package/src/components/TableOld/AgGridHeader.js +0 -545
- package/src/components/TableOld/Table.styles.scss +0 -2192
- package/src/components/TableOld/actionBar.js +0 -43
- package/src/components/TableOld/index.js +0 -598
- package/src/components/TableOld/mockData.js +0 -1344
- package/src/components/TableOld/tableFunctions.js +0 -1734
- package/src/components/TableOld/tableHeader.js +0 -251
- package/src/components/TableOld/tableIcons.js +0 -61
- package/src/components/TableOld/tablePagination.js +0 -64
- package/src/components/TableOld/tableSettings.js +0 -166
- package/src/components/Tabs/Tabs.styles.scss +0 -120
- package/src/components/Tabs/index.js +0 -91
- package/src/components/Tabs/tabPanel.js +0 -38
- package/src/components/Tag/Tags.styles.scss +0 -71
- package/src/components/Tag/filled.js +0 -48
- package/src/components/Tag/index.js +0 -54
- package/src/components/Tag/solid.js +0 -47
- package/src/components/Tag/stroke.js +0 -47
- package/src/components/Tag/utils.js +0 -12
- package/src/components/TagGroup/TagGroup.styles.scss +0 -7
- package/src/components/TagGroup/index.js +0 -6
- package/src/components/TextArea/TextArea.styles.scss +0 -158
- package/src/components/TextArea/index.js +0 -121
- package/src/components/Toast/Toast.styles.scss +0 -66
- package/src/components/Toast/index.js +0 -35
- package/src/components/Tooltip/Tooltips.styles.scss +0 -111
- package/src/components/Tooltip/index.js +0 -68
- package/src/components/common/HelperText/HelperText.styles.scss +0 -18
- package/src/components/common/HelperText/index.js +0 -44
- package/src/components/common/MentionEditor/MentionEditor.styles.scss +0 -301
- package/src/components/common/MentionEditor/MentionList/MentionList.styles.scss +0 -146
- package/src/components/common/MentionEditor/MentionList/index.js +0 -130
- package/src/components/common/MentionEditor/index.js +0 -246
- package/src/components/common/MentionEditor/suggestion.js +0 -124
- package/src/components/index.js +0 -53
- package/src/stories/Accordion.stories.js +0 -151
- package/src/stories/AccordionModern.stories.js +0 -263
- package/src/stories/Alert.stories.js +0 -103
- package/src/stories/Avatar.stories.js +0 -79
- package/src/stories/Badge.stories.js +0 -112
- package/src/stories/BottomSheet.stories.js +0 -224
- package/src/stories/Breadcrumbs.stories.js +0 -143
- package/src/stories/Button.stories.js +0 -190
- package/src/stories/ButtonGroup.stories.js +0 -123
- package/src/stories/Card.stories.js +0 -73
- package/src/stories/Changelog.mdx +0 -1006
- package/src/stories/Chart.stories.js +0 -2017
- package/src/stories/ChatBot.stories.js +0 -668
- package/src/stories/Checkbox.stories.js +0 -209
- package/src/stories/Chips.stories.js +0 -106
- package/src/stories/CreateItemFlow.stories.js +0 -255
- package/src/stories/DatePicker.stories.js +0 -311
- package/src/stories/DateRangePicker.stories.js +0 -364
- package/src/stories/EmptyState.stories.js +0 -110
- package/src/stories/FileUpload.stories.js +0 -169
- package/src/stories/FilterPanel.stories.js +0 -309
- package/src/stories/FiltersStrip.stories.js +0 -244
- package/src/stories/GettingStarted.mdx +0 -153
- package/src/stories/Header.stories.js +0 -185
- package/src/stories/HomePage.stories.js +0 -201
- package/src/stories/Input.stories.js +0 -165
- package/src/stories/Loader.stories.js +0 -33
- package/src/stories/Menu.stories.js +0 -309
- package/src/stories/Modal.stories.js +0 -185
- package/src/stories/MonthPicker.stories.js +0 -313
- package/src/stories/MonthRangePicker.stories.js +0 -255
- package/src/stories/Notification.stories.js +0 -500
- package/src/stories/Panel.stories.js +0 -179
- package/src/stories/Popover.stories.js +0 -125
- package/src/stories/ProgressBar.stories.js +0 -93
- package/src/stories/Prompt.stories.js +0 -120
- package/src/stories/RadioButtonGroup.stories.js +0 -83
- package/src/stories/Select.stories.js +0 -753
- package/src/stories/Sidebar.stories.js +0 -177
- package/src/stories/Slider.stories.js +0 -226
- package/src/stories/Stepper.stories.js +0 -158
- package/src/stories/Switch.stories.js +0 -72
- package/src/stories/Table.stories.js +0 -4323
- package/src/stories/TableChat.mdx +0 -992
- package/src/stories/TableChat.stories.js +0 -1712
- package/src/stories/TableOld.stories.js +0 -954
- package/src/stories/Tabs.stories.js +0 -253
- package/src/stories/Tag.stories.js +0 -92
- package/src/stories/TagGroup.stories.js +0 -39
- package/src/stories/TextArea.stories.js +0 -148
- package/src/stories/Toast.stories.js +0 -113
- package/src/stories/Tooltip.stories.js +0 -86
- package/src/stories/storybookLinks.mdx +0 -20
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from "react";
|
|
2
|
-
import { ReactComponent as CommentIndicator } from "../../assets/comment-indicator.svg";
|
|
3
|
-
|
|
4
|
-
export const withCommentIcon = (Renderer) => {
|
|
5
|
-
return (props) => {
|
|
6
|
-
const iconRef = useRef(null);
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
handleCommentIconHover,
|
|
10
|
-
handleMouseEnter,
|
|
11
|
-
handleMouseLeave,
|
|
12
|
-
popup,
|
|
13
|
-
resolvedComments,
|
|
14
|
-
getLatestUnresolvedThreadId,
|
|
15
|
-
configuration,
|
|
16
|
-
colIdentifierKey,
|
|
17
|
-
} = props.context;
|
|
18
|
-
// Use colIdentifierKey if provided, otherwise fallback to props.node.id
|
|
19
|
-
const rowIdentifier = colIdentifierKey
|
|
20
|
-
? props.data?.[colIdentifierKey] || props.node.id
|
|
21
|
-
: props.node.id;
|
|
22
|
-
const baseCellId = `${rowIdentifier}__${props.column.getColId()}`;
|
|
23
|
-
// If base is resolved, prefer latest unresolved thread; otherwise create a new thread
|
|
24
|
-
let effectiveCellId = baseCellId;
|
|
25
|
-
if (
|
|
26
|
-
popup?.cellId != baseCellId &&
|
|
27
|
-
!configuration?.disableMultiCommentThread
|
|
28
|
-
) {
|
|
29
|
-
const baseResolved = Array.isArray(resolvedComments)
|
|
30
|
-
? resolvedComments.includes(baseCellId)
|
|
31
|
-
: false;
|
|
32
|
-
if (baseResolved) {
|
|
33
|
-
const latestUnresolved = getLatestUnresolvedThreadId(baseCellId);
|
|
34
|
-
if (latestUnresolved) {
|
|
35
|
-
effectiveCellId = latestUnresolved;
|
|
36
|
-
} else {
|
|
37
|
-
effectiveCellId = baseCellId;
|
|
38
|
-
}
|
|
39
|
-
// effectiveCellId = latestUnresolved || getEffectiveCellId(baseCellId);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// const cellId = `${props.node.id}__${props.column.getColId()}`;
|
|
44
|
-
const commentsArray = props.context.comments?.[effectiveCellId];
|
|
45
|
-
const hasComment =
|
|
46
|
-
commentsArray && Array.isArray(commentsArray) && commentsArray.length > 0;
|
|
47
|
-
|
|
48
|
-
const isPortalOpen = popup?.cellId === effectiveCellId;
|
|
49
|
-
|
|
50
|
-
// Render consumer-provided renderer or the (formatted) value
|
|
51
|
-
// Prefer AG Grid's valueFormatter output when provided
|
|
52
|
-
const displayValue =
|
|
53
|
-
props.valueFormatted !== undefined && props.valueFormatted !== null
|
|
54
|
-
? props.valueFormatted
|
|
55
|
-
: props.value;
|
|
56
|
-
// Ensure non-renderable objects are stringified to avoid React child errors
|
|
57
|
-
const safeValue =
|
|
58
|
-
displayValue !== null && typeof displayValue === "object"
|
|
59
|
-
? JSON.stringify(displayValue)
|
|
60
|
-
: displayValue ?? "";
|
|
61
|
-
const Content = Renderer ? <Renderer {...props} /> : <>{safeValue}</>;
|
|
62
|
-
const isResolved =
|
|
63
|
-
Array.isArray(resolvedComments) &&
|
|
64
|
-
resolvedComments.find((comment) => comment === effectiveCellId);
|
|
65
|
-
return (
|
|
66
|
-
<>
|
|
67
|
-
<div
|
|
68
|
-
style={{
|
|
69
|
-
position: "absolute",
|
|
70
|
-
top: 0,
|
|
71
|
-
left: 0,
|
|
72
|
-
right: 0,
|
|
73
|
-
bottom: 0,
|
|
74
|
-
border: hasComment && isPortalOpen ? "1px solid #4259ee" : "none",
|
|
75
|
-
boxSizing: "border-box",
|
|
76
|
-
pointerEvents: "none",
|
|
77
|
-
zIndex: 1,
|
|
78
|
-
}}
|
|
79
|
-
/>
|
|
80
|
-
{Content}
|
|
81
|
-
{hasComment && !isResolved && (
|
|
82
|
-
<div
|
|
83
|
-
ref={iconRef}
|
|
84
|
-
onMouseOver={() => {
|
|
85
|
-
handleMouseEnter();
|
|
86
|
-
handleCommentIconHover(props);
|
|
87
|
-
}}
|
|
88
|
-
onMouseLeave={handleMouseLeave}
|
|
89
|
-
title={`${commentsArray.length} comment${
|
|
90
|
-
commentsArray.length > 1 ? "s" : ""
|
|
91
|
-
}`}
|
|
92
|
-
style={{
|
|
93
|
-
position: "absolute",
|
|
94
|
-
top: -15,
|
|
95
|
-
right: 0,
|
|
96
|
-
cursor: "pointer",
|
|
97
|
-
zIndex: 2,
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<CommentIndicator />
|
|
101
|
-
</div>
|
|
102
|
-
)}
|
|
103
|
-
{/* CommentsPortal is handled by the main Table component */}
|
|
104
|
-
</>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./TableChatSidePanel.styles.scss";
|
|
3
|
-
import EmptyStateImageComponent from "../EmptyState/EmptyStateImageComponent";
|
|
4
|
-
|
|
5
|
-
export const EmptyContainer = ({ title, subTitle }) => {
|
|
6
|
-
return (
|
|
7
|
-
<div className="table-chat-right-section-container-empty empty-container">
|
|
8
|
-
<EmptyStateImageComponent />
|
|
9
|
-
<p>{title}</p>
|
|
10
|
-
<p>{subTitle}</p>
|
|
11
|
-
</div>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,588 +0,0 @@
|
|
|
1
|
-
# Table Chat Feature Documentation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The Table Chat feature is a comprehensive real-time messaging system integrated with the Table component. It provides a complete chat experience with channels, direct messaging, rich text editing, file sharing, and advanced message management capabilities.
|
|
6
|
-
|
|
7
|
-
## Architecture
|
|
8
|
-
|
|
9
|
-
### Component Hierarchy
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
Table (with isChatEnabled=true)
|
|
13
|
-
└── TableChatSidePanel (Main chat container)
|
|
14
|
-
├── TableChatChannelHeader (Left panel header)
|
|
15
|
-
├── Channel/Chat Lists (Left panel content)
|
|
16
|
-
└── TableChatRightSection (Right panel)
|
|
17
|
-
├── ChatHeader (Header with actions)
|
|
18
|
-
├── Message List (Infinite scroll)
|
|
19
|
-
└── ChatInput (Rich text editor)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Core Components
|
|
23
|
-
|
|
24
|
-
### 1. TableChatSidePanel
|
|
25
|
-
|
|
26
|
-
**Purpose**: Main container component that orchestrates the entire chat interface.
|
|
27
|
-
|
|
28
|
-
**Key Responsibilities**:
|
|
29
|
-
|
|
30
|
-
- Manages chat state and navigation between channels/chats
|
|
31
|
-
- Handles real-time message updates
|
|
32
|
-
- Coordinates left and right panel interactions
|
|
33
|
-
- Manages loading states and error handling
|
|
34
|
-
|
|
35
|
-
**Props**:
|
|
36
|
-
|
|
37
|
-
```javascript
|
|
38
|
-
{
|
|
39
|
-
isOpen: boolean, // Controls panel visibility
|
|
40
|
-
handleClose: function, // Panel close handler
|
|
41
|
-
chatConfiguration: object // Complete chat configuration
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Key Methods**:
|
|
46
|
-
|
|
47
|
-
#### `handleChatClick(chatId, selectedChatData)`
|
|
48
|
-
|
|
49
|
-
- **Purpose**: Handles chat selection and opens the message view
|
|
50
|
-
- **Parameters**:
|
|
51
|
-
- `chatId`: Unique identifier for the chat
|
|
52
|
-
- `selectedChatData`: Complete chat object with metadata
|
|
53
|
-
- **Flow**: Sets loading state → calls external handler → loads messages
|
|
54
|
-
|
|
55
|
-
#### `fetchChatList(currentActiveChannelInfo)`
|
|
56
|
-
|
|
57
|
-
- **Purpose**: Loads chat list for a selected channel
|
|
58
|
-
- **Parameters**:
|
|
59
|
-
- `currentActiveChannelInfo`: Channel object with id and metadata
|
|
60
|
-
- **Returns**: Promise resolving to array of chat objects
|
|
61
|
-
|
|
62
|
-
#### `fetchChannelList()`
|
|
63
|
-
|
|
64
|
-
- **Purpose**: Loads available channels for the user
|
|
65
|
-
- **Returns**: Promise resolving to array of channel objects
|
|
66
|
-
|
|
67
|
-
#### `handleDeleteChat()`
|
|
68
|
-
|
|
69
|
-
- **Purpose**: Handles batch deletion of selected chats
|
|
70
|
-
- **Flow**: Validates selection → calls delete API → updates UI → handles cleanup
|
|
71
|
-
|
|
72
|
-
#### `clearnupLocalStates()`
|
|
73
|
-
|
|
74
|
-
- **Purpose**: Resets all local state when panel closes
|
|
75
|
-
- **Called**: When panel closes or navigation changes
|
|
76
|
-
|
|
77
|
-
### 2. TableChatRightSection
|
|
78
|
-
|
|
79
|
-
**Purpose**: Manages message display, real-time updates, and user interactions.
|
|
80
|
-
|
|
81
|
-
**Key Responsibilities**:
|
|
82
|
-
|
|
83
|
-
- Infinite scroll message loading
|
|
84
|
-
- Real-time message synchronization
|
|
85
|
-
- Message actions (pin, reply, edit, delete)
|
|
86
|
-
- Search functionality
|
|
87
|
-
- Message state management
|
|
88
|
-
|
|
89
|
-
**Props**:
|
|
90
|
-
|
|
91
|
-
```javascript
|
|
92
|
-
{
|
|
93
|
-
chatId: string, // Current chat identifier
|
|
94
|
-
title: string, // Chat title
|
|
95
|
-
messageConfig: object, // Message configuration
|
|
96
|
-
inputChatConfig: object, // Input configuration
|
|
97
|
-
chatHeaderConfig: object // Header configuration
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Key Methods**:
|
|
102
|
-
|
|
103
|
-
#### `fetchMoreMessages(page)`
|
|
104
|
-
|
|
105
|
-
- **Purpose**: Implements infinite scroll pagination
|
|
106
|
-
- **Parameters**:
|
|
107
|
-
- `page`: Page number to load
|
|
108
|
-
- **Returns**: Promise resolving to array of messages
|
|
109
|
-
- **Features**: Handles both old format (array) and new format (object with metadata)
|
|
110
|
-
|
|
111
|
-
#### `handleSend(payload)`
|
|
112
|
-
|
|
113
|
-
- **Purpose**: Sends new messages or updates existing ones
|
|
114
|
-
- **Parameters**:
|
|
115
|
-
- `payload`: Message content and metadata
|
|
116
|
-
- **Flow**: Validates content → calls send handler → updates UI → handles real-time sync
|
|
117
|
-
|
|
118
|
-
#### `handleUpdateMessage(updatedContent)`
|
|
119
|
-
|
|
120
|
-
- **Purpose**: Updates existing messages
|
|
121
|
-
- **Parameters**:
|
|
122
|
-
- `updatedContent`: New message content
|
|
123
|
-
- **Flow**: Calls update API → handles real-time vs API message sync
|
|
124
|
-
|
|
125
|
-
#### `handleMessageDelete(messageId)`
|
|
126
|
-
|
|
127
|
-
- **Purpose**: Deletes messages with proper state management
|
|
128
|
-
- **Parameters**:
|
|
129
|
-
- `messageId`: ID of message to delete
|
|
130
|
-
- **Flow**: Determines message type → calls delete handler → updates local state
|
|
131
|
-
|
|
132
|
-
#### `handleSearchMessage(searchValue, chatId)`
|
|
133
|
-
|
|
134
|
-
- **Purpose**: Searches messages within the chat
|
|
135
|
-
- **Parameters**:
|
|
136
|
-
- `searchValue`: Search query
|
|
137
|
-
- `chatId`: Chat to search in
|
|
138
|
-
- **Returns**: Promise resolving to search results
|
|
139
|
-
|
|
140
|
-
#### `groupMessagesByDate(messages)`
|
|
141
|
-
|
|
142
|
-
- **Purpose**: Groups messages by date for display
|
|
143
|
-
- **Parameters**:
|
|
144
|
-
- `messages`: Array of message objects
|
|
145
|
-
- **Returns**: Array with date separators inserted
|
|
146
|
-
|
|
147
|
-
### 3. ChatInput
|
|
148
|
-
|
|
149
|
-
**Purpose**: Rich text editor with advanced formatting and interaction capabilities.
|
|
150
|
-
|
|
151
|
-
**Key Responsibilities**:
|
|
152
|
-
|
|
153
|
-
- Rich text editing with mentions
|
|
154
|
-
- File and image upload
|
|
155
|
-
- Emoji picker integration
|
|
156
|
-
- Message formatting and validation
|
|
157
|
-
- Priority and quick actions
|
|
158
|
-
|
|
159
|
-
**Props**:
|
|
160
|
-
|
|
161
|
-
```javascript
|
|
162
|
-
{
|
|
163
|
-
placeholder: string, // Input placeholder text
|
|
164
|
-
value: string, // Current input value
|
|
165
|
-
onChange: function, // Value change handler
|
|
166
|
-
onSend: function, // Message send handler
|
|
167
|
-
messageConfig: object, // Configuration for mentions, etc.
|
|
168
|
-
isEditMode: boolean, // Whether in edit mode
|
|
169
|
-
chatId: string // Current chat ID
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Key Methods**:
|
|
174
|
-
|
|
175
|
-
#### `handleSend()`
|
|
176
|
-
|
|
177
|
-
- **Purpose**: Processes and sends messages
|
|
178
|
-
- **Flow**: Validates content → extracts mentions → calls send handler → clears input
|
|
179
|
-
|
|
180
|
-
#### `getMentionedUsers()`
|
|
181
|
-
|
|
182
|
-
- **Purpose**: Extracts mentioned users from rich text content
|
|
183
|
-
- **Returns**: Array of mentioned user objects with IDs and positions
|
|
184
|
-
|
|
185
|
-
#### `handleInputChange(htmlContent)`
|
|
186
|
-
|
|
187
|
-
- **Purpose**: Handles rich text content changes
|
|
188
|
-
- **Parameters**:
|
|
189
|
-
- `htmlContent`: HTML content from editor
|
|
190
|
-
- **Flow**: Updates state → calls onChange callback
|
|
191
|
-
|
|
192
|
-
#### `handleEmojiClick(emoji)`
|
|
193
|
-
|
|
194
|
-
- **Purpose**: Inserts emoji into the editor
|
|
195
|
-
- **Parameters**:
|
|
196
|
-
- `emoji`: Emoji object or string
|
|
197
|
-
|
|
198
|
-
#### `handleFileUpload(file)`
|
|
199
|
-
|
|
200
|
-
- **Purpose**: Handles file upload with progress tracking
|
|
201
|
-
- **Parameters**:
|
|
202
|
-
- `file`: File object to upload
|
|
203
|
-
|
|
204
|
-
### 4. ChatHeader
|
|
205
|
-
|
|
206
|
-
**Purpose**: Header component with participant management and search functionality.
|
|
207
|
-
|
|
208
|
-
**Key Responsibilities**:
|
|
209
|
-
|
|
210
|
-
- Participant management (add/remove)
|
|
211
|
-
- Message search interface
|
|
212
|
-
- Notification settings
|
|
213
|
-
- Pinned message access
|
|
214
|
-
|
|
215
|
-
**Props**:
|
|
216
|
-
|
|
217
|
-
```javascript
|
|
218
|
-
{
|
|
219
|
-
title: string, // Chat title
|
|
220
|
-
chatId: string, // Chat identifier
|
|
221
|
-
chatHeaderConfig: object, // Header configuration
|
|
222
|
-
participants: array // Current participants
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
**Key Methods**:
|
|
227
|
-
|
|
228
|
-
#### `fetchOptionsForRadio(radioValue)`
|
|
229
|
-
|
|
230
|
-
- **Purpose**: Loads participant options based on selection type
|
|
231
|
-
- **Parameters**:
|
|
232
|
-
- `radioValue`: "existing" or "new" participants
|
|
233
|
-
- **Returns**: Promise resolving to participant array
|
|
234
|
-
|
|
235
|
-
#### `handleRadioButtonChange(value)`
|
|
236
|
-
|
|
237
|
-
- **Purpose**: Handles participant type selection
|
|
238
|
-
- **Parameters**:
|
|
239
|
-
- `value`: Selected radio button value
|
|
240
|
-
- **Flow**: Updates state → fetches new options
|
|
241
|
-
|
|
242
|
-
#### `handleMessageSearchChange(e)`
|
|
243
|
-
|
|
244
|
-
- **Purpose**: Handles message search with debouncing
|
|
245
|
-
- **Parameters**:
|
|
246
|
-
- `e`: Input event
|
|
247
|
-
- **Flow**: Updates search value → calls debounced search
|
|
248
|
-
|
|
249
|
-
#### `handleParticipantsClick()`
|
|
250
|
-
|
|
251
|
-
- **Purpose**: Opens participant management interface
|
|
252
|
-
- **Flow**: Calls external handler → loads participant data
|
|
253
|
-
|
|
254
|
-
## Configuration Structure
|
|
255
|
-
|
|
256
|
-
### chatConfiguration Object
|
|
257
|
-
|
|
258
|
-
The main configuration object that controls all chat functionality:
|
|
259
|
-
|
|
260
|
-
```javascript
|
|
261
|
-
{
|
|
262
|
-
// Message-related configuration
|
|
263
|
-
messageChatConfig: {
|
|
264
|
-
// Real-time messaging
|
|
265
|
-
realTimeMessages: [],
|
|
266
|
-
isWebSocketConnected: boolean,
|
|
267
|
-
currentTopicId: string,
|
|
268
|
-
currentUserId: number,
|
|
269
|
-
onRealTimeMessageUpdate: function,
|
|
270
|
-
|
|
271
|
-
// Message actions
|
|
272
|
-
onMessageReply: function,
|
|
273
|
-
onMessageBookmark: function,
|
|
274
|
-
onMessagePin: function,
|
|
275
|
-
onMessageUpdate: function,
|
|
276
|
-
onMessageDelete: function,
|
|
277
|
-
onThreadClick: function,
|
|
278
|
-
|
|
279
|
-
// Data loading
|
|
280
|
-
loadThreadMessages: function,
|
|
281
|
-
loadPinnedMsg: function,
|
|
282
|
-
onSearchMessage: function,
|
|
283
|
-
|
|
284
|
-
// Configuration
|
|
285
|
-
messageConfig: {
|
|
286
|
-
showActions: boolean,
|
|
287
|
-
priorityOptions: array,
|
|
288
|
-
quickActionProps: array
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
|
|
292
|
-
// Header configuration
|
|
293
|
-
headerChatConfig: {
|
|
294
|
-
// Participant management
|
|
295
|
-
participants: array,
|
|
296
|
-
loadParticipants: function,
|
|
297
|
-
loadParticipantsAvatar: function,
|
|
298
|
-
onParticipantAdd: function,
|
|
299
|
-
onParticipantRemove: function,
|
|
300
|
-
|
|
301
|
-
// Search and actions
|
|
302
|
-
onSearchChange: function,
|
|
303
|
-
onPinnedClick: function,
|
|
304
|
-
onNotificationSettingChange: function,
|
|
305
|
-
|
|
306
|
-
// Header settings
|
|
307
|
-
headerConfig: {
|
|
308
|
-
showSearch: boolean,
|
|
309
|
-
showParticipants: boolean,
|
|
310
|
-
showPinned: boolean,
|
|
311
|
-
radioOptions: array
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
// Input configuration
|
|
316
|
-
inputChatConfig: {
|
|
317
|
-
onSend: function,
|
|
318
|
-
onAttachFile: function,
|
|
319
|
-
onImageUpload: function,
|
|
320
|
-
inputConfig: {
|
|
321
|
-
placeholder: string,
|
|
322
|
-
maxLength: number,
|
|
323
|
-
showFormatting: boolean
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
// Left panel configuration
|
|
328
|
-
leftPanel: {
|
|
329
|
-
loadChannelsList: function,
|
|
330
|
-
loadChatList: function,
|
|
331
|
-
handleChatName: function,
|
|
332
|
-
deleteChat: function,
|
|
333
|
-
directChatList: array,
|
|
334
|
-
hasDirectChatList: boolean
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
// Right panel configuration
|
|
338
|
-
rightPanel: {
|
|
339
|
-
loadMessages: function,
|
|
340
|
-
loadOlderMessages: function,
|
|
341
|
-
messagesClearedTrigger: number
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
## Message Flow
|
|
347
|
-
|
|
348
|
-
### 1. Real-time Message Updates
|
|
349
|
-
|
|
350
|
-
```
|
|
351
|
-
WebSocket Event → onRealTimeMessageUpdate →
|
|
352
|
-
TableChatSidePanel → memoizedMessageConfig →
|
|
353
|
-
TableChatRightSection → Message State Update → UI Render
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### 2. Message Sending
|
|
357
|
-
|
|
358
|
-
```
|
|
359
|
-
ChatInput → handleSend → inputChatConfig.onSend →
|
|
360
|
-
API Call → Real-time Update → Message List Update
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### 3. Message Actions
|
|
364
|
-
|
|
365
|
-
```
|
|
366
|
-
ChatMessage Action → TableChatRightSection Handler →
|
|
367
|
-
messageConfig Handler → API Call → State Update
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
## Data Structures
|
|
371
|
-
|
|
372
|
-
### Message Object
|
|
373
|
-
|
|
374
|
-
```javascript
|
|
375
|
-
{
|
|
376
|
-
id: string, // Unique message identifier
|
|
377
|
-
author: string, // "user" | "assistant" | "system"
|
|
378
|
-
authorName: string, // Display name
|
|
379
|
-
content: string, // HTML content
|
|
380
|
-
timestamp: string, // Display timestamp
|
|
381
|
-
date: string, // ISO date string
|
|
382
|
-
priority: string, // "low" | "medium" | "high"
|
|
383
|
-
isPinned: boolean, // Pin status
|
|
384
|
-
deleted: boolean, // Deletion status
|
|
385
|
-
edited: boolean, // Edit status
|
|
386
|
-
showActions: boolean, // Show action buttons
|
|
387
|
-
otherProps: {
|
|
388
|
-
sender_id: number, // Sender's user ID
|
|
389
|
-
created_at: string, // Creation timestamp
|
|
390
|
-
isRealTime: boolean // Real-time message flag
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### Chat Object
|
|
396
|
-
|
|
397
|
-
```javascript
|
|
398
|
-
{
|
|
399
|
-
id: string, // Unique chat identifier
|
|
400
|
-
title: string, // Chat display name
|
|
401
|
-
subtitle: string, // Chat description/preview
|
|
402
|
-
user: string, // Last message author
|
|
403
|
-
text: string, // Last message preview
|
|
404
|
-
time: string, // Last activity time
|
|
405
|
-
isChecked: boolean, // Selection status
|
|
406
|
-
isPinned: boolean, // Pin status
|
|
407
|
-
unreadCount: number, // Unread message count
|
|
408
|
-
otherProps: {
|
|
409
|
-
object_ids: array, // Related object IDs
|
|
410
|
-
object_type: string // Object type ("deal", etc.)
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
### Channel Object
|
|
416
|
-
|
|
417
|
-
```javascript
|
|
418
|
-
{
|
|
419
|
-
id: string, // Unique channel identifier
|
|
420
|
-
title: string, // Channel name
|
|
421
|
-
time: string, // Last activity
|
|
422
|
-
unreadCount: number // Unread messages
|
|
423
|
-
}
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
## Advanced Features
|
|
427
|
-
|
|
428
|
-
### 1. Infinite Scroll Implementation
|
|
429
|
-
|
|
430
|
-
The chat uses a custom `useInfiniteScroll` hook that:
|
|
431
|
-
|
|
432
|
-
- Triggers loading when scrolling near the top (for older messages)
|
|
433
|
-
- Handles loading states and error conditions
|
|
434
|
-
- Supports both array and object response formats
|
|
435
|
-
- Prevents duplicate message loading
|
|
436
|
-
|
|
437
|
-
### 2. Real-time Synchronization
|
|
438
|
-
|
|
439
|
-
Real-time updates are handled through:
|
|
440
|
-
|
|
441
|
-
- WebSocket connection status monitoring
|
|
442
|
-
- Message deduplication by ID
|
|
443
|
-
- Optimistic updates with rollback support
|
|
444
|
-
- Proper chronological ordering
|
|
445
|
-
|
|
446
|
-
### 3. Rich Text Editor Features
|
|
447
|
-
|
|
448
|
-
The MentionEditor component provides:
|
|
449
|
-
|
|
450
|
-
- @mention autocomplete with user search
|
|
451
|
-
- Text formatting (bold, italic, links, etc.)
|
|
452
|
-
- Emoji picker integration
|
|
453
|
-
- File and image upload with preview
|
|
454
|
-
- HTML content validation
|
|
455
|
-
|
|
456
|
-
### 4. Search Functionality
|
|
457
|
-
|
|
458
|
-
Two types of search are supported:
|
|
459
|
-
|
|
460
|
-
1. **Message Search**: Search within chat messages
|
|
461
|
-
2. **Participant Search**: Search and filter participants
|
|
462
|
-
|
|
463
|
-
Both support debouncing and async loading states.
|
|
464
|
-
|
|
465
|
-
### 5. State Management
|
|
466
|
-
|
|
467
|
-
The chat feature uses a combination of:
|
|
468
|
-
|
|
469
|
-
- Local React state for UI interactions
|
|
470
|
-
- Memoized configurations to prevent re-renders
|
|
471
|
-
- External state management through configuration callbacks
|
|
472
|
-
- Cleanup functions for proper resource management
|
|
473
|
-
|
|
474
|
-
## Usage Examples
|
|
475
|
-
|
|
476
|
-
### Basic Integration
|
|
477
|
-
|
|
478
|
-
```javascript
|
|
479
|
-
<Table
|
|
480
|
-
isChatEnabled={true}
|
|
481
|
-
isChatOpen={isChatOpen}
|
|
482
|
-
handleChatClick={handleChatClick}
|
|
483
|
-
handleChatClose={handleChatClose}
|
|
484
|
-
chatConfiguration={chatConfiguration}
|
|
485
|
-
// ... other table props
|
|
486
|
-
/>
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### Custom Message Handler
|
|
490
|
-
|
|
491
|
-
```javascript
|
|
492
|
-
const chatConfiguration = {
|
|
493
|
-
messageChatConfig: {
|
|
494
|
-
onMessageUpdate: async (messageId, updatedData) => {
|
|
495
|
-
// Custom update logic
|
|
496
|
-
const response = await api.updateMessage(messageId, updatedData);
|
|
497
|
-
return response.data;
|
|
498
|
-
},
|
|
499
|
-
},
|
|
500
|
-
};
|
|
501
|
-
```
|
|
502
|
-
|
|
503
|
-
### Real-time Integration
|
|
504
|
-
|
|
505
|
-
```javascript
|
|
506
|
-
const chatConfiguration = {
|
|
507
|
-
messageChatConfig: {
|
|
508
|
-
realTimeMessages: webSocketMessages,
|
|
509
|
-
isWebSocketConnected: wsConnection.readyState === WebSocket.OPEN,
|
|
510
|
-
onRealTimeMessageUpdate: (newMessage) => {
|
|
511
|
-
setWebSocketMessages((prev) => [...prev, newMessage]);
|
|
512
|
-
},
|
|
513
|
-
},
|
|
514
|
-
};
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
## Best Practices
|
|
518
|
-
|
|
519
|
-
1. **Performance**:
|
|
520
|
-
|
|
521
|
-
- Use memoized configurations to prevent unnecessary re-renders
|
|
522
|
-
- Implement proper cleanup in useEffect hooks
|
|
523
|
-
- Debounce search and input handlers
|
|
524
|
-
|
|
525
|
-
2. **Error Handling**:
|
|
526
|
-
|
|
527
|
-
- Always wrap async operations in try-catch blocks
|
|
528
|
-
- Provide user feedback for failed operations
|
|
529
|
-
- Implement retry mechanisms for critical operations
|
|
530
|
-
|
|
531
|
-
3. **State Management**:
|
|
532
|
-
|
|
533
|
-
- Keep local state minimal and focused
|
|
534
|
-
- Use external handlers for persistent data
|
|
535
|
-
- Implement proper cleanup when components unmount
|
|
536
|
-
|
|
537
|
-
4. **Accessibility**:
|
|
538
|
-
|
|
539
|
-
- Provide proper ARIA labels for interactive elements
|
|
540
|
-
- Ensure keyboard navigation support
|
|
541
|
-
- Use semantic HTML structures
|
|
542
|
-
|
|
543
|
-
5. **Real-time Updates**:
|
|
544
|
-
- Handle message deduplication properly
|
|
545
|
-
- Implement proper chronological ordering
|
|
546
|
-
- Provide visual feedback for connection status
|
|
547
|
-
|
|
548
|
-
## Troubleshooting
|
|
549
|
-
|
|
550
|
-
### Common Issues
|
|
551
|
-
|
|
552
|
-
1. **Messages not updating in real-time**:
|
|
553
|
-
|
|
554
|
-
- Check WebSocket connection status
|
|
555
|
-
- Verify `currentTopicId` matches active chat
|
|
556
|
-
- Ensure `onRealTimeMessageUpdate` is properly configured
|
|
557
|
-
|
|
558
|
-
2. **Infinite scroll not working**:
|
|
559
|
-
|
|
560
|
-
- Check `loadMessages` function implementation
|
|
561
|
-
- Verify page parameter handling
|
|
562
|
-
- Ensure proper return format (array or object with messages)
|
|
563
|
-
|
|
564
|
-
3. **Mentions not working**:
|
|
565
|
-
|
|
566
|
-
- Verify `loadParticipantsAvatar` function
|
|
567
|
-
- Check `chatId` parameter passing
|
|
568
|
-
- Ensure participant data format is correct
|
|
569
|
-
|
|
570
|
-
4. **File upload issues**:
|
|
571
|
-
- Check file type restrictions
|
|
572
|
-
- Verify upload handler implementation
|
|
573
|
-
- Ensure proper error handling
|
|
574
|
-
|
|
575
|
-
### Debug Tools
|
|
576
|
-
|
|
577
|
-
Enable debug logging by setting:
|
|
578
|
-
|
|
579
|
-
```javascript
|
|
580
|
-
window.CHAT_DEBUG = true;
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
This will provide detailed console logs for:
|
|
584
|
-
|
|
585
|
-
- Message state changes
|
|
586
|
-
- API calls and responses
|
|
587
|
-
- Real-time update processing
|
|
588
|
-
- Component lifecycle events
|