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

sorun-conversation

v1.0.14

Published

SORUN company conversation component

Downloads

1

Readme

sorun-conversation

SOR'UN company conversation component

NPM JavaScript Style Guide

Important release notes

1.0.14: Fixing auto initalize bug in Native mode 1.0.13: Fixing auto initalize bug 1.0.12: Adding callback function for last message 1.0.9: Adding show end conversation input parameter 1.0.8: Adding additional props to SorunJS 1.0.7: Adding authFailed output function 1.0.6: Waiting until company obj fetched and call fetching it in componentDidMount, and remove it from componentWillReceiveProps, and pass this company to Sorun-js 1.0.1: Adding the new conversation duration parameter 1.0.0: The first stable version of SOR'UN conversation component

Install

npm install --save sorun-conversation

Usage

This component is a container component that needs a view component in order to function well, you can use sorun-web-conversation for ReactJS applications or sorun-native-conversation for React Native applications. Also this component can works in two modes, auto initialize mode and manual initialize mode. In the first one the authentication is being done inside the component using a token prop, and with manual initialization it expects that the authentication will happened outside, the token will be get inside SorunJS library and just this component will need a variable to tell if the user is authenticated or not and the authenticate output action if the component needs to authenticate the user. 1- Auto initialize example:

import React, { Component } from 'react'
import WebConversation from 'sorun-web-conversation'
import Conversation from 'sorun-conversation'

class Example extends Component {
  render () {
    return (
      <Conversation
        lang={lang_variable}
        language={the_target_language} // en, tr, ar or de
        companyId={the_company_id}
        company= {the_company_object}
        logout= {logout_output_action}
        showHeader= {true}
        Layout= {WebConversation}
        autoInit= {true}
        token={the_token_variable}
        api={the_BE_path_variable}
        authFailed={authentication_failed_output_action}
      />
    )
  }
}

1- Manual initialize example:

import React, { Component } from 'react'
import WebConversation from 'sorun-web-conversation'
import Conversation from 'sorun-conversation'

class Example extends Component {
  render () {
    return (
      <Conversation
        lang={lang_variable}
        language={the_target_language} // en, tr, ar or de
        companyId= {the_company_id}
        company= {the_company_object}
        logout= {logout_output_action}
        showHeader= {true}
        Layout= {WebConversation}
        autoInit= {false}
        isAuthenticated={user_auth_state}
        core={core_variable}
        authenticate={authenticate_output_action}
      />
    )
  }
}

Props

| Prop | Description | | :------------------------ |:----------------------------------------------------------------------| | core | The SORUN JS instance the project is working on.| | lang | The language keys values map for displayed test inside the component, if its not set the component will use its default maps stored inside it.| | language | The target interface language en, tr, ar or de.| | companyId | The company Id to get the component working on that company.| | company | The company object if its already exists so the component will not fetch it again.| | logout | The logout output action.| | showHeader | Boolean to show or hide the header.| | Layout | The chosen layout if its for web or native applications.| | autoInit | true for auto initialization, and false for manual initialization.| | token | In auto initialization the token used for authorization the back-end calls.| | api | The back-end path.| | server | 'test', 'prod' or 'local' for auto choose the back-end path with default SORUN company servers.| | isAuthenticated | Boolean about the authentication state of the user.| | authenticate | Output action that will be called if authentication failed or the isAuthenticated is equal to false.|

License

MIT © [Ahmad Mhaish](https://github.com/Ahmad Mhaish)