* Legacy Template block
* Return render_single_product value
* Make placeholder text translatable
* Don't allow removing the block
* Update block title
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add inline note around displayWithTax to clarify why prices change
* update snaps
* Snap update
* Clarify docs further for displayCartPricesIncludingTax
* Update assets/js/previews/cart.ts
Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
* Make Mini Cart block react to removed_from_cart events
* Move listening to add to cart and remove from cart events to the useStoreCart hook
* Add tests
* move empty cart
* remove Cart and rename Cart i2 to Cart
* graduate blocks
* setup template migration from Cart i1 to Cart i2
* back to js so we have a good diff
* add migration
* fix bug in empty cart template
* add useForceLayout hook to edit
* migrate from old block to new block
* migrate styles
* respect align
* add tests
* Include latest cart line item improvements from cart-i1
* Missing changes from cart-i1
* Line items table should be disabled
* Fix e2e tests for cart i2
* update tests to adapt for inner blocks
* update select to resolveSelect to remove warning checker
* rename test/block to test/index
* move blocks to their own file
* undo rename to keep diff clean
* remove .tsx and update jest config
* Revert "update select to resolveSelect to remove warning checker"
This reverts commit 79d55de30edcfe36bbdfe7506df7a09460824f03.
* revert resolveControl
* Fix empty cart editor E2E test by scrolling to the view switch
* parse attributes for order summary block
* migrate attributes when resaving
* Update documentation
Automatic update after running npm run build:docs
* add classname support to accepted payment methods block
* add classname support to express payment methods block
* add classname support to cart items block
* add classname support to cart line items block
* add classname support to order summary block
* add classname support to totals block
* add classname support to empty cart block
* add classname support to filled cart block
* add classname support to proceed to checkout block
* type edit
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* move empty cart
* remove Cart and rename Cart i2 to Cart
* graduate blocks
* setup template migration from Cart i1 to Cart i2
* back to js so we have a good diff
* add migration
* fix bug in empty cart template
* add useForceLayout hook to edit
* migrate from old block to new block
* migrate styles
* respect align
* add tests
* Include latest cart line item improvements from cart-i1
* Missing changes from cart-i1
* Line items table should be disabled
* Fix e2e tests for cart i2
* update tests to adapt for inner blocks
* update select to resolveSelect to remove warning checker
* rename test/block to test/index
* move blocks to their own file
* undo rename to keep diff clean
* remove .tsx and update jest config
* Revert "update select to resolveSelect to remove warning checker"
This reverts commit 79d55de30edcfe36bbdfe7506df7a09460824f03.
* revert resolveControl
* Fix empty cart editor E2E test by scrolling to the view switch
* parse attributes for order summary block
* migrate attributes when resaving
* Update documentation
Automatic update after running npm run build:docs
* add align options to filled cart and empty cart
* append instead of replcae
* import style.scss in frontend
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* Convert sharedConfig and Title blockConfig to TS
* Convert constants.tsx to TS
* Convert attributes.js to TS
* Amend attributes.ts record type
* Convert title component edit.js to TS
* Convert title component block.js to TS
* Amend product name index.tsx to prevent TS errors in product title block.tsx
* Amend product-name and base tsconfig
* Add rel to ProductName component element
* Replace ReactElement with JSX.Element
* Move TagName component to outside of the main component
* Add HTMLAttributes import
* WIP: Add props to TagName component
* Fix TagName typing
* Update TagName interface
* Replace ReactElement typing with JSX.Element
* Code review feedback amends
* Replace return type undefined to void
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
* Pass classname from DOM to react components
* Actions Block ClassName support
* Form step field classname support
* Payment block className support
* Classname support for fields and totals
* Order summary classname support
* Classname support for order note block
* Express payment classname support
* Terms block custom class
* Let useBlockProps handle class in actions block
* add handleMap
* remove useValidation from cart blocks
* add namespace options to docs
* Update packages/checkout/blocks-registry/README.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* expand on the docblock
* Update packages/checkout/blocks-registry/README.md
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Remove icons from checkout button
* Add new block type
* Register new block
* Remove unused attribute
* Add to new template
* Remove duplicate attributes
* Update Inner Block handling to use consistent appender and unlock payment methods
* Add dark mode inputs toggle to top level block
* Remove top level attributes which moved to inner blocks
* Remove unused components
* Pass down hasDarkControls and currentView via context props
* Update default empty template on server side
* template->registeredBlocks wording
* useForcedLayout: insert in correct place
* Remove test div
* Clarify inline docs
* Apply changes to cart block
* Convert product elements shared config to TypeScript
* Limit import to type
* Convert deprecated empty save function
* Add comment explaining omitted attributes and title properties
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Calculate human readable price values for the purpose of screen readers and set them as the aria values
* Calculate human readable price values for the purpose of screen readers and set them as the aria values
* Update API to add default boolean to attribute values and use this within the component to set the default attributes.
* Modify and add unit tests for isObject and getDefaultAttributes
* Sanitize attribute name to accommodate for custom attributes being default values.
* Comments for sanitized_attribute_name variable
* Remove second argument from getAttributes
* Replace context with __experimentalShareWithChildBlocks
* Switch to parent block when changing views
* Swap order of views
* Drop default, use first view
* Improve block selection after changing views
* WIP getting to work on frontend
* restore frontend.tsx
* fix layout
* support emtpy cart in frontend
* add cart tital to correct place and move useEffect
* Improve the type for callbacks registered by extensions
The previous type was CanMakePaymentCallback, used for the payment methods's own canMakePayment callbacks, which could also return Promises. In order to eliminate the confusion, a new type has been created that defines callbacks that only return true or false.
* Document registerPaymentMethodExtensionCallbacks
* Update docs/extensibility/filtering-payment-methods.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Add information about payment method name in documentation
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>