woocommerce/plugins/woocommerce-blocks/assets/js/base/context/hooks
Thomas Roberts cab947bc2b Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159)
* Make useStoreNotices interact directly with the store

* Get/set error notices directly in store in paymentMethodDataContext

* Add hasNoticesOfType util

* Remove useStoreNotices and interact directly with data store

* Create/remove notices directly in store

* Remove tests for useStoreNotices

* Add tests for notices util

* Use setIsSuppressed from useStoreNoticesContext

* remove useStoreNotices hook

* Update context typedef to define only isSuppressed and setIsSuppressed

* Remove all values from StoreNoticesContext besides setIsSuppressed

* Wrap Cart and Checkout blocks in StoreNoticesProvider (for isSuppressed)

* Make StoreNoticesContainer a named export

This is required so we can import it from @wooommerce/base-context

* Change addErrorNotice to createErrorNotice to match store action

* Remove unnecessary StoreNoticeProviders and pass only context to container

* Accept a context in StoreNoticesContainer

* Pass relevant context to StoreNoticesContainer

* Add function to remove notices by status

* Prevent checkout from breaking when removing notices during processing

* Prevent TS error about not included path

* Add StoreNoticesContainer to single product block

* Add StoreNoticesContainer to All Products Block

* Ensure errors are shown when using All Products & Single Product Blocks

* Add a context arg to removeNoticesByStatus

* Use correct contexts for all products and single product block

* Update tests to reflect new context argument

* Re-add missing block file for order-summary

* Remove block file for order-summary

* Send context to useStoreCartCoupons to show errors correctly
2022-04-08 13:11:50 +01:00
..
cart Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159) 2022-04-08 13:11:50 +01:00
collections Store API: Introduce API Versioning System (https://github.com/woocommerce/woocommerce-blocks/pull/5911) 2022-02-23 12:00:45 +00:00
payment-methods Change `shippingRatesLoading` to `isLoadingRates` (https://github.com/woocommerce/woocommerce-blocks/pull/5999) 2022-03-14 11:29:25 +00:00
shipping Change `shippingRatesLoading` to `isLoadingRates` (https://github.com/woocommerce/woocommerce-blocks/pull/5999) 2022-03-14 11:29:25 +00:00
test Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159) 2022-04-08 13:11:50 +01:00
index.js Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159) 2022-04-08 13:11:50 +01:00
use-checkout-address.ts Try move shipping related dat to a `@wordpress/data` store (https://github.com/woocommerce/woocommerce-blocks/pull/5896) 2022-03-04 17:43:45 +00:00
use-checkout-extension-data.ts Experimental newsletter subscription checkbox block POC and Store API supporting changes (https://github.com/woocommerce/woocommerce-blocks/pull/4607) 2021-08-30 15:35:20 +01:00
use-checkout-notices.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00
use-checkout-submit.js Update Express Payments Loading UI (https://github.com/woocommerce/woocommerce-blocks/pull/4228) 2021-06-16 13:44:40 +01:00
use-customer-data.ts Customer Data Store and revised handling for Shipping As Billing (https://github.com/woocommerce/woocommerce-blocks/pull/5817) 2022-02-22 17:45:01 +00:00
use-emit-response.ts Add key to each `CartTotalItem` (https://github.com/woocommerce/woocommerce-blocks/pull/4240) 2021-05-25 12:49:13 +01:00
use-query-state.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00
use-store-add-to-cart.ts Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159) 2022-04-08 13:11:50 +01:00
use-store-events.ts Update Express Payments Loading UI (https://github.com/woocommerce/woocommerce-blocks/pull/4228) 2021-06-16 13:44:40 +01:00
use-store-products.ts Store API: Introduce API Versioning System (https://github.com/woocommerce/woocommerce-blocks/pull/5911) 2022-02-23 12:00:45 +00:00
use-store-snackbar-notices.js Create `StoreNoticesWithSnackbarProvider` (https://github.com/woocommerce/woocommerce-blocks/pull/4407) 2021-07-05 09:38:08 +01:00
use-validation.ts Expose Validation to 3PD blocks. (https://github.com/woocommerce/woocommerce-blocks/pull/4685) 2021-09-09 16:35:53 +01:00