This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into 11166/schedule-action-on-update
- Loading branch information
Showing
57 changed files
with
1,290 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
assets/js/base/components/cart-checkout/product-badge/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
assets/js/blocks/collection-filters/inner-blocks/price-filter/block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"name": "woocommerce/collection-price-filter", | ||
"version": "1.0.0", | ||
"title": "Collection Price Filter", | ||
"description": "Enable customers to filter the product collection by choosing a price range.", | ||
"category": "woocommerce", | ||
"keywords": [ | ||
"WooCommerce" | ||
], | ||
"textdomain": "woo-gutenberg-products-block", | ||
"apiVersion": 2, | ||
"viewScript": [ | ||
"wc-collection-price-filter-block-frontend" | ||
], | ||
"ancestor": [ | ||
"woocommerce/product-collection" | ||
], | ||
"supports": { | ||
"interactivity": true | ||
}, | ||
"attributes": { | ||
"showInputFields": { | ||
"type": "boolean", | ||
"default": true | ||
}, | ||
"inlineInput": { | ||
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
assets/js/blocks/collection-filters/inner-blocks/price-filter/edit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { useBlockProps } from '@wordpress/block-editor'; | ||
import { useCollectionData } from '@woocommerce/base-context/hooks'; | ||
import { Disabled } from '@wordpress/components'; | ||
import FilterResetButton from '@woocommerce/base-components/filter-reset-button'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { getFormattedPrice } from './utils'; | ||
import { EditProps } from './types'; | ||
import { PriceSlider } from './price-slider'; | ||
|
||
const Edit = ( props: EditProps ) => { | ||
const blockProps = useBlockProps(); | ||
const { results } = useCollectionData( { | ||
queryPrices: true, | ||
isEditor: true, | ||
queryState: {}, | ||
} ); | ||
|
||
return ( | ||
<div { ...blockProps }> | ||
<Disabled> | ||
<div className="controls"> | ||
<PriceSlider | ||
{ ...props } | ||
collectionData={ getFormattedPrice( results ) } | ||
/> | ||
</div> | ||
<div className="actions"> | ||
<FilterResetButton onClick={ () => false } /> | ||
</div> | ||
</Disabled> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Edit; |
Oops, something went wrong.