0.1.1 • Published 1 year ago

@claudebernard/stock-news-element v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

\ 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

NameTypeDefaultDescription
apiurlURLhttps://api.claudebernard.frAPI base URL to call to get stock news
apikeyUUIDnoneAPI 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.
langStringfr-FRUI display locale. Available : - French (France) : fr-FR - English: en
identifierStringnoneProduct identifier (can be CIS, CIP 13 or BCB Product Id)

Events

NameTypeFormatDescription
product-newsNewsEvent{ news: [ { cip13: string, newsType: string, description: string, ... } ] }Stock news were received about the product
no-product-newsEventThere is no stock news about the product

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Custom element checklist

  • Public documentation (docs portal)
  • 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
  • i18n
  • Browser support section
  • EOL section

License

Copyright of Cegedim. See LICENSE for details.

0.1.1

1 year ago

0.1.0

1 year ago