woocommerce/plugins/woocommerce-blocks/assets/js/base/context/hooks
Mike Jolley 0714fa41bd Customer Data Store and revised handling for Shipping As Billing (https://github.com/woocommerce/woocommerce-blocks/pull/5817)
* Add address-related items to wc/store/cart data store

* include shippingAsBilling in return value of useCustomerData

* Add useUpdateCustomerData hook

This allows us to have a single hook responsible for updating the customer information on the server.

* Add useUpdateCustomerData hook in Checkout block

* Remove the updating customer data work from the useCustomerData hook

* Remove shippingAsBilling from previousCustomerData ref type

* Add useShippingAsBillingCheckbox hook

* Control shippingAsBilling from single hook

* Remove checkbox handling from useCheckoutAddress

* Remove CustomerDataContext typedef

* Merge with woocommerce/woocommerce-blocks#5810 changes

* Move shipping as billing to checkout state context provider

* Unused import

* Subscribe to changes

* Only receiveCartContents when updating customer data via checkout

* Cache customerDataToUpdate

* rename debounced function

* Combine customerDataType and customerDataContextType

* Change case of CustomerDataType

* debouncedUpdateCustomerData typo

* Fix notice context

* Clean up inline docs for push changes

* Comment on dirty state

* Phone is always set

* shippingAddress is never undefined

* setBillingPhone

* receiveCartContents explanation

* Tweak customerData to avoid null

* useShippingAsBilling

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2022-02-22 17:45:01 +00:00
..
cart Update item quantity if server result is different from client (https://github.com/woocommerce/woocommerce-blocks/pull/5352) 2021-12-10 16:26:57 +01:00
collections Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668) 2022-02-07 09:34:30 +00:00
payment-methods Typedefs and cartData for `usePaymentMethodInterface` (https://github.com/woocommerce/woocommerce-blocks/pull/5177) 2021-12-07 13:02:57 +00:00
shipping Remove `useSelectShippingRate` hook and adjust how local state works for `PackageRates` (https://github.com/woocommerce/woocommerce-blocks/pull/5802) 2022-02-10 11:59:43 +00:00
test Create `StoreNoticesWithSnackbarProvider` (https://github.com/woocommerce/woocommerce-blocks/pull/4407) 2021-07-05 09:38:08 +01:00
index.js Expose Validation to 3PD blocks. (https://github.com/woocommerce/woocommerce-blocks/pull/4685) 2021-09-09 16:35:53 +01:00
use-checkout-address.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-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 Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +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-notices.ts Fix initial population of address data in `useCustomerData` hook (https://github.com/woocommerce/woocommerce-blocks/pull/5473) 2021-12-31 16:10:43 +01:00
use-store-products.ts Fix All Products block pagination not showing up (https://github.com/woocommerce/woocommerce-blocks/pull/5850) 2022-02-15 16:31:50 +01: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