open-index/open-npm huggingface dataset:
npm package: @happymini/react-ui
Description: HappyMini ReactUI is a set of UI Components designed according to mobile standards for ReactJS, helping you to shorten application development time and create a more user-friendly interface.
Latest version: 0.0.9

## HappyMini ReactUI

HappyMini ReactUI is a set of UI Components designed according to mobile standards for ReactJS, helping you to shorten application development time and create a more user-friendly interface.

#### Installation

```sh
npm i @happymini/react-ui
```

or

```sh
yarn add @happymini/react-ui
```

#### Usage

```js
import React from 'react'
import { Button } from '@happymini/react-ui'

export default () => {
  return (
    <>
      <Button color='primary' fill='solid'>
        Solid
      </Button>
    </>
  )
}
```

##### Contributors

- VyLQ


##### Credits
- Ant Design Mobile
npm package: @happyml/browser-side-actions
Description: A library for creating and managing happyml browser side actions
Latest version: 0.4.8

# HappyML Browser Side Actions

This package enables the execution of browser side actions for a HappyML chatbot.

### Installation

```bash
npm install @happyml/browser-side-actions
```

### Usage

```javascript
import { ChatWidget } from "@happyml/browser-side-actions";
```

### Example

```javascript
import React from "react";
import { ChatWidget } from "@happyml/browser-side-actions";

function App() {
  return <ChatWidget botId="your-bot-id" chatId="your-chat-id" />;
}
```

### ChatWidget Properties

| Property | Type     | Required | Description                                                                       |
| -------- | -------- | -------- | --------------------------------------------------------------------------------- |
| `botId`  | `string` | Yes      | Unique identifier for the HappyML chatbot.                                        |
| `chatId` | `string` | No       | Identifier for an existing chat session. Set to `null` or omit for a new session. |
npm package: @happymonkey/mkey-module
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
Latest version: 1.1.19

# Mkey

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

## Code scaffolding

Run `ng generate component component-name --project mkey` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project mkey`.
> Note: Don't forget to add `--project mkey` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build mkey` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build mkey`, go to the dist folder `cd dist/mkey` and run `npm publish`.

## Running unit tests

Run `ng test mkey` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @happymonkey/websocket-client
Description: ## Install
Latest version: 1.0.13

# websocket-client

## Install

```
npm i @happymonkey/websocket-client
```

Include in your `app.module.ts` :

```typescript
...
import {WebSocketClientModule} from 'web-socket-client';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ...
    WebSocketClientModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

```

## Example 
```typescript
...
import {WebSocketClientService} from 'web-socket-client';

...
constructor( public ws: WebSocketClientService ) {

    // Subscribe to events
    this.ws.onOpen.subscribe(() => {
      console.log( 'Server is ready');
    });
    
    this.ws.onError.subscribe((error) => {
      console.error(error);
    });
    
    this.ws.onClose.subscribe(() => {
      console.log( 'Connection closed' );
    });
    
    this.ws.onMessage.subscribe(( message: WebSocketMessage ) => {
        console.log( message.action, message.data );
    });

    this.ws.on('action_name').subscribe(( data: any ) => {
      console.log( 'Action received from server with data :', data );
    });
    
    this.ws.onTextMessage.subscribe(( payload: string ) => {
      console.log( 'Text message received :', payload );
    });

    // Connect to server
    this.ws.open('ws://localhost:8282');
    
    // Send action
    this.ws.send('action', {foo: 'bar'});

    // Send plain text message
    this.ws.sendText('plain text message');
    
    // Close connection
    this.ws.close();
    
    // Check if client is connected
    if ( this.ws.opened ) {
      console.log( 'WebSocket is ready' );
    }
    
    // Properties
    const url = this.ws.url;
    const readyState = this.ws.readyState;
}
```