2019-08-17 09:14:11 +00:00
|
|
|
/**
|
2019-08-22 20:56:47 +00:00
|
|
|
* External dependencies
|
2019-08-17 09:14:11 +00:00
|
|
|
*/
|
2021-04-22 11:37:27 +00:00
|
|
|
import { getSetting } from '@woocommerce/settings';
|
2019-02-26 05:31:25 +00:00
|
|
|
|
|
|
|
export const sharedAttributeBlockTypes = [
|
|
|
|
'woocommerce/product-best-sellers',
|
|
|
|
'woocommerce/product-category',
|
|
|
|
'woocommerce/product-new',
|
|
|
|
'woocommerce/product-on-sale',
|
|
|
|
'woocommerce/product-top-rated',
|
|
|
|
];
|
|
|
|
|
2018-11-19 16:33:17 +00:00
|
|
|
export default {
|
|
|
|
/**
|
|
|
|
* Number of columns.
|
|
|
|
*/
|
|
|
|
columns: {
|
|
|
|
type: 'number',
|
2023-08-07 10:30:53 +00:00
|
|
|
default: getSetting( 'defaultColumns', 3 ),
|
2018-11-19 16:33:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Number of rows.
|
|
|
|
*/
|
|
|
|
rows: {
|
|
|
|
type: 'number',
|
2023-08-07 10:30:53 +00:00
|
|
|
default: getSetting( 'defaultRows', 3 ),
|
2018-11-19 16:33:17 +00:00
|
|
|
},
|
|
|
|
|
2019-06-27 11:13:02 +00:00
|
|
|
/**
|
|
|
|
* How to align cart buttons.
|
|
|
|
*/
|
|
|
|
alignButtons: {
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
|
2018-11-19 16:33:17 +00:00
|
|
|
/**
|
2018-12-13 17:19:55 +00:00
|
|
|
* Product category, used to display only products in the given categories.
|
2018-11-19 16:33:17 +00:00
|
|
|
*/
|
2018-12-13 17:19:55 +00:00
|
|
|
categories: {
|
|
|
|
type: 'array',
|
|
|
|
default: [],
|
2018-11-19 16:33:17 +00:00
|
|
|
},
|
2018-12-17 20:16:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Product category operator, used to restrict to products in all or any selected categories.
|
|
|
|
*/
|
|
|
|
catOperator: {
|
|
|
|
type: 'string',
|
|
|
|
default: 'any',
|
|
|
|
},
|
2019-02-21 19:00:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Content visibility setting
|
|
|
|
*/
|
|
|
|
contentVisibility: {
|
|
|
|
type: 'object',
|
|
|
|
default: {
|
2022-05-09 10:04:33 +00:00
|
|
|
image: true,
|
2019-02-21 19:00:47 +00:00
|
|
|
title: true,
|
|
|
|
price: true,
|
2019-03-06 18:50:32 +00:00
|
|
|
rating: true,
|
2019-02-21 19:00:47 +00:00
|
|
|
button: true,
|
|
|
|
},
|
|
|
|
},
|
2019-11-15 15:16:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Are we previewing?
|
|
|
|
*/
|
|
|
|
isPreview: {
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
2022-01-10 13:39:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether to display in stock, out of stock or backorder products.
|
|
|
|
*/
|
|
|
|
stockStatus: {
|
|
|
|
type: 'array',
|
|
|
|
default: Object.keys( getSetting( 'stockStatusOptions', [] ) ),
|
|
|
|
},
|
2018-11-19 16:33:17 +00:00
|
|
|
};
|