[Experimental] Update folder structure for new product filter blocks (#51029)
This commit is contained in:
parent
84e689d8a4
commit
cd638721f9
|
@ -6,7 +6,7 @@ import { store, getContext } from '@woocommerce/interactivity';
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
|
||||
type ActiveFiltersContext = {
|
||||
queryId: number;
|
|
@ -8,7 +8,7 @@ import { HTMLElementEvent } from '@woocommerce/types';
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
|
||||
type AttributeFilterContext = {
|
||||
attributeSlug: string;
|
|
@ -6,7 +6,7 @@ import { store, getContext } from '@woocommerce/interactivity';
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
|
||||
const getQueryParams = ( e: Event ) => {
|
||||
const filterNavContainer = ( e.target as HTMLElement )?.closest(
|
|
@ -16,8 +16,8 @@ import type {
|
|||
BlockContext,
|
||||
BlockVariationTriggerType,
|
||||
} from './types';
|
||||
import { default as productFiltersIcon } from '../product-filters/icon';
|
||||
import { BlockOverlayAttribute as ProductFiltersBlockOverlayAttribute } from '../product-filters/constants';
|
||||
import { default as productFiltersIcon } from '../../icon';
|
||||
import { BlockOverlayAttribute as ProductFiltersBlockOverlayAttribute } from '../../constants';
|
||||
import './editor.scss';
|
||||
import { Inspector } from './inspector-controls';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { BlockOverlayAttributeOptions as ProductFiltersBlockOverlayAttributeOptions } from '../product-filters/types';
|
||||
import { BlockOverlayAttributeOptions as ProductFiltersBlockOverlayAttributeOptions } from '../../types';
|
||||
|
||||
type BorderRadius = {
|
||||
bottomLeft: string;
|
|
@ -9,7 +9,7 @@ import { debounce } from '@woocommerce/base-utils';
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
import type { PriceFilterContext, PriceFilterStore } from './types';
|
||||
|
||||
const getUrl = ( context: PriceFilterContext ) => {
|
|
@ -8,7 +8,7 @@ import { DropdownContext } from '@woocommerce/interactivity-components/dropdown'
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
|
||||
function getUrl( filters: Array< string | null > ) {
|
||||
filters = filters.filter( Boolean );
|
|
@ -9,7 +9,7 @@ import { CheckboxListContext } from '@woocommerce/interactivity-components/check
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { navigate } from '../../frontend';
|
||||
import { navigate } from '../product-filter/frontend';
|
||||
|
||||
const getUrl = ( activeFilters: string ) => {
|
||||
const url = new URL( window.location.href );
|
|
@ -85,40 +85,43 @@ const blocks = {
|
|||
},
|
||||
'single-product': {},
|
||||
'stock-filter': {},
|
||||
'product-filter': {
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filters': {
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filter': {
|
||||
isExperimental: true,
|
||||
customDir: 'product-filters/inner-blocks/product-filter',
|
||||
},
|
||||
'product-filters-overlay': {
|
||||
isExperimental: true,
|
||||
customDir: 'product-filters/inner-blocks/overlay',
|
||||
},
|
||||
'product-filters-overlay-navigation': {
|
||||
isExperimental: true,
|
||||
customDir: 'product-filters/inner-blocks/overlay-navigation',
|
||||
},
|
||||
'product-filter-stock-status': {
|
||||
isExperimental: true,
|
||||
customDir: 'product-filter/inner-blocks/stock-filter',
|
||||
customDir: 'product-filters/inner-blocks/stock-filter',
|
||||
},
|
||||
'product-filter-price': {
|
||||
customDir: 'product-filter/inner-blocks/price-filter',
|
||||
customDir: 'product-filters/inner-blocks/price-filter',
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filter-attribute': {
|
||||
customDir: 'product-filter/inner-blocks/attribute-filter',
|
||||
customDir: 'product-filters/inner-blocks/attribute-filter',
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filter-rating': {
|
||||
customDir: 'product-filter/inner-blocks/rating-filter',
|
||||
customDir: 'product-filters/inner-blocks/rating-filter',
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filter-active': {
|
||||
customDir: 'product-filter/inner-blocks/active-filters',
|
||||
customDir: 'product-filters/inner-blocks/active-filters',
|
||||
isExperimental: true,
|
||||
},
|
||||
'product-filter-clear-button': {
|
||||
customDir: 'product-filter/inner-blocks/clear-button',
|
||||
customDir: 'product-filters/inner-blocks/clear-button',
|
||||
isExperimental: true,
|
||||
},
|
||||
'order-confirmation-summary': {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
Comment: Update the folder structure of new filter blocks.
|
||||
|
||||
|
Loading…
Reference in New Issue