* First pass at adding feature flags. Accessible over PHP and JS.
* Hook up dev config to test enviornments, hook up features to their flags.
* Cleanup some code and add documentation. Remove beta config.
* Handle PR Feedback: Add devdocs flag, remove categories flag, fix auto-generated PHP warning.
* Add todo for beta phase.
* Handle PR feedback: Simplify is_array check, update build command, simplify test mock, remove empty webpack line.
* Add manage_stock to stock controller response
* Add manage_stock property to stock report tests
* Add changelog entry
* Make stock quantity float instead of int
* Add manage_stock to the products API response
* Check for manage_stock in products table
* Add manage_stock property to product API tests
Product detail report and comparison
Code cleanup
Fix 404 on product variations endpoint after rebase
Fix up tests
Fix loading indicators and add some checks around malformed variation response
Add date filtering SQL bits to the variations query
Handle PR feedback: Fix viewport, fix duplicate product issue, fix legend display reset, fix bargraph overflow, fix some coding standards/whitespace, add extra variation santiziation.
Fix scroll on wide charts, and fix undefined prop getting passed into report chart render
* Show empty table when search returns no results
* Fix singular wrong string for 'orders'
Co-Authored-By: Aljullu <aljullu@gmail.com>
* Check if search returned 0 results inside table components instead of passing a prop
* Move labels loading logic into a lib
* Move lib/labels into lib/async-requests
* Implement tabular data filtering
* Allow searching for string in report tables
* Add table filtering to customers table
* Get ids from searched string to populate the table
* Fix autocompleter keyboard interactions
* Improve props naming
* Cleanup report customers data store
* Prevent an edge case issue that might not update the selectedOptions when directily modifying the URL
* Fix wrong selected autocompleter option
* Add missing translation domain
* Move searchItemsByString to wc-api/items/utils.js
* Avoid autocompleter results appearing when there was no search string
* Alphabetically order 'allowFreeTextSearch' prop
* Reset selected table rows when directly modifying the URL
* Simplify props destructuring
* Undo customers data store change
* Simplify isProductDetailsView expression
* Improve order
* Merge getOrders and getItems
* Move labels loading logic into a lib
* Move lib/labels into lib/async-requests
* Implement tabular data filtering
* Allow searching for string in report tables
* Add table filtering to customers table
* Get ids from searched string to populate the table
* Fix autocompleter keyboard interactions
* Improve props naming
* Cleanup report customers data store
* Prevent an edge case issue that might not update the selectedOptions when directily modifying the URL
* Fix wrong selected autocompleter option
* Add missing translation domain
* Move searchItemsByString to wc-api/items/utils.js
* Avoid autocompleter results appearing when there was no search string
* Alphabetically order 'allowFreeTextSearch' prop
* Reset selected table rows when directly modifying the URL
* Simplify props destructuring
* Undo customers data store change
* Simplify isProductDetailsView expression
* Improve order
* Filter tax code parts before modifying them
* Remove usage of lib/number
* Remove formatNumber usage when currency is used.
* Add wc-number as a dependency of wc-currency.
* Add locutus as a dev dependency.
* Add number to test helper.
* Move labels loading logic into a lib
* Avoid making API calls when displaying Order labels
* Move lib/labels into lib/async-requests
* Rename 'getCustomerLabel' to 'getCustomerLabels'
* Add namespace v4 for WC product/categories endpoint
* Update categories wc-api to use v4 namespace constant
* Add single product category filter to product categories report
* Add link to filtered product report from category report
* Use persistedQuery for category links
* Check if category is defined before displaying category link
* Remove selectedTags when filter does not match queried filter
* REST API: Allow sorting by stock_status in stocks endpoint
* Set stock_status as default orderby
* Sort by both stock status and quantity in meta query
* Use stock_status sort order by default in Stock table (https://github.com/woocommerce/woocommerce-admin/pull/1340)
* Reverse stock quantity order when sorting by stock status
* Add single category filter to categories report
* Change categories leaderboard link to signle category link
* Remove todo comment regarding the single_category filter
* Update category links to categories report in products table
* Update all wc-admin endpoints to v4
* Add namespace for products and customers controllers
* Include product quantity in orders data store
* Add coupons to extended data in the orders data store
* Format order statuses response from database
* Hook up orders table to orders endpoint
* Add namespace to data endpoint controller
* Add namespaces to remaining extended controllers
* Use NAMESPACE var in place of wc/v4
* Update product links in orders table to products reports
* Add coupons rest controller override
* Format coupon code in response
Co-Authored-By: joshuatf <joshuatf@gmail.com>
* Use a date instead of hour for single dates in report tables
* Add hour to allowed list when day difference is less than 1
* Prioritize hour format over day and set day as default for tables
* Add default intervals for report tables
* Use explicit date format in report tables
* Add constant for default table format
* Restore allowed intervals for >1 && <7 days
* Connect downloads chart and table to REST API
* Display date picker in Downloads report
* Fix missing value for 'days' in Downloads table summary
* Fix download_count being a string instead of a number
* Minor date packages comment fixes
* Fix filters in Downloads report
* Add back empty line
* JSDoc comments style fixes
* Fix username filter not working
* Fix days counter off by 1
* Fix alignment issue
* Check for product categories before loading value
* Filter product category list for undefined values
* Remove unnecessary double check of productCategories
* Add support for product cats in wp rest api
* Add categories to WC API
* Add category breadcrumbs component
* Increase per_page limit size for product cat API
* Use wc/v3 API to pull product categories
* Return category IDs in API
* Add categories to product reports
* Add category IDs test for REST API
* Switch to getResource instead of require for total count selector
* Change product_gross_revenue to product_net_revenue
* Change product_gross_revenue to product_net_revenue in category data store
* Change to net_revenue in frontend category report
* Hook up taxes to endpoint
* Hook up tax stats endpoint
* Add default tax stat totals for empty results
* Create subtotals from intervals in API
* Change orders to orders_count to keep consistent naming
* Create Stock report
* Create Stock report page
* Display product name in Stock table
* Hide 'Parent' column in Stock table
* Add stock to endpoints map
* Remove dateRangeFilter.show from ReportFilters
* Fix stock status link
* Set the default order to 'stock_quanity'
* Add correct name to StockReport
* Add an advanced country filter to the customers report
* Handle PR feedback: Fix PropType warnings, move filter/label logic to config getLabels() function, fix typo.
* Add flag thumbnail to the country filter
* Update README and CHANGELOG
* Add column prefs to the other tables
This adds column prefs to the other remaining report tables.
* Table columns: Override defaults with user prefs.
* table columns: Add remaining analytics tables
* user read/update operation: Combine responses
This combines the response handling for the read and update operations.
* wc-api: Add user meta for UI preferences
This adds wc-api code to store UI preferences and provides one example
of updating the revenue table to save column preferences.
* wc-api user: fix returns of operations to arrays
Before, a function was returning undefined when the resourceNames didn't
include what we wanted for the user operations. This was causing some
console errors.
* ReportTable: use columnPrefsKey
This uses `columnPrefsKey` for the user preferences key instead of some
erroneously hard-coded values.
* Fix formatting/comments
These are a couple of small formatting and comment fixes.
* Replace woocommerce_meta_ prefix with wc_admin_
This changes the prefix for the meta fields for the `woocommerce_meta`
user meta array to be `wc_admin_` which better hints at the purpose of
these settings.
* Create Customers Report page
* Hide date range filter if dateRangeFilter.show is false
* Rename dateRangeFilter.show to showDatePicker in filters config
* Add correct key 'average_order_value'
* Fix customers autocompleter not working
* Use ReportTable in Orders report
* Get totalCount from hte X-WP-Total header
* Order props alphabetically
* Cleanup report table 'tableData' prop
* Use short-circuit evaluation
* data: Add @fresh-data/framework to package.json
* data: Add fresh-data and replace orders in table
This PR adds fresh-data with a WooCommerce API spec to fulfill order
information. It then replaces the existing selectors for the orders
table with the new selectors as a proof-of-concept.
* wc-api: Add temporary code for `withSelect`
This adds temporary code for a `withSelect` function outside of
`@wordpress/data` until the context PR is merged:
https://github.com/WordPress/gutenberg/pull/11460
* wc-api: Update fresh-data to 0.5.0
* Use X-WP-Total header to set the total number of items in tables
* Improve naming
* Improve tests
* Make getReportItems() return a 'data' property by default
* Make getSummary prop behavior more clear
* Merge table stores
* Add Categories table
* Add numberFormat to non-currency numbers displayed to the user in the Categories Table
* Rename 'Coupons' to 'Categories' in Categories table title
* Update Categories table to use the ReportTable
* Adds UI wiring for Coupons chart and summary
* Update for changes in master
* Update to use current method
* Remove accidental paste
* Fix typo
* Seperate WooCommerce deps
* Adds UI wiring for Catgories chart and summary
* Use new format for charts
* Use swagger api
* Get rid of store references
* Final touch ups
* Seperate out WooCommerce dep
* Move components to packages folder
* Update documentation generator to handle packages/components and client/components
* Update component locations
* Update CSS build process
* Remove react-dates css, this is already included by gutenberg
* Fix CSS style - single quotes
* Fix incorrect imports
* Update package-lock with new dependencies
* Update component locations for devdocs
* Fix location of tests
* Adds UI wiring for Taxes chart and summary
* Update to latest method for creating summary/chart
* Switch out API for swagger
* Fix copy pasta
* Implement swagger api
* Update config to match swagger API
* Code review fixes
* Remove store code as it isnt used
* Display comparison chart in Product detail report
* Make legend to overflow in comparison charts
* Show comparison chart also when comparing products
* Update comparison chart legend design
* Send itemsLabel and comparisonChart as props to the ReportChart component
* Update styles and create a legend.scss file
* Minor cleanup
* Fix legend test
* Sort props alphabetically
* Move nav-utils and history to new package
* Update config to build and use new navigation package
* Update all imports to use new navigation package
* Remove unnecessary README
* Update nav-utils path
* Fix charts redirecting to previous path when changing interval value
* Fix chart being reset when changing interval
* Fix chart being reset when changing filters
* Move TableSummary below pagination
* Add summary to order table
* Add new and returning customers
* Add product to totals in API
* Use get_var instead of get_results for unique products
* Change table summary styling
Remove slashes and increase padding between items based on discussion with @LevinMedia
Change margin to padding to overlap table shadow when pagination is not present.
* Fix wp_posts prefix and move to separate fxn
* Change new/returning customer column types to intval
* Add new/returning customer data to tests and fix formatting
* 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
* Move withSelect() inside table components
* Add isLoading prop to TableCard (https://github.com/woocommerce/woocommerce-admin/pull/713)
* Add isLoading prop to TableCard
* Add onSort prop to TablePlaceholder
* All checkbox shouldn't be checked if the number of rows is 0
* Updates default analytics menu
* Make revenue the default analytics page
* Fix header link to direct to Revenue report
* Fix highlighting with additional filters
* Add Products table
* Update tests
* Cleanup
* Make placeholder table have the correct sorted column selected
* Change default sort to items_sold & desc
* Fix wrong CSV filename
* Remove unnecessary constructor in ProductsReportTable
* Add @TODO comment to Products table summary
* Set ProductsReportTable link to wc-admin type
* Make sure categories is an array before using map