etison-delta-currency

1.4.0 • Public • Published

Installation

ember install etison-delta-currency

Live Demo

  • git clone <repository-url> this repository
  • change into the new directory
  • npm install
  • bower install
  • ember server
  • Visit the app at http://localhost:4200.

Required Configuration

This addon uses the ember-intl addon which requires you to:

Usage

The currency, currentLabel, and previousLabel properties must be set when using the etison-delta-currency component, otherwise the "no data" view will be displayed.

Setting the isFeatured property to true will result in the rendered etison-delta-currency component having additional visual treatment applied to it. This property defaults to false and does not need to be passed to the component if not indicating it is featured.

Example usage:

{{etison-delta-currency
    currentLabel="Today so far"
    currentValue=totalRevenueToday
    previousLabel="vs. yesterday"
    previousValue=totalRevenueYesterday
    currency="USD"
    isFeatured=true
}}

AWARENESS regarding architecture of company offerings

cents-to-dollars helper

Consider extracting this into a shared addon as it begins being used by other addons and applications. If https://github.com/SuccessEtcllc/etison-delta-currency/issues/2 hasn't been addressed by this time make sure it is not overlooked.

Please list current applications/addons using it here so we can track such references:

ember-intl dependency

Consider creating our own addon to wrap the ember-intl addon so that duplicated configuration can be avoided. Such configuration includes, but is not limited to:

  • Needing to set a locale in the consuming application
  • The value of this locale and eventual support of localization
  • The Intl.js Polyfill
  • any default entries in app/formats.js

https://github.com/yahoo/ember-intl/pull/284/files is a PR to auto inject polyfill into the head of index.html which can be used for reference when working the above as well as to have an eye kept on it for when included in the released addon.

Please list current applications/addons using it here so we can track such references:

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.0
    1
    • latest

Version History

Package Sidebar

Install

npm i etison-delta-currency

Weekly Downloads

1

Version

1.4.0

License

MIT

Last publish

Collaborators

  • notmessenger