* Add transforms for shared attributes.
This adds transforms for the 5 blocks which share attributes:
- woocommerce/product-best-sellers
- woocommerce/product-category
- woocommerce/product-new
- woocommerce/product-on-sale
- woocommerce/product-top-rated
* Use createBlock directly and rowColumnBlockTypes
This adds rowColumnBlockTypes as an array of woocommerce/* block types
that use row and column layouts
* Move block types into utils, and use without
This uses lodash instead of without instead of difference
It also moves the block types from an index into the shared-attributes
in utils.
* Component: GridContentControl for controlling visibility of product content
* Add the content control to all grid blocks
* Use CSS to hide the content on the front end
* Fix missing translation functions
* Add catalog_visibility param to products api
This adds a catalog_visibility=visible option to the product api which
will filter out any products that are excluded from the catalog.
* Add product_visibility phpunit test
* Add catalog_visibility for catalog, search, hidden
* Fix util js test
The util js test checks for query parameters, so this adds the
category_visibility = 'visible' param.
* Updated for comments
1. Added collection params
2. moved catalog_visibility default with others
* Add “attribute selection” step before allowing terms to be selected
* Update query builder
* Use shortcode to render block
* Styling for child list items
* Add a new LayoutControl component
* Use new LayoutControl to handle rows & columns settings
* Fix errors when rows or columns is empty (silently fall back to default to prevent breaking the block)
* Rename `LayoutControl` to `GridLayoutControl`
* Add media icon to toolbar, save selected media ID and src as attributes
* Use the selected image instead of the product image, if set
* Unset the selected image when a new product is selected
* Add a prop to turn on “single choice” mode
* Create new ProductControl to select a single product
* Remove align from shared attributes
This is given to us by default for using supports.align
* Add Featured Product block
* Fix spelling mistake & copy-paste issue
* Fix lint warning
* Add featured product script to build process, register block in PHP
* Prevent Products by Category from showing all products when no category is selected
* Update string when no categories are selected
* Update button text
* Revert button change, Done is more appropriate
* Add ProductsControl component to search and select products
* Add “Hand-picked Products” block
* Update hand-picked & new product icons
* Prevent API request when no products are selected
* Remove rows setting
* Update shortcode/query helpers for the handpicked products
* Remove shortcode from post if no product IDs are passed
Rendering a shortcode with `ids=‘’` will show all products, as if the ids param wasn’t there. The expected outcome would be no products are shown, we we achieve by removing the shortcode.
* Remove unused rows attribute
* Update accessible spoken notice
* Add a variable to hold whether there are selected products
* Fix copy-paste comments
* Add initial attribute selector control
* Make the attribute group name unselectable
* Update selected map to reflect attribute syntax
* Add the attributes selector to the product category block
* Update copy-paste comment
* Update variable name to be more clear
* Move & rename the attribute selector in Products by Category
* Reorganize the API calls to fetch attributes + attribute terms
* add newest products block
* update class name in index.js and product-new.js
* Add a new WooCommerce block category and include all blocks within.
* Fix shortcode product order
* Show block category on all post types
* Add core breakpoint 480px, remove non-core breakpoints
* Add the optional operator & save callback
* Add the catOperator as a valid attribute
* Enable cat operator for Products by Category
* Add cat_operator support the products API endpoint
* Enable cat_operator in the shortcode and query utils
* Pluralize the “nothing found” string if we have multiple categories
* Fix style in the inspector panel
* Add category operator support to the Best Sellers product block
* Add cat_operator support to On Sale Products block
* Update label & margin
* Move from a JS file per block registration to one file registering all blocks
This will let webpack combine shared libraries, like gridicons
* Move global block settings to the “before all scripts” section
These shouldn’t be tied to a specific block file, since they’re used across all blocks
* Register both block types
We can also remove the scripts, since we enqueue these below
* Update getShortcode & getQuery to handle different block types
* Pass block type name to getQuery
* Update shared attributes - edit_mode is not a universal option, but categories will be
Categories is shared, but orderby is not
* Add “Best Selling Products” block
* Add a shared class name for product grid blocks
* Fix failing tests
* Load only published products in the preview
* Fix post status in legacy block too
* Filter searching for individual products to only search published products
* Update query tests with change
* Add a second block, for “products by category”
* Fetch products in the given category, when attributes change
* Display the resulting products
* Style the product preview
* Create utils folder, move shared attributes
* Move getQuery to shared utils folder
* Create a helper function to get the shortcode string
* Support the menu_order setting
* Support center/wide/full alignment
* Update PropTypes
* Add tests
* Add text domain to translation functions