woocommerce/plugins/woocommerce-blocks/assets/js
Manish Menaria 14f87be044 Product Collection: Add columns control to product collection block editor settings (https://github.com/woocommerce/woocommerce-blocks/pull/9466)
* Add columns control to product collection block editor settings

- `InspectorControls` from './inspector-controls' is now imported in `edit.tsx` and used in the returned JSX of `Edit` function.
- A new file `columns-control.tsx` is added under 'product-collection' block's 'inspector-controls' directory which exports a `ColumnsControl` component. This component uses `RangeControl` from '@wordpress/components' to control the number of columns in the product collection display layout when the layout type is 'flex'.
- The types file (`types.ts`) for 'product-collection' block is updated. The `Attributes` interface is renamed to `ProductCollectionAttributes` and the `ProductCollectionContext` interface is removed. The `ProductCollectionAttributes` now includes 'queryContext', 'templateSlug', and 'displayLayout' properties.

* Refactor: Simplify Fallback Return in ColumnsControl Component

This commit simplifies the fallback return value of the ColumnsControl component. Instead of returning an empty fragment (<> </>), it now returns null when the condition isn't met. This change improves readability and aligns with best practices for conditional rendering in React.
2023-05-16 09:23:22 +00:00
..
atomic Foundation of New Product Collection Block (https://github.com/woocommerce/woocommerce-blocks/pull/9352) 2023-05-15 08:51:49 +00:00
base Mini Cart: stop using Modal component (https://github.com/woocommerce/woocommerce-blocks/pull/9345) 2023-05-16 10:41:26 +02:00
blocks Product Collection: Add columns control to product collection block editor settings (https://github.com/woocommerce/woocommerce-blocks/pull/9466) 2023-05-16 09:23:22 +00:00
blocks-registry Simplify @woocommerce/types imports (https://github.com/woocommerce/woocommerce-blocks/pull/8019) 2022-12-23 18:59:02 +07:00
data Refactor klona usage (https://github.com/woocommerce/woocommerce-blocks/pull/9320) 2023-05-03 12:09:12 +01:00
editor-components Fix/you do not need lodash (https://github.com/woocommerce/woocommerce-blocks/pull/9161) 2023-04-28 11:29:45 +01:00
extensions Fix/you do not need lodash (https://github.com/woocommerce/woocommerce-blocks/pull/9161) 2023-04-28 11:29:45 +01:00
filters Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
hocs Prevent `Featured Product` block from breaking when product is out of stock + hidden from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6640) 2022-07-05 09:24:28 +02:00
icons Only show the Mini Cart count badge when there are items in the cart (https://github.com/woocommerce/woocommerce-blocks/pull/9259) 2023-05-11 17:23:36 +02:00
interactivity Serialize the Interactivity API's store from PHP and hydrate it on the client (https://github.com/woocommerce/woocommerce-blocks/pull/8447) 2023-02-28 17:33:33 +01:00
middleware Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
previews Add single product block (https://github.com/woocommerce/woocommerce-blocks/pull/8610) 2023-04-06 15:40:43 -03:00
settings Restrict Local Pickup Checkout block users only (https://github.com/woocommerce/woocommerce-blocks/pull/7893) 2023-01-12 15:42:43 +01:00
shared Get product by ID if there's more products returned from useStoreProducts (https://github.com/woocommerce/woocommerce-blocks/pull/9079) 2023-04-19 09:52:16 +02:00
templates/revert-button Improve transform classic product template UX (https://github.com/woocommerce/woocommerce-blocks/pull/9386) 2023-05-10 13:02:33 +02:00
types Fix/you do not need lodash (https://github.com/woocommerce/woocommerce-blocks/pull/9161) 2023-04-28 11:29:45 +01:00
utils Implement Hand-Picked Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7925) 2023-05-08 14:50:10 +02:00
global.d.ts WIP - Checkout i2 Feature Branch Tracking (https://github.com/woocommerce/woocommerce-blocks/pull/4268) 2021-07-22 12:03:00 +01:00
index.js Improve transform classic product template UX (https://github.com/woocommerce/woocommerce-blocks/pull/9386) 2023-05-10 13:02:33 +02:00