woocommerce/plugins/woocommerce-blocks/assets/js
Rua Haszard 1df11f5461 allow payment methods to disable based on shipping (API change) (https://github.com/woocommerce/woocommerce-blocks/pull/2840)
* allow payment methods to disable based on shipping or other factors:
- renamed 'initialized' array 'available' to match primary purpose of
  `canMakePayment` api - whether payment method should be available
- trigger refresh of available payment methods when shopper chooses
  different shipping method
- rename resolveCanMakePayments => refreshCanMakePayments
- tweaked some variable names and scope for clarity
- added comments to clarify things

Note this should not affect behaviour yet - no existing payment methods
use this new feature. COD payment method will need this - woocommerce/woocommerce-blocks#2831

* optimise refreshCanMakePayments:
- useShallowEqual to avoid unnecessary call when shipping methods have
not actually changed (but object value has)

* replace ("set") payment methods in store, was appending:
- payment methods may come and go depending on cart/checkout state
- the previous SET action appended provided payment methods to the
  collection
- this prevents dynamic payment methods e.g. COD from being able to hide
  i.e. disable

* cache test payment request to avoid unnecessary stripe API calls:
- in the canMakePayment callback there's a test payment to determine if
  chrome pay/apple pay is set up and available
- canMakePayment is now called multiple times as checkout state changes
- now the results of the test payment are stored in variable, and
  returned on subsequent calls

* set init flag to avoid additional attempts to init stripe API:
+ tweak naming of init flag
2020-07-14 10:52:13 +12:00
..
atomic Use WooCommerce thumbnail images in Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2755) 2020-06-23 13:25:28 +01:00
base allow payment methods to disable based on shipping (API change) (https://github.com/woocommerce/woocommerce-blocks/pull/2840) 2020-07-14 10:52:13 +12:00
blocks Unify Chip styles (https://github.com/woocommerce/woocommerce-blocks/pull/2765) 2020-07-10 11:09:49 +02:00
blocks-registry `registerInnerBlock` ->`registerBlockComponent` (https://github.com/woocommerce/woocommerce-blocks/pull/2688) 2020-06-17 14:10:46 +01:00
components Update base/components classnames (https://github.com/woocommerce/woocommerce-blocks/pull/2711) 2020-06-17 11:53:42 +02:00
data Reorder dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2774) 2020-06-26 13:01:35 +01:00
filters Add storybook story for icon library (https://github.com/woocommerce/woocommerce-blocks/pull/2787) 2020-06-26 10:22:41 -04:00
hocs Introduce Variation Picker Component (https://github.com/woocommerce/woocommerce-blocks/pull/2497) 2020-06-19 15:51:09 +01:00
icons Remove classes from dashicons (https://github.com/woocommerce/woocommerce-blocks/pull/2848) 2020-07-10 14:20:57 -04:00
legacy Update atomic block structure (https://github.com/woocommerce/woocommerce-blocks/pull/2587) 2020-05-29 14:49:56 +01:00
middleware Fix X-WC-Store-API-Nonce updates (https://github.com/woocommerce/woocommerce-blocks/pull/2429) 2020-05-08 10:39:03 -04:00
module_replacements Dashicon module replacement: prevent cloning a non-element (https://github.com/woocommerce/woocommerce-blocks/pull/2804) 2020-07-03 10:51:37 +02:00
payment-method-extensions/payment-methods allow payment methods to disable based on shipping (API change) (https://github.com/woocommerce/woocommerce-blocks/pull/2840) 2020-07-14 10:52:13 +12:00
previews Update references to use main 2020-06-16 10:38:19 +01:00
settings Reorder dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2774) 2020-06-26 13:01:35 +01:00
shared/context Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) 2020-06-05 13:18:16 +01:00
type-defs Introduce Atomic Add to Cart Block (https://github.com/woocommerce/woocommerce-blocks/pull/2705) 2020-06-17 10:52:03 +01:00
utils Accept object parameters in renderFrontend util (https://github.com/woocommerce/woocommerce-blocks/pull/2567) 2020-05-27 11:11:30 +01:00
index.js Add storybook story for icon library (https://github.com/woocommerce/woocommerce-blocks/pull/2787) 2020-06-26 10:22:41 -04:00