vue-advanced-chat

A beautiful chat rooms web component compatible with all Javascript frameworks

MIT License

Downloads
17K
Stars
1.7K
Committers
34

Bot releases are hidden (Show)

vue-advanced-chat - 2.0.9: Add dist files to release build

Published by antoine92190 11 months ago

Changelog

vue-advanced-chat - 2.0.8: Improve markdown support

Published by antoine92190 11 months ago

vue-advanced-chat - 2.0.7: Add capture-files prop

Published by antoine92190 over 1 year ago

Changelog

vue-advanced-chat - 2.0.5: Fix typings & drag and drop availability

Published by antoine92190 almost 2 years ago

Changelog

vue-advanced-chat - 2.0.4: Add drag & drop files & message-avatar slot & search-room event

Published by antoine92190 almost 2 years ago

Changelog

vue-advanced-chat - 2.0.3: Fix message reply

Published by antoine92190 about 2 years ago

vue-advanced-chat - 2.0.2: Fix initial room loading

Published by antoine92190 about 2 years ago

vue-advanced-chat - 2.0.1: Fix video height & toggle-rooms-list event

Published by antoine92190 about 2 years ago

Changelog

vue-advanced-chat - 2.0.0: Web component migration

Published by antoine92190 about 2 years ago

Fully migrate the library to web component, so it can be used the same way on Vue 2, Vue 3, React, Angular and any other framework, or with not framework at all.

For more information, please read the official documentation Vue and Web Components.

MIGRATION GUIDE

Usage

  • Import and use the web component like this:
import { register } from 'vue-advanced-chat'
register()
  • Register vue-advanced-chat as a web component in your config file:
compilerOptions: {
  isCustomElement: tagName => tagName === 'vue-advanced-chat'
}

Shadow DOM

CSS classes cannot be simply overridden anymore. You can still use CSS variables, and if needed you can override CSS classes like this:

const style = document.createElement('style')
style.innerHTML = styles
this.$refs.chatWindow.shadowRoot.appendChild(style)

Props

For array and object props, you need to pass it as strings, for example: [messages]="JSON.stringify(messages)

Some props typing have changed:

  • current-user-id and room-id props must be strings
  • roomId, typingUsers and user._id in rooms prop must be strings
  • senderId in messages prop must be a string
  • senderId is rooms.lastMessage must be a string

Events

You can get events params like this:

@fetch-messages="fetchMessages($event.detail[0])"

Slots

As this library is now using native web component slots, some slots were renamed and the usage changed in some cases.
For the full list of available slots, please refer to https://github.com/antoine92190/vue-advanced-chat#named-slots

vue-advanced-chat - 1.5.8: Fix templates & hashtags

Published by antoine92190 about 2 years ago

vue-advanced-chat - 1.5.7: Fix release issue

Published by antoine92190 over 2 years ago

Changelog

  • Previous release version seems to have the incorrect build files
vue-advanced-chat - 1.5.6: Add textarea-auto-focus prop & system-message slot

Published by antoine92190 over 2 years ago

Changelog

vue-advanced-chat - 1.5.5: Increase emojis size

Published by antoine92190 over 2 years ago

Changelog

vue-advanced-chat - 1.5.4: Add emoji-picker slot

Published by antoine92190 over 2 years ago

Changelog

vue-advanced-chat - 1.5.3: Fix footer slots + Bug fixes

Published by antoine92190 over 2 years ago

Changelog

*Credits to @rr-it

vue-advanced-chat - 1.5.2: Performance improvements

Published by antoine92190 over 2 years ago

Changelog

vue-advanced-chat - 1.5.1: Fix audio player

Published by antoine92190 almost 3 years ago

Changelog

vue-advanced-chat - 1.5.0: Add message selection feature

Published by antoine92190 almost 3 years ago

Changelog

vue-advanced-chat - 1.4.5: Add username-options prop

Published by antoine92190 almost 3 years ago

Changelog