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,473 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useMemo } from "react";
|
|
2
|
-
import "./chatBot.style.scss";
|
|
3
|
-
import { ChatBotFooter } from "./chatBotFooter";
|
|
4
|
-
import { NewChatComponent } from "./newChatComponent";
|
|
5
|
-
import { ConversationScreen } from "./conversationScreen";
|
|
6
|
-
import ChatBotLandingScreen from "./chatBotLandingScreen";
|
|
7
|
-
import { menuItems as defaultMenuItems, mandatoryTabList } from "./constant";
|
|
8
|
-
import { BookMarkPanel } from "./bookMarkPanel";
|
|
9
|
-
import { HistoryPanel } from "./historyPanel";
|
|
10
|
-
import BookMarkIcon from "../../assets/bookmarkIcon.svg";
|
|
11
|
-
import NewChatIcon from "../../assets/newChatIcon.svg";
|
|
12
|
-
import { CustomScreen } from "./customScreen";
|
|
13
|
-
import { Tooltip } from "../Tooltip";
|
|
14
|
-
import { ChatbotModuleMenu } from "./chatbotModuleMenu";
|
|
15
|
-
export const ChatBotComponent = ({
|
|
16
|
-
onClose,
|
|
17
|
-
userName,
|
|
18
|
-
isChatBotOpen,
|
|
19
|
-
setIsChatBotOpen,
|
|
20
|
-
conversation = [],
|
|
21
|
-
solution,
|
|
22
|
-
formComponent,
|
|
23
|
-
tableComponent,
|
|
24
|
-
preDefinedQuestions,
|
|
25
|
-
addedByYouQuestions,
|
|
26
|
-
onSendIconClick = () => {},
|
|
27
|
-
assistantChats = [],
|
|
28
|
-
isAssistantThinking = false,
|
|
29
|
-
moduleList = [],
|
|
30
|
-
onModuleClick = () => {},
|
|
31
|
-
tabList,
|
|
32
|
-
handleSavedChat,
|
|
33
|
-
threadList = ["Home", "Thread 1", "Thread 2"],
|
|
34
|
-
activeThread = null,
|
|
35
|
-
isCustomScreen = false,
|
|
36
|
-
customScreenJsx = null,
|
|
37
|
-
onLikeClick = () => {},
|
|
38
|
-
onDislikeClick = () => {},
|
|
39
|
-
handleNewChatClick = () => {},
|
|
40
|
-
inputText = "",
|
|
41
|
-
handleRefresh,
|
|
42
|
-
handleSaveChat,
|
|
43
|
-
handleMicClick,
|
|
44
|
-
hideMenuArrow = false,
|
|
45
|
-
newChatScreen = false,
|
|
46
|
-
isModuleListLoading = false,
|
|
47
|
-
suggestionBanner = {
|
|
48
|
-
freeTextHeading: "Try adding more details:",
|
|
49
|
-
freeTextContent:
|
|
50
|
-
"Alan works best when your input has context and pointed questions",
|
|
51
|
-
},
|
|
52
|
-
isStopIcon = false,
|
|
53
|
-
onStopIconClick = () => {},
|
|
54
|
-
landingScreen = false,
|
|
55
|
-
footerText = "AI-generated responses may contain errors—please verify important information",
|
|
56
|
-
onCloseSuggestionBanner = () => {},
|
|
57
|
-
showSuggestionBanner = false,
|
|
58
|
-
utilityList = [],
|
|
59
|
-
customInputComponent = null,
|
|
60
|
-
onHistoryPanelClick = () => {},
|
|
61
|
-
historyPanelData = [],
|
|
62
|
-
onHistorySearchChange = () => {},
|
|
63
|
-
onHistorySelectConversation = () => {},
|
|
64
|
-
onHistoryToggleGroup = () => {},
|
|
65
|
-
historyOpenGroups,
|
|
66
|
-
onHistoryMenuAction = () => {},
|
|
67
|
-
showHistoryPanel = true,
|
|
68
|
-
isFullWidth = false,
|
|
69
|
-
activeConversationId,
|
|
70
|
-
handleCloseThread = () => {},
|
|
71
|
-
handleThreadClick = () => {},
|
|
72
|
-
onMinimiseChatBot,
|
|
73
|
-
onChatBotResize = () => {},
|
|
74
|
-
}) => {
|
|
75
|
-
const [isNewChat, setIsNewChat] = useState(
|
|
76
|
-
tabList?.find((tab) => tab.isActive) ? false : newChatScreen ? true : false
|
|
77
|
-
);
|
|
78
|
-
const [inputValue, setInputValue] = useState(inputText);
|
|
79
|
-
const [containerWidth, setContainerWidth] = useState(
|
|
80
|
-
isFullWidth ? `calc(100vw - 64px)` : "690px"
|
|
81
|
-
);
|
|
82
|
-
const [question, setQuestion] = useState(conversation || []);
|
|
83
|
-
const [answer, setAnswer] = useState(solution);
|
|
84
|
-
const [activeList, setActiveList] = useState(
|
|
85
|
-
tabList?.find((tab) => tab?.initialClick)?.name
|
|
86
|
-
);
|
|
87
|
-
const [isBookMarkPanelOpen, setIsBookMarkPanelOpen] = useState(false);
|
|
88
|
-
const [isHistoryPanelOpen, setIsHistoryPanelOpen] = useState(false);
|
|
89
|
-
const [isPagePanelOpen, setIsPagePanelOpen] = useState(false);
|
|
90
|
-
const [isNotificationPanelOpen, setIsNotificationPanelOpen] = useState(false);
|
|
91
|
-
const [userChats, setUserChats] = useState([]);
|
|
92
|
-
const [menuItems, setMenuItems] = useState([]);
|
|
93
|
-
const [localHistoryOpenGroups, setLocalHistoryOpenGroups] = useState({});
|
|
94
|
-
const panelsOpen = useMemo(() => {
|
|
95
|
-
return isBookMarkPanelOpen || isHistoryPanelOpen || isPagePanelOpen;
|
|
96
|
-
}, [isBookMarkPanelOpen, isHistoryPanelOpen, isPagePanelOpen]);
|
|
97
|
-
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
setInputValue(inputText);
|
|
100
|
-
}, [inputText]);
|
|
101
|
-
|
|
102
|
-
useEffect(() => {
|
|
103
|
-
const newChatItem = {
|
|
104
|
-
key: "newchat",
|
|
105
|
-
icon: NewChatIcon,
|
|
106
|
-
className: "chatbot-component-menu-container-icon-new-chat",
|
|
107
|
-
};
|
|
108
|
-
if (tabList && Array.isArray(tabList)) {
|
|
109
|
-
setMenuItems([
|
|
110
|
-
newChatItem,
|
|
111
|
-
...tabList?.map((tab, idx) => ({
|
|
112
|
-
...tab,
|
|
113
|
-
key: tab.name?.toLowerCase() || `tab${idx}`,
|
|
114
|
-
icon: tab.icon || BookMarkIcon,
|
|
115
|
-
className: `chatbot-component-menu-container-icon-${tab.name?.toLowerCase()}`,
|
|
116
|
-
label: tab.name,
|
|
117
|
-
onClick: tab.onClick,
|
|
118
|
-
})),
|
|
119
|
-
...(showHistoryPanel ? mandatoryTabList : []),
|
|
120
|
-
]);
|
|
121
|
-
} else {
|
|
122
|
-
setMenuItems([newChatItem, ...defaultMenuItems]);
|
|
123
|
-
}
|
|
124
|
-
}, [tabList]);
|
|
125
|
-
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
if (isChatBotOpen) {
|
|
128
|
-
const resizer = document.querySelector(".resizer");
|
|
129
|
-
let startX, startWidth;
|
|
130
|
-
|
|
131
|
-
const onMouseMove = (e) => {
|
|
132
|
-
const dx = e.clientX - startX;
|
|
133
|
-
let newWidth = startWidth - dx;
|
|
134
|
-
const minAllowed = panelsOpen ? 690 + 360 : 690;
|
|
135
|
-
const maxAllowed = window.innerWidth - 100;
|
|
136
|
-
if (newWidth <= minAllowed) newWidth = minAllowed;
|
|
137
|
-
if (newWidth > maxAllowed) newWidth = maxAllowed;
|
|
138
|
-
setContainerWidth(`${newWidth}px`);
|
|
139
|
-
onChatBotResize?.(newWidth);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const onMouseUp = () => {
|
|
143
|
-
document.body.classList.remove("no-select");
|
|
144
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
145
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
const onMouseDown = (e) => {
|
|
149
|
-
startX = e.clientX;
|
|
150
|
-
startWidth = document
|
|
151
|
-
.querySelector(".chatbot-component-container")
|
|
152
|
-
.getBoundingClientRect().width;
|
|
153
|
-
document.body.classList.add("no-select");
|
|
154
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
155
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
156
|
-
};
|
|
157
|
-
setActiveList(tabList?.find((tab) => tab?.initialClick)?.name);
|
|
158
|
-
menuItems
|
|
159
|
-
?.find((tab) => tab?.initialClick)
|
|
160
|
-
?.onClick(menuItems?.find((tab) => tab?.initialClick));
|
|
161
|
-
if (resizer && !isFullWidth) {
|
|
162
|
-
resizer.addEventListener("mousedown", onMouseDown);
|
|
163
|
-
} else if (isFullWidth) {
|
|
164
|
-
setContainerWidth(`calc(100vw - 64px)`);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return () => {
|
|
168
|
-
resizer?.removeEventListener("mousedown", onMouseDown);
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
}, [isChatBotOpen, panelsOpen, isFullWidth]);
|
|
172
|
-
|
|
173
|
-
const handleCloseChatBot = () => {
|
|
174
|
-
setIsChatBotOpen(false);
|
|
175
|
-
setIsHistoryPanelOpen(false);
|
|
176
|
-
setIsBookMarkPanelOpen(false);
|
|
177
|
-
setIsPagePanelOpen(false);
|
|
178
|
-
onClose?.();
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
const handleMenuClick = (item) => {
|
|
182
|
-
if (item?.key === "newchat") {
|
|
183
|
-
setInputValue("");
|
|
184
|
-
let tabDetails = handleNewChatClick?.(item);
|
|
185
|
-
if (tabDetails?.isInitialClickPresent) {
|
|
186
|
-
let initialClickItem = tabList.find(
|
|
187
|
-
(item) =>
|
|
188
|
-
item?.name?.toLowerCase() === tabDetails?.tabName?.toLowerCase()
|
|
189
|
-
);
|
|
190
|
-
initialClickItem?.onClick?.(initialClickItem);
|
|
191
|
-
}
|
|
192
|
-
setActiveList(
|
|
193
|
-
tabList.find(
|
|
194
|
-
(item) =>
|
|
195
|
-
item?.name?.toLowerCase() === tabDetails?.tabName?.toLowerCase()
|
|
196
|
-
)?.name
|
|
197
|
-
);
|
|
198
|
-
} else if (item?.key === "history") {
|
|
199
|
-
setIsHistoryPanelOpen(!isHistoryPanelOpen);
|
|
200
|
-
onHistoryPanelClick?.(item, !isHistoryPanelOpen);
|
|
201
|
-
} else {
|
|
202
|
-
setActiveList(item?.key);
|
|
203
|
-
item?.onClick?.(item);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
const handleCloseLeftPanel = () => {
|
|
208
|
-
setIsBookMarkPanelOpen(false);
|
|
209
|
-
setIsHistoryPanelOpen(false);
|
|
210
|
-
setIsPagePanelOpen(false);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
useEffect(() => {
|
|
214
|
-
if (panelsOpen) {
|
|
215
|
-
setContainerWidth((prev) => {
|
|
216
|
-
return Math.min(parseInt(prev) + 360, window.innerWidth - 100);
|
|
217
|
-
});
|
|
218
|
-
} else {
|
|
219
|
-
setContainerWidth((prev) => {
|
|
220
|
-
return Math.max(parseInt(prev) - 360, 690);
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}, [panelsOpen]);
|
|
224
|
-
|
|
225
|
-
return (
|
|
226
|
-
<>
|
|
227
|
-
{isChatBotOpen ? (
|
|
228
|
-
<div className="chatbot-modal-wrapper">
|
|
229
|
-
<div className="resizer" />
|
|
230
|
-
<div
|
|
231
|
-
className="chatbot-component-container"
|
|
232
|
-
style={{ width: containerWidth }}
|
|
233
|
-
>
|
|
234
|
-
{landingScreen ? (
|
|
235
|
-
<ChatBotLandingScreen
|
|
236
|
-
onClose={handleCloseChatBot}
|
|
237
|
-
isFullWidth={isFullWidth}
|
|
238
|
-
/>
|
|
239
|
-
) : (
|
|
240
|
-
<>
|
|
241
|
-
<div
|
|
242
|
-
className={`chatbot-component-left-side ${
|
|
243
|
-
isBookMarkPanelOpen || isHistoryPanelOpen || isPagePanelOpen
|
|
244
|
-
? "chatbot-component-left-side-open"
|
|
245
|
-
: ""
|
|
246
|
-
}`}
|
|
247
|
-
>
|
|
248
|
-
<div
|
|
249
|
-
className={`chatbot-component-menu-container ${
|
|
250
|
-
isBookMarkPanelOpen ||
|
|
251
|
-
isHistoryPanelOpen ||
|
|
252
|
-
isPagePanelOpen
|
|
253
|
-
? "chatbot-component-menu-container-open"
|
|
254
|
-
: ""
|
|
255
|
-
}`}
|
|
256
|
-
>
|
|
257
|
-
<div
|
|
258
|
-
className={`chatbot-component-menu-container-icon ${
|
|
259
|
-
isBookMarkPanelOpen ||
|
|
260
|
-
isHistoryPanelOpen ||
|
|
261
|
-
isPagePanelOpen
|
|
262
|
-
? "chatbot-component-menu-container-icon-open"
|
|
263
|
-
: ""
|
|
264
|
-
}`}
|
|
265
|
-
>
|
|
266
|
-
<ul className="chatbot-component-menu-list">
|
|
267
|
-
{menuItems?.map((item) => (
|
|
268
|
-
<Tooltip
|
|
269
|
-
title={
|
|
270
|
-
item.key.charAt(0).toUpperCase() +
|
|
271
|
-
item.key.slice(1)
|
|
272
|
-
}
|
|
273
|
-
variant="tertiary"
|
|
274
|
-
orientation="left"
|
|
275
|
-
>
|
|
276
|
-
<li
|
|
277
|
-
key={item.key}
|
|
278
|
-
className={`${item.className} ${
|
|
279
|
-
activeList?.toLowerCase() ===
|
|
280
|
-
item?.key?.toLowerCase()
|
|
281
|
-
? "active"
|
|
282
|
-
: ""
|
|
283
|
-
}`}
|
|
284
|
-
onClick={() => handleMenuClick(item)}
|
|
285
|
-
>
|
|
286
|
-
{typeof item.icon === "string" ? (
|
|
287
|
-
<img
|
|
288
|
-
src={item.icon}
|
|
289
|
-
className={item.iconClassName}
|
|
290
|
-
alt={item.key}
|
|
291
|
-
/>
|
|
292
|
-
) : (
|
|
293
|
-
item.icon
|
|
294
|
-
)}
|
|
295
|
-
</li>
|
|
296
|
-
</Tooltip>
|
|
297
|
-
))}
|
|
298
|
-
</ul>
|
|
299
|
-
<ul className="chatbot-component-menu-list utility-list">
|
|
300
|
-
{utilityList?.map((item) => (
|
|
301
|
-
<Tooltip
|
|
302
|
-
title={
|
|
303
|
-
item.key.charAt(0).toUpperCase() +
|
|
304
|
-
item.key.slice(1)
|
|
305
|
-
}
|
|
306
|
-
variant="tertiary"
|
|
307
|
-
orientation="left"
|
|
308
|
-
>
|
|
309
|
-
<li key={item.key} onClick={item.onClick}>
|
|
310
|
-
{typeof item.icon === "string" ? (
|
|
311
|
-
<img src={item.icon} alt={item.key} />
|
|
312
|
-
) : (
|
|
313
|
-
item.icon
|
|
314
|
-
)}
|
|
315
|
-
</li>
|
|
316
|
-
</Tooltip>
|
|
317
|
-
))}
|
|
318
|
-
</ul>
|
|
319
|
-
</div>
|
|
320
|
-
{isBookMarkPanelOpen &&
|
|
321
|
-
!isHistoryPanelOpen &&
|
|
322
|
-
!isPagePanelOpen && (
|
|
323
|
-
<BookMarkPanel
|
|
324
|
-
preDefinedQuestions={preDefinedQuestions}
|
|
325
|
-
addedByYouQuestions={addedByYouQuestions}
|
|
326
|
-
onClose={handleCloseLeftPanel}
|
|
327
|
-
/>
|
|
328
|
-
)}
|
|
329
|
-
{isHistoryPanelOpen &&
|
|
330
|
-
!isBookMarkPanelOpen &&
|
|
331
|
-
!isPagePanelOpen && (
|
|
332
|
-
<HistoryPanel
|
|
333
|
-
historyPanelData={historyPanelData}
|
|
334
|
-
onClose={handleCloseLeftPanel}
|
|
335
|
-
onSearchChange={onHistorySearchChange}
|
|
336
|
-
onSelectConversation={onHistorySelectConversation}
|
|
337
|
-
onToggleGroup={(groupName, isOpen) => {
|
|
338
|
-
if (historyOpenGroups == null) {
|
|
339
|
-
setLocalHistoryOpenGroups((prev) => ({
|
|
340
|
-
...prev,
|
|
341
|
-
[groupName]: isOpen,
|
|
342
|
-
}));
|
|
343
|
-
}
|
|
344
|
-
onHistoryToggleGroup?.(groupName, isOpen);
|
|
345
|
-
}}
|
|
346
|
-
openGroups={
|
|
347
|
-
historyOpenGroups ?? localHistoryOpenGroups
|
|
348
|
-
}
|
|
349
|
-
onMenuAction={onHistoryMenuAction}
|
|
350
|
-
activeConversationId={activeConversationId}
|
|
351
|
-
/>
|
|
352
|
-
)}
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
<div
|
|
356
|
-
className={`chatbot-component-right-side ${
|
|
357
|
-
isBookMarkPanelOpen || isHistoryPanelOpen || isPagePanelOpen
|
|
358
|
-
? "chatbot-component-right-side-open"
|
|
359
|
-
: ""
|
|
360
|
-
}`}
|
|
361
|
-
>
|
|
362
|
-
{!isCustomScreen && (
|
|
363
|
-
<div className="conversation-screen-container">
|
|
364
|
-
<ChatbotModuleMenu
|
|
365
|
-
hideMenuArrow={hideMenuArrow}
|
|
366
|
-
moduleList={moduleList}
|
|
367
|
-
activeList={activeList}
|
|
368
|
-
onModuleClick={onModuleClick}
|
|
369
|
-
hideChildren={!newChatScreen}
|
|
370
|
-
isModuleListLoading={isModuleListLoading}
|
|
371
|
-
hideCenterOptions={newChatScreen}
|
|
372
|
-
threadList={threadList}
|
|
373
|
-
activeThread={activeThread}
|
|
374
|
-
handleSavedChat={handleSavedChat}
|
|
375
|
-
onClose={handleCloseChatBot}
|
|
376
|
-
isFullWidth={isFullWidth}
|
|
377
|
-
handleCloseThread={handleCloseThread}
|
|
378
|
-
handleThreadClick={handleThreadClick}
|
|
379
|
-
onMinimiseChatBot={onMinimiseChatBot}
|
|
380
|
-
/>
|
|
381
|
-
</div>
|
|
382
|
-
)}
|
|
383
|
-
{newChatScreen ? (
|
|
384
|
-
<NewChatComponent
|
|
385
|
-
onClose={handleCloseChatBot}
|
|
386
|
-
userName={userName}
|
|
387
|
-
inputValue={inputValue}
|
|
388
|
-
setInputValue={setInputValue}
|
|
389
|
-
setIsNewChat={setIsNewChat}
|
|
390
|
-
onSendIconClick={onSendIconClick}
|
|
391
|
-
userChats={userChats}
|
|
392
|
-
setUserChats={setUserChats}
|
|
393
|
-
moduleList={moduleList}
|
|
394
|
-
onModuleClick={onModuleClick}
|
|
395
|
-
activeList={activeList}
|
|
396
|
-
handleRefresh={handleRefresh}
|
|
397
|
-
handleSaveChat={handleSaveChat}
|
|
398
|
-
handleMicClick={handleMicClick}
|
|
399
|
-
hideMenuArrow={hideMenuArrow}
|
|
400
|
-
isModuleListLoading={isModuleListLoading}
|
|
401
|
-
suggestionBanner={suggestionBanner}
|
|
402
|
-
isStopIcon={isStopIcon}
|
|
403
|
-
onStopIconClick={onStopIconClick}
|
|
404
|
-
onCloseSuggestionBanner={onCloseSuggestionBanner}
|
|
405
|
-
showSuggestionBanner={showSuggestionBanner}
|
|
406
|
-
customInputComponent={customInputComponent}
|
|
407
|
-
/>
|
|
408
|
-
) : isCustomScreen ? (
|
|
409
|
-
<CustomScreen
|
|
410
|
-
onClose={handleCloseChatBot}
|
|
411
|
-
customScreenJsx={customScreenJsx}
|
|
412
|
-
userChats={userChats}
|
|
413
|
-
setUserChats={setUserChats}
|
|
414
|
-
onSendIconClick={onSendIconClick}
|
|
415
|
-
activeList={activeList}
|
|
416
|
-
handleRefresh={handleRefresh}
|
|
417
|
-
handleSaveChat={handleSaveChat}
|
|
418
|
-
handleMicClick={handleMicClick}
|
|
419
|
-
suggestionBanner={suggestionBanner}
|
|
420
|
-
isStopIcon={isStopIcon}
|
|
421
|
-
onStopIconClick={onStopIconClick}
|
|
422
|
-
onCloseSuggestionBanner={onCloseSuggestionBanner}
|
|
423
|
-
showSuggestionBanner={showSuggestionBanner}
|
|
424
|
-
customInputComponent={customInputComponent}
|
|
425
|
-
isFullWidth={isFullWidth}
|
|
426
|
-
/>
|
|
427
|
-
) : (
|
|
428
|
-
<ConversationScreen
|
|
429
|
-
conversation={conversation}
|
|
430
|
-
setConversation={setQuestion}
|
|
431
|
-
solution={answer}
|
|
432
|
-
inputValue={inputValue}
|
|
433
|
-
onClose={handleCloseChatBot}
|
|
434
|
-
formComponent={formComponent}
|
|
435
|
-
tableComponent={tableComponent}
|
|
436
|
-
containerWidth={containerWidth}
|
|
437
|
-
userChats={userChats}
|
|
438
|
-
setUserChats={setUserChats}
|
|
439
|
-
assistantChats={assistantChats}
|
|
440
|
-
onSendIconClick={onSendIconClick}
|
|
441
|
-
isAssistantThinking={isAssistantThinking}
|
|
442
|
-
moduleList={moduleList}
|
|
443
|
-
onModuleClick={onModuleClick}
|
|
444
|
-
activeList={activeList}
|
|
445
|
-
handleSavedChat={handleSavedChat}
|
|
446
|
-
threadList={threadList}
|
|
447
|
-
activeThread={activeThread}
|
|
448
|
-
onLikeClick={onLikeClick}
|
|
449
|
-
onDislikeClick={onDislikeClick}
|
|
450
|
-
inputText={inputText}
|
|
451
|
-
handleRefresh={handleRefresh}
|
|
452
|
-
handleSaveChat={handleSaveChat}
|
|
453
|
-
handleMicClick={handleMicClick}
|
|
454
|
-
hideMenuArrow={hideMenuArrow}
|
|
455
|
-
isModuleListLoading={isModuleListLoading}
|
|
456
|
-
suggestionBanner={suggestionBanner}
|
|
457
|
-
isStopIcon={isStopIcon}
|
|
458
|
-
onStopIconClick={onStopIconClick}
|
|
459
|
-
onCloseSuggestionBanner={onCloseSuggestionBanner}
|
|
460
|
-
showSuggestionBanner={showSuggestionBanner}
|
|
461
|
-
customInputComponent={customInputComponent}
|
|
462
|
-
/>
|
|
463
|
-
)}
|
|
464
|
-
<ChatBotFooter footerText={footerText} />
|
|
465
|
-
</div>
|
|
466
|
-
</>
|
|
467
|
-
)}
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
) : null}
|
|
471
|
-
</>
|
|
472
|
-
);
|
|
473
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ChatInput from "./chatInput";
|
|
3
|
-
import SunIcon from "../../assets/sun.png";
|
|
4
|
-
import SmartBotIcon from "../../assets/smartBotAlan.svg";
|
|
5
|
-
|
|
6
|
-
// Function to get appropriate greeting based on time of day
|
|
7
|
-
const getGreeting = () => {
|
|
8
|
-
const hour = new Date().getHours();
|
|
9
|
-
|
|
10
|
-
if (hour >= 5 && hour < 12) {
|
|
11
|
-
return "Good Morning";
|
|
12
|
-
} else if (hour >= 12 && hour < 16) {
|
|
13
|
-
return "Good Afternoon";
|
|
14
|
-
} else {
|
|
15
|
-
return "Good Evening";
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const NewChatComponent = ({
|
|
20
|
-
onClose,
|
|
21
|
-
userName,
|
|
22
|
-
inputValue,
|
|
23
|
-
setInputValue,
|
|
24
|
-
setIsNewChat,
|
|
25
|
-
onSendIconClick,
|
|
26
|
-
userChats,
|
|
27
|
-
setUserChats,
|
|
28
|
-
moduleList,
|
|
29
|
-
onModuleClick,
|
|
30
|
-
activeList,
|
|
31
|
-
handleRefresh,
|
|
32
|
-
handleSaveChat,
|
|
33
|
-
handleMicClick,
|
|
34
|
-
hideMenuArrow,
|
|
35
|
-
isModuleListLoading,
|
|
36
|
-
suggestionBanner,
|
|
37
|
-
isStopIcon,
|
|
38
|
-
onStopIconClick,
|
|
39
|
-
onCloseSuggestionBanner,
|
|
40
|
-
showSuggestionBanner,
|
|
41
|
-
customInputComponent,
|
|
42
|
-
}) => {
|
|
43
|
-
const [loading, setLoading] = React.useState(true);
|
|
44
|
-
const [greeting, setGreeting] = React.useState(getGreeting());
|
|
45
|
-
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
const timer = setTimeout(() => setLoading(false), 450);
|
|
48
|
-
return () => clearTimeout(timer);
|
|
49
|
-
}, []);
|
|
50
|
-
|
|
51
|
-
// Update greeting when component mounts
|
|
52
|
-
React.useEffect(() => {
|
|
53
|
-
setGreeting(getGreeting());
|
|
54
|
-
}, []);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<>
|
|
58
|
-
<div className="chatbot-component-body">
|
|
59
|
-
<div className="chatbot-component-body-container">
|
|
60
|
-
<div
|
|
61
|
-
className={`chatbot-component-body-icon${
|
|
62
|
-
loading ? " rotating" : ""
|
|
63
|
-
}`}
|
|
64
|
-
>
|
|
65
|
-
<img src={SmartBotIcon} />
|
|
66
|
-
</div>
|
|
67
|
-
<div className="chatbot-component-body-text">
|
|
68
|
-
<span className="chatbot-component-body-text-title">
|
|
69
|
-
{greeting}{" "}
|
|
70
|
-
<span className="chatbot-component-body-text-username">
|
|
71
|
-
{userName}!
|
|
72
|
-
</span>
|
|
73
|
-
<img src={SunIcon} alt="sun" style={{}} />
|
|
74
|
-
</span>
|
|
75
|
-
<span className="chatbot-component-body-text-description">
|
|
76
|
-
I am Alan, how can I help you today?
|
|
77
|
-
</span>
|
|
78
|
-
</div>
|
|
79
|
-
<div className="chatbot-component-body-input-container">
|
|
80
|
-
<ChatInput
|
|
81
|
-
inputValue={inputValue}
|
|
82
|
-
setInputValue={setInputValue}
|
|
83
|
-
setIsNewChat={setIsNewChat}
|
|
84
|
-
onSendIconClick={onSendIconClick}
|
|
85
|
-
userChats={userChats}
|
|
86
|
-
setUserChats={setUserChats}
|
|
87
|
-
activeList={activeList}
|
|
88
|
-
handleRefresh={handleRefresh}
|
|
89
|
-
handleSaveChat={handleSaveChat}
|
|
90
|
-
handleMicClick={handleMicClick}
|
|
91
|
-
suggestionBanner={suggestionBanner}
|
|
92
|
-
isStopIcon={isStopIcon}
|
|
93
|
-
onStopIconClick={onStopIconClick}
|
|
94
|
-
minRows={4}
|
|
95
|
-
newChatScreen={true}
|
|
96
|
-
onCloseSuggestionBanner={onCloseSuggestionBanner}
|
|
97
|
-
showSuggestionBanner={showSuggestionBanner}
|
|
98
|
-
customInputComponent={customInputComponent}
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</>
|
|
104
|
-
);
|
|
105
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export const formatAMPM = (date) => {
|
|
2
|
-
let hours = date.getHours();
|
|
3
|
-
let minutes = date.getMinutes();
|
|
4
|
-
const ampm = hours >= 12 ? "PM" : "AM";
|
|
5
|
-
hours = hours % 12;
|
|
6
|
-
hours = hours ? hours : 12; // the hour '0' should be '12'
|
|
7
|
-
minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
8
|
-
return `${hours}:${minutes} ${ampm}`;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const getDateLabel = (dateString) => {
|
|
12
|
-
const date = new Date(dateString);
|
|
13
|
-
const today = new Date();
|
|
14
|
-
const yesterday = new Date();
|
|
15
|
-
yesterday.setDate(today.getDate() - 1);
|
|
16
|
-
|
|
17
|
-
const isToday = date.toDateString() === today.toDateString();
|
|
18
|
-
const isYesterday = date.toDateString() === yesterday.toDateString();
|
|
19
|
-
|
|
20
|
-
if (isToday) return "Today";
|
|
21
|
-
if (isYesterday) return "Yesterday";
|
|
22
|
-
return date.toLocaleDateString(undefined, {
|
|
23
|
-
month: "short",
|
|
24
|
-
day: "numeric",
|
|
25
|
-
year: "numeric",
|
|
26
|
-
});
|
|
27
|
-
};
|