0.2.6 • Published 5 years ago
appybee-widget-beta v0.2.6
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 APIwsBaseURL: Address of the WebSocket serverwidgetURL: Address of the widgetcompanyAPIKey(required): Company API keystyle(required): Widget style (side,fullscreenorinline)user: User is used to authenticate to the APIpasssword: Password is used to authenticate to the APIstrictPath(default:false): Store cookies in current path not in whole domainshowCloseButton(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.