* Add new icon for mini cart block (inserter).
See https://github.com/woocommerce/woocommerce-blocks/issues/6617.
* Adjust size of SVG
The new SVG was rendering a little bit smaller than the original icon.
Potentially because of the mask and the artboard size.
This commit adjusts the size to render at the same size as the original
version of the icon in the inserter.
* All Products: Use block.json to register
* Simplify edit def
* Separate file for save
* No more client-side registration
* Remove uncommented, now-obsolete code
* Add back client-side block registration
* Remove stray textdomain from keywords field
* Add textdomain field
* Set apiVersion to 1
* Get shipping rates from preview cart in editor
* Set showItems in ShippingRatesControl to true if multiple packages
* Move dependency in useShippingData to correct section
* Ensure getting packageData.shipping_rates.length won't error
Searches would keep the case of the user input instead of the original
case of the name. Search still is case insensitive, but preserves
the original item's case.
Also, this PR adds a test for this bug and fixes a previous test case.
* Start using `block.json` and convert to TS the `Product Best Sellers` block
* Update assets/js/blocks/product-best-sellers/edit.tsx
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Import props
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* price-filter: update URL when filtering products of All Products block.
* active-filters: update the URL when removing price filter
* price-filter: prevent update query on PHP templates when changing prices
* active-filters: on PHP templates, remove filter only triggers the page reload
* price-filter: update comments and naming to reflect new URL behavior
* stock-filter: update url when filtering for All Products block
* attribute-filter: update the URL when filtering for All Products block
* attribute-filter: fix: uncheck all filter doesn't clear the URL
* attribute-filter: fix: endless page reload when filtering for PHP template
* attribute-filter: correctly set the defaults and update the filter query from URL
* fix: filter URL containing stock status doesn't work on homepage
* price-filter: fix issue with URL on All Products
The price slider doesn't reset after removing price filter from the Active Filters block if the initial price filter is set from URL
* ref: passing document.title to pushState is unnecessary
* use replaceState to avoid changing browser history
* extract change URL logic
* update billing address when shipping address gets change in Cart block
* Add a new line to test linting error
* Remove a new line to test linting error
* Fix linting error
* Fix linting error
* Fix linting error by adding a space and removing a comma
* Fix linting error by replacing a space with tab
Co-authored-by: Niels Lange <info@nielslange.de>
* Show classic template in the inserter only for specific templates
* add feature gate
* add todo comment
* rename variable
* address feedback
* not register block on post and page editor
* avoid casting
* wip: convert attribute filter to ts
* change query to optional
* update SearchListControlProps and SearchListItemType
* get default attribute from metadata
* update types
* convert attributes utils to ts
* convert attribute query utils to ts
* fix type error, remove type casting
* revert type change for SearchListItemType
* apply new format
* Rename billingData to billingAddress
* Add unit test to ensure billingData remains accessible
* add integration tests for slots
* Keep billingData in usePaymentMethodRegistration for backwards compatibility
* Gate `billingData` in deprecation gate
* Replace deprecation call
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Gutenberg uses two different attributes for text colors:
* `style.color.text`, and
* `textColor`
However, the second one is used only when a color from the default
palette is selected AND the post is saved and reloaded.
With this fix we use the human readable string from the default palette
as a CSS variable.
Please note that while Gutenberg correctly assigns the appropriate CSS
class to render the right color, the problem is that if the color is
handled by a class, it can be overridden for example by themes.
See woocommerce/woocommerce-blocks#6492
Also:
* Refactored some composed components into one inclusive HOC,
called `withUpdateButtonAttributes`.
* The HOC `withTransformSingleSelectToMultipleSelect` allows for the wrong
type to be passed to its wrapped component: if a single element is
passed, that is wrapped into an array.
This didn't play well with TypeScript which obviously complains about
the wrong type being passed to the component.
So we now allow for arrays to be passed as props and ignored by the HOC
* Use wp store directly instead of React Context
We are using now actions directly from wp store in 'useStoreCartCoupons'
hook to apply and remove coupon.
* Remove unused "useStoreSnackbarNotices" related
files
* Add NoticeContext TS definition
* Remove the Provider references and refactor code
* Fix snackbar notice creation bug
* Fix "clear out snackbar coupon notice" bug
* Update "notices" API documentation
Remove snackbar hooks mentions since it's not used anymore