woocommerce/plugins/woocommerce-blocks/assets/js/base/components
Tarun Vijwani 4de3bdb0f1 Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402)
* Add validation reducers, actions, and action types

* Add selector for getValidationErrors

* Export store key and register store

* Export validation store key

* Move TextInput files to checkout package

* Export ValidatedTextInput from blocks-checkout package

* Update imports of ValidatedTextInput to reflect new location

* Use the validation wp-data store for showing error messages

* Export getValidationError in checkout package

* Move validation store to checkout package

* Move ValidationInputError to blocks-checkout package

* Only export "exposedSelectors" from validation

* Convert validation context to data store

* Fixed linting error

* Fixed linting error

* Change the validation selectors to return a function

* Convert reducer and selectors to TS

* Remove superfluous comments and improve test titles

* Test to ensure visible errors remain visible

* Make test for hasValidationErrors more robust

* Augment the wp-data module to include our selectors and actions

* Removed unused `exposedSelectors` variable

* Remove TS error because of `instanceId` on props

* Remove unnecessary as const

* Use function returned by getValidationError

* Use correct selector/action names now context has been decoupled

* hide validation error when input value changes

* Add correct aria-describedBy now we can get error id from store

* Clear validation error from store when component unmounts

* Clear validation error if input is valid

* convert ValidationInputError to TS and get correct id/error from store

* Ensure checkout block doesn't break when there are no errors

* Get validation data from the store instead of context

* Update country input to remove validation context

* Move validation store out of checkout package

* Move TextInput and ValidationInputError back out of the checkout package

* Remove duplicate internal styles comment

* Remove exports that no longer exist

* Get validation store key from block-data

* Make attribute-select-control use validation data store

* Export FieldValidationStatus type

* Make combobox use validation store not context

* Make Address use validation store not context

* Make Address use validation store not context

* Use hasValidationErrors selector as a function in shipping calculator

* Remove validation context from coupon story

* Import VALIDATION_STORE_KEY from correct location

* Stop coupon story from erroring

* Update useStoreCartCoupons to use validation store not context

* Make TotalsCoupon use validation store instead of context

* Make AddToCartFormContext use validation store not context

* Remove ValidationContext

* Import FieldValidationStatus from correct location

* Import ValidatedTextInput and ValidatedTextInput from correct location

* Remove ValidationContextProvider

* Update components to use validation store not context

* Update useValidation to use the data store

* Replace the validation context in checkout-events file

* Use the re-mapped path for the store key import

* Use "register" instead of the deprecated "registerStore"

* Fix import error of the "FieldValidationStatus" type

* Use TS instead of React's "PropTypes"

* Fix the type of "ValidationInputError" in the "payment-method-interface"

* Fix error not showing on the first place order click bug

We were mutating the state in the reducer, which prevented re-rendering
on state change

* Fix state mutation issue in the Validation reducer

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-09-28 13:45:42 +01:00
..
block-error-boundary Prevent third party blocks from breaking the entire checkout/cart block (https://github.com/woocommerce/woocommerce-blocks/pull/5297) 2022-01-25 12:01:19 +00:00
button Fix: navigate through Mini Cart contents with keyboard (https://github.com/woocommerce/woocommerce-blocks/pull/6731) 2022-07-25 12:39:47 +07:00
cart-checkout Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
checkbox-list Update Filter by Stock block (https://github.com/woocommerce/woocommerce-blocks/pull/6883) 2022-08-19 09:04:04 +01:00
chip Make Active filters texts bigger (https://github.com/woocommerce/woocommerce-blocks/pull/7087) 2022-09-09 09:53:27 +02:00
combobox Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
country-input Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
drawer Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
filter-element-label Compare count with null to avoid rendering a 0 when count is 0 (https://github.com/woocommerce/woocommerce-blocks/pull/7073) 2022-09-08 10:41:11 +02:00
filter-placeholder Add Apply button placeholders to filters and adjust title margins (https://github.com/woocommerce/woocommerce-blocks/pull/7077) 2022-09-09 13:28:04 +02:00
filter-reset-button Fix invisible Reset filter button in some themes (https://github.com/woocommerce/woocommerce-blocks/pull/7111) 2022-09-13 09:32:11 +02:00
filter-submit-button Add Apply button placeholders to filters and adjust title margins (https://github.com/woocommerce/woocommerce-blocks/pull/7077) 2022-09-09 13:28:04 +02:00
form Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668) 2022-02-07 09:34:30 +00:00
form-token-field Fix: Replace DropdownSelector with FormTokenField from Gutenberg (https://github.com/woocommerce/woocommerce-blocks/pull/6647) 2022-08-01 19:00:59 +07:00
formatted-monetary-amount Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203) 2022-04-08 14:47:19 +01:00
label Export `Button` and `Label` from `wc-blocks-checkout` package (https://github.com/woocommerce/woocommerce-blocks/pull/4406) 2021-07-02 10:24:07 +01:00
load-more-button Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668) 2022-02-07 09:34:30 +00:00
loading-mask Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668) 2022-02-07 09:34:30 +00:00
noninteractive Fix: Mini Cart block button should be disabled in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/5308) 2021-12-07 21:29:56 +07:00
pagination Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203) 2022-04-08 14:47:19 +01:00
price-slider Add Apply button placeholders to filters and adjust title margins (https://github.com/woocommerce/woocommerce-blocks/pull/7077) 2022-09-09 13:28:04 +02:00
product-list E2E: Try improving product list loading state detection and fix Site Editor URL (https://github.com/woocommerce/woocommerce-blocks/pull/6811) 2022-08-03 16:22:37 -04:00
product-name Update `Product Title` link settings to match `Post Title` (https://github.com/woocommerce/woocommerce-blocks/pull/6131) 2022-04-04 09:06:24 +02:00
product-price Migrate storybook entries of ProductPrice component (https://github.com/woocommerce/woocommerce-blocks/pull/5371) 2021-12-15 19:07:49 +01:00
quantity-selector Refactor: Style quantity input dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/6167) 2022-04-08 15:49:27 +07:00
radio-control Make form components require onChange and have a default value (https://github.com/woocommerce/woocommerce-blocks/pull/6636) 2022-07-01 21:50:44 +04:00
radio-control-accordion Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
read-more Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203) 2022-04-08 14:47:19 +01:00
reviews Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
sidebar-layout Upgrade @wordpress/scripts and /env packages (https://github.com/woocommerce/woocommerce-blocks/pull/6114) 2022-03-28 15:00:20 +02:00
sort-select Make form components require onChange and have a default value (https://github.com/woocommerce/woocommerce-blocks/pull/6636) 2022-07-01 21:50:44 +04:00
spinner Loading animation (https://github.com/woocommerce/woocommerce-blocks/pull/5362) 2021-12-13 13:57:59 +00:00
state-input Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
summary Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203) 2022-04-08 14:47:19 +01:00
tabs Update Dependencies to Latest Versions supporting React 16x (https://github.com/woocommerce/woocommerce-blocks/pull/4532) 2021-08-05 10:26:00 +01:00
text-input Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
textarea Convert `CheckoutOrderNotes` to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6118) 2022-03-28 15:44:25 +02:00
title Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203) 2022-04-08 14:47:19 +01:00
validation-input-error Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00
README.md Correct broken *.md links (https://github.com/woocommerce/woocommerce-blocks/pull/7108) 2022-09-12 11:29:24 +07:00
tsconfig.json Convert validation context to data store (https://github.com/woocommerce/woocommerce-blocks/pull/6402) 2022-09-28 13:45:42 +01:00

README.md

WooCommerce Blocks - General Purpose Components

These are shared components used in WooCommerce blocks, and may be used in the store front end (shopper experience) as well as the editor or admin dashboard.

See Components & Storybook doc for more information.