npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

customizable-chat

v0.0.9

Published

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.11.

Downloads

1

Readme

Ng-Customizable-Chat

This library was generated with Angular CLI version 11.2.11.

It is build in the base of Angular Material version 11.0.3

Introduction

This library's purpose is the visual implementation of a chat. This library is composed of two components at least for the moment. Both components help in the making of a chat, but they have different purposes. On the one hand ChatList helps to manage a list of chats unopened. On the other hand ChatBox helps to manage the principal interaction with an opened chat, including: file upload, text messages, an emoji menu, an information menu of the chat that is displayed.

Chat List

As mentioned before, this component's purpose is to display a list of chats, with information about two different types of chats, private and group chats, In both of them the information that could be displayed is an image that describes the chat, the name of the chat and if it is a private chat, the name of the person involved; the last message sent to the chat and finally the quantity of messages unseen.

The inputs of this component are the following:

  • [user] : This represents the user of application. The main fields are idSettings that references 1 for Day Theme and 2 for Night Theme, userName that represents the name of the user (it is also used to detect in private chats who the user is talking to).

  • [chatChange] : This represents the info of the displayed chat. This variable is only to treat the display of the main chat and return to the component in which you are using this component of the library. It is a Subject you can subscribe to gather information of the chat the user wants to display, as you display the chat the moment the user clicks in it

  • [privateChats] || [groupChats] : This represents an array of chats one for each type, the info that both have to have in common is: the image field, a chat name, chat participants in which in the case of group chats is an array of strings with the names of the users and in the case of the private chats is a string with the other participant, and the name corresponds to the creator of the chat also the name.

Note: The marked words corresponds to the name of the inner variable of the input.

ChatBox

As mentioned before, this component's purpose is to display a chat, with information about the chat, the description of the chat, the image, a dropzone for file messages, a form of image display, an emoji menu, a list of messages with info of the sender.

The inputs of this component are the following:

  • [user] : This represents the user of application. The main fields are idSettings that references 1 for Day Theme and 2 for Night Theme, userName that represents the name of the user (it is also used to detect in private chats who the user is talking to).

  • [chatObs] : This represents the info of the displayed chat. The main fields of the chat are the following: the image of the chat in the case of group chats, in the case of private chats you should include an image of the user whose chat is opened, the name and participants with the same function as in Chat list component, isPrivate field is used to detect if the chat is of private or group type.

  • [listUrls] : This represents an array of strings corresponding with the urls or socket messages that the component is going to use to send messages and interact with teh api, listUrls[0] --> where to send files via http request, listUrls[1] --> socket message for a private message, listUrls[2] --> socket message for a group message, listUrls[3] --> socket message to indicate to the users that a file is saved in database and was sent to the chat, is indicates the users that they have to do an http request to obtain the file, this is cause sockets have size limits in messaging. listUrls[4] --> indicates the baseUrl used to ask for messages, listUrls[5] --> corresponds with the message of the socket when receiving a message and listUrls[6] --> when a file is sent.

  • [listChatsGroup] || [listChatsPrivate] : It is an array of chats, one of private chats other of group chats. This contains in chatId the id of the chat and in messageList the list of messages of the chat, the format of the messages is the following:

Note : class Message { message: String; date: Date; sender: String; chatId: String; type:String; buffer:Buffer;}

  • [socket] : This is user's socket that will be used for communication with the websocket's service of the api (currently using ngx-socket-io for the implementation of the sockets)

Note: The marked words corresponds to the name of the inner variable of the input.

Note: For text messages use type : 'message', for the rest of the formats include the explicit format, f.e. 'image/png'

The chat box depends on ngx-socket-io for the socket implementation, the emojis depend on the PickerModule of @ctrl/ngx-emoji-mart, the file dropzone depends on the NgxDropzoneModule of ngx-dropzone