Commit Graph

6 Commits

Author SHA1 Message Date
Paul Sealock 03db742cdd Currency package: make naming clearer (https://github.com/woocommerce/woocommerce-admin/pull/4560) 2020-06-18 11:33:40 +12:00
Paul Sealock f45fecfbed Advanced Filters: fix currency initialization (https://github.com/woocommerce/woocommerce-admin/pull/4356)
* Advanced Filters: fix currency initialization

* fix readme

* get formatCurrency method
2020-05-19 14:38:02 +12:00
Jeff Stieler 17514872ad Decouple currency and numbers packages from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3277)
* Remove wcSettings dependency from currency and number packages.

Either take a configuration object in function calls or in a new class constructor.

* Use new Currency class and number format methods in client/.

Compose with store settings to keep the same API.

* Don't reintroduce lodash dependency to currency package.

* Add changelog entries to currency and number packages.

* Update docs, example, and changelog for AdvancedFilters component.

* Use precision-less formatValue() for integer report values.

* Make Currency instance immutable.
2019-11-21 16:51:52 -05:00
Darren Ethier fee65dd6ac Decouple wcSettings from published packages. (https://github.com/woocommerce/woocommerce-admin/pull/3001)
* refactor wcSettings in components to use new api

* update test snapshot

* refactor wcSettings in other packages

* fix how defaults are set for setting

* decouple siteLocale from ReportsFilters and AdvancedFilters

* Decouple currency settings from packages

AdvancedFilters, ReportFilters, and NumberFilters now receive currency info as props.

* decouple currency settings from `ReportChart`

* decouple `wcAdminAssetsUrl` setting from `EmptyContent`

- also refactors to remove the need for `ImageAsset` component.

* decouple OrderStatus from wcSettings

* decouple wcAdminUrl setting from ProductImage component

- this also implements a SVG for default product image.

* remove export for image-asset that is no longer present

* remove console.log

* update test snapshots for ProductImage
2019-10-11 11:45:45 -04:00
Jeff Stieler 6ed8ea117a Refactor formatCurrency() to use store settings for formatting rather than store locale. 2019-01-17 00:04:57 -07:00
Kelly Dwan f62537fc17 Try: Add Lerna to split out utility packages (https://github.com/woocommerce/woocommerce-admin/pull/678)
* Add lerna & GB package-building script

* Move currency library to lerna module

* Update lerna config

* Add publish commands

* Add currency as an faux-external module

* Add separate command to build just core files

* Update dependency path

* Update build script to build all packages into `dist`

* Add packages to the jest test setup

* Move date library to packages

* Update imports to use @woocommerce/date

* Output wcSettings definition before any scripts are output

Fixes issues where wc-dates lib relies on settings object

* Add the build step into travis

* Update jest config to dynamically get package paths

* Update package postcss config to match wc-admin’s main config

* Add combined watch scripts for package+app, add a `clean` command to clean up old build files

* Ignore PHPCS error (leave todo message to fix)

* Concat files with a space, fix issue where all files join in one continuous string and fail the check
2018-10-30 14:57:48 -04:00