chatwoot/app/javascript/widget/components
Fayaz Ahmed b474929f5e
chore: Replace eventBus with mitt.js [CW-3275] (#9539)
# Replace the deprecated `eventBus` with mitt.js

## Description

Since eventBus and it's respective methods are deprecated and removed
from all future releases of vue, this was blocking us from migrating.
This PR replaces eventBus with
[mitt](https://github.com/developit/mitt). I have created a wrapper
mitt.js to simulate the same old event names so it's backwards
compatible, without making a lot of changes.


Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

1. Made sure all the places we're listening to bus events are working as
expected.
2. Respective specsf or the events from mitt.


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2024-05-31 15:50:36 +05:30
..
dropdown chore: Upgrade Tailwind CSS to 3.3.2 (#7380) 2023-06-26 11:27:16 -07:00
Form fix: Widget phone number input country undefined in onSelectCountry (#9457) 2024-05-15 09:48:55 +05:30
layouts fix: clear timers and animation frame request before component unmounts (#8700) 2024-01-22 12:08:33 +05:30
PreChat feat: do not send contact details to the widget (#9223) 2024-04-12 15:30:07 +05:30
stories feat: Components to render articles in widget home (#7596) 2023-07-24 16:45:55 -07:00
template feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
AgentMessage.vue chore: Replace eventBus with mitt.js [CW-3275] (#9539) 2024-05-31 15:50:36 +05:30
AgentMessageBubble.vue feat: Update dependencies and fix import syntax for Vite migration (#7959) 2023-09-21 17:55:54 +05:30
AgentTypingBubble.vue fix: Typing indicator to support dark mode (#8564) 2023-12-15 09:57:13 +05:30
ArticleCardSkeletonLoader.vue feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
ArticleCategoryCard.vue fix: Render articles in widget if it is available (#7654) 2023-09-14 19:56:17 +05:30
ArticleHero.vue fix: Render articles in widget if it is available (#7654) 2023-09-14 19:56:17 +05:30
ArticleList.vue feat: Update dependencies and fix import syntax for Vite migration (#7959) 2023-09-21 17:55:54 +05:30
ArticleListItem.vue feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
ArticleSearch.vue feat: Components to render articles in widget home (#7596) 2023-07-24 16:45:55 -07:00
AvailableAgents.vue fix: Render articles in widget if it is available (#7654) 2023-09-14 19:56:17 +05:30
Banner.vue chore: Replace eventBus with mitt.js [CW-3275] (#9539) 2024-05-31 15:50:36 +05:30
ChatAttachment.vue chore: Replace eventBus with mitt.js [CW-3275] (#9539) 2024-05-31 15:50:36 +05:30
ChatFooter.vue chore: Replace eventBus with mitt.js [CW-3275] (#9539) 2024-05-31 15:50:36 +05:30
ChatHeader.vue feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
ChatHeaderExpanded.vue feat: Update dependencies and fix import syntax for Vite migration (#7959) 2023-09-21 17:55:54 +05:30
ChatInputWrap.vue feat: Remove the usage of clickAway mixin with directive (#9323) 2024-04-30 10:35:14 +05:30
ChatMessage.vue feat: show ReplyTo in widget UI (#8094) 2023-10-27 13:35:02 +05:30
ChatSendButton.vue feat: Remove ionicons v2 dependency on widget (#3402) 2021-11-18 15:18:51 +05:30
ContinueChatButton.vue fix: Render articles in widget if it is available (#7654) 2023-09-14 19:56:17 +05:30
ConversationWrap.vue feat: Update bot typing indicator based on the conversation status (#7714) 2023-08-11 16:41:01 -07:00
DragWrapper.vue feat: toggle reply to on widget based on feature flag (#8261) 2023-10-31 21:33:14 +05:30
FileBubble.vue fix: Text color bug on attachment bubble in widget (#6399) 2023-02-09 16:50:11 +05:30
FooterReplyTo.vue feat: toggle reply to on widget based on feature flag (#8261) 2023-10-31 21:33:14 +05:30
GroupedAvatars.vue feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
HeaderActions.vue feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
ImageBubble.vue fix: Fixes console error with image component in widget (#3955) 2022-02-10 12:48:22 +05:30
MessageReplyButton.vue feat: show ReplyTo in widget UI (#8094) 2023-10-27 13:35:02 +05:30
ReplyToChip.vue fix: clear timers and animation frame request before component unmounts (#8700) 2024-01-22 12:08:33 +05:30
SearchArticle.vue feat: Components to render articles in widget home (#7596) 2023-07-24 16:45:55 -07:00
TeamAvailability.vue chore: Adds hasConversation flag in chatwoot:on-start-conversation event (#8132) 2023-10-17 16:24:00 -07:00
UnreadMessage.vue fix: Fix an issue where Chat Widget Unread Message is not correctly d… (#8245) 2023-10-30 12:52:26 +05:30
UnreadMessageList.vue feat: Hides dismissed campaigns while browsing [cw-33] (#6842) 2023-04-25 22:38:36 +05:30
UserAvatar.vue chore: Update self-closing tag eslint config (#4826) 2022-06-10 19:29:52 +05:30
UserMessage.vue feat: remove feature flag checks for message reply to (#8352) 2023-11-15 13:05:58 +05:30
UserMessageBubble.vue chore: Use markdown-it instead of marked (#6123) 2023-03-03 13:26:54 +05:30