* Add blueprint package
* Add blueprint to composer
* Register blueprint cli commands
* Add feature flag
* Add changefile(s) from automation for the following project(s): woocommerce
* Update packages/php/blueprint/src/Exporters/HasAlias.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update packages/php/blueprint/src/Exporters/ExportInstallThemeSteps.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update packages/php/blueprint/src/UseWPFunctions.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Set destination correctly
* Make sure the given path is within wp content dir
* Remove debug code
* Fix typo
* Fix typo
* Fix lint errors with README
* Move READMD.md from src to the root directory and add development.md
* Add run-unit-tests.sh
* Setup test env
* Create dirs recursively
* Remove debug code
* Update packages/php/blueprint/src/Util.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update packages/php/blueprint/src/ZipExportedSchema.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Check for steps key
* Use if statement
* Add hook comment for wooblueprint_exporters and wooblueprint_importers
* Fix plugin activation condition
* Check for download_link -- it can be empty
* Check to make sure a file was written
* Plugin must be deactivated before attemping to delete it
* Lint fixes
* Lint fixes
* blueprint - add rest api (#49765)
* Add blueprint rest api endpoint
* Rename process to import
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Remove unavailable 2nd argument from get_param -- default values are already set from the rest api def.
* blueprint - add builder page (#49774)
* Add blueprint builder page
* Change to the correct endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* Note that the builder intro page is temporary
* Remove unused code
---------
Co-authored-by: github-actions <github-actions@github.com>
* blueprint - add blueprint settings page (#49775)
* Add blueprint settings page
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix broken test
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update unit test env
* Added composer scripts to setup and run tests
* Moved tests to Unit dir to make space for Integration tests later
* WIP Add tests
* Use full if statement
* Use the correct step names
* Use activate_plugin and wp_get_thmes from wp functions trait
* Skip inactive plugins
* Use plural for collections
* Add a comment for StepExporter
* Remove unused construct code
* Correct function return types
* Update packages/php/blueprint/src/Importers/ImportActivateTheme.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Use full if statement
* Make sure plugin is installed
* Use functions from trait
* Remove unused functions
* Pass $force_convert correctly
* Correctly assign $this->validator
* Fix lint issues
* Rename setOptions to setSiteOptions
* Do not use die() -- throw an exception instead
* Make sure slug is a valid WP plugin slug
* Remove hardcoded string with get_step_name()
* Fix lint issues
* Update json example files
* Removed woo-specific examples -- these should be placed in the core
* Updated the built-in steps to reflect the recent changes
* Update packages/php/blueprint/src/docs/json-examples/deletePlugin.json
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Rename to correct filename
* Set version number
* Use mime_content_type for checking mime type
* Catch all exceptions
* Only allow zip and json
* Remove unused function
* Remove unused functions
* Add PHPCS command and ruleset
* PHP lint fixes
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Add back removed functions
* blueprint - Add woo blueprint exporters and importers (#50057)
* Add woo blueprint exporters and importers
* Comment fix
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Add a test for ImportSetWCTaxRates
* Lint fixes
* Lint fixes
* Fix setWCShipping schema and data format
* Add woocommerce_default_country option
* Lint fixes
* Fix typo -- it should be decode, not encode
* Fix incorrect argument order
* Fix typo
* Export and import shipping method settings
* Lint fixes
* Lint fixes
* Type functions -- base PR has changed
---------
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Require admin for import and export
* Use mime type from $_FILES -- mime_content_type can return incorrect mime type depending on the system configuration
* Enable export button when backend errors out
* Enable export button when backend errors out
* Allow WooCommerce export
* Change copy text
* Remove redundant check
* Fix lint issues
* Fix lint issues
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Move site visibility settings to a new tab
* Add changefile(s) from automation for the following project(s): woocommerce
* Update tab id to site-visibility and link to it from the homescreen badge
* Fix tests
* Remove unused code
* Lower case tab title
* Remove general from the slotfill id
* Remove typo
* Lint fix
* Lint fix
---------
Co-authored-by: github-actions <github-actions@github.com>
* Support div setting type
* Add wc_settings_general_site_visibility_slotfill slotfill
* Add site visibility setting section
* Add placeholder
* Rename div to slotfill_placeholder
* Add comment
* Fix component name
* Add changefile(s) from automation for the following project(s): woocommerce
* Use unique id
* Rename option names
* Put LYS settings behind launch-your-store flag
* Move Site Visibility header to component
* Lint fixes
* Lint fixes
* Use woocommerce-settings scope
* lint fix
---------
Co-authored-by: github-actions <github-actions@github.com>
* 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