Commit Graph

529 Commits

Author SHA1 Message Date
Jeff Stieler 11d4911191 Fix CompareFilter selected value format. (https://github.com/woocommerce/woocommerce-admin/pull/3421)
Look for `key` instead of `id` property.
2019-12-16 10:27:53 -05:00
Jeff Stieler 6a826600c2 Fix WC-Admin component styles for WP 5.3 (https://github.com/woocommerce/woocommerce-admin/pull/3357)
* Style Search component for 5.3.

* Reset native select control styles.

* Fix styling of selected radio options.

* Fix bottom margin on select inputs in filters and pagination.

* Update DropdownButton styles for WP 5.3.

* Style DropdownButton arrow as a chevron.

* Fix tooltip arrow styling.

* Style TextControlWithAffixes for WP 5.3.

* Flatten pagination button style.

* Use SelectControl for StoreAlert snooze action.

* Remove 3D look and use chevron on SplitButton.

* Add changelog entry.

* Fix stylelint issues.

* Update test snapshots.

* Add TextControlWithAffixes disabled prop to documentation and proptypes.

* Use WP checkboxes in ReportTable columns.

* Fix TableCard header background colors.

* Add padding to EllipsisMenu toggle controls.

* Remove version-specific styles.

We require WP 5.3 as a minimum now.
2019-12-13 12:35:29 -05:00
renovate[bot] 4f8b8f00ef Update dependency core-js to v2.6.11 (https://github.com/woocommerce/woocommerce-admin/pull/3411) 2019-12-12 08:08:13 -05:00
renovate[bot] 90bde97393 Update babel monorepo (https://github.com/woocommerce/woocommerce-admin/pull/3408) 2019-12-11 22:00:37 -05:00
Justin Shreve 34a0fdb6a5 Fix revenue question translation with currency conversion (https://github.com/woocommerce/woocommerce-admin/pull/3358)
* Do a rough conversion of the currency ranges on the revenue question

* add a zero for every additional digit beyond the first digit to round currencies with larger differences in exchange rates
2019-12-10 14:01:21 -05:00
Ron Rennick 47ca4f1032 make report filter date props optional (https://github.com/woocommerce/woocommerce-admin/pull/3359) 2019-12-10 09:56:06 -04:00
Paul Sealock 8205112732 Add currency extension (https://github.com/woocommerce/woocommerce-admin/pull/3328)
* Add currency extension

* use wcSettings

* save

* get revenue working

* all reports

* remove error log

* better rename

* add column

* persist queries

* go back to individual hooks

* comments

* address feedback
2019-12-06 11:38:26 +13:00
Jeff Stieler 6a8124ffd0 Remove unnecessary locale update call. (https://github.com/woocommerce/woocommerce-admin/pull/3362)
Let the @wordpress/date module handle it.
2019-12-06 11:38:07 +13:00
Joshua T Flowers 2fccd709c0 Onboarding: Update global currency settings on address change (https://github.com/woocommerce/woocommerce-admin/pull/3324)
* Update currency data to match currency format used in wcSettings

* Revert currency ranges to sprintf

* Allow currency to be changed after the class has been initialized

* Update currency settings when store address is changed

* Get default prices formats from positioning

* Set currency defaults if not set

* Handle PR feedback

* Add translator comment to 'more than' revenue option
2019-12-04 07:32:13 +08:00
Justin Shreve 448e1f3e11 Remove Newspack Dependency (https://github.com/woocommerce/woocommerce-admin/pull/3302)
* Switch to @wordpress/component's Button

* Finish button conversion

* Move to @wp/component's CheckboxControl

* Add  ImageUpload component

* Remove Newspack package

* CSS Cleanup

* Handle PR feedback: Fix tests, add ImageUploader basic test, fix FireFox/Safari Display issues, and  currency input bug
2019-12-02 12:39:22 -05:00
Darren Ethier 09ddedc8d9 Packages: Prep for release. (https://github.com/woocommerce/woocommerce-admin/pull/3325)
* update components package version and changelog

* update csvexport package and changelog

* update currency package and changelog

* update date package and changelog

* update navigation package and changelog

* update number package and changelog

* update package dependency versions

* fix typo
2019-12-02 08:08:35 -05:00
renovate[bot] d035bc8397 Update babel monorepo to v7.7.4 (https://github.com/woocommerce/woocommerce-admin/pull/3306) 2019-11-27 17:06:29 +13:00
Jeff Stieler 9469663379 Decouple date package from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3278)
* Decouple date package from wcSettings.

* Update missed documentation and example.

* Expect simpler prop values for date filter.

* Remove unused props from primary/secondary dates.

* Avoid introducing moment dependency for type checking.

* Handle null moment/date values in DateRangeFilterPicker.

* Fix missing ISO date format.

* Fix moment instance detection.
2019-11-26 14:39:40 -05:00
Ron Rennick c5f0fa90b2 Remove Previous Year week alignment (https://github.com/woocommerce/woocommerce-admin/pull/3271)
* remove previous year week alignment, include full day at end of previous period

* update script testing of weeks in last year
2019-11-25 09:19:19 -04:00
Jeff Stieler c2020507e3 Decouple Navigation from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3294)
* Move getAdminLink to wc-admin-settings.

* Add changelog entries.

* Look for `getAdminLink()` in @woocommerce/settings first.
2019-11-22 12:07:26 -05:00
David Levin 52cb35f4de Correcting and clarifying analytics terms and calculations (https://github.com/woocommerce/woocommerce-admin/pull/3104)
* Relabel Net Revenue to Net Sales, revert previous refund work on Gross revenue and rename to total sales. Update the orer of all the things

* Add gross sales calculation to revenue stats endpoint.

* Restore coupon_total when updating order stats.

* Wire up gross sales to revenue report.

* Fix revenue report refunds calculation when there are no refunds.

* update net sales labels and cases in order, product and category tables

* Subtract refunded shipping and taxes from gross sales.

* pluses to minuses to fix the gross revenue and refund totals when refunding

* Add gross_sales to revenue stats orderby enum.

* Change refund labels to Returns

* Remove usage of defunct coupon_total column.

* Store refunded amount in stats table.

* Rename "gross_total" column to "total_sales".

* Net total for refund orders can be used instead of a new column.

* Rename gross_revenue to total_sales.

* Coalesce coupons total in order stats query.

SUM()ing all nulls gives null, not zero.

* Use segmentation selections to backfill missing data.

Fo when report columns and segmentation columns don't match.

* Remove errant gross_sales from expected interval test data.

* Fix gross sales tests for revenue/stats.

* Move missing segment fills back to their original locations.

* Fix remaining tests failing because of gross sales.

* Fix db upgrade function rename of gross_total column.

* Fix linter errors.
2019-11-22 10:06:14 -05:00
Paul Sealock 0db5cbb6a0 Component styles: Explicitly import from Gutenberg (https://github.com/woocommerce/woocommerce-admin/pull/3292)
* Fix Gutenberg style imports

* remove duplicate variables

* remove extra variables

* remove duplicate imports

* move base style imports to webpack
2019-11-22 13:19:37 +13: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
Paul Sealock 1f4e2fcdfe Use same wp-components version in bundle (https://github.com/woocommerce/woocommerce-admin/pull/3253)
* Use same wp-components version in bundle

* turn off short array rule
2019-11-21 09:36:44 +13:00
Jeff Stieler f8fa7b6bc7 Fetch autocomplete countries from the API rather than wcSettings object. (https://github.com/woocommerce/woocommerce-admin/pull/3262) 2019-11-19 14:17:15 -05:00
Justin Shreve 7385170781 Fix filter gap on analytics select controls (https://github.com/woocommerce/woocommerce-admin/pull/3259) 2019-11-18 10:20:07 -05:00
Joshua T Flowers 225548d7af Filter empty keywords from autocompleters (https://github.com/woocommerce/woocommerce-admin/pull/3257) 2019-11-18 09:23:39 +08:00
Joshua T Flowers 81567875c0 Reset state before firing onChange in SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3255) 2019-11-18 09:23:26 +08:00
Joshua T Flowers e060fbee56 Fix selected value showing for multiple SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3254) 2019-11-18 09:23:15 +08:00
Albert Juhé Lluveras 503e63e6af Select control: fix misalignment and hide scroll bar (https://github.com/woocommerce/woocommerce-admin/pull/3215)
* Fix misalignment in select control

* Fix scroll appearing in Select Control
2019-11-14 09:49:32 +01:00
renovate[bot] afb74db8a3 Update dependency qs to v6.9.1 (https://github.com/woocommerce/woocommerce-admin/pull/3226) 2019-11-13 09:51:47 +01:00
Joshua T Flowers 9ea25daf81 Update filter picker to use key instead of id (https://github.com/woocommerce/woocommerce-admin/pull/3214) 2019-11-13 07:41:19 +13:00
Ron Rennick f78c143f3b Move in-house rest endpoints to private namespace (https://github.com/woocommerce/woocommerce-admin/pull/3204)
* move in-house rest endpoints to private namespace

* PHPCS sniff fixes
2019-11-12 14:15:55 -04:00
Joshua T Flowers 4fb1945917 Onboarding: Use ShipStation for AU, GB, and CA (https://github.com/woocommerce/woocommerce-admin/pull/3200)
* Add shipstation to allowed plugins list

* Use shipstation for qualifying countries

* Add default value for onError prop in Plugins component
2019-11-12 10:44:39 +08:00
renovate[bot] faf4e7e6e4 Update babel monorepo (https://github.com/woocommerce/woocommerce-admin/pull/3177) 2019-11-11 11:05:50 +01:00
Joshua T Flowers 4f79cdea93 Onboarding: Allow users to navigate backwards in steps (https://github.com/woocommerce/woocommerce-admin/pull/3154)
* Add label wrapper to stepper and style for both orientations

* Add onClick event to steps

* Add onClick to stepper examples

* Allow returning to previous steps on step click

* Allow navigating to previously completed steps

* Mark previous steps complete
2019-11-06 08:26:08 +08:00
Joshua T Flowers 14dc91a1bb Fix label positioning in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/3135) 2019-11-04 08:16:47 +08:00
David Levin 3ba6d3977b remove height attribute to fix alignment (https://github.com/woocommerce/woocommerce-admin/pull/3141) 2019-10-31 12:08:20 -07:00
Joshua T Flowers a946d474ce Add an autofill option to SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3105)
* Add autofill method for countryState

* Add isFocused state to SelectControl

* Allow children prop for SelectControl components
2019-10-31 07:44:57 +08:00
Justin Shreve 2c81932702 Add currency defaults based on country (https://github.com/woocommerce/woocommerce-admin/pull/3110)
* Base currency defaults on selected country

* Save currency settings

* Move getCurrencyInfo to the currency package
2019-10-29 14:34:04 -04:00
Jeff Stieler 1ac8577fc2 Match server-side CSV export format to client-side (https://github.com/woocommerce/woocommerce-admin/pull/2987)
* Add "exportable" report interface for defining CSV export values.

* Define export values for Orders Report.

* Define export values for Products Report.

* Define export values for Categories Report.

* Define export values for Coupons Report.

* Allow commas and double quotes in CSV exported values.

* Fix in-browser export formatting of orders report products.

* Align server-side orders report export formatting with in-browser.

* Cover comma and double quote escaping in CSV export package tests.

* Define export values for Customers Report.

* Embed response links when requesting data for CSV exports.

* Define export values for Downloads Report.

* Move reusable report export functions to a trait.

* Define export values for Stock Report.

* Define export values for Taxes Report.

* Define export values for Variations Report.

* Define export values for Revenue Report.

* Always pass export row data through the filter.

* Fix formatting in test case for CSV coupon export.

* Quote escape CSV headers in client-side export.

Escape values with spaces as well.

* Check if inventory is managed at the product level before using the stock status/quantity.

* Prevent CSV injection in csv-export package.
2019-10-24 09:41:16 -07:00
renovate[bot] 950bdd8c77 Update dependency react-router-dom to v5.1.2 (https://github.com/woocommerce/woocommerce-admin/pull/3089) 2019-10-24 12:00:05 +08:00
renovate[bot] 5b4d985af4 Update dependency core-js to v2.6.10 (https://github.com/woocommerce/woocommerce-admin/pull/3048) 2019-10-24 11:37:34 +08:00
Joshua T Flowers c678421b63 Left align dropdown button text in SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3093) 2019-10-24 07:32:49 +08:00
renovate[bot] 5797f2b82e Update wordpress monorepo (https://github.com/woocommerce/woocommerce-admin/pull/2929)
* Update wordpress monorepo

* Add missing Gutenberg grid variables

* Fix button styling

* Fix snapshots (new classes and events are passed through from WP components update)

* Adjust button overwrites

* Update package-lock.json

* Fix focus issues/conflicts with react-dates and Dropdown

* Maintain DateRange focus without impacting expected "click outside" behavior.

* Resolve multiple React versions, update testing dependencies.

* blow away package-lock.json and refresh

- this fixed tests after an npm install on my end

* Allow tabbing to month nav and calendar grid.

* Fix keyboard navigation of DayPicker elements.

Add prop for specifying an element that's allowed to take focus from DateRange.

* refresh package-lock
2019-10-23 11:18:32 -07:00
Joshua T Flowers e37e79722e Set SelectControl input to transparent (https://github.com/woocommerce/woocommerce-admin/pull/3069) 2019-10-22 07:50:46 +08:00
Albert Juhé Lluveras 909185113a Fix unnecessary scroll bar visible on select control (https://github.com/woocommerce/woocommerce-admin/pull/3065) 2019-10-21 10:30:16 +02:00
Joshua T Flowers 9a20b0289e Update Search component to use SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3036)
* Update onSearch to return promise

* Refactor Search component to use SelectControl

* Update autocompleter option keys and labels

* Remove Autocomplete component
2019-10-16 12:00:20 +08: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
Joshua T Flowers b92500b35f Onboarding: Replace TextControl component (https://github.com/woocommerce/woocommerce-admin/pull/3020)
* Add TextControl component

* Replace instances of newspack TextControl
2019-10-10 07:00:33 +08:00
renovate[bot] 9e149f4ad1 Update babel monorepo to v7.6.3 (https://github.com/woocommerce/woocommerce-admin/pull/3013) 2019-10-09 09:28:27 -04:00
Jeff Stieler e53d5daa94 Hook up download button to export endpoint. (https://github.com/woocommerce/woocommerce-admin/pull/2900)
* Move TableCard actions from packaged component to ReportTable.

* Build an IE stylesheet for the main app.

* Remove defunct TableCard download test.

* Update components changelog.

* Fix pagination.

Pull query from table data instead of ReportTable props.

* Initiate report export from download button (https://github.com/woocommerce/woocommerce-admin/pull/2951)

* Add report export operations to API spec.

* Initiate a report export job when there is more than one page of report data.

* Add report download "type" to Tracks event.

* Ensure WC_Emails class is hooked in before sending report download emails.

* Set email parameter for background CSV download requests.
2019-10-08 15:02:26 -07:00
Joshua T Flowers 1563971836 Replace select controls with new SelectControl (Autocomplete) component (https://github.com/woocommerce/woocommerce-admin/pull/2997)
* Rename Autocomplete component to SelectControl

* Add isSearchable prop to SelectControl

* Remove SimpleSelectControl component

* Refactor list expansion and key behavior

* Bump changelog and version
2019-10-08 06:42:32 +08:00
renovate[bot] 891823c576 Update babel monorepo to v7.6.2 (https://github.com/woocommerce/woocommerce-admin/pull/2910) 2019-10-07 10:45:00 -04:00
Justin Shreve 6bcc63f2de Disable profile wizard continue buttons until fields are complete (https://github.com/woocommerce/woocommerce-admin/pull/2983) 2019-10-04 09:46:27 -04:00