woocommerce/plugins/woocommerce-blocks/assets/js/base
Thomas Roberts 3ebcd7f601 Add `CartEventContext` and dispatch events when pressing proceed to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/7809)
* Add CartEventsContext with onProceedToCheckout event

* Wrap Cart in CartEventsProvider

* Dispatch onProceedToCheckout event when button is pressed

* Update type of children on CartEventsProvider

* Add test for ProceedToCheckout block

* Add tests for CartEventProvider

* Remove superfluous div

* Fix incorrect nesting after rebase

* Wrap mini cart in CartEventsProvider

* Dispatch onProceedToCheckout event when clicking button in mini cart

* Add tests for mini cart onProceedToCheckout emitter

* Make observer fail so navigation isn't attempted

* Prevent console error on navigation

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests
2023-06-19 08:44:37 -07:00
..
components Refactor: Convert All Products block file from Javascript to Typescript and replace propTypes with TypeScript definitions (https://github.com/woocommerce/woocommerce-blocks/pull/9802) 2023-06-16 12:48:47 -03:00
context Add `CartEventContext` and dispatch events when pressing proceed to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/7809) 2023-06-19 08:44:37 -07:00
hocs Replace react imports with wordpress/element (https://github.com/woocommerce/woocommerce-blocks/pull/8520) 2023-03-02 15:26:00 +01:00
hooks Product Collection - Add Inherit query from template control (https://github.com/woocommerce/woocommerce-blocks/pull/9485) 2023-06-05 06:09:11 +00:00
utils Combine country asset data to reduce the amount of data consumed by the cart and checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/9552) 2023-05-31 10:30:44 +01:00
README.MD Avoid usage of `@wordpress/components` inside base components (https://github.com/woocommerce/woocommerce-blocks/pull/7996) 2023-01-11 17:12:06 +00:00

README.MD

Base Components/Context/Hooks

Base components are designed to be used on the frontend of a store. Due to this, we need to avoid using heavy WordPress externals as dependencies (wp-components, wp-block-editor, etc). To get around this, import from a local package instead.

e.g. Instead of importing from @wordpress/components, use:

import { Component } from 'wordpress-components';

Check the built *.assets.php files to ensure extra dependencies aren't being added to the build.