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.2.0 10.0.1 5.2.0-beta.1 10.0.2 5.2.0-rc.1 10.0.3 5.2.0-rc.2 10.0.4 5.2.1 10.0.5 5.2.2 10.0.6 5.2.3 10.1.0 5.2.4 10.1.0-rc.1 5.2.5 10.1.0-rc.2 5.3.0 10.1.0-rc.3 5.3.0-beta.1 10.1.0-rc.4 5.3.0-rc.1 10.1.1 5.3.0-rc.2 10.1.2 5.3.1 10.1.3 5.3.2 10.1.4 5.3.3 10.2.0 5.4.0 10.2.0-beta.1 5.4.0-beta.1 10.2.0-beta.2 5.4.0-rc.1 10.2.0-rc.1 5.4.1 10.2.1 5.4.2 10.2.2 5.4.3 10.2.3 5.4.4 10.2.4 5.4.5 10.3.0 5.5.0 10.3.0-beta.1 5.5.0-beta.1 10.3.0-beta.2 5.5.0-rc.1 10.3.0-rc.1 5.5.0-rc.2 10.3.0-rc.2 5.5.1 10.3.1 5.5.2 10.3.2 5.5.3 10.3.3 5.5.4 10.3.4 5.5.5 10.3.5 5.6.0 10.3.6 5.6.0-beta.1 10.3.7 5.6.0-rc.1 10.3.8 5.6.0-rc.2 10.4.0 5.6.1 10.4.0-beta.1 5.6.2 10.4.0-beta.2 5.6.3 10.4.0-rc.1 5.7.0 10.4.1 5.7.0-beta.1 10.4.2 5.7.0-rc.1 10.4.3 5.7.1 10.4.4 5.7.2 10.5.0 5.7.3 10.5.0-beta.1 5.8.0 10.5.0-beta.2 5.8.0-beta.1 10.5.0-rc.1 5.8.0-beta.2 10.5.0-rc.2 5.8.0-rc.1 10.5.0-rc.3 5.8.1 10.5.1 5.8.2 10.5.2 5.9.0 10.5.3 5.9.0-beta.1 10.6.0 5.9.0-rc.1 10.6.0-beta.1 5.9.0-rc.2 10.6.0-beta.2 5.9.1 10.6.0-rc.1 5.9.2 10.6.1 6.0.0 10.6.2 6.0.0-beta.1 10.7.0 6.0.0-rc.1 10.7.0-beta.1 6.0.1 10.7.0-beta.2 6.0.2 10.7.0-rc.1 6.1.0 3.0.0 6.1.0-beta.1 3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.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / src / Blocks / BlockTypes / MiniCartContents.php
woocommerce / src / Blocks / BlockTypes Last commit date
Accordion 1 year ago AddToCartWithOptions 2 weeks ago OrderConfirmation 2 weeks ago ProductCollection 2 weeks ago Reviews 2 weeks ago AbstractBlock.php 2 weeks ago AbstractDynamicBlock.php 2 years ago AbstractInnerBlock.php 1 year ago AbstractProductGrid.php 5 months ago ActiveFilters.php 2 years ago AddToCartForm.php 2 weeks ago AddToWishlistButton.php 2 months ago AllProducts.php 1 month ago AllReviews.php 2 years ago AtomicBlock.php 2 years ago AttributeFilter.php 1 year ago Breadcrumbs.php 1 month ago Cart.php 2 weeks ago CartAcceptedPaymentMethodsBlock.php 2 years ago CartCrossSellsBlock.php 2 years ago CartCrossSellsProductsBlock.php 2 years ago CartExpressPaymentBlock.php 1 year ago CartItemsBlock.php 2 years ago CartLineItemsBlock.php 2 years ago CartLink.php 3 months ago CartOrderSummaryBlock.php 2 years ago CartOrderSummaryCouponFormBlock.php 2 years ago CartOrderSummaryDiscountBlock.php 2 years ago CartOrderSummaryFeeBlock.php 2 years ago CartOrderSummaryHeadingBlock.php 2 years ago CartOrderSummaryShippingBlock.php 2 years ago CartOrderSummarySubtotalBlock.php 2 years ago CartOrderSummaryTaxesBlock.php 2 years ago CartOrderSummaryTotalsBlock.php 2 years ago CartTotalsBlock.php 2 years ago CatalogSorting.php 2 months ago CategoryDescription.php 3 months ago CategoryTitle.php 3 months ago Checkout.php 2 weeks ago CheckoutActionsBlock.php 1 year ago CheckoutAdditionalInformationBlock.php 2 years ago CheckoutBillingAddressBlock.php 2 years ago CheckoutContactInformationBlock.php 2 years ago CheckoutExpressPaymentBlock.php 10 months ago CheckoutFieldsBlock.php 2 years ago CheckoutOrderNoteBlock.php 2 years ago CheckoutOrderSummaryBlock.php 2 years ago CheckoutOrderSummaryCartItemsBlock.php 2 years ago CheckoutOrderSummaryCouponFormBlock.php 2 years ago CheckoutOrderSummaryDiscountBlock.php 2 years ago CheckoutOrderSummaryFeeBlock.php 2 years ago CheckoutOrderSummaryShippingBlock.php 2 years ago CheckoutOrderSummarySubtotalBlock.php 2 years ago CheckoutOrderSummaryTaxesBlock.php 2 years ago CheckoutOrderSummaryTotalsBlock.php 2 years ago CheckoutPaymentBlock.php 2 years ago CheckoutPickupOptionsBlock.php 2 years ago CheckoutShippingAddressBlock.php 2 years ago CheckoutShippingMethodBlock.php 2 years ago CheckoutShippingMethodsBlock.php 2 years ago CheckoutTermsBlock.php 2 years ago CheckoutTotalsBlock.php 2 years ago ClassicShortcode.php 1 year ago ClassicTemplate.php 6 months ago ComingSoon.php 1 year ago CouponCode.php 2 weeks ago CustomerAccount.php 2 weeks ago Dropdown.php 1 month ago EmailContent.php 2 weeks ago EmptyCartBlock.php 2 years ago EmptyMiniCartContentsBlock.php 2 weeks ago EnableBlockJsonAssetsTrait.php 1 year ago FeaturedCategory.php 2 weeks ago FeaturedItem.php 2 weeks ago FeaturedProduct.php 2 weeks ago FilledCartBlock.php 2 years ago FilledMiniCartContentsBlock.php 2 weeks ago FilterWrapper.php 2 years ago HandpickedProducts.php 1 year ago MiniCart.php 2 weeks ago MiniCartCartButtonBlock.php 2 weeks ago MiniCartCheckoutButtonBlock.php 2 weeks ago MiniCartContents.php 2 weeks ago MiniCartFooterBlock.php 2 weeks ago MiniCartItemsBlock.php 2 weeks ago MiniCartProductsTableBlock.php 2 weeks ago MiniCartShoppingButtonBlock.php 2 weeks ago MiniCartTitleBlock.php 2 weeks ago MiniCartTitleItemsCounterBlock.php 2 weeks ago MiniCartTitleLabelBlock.php 2 weeks ago NextPreviousButtons.php 7 months ago PageContentWrapper.php 2 years ago PaymentMethodIcons.php 1 year ago PriceFilter.php 1 year ago ProceedToCheckoutBlock.php 2 years ago ProductAverageRating.php 1 year ago ProductBestSellers.php 2 years ago ProductButton.php 2 weeks ago ProductCategories.php 2 months ago ProductCategory.php 2 years ago ProductDescription.php 10 months ago ProductDetails.php 7 months ago ProductFilterActive.php 2 months ago ProductFilterAttribute.php 1 month ago ProductFilterCheckboxList.php 2 months ago ProductFilterChips.php 2 months ago ProductFilterClearButton.php 2 months ago ProductFilterPrice.php 2 months ago ProductFilterPriceSlider.php 2 months ago ProductFilterRating.php 2 months ago ProductFilterRemovableChips.php 2 months ago ProductFilterStatus.php 1 month ago ProductFilterTaxonomy.php 1 month ago ProductFilters.php 1 month ago ProductGallery.php 2 weeks ago ProductGalleryLargeImage.php 2 weeks ago ProductGalleryThumbnails.php 2 weeks ago ProductImage.php 2 weeks ago ProductImageGallery.php 9 months ago ProductMeta.php 2 years ago ProductNew.php 2 years ago ProductOnSale.php 2 years ago ProductPrice.php 2 weeks ago ProductQuery.php 1 month ago ProductRating.php 1 year ago ProductRatingCounter.php 1 year ago ProductRatingStars.php 1 year ago ProductResultsCount.php 3 months ago ProductSKU.php 3 months ago ProductSaleBadge.php 1 year ago ProductSearch.php 1 year ago ProductSpecifications.php 3 months ago ProductStockIndicator.php 3 months ago ProductSummary.php 3 weeks ago ProductTag.php 2 years ago ProductTemplate.php 1 month ago ProductTitle.php 1 year ago ProductTopRated.php 2 years ago ProductsByAttribute.php 2 years ago RatingFilter.php 2 years ago RelatedProducts.php 5 months ago ReviewsByCategory.php 2 years ago ReviewsByProduct.php 2 years ago SavedForLater.php 2 months ago SingleProduct.php 2 weeks ago StockFilter.php 2 weeks ago StoreNotices.php 1 year ago Wishlist.php 2 months ago
MiniCartContents.php
176 lines
1 <?php
2 namespace Automattic\WooCommerce\Blocks\BlockTypes;
3
4 use Automattic\WooCommerce\Blocks\Utils\StyleAttributesUtils;
5
6 /**
7 * Mini-Cart Contents class.
8 *
9 * @internal
10 */
11 class MiniCartContents extends AbstractBlock {
12 /**
13 * Block name.
14 *
15 * @var string
16 */
17 protected $block_name = 'mini-cart-contents';
18
19 /**
20 * Get the frontend script handle for this block type.
21 *
22 * @param string $key Data to get, or default to everything.
23 *
24 * @return null
25 */
26 protected function get_block_type_script( $key = null ) {
27 // The frontend script is a dependency of the Mini-Cart block so it's
28 // already lazy-loaded.
29 return null;
30 }
31
32 /**
33 * Get the frontend style handle for this block type.
34 *
35 * @return string[]
36 */
37 protected function get_block_type_style() {
38 return [ 'wc-blocks-style', 'wc-blocks-packages-style' ];
39 }
40
41 /**
42 * Render the markup for the Mini-Cart Contents block.
43 *
44 * @param array $attributes Block attributes.
45 * @param string $content Block content.
46 * @param \WP_Block $block Block instance.
47 * @return string Rendered block type output.
48 */
49 protected function render( $attributes, $content, $block ) {
50 if ( is_admin() || WC()->is_rest_api_request() ) {
51 // In the editor we will display the placeholder, so no need to
52 // print the markup.
53 return '';
54 }
55
56 $wrapper_attributes = get_block_wrapper_attributes(
57 array(
58 'data-wp-interactive' => 'woocommerce/mini-cart-contents',
59 'data-wp-style--background-color' => 'woocommerce/mini-cart::state.contentsBackgroundColor',
60 )
61 );
62
63 ob_start();
64 ?>
65 <div <?php echo $wrapper_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
66 <div class="wc-block-components-drawer__close-wrapper">
67 <button data-wp-on--click="woocommerce/mini-cart::actions.closeDrawer" class="wc-block-components-button wp-element-button wc-block-components-drawer__close contained" aria-label="Close" type="button">
68 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">
69 <path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path>
70 </svg>
71 </button>
72 </div>
73 <?php
74 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
75 echo $content;
76 ?>
77 </div>
78 <?php
79 return (string) ob_get_clean();
80 }
81
82 /**
83 * Enqueue frontend assets for this block, just in time for rendering.
84 *
85 * @param array $attributes Any attributes that currently are available from the block.
86 * @param string $content The block content.
87 * @param \WP_Block $block The block object.
88 */
89 protected function enqueue_assets( array $attributes, $content, $block ) {
90 parent::enqueue_assets( $attributes, $content, $block );
91 $text_color = StyleAttributesUtils::get_text_color_class_and_style( $attributes );
92 $bg_color = StyleAttributesUtils::get_background_color_class_and_style( $attributes );
93
94 $styles = array(
95 array(
96 'selector' => array(
97 '.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout',
98 '.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout:hover',
99 '.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout:focus',
100 '.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button:hover',
101 '.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button:focus',
102 '.wc-block-mini-cart__shopping-button a:hover',
103 '.wc-block-mini-cart__shopping-button a:focus',
104 ),
105 'properties' => array(
106 array(
107 'property' => 'color',
108 'value' => $bg_color ? $bg_color['value'] : false,
109 ),
110 array(
111 'property' => 'border-color',
112 'value' => $text_color ? $text_color['value'] : false,
113 ),
114 array(
115 'property' => 'background-color',
116 'value' => $text_color ? $text_color['value'] : false,
117 ),
118 ),
119 ),
120 );
121
122 $parsed_style = sprintf(
123 ':root { --drawer-width: %s; --neg-drawer-width: calc(var(--drawer-width) * -1); }',
124 esc_html( $attributes['width'] )
125 );
126
127 foreach ( $styles as $style ) {
128 $selector = is_array( $style['selector'] ) ? implode( ',', $style['selector'] ) : $style['selector'];
129
130 $properties = array_filter(
131 $style['properties'],
132 function ( $property ) {
133 return $property['value'];
134 }
135 );
136
137 if ( ! empty( $properties ) ) {
138 $parsed_style .= $selector . '{';
139 foreach ( $properties as $property ) {
140 $parsed_style .= sprintf( '%1$s:%2$s;', $property['property'], $property['value'] );
141 }
142 $parsed_style .= '}';
143 }
144 }
145
146 wp_add_inline_style(
147 'wc-blocks-style',
148 $parsed_style
149 );
150 }
151
152 /**
153 * Get list of Mini-Cart Contents block & its inner-block types.
154 *
155 * @return array;
156 */
157 public static function get_mini_cart_block_types() {
158 $block_types = [];
159
160 $block_types[] = 'MiniCartContents';
161 $block_types[] = 'EmptyMiniCartContentsBlock';
162 $block_types[] = 'FilledMiniCartContentsBlock';
163 $block_types[] = 'MiniCartFooterBlock';
164 $block_types[] = 'MiniCartItemsBlock';
165 $block_types[] = 'MiniCartProductsTableBlock';
166 $block_types[] = 'MiniCartShoppingButtonBlock';
167 $block_types[] = 'MiniCartCartButtonBlock';
168 $block_types[] = 'MiniCartCheckoutButtonBlock';
169 $block_types[] = 'MiniCartTitleBlock';
170 $block_types[] = 'MiniCartTitleItemsCounterBlock';
171 $block_types[] = 'MiniCartTitleLabelBlock';
172
173 return $block_types;
174 }
175 }
176