* add new woocommerce/eslint-plugin
* implement eslint-plugin (switch scripts to use wp-scripts etc)
* various linting fixes
* more lint fixes
* improve fix script
* more eslint fixes
* more eslint fixes
* temporary convert rules to warnings until they are all handled
* linting fixes
* update package-lock.json
* remove duplicates
* remove unnecessary `@wordpress/dependency-group` rule config
* add docs and adjust rules
* prettier fix
* fix merge artifact
* convert more rules to warnings
* change order to reflect importance
* install babel-preset-default
* remove unnecessary configuration for babel
* fix dependency group rule and test
* fix test
* handle collapsible whitespace
* add react testing library eslint plugin
* linter errors
* Add back in prettierrc
* package-lock update
* js lint fix with --fix
* disable whitespace in translation
* package-lock update
* make eslint actual dependency, not peer dependency
* pin eslint to v7
* I don't know why, but its working
* fix lint js
Co-authored-by: Paul Sealock <psealock@gmail.com>
add data store for settings using wp.data
add use-select-with-refresh example
replace fresh-data usage with new settings data store for settings page
Add data package
move to packages
Fix isDirty after save
Add isBusy to primary button when saving
update Readme
remove comment
readme to use useSelect
Revert "update Readme"
This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.
Data Layer: Settings page to use Settings store (https://github.com/woocommerce/woocommerce-admin/pull/3430)
* Data Layer: Settings store as source of truth for settings page
This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.
* fixup
* save on reset
* non mutable constants
* add set/getSettings
* save using setSettings
* separate HOC
* cleanup
* remove settingsToData
* withHydration
* remove withSettings HOC
* renmove useSettins for now
* withSettingsHydration updates
* Revert "withSettingsHydration updates"
This reverts commit f2adf108fbe19b574978fea5925a1a18e7ed3007.
* rename withSettingsHydration
* redo withSettingsHydration simplification
* restore
* useSettings
* render using useSettings
* handleInputChange working
* get setIsDirty working
* saving works
* reset and cleanup
* cleanup
* use snake case on hook files
* use clearIsDirty
* Avoid mutation on setting update
* remove @todo
* persiting -> isPersisting
* better reducer ternaries
* add wcSettings as arg to withSettingsHydration
reset package-lock
Settings: split out mutable wcAdminSettings (https://github.com/woocommerce/woocommerce-admin/pull/3675)
Settings: handle async settings groups (https://github.com/woocommerce/woocommerce-admin/pull/3707)
* align code styles with the same configuration as Woo-Blocks
* initial pass of reformat-files
* applies manual fixes to various new linting errors surfaced by the configuration change.
* Fix state mutation in image-upload
* remove unused pre-commit-hook.js
* requestAnimationFrame -> window.requestAnimationFrame
* wc-api eslint changes
* eslint fixes on client/lib and client/settings
* client/header eslint changes
* fixes for client/dashboard part 1
* fixes client/dashboard part 2 of 2
* client/analytics part 1
* client/analytics continued
* client/analytics, last batch
* rename __mock__ directory
* pass in useEffect, useState from React component or function
* remove '+' from sprintf string argument
* use ref instead of findDOMNode
* reformat and repaply package.json changes
* install deps before running linter in Travis
* useGetCountryStateAutofill
* counryStateAutofill
* countryStateAutofill
Co-authored-by: Paul Sealock <psealock@gmail.com>
* integrate with new asset data registration (php side)
- includes back-compatibility.
* update js configuration and implement settings alias
- this aliases `@woocommerce/wc-admin-settings` to the settings api exposed via blocks (either the blocks plugin or core) and all the settings provided via the server.
- Adds fallback for back-compat if `wc.wcSettings` is not available in the environment (fallsback to `wcSettings`).
* initial pass to update all wcSettings direct usage to the new api
- this is just an initial pass, more can be done in separate pulls.
* missed one spot for adding new filter implementation
* fix incorrect jest config
* Avoid unnecessary assignment and directly return.
* Remove unnecessary defaults
* Fix inline comment text case.
Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>
* Remove unnecessary inline comment.
* use @todo instead of TODO
Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>
* fix incorrect reference in webpack config.
* add missing import and slightly delay dependency injection for scripts
* update get-setting and set-setting callbacks
* disable lint rule for console.error on dev doc builds
* Revert "Revert "Update to new Snackbar component and notice store""
* Update uploader component to use createNotice
* Bump required WP version to 5.2
* Update required PHP and WP versions in plugin header
* Add new wordpress/components version and fix dependencies
* Add in snackbar styling and gutenberg variables
* Convert all existing notice actions to wordpress/notices
* Fix linting errors
* Add package.lock changes
* Update search list control snapshots with new attributes
* Simplify Header rendering, remove the use of react-slot-fill
* Remove the useless "/analytics" route
* Move all the <Header> renders to the new, declarative way of specifying breadcrumbs
* Re-render the Layout when a report is added using the REPORTS_FILTER, since that affects the breadcrumbs output
* Fix the base breadcrumb link and breadcrumbs on embedded pages
* Expanded Layout.propTypes to specify the breadcrumbs' shape
* Add section header for historical import.
* Add alert on unsaved changes.
* The glass is half full. Therefore my state change should be too.
* Update button text.
* Add Historical Data Import Screen
* Fix date picker not being accessible
* Cleanup
* Fix period selector typo
Co-Authored-By: Aljullu <aljullu@gmail.com>
* Move state to props
* Add filter to status labels
* Get rid of 'step' state property
* Format 'importDate' as YYYY-MM-DD
* Minor improvements
* Hardcode control height
* Use dateValidationMessages when possible
* Update imported all data actions
* Update filter name
* Translation call text domain change from “wc-admin” to “woocommerce-admin”.
* Fix .pot file generation.
* Fix errantly closed array item in /revenue/stats controller.
* Rename plugin zip, main file, and repo name to "woocommerce-admin".
* Add button input type to analytics settings
* Add callback prop and disabled state to setting
* Add rebuild tool to settings page
* Re-enable setting if error is caught
* Remove rebuild tool from system tools page
* Move report build success message to API response
* Add back key for settings map
* Fix misspelled option group classname
* Conditionally add rebuild tool to non-wc-status page instead of removal hook
* Add initial transient notices component
* Animate notices to slide in and out
* Add notices to wc-api
* Map notices from wc-api to transient notices
* Add success message on settings save
* Add save notices to Settings page
* Remove all margin and padding from notice box when empty
* Add role alert to transient notices
* Add prefers reduced motion media query for transient animation
* Remove initial test notice
* Remove notices from wc-api
* Add wc-admin store for transient notices
* Pull transient notices from newly implemented store
* Use speak instead of role alert for accessibility
* Only show success message after request is complete
* Destructure state in componentDidUpdate
* Add store notice tests and fixtures
* Add box shadow to transient notice
* Move transient notices to bottom left
* Fix indentation
* Add settings page routes
* Add control options for excluded statuses
* Add control options for excluded statuses
* Add excluded order statuses to rest api
* Add wc settings to wc-api
* Add wc settings to wc-api
* Split and validate multiselect values in settings controller
* Add wcAdminSettings to wcSettings global
* Set initial excluded statuses from serverside wcSettings data
* Add extensible filter for wcSettings global
* Split arrays into comma separated strings in wc-api
* Extract setting as separate component
* Extra settings to config file
* Add checkboxGroup option as input type
* Separate status types into default and custom groups
* Add setting option styling
* Add responsive styling for settings
* Fix wpClosedMenu and wpOpenMenu for settings page
* Add support for resetting to default values
* Only show checkbox group if options are available
* Add proptypes to Setting component
* Add extensible filter to analytics settings
* Add readme for settings config and extensibility
* Hook up excluded status settings to reports
* Pass object to settings API instead of comma delimited string
* Fix inpuType -> inputType typo
* Remove hasError from constructor
* Bump settings API to v4
* Use interpolateComponents instead of dangerously setting html
* Use empty array in initial excldued statuses setting value if none is retrieved
* Remove double check for refunded status in default order statuses
* Update settings wc-api to use namespace
* Add aria=labelledby to checkbox group