@claudebernard/stock-news-element
v0.1.1
Published
An element providing news about medical stocks.
Downloads
1
Readme
<bcb-stock-news> element
An element providing news about medical stocks.
Installation
npm install --save @claudebernard/stock-news
Usage
Script
Import as ES modules:
import '@claudebernard/stock-news-element';
With a script tag:
<script type="module" src="node_modules/@claudebernard/stock-news-element/dist/stock-news.js"></script>
HTML
<bcb-stock-news apiurl="https://api.claudebernard.fr"></bcb-stock-news>
Attributes
| Name | Type | Default | Description |
|--------------|----------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| apiurl
| URL
| https://api.claudebernard.fr
| API base URL to call to get stock news |
| apikey
| UUID
| none | API key authentication. Preferred method is to set up a proxy on your side that will add this API key header : in this case, don't provide any value here. |
| lang
| String
| fr-FR
| UI display locale. Available : - French (France) : fr-FR
- English: en
|
| identifier
| String
| none | Product identifier (can be CIS, CIP 13 or BCB Product Id) |
Events
| Name | Type | Format | Description |
|-------------------|-------------|-------------------------------------------------------------------------------|--------------------------------------------|
| product-news
| NewsEvent
| { news: [ { cip13: string, newsType: string, description: string, ... } ] }
| Stock news were received about the product |
| no-product-news
| Event
| | There is no stock news about the product |
Browser support
Browsers without native custom element support require a polyfill.
- [x] Chrome
- [x] Firefox
- [x] Safari
- [x] Microsoft Edge
Custom element checklist
- [ ] Public documentation (docs portal)
- [x] Functional on Angular, React, Vue
- [ ] Unit tested
- [ ] Code quality
- [ ] Changelog with semantic release
- [ ] Available in offline mode
- [ ] Best practices compliant
- [ ] Validated by QA
- [ ] Publicly available
- [ ] Based on FHIR
- [ ] Example on storybook
- [ ] Available demo
- [x] i18n
- [x] Browser support section
- [ ] EOL section
License
Copyright of Cegedim. See LICENSE for details.