* add typedefs for store notice context
* improve useStoreNotices hook so returned interfaces are fairly constant
* fix dependencies, defaults, and add types
* fix dependencies
* fix dependencies
* improve functions exposed on validation context so they are more constant
* fixing dependencies
* normalize tokenId to string everywhere
Assuming the token is a number is a bad idea because it is feasible that source for some payment methods could be a string. Also when retrieved as an input value, the id will be a string anyways.
* factor out editor preview data for saved payment methods to previews
* add missing imports lost in rebase
* use editorcontext to provide preview data to payment method context
* remove unused `activePaymentMethod` prop in CheckoutProvider and PaymentMethodDataProvider
* don't set the preview saved card as the default
* fix js error with cart in editor - fix EditorContext, pass previewData:
- editor context preview prop has changed;
- update cart to pass { previewCart } in previewData prop
- correctly destructure cart from previewData in useStoreCart hook
- correct typedefs
- EditorProvider props.previewData - now just Object
- similar for EditorDataContext
- correct default for activePaymentMethod state - empty string as before
* preselect 'use a new payment method' in checkout block editor preview
* update unit tests for changes to editor context