woocommerce/plugins/woocommerce-blocks/assets/js/data/checkout
Thomas Roberts f3588635d7 Add stricter observer type checks in payments thunk to improve resilience to bad observer responses (https://github.com/woocommerce/woocommerce-blocks/pull/8319)
* Allow observers to set billingAddress by returning billingData

This is required since we didn't correctly deprecate billingData when we changed the name to billingAddress

* Add tests for shippingAddress and paymentMethodData

* Add mocked __internalSetPaymentMethodData to correct object

It was in registry, but should be in dispatch as the action is on the same store as the thunk. Registry is used for actions on other stores.

* Re-add FieldValidationStatus type

* Add FieldValidationStatus back

* Remove empty file

* Import FieldValidationStatus from correct place

* Remove import of deleted types file

* Add isObserverResponse type guard

* Use error constant instead of magic string in event emitter

* Remove composite project tsconfig

* Add ObserverResponse type

* Add types to emitEventWithAbort

* Check if paymentmethod data is an object before dispatching

* Set types on observer responses

* Add validationErrors type guards

* Add tests for validation typeguards

* Add validation errors as option on observer response

* Add more granular observer response types

* Check observer response has correct types before dispatching actions

* Force type on deprecated billingData and shippingData

* Remove unnecessary comment
2023-02-13 03:43:57 -08:00
..
test Fix/extension data conflicts (https://github.com/woocommerce/woocommerce-blocks/pull/8354) 2023-02-03 11:18:18 +00:00
action-types.ts Introduce shipping method toggle block 2023-01-12 15:34:44 +01:00
actions.ts Fix/extension data conflicts (https://github.com/woocommerce/woocommerce-blocks/pull/8354) 2023-02-03 11:18:18 +00:00
constants.ts Consolidate Address types (https://github.com/woocommerce/woocommerce-blocks/pull/7272) 2022-10-06 15:48:52 +01:00
default-state.ts Maintain Local Pickup Selection (https://github.com/woocommerce/woocommerce-blocks/pull/7894) 2023-01-12 15:42:43 +01:00
index.ts Add thunk support for < WP 5.9 (https://github.com/woocommerce/woocommerce-blocks/pull/8136) 2023-01-09 15:01:49 -08:00
reducers.ts Fix/extension data conflicts (https://github.com/woocommerce/woocommerce-blocks/pull/8354) 2023-02-03 11:18:18 +00:00
selectors.ts Allow third party methods to appear in local pickup area (https://github.com/woocommerce/woocommerce-blocks/pull/8256) 2023-02-03 08:00:24 -08:00
thunks.ts Move notices to corresponding context (https://github.com/woocommerce/woocommerce-blocks/pull/8228) 2023-01-24 11:58:30 +07:00
types.ts Add stricter observer type checks in payments thunk to improve resilience to bad observer responses (https://github.com/woocommerce/woocommerce-blocks/pull/8319) 2023-02-13 03:43:57 -08:00
utils.ts Prefix all actions in the checkout and payment-method stores with `__internal` (https://github.com/woocommerce/woocommerce-blocks/pull/7266) 2022-10-05 11:04:16 +01:00