* Add full documentation to the component props in Storybook
* Fix `FormattedMonetaryAmount` TypeScript errors
Since this component is passing on props to `NumberFormat`,
it needs to extend all of its original props, except for `onValueChange`
which we wrap in order to accept only `number`s.
* Convert `constrainRangeSliderValues` to TypeScript
* Add docs to `Currency` types
* Convert `PriceSlider` to TypeScript
*Note:* All TypeScript errors were fixed during the conversion,
except for the IE workaround which wasn't clear to me at this time.
Opened an issue: woocommerce/woocommerce-blocks#5276
* Fix Price Slider story (https://github.com/woocommerce/woocommerce-blocks/pull/5253)
* Migrate stories for `ProductName` to latest Storybook
Also add props documentation and add named export.
* Migrate stories for `ProductName` to latest Storybook. Also add props
documentation and add named export.
* Migrate `TotalsFooterItem` to TypeScript and latest Storybook
* Add a `LooselyMustHave` utility type.
* Export `allSettings` so that they can be manipulated in stories and tests
* Implement a way to easily define and reuse Storybook controls
Implement a currency control for a common use-case of selecting currencies.
It currently implements EUR and USD as they have different properties.
* Migrate `TotalsDiscount` to TypeScript and implement stories
* Migrate `TotalsCoupon` to TypeScript and fix stories
* Change Coupon name within Storybook
* Nicer handling of removal of a coupon from Storybook
It now dynamically calculates the discount from the actual coupons.
* Clarify docs for STARTED
* Clarify docs for setActivePaymentMethod
* Remove useActivePaymentMethod hook (this held state for active methods and tokens)
* Update type defs
* Enhance setActivePaymentMethod action to accept method data
* SET_ACTIVE_PAYMENT_METHOD action
* Add setActivePaymentMethod dispatcher and make "started" status only
* Update setActivePaymentMethod usage in express methods
* Set radio control defaults
* Consolodate tokens and methods
* Update assets/js/base/context/providers/cart-checkout/payment-methods/reducer.ts
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Spacing
* Split saved cards tests from regular, since saved cards are checked by default
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* add view switcher for mini cart contents block
* editor view switcher
* update mini cart template file
* render the empty state template parts for the Mini Cart Block woocommerce/woocommerce-blocks#4674
render the empty state template parts for the Mini Cart Block woocommerce/woocommerce-blocks#4674
* update selector
* allow empty mini cart block to add all blocks
* fix tests; improve code style
* install @wordpress/block-editor package
* fix warning on frontend side
* block-editor package is not necessary
* merge attributes object
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Introduce shared trait for draft order handling (DraftOrderTrait)
* Use trait where needed for maybe_release_stock
* Introduce woocommerce_blocks_cart_update_customer_from_request
This hook gets the request data and customer object, and from there, 3rd parties could grab a draft order and manually update it if needed (if the use cases requires this).
* Revert "Introduce woocommerce_blocks_cart_update_customer_from_request"
This reverts commit 6620818eb1e03b87c6eca0d757ec8b78802e3c57.
* Fix link to edit the Mini Cart template part in WP 5.9
* Use wp_is_block_theme() function
* Add protection against overwriting isSiteEditorAvailable setting
* Rename isSiteEditorAvailable to isBlockTheme
* Update icon of legacy template block
* Display legacy block template color in Woo purple
* Display icons in white when block being selected within list view
* ship component stories for storybook
* Refactor RemovableChip for Storybook
* Implement lucio feedback changes
* RemovableChip is part of the Chip story
* Typedefs and cartData for the payment interface
* fix case on noticeContexts
* typeof for enums
* immutable note
* Add cartData to docs table
* Rebase docs