New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mxenabled/connect-widget

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mxenabled/connect-widget

A simple ui library for React

  • 0.0.21
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Connect Widget

NPM Version

This is the UI only for the connect widget. Heavy configuration and an API are needed for this project to work. See usage and props for more details.

Installation

Install using npm package manager:

npm install @mxenabled/connect-widget

Usage

  1. Install package: npm install --save @mxenabled/connect-widget
  2. Import ApiProvider and ConnectWidget. Add both to your project.
  3. Pass applicable props to widget and your API to the provider.
import ConnectWidget, { ApiProvider } from '@mxenabled/connect-widget'
import apiService from './apiService' // You custom api service

const App = () => {
  return (
    <ApiProvider apiValue={apiService}>
      <ConnectWidget {...props} />
      {/* See props details below */}
    </ApiProvider>
  )
}

Props

PropTypeDescriptionDefault
clientConfigClientConfigTypeThe connect widget uses the config to set the initial state and behavior of the widget. More detailsSee more details
languageLanguageTypeThe connect widget supports multiple languages and custom copy. Supported locale options: en, es, and fr-ca.{ locale: 'en', custom_copy_namespace: '' }
onAnalyticEventAnalyticContextTypeThe connect widget provides a way to track events and pageviews using your own analytics provider. More detailsnull
onAnalyticPageviewAnalyticContextTypeThe connect widget provides a way to track events and pageviews using your own analytics provider. More detailsnull
onPostMessagePostMessageContextTypeThe connect widget uses post messages to communicate with the parent window. More detailsnull
profilesProfilesTypesThe connect widget uses the profiles to set the initial state of the widget. More detailsSee more details
userFeaturesUserFeaturesTypeThe connect widget uses user features to determine the behavior of the widget. More detailsSee more details
showTooSmallDialogbooleanThe connect widget can show a warning when the widget size is below the supported 320px.true

ApiProvider

You need to pass an object containing API endpoint callbacks as the apiValue prop of the ApiProvider as described in the usage section for the widget to work. Here is a more detailed list of the API endpoint callbacks.

Developing

  1. Clone project
  2. Install Node(with npm). See package.json for current required versions
  3. Run npm i
  4. Make your code changes
  5. Run npm run build to build the project
  6. Link Project
  7. Test your changes
  8. Update change log, translations, and documentation as needed
  9. Open Pull Request

Linking for Development

For developing this package locally, we suggest you use npm link to connect your local version of the package to your client app using the package.

  1. In the npm package root, run npm link.
  2. Then in your consumer project, run npm link @mxenabled/connect-widget.

This will link the local package to your project in the node modules. Unlink the package when you are finished or if you run into issues.

Contributing

Pull requests are welcome. Please open an issue first to discuss what you would like to change.

Make sure to add/update tests, translations, and documentation as appropriate.

Changelog

View our changelog here

FAQs

Package last updated on 21 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc