Package Exports
- @ppci/widget-wrapper
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ppci/widget-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Widget Wrapper
Table of contents
Installation
NPM
npm i @ppci/widget-wrapper
// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
Usage
Javascript
import '@ppci/widget-wrapper'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/widget-wrapper/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/widget-wrapper/builds/legacy.min.js" />
<!-- Component -->
<widget-wrapper
error=${Object}
notification=${Object}
>
<div>Widget content over here</div>
</widget-wrapper>
Properties
Property | Type | Description | Possible Values |
error | Object | Show an global error | ```javascript error = { title: 'Something went wrong!', message: 'Custom error message', code: 500, retryTitle: 'Retry', retryAction: () => { console.log('retry'); }, } ``` |
notification | Object | Show a notification | ```javascript notification = { title: 'Something went wrong!', message: 'Custom error message', type: 'success' | 'danger' | 'warning', dismissAction: ( event ) => { console.log('dismiss: ', event); }, } ``` |