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

react-slack-chat-amended

v1.12.0

Published

A Beautiful Gooey / Material Design Slack Chat Web Integrating Widget.

Downloads

1

Readme

React Slack Chat

Build Status Node Version Known Vulnerabilities

DEMO

A Beautiful Gooey / Material Design Slack Chat Web Integrating Widget. This widget can be integrated as a Live Chat / Help Desk / Discussions for Special Interest Sites in Solo Single Customer Mode (1:1) or Community Chat (Shoutbox) Mode.

Give your users the Perfect Support / Engagement experience, with the comfort of Slack.

Throw your website visitors into a Slack Channel Community, where they can search for answers or get replies from online Slack Users.

Image of React Component In Action

Pre Requisites

  1. Pollyfill babel. Your app has to do it to avoid multiple instancing errors from babel-polyfill.
  2. Setup a Slack Bot for your team. Note your API token.
  3. Base64 encode your newly created API token and fasten your seat-belts.

Installation

Install React Slack Chat by

npm install --save react-slack-chat

Example Usage:

import { ReactSlackChat } from 'react-slack-chat';

class App extends Component {
  render() {
    return (
        <ReactSlackChat
          botName='5punk-unique-id' // VisitorID, CorpID, Email, IP address etc.
          apiToken='base64-encoded-api-token-119aab37r32r32r316e0296c3da'
          channels={[
          {
            name: 'random'
          },
          {
            name: 'test',
            id: 'C48SAX4',
            icon: ''
          },
          {
            name: 'test22',
            id: '',
            icon: './logo.svg'
          }]}
          helpText='Optional Help Text'
          themeColor='#856090'
          userImage='http://www.iconshock.com/img_vista/FLAT/mail/jpg/robot_icon.jpg'
          debugMode={true}
          hooks={[
            {
              /* My Custom Hook */
              id: 'getSystemInfo',
              action: () => 'MY SYSTEM INFO!'
            }
          ]}
        />
      )
  }
}

Options

Below are a list of props the <ReactSlackChat /> component accepts

  • botname: [UNIQUE] [REQUIRED] The name of the user / bot. Can be Visitor ID / Email ID / CorpID / IP address etc.
  • apiToken: [REQUIRED] The BASE64 ENCODED API Token for the bot you created for your team. You can create one here.
  • channels: [REQUIRED] At least one slack channel object needs to be passed for the first channel view. Refer example above.
  • userImage: [REQUIRED] An image URL for the user / bot (Does not need to be unique).
  • helpText: [OPTIONAL] The Help Text visible on the minimized view of the chat Widget.
  • themeColor: [OPTIONAL] A Hex Color value accent you want the widget to be themed with, stylish stuff.
  • hooks: [OPTIONAL] Custom Action Hooks, let's administrators execute commands. In the format $=>@botName:HOOK_ID. Example: $=>@5punk:getCurrentPath
  • debugMode: [OPTIONAL] Pass a boolean (true/false) flag to start debug logs.
  • defaultChannel: [OPTIONAL] Channel name to bypass the channel list and go directly to a specific channel.
  • defaultMessage: [OPTIONAL] Prepend a default message to the beginning of the message list, such as an automatic greeting when a user first joins the channel.
  • singleUserMode: [OPTIONAL] Pass a boolean to filter messages so the user only sees his/her messages and replies directed at the user in threads on the Slack side.
  • closeChatButton: [OPTIONAL] Pass a boolean to add an "x" close button in the corner of the chat window instead of going back to channel list and minimizing.

Default System Hooks

All hooks can ONLY be executed by Administrators. Admins are usually the team members that belong to the Slack Team (Backend).

All responses of hooks, are only visible to the backend Administrators (Visible to the members in the Slack App).

ReactSlackChat gives you a few hooks ready to use out of the box. An Admin can call any hook with the following command via the Slack App Backend

$=>@botName:HOOK_ID

They're documented below:

  • getCurrentPath: Returns location of the window of the Client.
  • getPlatform: Returns the OS of the Client.
  • getScreenshot: Returns the current screenshot of the Client's window / app view.

Feel free to add your own custom hooks. It'll allow you to get any information from the Client or perform any action / function on the Client App.

Submit your ideas for innovative hooks or feature requests.

Screenshots

Screenshot Hook (System Default)

Image of Custom Hooks

Custom Hooks

Run the same hook against multiple botUsers (Clients). Hook responses are not visible to non admins / Clients.

Image of Custom Hooks

Mobile View

Image of Mobile View

Tag a Customer

Image of Special Mentions

Features

  • Multiple channel support
  • Attachments
  • No Server needed!
  • Custom Hooks
  • Responsive Mobile support
  • Special message UI if user is mentioned
  • Auto generated user icons if userImage is not supplied
  • Material UI with Animations
  • Remembers selected channel
  • Emoji support
  • Auto scroll on new messages