active-filters
2 years ago
add-to-cart-form
2 years ago
all-products
2 years ago
attribute-filter
2 years ago
base-components-mini-cart-contents-block
2 years ago
base-components-product-price~mini-cart-contents-block
2 years ago
breadcrumbs
2 years ago
cart-blocks
2 years ago
catalog-sorting
2 years ago
checkout
2 years ago
checkout-blocks
2 years ago
classic-shortcode
2 years ago
collection-active-filters
2 years ago
collection-attribute-filter
2 years ago
collection-filters
2 years ago
collection-price-filter
2 years ago
collection-rating-filter
2 years ago
collection-stock-filter
2 years ago
customer-account
2 years ago
featured-category
2 years ago
featured-product
2 years ago
filter-wrapper
2 years ago
handpicked-products
2 years ago
inner-blocks
2 years ago
mini-cart
2 years ago
mini-cart-contents-block
2 years ago
order-confirmation-additional-information
2 years ago
order-confirmation-billing-address
2 years ago
order-confirmation-billing-wrapper
2 years ago
order-confirmation-downloads
2 years ago
order-confirmation-downloads-wrapper
2 years ago
order-confirmation-shipping-address
2 years ago
order-confirmation-shipping-wrapper
2 years ago
order-confirmation-status
2 years ago
order-confirmation-summary
2 years ago
order-confirmation-totals
2 years ago
order-confirmation-totals-wrapper
2 years ago
page-content-wrapper
2 years ago
price-filter
2 years ago
product-average-rating
2 years ago
product-best-sellers
2 years ago
product-button
2 years ago
product-categories
2 years ago
product-category
2 years ago
product-collection
2 years ago
product-collection-no-results
2 years ago
product-details
2 years ago
product-gallery
2 years ago
product-gallery-large-image
2 years ago
product-gallery-large-image-next-previous
2 years ago
product-gallery-pager
2 years ago
product-gallery-thumbnails
2 years ago
product-image-gallery
2 years ago
product-meta
2 years ago
product-new
2 years ago
product-rating
2 years ago
product-rating-counter
2 years ago
product-rating-stars
2 years ago
product-results-count
2 years ago
product-reviews
2 years ago
product-tag
2 years ago
product-template
2 years ago
product-top-rated
2 years ago
products-by-attribute
2 years ago
rating-filter
2 years ago
related-products
2 years ago
single-product
2 years ago
stock-filter
2 years ago
store-notices
2 years ago
active-filters-frontend.asset.php
2 years ago
active-filters-frontend.js
2 years ago
active-filters-frontend.js.map
2 years ago
active-filters-rtl.css
2 years ago
active-filters-style.asset.php
2 years ago
active-filters-style.js.map
2 years ago
active-filters-wrapper-frontend.js
2 years ago
active-filters-wrapper-frontend.js.map
2 years ago
active-filters-wrapper-rtl.css
2 years ago
active-filters-wrapper-style.js.map
2 years ago
active-filters-wrapper.css
2 years ago
active-filters-wrapper.css.map
2 years ago
active-filters.asset.php
2 years ago
active-filters.css
2 years ago
active-filters.css.map
2 years ago
active-filters.js
2 years ago
active-filters.js.map
2 years ago
add-to-cart-form-rtl.css
2 years ago
add-to-cart-form-style.asset.php
2 years ago
add-to-cart-form-style.js.map
2 years ago
add-to-cart-form.css
2 years ago
add-to-cart-form.css.map
2 years ago
all-products-frontend.asset.php
2 years ago
all-products-frontend.js
2 years ago
all-products-frontend.js.map
2 years ago
all-products-rtl.css
2 years ago
all-products-style.asset.php
2 years ago
all-products-style.js.map
2 years ago
all-products.asset.php
2 years ago
all-products.css
2 years ago
all-products.css.map
2 years ago
all-products.js
2 years ago
all-products.js.map
2 years ago
all-reviews-rtl.css
2 years ago
all-reviews-style.asset.php
2 years ago
all-reviews-style.js.map
2 years ago
all-reviews.asset.php
2 years ago
all-reviews.css
2 years ago
all-reviews.css.map
2 years ago
all-reviews.js
2 years ago
all-reviews.js.map
2 years ago
assets_js_base_context_hooks_collections_use-collection_ts-assets_js_base_context_hooks_use-q-fdf7ba-style.js.map
2 years ago
assets_js_base_context_hooks_use-store-add-to-cart_ts-assets_js_base_context_hooks_use-store--e30f56-style.js.map
2 years ago
attribute-filter-frontend.asset.php
2 years ago
attribute-filter-frontend.js
2 years ago
attribute-filter-frontend.js.map
2 years ago
attribute-filter-rtl.css
2 years ago
attribute-filter-style.asset.php
2 years ago
attribute-filter-style.js.map
2 years ago
attribute-filter-wrapper-frontend.js
2 years ago
attribute-filter-wrapper-frontend.js.map
2 years ago
attribute-filter-wrapper-rtl.css
2 years ago
attribute-filter-wrapper-style.js.map
2 years ago
attribute-filter-wrapper.css
2 years ago
attribute-filter-wrapper.css.map
2 years ago
attribute-filter.asset.php
2 years ago
attribute-filter.css
2 years ago
attribute-filter.css.map
2 years ago
attribute-filter.js
2 years ago
attribute-filter.js.map
2 years ago
base-components-attribute-filter-wrapper-index.tsx-style.js.map
2 years ago
base-components-price-filter-wrapper-index.tsx-style.js.map
2 years ago
base-components-price-filter-wrapper-style.scss-rtl.css
2 years ago
base-components-price-filter-wrapper-style.scss.css
2 years ago
base-components-price-filter-wrapper-style.scss.css.map
2 years ago
base-components-rating-filter-wrapper-index.tsx-style.js.map
2 years ago
base-components-rating-filter-wrapper-style.scss-rtl.css
2 years ago
base-components-rating-filter-wrapper-style.scss.css
2 years ago
base-components-rating-filter-wrapper-style.scss.css.map
2 years ago
base-components-stock-filter-wrapper-index.tsx-style.js.map
2 years ago
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss-rtl.css
2 years ago
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css
2 years ago
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css.map
2 years ago
base-context-product-add-to-cart-index.js-style.js.map
2 years ago
blocks-checkout.asset.php
2 years ago
blocks-checkout.js
2 years ago
blocks-checkout.js.map
2 years ago
blocks-components.asset.php
2 years ago
blocks-components.js
2 years ago
blocks-components.js.map
2 years ago
breadcrumbs-rtl.css
2 years ago
breadcrumbs-style.asset.php
2 years ago
breadcrumbs-style.js.map
2 years ago
breadcrumbs.asset.php
2 years ago
breadcrumbs.css
2 years ago
breadcrumbs.css.map
2 years ago
breadcrumbs.js
2 years ago
breadcrumbs.js.map
2 years ago
cart-frontend.asset.php
2 years ago
cart-frontend.js
2 years ago
cart-frontend.js.map
2 years ago
cart-rtl.css
2 years ago
cart-style.asset.php
2 years ago
cart-style.js.map
2 years ago
cart.asset.php
2 years ago
cart.css
2 years ago
cart.css.map
2 years ago
cart.js
2 years ago
cart.js.map
2 years ago
catalog-sorting-rtl.css
2 years ago
catalog-sorting-style.asset.php
2 years ago
catalog-sorting-style.js.map
2 years ago
catalog-sorting.asset.php
2 years ago
catalog-sorting.css
2 years ago
catalog-sorting.css.map
2 years ago
catalog-sorting.js
2 years ago
catalog-sorting.js.map
2 years ago
checkout-frontend.asset.php
2 years ago
checkout-frontend.js
2 years ago
checkout-frontend.js.map
2 years ago
checkout-rtl.css
2 years ago
checkout-style.asset.php
2 years ago
checkout-style.js.map
2 years ago
checkout.asset.php
2 years ago
checkout.css
2 years ago
checkout.css.map
2 years ago
checkout.js
2 years ago
checkout.js.map
2 years ago
classic-shortcode-rtl.css
2 years ago
classic-shortcode-style.asset.php
2 years ago
classic-shortcode-style.js.map
2 years ago
classic-shortcode.asset.php
2 years ago
classic-shortcode.css
2 years ago
classic-shortcode.css.map
2 years ago
classic-shortcode.js
2 years ago
classic-shortcode.js.map
2 years ago
collection-active-filters-frontend.asset.php
2 years ago
collection-active-filters-frontend.js
2 years ago
collection-active-filters-frontend.js.map
2 years ago
collection-active-filters-rtl.css
2 years ago
collection-active-filters-style.asset.php
2 years ago
collection-active-filters-style.js.map
2 years ago
collection-active-filters.asset.php
2 years ago
collection-active-filters.css
2 years ago
collection-active-filters.css.map
2 years ago
collection-active-filters.js
2 years ago
collection-active-filters.js.map
2 years ago
collection-attribute-filter-frontend.asset.php
2 years ago
collection-attribute-filter-frontend.js
2 years ago
collection-attribute-filter-frontend.js.map
2 years ago
collection-attribute-filter-rtl.css
2 years ago
collection-attribute-filter-style.asset.php
2 years ago
collection-attribute-filter-style.js.map
2 years ago
collection-attribute-filter.asset.php
2 years ago
collection-attribute-filter.css
2 years ago
collection-attribute-filter.css.map
2 years ago
collection-attribute-filter.js
2 years ago
collection-attribute-filter.js.map
2 years ago
collection-filters-style.asset.php
2 years ago
collection-filters-style.js.map
2 years ago
collection-filters.asset.php
2 years ago
collection-filters.js
2 years ago
collection-filters.js.map
2 years ago
collection-price-filter-frontend.asset.php
2 years ago
collection-price-filter-frontend.js
2 years ago
collection-price-filter-frontend.js.map
2 years ago
collection-price-filter-rtl.css
2 years ago
collection-price-filter-style.asset.php
2 years ago
collection-price-filter-style.js.map
2 years ago
collection-price-filter.asset.php
2 years ago
collection-price-filter.css
2 years ago
collection-price-filter.css.map
2 years ago
collection-price-filter.js
2 years ago
collection-price-filter.js.map
2 years ago
collection-rating-filter-frontend.asset.php
2 years ago
collection-rating-filter-frontend.js
2 years ago
collection-rating-filter-frontend.js.map
2 years ago
collection-rating-filter-rtl.css
2 years ago
collection-rating-filter-style.asset.php
2 years ago
collection-rating-filter-style.js.map
2 years ago
collection-rating-filter.asset.php
2 years ago
collection-rating-filter.css
2 years ago
collection-rating-filter.css.map
2 years ago
collection-rating-filter.js
2 years ago
collection-rating-filter.js.map
2 years ago
collection-stock-filter-frontend.asset.php
2 years ago
collection-stock-filter-frontend.js
2 years ago
collection-stock-filter-frontend.js.map
2 years ago
collection-stock-filter-rtl.css
2 years ago
collection-stock-filter-style.asset.php
2 years ago
collection-stock-filter-style.js.map
2 years ago
collection-stock-filter.asset.php
2 years ago
collection-stock-filter.css
2 years ago
collection-stock-filter.css.map
2 years ago
collection-stock-filter.js
2 years ago
collection-stock-filter.js.map
2 years ago
customer-account-rtl.css
2 years ago
customer-account-style.asset.php
2 years ago
customer-account-style.js.map
2 years ago
customer-account.asset.php
2 years ago
customer-account.css
2 years ago
customer-account.css.map
2 years ago
customer-account.js
2 years ago
customer-account.js.map
2 years ago
featured-category-rtl.css
2 years ago
featured-category-style.asset.php
2 years ago
featured-category-style.js.map
2 years ago
featured-category.asset.php
2 years ago
featured-category.css
2 years ago
featured-category.css.map
2 years ago
featured-category.js
2 years ago
featured-category.js.map
2 years ago
featured-product-rtl.css
2 years ago
featured-product-style.asset.php
2 years ago
featured-product-style.js.map
2 years ago
featured-product.asset.php
2 years ago
featured-product.css
2 years ago
featured-product.css.map
2 years ago
featured-product.js
2 years ago
featured-product.js.map
2 years ago
filter-wrapper-frontend.asset.php
2 years ago
filter-wrapper-frontend.js
2 years ago
filter-wrapper-frontend.js.map
2 years ago
filter-wrapper-rtl.css
2 years ago
filter-wrapper-style.asset.php
2 years ago
filter-wrapper-style.js.map
2 years ago
filter-wrapper.asset.php
2 years ago
filter-wrapper.css
2 years ago
filter-wrapper.css.map
2 years ago
filter-wrapper.js
2 years ago
filter-wrapper.js.map
2 years ago
handpicked-products-style.asset.php
2 years ago
handpicked-products-style.js.map
2 years ago
handpicked-products.asset.php
2 years ago
handpicked-products.js
2 years ago
handpicked-products.js.map
2 years ago
legacy-template-rtl.css
2 years ago
legacy-template-style.asset.php
2 years ago
legacy-template-style.js.map
2 years ago
legacy-template.asset.php
2 years ago
legacy-template.css
2 years ago
legacy-template.css.map
2 years ago
legacy-template.js
2 years ago
legacy-template.js.map
2 years ago
mini-cart-component-frontend.asset.php
2 years ago
mini-cart-component-frontend.js
2 years ago
mini-cart-component-frontend.js.map
2 years ago
mini-cart-contents-rtl.css
2 years ago
mini-cart-contents-style.asset.php
2 years ago
mini-cart-contents-style.js.map
2 years ago
mini-cart-contents.asset.php
2 years ago
mini-cart-contents.css
2 years ago
mini-cart-contents.css.map
2 years ago
mini-cart-contents.js
2 years ago
mini-cart-contents.js.map
2 years ago
mini-cart-frontend.asset.php
2 years ago
mini-cart-frontend.js
2 years ago
mini-cart-frontend.js.map
2 years ago
mini-cart-rtl.css
2 years ago
mini-cart-style.asset.php
2 years ago
mini-cart-style.js.map
2 years ago
mini-cart.asset.php
2 years ago
mini-cart.css
2 years ago
mini-cart.css.map
2 years ago
mini-cart.js
2 years ago
mini-cart.js.map
2 years ago
order-confirmation-additional-information-rtl.css
2 years ago
order-confirmation-additional-information-style.asset.php
2 years ago
order-confirmation-additional-information-style.js.map
2 years ago
order-confirmation-additional-information.asset.php
2 years ago
order-confirmation-additional-information.css
2 years ago
order-confirmation-additional-information.css.map
2 years ago
order-confirmation-additional-information.js
2 years ago
order-confirmation-additional-information.js.map
2 years ago
order-confirmation-billing-address-rtl.css
2 years ago
order-confirmation-billing-address-style.asset.php
2 years ago
order-confirmation-billing-address-style.js.map
2 years ago
order-confirmation-billing-address.asset.php
2 years ago
order-confirmation-billing-address.css
2 years ago
order-confirmation-billing-address.css.map
2 years ago
order-confirmation-billing-address.js
2 years ago
order-confirmation-billing-address.js.map
2 years ago
order-confirmation-billing-wrapper-style.asset.php
2 years ago
order-confirmation-billing-wrapper-style.js.map
2 years ago
order-confirmation-billing-wrapper.asset.php
2 years ago
order-confirmation-billing-wrapper.js
2 years ago
order-confirmation-billing-wrapper.js.map
2 years ago
order-confirmation-downloads-rtl.css
2 years ago
order-confirmation-downloads-style.asset.php
2 years ago
order-confirmation-downloads-style.js.map
2 years ago
order-confirmation-downloads-wrapper-style.asset.php
2 years ago
order-confirmation-downloads-wrapper-style.js.map
2 years ago
order-confirmation-downloads-wrapper.asset.php
2 years ago
order-confirmation-downloads-wrapper.js
2 years ago
order-confirmation-downloads-wrapper.js.map
2 years ago
order-confirmation-downloads.asset.php
2 years ago
order-confirmation-downloads.css
2 years ago
order-confirmation-downloads.css.map
2 years ago
order-confirmation-downloads.js
2 years ago
order-confirmation-downloads.js.map
2 years ago
order-confirmation-shipping-address-rtl.css
2 years ago
order-confirmation-shipping-address-style.asset.php
2 years ago
order-confirmation-shipping-address-style.js.map
2 years ago
order-confirmation-shipping-address.asset.php
2 years ago
order-confirmation-shipping-address.css
2 years ago
order-confirmation-shipping-address.css.map
2 years ago
order-confirmation-shipping-address.js
2 years ago
order-confirmation-shipping-address.js.map
2 years ago
order-confirmation-shipping-wrapper-style.asset.php
2 years ago
order-confirmation-shipping-wrapper-style.js.map
2 years ago
order-confirmation-shipping-wrapper.asset.php
2 years ago
order-confirmation-shipping-wrapper.js
2 years ago
order-confirmation-shipping-wrapper.js.map
2 years ago
order-confirmation-status-rtl.css
2 years ago
order-confirmation-status-style.asset.php
2 years ago
order-confirmation-status-style.js.map
2 years ago
order-confirmation-status.asset.php
2 years ago
order-confirmation-status.css
2 years ago
order-confirmation-status.css.map
2 years ago
order-confirmation-status.js
2 years ago
order-confirmation-status.js.map
2 years ago
order-confirmation-summary-rtl.css
2 years ago
order-confirmation-summary-style.asset.php
2 years ago
order-confirmation-summary-style.js.map
2 years ago
order-confirmation-summary.asset.php
2 years ago
order-confirmation-summary.css
2 years ago
order-confirmation-summary.css.map
2 years ago
order-confirmation-summary.js
2 years ago
order-confirmation-summary.js.map
2 years ago
order-confirmation-totals-rtl.css
2 years ago
order-confirmation-totals-style.asset.php
2 years ago
order-confirmation-totals-style.js.map
2 years ago
order-confirmation-totals-wrapper-style.asset.php
2 years ago
order-confirmation-totals-wrapper-style.js.map
2 years ago
order-confirmation-totals-wrapper.asset.php
2 years ago
order-confirmation-totals-wrapper.js
2 years ago
order-confirmation-totals-wrapper.js.map
2 years ago
order-confirmation-totals.asset.php
2 years ago
order-confirmation-totals.css
2 years ago
order-confirmation-totals.css.map
2 years ago
order-confirmation-totals.js
2 years ago
order-confirmation-totals.js.map
2 years ago
packages-style-rtl.css
2 years ago
packages-style-style.asset.php
2 years ago
packages-style-style.js.map
2 years ago
packages-style.css
2 years ago
packages-style.css.map
2 years ago
page-content-wrapper-style.asset.php
2 years ago
page-content-wrapper-style.js.map
2 years ago
page-content-wrapper.asset.php
2 years ago
page-content-wrapper.js
2 years ago
page-content-wrapper.js.map
2 years ago
price-filter-frontend.asset.php
2 years ago
price-filter-frontend.js
2 years ago
price-filter-frontend.js.map
2 years ago
price-filter-rtl.css
2 years ago
price-filter-style.asset.php
2 years ago
price-filter-style.js.map
2 years ago
price-filter-wrapper-frontend.js
2 years ago
price-filter-wrapper-frontend.js.map
2 years ago
price-filter-wrapper-rtl.css
2 years ago
price-filter-wrapper-style.js.map
2 years ago
price-filter-wrapper.css
2 years ago
price-filter-wrapper.css.map
2 years ago
price-filter.asset.php
2 years ago
price-filter.css
2 years ago
price-filter.css.map
2 years ago
price-filter.js
2 years ago
price-filter.js.map
2 years ago
price-format.asset.php
2 years ago
price-format.js
2 years ago
price-format.js.map
2 years ago
product-add-to-cart-frontend.js
2 years ago
product-add-to-cart-frontend.js.map
2 years ago
product-add-to-cart-rtl.css
2 years ago
product-add-to-cart-style.js.map
2 years ago
product-add-to-cart.css
2 years ago
product-add-to-cart.css.map
2 years ago
product-add-to-cart.js
2 years ago
product-add-to-cart.js.map
2 years ago
product-average-rating-frontend.js
2 years ago
product-average-rating-frontend.js.map
2 years ago
product-average-rating-style.js.map
2 years ago
product-average-rating.js
2 years ago
product-average-rating.js.map
2 years ago
product-best-sellers-style.asset.php
2 years ago
product-best-sellers-style.js.map
2 years ago
product-best-sellers.asset.php
2 years ago
product-best-sellers.js
2 years ago
product-best-sellers.js.map
2 years ago
product-button-frontend.js
2 years ago
product-button-frontend.js.map
2 years ago
product-button-interactivity-frontend.asset.php
2 years ago
product-button-interactivity-frontend.js
2 years ago
product-button-interactivity-frontend.js.map
2 years ago
product-button-rtl.css
2 years ago
product-button-style.js.map
2 years ago
product-button.css
2 years ago
product-button.css.map
2 years ago
product-button.js
2 years ago
product-button.js.map
2 years ago
product-categories-rtl.css
2 years ago
product-categories-style.asset.php
2 years ago
product-categories-style.js.map
2 years ago
product-categories.asset.php
2 years ago
product-categories.css
2 years ago
product-categories.css.map
2 years ago
product-categories.js
2 years ago
product-categories.js.map
2 years ago
product-category-style.asset.php
2 years ago
product-category-style.js.map
2 years ago
product-category.asset.php
2 years ago
product-category.js
2 years ago
product-category.js.map
2 years ago
product-collection-no-results-style.asset.php
2 years ago
product-collection-no-results-style.js.map
2 years ago
product-collection-no-results.asset.php
2 years ago
product-collection-no-results.js
2 years ago
product-collection-no-results.js.map
2 years ago
product-collection-style.asset.php
2 years ago
product-collection-style.js.map
2 years ago
product-collection.asset.php
2 years ago
product-collection.js
2 years ago
product-collection.js.map
2 years ago
product-details-rtl.css
2 years ago
product-details-style.asset.php
2 years ago
product-details-style.js.map
2 years ago
product-details.css
2 years ago
product-details.css.map
2 years ago
product-gallery-frontend.asset.php
2 years ago
product-gallery-frontend.js
2 years ago
product-gallery-frontend.js.map
2 years ago
product-gallery-large-image-frontend.asset.php
2 years ago
product-gallery-large-image-frontend.js
2 years ago
product-gallery-large-image-frontend.js.map
2 years ago
product-gallery-large-image-next-previous-style.asset.php
2 years ago
product-gallery-large-image-next-previous-style.js.map
2 years ago
product-gallery-large-image-next-previous.asset.php
2 years ago
product-gallery-large-image-next-previous.js
2 years ago
product-gallery-large-image-next-previous.js.map
2 years ago
product-gallery-large-image-style.asset.php
2 years ago
product-gallery-large-image-style.js.map
2 years ago
product-gallery-large-image.asset.php
2 years ago
product-gallery-large-image.js
2 years ago
product-gallery-large-image.js.map
2 years ago
product-gallery-pager-style.asset.php
2 years ago
product-gallery-pager-style.js.map
2 years ago
product-gallery-pager.asset.php
2 years ago
product-gallery-pager.js
2 years ago
product-gallery-pager.js.map
2 years ago
product-gallery-rtl.css
2 years ago
product-gallery-style.asset.php
2 years ago
product-gallery-style.js.map
2 years ago
product-gallery-thumbnails-style.asset.php
2 years ago
product-gallery-thumbnails-style.js.map
2 years ago
product-gallery-thumbnails.asset.php
2 years ago
product-gallery-thumbnails.js
2 years ago
product-gallery-thumbnails.js.map
2 years ago
product-gallery.asset.php
2 years ago
product-gallery.css
2 years ago
product-gallery.css.map
2 years ago
product-gallery.js
2 years ago
product-gallery.js.map
2 years ago
product-image-frontend.js
2 years ago
product-image-frontend.js.map
2 years ago
product-image-gallery-rtl.css
2 years ago
product-image-gallery-style.asset.php
2 years ago
product-image-gallery-style.js.map
2 years ago
product-image-gallery.css
2 years ago
product-image-gallery.css.map
2 years ago
product-image-rtl.css
2 years ago
product-image-style.js.map
2 years ago
product-image.css
2 years ago
product-image.css.map
2 years ago
product-image.js
2 years ago
product-image.js.map
2 years ago
product-new-style.asset.php
2 years ago
product-new-style.js.map
2 years ago
product-new.asset.php
2 years ago
product-new.js
2 years ago
product-new.js.map
2 years ago
product-on-sale-style.asset.php
2 years ago
product-on-sale-style.js.map
2 years ago
product-on-sale.asset.php
2 years ago
product-on-sale.js
2 years ago
product-on-sale.js.map
2 years ago
product-price-frontend.js
2 years ago
product-price-frontend.js.map
2 years ago
product-price-rtl.css
2 years ago
product-price-style.js.map
2 years ago
product-price.css
2 years ago
product-price.css.map
2 years ago
product-price.js
2 years ago
product-price.js.map
2 years ago
product-query-rtl.css
2 years ago
product-query-style.asset.php
2 years ago
product-query-style.js.map
2 years ago
product-query.asset.php
2 years ago
product-query.css
2 years ago
product-query.css.map
2 years ago
product-query.js
2 years ago
product-query.js.map
2 years ago
product-rating-counter-frontend.js
2 years ago
product-rating-counter-frontend.js.map
2 years ago
product-rating-counter-style.js.map
2 years ago
product-rating-counter.js
2 years ago
product-rating-counter.js.map
2 years ago
product-rating-frontend.js
2 years ago
product-rating-frontend.js.map
2 years ago
product-rating-rtl.css
2 years ago
product-rating-stars-frontend.js
2 years ago
product-rating-stars-frontend.js.map
2 years ago
product-rating-stars-rtl.css
2 years ago
product-rating-stars-style.js.map
2 years ago
product-rating-stars.css
2 years ago
product-rating-stars.css.map
2 years ago
product-rating-stars.js
2 years ago
product-rating-stars.js.map
2 years ago
product-rating-style.js.map
2 years ago
product-rating.css
2 years ago
product-rating.css.map
2 years ago
product-rating.js
2 years ago
product-rating.js.map
2 years ago
product-results-count-rtl.css
2 years ago
product-results-count-style.asset.php
2 years ago
product-results-count-style.js.map
2 years ago
product-results-count.asset.php
2 years ago
product-results-count.css
2 years ago
product-results-count.css.map
2 years ago
product-results-count.js
2 years ago
product-results-count.js.map
2 years ago
product-reviews-rtl.css
2 years ago
product-reviews-style.asset.php
2 years ago
product-reviews-style.js.map
2 years ago
product-reviews.css
2 years ago
product-reviews.css.map
2 years ago
product-sale-badge-frontend.js
2 years ago
product-sale-badge-frontend.js.map
2 years ago
product-sale-badge-rtl.css
2 years ago
product-sale-badge-style.js.map
2 years ago
product-sale-badge.css
2 years ago
product-sale-badge.css.map
2 years ago
product-sale-badge.js
2 years ago
product-sale-badge.js.map
2 years ago
product-search-rtl.css
2 years ago
product-search-style.asset.php
2 years ago
product-search-style.js.map
2 years ago
product-search.asset.php
2 years ago
product-search.css
2 years ago
product-search.css.map
2 years ago
product-search.js
2 years ago
product-search.js.map
2 years ago
product-sku-frontend.js
2 years ago
product-sku-frontend.js.map
2 years ago
product-sku-rtl.css
2 years ago
product-sku-style.js.map
2 years ago
product-sku.css
2 years ago
product-sku.css.map
2 years ago
product-sku.js
2 years ago
product-sku.js.map
2 years ago
product-stock-indicator-frontend.js
2 years ago
product-stock-indicator-frontend.js.map
2 years ago
product-stock-indicator-rtl.css
2 years ago
product-stock-indicator-style.js.map
2 years ago
product-stock-indicator.css
2 years ago
product-stock-indicator.css.map
2 years ago
product-stock-indicator.js
2 years ago
product-stock-indicator.js.map
2 years ago
product-summary-frontend.js
2 years ago
product-summary-frontend.js.map
2 years ago
product-summary-rtl.css
2 years ago
product-summary-style.js.map
2 years ago
product-summary.css
2 years ago
product-summary.css.map
2 years ago
product-summary.js
2 years ago
product-summary.js.map
2 years ago
product-tag-style.asset.php
2 years ago
product-tag-style.js.map
2 years ago
product-tag.asset.php
2 years ago
product-tag.js
2 years ago
product-tag.js.map
2 years ago
product-template-rtl.css
2 years ago
product-template-style.asset.php
2 years ago
product-template-style.js.map
2 years ago
product-template.asset.php
2 years ago
product-template.css
2 years ago
product-template.css.map
2 years ago
product-template.js
2 years ago
product-template.js.map
2 years ago
product-title-frontend.js
2 years ago
product-title-frontend.js.map
2 years ago
product-title-rtl.css
2 years ago
product-title-style.js.map
2 years ago
product-title.css
2 years ago
product-title.css.map
2 years ago
product-title.js
2 years ago
product-title.js.map
2 years ago
product-top-rated-style.asset.php
2 years ago
product-top-rated-style.js.map
2 years ago
product-top-rated.asset.php
2 years ago
product-top-rated.js
2 years ago
product-top-rated.js.map
2 years ago
products-by-attribute-style.asset.php
2 years ago
products-by-attribute-style.js.map
2 years ago
products-by-attribute.asset.php
2 years ago
products-by-attribute.js
2 years ago
products-by-attribute.js.map
2 years ago
rating-filter-frontend.asset.php
2 years ago
rating-filter-frontend.js
2 years ago
rating-filter-frontend.js.map
2 years ago
rating-filter-rtl.css
2 years ago
rating-filter-style.asset.php
2 years ago
rating-filter-style.js.map
2 years ago
rating-filter-wrapper-frontend.js
2 years ago
rating-filter-wrapper-frontend.js.map
2 years ago
rating-filter-wrapper-rtl.css
2 years ago
rating-filter-wrapper-style.js.map
2 years ago
rating-filter-wrapper.css
2 years ago
rating-filter-wrapper.css.map
2 years ago
rating-filter.asset.php
2 years ago
rating-filter.css
2 years ago
rating-filter.css.map
2 years ago
rating-filter.js
2 years ago
rating-filter.js.map
2 years ago
reviews-by-category-rtl.css
2 years ago
reviews-by-category-style.asset.php
2 years ago
reviews-by-category-style.js.map
2 years ago
reviews-by-category.asset.php
2 years ago
reviews-by-category.css
2 years ago
reviews-by-category.css.map
2 years ago
reviews-by-category.js
2 years ago
reviews-by-category.js.map
2 years ago
reviews-by-product-rtl.css
2 years ago
reviews-by-product-style.asset.php
2 years ago
reviews-by-product-style.js.map
2 years ago
reviews-by-product.asset.php
2 years ago
reviews-by-product.css
2 years ago
reviews-by-product.css.map
2 years ago
reviews-by-product.js
2 years ago
reviews-by-product.js.map
2 years ago
reviews-frontend.asset.php
2 years ago
reviews-frontend.js
2 years ago
reviews-frontend.js.map
2 years ago
single-product-rtl.css
2 years ago
single-product-style.asset.php
2 years ago
single-product-style.js.map
2 years ago
single-product.asset.php
2 years ago
single-product.css
2 years ago
single-product.css.map
2 years ago
single-product.js
2 years ago
single-product.js.map
2 years ago
stock-filter-frontend.asset.php
2 years ago
stock-filter-frontend.js
2 years ago
stock-filter-frontend.js.map
2 years ago
stock-filter-rtl.css
2 years ago
stock-filter-style.asset.php
2 years ago
stock-filter-style.js.map
2 years ago
stock-filter-wrapper-frontend.js
2 years ago
stock-filter-wrapper-frontend.js.map
2 years ago
stock-filter-wrapper-rtl.css
2 years ago
stock-filter-wrapper-style.js.map
2 years ago
stock-filter-wrapper.css
2 years ago
stock-filter-wrapper.css.map
2 years ago
stock-filter.asset.php
2 years ago
stock-filter.css
2 years ago
stock-filter.css.map
2 years ago
stock-filter.js
2 years ago
stock-filter.js.map
2 years ago
store-notices-rtl.css
2 years ago
store-notices-style.asset.php
2 years ago
store-notices-style.js.map
2 years ago
store-notices.asset.php
2 years ago
store-notices.css
2 years ago
store-notices.css.map
2 years ago
store-notices.js
2 years ago
store-notices.js.map
2 years ago
vendors-node_modules_pnpm_dinero_js_1_9_1_node_modules_dinero_js_build_esm_dinero_js-style.js.map
2 years ago
vendors-node_modules_pnpm_param-case_3_0_4_node_modules_param-case_dist_es2015_index_js-style.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-019903-style.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-68c184-style.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-bab841-style.js.map
2 years ago
vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-c6918e-style.js.map
2 years ago
wc-blocks-classic-template-revert-button-style-rtl.css
2 years ago
wc-blocks-classic-template-revert-button-style-style.asset.php
2 years ago
wc-blocks-classic-template-revert-button-style-style.js.map
2 years ago
wc-blocks-classic-template-revert-button-style.css
2 years ago
wc-blocks-classic-template-revert-button-style.css.map
2 years ago
wc-blocks-classic-template-revert-button.asset.php
2 years ago
wc-blocks-classic-template-revert-button.js
2 years ago
wc-blocks-classic-template-revert-button.js.map
2 years ago
wc-blocks-data.asset.php
2 years ago
wc-blocks-data.js
2 years ago
wc-blocks-data.js.map
2 years ago
wc-blocks-editor-style-rtl.css
2 years ago
wc-blocks-editor-style.css
2 years ago
wc-blocks-editor-style.css.map
2 years ago
wc-blocks-google-analytics.asset.php
2 years ago
wc-blocks-google-analytics.js
2 years ago
wc-blocks-google-analytics.js.map
2 years ago
wc-blocks-middleware.asset.php
2 years ago
wc-blocks-middleware.js
2 years ago
wc-blocks-middleware.js.map
2 years ago
wc-blocks-registry.asset.php
2 years ago
wc-blocks-registry.js
2 years ago
wc-blocks-registry.js.map
2 years ago
wc-blocks-rtl.css
2 years ago
wc-blocks-shared-context.asset.php
2 years ago
wc-blocks-shared-context.js
2 years ago
wc-blocks-shared-context.js.map
2 years ago
wc-blocks-shared-hocs.asset.php
2 years ago
wc-blocks-shared-hocs.js
2 years ago
wc-blocks-shared-hocs.js.map
2 years ago
wc-blocks-style.asset.php
2 years ago
wc-blocks-style.js.map
2 years ago
wc-blocks-vendors.asset.php
2 years ago
wc-blocks-vendors.js
2 years ago
wc-blocks-vendors.js.map
2 years ago
wc-blocks.asset.php
2 years ago
wc-blocks.css
2 years ago
wc-blocks.css.map
2 years ago
wc-blocks.js
2 years ago
wc-blocks.js.map
2 years ago
wc-interactivity-checkbox-list-rtl.css
2 years ago
wc-interactivity-checkbox-list-style.asset.php
2 years ago
wc-interactivity-checkbox-list-style.js.map
2 years ago
wc-interactivity-checkbox-list.asset.php
2 years ago
wc-interactivity-checkbox-list.css
2 years ago
wc-interactivity-checkbox-list.css.map
2 years ago
wc-interactivity-checkbox-list.js
2 years ago
wc-interactivity-checkbox-list.js.map
2 years ago
wc-interactivity-dropdown-rtl.css
2 years ago
wc-interactivity-dropdown-style.asset.php
2 years ago
wc-interactivity-dropdown-style.js.map
2 years ago
wc-interactivity-dropdown.asset.php
2 years ago
wc-interactivity-dropdown.css
2 years ago
wc-interactivity-dropdown.css.map
2 years ago
wc-interactivity-dropdown.js
2 years ago
wc-interactivity-dropdown.js.map
2 years ago
wc-interactivity.asset.php
2 years ago
wc-interactivity.js
2 years ago
wc-interactivity.js.map
2 years ago
wc-payment-method-bacs.asset.php
2 years ago
wc-payment-method-bacs.js
2 years ago
wc-payment-method-bacs.js.map
2 years ago
wc-payment-method-cheque.asset.php
2 years ago
wc-payment-method-cheque.js
2 years ago
wc-payment-method-cheque.js.map
2 years ago
wc-payment-method-cod.asset.php
2 years ago
wc-payment-method-cod.js
2 years ago
wc-payment-method-cod.js.map
2 years ago
wc-payment-method-paypal.asset.php
2 years ago
wc-payment-method-paypal.js
2 years ago
wc-payment-method-paypal.js.map
2 years ago
wc-settings.asset.php
2 years ago
wc-settings.js
2 years ago
wc-settings.js.map
2 years ago
wc-shipping-method-pickup-location.asset.php
2 years ago
wc-shipping-method-pickup-location.js
2 years ago
wc-shipping-method-pickup-location.js.map
2 years ago
all-products-frontend.js
3900 lines
| 1 | /******/ (() => { // webpackBootstrap |
| 2 | /******/ var __webpack_modules__ = ({ |
| 3 | |
| 4 | /***/ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js": |
| 5 | /*!*****************************************************************************************************************!*\ |
| 6 | !*** ../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js ***! |
| 7 | \*****************************************************************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 9 | |
| 10 | "use strict"; |
| 11 | __webpack_require__.r(__webpack_exports__); |
| 12 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 14 | /* harmony export */ }); |
| 15 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 16 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 17 | /** |
| 18 | * WordPress dependencies |
| 19 | */ |
| 20 | |
| 21 | |
| 22 | /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ |
| 23 | |
| 24 | /** |
| 25 | * Return an SVG icon. |
| 26 | * |
| 27 | * @param {IconProps} props icon is the SVG component to render |
| 28 | * size is a number specifiying the icon size in pixels |
| 29 | * Other props will be passed to wrapped SVG component |
| 30 | * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. |
| 31 | * |
| 32 | * @return {JSX.Element} Icon component |
| 33 | */ |
| 34 | function Icon({ |
| 35 | icon, |
| 36 | size = 24, |
| 37 | ...props |
| 38 | }, ref) { |
| 39 | return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, { |
| 40 | width: size, |
| 41 | height: size, |
| 42 | ...props, |
| 43 | ref |
| 44 | }); |
| 45 | } |
| 46 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(Icon)); |
| 47 | //# sourceMappingURL=index.js.map |
| 48 | |
| 49 | /***/ }), |
| 50 | |
| 51 | /***/ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/search.js": |
| 52 | /*!*********************************************************************************************************************!*\ |
| 53 | !*** ../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/search.js ***! |
| 54 | \*********************************************************************************************************************/ |
| 55 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 56 | |
| 57 | "use strict"; |
| 58 | __webpack_require__.r(__webpack_exports__); |
| 59 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 60 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 61 | /* harmony export */ }); |
| 62 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 63 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 64 | /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); |
| 65 | /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
| 66 | |
| 67 | /** |
| 68 | * WordPress dependencies |
| 69 | */ |
| 70 | |
| 71 | const search = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { |
| 72 | xmlns: "http://www.w3.org/2000/svg", |
| 73 | viewBox: "0 0 24 24" |
| 74 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { |
| 75 | d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" |
| 76 | })); |
| 77 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (search); |
| 78 | //# sourceMappingURL=search.js.map |
| 79 | |
| 80 | /***/ }), |
| 81 | |
| 82 | /***/ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/warning.js": |
| 83 | /*!**********************************************************************************************************************!*\ |
| 84 | !*** ../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/warning.js ***! |
| 85 | \**********************************************************************************************************************/ |
| 86 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 87 | |
| 88 | "use strict"; |
| 89 | __webpack_require__.r(__webpack_exports__); |
| 90 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 91 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 92 | /* harmony export */ }); |
| 93 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 94 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 95 | /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); |
| 96 | /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
| 97 | |
| 98 | /** |
| 99 | * WordPress dependencies |
| 100 | */ |
| 101 | |
| 102 | const warning = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { |
| 103 | xmlns: "http://www.w3.org/2000/svg", |
| 104 | viewBox: "-2 -2 24 24" |
| 105 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { |
| 106 | d: "M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z" |
| 107 | })); |
| 108 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warning); |
| 109 | //# sourceMappingURL=warning.js.map |
| 110 | |
| 111 | /***/ }), |
| 112 | |
| 113 | /***/ "./assets/js/atomic/blocks/component-init.js": |
| 114 | /*!***************************************************!*\ |
| 115 | !*** ./assets/js/atomic/blocks/component-init.js ***! |
| 116 | \***************************************************/ |
| 117 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 118 | |
| 119 | "use strict"; |
| 120 | __webpack_require__.r(__webpack_exports__); |
| 121 | /* harmony import */ var _woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/blocks-registry */ "@woocommerce/blocks-registry"); |
| 122 | /* harmony import */ var _woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__); |
| 123 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 124 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 125 | /* harmony import */ var _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/block-settings */ "./assets/js/settings/blocks/index.ts"); |
| 126 | /** |
| 127 | * External dependencies |
| 128 | */ |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | // Modify webpack publicPath at runtime based on location of WordPress Plugin. |
| 134 | // eslint-disable-next-line no-undef,camelcase |
| 135 | __webpack_require__.p = _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_2__.WC_BLOCKS_BUILD_URL; |
| 136 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 137 | blockName: 'woocommerce/product-price', |
| 138 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-price */ "product-price").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/price/block */ "./assets/js/atomic/blocks/product-elements/price/block.tsx"))) |
| 139 | }); |
| 140 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 141 | blockName: 'woocommerce/product-image', |
| 142 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-image */ "product-image").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/image/frontend */ "./assets/js/atomic/blocks/product-elements/image/frontend.ts"))) |
| 143 | }); |
| 144 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 145 | blockName: 'woocommerce/product-title', |
| 146 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-title */ "product-title").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/title/frontend */ "./assets/js/atomic/blocks/product-elements/title/frontend.ts"))) |
| 147 | }); |
| 148 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 149 | blockName: 'woocommerce/product-rating', |
| 150 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-rating */ "product-rating").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/rating/block */ "./assets/js/atomic/blocks/product-elements/rating/block.tsx"))) |
| 151 | }); |
| 152 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 153 | blockName: 'woocommerce/product-rating-stars', |
| 154 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-rating-stars */ "product-rating-stars").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/rating-stars/block */ "./assets/js/atomic/blocks/product-elements/rating-stars/block.tsx"))) |
| 155 | }); |
| 156 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 157 | blockName: 'woocommerce/product-rating-counter', |
| 158 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-rating-counter */ "product-rating-counter").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/rating-counter/block */ "./assets/js/atomic/blocks/product-elements/rating-counter/block.tsx"))) |
| 159 | }); |
| 160 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 161 | blockName: 'woocommerce/product-average-rating', |
| 162 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-average-rating */ "product-average-rating").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/average-rating/block */ "./assets/js/atomic/blocks/product-elements/average-rating/block.tsx"))) |
| 163 | }); |
| 164 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 165 | blockName: 'woocommerce/product-button', |
| 166 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-button */ "product-button").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/button/block */ "./assets/js/atomic/blocks/product-elements/button/block.tsx"))) |
| 167 | }); |
| 168 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 169 | blockName: 'woocommerce/product-summary', |
| 170 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-summary */ "product-summary").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/summary/block */ "./assets/js/atomic/blocks/product-elements/summary/block.tsx"))) |
| 171 | }); |
| 172 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 173 | blockName: 'woocommerce/product-sale-badge', |
| 174 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-sale-badge */ "product-sale-badge").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/sale-badge/block */ "./assets/js/atomic/blocks/product-elements/sale-badge/block.tsx"))) |
| 175 | }); |
| 176 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 177 | blockName: 'woocommerce/product-sku', |
| 178 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-sku */ "product-sku").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/sku/block */ "./assets/js/atomic/blocks/product-elements/sku/block.tsx"))) |
| 179 | }); |
| 180 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 181 | blockName: 'woocommerce/product-stock-indicator', |
| 182 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() | product-stock-indicator */ "product-stock-indicator").then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/stock-indicator/block */ "./assets/js/atomic/blocks/product-elements/stock-indicator/block.tsx"))) |
| 183 | }); |
| 184 | (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.registerBlockComponent)({ |
| 185 | blockName: 'woocommerce/product-add-to-cart', |
| 186 | component: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => Promise.all(/*! import() | product-add-to-cart */[__webpack_require__.e("vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e"), __webpack_require__.e("vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f"), __webpack_require__.e("product-add-to-cart")]).then(__webpack_require__.bind(__webpack_require__, /*! ./product-elements/add-to-cart/frontend */ "./assets/js/atomic/blocks/product-elements/add-to-cart/frontend.ts"))) |
| 187 | }); |
| 188 | |
| 189 | /***/ }), |
| 190 | |
| 191 | /***/ "./assets/js/atomic/utils/get-block-map.ts": |
| 192 | /*!*************************************************!*\ |
| 193 | !*** ./assets/js/atomic/utils/get-block-map.ts ***! |
| 194 | \*************************************************/ |
| 195 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 196 | |
| 197 | "use strict"; |
| 198 | __webpack_require__.r(__webpack_exports__); |
| 199 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 200 | /* harmony export */ getBlockMap: () => (/* binding */ getBlockMap) |
| 201 | /* harmony export */ }); |
| 202 | /* harmony import */ var _woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/blocks-registry */ "@woocommerce/blocks-registry"); |
| 203 | /* harmony import */ var _woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__); |
| 204 | /* harmony import */ var _blocks_component_init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../blocks/component-init */ "./assets/js/atomic/blocks/component-init.js"); |
| 205 | /** |
| 206 | * External dependencies |
| 207 | */ |
| 208 | |
| 209 | /** |
| 210 | * Internal dependencies |
| 211 | */ |
| 212 | |
| 213 | |
| 214 | /** |
| 215 | * Map named Blocks to defined React Components to render on the frontend. |
| 216 | * |
| 217 | * @param {string} blockName Name of the parent block. |
| 218 | */ |
| 219 | const getBlockMap = blockName => (0,_woocommerce_blocks_registry__WEBPACK_IMPORTED_MODULE_0__.getRegisteredBlockComponents)(blockName); |
| 220 | |
| 221 | /***/ }), |
| 222 | |
| 223 | /***/ "./assets/js/base/components/block-error-boundary/block-error.tsx": |
| 224 | /*!************************************************************************!*\ |
| 225 | !*** ./assets/js/base/components/block-error-boundary/block-error.tsx ***! |
| 226 | \************************************************************************/ |
| 227 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 228 | |
| 229 | "use strict"; |
| 230 | __webpack_require__.r(__webpack_exports__); |
| 231 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 232 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 233 | /* harmony export */ }); |
| 234 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 235 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 236 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 237 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 238 | /* harmony import */ var _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/block-settings */ "./assets/js/settings/blocks/index.ts"); |
| 239 | |
| 240 | /** |
| 241 | * External dependencies |
| 242 | */ |
| 243 | |
| 244 | |
| 245 | |
| 246 | /** |
| 247 | * Internal dependencies |
| 248 | */ |
| 249 | |
| 250 | const BlockError = ({ |
| 251 | imageUrl = `${_woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_2__.WC_BLOCKS_IMAGE_URL}/block-error.svg`, |
| 252 | header = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Oops!', 'woocommerce'), |
| 253 | text = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('There was an error loading the content.', 'woocommerce'), |
| 254 | errorMessage, |
| 255 | errorMessagePrefix = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Error:', 'woocommerce'), |
| 256 | button, |
| 257 | showErrorBlock = true |
| 258 | }) => { |
| 259 | return showErrorBlock ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 260 | className: "wc-block-error wc-block-components-error" |
| 261 | }, imageUrl && |
| 262 | // The alt text is left empty on purpose, as it's considered a decorative image. |
| 263 | // More can be found here: https://www.w3.org/WAI/tutorials/images/decorative/. |
| 264 | // Github discussion for a context: https://github.com/woocommerce/woocommerce-blocks/pull/7651#discussion_r1019560494. |
| 265 | (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { |
| 266 | className: "wc-block-error__image wc-block-components-error__image", |
| 267 | src: imageUrl, |
| 268 | alt: "" |
| 269 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 270 | className: "wc-block-error__content wc-block-components-error__content" |
| 271 | }, header && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 272 | className: "wc-block-error__header wc-block-components-error__header" |
| 273 | }, header), text && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 274 | className: "wc-block-error__text wc-block-components-error__text" |
| 275 | }, text), errorMessage && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 276 | className: "wc-block-error__message wc-block-components-error__message" |
| 277 | }, errorMessagePrefix ? errorMessagePrefix + ' ' : '', errorMessage), button && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 278 | className: "wc-block-error__button wc-block-components-error__button" |
| 279 | }, button))) : null; |
| 280 | }; |
| 281 | BlockError.__docgenInfo = { |
| 282 | "description": "", |
| 283 | "methods": [], |
| 284 | "displayName": "BlockError", |
| 285 | "props": { |
| 286 | "imageUrl": { |
| 287 | "defaultValue": { |
| 288 | "value": "`${ WC_BLOCKS_IMAGE_URL }/block-error.svg`", |
| 289 | "computed": false |
| 290 | }, |
| 291 | "required": false |
| 292 | }, |
| 293 | "header": { |
| 294 | "defaultValue": { |
| 295 | "value": "__( 'Oops!', 'woocommerce' )", |
| 296 | "computed": true |
| 297 | }, |
| 298 | "required": false |
| 299 | }, |
| 300 | "text": { |
| 301 | "defaultValue": { |
| 302 | "value": "__( 'There was an error loading the content.', 'woocommerce' )", |
| 303 | "computed": true |
| 304 | }, |
| 305 | "required": false |
| 306 | }, |
| 307 | "errorMessagePrefix": { |
| 308 | "defaultValue": { |
| 309 | "value": "__( 'Error:', 'woocommerce' )", |
| 310 | "computed": true |
| 311 | }, |
| 312 | "required": false |
| 313 | }, |
| 314 | "showErrorBlock": { |
| 315 | "defaultValue": { |
| 316 | "value": "true", |
| 317 | "computed": false |
| 318 | }, |
| 319 | "required": false |
| 320 | } |
| 321 | } |
| 322 | }; |
| 323 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockError); |
| 324 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 325 | STORYBOOK_REACT_CLASSES["assets/js/base/components/block-error-boundary/block-error.tsx"] = { |
| 326 | name: "BlockError", |
| 327 | docgenInfo: BlockError.__docgenInfo, |
| 328 | path: "assets/js/base/components/block-error-boundary/block-error.tsx" |
| 329 | }; |
| 330 | } |
| 331 | |
| 332 | /***/ }), |
| 333 | |
| 334 | /***/ "./assets/js/base/components/block-error-boundary/index.tsx": |
| 335 | /*!******************************************************************!*\ |
| 336 | !*** ./assets/js/base/components/block-error-boundary/index.tsx ***! |
| 337 | \******************************************************************/ |
| 338 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 339 | |
| 340 | "use strict"; |
| 341 | __webpack_require__.r(__webpack_exports__); |
| 342 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 343 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 344 | /* harmony export */ }); |
| 345 | /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js"); |
| 346 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 347 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 348 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 349 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); |
| 350 | /* harmony import */ var _block_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block-error */ "./assets/js/base/components/block-error-boundary/block-error.tsx"); |
| 351 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/components/block-error-boundary/style.scss"); |
| 352 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_4__); |
| 353 | |
| 354 | |
| 355 | /** |
| 356 | * External dependencies |
| 357 | */ |
| 358 | |
| 359 | |
| 360 | /** |
| 361 | * Internal dependencies |
| 362 | */ |
| 363 | |
| 364 | |
| 365 | class BlockErrorBoundary extends _wordpress_element__WEBPACK_IMPORTED_MODULE_2__.Component { |
| 366 | constructor(...args) { |
| 367 | super(...args); |
| 368 | (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "state", { |
| 369 | errorMessage: '', |
| 370 | hasError: false |
| 371 | }); |
| 372 | } |
| 373 | static getDerivedStateFromError(error) { |
| 374 | if (typeof error.statusText !== 'undefined' && typeof error.status !== 'undefined') { |
| 375 | return { |
| 376 | errorMessage: (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("strong", null, error.status), ":\xA0", error.statusText), |
| 377 | hasError: true |
| 378 | }; |
| 379 | } |
| 380 | return { |
| 381 | errorMessage: error.message, |
| 382 | hasError: true |
| 383 | }; |
| 384 | } |
| 385 | render() { |
| 386 | const { |
| 387 | header, |
| 388 | imageUrl, |
| 389 | showErrorMessage = true, |
| 390 | showErrorBlock = true, |
| 391 | text, |
| 392 | errorMessagePrefix, |
| 393 | renderError, |
| 394 | button |
| 395 | } = this.props; |
| 396 | const { |
| 397 | errorMessage, |
| 398 | hasError |
| 399 | } = this.state; |
| 400 | if (hasError) { |
| 401 | if (typeof renderError === 'function') { |
| 402 | return renderError({ |
| 403 | errorMessage |
| 404 | }); |
| 405 | } |
| 406 | return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_block_error__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 407 | showErrorBlock: showErrorBlock, |
| 408 | errorMessage: showErrorMessage ? errorMessage : null, |
| 409 | header: header, |
| 410 | imageUrl: imageUrl, |
| 411 | text: text, |
| 412 | errorMessagePrefix: errorMessagePrefix, |
| 413 | button: button |
| 414 | }); |
| 415 | } |
| 416 | return this.props.children; |
| 417 | } |
| 418 | } |
| 419 | BlockErrorBoundary.__docgenInfo = { |
| 420 | "description": "", |
| 421 | "methods": [], |
| 422 | "displayName": "BlockErrorBoundary" |
| 423 | }; |
| 424 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockErrorBoundary); |
| 425 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 426 | STORYBOOK_REACT_CLASSES["assets/js/base/components/block-error-boundary/index.tsx"] = { |
| 427 | name: "BlockErrorBoundary", |
| 428 | docgenInfo: BlockErrorBoundary.__docgenInfo, |
| 429 | path: "assets/js/base/components/block-error-boundary/index.tsx" |
| 430 | }; |
| 431 | } |
| 432 | |
| 433 | /***/ }), |
| 434 | |
| 435 | /***/ "./assets/js/base/components/pagination/index.tsx": |
| 436 | /*!********************************************************!*\ |
| 437 | !*** ./assets/js/base/components/pagination/index.tsx ***! |
| 438 | \********************************************************/ |
| 439 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 440 | |
| 441 | "use strict"; |
| 442 | __webpack_require__.r(__webpack_exports__); |
| 443 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 444 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 445 | /* harmony export */ }); |
| 446 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 447 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 448 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 449 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 450 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js"); |
| 451 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); |
| 452 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/blocks-components */ "@woocommerce/blocks-components"); |
| 453 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__); |
| 454 | /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./assets/js/base/components/pagination/utils.ts"); |
| 455 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/components/pagination/style.scss"); |
| 456 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_5__); |
| 457 | |
| 458 | /** |
| 459 | * External dependencies |
| 460 | */ |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | /** |
| 466 | * Internal dependencies |
| 467 | */ |
| 468 | |
| 469 | |
| 470 | const Pagination = ({ |
| 471 | currentPage, |
| 472 | displayFirstAndLastPages = true, |
| 473 | displayNextAndPreviousArrows = true, |
| 474 | pagesToDisplay = 3, |
| 475 | onPageChange, |
| 476 | totalPages |
| 477 | }) => { |
| 478 | let { |
| 479 | minIndex, |
| 480 | maxIndex |
| 481 | } = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.getIndexes)(pagesToDisplay, currentPage, totalPages); |
| 482 | const showFirstPage = displayFirstAndLastPages && Boolean(minIndex !== 1); |
| 483 | const showLastPage = displayFirstAndLastPages && Boolean(maxIndex !== totalPages); |
| 484 | const showFirstPageEllipsis = displayFirstAndLastPages && Boolean(minIndex && minIndex > 3); |
| 485 | const showLastPageEllipsis = displayFirstAndLastPages && Boolean(maxIndex && maxIndex < totalPages - 2); |
| 486 | |
| 487 | // Handle the cases where there would be an ellipsis replacing one single page |
| 488 | if (showFirstPage && minIndex === 3) { |
| 489 | minIndex = minIndex - 1; |
| 490 | } |
| 491 | if (showLastPage && maxIndex === totalPages - 2) { |
| 492 | maxIndex = maxIndex + 1; |
| 493 | } |
| 494 | const pages = []; |
| 495 | if (minIndex && maxIndex) { |
| 496 | for (let i = minIndex; i <= maxIndex; i++) { |
| 497 | pages.push(i); |
| 498 | } |
| 499 | } |
| 500 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 501 | className: "wc-block-pagination wc-block-components-pagination" |
| 502 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 503 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Navigate to another page', 'woocommerce') |
| 504 | }), displayNextAndPreviousArrows && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 505 | className: "wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow", |
| 506 | onClick: () => onPageChange(currentPage - 1), |
| 507 | title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Previous page', 'woocommerce'), |
| 508 | disabled: currentPage <= 1 |
| 509 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 510 | label: "\u2190", |
| 511 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Previous page', 'woocommerce') |
| 512 | })), showFirstPage && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 513 | className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('wc-block-pagination-page', 'wc-block-components-pagination__page', { |
| 514 | 'wc-block-pagination-page--active': currentPage === 1, |
| 515 | 'wc-block-components-pagination__page--active': currentPage === 1 |
| 516 | }), |
| 517 | onClick: () => onPageChange(1), |
| 518 | disabled: currentPage === 1 |
| 519 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 520 | label: '1', |
| 521 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ |
| 522 | (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Page %d', 'woocommerce'), 1) |
| 523 | })), showFirstPageEllipsis && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { |
| 524 | className: "wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis", |
| 525 | "aria-hidden": "true" |
| 526 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('…', 'woocommerce')), pages.map(page => { |
| 527 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 528 | key: page, |
| 529 | className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('wc-block-pagination-page', 'wc-block-components-pagination__page', { |
| 530 | 'wc-block-pagination-page--active': currentPage === page, |
| 531 | 'wc-block-components-pagination__page--active': currentPage === page |
| 532 | }), |
| 533 | onClick: currentPage === page ? undefined : () => onPageChange(page), |
| 534 | disabled: currentPage === page |
| 535 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 536 | label: page.toString(), |
| 537 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ |
| 538 | (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Page %d', 'woocommerce'), page) |
| 539 | })); |
| 540 | }), showLastPageEllipsis && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { |
| 541 | className: "wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis", |
| 542 | "aria-hidden": "true" |
| 543 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('…', 'woocommerce')), showLastPage && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 544 | className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('wc-block-pagination-page', 'wc-block-components-pagination__page', { |
| 545 | 'wc-block-pagination-page--active': currentPage === totalPages, |
| 546 | 'wc-block-components-pagination__page--active': currentPage === totalPages |
| 547 | }), |
| 548 | onClick: () => onPageChange(totalPages), |
| 549 | disabled: currentPage === totalPages |
| 550 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 551 | label: totalPages.toString(), |
| 552 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the page number (1, 2, 3...). */ |
| 553 | (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Page %d', 'woocommerce'), totalPages) |
| 554 | })), displayNextAndPreviousArrows && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 555 | className: "wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow", |
| 556 | onClick: () => onPageChange(currentPage + 1), |
| 557 | title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Next page', 'woocommerce'), |
| 558 | disabled: currentPage >= totalPages |
| 559 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_3__.Label, { |
| 560 | label: "\u2192", |
| 561 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Next page', 'woocommerce') |
| 562 | }))); |
| 563 | }; |
| 564 | Pagination.__docgenInfo = { |
| 565 | "description": "", |
| 566 | "methods": [], |
| 567 | "displayName": "Pagination", |
| 568 | "props": { |
| 569 | "displayFirstAndLastPages": { |
| 570 | "defaultValue": { |
| 571 | "value": "true", |
| 572 | "computed": false |
| 573 | }, |
| 574 | "required": false, |
| 575 | "tsType": { |
| 576 | "name": "boolean" |
| 577 | }, |
| 578 | "description": "Displays first and last pages if they are not in the current range of pages displayed." |
| 579 | }, |
| 580 | "displayNextAndPreviousArrows": { |
| 581 | "defaultValue": { |
| 582 | "value": "true", |
| 583 | "computed": false |
| 584 | }, |
| 585 | "required": false, |
| 586 | "tsType": { |
| 587 | "name": "boolean" |
| 588 | }, |
| 589 | "description": "Displays arrows to navigate to the previous and next pages." |
| 590 | }, |
| 591 | "pagesToDisplay": { |
| 592 | "defaultValue": { |
| 593 | "value": "3", |
| 594 | "computed": false |
| 595 | }, |
| 596 | "required": false, |
| 597 | "tsType": { |
| 598 | "name": "number" |
| 599 | }, |
| 600 | "description": "Number of pages to display at the same time, including the active page\nand the pages displayed before and after it. It doesn't include the first\nand last pages." |
| 601 | }, |
| 602 | "currentPage": { |
| 603 | "required": true, |
| 604 | "tsType": { |
| 605 | "name": "number" |
| 606 | }, |
| 607 | "description": "Number of the page currently being displayed." |
| 608 | }, |
| 609 | "totalPages": { |
| 610 | "required": true, |
| 611 | "tsType": { |
| 612 | "name": "number" |
| 613 | }, |
| 614 | "description": "Total number of pages." |
| 615 | }, |
| 616 | "onPageChange": { |
| 617 | "required": true, |
| 618 | "tsType": { |
| 619 | "name": "signature", |
| 620 | "type": "function", |
| 621 | "raw": "( currentPage: number ) => void", |
| 622 | "signature": { |
| 623 | "arguments": [{ |
| 624 | "name": "currentPage", |
| 625 | "type": { |
| 626 | "name": "number" |
| 627 | } |
| 628 | }], |
| 629 | "return": { |
| 630 | "name": "void" |
| 631 | } |
| 632 | } |
| 633 | }, |
| 634 | "description": "Callback function called when the user triggers a page change." |
| 635 | } |
| 636 | } |
| 637 | }; |
| 638 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Pagination); |
| 639 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 640 | STORYBOOK_REACT_CLASSES["assets/js/base/components/pagination/index.tsx"] = { |
| 641 | name: "Pagination", |
| 642 | docgenInfo: Pagination.__docgenInfo, |
| 643 | path: "assets/js/base/components/pagination/index.tsx" |
| 644 | }; |
| 645 | } |
| 646 | |
| 647 | /***/ }), |
| 648 | |
| 649 | /***/ "./assets/js/base/components/pagination/utils.ts": |
| 650 | /*!*******************************************************!*\ |
| 651 | !*** ./assets/js/base/components/pagination/utils.ts ***! |
| 652 | \*******************************************************/ |
| 653 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 654 | |
| 655 | "use strict"; |
| 656 | __webpack_require__.r(__webpack_exports__); |
| 657 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 658 | /* harmony export */ getIndexes: () => (/* binding */ getIndexes) |
| 659 | /* harmony export */ }); |
| 660 | /** |
| 661 | * Given the number of pages to display, the current page and the total pages, |
| 662 | * returns the min and max index of the pages to display in the pagination component. |
| 663 | * |
| 664 | * @param {number} pagesToDisplay Maximum number of pages to display in the pagination component. |
| 665 | * @param {number} currentPage Page currently visible. |
| 666 | * @param {number} totalPages Total pages available. |
| 667 | * @return {Object} Object containing the min and max index to display in the pagination component. |
| 668 | */ |
| 669 | |
| 670 | const getIndexes = (pagesToDisplay, currentPage, totalPages) => { |
| 671 | if (totalPages <= 2) { |
| 672 | return { |
| 673 | minIndex: null, |
| 674 | maxIndex: null |
| 675 | }; |
| 676 | } |
| 677 | const extraPagesToDisplay = pagesToDisplay - 1; |
| 678 | const tentativeMinIndex = Math.max(Math.floor(currentPage - extraPagesToDisplay / 2), 2); |
| 679 | const maxIndex = Math.min(Math.ceil(currentPage + (extraPagesToDisplay - (currentPage - tentativeMinIndex))), totalPages - 1); |
| 680 | const minIndex = Math.max(Math.floor(currentPage - (extraPagesToDisplay - (maxIndex - currentPage))), 2); |
| 681 | return { |
| 682 | minIndex, |
| 683 | maxIndex |
| 684 | }; |
| 685 | }; |
| 686 | |
| 687 | /***/ }), |
| 688 | |
| 689 | /***/ "./assets/js/base/components/product-list/container.tsx": |
| 690 | /*!**************************************************************!*\ |
| 691 | !*** ./assets/js/base/components/product-list/container.tsx ***! |
| 692 | \**************************************************************/ |
| 693 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 694 | |
| 695 | "use strict"; |
| 696 | __webpack_require__.r(__webpack_exports__); |
| 697 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 698 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 699 | /* harmony export */ }); |
| 700 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 701 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 702 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 703 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 704 | /* harmony import */ var _product_list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./product-list */ "./assets/js/base/components/product-list/product-list.tsx"); |
| 705 | |
| 706 | /** |
| 707 | * External dependencies |
| 708 | */ |
| 709 | |
| 710 | /** |
| 711 | * Internal dependencies |
| 712 | */ |
| 713 | |
| 714 | const ProductListContainer = ({ |
| 715 | attributes |
| 716 | }) => { |
| 717 | const [currentPage, setPage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(1); |
| 718 | const [currentSort, setSort] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(attributes.orderby); |
| 719 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 720 | // if default sort is changed in editor |
| 721 | setSort(attributes.orderby); |
| 722 | }, [attributes.orderby]); |
| 723 | const onPageChange = newPage => { |
| 724 | setPage(newPage); |
| 725 | }; |
| 726 | const onSortChange = event => { |
| 727 | var _event$target; |
| 728 | const newSortValue = event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value; |
| 729 | setSort(newSortValue); |
| 730 | setPage(1); |
| 731 | }; |
| 732 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_product_list__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 733 | attributes: attributes, |
| 734 | currentPage: currentPage, |
| 735 | onPageChange: onPageChange, |
| 736 | onSortChange: onSortChange, |
| 737 | sortValue: currentSort |
| 738 | }); |
| 739 | }; |
| 740 | ProductListContainer.__docgenInfo = { |
| 741 | "description": "", |
| 742 | "methods": [], |
| 743 | "displayName": "ProductListContainer" |
| 744 | }; |
| 745 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductListContainer); |
| 746 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 747 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/container.tsx"] = { |
| 748 | name: "ProductListContainer", |
| 749 | docgenInfo: ProductListContainer.__docgenInfo, |
| 750 | path: "assets/js/base/components/product-list/container.tsx" |
| 751 | }; |
| 752 | } |
| 753 | |
| 754 | /***/ }), |
| 755 | |
| 756 | /***/ "./assets/js/base/components/product-list/index.ts": |
| 757 | /*!*********************************************************!*\ |
| 758 | !*** ./assets/js/base/components/product-list/index.ts ***! |
| 759 | \*********************************************************/ |
| 760 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 761 | |
| 762 | "use strict"; |
| 763 | __webpack_require__.r(__webpack_exports__); |
| 764 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 765 | /* harmony export */ ProductList: () => (/* reexport safe */ _product_list__WEBPACK_IMPORTED_MODULE_0__["default"]), |
| 766 | /* harmony export */ ProductListContainer: () => (/* reexport safe */ _container__WEBPACK_IMPORTED_MODULE_1__["default"]) |
| 767 | /* harmony export */ }); |
| 768 | /* harmony import */ var _product_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./product-list */ "./assets/js/base/components/product-list/product-list.tsx"); |
| 769 | /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./assets/js/base/components/product-list/container.tsx"); |
| 770 | |
| 771 | |
| 772 | |
| 773 | /***/ }), |
| 774 | |
| 775 | /***/ "./assets/js/base/components/product-list/no-matching-products.tsx": |
| 776 | /*!*************************************************************************!*\ |
| 777 | !*** ./assets/js/base/components/product-list/no-matching-products.tsx ***! |
| 778 | \*************************************************************************/ |
| 779 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 780 | |
| 781 | "use strict"; |
| 782 | __webpack_require__.r(__webpack_exports__); |
| 783 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 784 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 785 | /* harmony export */ }); |
| 786 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 787 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 788 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 789 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 790 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/shared-context */ "@woocommerce/shared-context"); |
| 791 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__); |
| 792 | /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js"); |
| 793 | /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/search.js"); |
| 794 | |
| 795 | /** |
| 796 | * External dependencies |
| 797 | */ |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | /** |
| 803 | * Internal dependencies |
| 804 | */ |
| 805 | |
| 806 | const NoMatchingProducts = ({ |
| 807 | resetCallback = () => void 0 |
| 808 | }) => { |
| 809 | const { |
| 810 | parentClassName |
| 811 | } = (0,_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__.useInnerBlockLayoutContext)(); |
| 812 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 813 | className: `${parentClassName}__no-products` |
| 814 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 815 | className: `${parentClassName}__no-products-image`, |
| 816 | icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], |
| 817 | size: 100 |
| 818 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", { |
| 819 | className: `${parentClassName}__no-products-title` |
| 820 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No products found', 'woocommerce')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 821 | className: `${parentClassName}__no-products-description` |
| 822 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('We were unable to find any results based on your search.', 'woocommerce')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { |
| 823 | onClick: resetCallback |
| 824 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Reset Search', 'woocommerce'))); |
| 825 | }; |
| 826 | NoMatchingProducts.__docgenInfo = { |
| 827 | "description": "", |
| 828 | "methods": [], |
| 829 | "displayName": "NoMatchingProducts", |
| 830 | "props": { |
| 831 | "resetCallback": { |
| 832 | "defaultValue": { |
| 833 | "value": "() => void 0", |
| 834 | "computed": false |
| 835 | }, |
| 836 | "required": false |
| 837 | } |
| 838 | } |
| 839 | }; |
| 840 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NoMatchingProducts); |
| 841 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 842 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/no-matching-products.tsx"] = { |
| 843 | name: "NoMatchingProducts", |
| 844 | docgenInfo: NoMatchingProducts.__docgenInfo, |
| 845 | path: "assets/js/base/components/product-list/no-matching-products.tsx" |
| 846 | }; |
| 847 | } |
| 848 | |
| 849 | /***/ }), |
| 850 | |
| 851 | /***/ "./assets/js/base/components/product-list/no-products.tsx": |
| 852 | /*!****************************************************************!*\ |
| 853 | !*** ./assets/js/base/components/product-list/no-products.tsx ***! |
| 854 | \****************************************************************/ |
| 855 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 856 | |
| 857 | "use strict"; |
| 858 | __webpack_require__.r(__webpack_exports__); |
| 859 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 860 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 861 | /* harmony export */ }); |
| 862 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 863 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 864 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 865 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 866 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/shared-context */ "@woocommerce/shared-context"); |
| 867 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__); |
| 868 | /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js"); |
| 869 | /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/warning.js"); |
| 870 | |
| 871 | /** |
| 872 | * External dependencies |
| 873 | */ |
| 874 | |
| 875 | |
| 876 | |
| 877 | const NoProducts = () => { |
| 878 | const { |
| 879 | parentClassName |
| 880 | } = (0,_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__.useInnerBlockLayoutContext)(); |
| 881 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 882 | className: `${parentClassName}__no-products` |
| 883 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 884 | className: `${parentClassName}__no-products-image`, |
| 885 | icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], |
| 886 | size: 100 |
| 887 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", { |
| 888 | className: `${parentClassName}__no-products-title` |
| 889 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No products', 'woocommerce')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { |
| 890 | className: `${parentClassName}__no-products-description` |
| 891 | }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('There are currently no products available to display.', 'woocommerce'))); |
| 892 | }; |
| 893 | NoProducts.__docgenInfo = { |
| 894 | "description": "", |
| 895 | "methods": [], |
| 896 | "displayName": "NoProducts" |
| 897 | }; |
| 898 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NoProducts); |
| 899 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 900 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/no-products.tsx"] = { |
| 901 | name: "NoProducts", |
| 902 | docgenInfo: NoProducts.__docgenInfo, |
| 903 | path: "assets/js/base/components/product-list/no-products.tsx" |
| 904 | }; |
| 905 | } |
| 906 | |
| 907 | /***/ }), |
| 908 | |
| 909 | /***/ "./assets/js/base/components/product-list/product-list-item/index.tsx": |
| 910 | /*!****************************************************************************!*\ |
| 911 | !*** ./assets/js/base/components/product-list/product-list-item/index.tsx ***! |
| 912 | \****************************************************************************/ |
| 913 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 914 | |
| 915 | "use strict"; |
| 916 | __webpack_require__.r(__webpack_exports__); |
| 917 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 918 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 919 | /* harmony export */ }); |
| 920 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 921 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 922 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js"); |
| 923 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); |
| 924 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/shared-context */ "@woocommerce/shared-context"); |
| 925 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__); |
| 926 | /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); |
| 927 | /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); |
| 928 | /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./assets/js/base/components/product-list/product-list-item/utils.tsx"); |
| 929 | |
| 930 | /** |
| 931 | * External dependencies |
| 932 | */ |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | /** |
| 938 | * Internal dependencies |
| 939 | */ |
| 940 | |
| 941 | const ProductListItem = ({ |
| 942 | product = {}, |
| 943 | attributes, |
| 944 | instanceId |
| 945 | }) => { |
| 946 | const { |
| 947 | layoutConfig |
| 948 | } = attributes; |
| 949 | const { |
| 950 | parentClassName, |
| 951 | parentName |
| 952 | } = (0,_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_2__.useInnerBlockLayoutContext)(); |
| 953 | const isLoading = Object.keys(product).length === 0; |
| 954 | const classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(`${parentClassName}__product`, 'wc-block-layout', { |
| 955 | 'is-loading': isLoading |
| 956 | }); |
| 957 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { |
| 958 | className: classes, |
| 959 | "aria-hidden": isLoading |
| 960 | }, (0,_utils__WEBPACK_IMPORTED_MODULE_4__.renderProductLayout)(parentName, product, layoutConfig, instanceId)); |
| 961 | }; |
| 962 | ProductListItem.__docgenInfo = { |
| 963 | "description": "", |
| 964 | "methods": [], |
| 965 | "displayName": "ProductListItem", |
| 966 | "props": { |
| 967 | "product": { |
| 968 | "defaultValue": { |
| 969 | "value": "{}", |
| 970 | "computed": false |
| 971 | }, |
| 972 | "required": false |
| 973 | } |
| 974 | } |
| 975 | }; |
| 976 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__.withInstanceId)(ProductListItem)); |
| 977 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 978 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/product-list-item/index.tsx"] = { |
| 979 | name: "ProductListItem", |
| 980 | docgenInfo: ProductListItem.__docgenInfo, |
| 981 | path: "assets/js/base/components/product-list/product-list-item/index.tsx" |
| 982 | }; |
| 983 | } |
| 984 | |
| 985 | /***/ }), |
| 986 | |
| 987 | /***/ "./assets/js/base/components/product-list/product-list-item/utils.tsx": |
| 988 | /*!****************************************************************************!*\ |
| 989 | !*** ./assets/js/base/components/product-list/product-list-item/utils.tsx ***! |
| 990 | \****************************************************************************/ |
| 991 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 992 | |
| 993 | "use strict"; |
| 994 | __webpack_require__.r(__webpack_exports__); |
| 995 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 996 | /* harmony export */ renderProductLayout: () => (/* binding */ renderProductLayout) |
| 997 | /* harmony export */ }); |
| 998 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 999 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1000 | /* harmony import */ var _woocommerce_atomic_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/atomic-utils */ "./assets/js/atomic/utils/get-block-map.ts"); |
| 1001 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1002 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 1003 | |
| 1004 | /** |
| 1005 | * External dependencies |
| 1006 | */ |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | /** |
| 1011 | * Internal dependencies |
| 1012 | */ |
| 1013 | |
| 1014 | /** |
| 1015 | * Maps a layout config into atomic components. |
| 1016 | * |
| 1017 | * @param {string} blockName Name of the parent block. Used to get extension children. |
| 1018 | * @param {Object} product Product object to pass to atomic components. |
| 1019 | * @param {Object[]} layoutConfig Object with component data. |
| 1020 | * @param {number} componentId Parent component ID needed for key generation. |
| 1021 | */ |
| 1022 | const renderProductLayout = (blockName, product, layoutConfig, componentId) => { |
| 1023 | if (!layoutConfig) { |
| 1024 | return; |
| 1025 | } |
| 1026 | const blockMap = (0,_woocommerce_atomic_utils__WEBPACK_IMPORTED_MODULE_2__.getBlockMap)(blockName); |
| 1027 | return layoutConfig.map(([name, props = {}], index) => { |
| 1028 | let children = []; |
| 1029 | if (!!props.children && props.children.length > 0) { |
| 1030 | // props.children here refers to the children stored in the block attributes. which |
| 1031 | // has the same shape as `layoutConfig`, not React children, which has a different shape */ |
| 1032 | children = renderProductLayout(blockName, product, props.children, componentId); |
| 1033 | } |
| 1034 | const LayoutComponent = blockMap[name]; |
| 1035 | if (!LayoutComponent) { |
| 1036 | return null; |
| 1037 | } |
| 1038 | const productID = product.id || 0; |
| 1039 | const keyParts = ['layout', name, index, componentId, productID]; |
| 1040 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Suspense, { |
| 1041 | key: keyParts.join('_'), |
| 1042 | fallback: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 1043 | className: "wc-block-placeholder" |
| 1044 | }) |
| 1045 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(LayoutComponent, { |
| 1046 | ...props, |
| 1047 | children: children, |
| 1048 | product: product |
| 1049 | })); |
| 1050 | }); |
| 1051 | }; |
| 1052 | |
| 1053 | /***/ }), |
| 1054 | |
| 1055 | /***/ "./assets/js/base/components/product-list/product-list.tsx": |
| 1056 | /*!*****************************************************************!*\ |
| 1057 | !*** ./assets/js/base/components/product-list/product-list.tsx ***! |
| 1058 | \*****************************************************************/ |
| 1059 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1060 | |
| 1061 | "use strict"; |
| 1062 | __webpack_require__.r(__webpack_exports__); |
| 1063 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1064 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1065 | /* harmony export */ }); |
| 1066 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1067 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1068 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1069 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 1070 | /* harmony import */ var fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fast-deep-equal/es6 */ "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js"); |
| 1071 | /* harmony import */ var fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2__); |
| 1072 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js"); |
| 1073 | /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); |
| 1074 | /* harmony import */ var _woocommerce_base_components_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/base-components/pagination */ "./assets/js/base/components/pagination/index.tsx"); |
| 1075 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1076 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); |
| 1077 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-previous.ts"); |
| 1078 | /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/use-query-state.js"); |
| 1079 | /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/use-store-products.ts"); |
| 1080 | /* harmony import */ var _woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @woocommerce/base-context/hooks */ "./assets/js/base/context/hooks/use-store-events.ts"); |
| 1081 | /* harmony import */ var _woocommerce_base_hocs_with_scroll_to_top__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @woocommerce/base-hocs/with-scroll-to-top */ "./assets/js/base/hocs/with-scroll-to-top/index.tsx"); |
| 1082 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/shared-context */ "@woocommerce/shared-context"); |
| 1083 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_6__); |
| 1084 | /* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/a11y */ "@wordpress/a11y"); |
| 1085 | /* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_7__); |
| 1086 | /* harmony import */ var _no_products__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./no-products */ "./assets/js/base/components/product-list/no-products.tsx"); |
| 1087 | /* harmony import */ var _no_matching_products__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./no-matching-products */ "./assets/js/base/components/product-list/no-matching-products.tsx"); |
| 1088 | /* harmony import */ var _product_sort_select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./product-sort-select */ "./assets/js/base/components/product-list/product-sort-select/index.tsx"); |
| 1089 | /* harmony import */ var _product_list_item__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./product-list-item */ "./assets/js/base/components/product-list/product-list-item/index.tsx"); |
| 1090 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/components/product-list/style.scss"); |
| 1091 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__); |
| 1092 | |
| 1093 | /** |
| 1094 | * External dependencies |
| 1095 | */ |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | /** |
| 1108 | * Internal dependencies |
| 1109 | */ |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | const getSortArgs = orderName => { |
| 1116 | switch (orderName) { |
| 1117 | case 'menu_order': |
| 1118 | case 'popularity': |
| 1119 | case 'rating': |
| 1120 | case 'price': |
| 1121 | return { |
| 1122 | orderby: orderName, |
| 1123 | order: 'asc' |
| 1124 | }; |
| 1125 | case 'price-desc': |
| 1126 | return { |
| 1127 | orderby: 'price', |
| 1128 | order: 'desc' |
| 1129 | }; |
| 1130 | case 'date': |
| 1131 | return { |
| 1132 | orderby: 'date', |
| 1133 | order: 'desc' |
| 1134 | }; |
| 1135 | } |
| 1136 | }; |
| 1137 | const generateQuery = ({ |
| 1138 | sortValue, |
| 1139 | currentPage, |
| 1140 | attributes |
| 1141 | }) => { |
| 1142 | const { |
| 1143 | columns, |
| 1144 | rows |
| 1145 | } = attributes; |
| 1146 | return { |
| 1147 | ...getSortArgs(sortValue), |
| 1148 | catalog_visibility: 'catalog', |
| 1149 | per_page: columns * rows, |
| 1150 | page: currentPage |
| 1151 | }; |
| 1152 | }; |
| 1153 | |
| 1154 | /** |
| 1155 | * Given a query state, returns the same query without the attributes related to |
| 1156 | * pagination and sorting. |
| 1157 | * |
| 1158 | * @param {Object} query Query to extract the attributes from. |
| 1159 | * |
| 1160 | * @return {Object} Same query without pagination and sorting attributes. |
| 1161 | */ |
| 1162 | |
| 1163 | const extractPaginationAndSortAttributes = query => { |
| 1164 | /* eslint-disable-next-line no-unused-vars */ |
| 1165 | const { |
| 1166 | order, |
| 1167 | orderby, |
| 1168 | page, |
| 1169 | per_page: perPage, |
| 1170 | ...totalQuery |
| 1171 | } = query; |
| 1172 | return totalQuery || {}; |
| 1173 | }; |
| 1174 | const announceLoadingCompletion = totalProducts => { |
| 1175 | if (!Number.isFinite(totalProducts)) { |
| 1176 | return; |
| 1177 | } |
| 1178 | if (totalProducts === 0) { |
| 1179 | (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_7__.speak)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No products found', 'woocommerce')); |
| 1180 | } else { |
| 1181 | (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_7__.speak)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %s is an integer higher than 0 (1, 2, 3...) */ |
| 1182 | (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%d product found', '%d products found', totalProducts, 'woocommerce'), totalProducts)); |
| 1183 | } |
| 1184 | }; |
| 1185 | const areQueryTotalsDifferent = ({ |
| 1186 | totalQuery: nextQuery, |
| 1187 | totalProducts: nextProducts |
| 1188 | }, { |
| 1189 | totalQuery: currentQuery |
| 1190 | } = {}) => !fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2___default()(nextQuery, currentQuery) && Number.isFinite(nextProducts); |
| 1191 | const ProductList = ({ |
| 1192 | attributes, |
| 1193 | currentPage, |
| 1194 | onPageChange, |
| 1195 | onSortChange, |
| 1196 | sortValue, |
| 1197 | scrollToTop |
| 1198 | }) => { |
| 1199 | // These are possible filters. |
| 1200 | const [productAttributes, setProductAttributes] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useQueryStateByKey)('attributes', []); |
| 1201 | const [productStockStatus, setProductStockStatus] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useQueryStateByKey)('stock_status', []); |
| 1202 | const [productRating, setProductRating] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useQueryStateByKey)('rating', []); |
| 1203 | const [minPrice, setMinPrice] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useQueryStateByKey)('min_price'); |
| 1204 | const [maxPrice, setMaxPrice] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useQueryStateByKey)('max_price'); |
| 1205 | const [queryState] = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_13__.useSynchronizedQueryState)(generateQuery({ |
| 1206 | attributes, |
| 1207 | sortValue, |
| 1208 | currentPage |
| 1209 | })); |
| 1210 | const { |
| 1211 | products, |
| 1212 | totalProducts, |
| 1213 | productsLoading |
| 1214 | } = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_14__.useStoreProducts)(queryState); |
| 1215 | const { |
| 1216 | parentClassName, |
| 1217 | parentName |
| 1218 | } = (0,_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_6__.useInnerBlockLayoutContext)(); |
| 1219 | const totalQuery = extractPaginationAndSortAttributes(queryState); |
| 1220 | const { |
| 1221 | dispatchStoreEvent |
| 1222 | } = (0,_woocommerce_base_context_hooks__WEBPACK_IMPORTED_MODULE_15__.useStoreEvents)(); |
| 1223 | |
| 1224 | // Only update previous query totals if the query is different and the total number of products is a finite number. |
| 1225 | const previousQueryTotals = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_16__.usePrevious)({ |
| 1226 | totalQuery, |
| 1227 | totalProducts |
| 1228 | }, areQueryTotalsDifferent); |
| 1229 | |
| 1230 | // If the product list changes, trigger an event. |
| 1231 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useEffect)(() => { |
| 1232 | dispatchStoreEvent('product-list-render', { |
| 1233 | products, |
| 1234 | listName: parentName |
| 1235 | }); |
| 1236 | }, [products, parentName, dispatchStoreEvent]); |
| 1237 | |
| 1238 | // If query state (excluding pagination/sorting attributes) changed, reset pagination to the first page. |
| 1239 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useEffect)(() => { |
| 1240 | if (fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2___default()(totalQuery, previousQueryTotals === null || previousQueryTotals === void 0 ? void 0 : previousQueryTotals.totalQuery)) { |
| 1241 | return; |
| 1242 | } |
| 1243 | onPageChange(1); |
| 1244 | |
| 1245 | // Make sure there was a previous query, so we don't announce it on page load. |
| 1246 | if (previousQueryTotals !== null && previousQueryTotals !== void 0 && previousQueryTotals.totalQuery) { |
| 1247 | announceLoadingCompletion(totalProducts); |
| 1248 | } |
| 1249 | }, [previousQueryTotals === null || previousQueryTotals === void 0 ? void 0 : previousQueryTotals.totalQuery, totalProducts, onPageChange, totalQuery]); |
| 1250 | const onPaginationChange = newPage => { |
| 1251 | scrollToTop({ |
| 1252 | focusableSelector: 'a, button' |
| 1253 | }); |
| 1254 | onPageChange(newPage); |
| 1255 | }; |
| 1256 | const getClassnames = () => { |
| 1257 | const { |
| 1258 | columns, |
| 1259 | rows, |
| 1260 | alignButtons, |
| 1261 | align |
| 1262 | } = attributes; |
| 1263 | const alignClass = typeof align !== 'undefined' ? 'align' + align : ''; |
| 1264 | return classnames__WEBPACK_IMPORTED_MODULE_3___default()(parentClassName, alignClass, 'has-' + columns + '-columns', { |
| 1265 | 'has-multiple-rows': rows > 1, |
| 1266 | 'has-aligned-buttons': alignButtons |
| 1267 | }); |
| 1268 | }; |
| 1269 | const { |
| 1270 | contentVisibility |
| 1271 | } = attributes; |
| 1272 | const perPage = attributes.columns * attributes.rows; |
| 1273 | const totalPages = !Number.isFinite(totalProducts) && Number.isFinite(previousQueryTotals === null || previousQueryTotals === void 0 ? void 0 : previousQueryTotals.totalProducts) && fast_deep_equal_es6__WEBPACK_IMPORTED_MODULE_2___default()(totalQuery, previousQueryTotals === null || previousQueryTotals === void 0 ? void 0 : previousQueryTotals.totalQuery) ? Math.ceil(((previousQueryTotals === null || previousQueryTotals === void 0 ? void 0 : previousQueryTotals.totalProducts) || 0) / perPage) : Math.ceil(totalProducts / perPage); |
| 1274 | const listProducts = products.length ? products : Array.from({ |
| 1275 | length: perPage |
| 1276 | }); |
| 1277 | const hasProducts = products.length !== 0 || productsLoading; |
| 1278 | const hasFilters = productAttributes.length > 0 || productStockStatus.length > 0 || productRating.length > 0 || Number.isFinite(minPrice) || Number.isFinite(maxPrice); |
| 1279 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 1280 | className: getClassnames() |
| 1281 | }, (contentVisibility === null || contentVisibility === void 0 ? void 0 : contentVisibility.orderBy) && hasProducts && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_product_sort_select__WEBPACK_IMPORTED_MODULE_10__["default"], { |
| 1282 | onChange: onSortChange, |
| 1283 | value: sortValue |
| 1284 | }), !hasProducts && hasFilters && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_no_matching_products__WEBPACK_IMPORTED_MODULE_9__["default"], { |
| 1285 | resetCallback: () => { |
| 1286 | setProductAttributes([]); |
| 1287 | setProductStockStatus([]); |
| 1288 | setProductRating([]); |
| 1289 | setMinPrice(null); |
| 1290 | setMaxPrice(null); |
| 1291 | } |
| 1292 | }), !hasProducts && !hasFilters && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_no_products__WEBPACK_IMPORTED_MODULE_8__["default"], null), hasProducts && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", { |
| 1293 | className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(`${parentClassName}__products`, { |
| 1294 | 'is-loading-products': productsLoading |
| 1295 | }) |
| 1296 | }, listProducts.map((product = {}, i) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_product_list_item__WEBPACK_IMPORTED_MODULE_11__["default"], { |
| 1297 | key: product.id || i, |
| 1298 | attributes: attributes, |
| 1299 | product: product |
| 1300 | }))), totalPages > 1 && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_base_components_pagination__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1301 | currentPage: currentPage, |
| 1302 | onPageChange: onPaginationChange, |
| 1303 | totalPages: totalPages |
| 1304 | })); |
| 1305 | }; |
| 1306 | ProductList.__docgenInfo = { |
| 1307 | "description": "", |
| 1308 | "methods": [], |
| 1309 | "displayName": "ProductList" |
| 1310 | }; |
| 1311 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_woocommerce_base_hocs_with_scroll_to_top__WEBPACK_IMPORTED_MODULE_17__["default"])(ProductList)); |
| 1312 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 1313 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/product-list.tsx"] = { |
| 1314 | name: "ProductList", |
| 1315 | docgenInfo: ProductList.__docgenInfo, |
| 1316 | path: "assets/js/base/components/product-list/product-list.tsx" |
| 1317 | }; |
| 1318 | } |
| 1319 | |
| 1320 | /***/ }), |
| 1321 | |
| 1322 | /***/ "./assets/js/base/components/product-list/product-sort-select/index.tsx": |
| 1323 | /*!******************************************************************************!*\ |
| 1324 | !*** ./assets/js/base/components/product-list/product-sort-select/index.tsx ***! |
| 1325 | \******************************************************************************/ |
| 1326 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1327 | |
| 1328 | "use strict"; |
| 1329 | __webpack_require__.r(__webpack_exports__); |
| 1330 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1331 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1332 | /* harmony export */ }); |
| 1333 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1334 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1335 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1336 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 1337 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/blocks-components */ "@woocommerce/blocks-components"); |
| 1338 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_2__); |
| 1339 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/components/product-list/product-sort-select/style.scss"); |
| 1340 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__); |
| 1341 | |
| 1342 | /** |
| 1343 | * External dependencies |
| 1344 | */ |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | /** |
| 1349 | * Internal dependencies |
| 1350 | */ |
| 1351 | |
| 1352 | const ProductSortSelect = ({ |
| 1353 | onChange, |
| 1354 | value |
| 1355 | }) => { |
| 1356 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_2__.SortSelect, { |
| 1357 | className: "wc-block-product-sort-select wc-block-components-product-sort-select", |
| 1358 | onChange: onChange, |
| 1359 | options: [{ |
| 1360 | key: 'menu_order', |
| 1361 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default sorting', 'woocommerce') |
| 1362 | }, { |
| 1363 | key: 'popularity', |
| 1364 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Popularity', 'woocommerce') |
| 1365 | }, { |
| 1366 | key: 'rating', |
| 1367 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Average rating', 'woocommerce') |
| 1368 | }, { |
| 1369 | key: 'date', |
| 1370 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Latest', 'woocommerce') |
| 1371 | }, { |
| 1372 | key: 'price', |
| 1373 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Price: low to high', 'woocommerce') |
| 1374 | }, { |
| 1375 | key: 'price-desc', |
| 1376 | label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Price: high to low', 'woocommerce') |
| 1377 | }], |
| 1378 | screenReaderLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Order products by', 'woocommerce'), |
| 1379 | value: value |
| 1380 | }); |
| 1381 | }; |
| 1382 | ProductSortSelect.__docgenInfo = { |
| 1383 | "description": "", |
| 1384 | "methods": [], |
| 1385 | "displayName": "ProductSortSelect" |
| 1386 | }; |
| 1387 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductSortSelect); |
| 1388 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 1389 | STORYBOOK_REACT_CLASSES["assets/js/base/components/product-list/product-sort-select/index.tsx"] = { |
| 1390 | name: "ProductSortSelect", |
| 1391 | docgenInfo: ProductSortSelect.__docgenInfo, |
| 1392 | path: "assets/js/base/components/product-list/product-sort-select/index.tsx" |
| 1393 | }; |
| 1394 | } |
| 1395 | |
| 1396 | /***/ }), |
| 1397 | |
| 1398 | /***/ "./assets/js/base/context/hooks/collections/use-collection-header.ts": |
| 1399 | /*!***************************************************************************!*\ |
| 1400 | !*** ./assets/js/base/context/hooks/collections/use-collection-header.ts ***! |
| 1401 | \***************************************************************************/ |
| 1402 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1403 | |
| 1404 | "use strict"; |
| 1405 | __webpack_require__.r(__webpack_exports__); |
| 1406 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1407 | /* harmony export */ useCollectionHeader: () => (/* binding */ useCollectionHeader) |
| 1408 | /* harmony export */ }); |
| 1409 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/block-data */ "@woocommerce/block-data"); |
| 1410 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__); |
| 1411 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1412 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 1413 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-shallow-equal.ts"); |
| 1414 | /** |
| 1415 | * External dependencies |
| 1416 | */ |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | /** |
| 1422 | * Internal dependencies |
| 1423 | */ |
| 1424 | |
| 1425 | /** |
| 1426 | * This is a custom hook that is wired up to the `wc/store/collections` data |
| 1427 | * store. Given a header key and a collections option object, this will ensure a |
| 1428 | * component is kept up to date with the collection header value matching that |
| 1429 | * query in the store state. |
| 1430 | * |
| 1431 | * @param {string} headerKey Used to indicate which header value to |
| 1432 | * return for the given collection query. |
| 1433 | * Example: `'x-wp-total'` |
| 1434 | * @param {Object} options An object declaring the various |
| 1435 | * collection arguments. |
| 1436 | * @param {string} options.namespace The namespace for the collection. |
| 1437 | * Example: `'/wc/blocks'` |
| 1438 | * @param {string} options.resourceName The name of the resource for the |
| 1439 | * collection. Example: |
| 1440 | * `'products/attributes'` |
| 1441 | * @param {Array} options.resourceValues An array of values (in correct order) |
| 1442 | * that are substituted in the route |
| 1443 | * placeholders for the collection route. |
| 1444 | * Example: `[10, 20]` |
| 1445 | * @param {Object} options.query An object of key value pairs for the |
| 1446 | * query to execute on the collection |
| 1447 | * (optional). Example: |
| 1448 | * `{ order: 'ASC', order_by: 'price' }` |
| 1449 | * |
| 1450 | * @return {Object} This hook will return an object with two properties: |
| 1451 | * - value Whatever value is attached to the specified |
| 1452 | * header. |
| 1453 | * - isLoading A boolean indicating whether the header is |
| 1454 | * loading (true) or not. |
| 1455 | */ |
| 1456 | |
| 1457 | const useCollectionHeader = (headerKey, options) => { |
| 1458 | const { |
| 1459 | namespace, |
| 1460 | resourceName, |
| 1461 | resourceValues = [], |
| 1462 | query = {} |
| 1463 | } = options; |
| 1464 | if (!namespace || !resourceName) { |
| 1465 | throw new Error('The options object must have valid values for the namespace and ' + 'the resource name properties.'); |
| 1466 | } |
| 1467 | // ensure we feed the previous reference if it's equivalent |
| 1468 | const currentQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_2__.useShallowEqual)(query); |
| 1469 | const currentResourceValues = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_2__.useShallowEqual)(resourceValues); |
| 1470 | const { |
| 1471 | value, |
| 1472 | isLoading = true |
| 1473 | } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { |
| 1474 | const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.COLLECTIONS_STORE_KEY); |
| 1475 | // filter out query if it is undefined. |
| 1476 | const args = [headerKey, namespace, resourceName, currentQuery, currentResourceValues]; |
| 1477 | return { |
| 1478 | value: store.getCollectionHeader(...args), |
| 1479 | isLoading: store.hasFinishedResolution('getCollectionHeader', args) |
| 1480 | }; |
| 1481 | }, [headerKey, namespace, resourceName, currentResourceValues, currentQuery]); |
| 1482 | return { |
| 1483 | value, |
| 1484 | isLoading |
| 1485 | }; |
| 1486 | }; |
| 1487 | |
| 1488 | /***/ }), |
| 1489 | |
| 1490 | /***/ "./assets/js/base/context/hooks/collections/use-collection.ts": |
| 1491 | /*!********************************************************************!*\ |
| 1492 | !*** ./assets/js/base/context/hooks/collections/use-collection.ts ***! |
| 1493 | \********************************************************************/ |
| 1494 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1495 | |
| 1496 | "use strict"; |
| 1497 | __webpack_require__.r(__webpack_exports__); |
| 1498 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1499 | /* harmony export */ useCollection: () => (/* binding */ useCollection) |
| 1500 | /* harmony export */ }); |
| 1501 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/block-data */ "@woocommerce/block-data"); |
| 1502 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__); |
| 1503 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1504 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 1505 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1506 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); |
| 1507 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-shallow-equal.ts"); |
| 1508 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-throw-error.ts"); |
| 1509 | /* harmony import */ var _woocommerce_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/types */ "./assets/js/types/type-guards/error.ts"); |
| 1510 | /** |
| 1511 | * External dependencies |
| 1512 | */ |
| 1513 | |
| 1514 | |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | |
| 1519 | /** |
| 1520 | * This is a custom hook that is wired up to the `wc/store/collections` data |
| 1521 | * store. Given a collections option object, this will ensure a component is |
| 1522 | * kept up to date with the collection matching that query in the store state. |
| 1523 | * |
| 1524 | * @throws {Object} Throws an exception object if there was a problem with the |
| 1525 | * API request, to be picked up by BlockErrorBoundry. |
| 1526 | * |
| 1527 | * @param {Object} options An object declaring the various |
| 1528 | * collection arguments. |
| 1529 | * @param {string} options.namespace The namespace for the collection. |
| 1530 | * Example: `'/wc/blocks'` |
| 1531 | * @param {string} options.resourceName The name of the resource for the |
| 1532 | * collection. Example: |
| 1533 | * `'products/attributes'` |
| 1534 | * @param {Array} [options.resourceValues] An array of values (in correct order) |
| 1535 | * that are substituted in the route |
| 1536 | * placeholders for the collection route. |
| 1537 | * Example: `[10, 20]` |
| 1538 | * @param {Object} [options.query] An object of key value pairs for the |
| 1539 | * query to execute on the collection |
| 1540 | * Example: |
| 1541 | * `{ order: 'ASC', order_by: 'price' }` |
| 1542 | * @param {boolean} [options.shouldSelect] If false, the previous results will be |
| 1543 | * returned and internal selects will not |
| 1544 | * fire. |
| 1545 | * |
| 1546 | * @return {Object} This hook will return an object with two properties: |
| 1547 | * - results An array of collection items returned. |
| 1548 | * - isLoading A boolean indicating whether the collection is |
| 1549 | * loading (true) or not. |
| 1550 | */ |
| 1551 | |
| 1552 | const useCollection = options => { |
| 1553 | const { |
| 1554 | namespace, |
| 1555 | resourceName, |
| 1556 | resourceValues = [], |
| 1557 | query = {}, |
| 1558 | shouldSelect = true |
| 1559 | } = options; |
| 1560 | if (!namespace || !resourceName) { |
| 1561 | throw new Error('The options object must have valid values for the namespace and ' + 'the resource properties.'); |
| 1562 | } |
| 1563 | const currentResults = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)({ |
| 1564 | results: [], |
| 1565 | isLoading: true |
| 1566 | }); |
| 1567 | // ensure we feed the previous reference if it's equivalent |
| 1568 | const currentQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__.useShallowEqual)(query); |
| 1569 | const currentResourceValues = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_3__.useShallowEqual)(resourceValues); |
| 1570 | const throwError = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_4__.useThrowError)(); |
| 1571 | const results = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { |
| 1572 | if (!shouldSelect) { |
| 1573 | return null; |
| 1574 | } |
| 1575 | const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.COLLECTIONS_STORE_KEY); |
| 1576 | const args = [namespace, resourceName, currentQuery, currentResourceValues]; |
| 1577 | const error = store.getCollectionError(...args); |
| 1578 | if (error) { |
| 1579 | if ((0,_woocommerce_types__WEBPACK_IMPORTED_MODULE_5__.isError)(error)) { |
| 1580 | throwError(error); |
| 1581 | } else { |
| 1582 | throw new Error('TypeError: `error` object is not an instance of Error constructor'); |
| 1583 | } |
| 1584 | } |
| 1585 | return { |
| 1586 | results: store.getCollection(...args), |
| 1587 | isLoading: !store.hasFinishedResolution('getCollection', args) |
| 1588 | }; |
| 1589 | }, [namespace, resourceName, currentResourceValues, currentQuery, shouldSelect]); |
| 1590 | // if selector was not bailed, then update current results. Otherwise return |
| 1591 | // previous results |
| 1592 | if (results !== null) { |
| 1593 | currentResults.current = results; |
| 1594 | } |
| 1595 | return currentResults.current; |
| 1596 | }; |
| 1597 | |
| 1598 | /***/ }), |
| 1599 | |
| 1600 | /***/ "./assets/js/base/context/hooks/use-query-state.js": |
| 1601 | /*!*********************************************************!*\ |
| 1602 | !*** ./assets/js/base/context/hooks/use-query-state.js ***! |
| 1603 | \*********************************************************/ |
| 1604 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1605 | |
| 1606 | "use strict"; |
| 1607 | __webpack_require__.r(__webpack_exports__); |
| 1608 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1609 | /* harmony export */ useQueryStateByContext: () => (/* binding */ useQueryStateByContext), |
| 1610 | /* harmony export */ useQueryStateByKey: () => (/* binding */ useQueryStateByKey), |
| 1611 | /* harmony export */ useSynchronizedQueryState: () => (/* binding */ useSynchronizedQueryState) |
| 1612 | /* harmony export */ }); |
| 1613 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/block-data */ "@woocommerce/block-data"); |
| 1614 | /* harmony import */ var _woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__); |
| 1615 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1616 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 1617 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1618 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); |
| 1619 | /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal"); |
| 1620 | /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3__); |
| 1621 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-shallow-equal.ts"); |
| 1622 | /* harmony import */ var _woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/base-hooks */ "./assets/js/base/hooks/use-previous.ts"); |
| 1623 | /* harmony import */ var _providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../providers/query-state-context */ "./assets/js/base/context/providers/query-state-context.js"); |
| 1624 | /** |
| 1625 | * External dependencies |
| 1626 | */ |
| 1627 | |
| 1628 | |
| 1629 | |
| 1630 | |
| 1631 | |
| 1632 | |
| 1633 | /** |
| 1634 | * Internal dependencies |
| 1635 | */ |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | /** |
| 1640 | * A custom hook that exposes the current query state and a setter for the query |
| 1641 | * state store for the given context. |
| 1642 | * |
| 1643 | * "Query State" is a wp.data store that keeps track of an arbitrary object of |
| 1644 | * query keys and their values. |
| 1645 | * |
| 1646 | * @param {string} [context] What context to retrieve the query state for. If not |
| 1647 | * provided, this hook will attempt to get the context |
| 1648 | * from the query state context provided by the |
| 1649 | * QueryStateContextProvider |
| 1650 | * |
| 1651 | * @return {Array} An array that has two elements. The first element is the |
| 1652 | * query state value for the given context. The second element |
| 1653 | * is a dispatcher function for setting the query state. |
| 1654 | */ |
| 1655 | const useQueryStateByContext = context => { |
| 1656 | const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)(); |
| 1657 | context = context || queryStateContext; |
| 1658 | const queryState = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { |
| 1659 | const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY); |
| 1660 | return store.getValueForQueryContext(context, undefined); |
| 1661 | }, [context]); |
| 1662 | const { |
| 1663 | setValueForQueryContext |
| 1664 | } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY); |
| 1665 | const setQueryState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(value => { |
| 1666 | setValueForQueryContext(context, value); |
| 1667 | }, [context, setValueForQueryContext]); |
| 1668 | return [queryState, setQueryState]; |
| 1669 | }; |
| 1670 | |
| 1671 | /** |
| 1672 | * A custom hook that exposes the current query state value and a setter for the |
| 1673 | * given context and query key. |
| 1674 | * |
| 1675 | * "Query State" is a wp.data store that keeps track of an arbitrary object of |
| 1676 | * query keys and their values. |
| 1677 | * |
| 1678 | * @param {*} queryKey The specific query key to retrieve the value for. |
| 1679 | * @param {*} [defaultValue] Default value if query does not exist. |
| 1680 | * @param {string} [context] What context to retrieve the query state for. If |
| 1681 | * not provided will attempt to use what is provided |
| 1682 | * by query state context. |
| 1683 | * |
| 1684 | * @return {*} Whatever value is set at the query state index using the |
| 1685 | * provided context and query key. |
| 1686 | */ |
| 1687 | const useQueryStateByKey = (queryKey, defaultValue, context) => { |
| 1688 | const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)(); |
| 1689 | context = context || queryStateContext; |
| 1690 | const queryValue = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { |
| 1691 | const store = select(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY); |
| 1692 | return store.getValueForQueryKey(context, queryKey, defaultValue); |
| 1693 | }, |
| 1694 | // eslint-disable-next-line react-hooks/exhaustive-deps |
| 1695 | [context, queryKey]); |
| 1696 | const { |
| 1697 | setQueryValue |
| 1698 | } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_woocommerce_block_data__WEBPACK_IMPORTED_MODULE_0__.QUERY_STATE_STORE_KEY); |
| 1699 | const setQueryValueByKey = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)(value => { |
| 1700 | setQueryValue(context, queryKey, value); |
| 1701 | }, [context, queryKey, setQueryValue]); |
| 1702 | return [queryValue, setQueryValueByKey]; |
| 1703 | }; |
| 1704 | |
| 1705 | /** |
| 1706 | * A custom hook that works similarly to useQueryStateByContext. However, this |
| 1707 | * hook allows for synchronizing with a provided queryState object. |
| 1708 | * |
| 1709 | * This hook does the following things with the provided `synchronizedQuery` |
| 1710 | * object: |
| 1711 | * |
| 1712 | * - whenever synchronizedQuery varies between renders, the queryState will be |
| 1713 | * updated to a merged object of the internal queryState and the provided |
| 1714 | * object. Note, any values from the same properties between objects will |
| 1715 | * be set from synchronizedQuery. |
| 1716 | * - if there are no changes between renders, then the existing internal |
| 1717 | * queryState is always returned. |
| 1718 | * - on initial render, the synchronizedQuery value is returned. |
| 1719 | * |
| 1720 | * Typically, this hook would be used in a scenario where there may be external |
| 1721 | * triggers for updating the query state (i.e. initial population of query |
| 1722 | * state by hydration or component attributes, or routing url changes that |
| 1723 | * affect query state). |
| 1724 | * |
| 1725 | * @param {Object} synchronizedQuery A provided query state object to |
| 1726 | * synchronize internal query state with. |
| 1727 | * @param {string} [context] What context to retrieve the query state |
| 1728 | * for. If not provided, will be pulled from |
| 1729 | * the QueryStateContextProvider in the tree. |
| 1730 | */ |
| 1731 | const useSynchronizedQueryState = (synchronizedQuery, context) => { |
| 1732 | const queryStateContext = (0,_providers_query_state_context__WEBPACK_IMPORTED_MODULE_4__.useQueryStateContext)(); |
| 1733 | context = context || queryStateContext; |
| 1734 | const [queryState, setQueryState] = useQueryStateByContext(context); |
| 1735 | const currentQueryState = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__.useShallowEqual)(queryState); |
| 1736 | const currentSynchronizedQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_5__.useShallowEqual)(synchronizedQuery); |
| 1737 | const previousSynchronizedQuery = (0,_woocommerce_base_hooks__WEBPACK_IMPORTED_MODULE_6__.usePrevious)(currentSynchronizedQuery); |
| 1738 | // used to ensure we allow initial synchronization to occur before |
| 1739 | // returning non-synced state. |
| 1740 | const isInitialized = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(false); |
| 1741 | // update queryState anytime incoming synchronizedQuery changes |
| 1742 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => { |
| 1743 | if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_3___default()(previousSynchronizedQuery, currentSynchronizedQuery)) { |
| 1744 | setQueryState(Object.assign({}, currentQueryState, currentSynchronizedQuery)); |
| 1745 | isInitialized.current = true; |
| 1746 | } |
| 1747 | }, [currentQueryState, currentSynchronizedQuery, previousSynchronizedQuery, setQueryState]); |
| 1748 | return isInitialized.current ? [queryState, setQueryState] : [synchronizedQuery, setQueryState]; |
| 1749 | }; |
| 1750 | |
| 1751 | /***/ }), |
| 1752 | |
| 1753 | /***/ "./assets/js/base/context/hooks/use-store-events.ts": |
| 1754 | /*!**********************************************************!*\ |
| 1755 | !*** ./assets/js/base/context/hooks/use-store-events.ts ***! |
| 1756 | \**********************************************************/ |
| 1757 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1758 | |
| 1759 | "use strict"; |
| 1760 | __webpack_require__.r(__webpack_exports__); |
| 1761 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1762 | /* harmony export */ useStoreEvents: () => (/* binding */ useStoreEvents) |
| 1763 | /* harmony export */ }); |
| 1764 | /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); |
| 1765 | /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); |
| 1766 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1767 | /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 1768 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1769 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); |
| 1770 | /** |
| 1771 | * External dependencies |
| 1772 | */ |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | /** |
| 1777 | * Abstraction on top of @wordpress/hooks for dispatching events via doAction for 3rd parties to hook into. |
| 1778 | */ |
| 1779 | const useStoreEvents = () => { |
| 1780 | const dispatchStoreEvent = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)((eventName, eventParams = {}) => { |
| 1781 | try { |
| 1782 | (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.doAction)(`experimental__woocommerce_blocks-${eventName}`, eventParams); |
| 1783 | } catch (e) { |
| 1784 | // We don't handle thrown errors but just console.log for troubleshooting. |
| 1785 | // eslint-disable-next-line no-console |
| 1786 | console.error(e); |
| 1787 | } |
| 1788 | }, []); |
| 1789 | const dispatchCheckoutEvent = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useCallback)((eventName, eventParams = {}) => { |
| 1790 | try { |
| 1791 | (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.doAction)(`experimental__woocommerce_blocks-checkout-${eventName}`, { |
| 1792 | ...eventParams, |
| 1793 | storeCart: (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('wc/store/cart').getCartData() |
| 1794 | }); |
| 1795 | } catch (e) { |
| 1796 | // We don't handle thrown errors but just console.log for troubleshooting. |
| 1797 | // eslint-disable-next-line no-console |
| 1798 | console.error(e); |
| 1799 | } |
| 1800 | }, []); |
| 1801 | return { |
| 1802 | dispatchStoreEvent, |
| 1803 | dispatchCheckoutEvent |
| 1804 | }; |
| 1805 | }; |
| 1806 | |
| 1807 | /***/ }), |
| 1808 | |
| 1809 | /***/ "./assets/js/base/context/hooks/use-store-products.ts": |
| 1810 | /*!************************************************************!*\ |
| 1811 | !*** ./assets/js/base/context/hooks/use-store-products.ts ***! |
| 1812 | \************************************************************/ |
| 1813 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1814 | |
| 1815 | "use strict"; |
| 1816 | __webpack_require__.r(__webpack_exports__); |
| 1817 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1818 | /* harmony export */ useStoreProducts: () => (/* binding */ useStoreProducts) |
| 1819 | /* harmony export */ }); |
| 1820 | /* harmony import */ var _collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./collections */ "./assets/js/base/context/hooks/collections/use-collection.ts"); |
| 1821 | /* harmony import */ var _collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collections */ "./assets/js/base/context/hooks/collections/use-collection-header.ts"); |
| 1822 | /** |
| 1823 | * External dependencies |
| 1824 | */ |
| 1825 | |
| 1826 | /** |
| 1827 | * Internal dependencies |
| 1828 | */ |
| 1829 | |
| 1830 | |
| 1831 | /** |
| 1832 | * This is a custom hook that is wired up to the `wc/store/collections` data |
| 1833 | * store for the `wc/store/v1/products` route. Given a query object, this |
| 1834 | * will ensure a component is kept up to date with the products matching that |
| 1835 | * query in the store state. |
| 1836 | * |
| 1837 | * @param {Object} query An object containing any query arguments to be |
| 1838 | * included with the collection request for the |
| 1839 | * products. Does not have to be included. |
| 1840 | * |
| 1841 | * @return {Object} This hook will return an object with three properties: |
| 1842 | * - products An array of product objects. |
| 1843 | * - totalProducts The total number of products that match |
| 1844 | * the given query parameters. |
| 1845 | * - productsLoading A boolean indicating whether the products |
| 1846 | * are still loading or not. |
| 1847 | */ |
| 1848 | const useStoreProducts = query => { |
| 1849 | const collectionOptions = { |
| 1850 | namespace: '/wc/store/v1', |
| 1851 | resourceName: 'products' |
| 1852 | }; |
| 1853 | const { |
| 1854 | results: products, |
| 1855 | isLoading: productsLoading |
| 1856 | } = (0,_collections__WEBPACK_IMPORTED_MODULE_0__.useCollection)({ |
| 1857 | ...collectionOptions, |
| 1858 | query |
| 1859 | }); |
| 1860 | const { |
| 1861 | value: totalProducts |
| 1862 | } = (0,_collections__WEBPACK_IMPORTED_MODULE_1__.useCollectionHeader)('x-wp-total', { |
| 1863 | ...collectionOptions, |
| 1864 | query |
| 1865 | }); |
| 1866 | return { |
| 1867 | products, |
| 1868 | totalProducts: parseInt(totalProducts, 10), |
| 1869 | productsLoading |
| 1870 | }; |
| 1871 | }; |
| 1872 | |
| 1873 | /***/ }), |
| 1874 | |
| 1875 | /***/ "./assets/js/base/context/providers/query-state-context.js": |
| 1876 | /*!*****************************************************************!*\ |
| 1877 | !*** ./assets/js/base/context/providers/query-state-context.js ***! |
| 1878 | \*****************************************************************/ |
| 1879 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1880 | |
| 1881 | "use strict"; |
| 1882 | __webpack_require__.r(__webpack_exports__); |
| 1883 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1884 | /* harmony export */ QueryStateContextProvider: () => (/* binding */ QueryStateContextProvider), |
| 1885 | /* harmony export */ useQueryStateContext: () => (/* binding */ useQueryStateContext) |
| 1886 | /* harmony export */ }); |
| 1887 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1888 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 1889 | /** |
| 1890 | * External dependencies |
| 1891 | */ |
| 1892 | |
| 1893 | |
| 1894 | /** |
| 1895 | * Query state context is the index for used for a query state store. By |
| 1896 | * exposing this via context, it allows for all children blocks to be |
| 1897 | * synchronized to the same query state defined by the parent in the tree. |
| 1898 | * |
| 1899 | * Defaults to 'page' for general global query state shared among all blocks |
| 1900 | * in a view. |
| 1901 | * |
| 1902 | * @member {Object} QueryStateContext A react context object |
| 1903 | */ |
| 1904 | const QueryStateContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)('page'); |
| 1905 | const useQueryStateContext = () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(QueryStateContext); |
| 1906 | const QueryStateContextProvider = QueryStateContext.Provider; |
| 1907 | |
| 1908 | /***/ }), |
| 1909 | |
| 1910 | /***/ "./assets/js/base/hocs/with-scroll-to-top/index.tsx": |
| 1911 | /*!**********************************************************!*\ |
| 1912 | !*** ./assets/js/base/hocs/with-scroll-to-top/index.tsx ***! |
| 1913 | \**********************************************************/ |
| 1914 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1915 | |
| 1916 | "use strict"; |
| 1917 | __webpack_require__.r(__webpack_exports__); |
| 1918 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1919 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1920 | /* harmony export */ }); |
| 1921 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1922 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1923 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1924 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 1925 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./assets/js/base/hocs/with-scroll-to-top/style.scss"); |
| 1926 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__); |
| 1927 | |
| 1928 | /** |
| 1929 | * External dependencies |
| 1930 | */ |
| 1931 | |
| 1932 | |
| 1933 | /** |
| 1934 | * Internal dependencies |
| 1935 | */ |
| 1936 | |
| 1937 | const maybeScrollToTop = scrollPoint => { |
| 1938 | if (!scrollPoint) { |
| 1939 | return; |
| 1940 | } |
| 1941 | const yPos = scrollPoint.getBoundingClientRect().bottom; |
| 1942 | const isScrollPointVisible = yPos >= 0 && yPos <= window.innerHeight; |
| 1943 | if (!isScrollPointVisible) { |
| 1944 | scrollPoint.scrollIntoView(); |
| 1945 | } |
| 1946 | }; |
| 1947 | const moveFocusToElement = (scrollPoint, focusableSelector) => { |
| 1948 | var _scrollPoint$parentEl; |
| 1949 | const focusableElements = ((_scrollPoint$parentEl = scrollPoint.parentElement) === null || _scrollPoint$parentEl === void 0 ? void 0 : _scrollPoint$parentEl.querySelectorAll(focusableSelector)) || []; |
| 1950 | if (focusableElements.length) { |
| 1951 | const targetElement = focusableElements[0]; |
| 1952 | maybeScrollToTop(targetElement); |
| 1953 | targetElement === null || targetElement === void 0 ? void 0 : targetElement.focus(); |
| 1954 | } else { |
| 1955 | maybeScrollToTop(scrollPoint); |
| 1956 | } |
| 1957 | }; |
| 1958 | const scrollToHTMLElement = (scrollPoint, options) => { |
| 1959 | const { |
| 1960 | focusableSelector |
| 1961 | } = options || {}; |
| 1962 | if (!window || !Number.isFinite(window.innerHeight)) { |
| 1963 | return; |
| 1964 | } |
| 1965 | if (focusableSelector) { |
| 1966 | moveFocusToElement(scrollPoint, focusableSelector); |
| 1967 | } else { |
| 1968 | maybeScrollToTop(scrollPoint); |
| 1969 | } |
| 1970 | }; |
| 1971 | |
| 1972 | /** |
| 1973 | * HOC that provides a function to scroll to the top of the component. |
| 1974 | */ |
| 1975 | const withScrollToTop = OriginalComponent => { |
| 1976 | return props => { |
| 1977 | const scrollPointRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); |
| 1978 | const scrollToTop = args => { |
| 1979 | if (scrollPointRef.current !== null) { |
| 1980 | scrollToHTMLElement(scrollPointRef.current, args); |
| 1981 | } |
| 1982 | }; |
| 1983 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 1984 | className: "with-scroll-to-top__scroll-point", |
| 1985 | ref: scrollPointRef, |
| 1986 | "aria-hidden": true |
| 1987 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(OriginalComponent, { |
| 1988 | ...props, |
| 1989 | scrollToTop: scrollToTop |
| 1990 | })); |
| 1991 | }; |
| 1992 | }; |
| 1993 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (withScrollToTop); |
| 1994 | |
| 1995 | /***/ }), |
| 1996 | |
| 1997 | /***/ "./assets/js/base/hooks/use-previous.ts": |
| 1998 | /*!**********************************************!*\ |
| 1999 | !*** ./assets/js/base/hooks/use-previous.ts ***! |
| 2000 | \**********************************************/ |
| 2001 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2002 | |
| 2003 | "use strict"; |
| 2004 | __webpack_require__.r(__webpack_exports__); |
| 2005 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2006 | /* harmony export */ usePrevious: () => (/* binding */ usePrevious) |
| 2007 | /* harmony export */ }); |
| 2008 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2009 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 2010 | /** |
| 2011 | * External dependencies |
| 2012 | */ |
| 2013 | |
| 2014 | /** |
| 2015 | * Use Previous based on https://usehooks.com/useprevious/. |
| 2016 | * |
| 2017 | * @param {*} value |
| 2018 | * @param {Function} [validation] Function that needs to validate for the value |
| 2019 | * to be updated. |
| 2020 | */ |
| 2021 | function usePrevious(value, validation) { |
| 2022 | const ref = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); |
| 2023 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 2024 | if (ref.current !== value && (!validation || validation(value, ref.current))) { |
| 2025 | ref.current = value; |
| 2026 | } |
| 2027 | }, [value, validation]); |
| 2028 | return ref.current; |
| 2029 | } |
| 2030 | |
| 2031 | /***/ }), |
| 2032 | |
| 2033 | /***/ "./assets/js/base/hooks/use-shallow-equal.ts": |
| 2034 | /*!***************************************************!*\ |
| 2035 | !*** ./assets/js/base/hooks/use-shallow-equal.ts ***! |
| 2036 | \***************************************************/ |
| 2037 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2038 | |
| 2039 | "use strict"; |
| 2040 | __webpack_require__.r(__webpack_exports__); |
| 2041 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2042 | /* harmony export */ useShallowEqual: () => (/* binding */ useShallowEqual) |
| 2043 | /* harmony export */ }); |
| 2044 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2045 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 2046 | /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal"); |
| 2047 | /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1__); |
| 2048 | /** |
| 2049 | * External dependencies |
| 2050 | */ |
| 2051 | |
| 2052 | |
| 2053 | |
| 2054 | /** |
| 2055 | * A custom hook that compares the provided value across renders and returns the |
| 2056 | * previous instance if shallow equality with previous instance exists. |
| 2057 | * |
| 2058 | * This is particularly useful when non-primitive types are used as |
| 2059 | * dependencies for react hooks. |
| 2060 | * |
| 2061 | * @param {*} value Value to keep the same if satisfies shallow equality. |
| 2062 | * |
| 2063 | * @return {*} The previous cached instance of the value if the current has shallow equality with it. |
| 2064 | */ |
| 2065 | function useShallowEqual(value) { |
| 2066 | const ref = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(value); |
| 2067 | if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_1___default()(value, ref.current)) { |
| 2068 | ref.current = value; |
| 2069 | } |
| 2070 | return ref.current; |
| 2071 | } |
| 2072 | |
| 2073 | /***/ }), |
| 2074 | |
| 2075 | /***/ "./assets/js/base/hooks/use-throw-error.ts": |
| 2076 | /*!*************************************************!*\ |
| 2077 | !*** ./assets/js/base/hooks/use-throw-error.ts ***! |
| 2078 | \*************************************************/ |
| 2079 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2080 | |
| 2081 | "use strict"; |
| 2082 | __webpack_require__.r(__webpack_exports__); |
| 2083 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2084 | /* harmony export */ useThrowError: () => (/* binding */ useThrowError) |
| 2085 | /* harmony export */ }); |
| 2086 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2087 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 2088 | /** |
| 2089 | * External dependencies |
| 2090 | */ |
| 2091 | |
| 2092 | |
| 2093 | /** |
| 2094 | * Helper method for throwing an error in a React Hook. |
| 2095 | * |
| 2096 | * @see https://github.com/facebook/react/issues/14981 |
| 2097 | */ |
| 2098 | const useThrowError = () => { |
| 2099 | const [, setState] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(); |
| 2100 | return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(error => { |
| 2101 | setState(() => { |
| 2102 | throw error; |
| 2103 | }); |
| 2104 | }, []); |
| 2105 | }; |
| 2106 | |
| 2107 | /***/ }), |
| 2108 | |
| 2109 | /***/ "./assets/js/base/utils/render-frontend.tsx": |
| 2110 | /*!**************************************************!*\ |
| 2111 | !*** ./assets/js/base/utils/render-frontend.tsx ***! |
| 2112 | \**************************************************/ |
| 2113 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2114 | |
| 2115 | "use strict"; |
| 2116 | __webpack_require__.r(__webpack_exports__); |
| 2117 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2118 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), |
| 2119 | /* harmony export */ renderBlock: () => (/* binding */ renderBlock), |
| 2120 | /* harmony export */ renderFrontend: () => (/* binding */ renderFrontend) |
| 2121 | /* harmony export */ }); |
| 2122 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2123 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2124 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2125 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2126 | /* harmony import */ var _woocommerce_base_components_block_error_boundary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/base-components/block-error-boundary */ "./assets/js/base/components/block-error-boundary/index.tsx"); |
| 2127 | |
| 2128 | /** |
| 2129 | * External dependencies |
| 2130 | */ |
| 2131 | |
| 2132 | |
| 2133 | |
| 2134 | // Some blocks take care of rendering their inner blocks automatically. For |
| 2135 | // example, the empty cart. In those cases, we don't want to trigger the render |
| 2136 | // function of inner components on load. Instead, the wrapper block can trigger |
| 2137 | // the event `wc-blocks_render_blocks_frontend` to render its inner blocks. |
| 2138 | const selectorsToSkipOnLoad = ['.wp-block-woocommerce-cart']; |
| 2139 | /** |
| 2140 | * Renders a block component in a single `container` node. |
| 2141 | */ |
| 2142 | const renderBlock = ({ |
| 2143 | Block, |
| 2144 | container, |
| 2145 | attributes = {}, |
| 2146 | props = {}, |
| 2147 | errorBoundaryProps = {} |
| 2148 | }) => { |
| 2149 | (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.render)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_base_components_block_error_boundary__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 2150 | ...errorBoundaryProps |
| 2151 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Suspense, { |
| 2152 | fallback: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { |
| 2153 | className: "wc-block-placeholder" |
| 2154 | }) |
| 2155 | }, Block && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Block, { |
| 2156 | ...props, |
| 2157 | attributes: attributes |
| 2158 | }))), container, () => { |
| 2159 | if (container.classList) { |
| 2160 | container.classList.remove('is-loading'); |
| 2161 | } |
| 2162 | }); |
| 2163 | }; |
| 2164 | /** |
| 2165 | * Renders a block component in each `containers` node. |
| 2166 | */ |
| 2167 | const renderBlockInContainers = ({ |
| 2168 | Block, |
| 2169 | containers, |
| 2170 | getProps = () => ({}), |
| 2171 | getErrorBoundaryProps = () => ({}) |
| 2172 | }) => { |
| 2173 | if (containers.length === 0) { |
| 2174 | return; |
| 2175 | } |
| 2176 | |
| 2177 | // Use Array.forEach for IE11 compatibility. |
| 2178 | Array.prototype.forEach.call(containers, (el, i) => { |
| 2179 | const props = getProps(el, i); |
| 2180 | const errorBoundaryProps = getErrorBoundaryProps(el, i); |
| 2181 | const attributes = { |
| 2182 | ...el.dataset, |
| 2183 | ...(props.attributes || {}) |
| 2184 | }; |
| 2185 | renderBlock({ |
| 2186 | Block, |
| 2187 | container: el, |
| 2188 | props, |
| 2189 | attributes, |
| 2190 | errorBoundaryProps |
| 2191 | }); |
| 2192 | }); |
| 2193 | }; |
| 2194 | |
| 2195 | // Given an element and a list of wrappers, check if the element is inside at |
| 2196 | // least one of the wrappers. |
| 2197 | const isElementInsideWrappers = (el, wrappers) => { |
| 2198 | return Array.prototype.some.call(wrappers, wrapper => wrapper.contains(el) && !wrapper.isSameNode(el)); |
| 2199 | }; |
| 2200 | /** |
| 2201 | * Renders the block frontend in the elements matched by the selector which are |
| 2202 | * outside the wrapper elements. |
| 2203 | */ |
| 2204 | const renderBlockOutsideWrappers = ({ |
| 2205 | Block, |
| 2206 | getProps, |
| 2207 | getErrorBoundaryProps, |
| 2208 | selector, |
| 2209 | wrappers |
| 2210 | }) => { |
| 2211 | const containers = document.body.querySelectorAll(selector); |
| 2212 | // Filter out blocks inside the wrappers. |
| 2213 | if (wrappers && wrappers.length > 0) { |
| 2214 | Array.prototype.filter.call(containers, el => { |
| 2215 | return !isElementInsideWrappers(el, wrappers); |
| 2216 | }); |
| 2217 | } |
| 2218 | renderBlockInContainers({ |
| 2219 | Block, |
| 2220 | containers, |
| 2221 | getProps, |
| 2222 | getErrorBoundaryProps |
| 2223 | }); |
| 2224 | }; |
| 2225 | /** |
| 2226 | * Renders the block frontend in the elements matched by the selector inside the |
| 2227 | * wrapper element. |
| 2228 | */ |
| 2229 | const renderBlockInsideWrapper = ({ |
| 2230 | Block, |
| 2231 | getProps, |
| 2232 | getErrorBoundaryProps, |
| 2233 | selector, |
| 2234 | wrapper |
| 2235 | }) => { |
| 2236 | const containers = wrapper.querySelectorAll(selector); |
| 2237 | renderBlockInContainers({ |
| 2238 | Block, |
| 2239 | containers, |
| 2240 | getProps, |
| 2241 | getErrorBoundaryProps |
| 2242 | }); |
| 2243 | }; |
| 2244 | /** |
| 2245 | * Renders the block frontend on page load. If the block is contained inside a |
| 2246 | * wrapper element that should be excluded from initial load, it adds the |
| 2247 | * appropriate event listeners to render the block when the |
| 2248 | * `wc-blocks_render_blocks_frontend` event is triggered. |
| 2249 | */ |
| 2250 | const renderFrontend = props => { |
| 2251 | const wrappersToSkipOnLoad = document.body.querySelectorAll(selectorsToSkipOnLoad.join(',')); |
| 2252 | const { |
| 2253 | Block, |
| 2254 | getProps, |
| 2255 | getErrorBoundaryProps, |
| 2256 | selector |
| 2257 | } = props; |
| 2258 | renderBlockOutsideWrappers({ |
| 2259 | Block, |
| 2260 | getProps, |
| 2261 | getErrorBoundaryProps, |
| 2262 | selector, |
| 2263 | wrappers: wrappersToSkipOnLoad |
| 2264 | }); |
| 2265 | // For each wrapper, add an event listener to render the inner blocks when |
| 2266 | // `wc-blocks_render_blocks_frontend` event is triggered. |
| 2267 | Array.prototype.forEach.call(wrappersToSkipOnLoad, wrapper => { |
| 2268 | wrapper.addEventListener('wc-blocks_render_blocks_frontend', () => { |
| 2269 | renderBlockInsideWrapper({ |
| 2270 | ...props, |
| 2271 | wrapper |
| 2272 | }); |
| 2273 | }); |
| 2274 | }); |
| 2275 | }; |
| 2276 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renderFrontend); |
| 2277 | |
| 2278 | /***/ }), |
| 2279 | |
| 2280 | /***/ "./assets/js/blocks/products/all-products/block.tsx": |
| 2281 | /*!**********************************************************!*\ |
| 2282 | !*** ./assets/js/blocks/products/all-products/block.tsx ***! |
| 2283 | \**********************************************************/ |
| 2284 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2285 | |
| 2286 | "use strict"; |
| 2287 | __webpack_require__.r(__webpack_exports__); |
| 2288 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2289 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2290 | /* harmony export */ }); |
| 2291 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2292 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2293 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2294 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2295 | /* harmony import */ var _woocommerce_base_components_product_list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/base-components/product-list */ "./assets/js/base/components/product-list/index.ts"); |
| 2296 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/shared-context */ "@woocommerce/shared-context"); |
| 2297 | /* harmony import */ var _woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_3__); |
| 2298 | /* harmony import */ var _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/resource-previews */ "./assets/js/previews/grid-block.js"); |
| 2299 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/blocks-components */ "@woocommerce/blocks-components"); |
| 2300 | /* harmony import */ var _woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_4__); |
| 2301 | |
| 2302 | /** |
| 2303 | * External dependencies |
| 2304 | */ |
| 2305 | |
| 2306 | |
| 2307 | |
| 2308 | |
| 2309 | |
| 2310 | /** |
| 2311 | * The All Products Block. |
| 2312 | */ |
| 2313 | class Block extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component { |
| 2314 | render() { |
| 2315 | const { |
| 2316 | attributes, |
| 2317 | urlParameterSuffix |
| 2318 | } = this.props; |
| 2319 | if (attributes.isPreview) { |
| 2320 | return _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_5__.gridBlockPreview; |
| 2321 | } |
| 2322 | |
| 2323 | /** |
| 2324 | * Todo classes |
| 2325 | * |
| 2326 | * wp-block-{$this->block_name}, |
| 2327 | * wc-block-{$this->block_name}, |
| 2328 | */ |
| 2329 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_shared_context__WEBPACK_IMPORTED_MODULE_3__.InnerBlockLayoutContextProvider, { |
| 2330 | parentName: "woocommerce/all-products", |
| 2331 | parentClassName: "wc-block-grid" |
| 2332 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_blocks_components__WEBPACK_IMPORTED_MODULE_4__.StoreNoticesContainer, { |
| 2333 | context: 'wc/all-products' |
| 2334 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_base_components_product_list__WEBPACK_IMPORTED_MODULE_2__.ProductListContainer, { |
| 2335 | attributes: attributes, |
| 2336 | urlParameterSuffix: urlParameterSuffix |
| 2337 | })); |
| 2338 | } |
| 2339 | } |
| 2340 | Block.__docgenInfo = { |
| 2341 | "description": "The All Products Block.", |
| 2342 | "methods": [], |
| 2343 | "displayName": "Block", |
| 2344 | "props": { |
| 2345 | "attributes": { |
| 2346 | "required": true, |
| 2347 | "tsType": { |
| 2348 | "name": "intersection", |
| 2349 | "raw": "{\n\tisPreview?: boolean;\n} & ProductListAttributes", |
| 2350 | "elements": [{ |
| 2351 | "name": "signature", |
| 2352 | "type": "object", |
| 2353 | "raw": "{\n\tisPreview?: boolean;\n}", |
| 2354 | "signature": { |
| 2355 | "properties": [{ |
| 2356 | "key": "isPreview", |
| 2357 | "value": { |
| 2358 | "name": "boolean", |
| 2359 | "required": false |
| 2360 | } |
| 2361 | }] |
| 2362 | } |
| 2363 | }, { |
| 2364 | "name": "ProductListAttributes" |
| 2365 | }] |
| 2366 | }, |
| 2367 | "description": "" |
| 2368 | }, |
| 2369 | "urlParameterSuffix": { |
| 2370 | "required": false, |
| 2371 | "tsType": { |
| 2372 | "name": "string" |
| 2373 | }, |
| 2374 | "description": "" |
| 2375 | } |
| 2376 | } |
| 2377 | }; |
| 2378 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Block); |
| 2379 | if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { |
| 2380 | STORYBOOK_REACT_CLASSES["assets/js/blocks/products/all-products/block.tsx"] = { |
| 2381 | name: "Block", |
| 2382 | docgenInfo: Block.__docgenInfo, |
| 2383 | path: "assets/js/blocks/products/all-products/block.tsx" |
| 2384 | }; |
| 2385 | } |
| 2386 | |
| 2387 | /***/ }), |
| 2388 | |
| 2389 | /***/ "./assets/js/previews/grid-block.js": |
| 2390 | /*!******************************************!*\ |
| 2391 | !*** ./assets/js/previews/grid-block.js ***! |
| 2392 | \******************************************/ |
| 2393 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2394 | |
| 2395 | "use strict"; |
| 2396 | __webpack_require__.r(__webpack_exports__); |
| 2397 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2398 | /* harmony export */ gridBlockPreview: () => (/* binding */ gridBlockPreview) |
| 2399 | /* harmony export */ }); |
| 2400 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2401 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2402 | |
| 2403 | /** |
| 2404 | * External dependencies |
| 2405 | */ |
| 2406 | const gridBlockPreview = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { |
| 2407 | xmlns: "http://www.w3.org/2000/svg", |
| 2408 | fill: "none", |
| 2409 | viewBox: "0 0 230 250", |
| 2410 | style: { |
| 2411 | width: '100%' |
| 2412 | } |
| 2413 | }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("title", null, "Grid Block Preview"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2414 | width: "65.374", |
| 2415 | height: "65.374", |
| 2416 | x: ".162", |
| 2417 | y: ".779", |
| 2418 | fill: "#E1E3E6", |
| 2419 | rx: "3" |
| 2420 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2421 | width: "47.266", |
| 2422 | height: "5.148", |
| 2423 | x: "9.216", |
| 2424 | y: "76.153", |
| 2425 | fill: "#E1E3E6", |
| 2426 | rx: "2.574" |
| 2427 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2428 | width: "62.8", |
| 2429 | height: "15", |
| 2430 | x: "1.565", |
| 2431 | y: "101.448", |
| 2432 | fill: "#E1E3E6", |
| 2433 | rx: "5" |
| 2434 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2435 | width: "65.374", |
| 2436 | height: "65.374", |
| 2437 | x: ".162", |
| 2438 | y: "136.277", |
| 2439 | fill: "#E1E3E6", |
| 2440 | rx: "3" |
| 2441 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2442 | width: "47.266", |
| 2443 | height: "5.148", |
| 2444 | x: "9.216", |
| 2445 | y: "211.651", |
| 2446 | fill: "#E1E3E6", |
| 2447 | rx: "2.574" |
| 2448 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2449 | width: "62.8", |
| 2450 | height: "15", |
| 2451 | x: "1.565", |
| 2452 | y: "236.946", |
| 2453 | fill: "#E1E3E6", |
| 2454 | rx: "5" |
| 2455 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2456 | width: "65.374", |
| 2457 | height: "65.374", |
| 2458 | x: "82.478", |
| 2459 | y: ".779", |
| 2460 | fill: "#E1E3E6", |
| 2461 | rx: "3" |
| 2462 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2463 | width: "47.266", |
| 2464 | height: "5.148", |
| 2465 | x: "91.532", |
| 2466 | y: "76.153", |
| 2467 | fill: "#E1E3E6", |
| 2468 | rx: "2.574" |
| 2469 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2470 | width: "62.8", |
| 2471 | height: "15", |
| 2472 | x: "83.882", |
| 2473 | y: "101.448", |
| 2474 | fill: "#E1E3E6", |
| 2475 | rx: "5" |
| 2476 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2477 | width: "65.374", |
| 2478 | height: "65.374", |
| 2479 | x: "82.478", |
| 2480 | y: "136.277", |
| 2481 | fill: "#E1E3E6", |
| 2482 | rx: "3" |
| 2483 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2484 | width: "47.266", |
| 2485 | height: "5.148", |
| 2486 | x: "91.532", |
| 2487 | y: "211.651", |
| 2488 | fill: "#E1E3E6", |
| 2489 | rx: "2.574" |
| 2490 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2491 | width: "62.8", |
| 2492 | height: "15", |
| 2493 | x: "83.882", |
| 2494 | y: "236.946", |
| 2495 | fill: "#E1E3E6", |
| 2496 | rx: "5" |
| 2497 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2498 | width: "65.374", |
| 2499 | height: "65.374", |
| 2500 | x: "164.788", |
| 2501 | y: ".779", |
| 2502 | fill: "#E1E3E6", |
| 2503 | rx: "3" |
| 2504 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2505 | width: "47.266", |
| 2506 | height: "5.148", |
| 2507 | x: "173.843", |
| 2508 | y: "76.153", |
| 2509 | fill: "#E1E3E6", |
| 2510 | rx: "2.574" |
| 2511 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2512 | width: "62.8", |
| 2513 | height: "15", |
| 2514 | x: "166.192", |
| 2515 | y: "101.448", |
| 2516 | fill: "#E1E3E6", |
| 2517 | rx: "5" |
| 2518 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2519 | width: "65.374", |
| 2520 | height: "65.374", |
| 2521 | x: "164.788", |
| 2522 | y: "136.277", |
| 2523 | fill: "#E1E3E6", |
| 2524 | rx: "3" |
| 2525 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2526 | width: "47.266", |
| 2527 | height: "5.148", |
| 2528 | x: "173.843", |
| 2529 | y: "211.651", |
| 2530 | fill: "#E1E3E6", |
| 2531 | rx: "2.574" |
| 2532 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2533 | width: "62.8", |
| 2534 | height: "15", |
| 2535 | x: "166.192", |
| 2536 | y: "236.946", |
| 2537 | fill: "#E1E3E6", |
| 2538 | rx: "5" |
| 2539 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2540 | width: "6.177", |
| 2541 | height: "6.177", |
| 2542 | x: "13.283", |
| 2543 | y: "86.301", |
| 2544 | fill: "#E1E3E6", |
| 2545 | rx: "3" |
| 2546 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2547 | width: "6.177", |
| 2548 | height: "6.177", |
| 2549 | x: "21.498", |
| 2550 | y: "86.301", |
| 2551 | fill: "#E1E3E6", |
| 2552 | rx: "3" |
| 2553 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2554 | width: "6.177", |
| 2555 | height: "6.177", |
| 2556 | x: "29.713", |
| 2557 | y: "86.301", |
| 2558 | fill: "#E1E3E6", |
| 2559 | rx: "3" |
| 2560 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2561 | width: "6.177", |
| 2562 | height: "6.177", |
| 2563 | x: "37.927", |
| 2564 | y: "86.301", |
| 2565 | fill: "#E1E3E6", |
| 2566 | rx: "3" |
| 2567 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2568 | width: "6.177", |
| 2569 | height: "6.177", |
| 2570 | x: "46.238", |
| 2571 | y: "86.301", |
| 2572 | fill: "#E1E3E6", |
| 2573 | rx: "3" |
| 2574 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2575 | width: "6.177", |
| 2576 | height: "6.177", |
| 2577 | x: "95.599", |
| 2578 | y: "86.301", |
| 2579 | fill: "#E1E3E6", |
| 2580 | rx: "3" |
| 2581 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2582 | width: "6.177", |
| 2583 | height: "6.177", |
| 2584 | x: "103.814", |
| 2585 | y: "86.301", |
| 2586 | fill: "#E1E3E6", |
| 2587 | rx: "3" |
| 2588 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2589 | width: "6.177", |
| 2590 | height: "6.177", |
| 2591 | x: "112.029", |
| 2592 | y: "86.301", |
| 2593 | fill: "#E1E3E6", |
| 2594 | rx: "3" |
| 2595 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2596 | width: "6.177", |
| 2597 | height: "6.177", |
| 2598 | x: "120.243", |
| 2599 | y: "86.301", |
| 2600 | fill: "#E1E3E6", |
| 2601 | rx: "3" |
| 2602 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2603 | width: "6.177", |
| 2604 | height: "6.177", |
| 2605 | x: "128.554", |
| 2606 | y: "86.301", |
| 2607 | fill: "#E1E3E6", |
| 2608 | rx: "3" |
| 2609 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2610 | width: "6.177", |
| 2611 | height: "6.177", |
| 2612 | x: "177.909", |
| 2613 | y: "86.301", |
| 2614 | fill: "#E1E3E6", |
| 2615 | rx: "3" |
| 2616 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2617 | width: "6.177", |
| 2618 | height: "6.177", |
| 2619 | x: "186.124", |
| 2620 | y: "86.301", |
| 2621 | fill: "#E1E3E6", |
| 2622 | rx: "3" |
| 2623 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2624 | width: "6.177", |
| 2625 | height: "6.177", |
| 2626 | x: "194.339", |
| 2627 | y: "86.301", |
| 2628 | fill: "#E1E3E6", |
| 2629 | rx: "3" |
| 2630 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2631 | width: "6.177", |
| 2632 | height: "6.177", |
| 2633 | x: "202.553", |
| 2634 | y: "86.301", |
| 2635 | fill: "#E1E3E6", |
| 2636 | rx: "3" |
| 2637 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2638 | width: "6.177", |
| 2639 | height: "6.177", |
| 2640 | x: "210.864", |
| 2641 | y: "86.301", |
| 2642 | fill: "#E1E3E6", |
| 2643 | rx: "3" |
| 2644 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2645 | width: "6.177", |
| 2646 | height: "6.177", |
| 2647 | x: "13.283", |
| 2648 | y: "221.798", |
| 2649 | fill: "#E1E3E6", |
| 2650 | rx: "3" |
| 2651 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2652 | width: "6.177", |
| 2653 | height: "6.177", |
| 2654 | x: "21.498", |
| 2655 | y: "221.798", |
| 2656 | fill: "#E1E3E6", |
| 2657 | rx: "3" |
| 2658 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2659 | width: "6.177", |
| 2660 | height: "6.177", |
| 2661 | x: "29.713", |
| 2662 | y: "221.798", |
| 2663 | fill: "#E1E3E6", |
| 2664 | rx: "3" |
| 2665 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2666 | width: "6.177", |
| 2667 | height: "6.177", |
| 2668 | x: "37.927", |
| 2669 | y: "221.798", |
| 2670 | fill: "#E1E3E6", |
| 2671 | rx: "3" |
| 2672 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2673 | width: "6.177", |
| 2674 | height: "6.177", |
| 2675 | x: "46.238", |
| 2676 | y: "221.798", |
| 2677 | fill: "#E1E3E6", |
| 2678 | rx: "3" |
| 2679 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2680 | width: "6.177", |
| 2681 | height: "6.177", |
| 2682 | x: "95.599", |
| 2683 | y: "221.798", |
| 2684 | fill: "#E1E3E6", |
| 2685 | rx: "3" |
| 2686 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2687 | width: "6.177", |
| 2688 | height: "6.177", |
| 2689 | x: "103.814", |
| 2690 | y: "221.798", |
| 2691 | fill: "#E1E3E6", |
| 2692 | rx: "3" |
| 2693 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2694 | width: "6.177", |
| 2695 | height: "6.177", |
| 2696 | x: "112.029", |
| 2697 | y: "221.798", |
| 2698 | fill: "#E1E3E6", |
| 2699 | rx: "3" |
| 2700 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2701 | width: "6.177", |
| 2702 | height: "6.177", |
| 2703 | x: "120.243", |
| 2704 | y: "221.798", |
| 2705 | fill: "#E1E3E6", |
| 2706 | rx: "3" |
| 2707 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2708 | width: "6.177", |
| 2709 | height: "6.177", |
| 2710 | x: "128.554", |
| 2711 | y: "221.798", |
| 2712 | fill: "#E1E3E6", |
| 2713 | rx: "3" |
| 2714 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2715 | width: "6.177", |
| 2716 | height: "6.177", |
| 2717 | x: "177.909", |
| 2718 | y: "221.798", |
| 2719 | fill: "#E1E3E6", |
| 2720 | rx: "3" |
| 2721 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2722 | width: "6.177", |
| 2723 | height: "6.177", |
| 2724 | x: "186.124", |
| 2725 | y: "221.798", |
| 2726 | fill: "#E1E3E6", |
| 2727 | rx: "3" |
| 2728 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2729 | width: "6.177", |
| 2730 | height: "6.177", |
| 2731 | x: "194.339", |
| 2732 | y: "221.798", |
| 2733 | fill: "#E1E3E6", |
| 2734 | rx: "3" |
| 2735 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2736 | width: "6.177", |
| 2737 | height: "6.177", |
| 2738 | x: "202.553", |
| 2739 | y: "221.798", |
| 2740 | fill: "#E1E3E6", |
| 2741 | rx: "3" |
| 2742 | }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { |
| 2743 | width: "6.177", |
| 2744 | height: "6.177", |
| 2745 | x: "210.864", |
| 2746 | y: "221.798", |
| 2747 | fill: "#E1E3E6", |
| 2748 | rx: "3" |
| 2749 | })); |
| 2750 | |
| 2751 | /***/ }), |
| 2752 | |
| 2753 | /***/ "./assets/js/settings/blocks/constants.ts": |
| 2754 | /*!************************************************!*\ |
| 2755 | !*** ./assets/js/settings/blocks/constants.ts ***! |
| 2756 | \************************************************/ |
| 2757 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2758 | |
| 2759 | "use strict"; |
| 2760 | __webpack_require__.r(__webpack_exports__); |
| 2761 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2762 | /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* binding */ ADDITIONAL_FIELDS_KEYS), |
| 2763 | /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* binding */ ADDRESS_FIELDS_KEYS), |
| 2764 | /* harmony export */ ALLOWED_COUNTRIES: () => (/* binding */ ALLOWED_COUNTRIES), |
| 2765 | /* harmony export */ ALLOWED_STATES: () => (/* binding */ ALLOWED_STATES), |
| 2766 | /* harmony export */ CART_PAGE_ID: () => (/* binding */ CART_PAGE_ID), |
| 2767 | /* harmony export */ CART_URL: () => (/* binding */ CART_URL), |
| 2768 | /* harmony export */ CHECKOUT_PAGE_ID: () => (/* binding */ CHECKOUT_PAGE_ID), |
| 2769 | /* harmony export */ CHECKOUT_URL: () => (/* binding */ CHECKOUT_URL), |
| 2770 | /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* binding */ CONTACT_FIELDS_KEYS), |
| 2771 | /* harmony export */ COUNTRY_LOCALE: () => (/* binding */ COUNTRY_LOCALE), |
| 2772 | /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* binding */ LOCAL_PICKUP_ENABLED), |
| 2773 | /* harmony export */ LOGIN_URL: () => (/* binding */ LOGIN_URL), |
| 2774 | /* harmony export */ PRIVACY_PAGE_NAME: () => (/* binding */ PRIVACY_PAGE_NAME), |
| 2775 | /* harmony export */ PRIVACY_URL: () => (/* binding */ PRIVACY_URL), |
| 2776 | /* harmony export */ SHIPPING_COUNTRIES: () => (/* binding */ SHIPPING_COUNTRIES), |
| 2777 | /* harmony export */ SHIPPING_STATES: () => (/* binding */ SHIPPING_STATES), |
| 2778 | /* harmony export */ SHOP_URL: () => (/* binding */ SHOP_URL), |
| 2779 | /* harmony export */ TERMS_PAGE_NAME: () => (/* binding */ TERMS_PAGE_NAME), |
| 2780 | /* harmony export */ TERMS_URL: () => (/* binding */ TERMS_URL), |
| 2781 | /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* binding */ WC_BLOCKS_BUILD_URL), |
| 2782 | /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* binding */ WC_BLOCKS_IMAGE_URL), |
| 2783 | /* harmony export */ WC_BLOCKS_PHASE: () => (/* binding */ WC_BLOCKS_PHASE), |
| 2784 | /* harmony export */ blocksConfig: () => (/* binding */ blocksConfig) |
| 2785 | /* harmony export */ }); |
| 2786 | /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings"); |
| 2787 | /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__); |
| 2788 | var _STORE_PAGES$shop, _STORE_PAGES$checkout, _STORE_PAGES$checkout2, _STORE_PAGES$privacy, _STORE_PAGES$privacy2, _STORE_PAGES$terms, _STORE_PAGES$terms2, _STORE_PAGES$cart, _STORE_PAGES$cart2, _STORE_PAGES$myaccoun; |
| 2789 | /** |
| 2790 | * External dependencies |
| 2791 | */ |
| 2792 | |
| 2793 | const blocksConfig = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('wcBlocksConfig', { |
| 2794 | buildPhase: 1, |
| 2795 | pluginUrl: '', |
| 2796 | productCount: 0, |
| 2797 | defaultAvatar: '', |
| 2798 | restApiRoutes: {}, |
| 2799 | wordCountType: 'words' |
| 2800 | }); |
| 2801 | const WC_BLOCKS_IMAGE_URL = blocksConfig.pluginUrl + 'assets/images/'; |
| 2802 | const WC_BLOCKS_BUILD_URL = blocksConfig.pluginUrl + 'assets/client/blocks/'; |
| 2803 | const WC_BLOCKS_PHASE = blocksConfig.buildPhase; |
| 2804 | const SHOP_URL = (_STORE_PAGES$shop = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.shop) === null || _STORE_PAGES$shop === void 0 ? void 0 : _STORE_PAGES$shop.permalink; |
| 2805 | const CHECKOUT_PAGE_ID = (_STORE_PAGES$checkout = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.checkout) === null || _STORE_PAGES$checkout === void 0 ? void 0 : _STORE_PAGES$checkout.id; |
| 2806 | const CHECKOUT_URL = (_STORE_PAGES$checkout2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.checkout) === null || _STORE_PAGES$checkout2 === void 0 ? void 0 : _STORE_PAGES$checkout2.permalink; |
| 2807 | const PRIVACY_URL = (_STORE_PAGES$privacy = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.privacy) === null || _STORE_PAGES$privacy === void 0 ? void 0 : _STORE_PAGES$privacy.permalink; |
| 2808 | const PRIVACY_PAGE_NAME = (_STORE_PAGES$privacy2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.privacy) === null || _STORE_PAGES$privacy2 === void 0 ? void 0 : _STORE_PAGES$privacy2.title; |
| 2809 | const TERMS_URL = (_STORE_PAGES$terms = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.terms) === null || _STORE_PAGES$terms === void 0 ? void 0 : _STORE_PAGES$terms.permalink; |
| 2810 | const TERMS_PAGE_NAME = (_STORE_PAGES$terms2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.terms) === null || _STORE_PAGES$terms2 === void 0 ? void 0 : _STORE_PAGES$terms2.title; |
| 2811 | const CART_PAGE_ID = (_STORE_PAGES$cart = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.cart) === null || _STORE_PAGES$cart === void 0 ? void 0 : _STORE_PAGES$cart.id; |
| 2812 | const CART_URL = (_STORE_PAGES$cart2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.cart) === null || _STORE_PAGES$cart2 === void 0 ? void 0 : _STORE_PAGES$cart2.permalink; |
| 2813 | const LOGIN_URL = (_STORE_PAGES$myaccoun = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.myaccount) !== null && _STORE_PAGES$myaccoun !== void 0 && _STORE_PAGES$myaccoun.permalink ? _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.myaccount.permalink : (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('wpLoginUrl', '/wp-login.php'); |
| 2814 | const LOCAL_PICKUP_ENABLED = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('localPickupEnabled', false); |
| 2815 | // Contains country names. |
| 2816 | const countries = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countries', {}); |
| 2817 | |
| 2818 | // Contains country settings. |
| 2819 | const countryData = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countryData', {}); |
| 2820 | const ALLOWED_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => { |
| 2821 | return countryData[countryCode].allowBilling === true; |
| 2822 | }).map(countryCode => { |
| 2823 | return [countryCode, countries[countryCode] || '']; |
| 2824 | })); |
| 2825 | const ALLOWED_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => { |
| 2826 | return countryData[countryCode].allowBilling === true; |
| 2827 | }).map(countryCode => { |
| 2828 | return [countryCode, countryData[countryCode].states || []]; |
| 2829 | })); |
| 2830 | const SHIPPING_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => { |
| 2831 | return countryData[countryCode].allowShipping === true; |
| 2832 | }).map(countryCode => { |
| 2833 | return [countryCode, countries[countryCode] || '']; |
| 2834 | })); |
| 2835 | const SHIPPING_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => { |
| 2836 | return countryData[countryCode].allowShipping === true; |
| 2837 | }).map(countryCode => { |
| 2838 | return [countryCode, countryData[countryCode].states || []]; |
| 2839 | })); |
| 2840 | const COUNTRY_LOCALE = Object.fromEntries(Object.keys(countryData).map(countryCode => { |
| 2841 | return [countryCode, countryData[countryCode].locale || []]; |
| 2842 | })); |
| 2843 | const defaultFieldsLocations = { |
| 2844 | address: ['first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'postcode', 'country', 'state', 'phone'], |
| 2845 | contact: ['email'], |
| 2846 | additional: [] |
| 2847 | }; |
| 2848 | const ADDRESS_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).address; |
| 2849 | const CONTACT_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).contact; |
| 2850 | const ADDITIONAL_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).additional; |
| 2851 | |
| 2852 | /***/ }), |
| 2853 | |
| 2854 | /***/ "./assets/js/settings/blocks/feature-flags.ts": |
| 2855 | /*!****************************************************!*\ |
| 2856 | !*** ./assets/js/settings/blocks/feature-flags.ts ***! |
| 2857 | \****************************************************/ |
| 2858 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2859 | |
| 2860 | "use strict"; |
| 2861 | __webpack_require__.r(__webpack_exports__); |
| 2862 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2863 | /* harmony export */ isExperimentalBuild: () => (/* binding */ isExperimentalBuild), |
| 2864 | /* harmony export */ isFeaturePluginBuild: () => (/* binding */ isFeaturePluginBuild), |
| 2865 | /* harmony export */ registerExperimentalBlockType: () => (/* binding */ registerExperimentalBlockType), |
| 2866 | /* harmony export */ registerFeaturePluginBlockType: () => (/* binding */ registerFeaturePluginBlockType) |
| 2867 | /* harmony export */ }); |
| 2868 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); |
| 2869 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); |
| 2870 | /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts"); |
| 2871 | /** |
| 2872 | * External dependencies |
| 2873 | */ |
| 2874 | |
| 2875 | /** |
| 2876 | * Internal dependencies |
| 2877 | */ |
| 2878 | |
| 2879 | |
| 2880 | /** |
| 2881 | * Registers a new experimental block provided a unique name and an object defining its |
| 2882 | * behavior. Once registered, the block is made available as an option to any |
| 2883 | * editor interface where blocks are implemented. |
| 2884 | */ |
| 2885 | const registerExperimentalBlockType = (blockNameOrMetadata, settings) => { |
| 2886 | if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2) { |
| 2887 | return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings); |
| 2888 | } |
| 2889 | }; |
| 2890 | |
| 2891 | /** |
| 2892 | * Registers a new feature plugin block provided a unique name and an object |
| 2893 | * defining its behavior. Once registered, the block is made available as an |
| 2894 | * option to any editor interface where blocks are implemented. |
| 2895 | */ |
| 2896 | const registerFeaturePluginBlockType = (blockNameOrMetadata, settings) => { |
| 2897 | if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1) { |
| 2898 | return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings); |
| 2899 | } |
| 2900 | }; |
| 2901 | |
| 2902 | /** |
| 2903 | * Checks if we're executing the code in an experimental build mode. |
| 2904 | * |
| 2905 | * @return {boolean} True if this is an experimental build, false otherwise. |
| 2906 | */ |
| 2907 | const isExperimentalBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2; |
| 2908 | |
| 2909 | /** |
| 2910 | * Checks if we're executing the code in an feature plugin or experimental build mode. |
| 2911 | * |
| 2912 | * @return {boolean} True if this is an experimental or feature plugin build, false otherwise. |
| 2913 | */ |
| 2914 | const isFeaturePluginBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1; |
| 2915 | |
| 2916 | /***/ }), |
| 2917 | |
| 2918 | /***/ "./assets/js/settings/blocks/index.ts": |
| 2919 | /*!********************************************!*\ |
| 2920 | !*** ./assets/js/settings/blocks/index.ts ***! |
| 2921 | \********************************************/ |
| 2922 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2923 | |
| 2924 | "use strict"; |
| 2925 | __webpack_require__.r(__webpack_exports__); |
| 2926 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2927 | /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDITIONAL_FIELDS_KEYS), |
| 2928 | /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDRESS_FIELDS_KEYS), |
| 2929 | /* harmony export */ ALLOWED_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_COUNTRIES), |
| 2930 | /* harmony export */ ALLOWED_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_STATES), |
| 2931 | /* harmony export */ CART_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_PAGE_ID), |
| 2932 | /* harmony export */ CART_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_URL), |
| 2933 | /* harmony export */ CHECKOUT_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_PAGE_ID), |
| 2934 | /* harmony export */ CHECKOUT_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_URL), |
| 2935 | /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CONTACT_FIELDS_KEYS), |
| 2936 | /* harmony export */ COUNTRY_LOCALE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.COUNTRY_LOCALE), |
| 2937 | /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOCAL_PICKUP_ENABLED), |
| 2938 | /* harmony export */ LOGIN_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOGIN_URL), |
| 2939 | /* harmony export */ PRIVACY_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_PAGE_NAME), |
| 2940 | /* harmony export */ PRIVACY_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_URL), |
| 2941 | /* harmony export */ SHIPPING_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_COUNTRIES), |
| 2942 | /* harmony export */ SHIPPING_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_STATES), |
| 2943 | /* harmony export */ SHOP_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHOP_URL), |
| 2944 | /* harmony export */ TERMS_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_PAGE_NAME), |
| 2945 | /* harmony export */ TERMS_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_URL), |
| 2946 | /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_BUILD_URL), |
| 2947 | /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_IMAGE_URL), |
| 2948 | /* harmony export */ WC_BLOCKS_PHASE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_PHASE), |
| 2949 | /* harmony export */ blocksConfig: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.blocksConfig), |
| 2950 | /* harmony export */ isExperimentalBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isExperimentalBuild), |
| 2951 | /* harmony export */ isFeaturePluginBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isFeaturePluginBuild), |
| 2952 | /* harmony export */ registerExperimentalBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerExperimentalBlockType), |
| 2953 | /* harmony export */ registerFeaturePluginBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerFeaturePluginBlockType) |
| 2954 | /* harmony export */ }); |
| 2955 | /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts"); |
| 2956 | /* harmony import */ var _feature_flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./feature-flags */ "./assets/js/settings/blocks/feature-flags.ts"); |
| 2957 | /** |
| 2958 | * Internal dependencies |
| 2959 | */ |
| 2960 | |
| 2961 | |
| 2962 | |
| 2963 | /***/ }), |
| 2964 | |
| 2965 | /***/ "./assets/js/types/type-guards/error.ts": |
| 2966 | /*!**********************************************!*\ |
| 2967 | !*** ./assets/js/types/type-guards/error.ts ***! |
| 2968 | \**********************************************/ |
| 2969 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2970 | |
| 2971 | "use strict"; |
| 2972 | __webpack_require__.r(__webpack_exports__); |
| 2973 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2974 | /* harmony export */ isError: () => (/* binding */ isError) |
| 2975 | /* harmony export */ }); |
| 2976 | const isError = term => { |
| 2977 | return term instanceof Error; |
| 2978 | }; |
| 2979 | |
| 2980 | /***/ }), |
| 2981 | |
| 2982 | /***/ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js": |
| 2983 | /*!**********************************************************************************!*\ |
| 2984 | !*** ../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js ***! |
| 2985 | \**********************************************************************************/ |
| 2986 | /***/ ((module, exports) => { |
| 2987 | |
| 2988 | var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! |
| 2989 | Copyright (c) 2018 Jed Watson. |
| 2990 | Licensed under the MIT License (MIT), see |
| 2991 | http://jedwatson.github.io/classnames |
| 2992 | */ |
| 2993 | /* global define */ |
| 2994 | |
| 2995 | (function () { |
| 2996 | 'use strict'; |
| 2997 | |
| 2998 | var hasOwn = {}.hasOwnProperty; |
| 2999 | |
| 3000 | function classNames() { |
| 3001 | var classes = []; |
| 3002 | |
| 3003 | for (var i = 0; i < arguments.length; i++) { |
| 3004 | var arg = arguments[i]; |
| 3005 | if (!arg) continue; |
| 3006 | |
| 3007 | var argType = typeof arg; |
| 3008 | |
| 3009 | if (argType === 'string' || argType === 'number') { |
| 3010 | classes.push(arg); |
| 3011 | } else if (Array.isArray(arg)) { |
| 3012 | if (arg.length) { |
| 3013 | var inner = classNames.apply(null, arg); |
| 3014 | if (inner) { |
| 3015 | classes.push(inner); |
| 3016 | } |
| 3017 | } |
| 3018 | } else if (argType === 'object') { |
| 3019 | if (arg.toString === Object.prototype.toString) { |
| 3020 | for (var key in arg) { |
| 3021 | if (hasOwn.call(arg, key) && arg[key]) { |
| 3022 | classes.push(key); |
| 3023 | } |
| 3024 | } |
| 3025 | } else { |
| 3026 | classes.push(arg.toString()); |
| 3027 | } |
| 3028 | } |
| 3029 | } |
| 3030 | |
| 3031 | return classes.join(' '); |
| 3032 | } |
| 3033 | |
| 3034 | if ( true && module.exports) { |
| 3035 | classNames.default = classNames; |
| 3036 | module.exports = classNames; |
| 3037 | } else if (true) { |
| 3038 | // register as 'classnames', consistent with npm package name |
| 3039 | !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { |
| 3040 | return classNames; |
| 3041 | }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), |
| 3042 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); |
| 3043 | } else {} |
| 3044 | }()); |
| 3045 | |
| 3046 | |
| 3047 | /***/ }), |
| 3048 | |
| 3049 | /***/ "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js": |
| 3050 | /*!************************************************************************************************!*\ |
| 3051 | !*** ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js ***! |
| 3052 | \************************************************************************************************/ |
| 3053 | /***/ ((module) => { |
| 3054 | |
| 3055 | "use strict"; |
| 3056 | |
| 3057 | |
| 3058 | // do not edit .js files directly - edit src/index.jst |
| 3059 | |
| 3060 | |
| 3061 | var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; |
| 3062 | |
| 3063 | |
| 3064 | module.exports = function equal(a, b) { |
| 3065 | if (a === b) return true; |
| 3066 | |
| 3067 | if (a && b && typeof a == 'object' && typeof b == 'object') { |
| 3068 | if (a.constructor !== b.constructor) return false; |
| 3069 | |
| 3070 | var length, i, keys; |
| 3071 | if (Array.isArray(a)) { |
| 3072 | length = a.length; |
| 3073 | if (length != b.length) return false; |
| 3074 | for (i = length; i-- !== 0;) |
| 3075 | if (!equal(a[i], b[i])) return false; |
| 3076 | return true; |
| 3077 | } |
| 3078 | |
| 3079 | |
| 3080 | if ((a instanceof Map) && (b instanceof Map)) { |
| 3081 | if (a.size !== b.size) return false; |
| 3082 | for (i of a.entries()) |
| 3083 | if (!b.has(i[0])) return false; |
| 3084 | for (i of a.entries()) |
| 3085 | if (!equal(i[1], b.get(i[0]))) return false; |
| 3086 | return true; |
| 3087 | } |
| 3088 | |
| 3089 | if ((a instanceof Set) && (b instanceof Set)) { |
| 3090 | if (a.size !== b.size) return false; |
| 3091 | for (i of a.entries()) |
| 3092 | if (!b.has(i[0])) return false; |
| 3093 | return true; |
| 3094 | } |
| 3095 | |
| 3096 | if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { |
| 3097 | length = a.length; |
| 3098 | if (length != b.length) return false; |
| 3099 | for (i = length; i-- !== 0;) |
| 3100 | if (a[i] !== b[i]) return false; |
| 3101 | return true; |
| 3102 | } |
| 3103 | |
| 3104 | |
| 3105 | if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; |
| 3106 | if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); |
| 3107 | if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); |
| 3108 | |
| 3109 | keys = Object.keys(a); |
| 3110 | length = keys.length; |
| 3111 | if (length !== Object.keys(b).length) return false; |
| 3112 | |
| 3113 | for (i = length; i-- !== 0;) |
| 3114 | if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; |
| 3115 | |
| 3116 | for (i = length; i-- !== 0;) { |
| 3117 | var key = keys[i]; |
| 3118 | |
| 3119 | if (!equal(a[key], b[key])) return false; |
| 3120 | } |
| 3121 | |
| 3122 | return true; |
| 3123 | } |
| 3124 | |
| 3125 | // true if both NaN, false otherwise |
| 3126 | return a!==a && b!==b; |
| 3127 | }; |
| 3128 | |
| 3129 | |
| 3130 | /***/ }), |
| 3131 | |
| 3132 | /***/ "./assets/js/base/components/block-error-boundary/style.scss": |
| 3133 | /*!*******************************************************************!*\ |
| 3134 | !*** ./assets/js/base/components/block-error-boundary/style.scss ***! |
| 3135 | \*******************************************************************/ |
| 3136 | /***/ (() => { |
| 3137 | |
| 3138 | |
| 3139 | |
| 3140 | /***/ }), |
| 3141 | |
| 3142 | /***/ "./assets/js/base/components/pagination/style.scss": |
| 3143 | /*!*********************************************************!*\ |
| 3144 | !*** ./assets/js/base/components/pagination/style.scss ***! |
| 3145 | \*********************************************************/ |
| 3146 | /***/ (() => { |
| 3147 | |
| 3148 | |
| 3149 | |
| 3150 | /***/ }), |
| 3151 | |
| 3152 | /***/ "./assets/js/base/components/product-list/product-sort-select/style.scss": |
| 3153 | /*!*******************************************************************************!*\ |
| 3154 | !*** ./assets/js/base/components/product-list/product-sort-select/style.scss ***! |
| 3155 | \*******************************************************************************/ |
| 3156 | /***/ (() => { |
| 3157 | |
| 3158 | |
| 3159 | |
| 3160 | /***/ }), |
| 3161 | |
| 3162 | /***/ "./assets/js/base/components/product-list/style.scss": |
| 3163 | /*!***********************************************************!*\ |
| 3164 | !*** ./assets/js/base/components/product-list/style.scss ***! |
| 3165 | \***********************************************************/ |
| 3166 | /***/ (() => { |
| 3167 | |
| 3168 | |
| 3169 | |
| 3170 | /***/ }), |
| 3171 | |
| 3172 | /***/ "./assets/js/base/hocs/with-scroll-to-top/style.scss": |
| 3173 | /*!***********************************************************!*\ |
| 3174 | !*** ./assets/js/base/hocs/with-scroll-to-top/style.scss ***! |
| 3175 | \***********************************************************/ |
| 3176 | /***/ (() => { |
| 3177 | |
| 3178 | |
| 3179 | |
| 3180 | /***/ }), |
| 3181 | |
| 3182 | /***/ "react": |
| 3183 | /*!************************!*\ |
| 3184 | !*** external "React" ***! |
| 3185 | \************************/ |
| 3186 | /***/ ((module) => { |
| 3187 | |
| 3188 | "use strict"; |
| 3189 | module.exports = window["React"]; |
| 3190 | |
| 3191 | /***/ }), |
| 3192 | |
| 3193 | /***/ "lodash": |
| 3194 | /*!*************************!*\ |
| 3195 | !*** external "lodash" ***! |
| 3196 | \*************************/ |
| 3197 | /***/ ((module) => { |
| 3198 | |
| 3199 | "use strict"; |
| 3200 | module.exports = window["lodash"]; |
| 3201 | |
| 3202 | /***/ }), |
| 3203 | |
| 3204 | /***/ "@woocommerce/blocks-components": |
| 3205 | /*!******************************************!*\ |
| 3206 | !*** external ["wc","blocksComponents"] ***! |
| 3207 | \******************************************/ |
| 3208 | /***/ ((module) => { |
| 3209 | |
| 3210 | "use strict"; |
| 3211 | module.exports = window["wc"]["blocksComponents"]; |
| 3212 | |
| 3213 | /***/ }), |
| 3214 | |
| 3215 | /***/ "@woocommerce/price-format": |
| 3216 | /*!*************************************!*\ |
| 3217 | !*** external ["wc","priceFormat"] ***! |
| 3218 | \*************************************/ |
| 3219 | /***/ ((module) => { |
| 3220 | |
| 3221 | "use strict"; |
| 3222 | module.exports = window["wc"]["priceFormat"]; |
| 3223 | |
| 3224 | /***/ }), |
| 3225 | |
| 3226 | /***/ "@woocommerce/block-data": |
| 3227 | /*!**************************************!*\ |
| 3228 | !*** external ["wc","wcBlocksData"] ***! |
| 3229 | \**************************************/ |
| 3230 | /***/ ((module) => { |
| 3231 | |
| 3232 | "use strict"; |
| 3233 | module.exports = window["wc"]["wcBlocksData"]; |
| 3234 | |
| 3235 | /***/ }), |
| 3236 | |
| 3237 | /***/ "@woocommerce/blocks-registry": |
| 3238 | /*!******************************************!*\ |
| 3239 | !*** external ["wc","wcBlocksRegistry"] ***! |
| 3240 | \******************************************/ |
| 3241 | /***/ ((module) => { |
| 3242 | |
| 3243 | "use strict"; |
| 3244 | module.exports = window["wc"]["wcBlocksRegistry"]; |
| 3245 | |
| 3246 | /***/ }), |
| 3247 | |
| 3248 | /***/ "@woocommerce/shared-context": |
| 3249 | /*!***********************************************!*\ |
| 3250 | !*** external ["wc","wcBlocksSharedContext"] ***! |
| 3251 | \***********************************************/ |
| 3252 | /***/ ((module) => { |
| 3253 | |
| 3254 | "use strict"; |
| 3255 | module.exports = window["wc"]["wcBlocksSharedContext"]; |
| 3256 | |
| 3257 | /***/ }), |
| 3258 | |
| 3259 | /***/ "@woocommerce/shared-hocs": |
| 3260 | /*!********************************************!*\ |
| 3261 | !*** external ["wc","wcBlocksSharedHocs"] ***! |
| 3262 | \********************************************/ |
| 3263 | /***/ ((module) => { |
| 3264 | |
| 3265 | "use strict"; |
| 3266 | module.exports = window["wc"]["wcBlocksSharedHocs"]; |
| 3267 | |
| 3268 | /***/ }), |
| 3269 | |
| 3270 | /***/ "@woocommerce/settings": |
| 3271 | /*!************************************!*\ |
| 3272 | !*** external ["wc","wcSettings"] ***! |
| 3273 | \************************************/ |
| 3274 | /***/ ((module) => { |
| 3275 | |
| 3276 | "use strict"; |
| 3277 | module.exports = window["wc"]["wcSettings"]; |
| 3278 | |
| 3279 | /***/ }), |
| 3280 | |
| 3281 | /***/ "@wordpress/a11y": |
| 3282 | /*!******************************!*\ |
| 3283 | !*** external ["wp","a11y"] ***! |
| 3284 | \******************************/ |
| 3285 | /***/ ((module) => { |
| 3286 | |
| 3287 | "use strict"; |
| 3288 | module.exports = window["wp"]["a11y"]; |
| 3289 | |
| 3290 | /***/ }), |
| 3291 | |
| 3292 | /***/ "@wordpress/api-fetch": |
| 3293 | /*!**********************************!*\ |
| 3294 | !*** external ["wp","apiFetch"] ***! |
| 3295 | \**********************************/ |
| 3296 | /***/ ((module) => { |
| 3297 | |
| 3298 | "use strict"; |
| 3299 | module.exports = window["wp"]["apiFetch"]; |
| 3300 | |
| 3301 | /***/ }), |
| 3302 | |
| 3303 | /***/ "@wordpress/autop": |
| 3304 | /*!*******************************!*\ |
| 3305 | !*** external ["wp","autop"] ***! |
| 3306 | \*******************************/ |
| 3307 | /***/ ((module) => { |
| 3308 | |
| 3309 | "use strict"; |
| 3310 | module.exports = window["wp"]["autop"]; |
| 3311 | |
| 3312 | /***/ }), |
| 3313 | |
| 3314 | /***/ "@wordpress/blocks": |
| 3315 | /*!********************************!*\ |
| 3316 | !*** external ["wp","blocks"] ***! |
| 3317 | \********************************/ |
| 3318 | /***/ ((module) => { |
| 3319 | |
| 3320 | "use strict"; |
| 3321 | module.exports = window["wp"]["blocks"]; |
| 3322 | |
| 3323 | /***/ }), |
| 3324 | |
| 3325 | /***/ "@wordpress/components": |
| 3326 | /*!************************************!*\ |
| 3327 | !*** external ["wp","components"] ***! |
| 3328 | \************************************/ |
| 3329 | /***/ ((module) => { |
| 3330 | |
| 3331 | "use strict"; |
| 3332 | module.exports = window["wp"]["components"]; |
| 3333 | |
| 3334 | /***/ }), |
| 3335 | |
| 3336 | /***/ "@wordpress/compose": |
| 3337 | /*!*********************************!*\ |
| 3338 | !*** external ["wp","compose"] ***! |
| 3339 | \*********************************/ |
| 3340 | /***/ ((module) => { |
| 3341 | |
| 3342 | "use strict"; |
| 3343 | module.exports = window["wp"]["compose"]; |
| 3344 | |
| 3345 | /***/ }), |
| 3346 | |
| 3347 | /***/ "@wordpress/data": |
| 3348 | /*!******************************!*\ |
| 3349 | !*** external ["wp","data"] ***! |
| 3350 | \******************************/ |
| 3351 | /***/ ((module) => { |
| 3352 | |
| 3353 | "use strict"; |
| 3354 | module.exports = window["wp"]["data"]; |
| 3355 | |
| 3356 | /***/ }), |
| 3357 | |
| 3358 | /***/ "@wordpress/deprecated": |
| 3359 | /*!************************************!*\ |
| 3360 | !*** external ["wp","deprecated"] ***! |
| 3361 | \************************************/ |
| 3362 | /***/ ((module) => { |
| 3363 | |
| 3364 | "use strict"; |
| 3365 | module.exports = window["wp"]["deprecated"]; |
| 3366 | |
| 3367 | /***/ }), |
| 3368 | |
| 3369 | /***/ "@wordpress/dom": |
| 3370 | /*!*****************************!*\ |
| 3371 | !*** external ["wp","dom"] ***! |
| 3372 | \*****************************/ |
| 3373 | /***/ ((module) => { |
| 3374 | |
| 3375 | "use strict"; |
| 3376 | module.exports = window["wp"]["dom"]; |
| 3377 | |
| 3378 | /***/ }), |
| 3379 | |
| 3380 | /***/ "@wordpress/element": |
| 3381 | /*!*********************************!*\ |
| 3382 | !*** external ["wp","element"] ***! |
| 3383 | \*********************************/ |
| 3384 | /***/ ((module) => { |
| 3385 | |
| 3386 | "use strict"; |
| 3387 | module.exports = window["wp"]["element"]; |
| 3388 | |
| 3389 | /***/ }), |
| 3390 | |
| 3391 | /***/ "@wordpress/hooks": |
| 3392 | /*!*******************************!*\ |
| 3393 | !*** external ["wp","hooks"] ***! |
| 3394 | \*******************************/ |
| 3395 | /***/ ((module) => { |
| 3396 | |
| 3397 | "use strict"; |
| 3398 | module.exports = window["wp"]["hooks"]; |
| 3399 | |
| 3400 | /***/ }), |
| 3401 | |
| 3402 | /***/ "@wordpress/html-entities": |
| 3403 | /*!**************************************!*\ |
| 3404 | !*** external ["wp","htmlEntities"] ***! |
| 3405 | \**************************************/ |
| 3406 | /***/ ((module) => { |
| 3407 | |
| 3408 | "use strict"; |
| 3409 | module.exports = window["wp"]["htmlEntities"]; |
| 3410 | |
| 3411 | /***/ }), |
| 3412 | |
| 3413 | /***/ "@wordpress/i18n": |
| 3414 | /*!******************************!*\ |
| 3415 | !*** external ["wp","i18n"] ***! |
| 3416 | \******************************/ |
| 3417 | /***/ ((module) => { |
| 3418 | |
| 3419 | "use strict"; |
| 3420 | module.exports = window["wp"]["i18n"]; |
| 3421 | |
| 3422 | /***/ }), |
| 3423 | |
| 3424 | /***/ "@wordpress/is-shallow-equal": |
| 3425 | /*!****************************************!*\ |
| 3426 | !*** external ["wp","isShallowEqual"] ***! |
| 3427 | \****************************************/ |
| 3428 | /***/ ((module) => { |
| 3429 | |
| 3430 | "use strict"; |
| 3431 | module.exports = window["wp"]["isShallowEqual"]; |
| 3432 | |
| 3433 | /***/ }), |
| 3434 | |
| 3435 | /***/ "@wordpress/primitives": |
| 3436 | /*!************************************!*\ |
| 3437 | !*** external ["wp","primitives"] ***! |
| 3438 | \************************************/ |
| 3439 | /***/ ((module) => { |
| 3440 | |
| 3441 | "use strict"; |
| 3442 | module.exports = window["wp"]["primitives"]; |
| 3443 | |
| 3444 | /***/ }), |
| 3445 | |
| 3446 | /***/ "@wordpress/style-engine": |
| 3447 | /*!*************************************!*\ |
| 3448 | !*** external ["wp","styleEngine"] ***! |
| 3449 | \*************************************/ |
| 3450 | /***/ ((module) => { |
| 3451 | |
| 3452 | "use strict"; |
| 3453 | module.exports = window["wp"]["styleEngine"]; |
| 3454 | |
| 3455 | /***/ }), |
| 3456 | |
| 3457 | /***/ "@wordpress/url": |
| 3458 | /*!*****************************!*\ |
| 3459 | !*** external ["wp","url"] ***! |
| 3460 | \*****************************/ |
| 3461 | /***/ ((module) => { |
| 3462 | |
| 3463 | "use strict"; |
| 3464 | module.exports = window["wp"]["url"]; |
| 3465 | |
| 3466 | /***/ }), |
| 3467 | |
| 3468 | /***/ "@wordpress/warning": |
| 3469 | /*!*********************************!*\ |
| 3470 | !*** external ["wp","warning"] ***! |
| 3471 | \*********************************/ |
| 3472 | /***/ ((module) => { |
| 3473 | |
| 3474 | "use strict"; |
| 3475 | module.exports = window["wp"]["warning"]; |
| 3476 | |
| 3477 | /***/ }), |
| 3478 | |
| 3479 | /***/ "@wordpress/wordcount": |
| 3480 | /*!***********************************!*\ |
| 3481 | !*** external ["wp","wordcount"] ***! |
| 3482 | \***********************************/ |
| 3483 | /***/ ((module) => { |
| 3484 | |
| 3485 | "use strict"; |
| 3486 | module.exports = window["wp"]["wordcount"]; |
| 3487 | |
| 3488 | /***/ }), |
| 3489 | |
| 3490 | /***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js": |
| 3491 | /*!****************************************************************************************************************!*\ |
| 3492 | !*** ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! |
| 3493 | \****************************************************************************************************************/ |
| 3494 | /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 3495 | |
| 3496 | "use strict"; |
| 3497 | __webpack_require__.r(__webpack_exports__); |
| 3498 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3499 | /* harmony export */ "default": () => (/* binding */ _defineProperty) |
| 3500 | /* harmony export */ }); |
| 3501 | /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); |
| 3502 | |
| 3503 | function _defineProperty(obj, key, value) { |
| 3504 | key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key); |
| 3505 | if (key in obj) { |
| 3506 | Object.defineProperty(obj, key, { |
| 3507 | value: value, |
| 3508 | enumerable: true, |
| 3509 | configurable: true, |
| 3510 | writable: true |
| 3511 | }); |
| 3512 | } else { |
| 3513 | obj[key] = value; |
| 3514 | } |
| 3515 | return obj; |
| 3516 | } |
| 3517 | |
| 3518 | /***/ }), |
| 3519 | |
| 3520 | /***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js": |
| 3521 | /*!*************************************************************************************************************!*\ |
| 3522 | !*** ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! |
| 3523 | \*************************************************************************************************************/ |
| 3524 | /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 3525 | |
| 3526 | "use strict"; |
| 3527 | __webpack_require__.r(__webpack_exports__); |
| 3528 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3529 | /* harmony export */ "default": () => (/* binding */ _toPrimitive) |
| 3530 | /* harmony export */ }); |
| 3531 | /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js"); |
| 3532 | |
| 3533 | function _toPrimitive(input, hint) { |
| 3534 | if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input; |
| 3535 | var prim = input[Symbol.toPrimitive]; |
| 3536 | if (prim !== undefined) { |
| 3537 | var res = prim.call(input, hint || "default"); |
| 3538 | if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res; |
| 3539 | throw new TypeError("@@toPrimitive must return a primitive value."); |
| 3540 | } |
| 3541 | return (hint === "string" ? String : Number)(input); |
| 3542 | } |
| 3543 | |
| 3544 | /***/ }), |
| 3545 | |
| 3546 | /***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": |
| 3547 | /*!***************************************************************************************************************!*\ |
| 3548 | !*** ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! |
| 3549 | \***************************************************************************************************************/ |
| 3550 | /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 3551 | |
| 3552 | "use strict"; |
| 3553 | __webpack_require__.r(__webpack_exports__); |
| 3554 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3555 | /* harmony export */ "default": () => (/* binding */ _toPropertyKey) |
| 3556 | /* harmony export */ }); |
| 3557 | /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js"); |
| 3558 | /* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); |
| 3559 | |
| 3560 | |
| 3561 | function _toPropertyKey(arg) { |
| 3562 | var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string"); |
| 3563 | return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key); |
| 3564 | } |
| 3565 | |
| 3566 | /***/ }), |
| 3567 | |
| 3568 | /***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js": |
| 3569 | /*!********************************************************************************************************!*\ |
| 3570 | !*** ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js ***! |
| 3571 | \********************************************************************************************************/ |
| 3572 | /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 3573 | |
| 3574 | "use strict"; |
| 3575 | __webpack_require__.r(__webpack_exports__); |
| 3576 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3577 | /* harmony export */ "default": () => (/* binding */ _typeof) |
| 3578 | /* harmony export */ }); |
| 3579 | function _typeof(o) { |
| 3580 | "@babel/helpers - typeof"; |
| 3581 | |
| 3582 | return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 3583 | return typeof o; |
| 3584 | } : function (o) { |
| 3585 | return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 3586 | }, _typeof(o); |
| 3587 | } |
| 3588 | |
| 3589 | /***/ }) |
| 3590 | |
| 3591 | /******/ }); |
| 3592 | /************************************************************************/ |
| 3593 | /******/ // The module cache |
| 3594 | /******/ var __webpack_module_cache__ = {}; |
| 3595 | /******/ |
| 3596 | /******/ // The require function |
| 3597 | /******/ function __webpack_require__(moduleId) { |
| 3598 | /******/ // Check if module is in cache |
| 3599 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 3600 | /******/ if (cachedModule !== undefined) { |
| 3601 | /******/ return cachedModule.exports; |
| 3602 | /******/ } |
| 3603 | /******/ // Create a new module (and put it into the cache) |
| 3604 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 3605 | /******/ // no module.id needed |
| 3606 | /******/ // no module.loaded needed |
| 3607 | /******/ exports: {} |
| 3608 | /******/ }; |
| 3609 | /******/ |
| 3610 | /******/ // Execute the module function |
| 3611 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 3612 | /******/ |
| 3613 | /******/ // Return the exports of the module |
| 3614 | /******/ return module.exports; |
| 3615 | /******/ } |
| 3616 | /******/ |
| 3617 | /******/ // expose the modules object (__webpack_modules__) |
| 3618 | /******/ __webpack_require__.m = __webpack_modules__; |
| 3619 | /******/ |
| 3620 | /************************************************************************/ |
| 3621 | /******/ /* webpack/runtime/compat get default export */ |
| 3622 | /******/ (() => { |
| 3623 | /******/ // getDefaultExport function for compatibility with non-harmony modules |
| 3624 | /******/ __webpack_require__.n = (module) => { |
| 3625 | /******/ var getter = module && module.__esModule ? |
| 3626 | /******/ () => (module['default']) : |
| 3627 | /******/ () => (module); |
| 3628 | /******/ __webpack_require__.d(getter, { a: getter }); |
| 3629 | /******/ return getter; |
| 3630 | /******/ }; |
| 3631 | /******/ })(); |
| 3632 | /******/ |
| 3633 | /******/ /* webpack/runtime/define property getters */ |
| 3634 | /******/ (() => { |
| 3635 | /******/ // define getter functions for harmony exports |
| 3636 | /******/ __webpack_require__.d = (exports, definition) => { |
| 3637 | /******/ for(var key in definition) { |
| 3638 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 3639 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 3640 | /******/ } |
| 3641 | /******/ } |
| 3642 | /******/ }; |
| 3643 | /******/ })(); |
| 3644 | /******/ |
| 3645 | /******/ /* webpack/runtime/ensure chunk */ |
| 3646 | /******/ (() => { |
| 3647 | /******/ __webpack_require__.f = {}; |
| 3648 | /******/ // This file contains only the entry chunk. |
| 3649 | /******/ // The chunk loading function for additional chunks |
| 3650 | /******/ __webpack_require__.e = (chunkId) => { |
| 3651 | /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { |
| 3652 | /******/ __webpack_require__.f[key](chunkId, promises); |
| 3653 | /******/ return promises; |
| 3654 | /******/ }, [])); |
| 3655 | /******/ }; |
| 3656 | /******/ })(); |
| 3657 | /******/ |
| 3658 | /******/ /* webpack/runtime/get javascript chunk filename */ |
| 3659 | /******/ (() => { |
| 3660 | /******/ // This function allow to reference async chunks |
| 3661 | /******/ __webpack_require__.u = (chunkId) => { |
| 3662 | /******/ // return url for filenames based on template |
| 3663 | /******/ return "" + chunkId + "-frontend.js?ver=" + {"product-price":"d420d375d2d70bbbc35d","product-image":"3243eb2d5c4934bd2891","product-title":"c757c854634c84be664f","product-rating":"e81c9591f5651aa2ff4a","product-rating-stars":"d38741d346082b0ee1ce","product-rating-counter":"34f75469f4f1c750c241","product-average-rating":"49410106ff2a39b674a5","product-button":"75911f1b5125a4d8246a","product-summary":"9d4423b797ade43a4c13","product-sale-badge":"7fb1c889d18aefeb90d8","product-sku":"b5ad6bc7c7b074f517cc","product-stock-indicator":"116729194aa95ae285f3","vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e":"1a21e07b81b35b1344e3","vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f":"f531ef5f4ae88cb6761c","product-add-to-cart":"b6d94e0acc9b1d7b3b48"}[chunkId] + ""; |
| 3664 | /******/ }; |
| 3665 | /******/ })(); |
| 3666 | /******/ |
| 3667 | /******/ /* webpack/runtime/global */ |
| 3668 | /******/ (() => { |
| 3669 | /******/ __webpack_require__.g = (function() { |
| 3670 | /******/ if (typeof globalThis === 'object') return globalThis; |
| 3671 | /******/ try { |
| 3672 | /******/ return this || new Function('return this')(); |
| 3673 | /******/ } catch (e) { |
| 3674 | /******/ if (typeof window === 'object') return window; |
| 3675 | /******/ } |
| 3676 | /******/ })(); |
| 3677 | /******/ })(); |
| 3678 | /******/ |
| 3679 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 3680 | /******/ (() => { |
| 3681 | /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
| 3682 | /******/ })(); |
| 3683 | /******/ |
| 3684 | /******/ /* webpack/runtime/load script */ |
| 3685 | /******/ (() => { |
| 3686 | /******/ var inProgress = {}; |
| 3687 | /******/ var dataWebpackPrefix = "webpackWcBlocksJsonp:"; |
| 3688 | /******/ // loadScript function to load a script via script tag |
| 3689 | /******/ __webpack_require__.l = (url, done, key, chunkId) => { |
| 3690 | /******/ if(inProgress[url]) { inProgress[url].push(done); return; } |
| 3691 | /******/ var script, needAttach; |
| 3692 | /******/ if(key !== undefined) { |
| 3693 | /******/ var scripts = document.getElementsByTagName("script"); |
| 3694 | /******/ for(var i = 0; i < scripts.length; i++) { |
| 3695 | /******/ var s = scripts[i]; |
| 3696 | /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; } |
| 3697 | /******/ } |
| 3698 | /******/ } |
| 3699 | /******/ if(!script) { |
| 3700 | /******/ needAttach = true; |
| 3701 | /******/ script = document.createElement('script'); |
| 3702 | /******/ |
| 3703 | /******/ script.charset = 'utf-8'; |
| 3704 | /******/ script.timeout = 120; |
| 3705 | /******/ if (__webpack_require__.nc) { |
| 3706 | /******/ script.setAttribute("nonce", __webpack_require__.nc); |
| 3707 | /******/ } |
| 3708 | /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key); |
| 3709 | /******/ |
| 3710 | /******/ script.src = url; |
| 3711 | /******/ } |
| 3712 | /******/ inProgress[url] = [done]; |
| 3713 | /******/ var onScriptComplete = (prev, event) => { |
| 3714 | /******/ // avoid mem leaks in IE. |
| 3715 | /******/ script.onerror = script.onload = null; |
| 3716 | /******/ clearTimeout(timeout); |
| 3717 | /******/ var doneFns = inProgress[url]; |
| 3718 | /******/ delete inProgress[url]; |
| 3719 | /******/ script.parentNode && script.parentNode.removeChild(script); |
| 3720 | /******/ doneFns && doneFns.forEach((fn) => (fn(event))); |
| 3721 | /******/ if(prev) return prev(event); |
| 3722 | /******/ } |
| 3723 | /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); |
| 3724 | /******/ script.onerror = onScriptComplete.bind(null, script.onerror); |
| 3725 | /******/ script.onload = onScriptComplete.bind(null, script.onload); |
| 3726 | /******/ needAttach && document.head.appendChild(script); |
| 3727 | /******/ }; |
| 3728 | /******/ })(); |
| 3729 | /******/ |
| 3730 | /******/ /* webpack/runtime/make namespace object */ |
| 3731 | /******/ (() => { |
| 3732 | /******/ // define __esModule on exports |
| 3733 | /******/ __webpack_require__.r = (exports) => { |
| 3734 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 3735 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 3736 | /******/ } |
| 3737 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 3738 | /******/ }; |
| 3739 | /******/ })(); |
| 3740 | /******/ |
| 3741 | /******/ /* webpack/runtime/publicPath */ |
| 3742 | /******/ (() => { |
| 3743 | /******/ var scriptUrl; |
| 3744 | /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; |
| 3745 | /******/ var document = __webpack_require__.g.document; |
| 3746 | /******/ if (!scriptUrl && document) { |
| 3747 | /******/ if (document.currentScript) |
| 3748 | /******/ scriptUrl = document.currentScript.src; |
| 3749 | /******/ if (!scriptUrl) { |
| 3750 | /******/ var scripts = document.getElementsByTagName("script"); |
| 3751 | /******/ if(scripts.length) { |
| 3752 | /******/ var i = scripts.length - 1; |
| 3753 | /******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src; |
| 3754 | /******/ } |
| 3755 | /******/ } |
| 3756 | /******/ } |
| 3757 | /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration |
| 3758 | /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. |
| 3759 | /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); |
| 3760 | /******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); |
| 3761 | /******/ __webpack_require__.p = scriptUrl; |
| 3762 | /******/ })(); |
| 3763 | /******/ |
| 3764 | /******/ /* webpack/runtime/jsonp chunk loading */ |
| 3765 | /******/ (() => { |
| 3766 | /******/ // no baseURI |
| 3767 | /******/ |
| 3768 | /******/ // object to store loaded and loading chunks |
| 3769 | /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched |
| 3770 | /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded |
| 3771 | /******/ var installedChunks = { |
| 3772 | /******/ "all-products": 0 |
| 3773 | /******/ }; |
| 3774 | /******/ |
| 3775 | /******/ __webpack_require__.f.j = (chunkId, promises) => { |
| 3776 | /******/ // JSONP chunk loading for javascript |
| 3777 | /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; |
| 3778 | /******/ if(installedChunkData !== 0) { // 0 means "already installed". |
| 3779 | /******/ |
| 3780 | /******/ // a Promise means "currently loading". |
| 3781 | /******/ if(installedChunkData) { |
| 3782 | /******/ promises.push(installedChunkData[2]); |
| 3783 | /******/ } else { |
| 3784 | /******/ if(true) { // all chunks have JS |
| 3785 | /******/ // setup Promise in chunk cache |
| 3786 | /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); |
| 3787 | /******/ promises.push(installedChunkData[2] = promise); |
| 3788 | /******/ |
| 3789 | /******/ // start chunk loading |
| 3790 | /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); |
| 3791 | /******/ // create error before stack unwound to get useful stacktrace later |
| 3792 | /******/ var error = new Error(); |
| 3793 | /******/ var loadingEnded = (event) => { |
| 3794 | /******/ if(__webpack_require__.o(installedChunks, chunkId)) { |
| 3795 | /******/ installedChunkData = installedChunks[chunkId]; |
| 3796 | /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; |
| 3797 | /******/ if(installedChunkData) { |
| 3798 | /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); |
| 3799 | /******/ var realSrc = event && event.target && event.target.src; |
| 3800 | /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; |
| 3801 | /******/ error.name = 'ChunkLoadError'; |
| 3802 | /******/ error.type = errorType; |
| 3803 | /******/ error.request = realSrc; |
| 3804 | /******/ installedChunkData[1](error); |
| 3805 | /******/ } |
| 3806 | /******/ } |
| 3807 | /******/ }; |
| 3808 | /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); |
| 3809 | /******/ } |
| 3810 | /******/ } |
| 3811 | /******/ } |
| 3812 | /******/ }; |
| 3813 | /******/ |
| 3814 | /******/ // no prefetching |
| 3815 | /******/ |
| 3816 | /******/ // no preloaded |
| 3817 | /******/ |
| 3818 | /******/ // no HMR |
| 3819 | /******/ |
| 3820 | /******/ // no HMR manifest |
| 3821 | /******/ |
| 3822 | /******/ // no on chunks loaded |
| 3823 | /******/ |
| 3824 | /******/ // install a JSONP callback for chunk loading |
| 3825 | /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { |
| 3826 | /******/ var [chunkIds, moreModules, runtime] = data; |
| 3827 | /******/ // add "moreModules" to the modules object, |
| 3828 | /******/ // then flag all "chunkIds" as loaded and fire callback |
| 3829 | /******/ var moduleId, chunkId, i = 0; |
| 3830 | /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { |
| 3831 | /******/ for(moduleId in moreModules) { |
| 3832 | /******/ if(__webpack_require__.o(moreModules, moduleId)) { |
| 3833 | /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; |
| 3834 | /******/ } |
| 3835 | /******/ } |
| 3836 | /******/ if(runtime) var result = runtime(__webpack_require__); |
| 3837 | /******/ } |
| 3838 | /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); |
| 3839 | /******/ for(;i < chunkIds.length; i++) { |
| 3840 | /******/ chunkId = chunkIds[i]; |
| 3841 | /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { |
| 3842 | /******/ installedChunks[chunkId][0](); |
| 3843 | /******/ } |
| 3844 | /******/ installedChunks[chunkId] = 0; |
| 3845 | /******/ } |
| 3846 | /******/ |
| 3847 | /******/ } |
| 3848 | /******/ |
| 3849 | /******/ var chunkLoadingGlobal = self["webpackChunkwebpackWcBlocksJsonp"] = self["webpackChunkwebpackWcBlocksJsonp"] || []; |
| 3850 | /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); |
| 3851 | /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); |
| 3852 | /******/ })(); |
| 3853 | /******/ |
| 3854 | /************************************************************************/ |
| 3855 | var __webpack_exports__ = {}; |
| 3856 | // This entry need to be wrapped in an IIFE because it need to be in strict mode. |
| 3857 | (() => { |
| 3858 | "use strict"; |
| 3859 | /*!************************************************************!*\ |
| 3860 | !*** ./assets/js/blocks/products/all-products/frontend.js ***! |
| 3861 | \************************************************************/ |
| 3862 | __webpack_require__.r(__webpack_exports__); |
| 3863 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3864 | /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3865 | /* harmony import */ var _woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/base-utils */ "./assets/js/base/utils/render-frontend.tsx"); |
| 3866 | /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./block */ "./assets/js/blocks/products/all-products/block.tsx"); |
| 3867 | |
| 3868 | /** |
| 3869 | * External dependencies |
| 3870 | */ |
| 3871 | |
| 3872 | |
| 3873 | /** |
| 3874 | * Internal dependencies |
| 3875 | */ |
| 3876 | |
| 3877 | |
| 3878 | /** |
| 3879 | * Wrapper component to supply the notice provider. |
| 3880 | * |
| 3881 | * @param {*} props |
| 3882 | */ |
| 3883 | const AllProductsFrontend = props => { |
| 3884 | return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_block__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 3885 | ...props |
| 3886 | }); |
| 3887 | }; |
| 3888 | const getProps = el => ({ |
| 3889 | attributes: JSON.parse(el.dataset.attributes) |
| 3890 | }); |
| 3891 | (0,_woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_2__.renderFrontend)({ |
| 3892 | selector: '.wp-block-woocommerce-all-products', |
| 3893 | Block: AllProductsFrontend, |
| 3894 | getProps |
| 3895 | }); |
| 3896 | })(); |
| 3897 | |
| 3898 | /******/ })() |
| 3899 | ; |
| 3900 | //# sourceMappingURL=all-products-frontend.js.map |