appybee-widget-beta

0.2.6 • Public • Published

AppyBee Widget Script

This is simple script which renders an iframe with a widget with provided params.

Methods

  • AppyBeeWidget.init(options);
  • AppyBeeWidget.show();
  • AppyBeeWidget.hide();

Options

Options are stored in object provided to init function as a param.

  • baseURL: Address of the API
  • wsBaseURL: Address of the WebSocket server
  • widgetURL: Address of the widget
  • companyAPIKey (required): Company API key
  • style (required): Widget style (side, fullscreen or inline)
  • user: User is used to authenticate to the API
  • passsword: Password is used to authenticate to the API
  • strictPath (default: false): Store cookies in current path not in whole domain
  • showCloseButton (default: true): Allow to control if close button is shown or not

Import widget

import AppyBeeWidget from "appybee-widget-beta";

AppyBeeWidget.init({
    baseURL: 'https://portal.appybee.nl',
    wsBaseURL: 'http://ws.appybee.nl',
    widgetURL: '******',
    style: 'fullscreen'
});
AppyBeeWidget.show();

Website style

Website style renders the widget in fullscreen mode with no possibility to close it. Additionally the "Home" tab is rendered as a main tab. It contains the informations about the selected company.

Script usage provided from CDN

<html lang="en">
    <body>
        <script src="https://cdn.jsdelivr.net/npm/appybee-widget-beta"></script>
        <script>
            AppyBeeWidget.init({
                baseURL: 'https://myprofiapp.nl',
                wsBaseURL: 'http://ws.appybee.nl',
                widgetURL: '******',
                style: 'fullscreen'
            });
            AppyBeeWidget.show();
        </script>
    </body>
</html>

Scripts

npm run build

Builds the widget to the /build directory.

Readme

Keywords

none

Package Sidebar

Install

npm i appybee-widget-beta

Weekly Downloads

17

Version

0.2.6

License

none

Unpacked Size

13.8 kB

Total Files

3

Last publish

Collaborators

  • myprofiapp