From 0b2f317cfbac0771ababf30d36932e3498010bb2 Mon Sep 17 00:00:00 2001 From: PaulWijnberg Date: Thu, 7 Nov 2024 15:21:54 +0100 Subject: [PATCH] Added compatibility for Product Add-Ons for WooCommerce --- CHANGELOG.md | 6 +- README.txt | 23 +- block/src/block.json | 2 +- block/src/compatibility/TieredPriceTable.js | 3 +- .../compatibility/WoocommerceProductAddons.js | 93 +++++ ...{ProductAddOns.js => YithProductAddOns.js} | 129 ++---- block/src/includes/TaxSwitchElementBuilder.js | 129 ++++++ block/src/includes/TaxSwitchHelper.js | 50 +-- block/src/includes/store.js | 6 +- block/src/woocommerce-product-addons.js | 17 + block/src/yith-woocommerce-product-add-ons.js | 4 +- .../class-wdevs-tax-switch-compatibility.php | 20 +- package-lock.json | 391 +++++++++++++++--- package.json | 5 +- wdevs-tax-switch.php | 4 +- webpack.config.js | 5 + 16 files changed, 679 insertions(+), 208 deletions(-) create mode 100644 block/src/compatibility/WoocommerceProductAddons.js rename block/src/compatibility/{ProductAddOns.js => YithProductAddOns.js} (65%) create mode 100644 block/src/includes/TaxSwitchElementBuilder.js create mode 100644 block/src/woocommerce-product-addons.js diff --git a/CHANGELOG.md b/CHANGELOG.md index f4e740a..194d033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog -All notable changes to the Tax Switch for Woocommerce plugin will be documented in this file. +All notable changes to the Tax Switch for WooCommerce plugin will be documented in this file. + +## [1.1.11] - 2024-11-06 +### Added +- Compatibility for Product Add-Ons for WooCommerce ## [1.1.10] - 2024-11-05 ### Added diff --git a/README.txt b/README.txt index 6bea7fd..57072e0 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ Contributors: wijnbergdevelopments Tags: woocommerce, tax, vat Requires at least: 5.0 Tested up to: 6.6 -Stable tag: 1.1.10 +Stable tag: 1.1.11 Requires PHP: 7.2 License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt @@ -13,16 +13,30 @@ Let customers toggle between inclusive and exclusive VAT pricing in your WooComm == Description == Tax Switch for WooCommerce enhances your WooCommerce store by allowing users to toggle between displaying prices including or excluding VAT. This plugin adds a customizable switch component and provides a flexible way to display both price versions. -Key features: +=== Key features === * Display customizable switches where you want * Gutenberg block support * Shortcode for easy integration * Flexible display options for prices with and without VAT -* Saves the state of the switch for the user +* Remembers the user's preference for future visits For more information about this plugin, please visit the [plugin page](https://products.wijnberg.dev/product/wordpress/plugins/tax-switch-for-woocommerce/). +=== Compatibility === + +This plugin integrates with WooCommerce's standard filters and actions for price display and calculation. While most plugins work out of the box, some third-party plugins use custom price building methods that require specific compatibility integrations. The following plugins have been tested and confirmed compatible: + +* WooCommerce Product Table +* Tiered Pricing Table for WooCommerce (+ Premium) +* Measurement Price Calculator for WooCommerce +* Discount Rules for WooCommerce +* YITH WooCommerce Product Add-Ons (+ & Extra Options Premium) +* JetEngine Listing Grid (Elementor) +* Product Add-Ons for WooCommerce + +If you encounter any compatibility issues with other plugins not listed above, please let us know. Your feedback helps us improve the plugin and extend compatibility to more third-party solutions. + = Requirements = * WooCommerce plugin installed and activated @@ -77,6 +91,9 @@ You can also use this shortcode in your theme files with the do_shortcode() func Some WooCommerce Blocks are not fully compatible with this plugin as they do not use standard WooCommerce filters for price display. This is a known limitation of WooCommerce Blocks and not specific to this plugin. You can fix this by using WooCommerce shortcodes instead of the WooCommerce Blocks. == Changelog == += 1.1.11 = +* Added compatibility for Product Add-Ons for WooCommerce + = 1.1.10 = * Added compatibility for JetEngine Listing Grid 'infinity scroll' diff --git a/block/src/block.json b/block/src/block.json index ac76934..940e8b0 100644 --- a/block/src/block.json +++ b/block/src/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "wdevs/tax-switch", - "version": "1.1.10", + "version": "1.1.11", "title": "Tax Switch for WooCommerce", "category": "woocommerce", "icon": "money-alt", diff --git a/block/src/compatibility/TieredPriceTable.js b/block/src/compatibility/TieredPriceTable.js index a1a4320..584825a 100644 --- a/block/src/compatibility/TieredPriceTable.js +++ b/block/src/compatibility/TieredPriceTable.js @@ -1,5 +1,6 @@ import jQuery from 'jquery'; import TaxSwitchHelper from '../includes/TaxSwitchHelper'; +import TaxSwitchElementBuilder from '../includes/TaxSwitchElementBuilder'; class TieredPriceTable { constructor( originalTaxDisplay ) { @@ -234,7 +235,7 @@ class TieredPriceTable { if ( setText ) { if ( ! vm.vatTexts ) { - vm.vatTexts = TaxSwitchHelper.getVatTexts(); + vm.vatTexts = TaxSwitchElementBuilder.getVatTexts(); } if ( vm.vatTexts ) { diff --git a/block/src/compatibility/WoocommerceProductAddons.js b/block/src/compatibility/WoocommerceProductAddons.js new file mode 100644 index 0000000..46f8eb7 --- /dev/null +++ b/block/src/compatibility/WoocommerceProductAddons.js @@ -0,0 +1,93 @@ +import jQuery from 'jquery'; +import TaxSwitchHelper from '../includes/TaxSwitchHelper'; +import TaxSwitchElementBuilder from '../includes/TaxSwitchElementBuilder'; + +class WoocommerceProductAddOns { + constructor( originalTaxDisplay, baseTaxRate ) { + this.originalTaxDisplay = originalTaxDisplay; + this.taxRate = baseTaxRate; + this.taxSwitchElementBuilder = new TaxSwitchElementBuilder( + this.originalTaxDisplay + ); + } + + init() { + const vm = this; + vm.registerWooCommerceEvents(); + } + + registerWooCommerceEvents() { + // Check if accounting en woocommerce_addons_params are available + //from woocommerce-product-addons/assets/js/frontend/addons.js + if ( + typeof window.accounting === 'undefined' || + typeof window.accounting.unformat === 'undefined' || + typeof window.woocommerce_addons_params === 'undefined' + ) { + return; + } + + const vm = this; + + jQuery( 'form.cart' ).on( 'updated_addons', function () { + const $amounts = jQuery( this ).find( + '.product-addon-totals .amount' + ); + const displayIncludingVat = TaxSwitchHelper.displayIncludingVat( + this.originalTaxDisplay + ); + let price, + priceText, + alternatePrice, + alternatePriceText, + template, + $element; + + $amounts.each( function () { + priceText = jQuery( this ).text(); + price = window.accounting.unformat( + priceText, + window.woocommerce_addons_params.currency_format_decimal_sep + ); + if ( price > 0 ) { + alternatePrice = TaxSwitchHelper.calculateAlternatePrice( + price, + vm.originalTaxDisplay, + vm.taxRate + ); + alternatePriceText = window.accounting.formatMoney( + alternatePrice, + { + symbol: window.woocommerce_addons_params + .currency_format_symbol, + decimal: + window.woocommerce_addons_params + .currency_format_decimal_sep, + thousand: + window.woocommerce_addons_params + .currency_format_thousand_sep, + precision: + window.woocommerce_addons_params + .currency_format_num_decimals, + format: window.woocommerce_addons_params + .currency_format, + } + ); + + template = vm.taxSwitchElementBuilder.build( + displayIncludingVat, + priceText, + alternatePriceText, + null + ); + $element = jQuery( this ).parent(); + $element.html( template ); + } + } ); + + TaxSwitchHelper.setPriceClasses( vm.originalTaxDisplay ); + } ); + } +} + +export default WoocommerceProductAddOns; diff --git a/block/src/compatibility/ProductAddOns.js b/block/src/compatibility/YithProductAddOns.js similarity index 65% rename from block/src/compatibility/ProductAddOns.js rename to block/src/compatibility/YithProductAddOns.js index 44dbf2b..1cc8f9e 100644 --- a/block/src/compatibility/ProductAddOns.js +++ b/block/src/compatibility/YithProductAddOns.js @@ -1,7 +1,8 @@ import jQuery from 'jquery'; import TaxSwitchHelper from '../includes/TaxSwitchHelper'; +import TaxSwitchElementBuilder from '../includes/TaxSwitchElementBuilder'; -class ProductAddOns { +class YithProductAddOns { constructor( originalTaxDisplay, baseTaxRate ) { this.originalTaxDisplay = originalTaxDisplay; this.taxRate = baseTaxRate; @@ -17,6 +18,9 @@ class ProductAddOns { ).clone(); } this.vatTexts = null; + this.taxSwitchElementBuilder = new TaxSwitchElementBuilder( + this.originalTaxDisplay + ); } init() { @@ -111,7 +115,11 @@ class ProductAddOns { if ( ! isNaN( parseFloat( price ) ) ) { // Calculate alternate price const alternatePrice = - this.calculateAlternatePrice( price ); + TaxSwitchHelper.calculateAlternatePrice( + price, + this.originalTaxDisplay, + this.taxRate + ); // Format prices const formattedOriginal = window.floatToWcPrice( price ); @@ -154,7 +162,11 @@ class ProductAddOns { if ( ! price ) return; // Calculate alternate price - const alternatePrice = this.calculateAlternatePrice( price ); + const alternatePrice = TaxSwitchHelper.calculateAlternatePrice( + price, + this.originalTaxDisplay, + this.taxRate + ); // Format prices using YITH WAPO's formatting function const formattedOriginal = window.floatToWcPrice( price ); @@ -167,25 +179,6 @@ class ProductAddOns { ); } - calculateAlternatePrice( price ) { - // Guard clauses - if ( ! price || price <= 0 || ! this.taxRate ) { - return price; - } - - const displayIncludingVat = this.originalTaxDisplay === 'incl'; - const taxMultiplier = 1 + this.taxRate / 100; - - let alternatePrice; - if ( displayIncludingVat ) { - alternatePrice = price / taxMultiplier; - } else { - alternatePrice = price * taxMultiplier; - } - - return Number( alternatePrice.toFixed( 2 ) ); - } - replacePriceDisplay( $element, originalPrice, @@ -193,90 +186,28 @@ class ProductAddOns { setText = false ) { const vm = this; - const displayIncludingVat = TaxSwitchHelper.displayIncludingVat( - this.originalTaxDisplay - ); - - const prices = this.getPricesBasedOnTaxDisplay( - originalPrice, - alternatePrice - ); - const includingPrice = prices.including; - const excludingPrice = prices.excluding; - - function getVisibilityClass( isVisible ) { - return isVisible ? 'wts-active' : 'wts-inactive'; - } - - function createPriceElement( price, isIncludingVat ) { - const visibilityClass = getVisibilityClass( - isIncludingVat === displayIncludingVat - ); - const priceType = isIncludingVat ? 'incl' : 'excl'; - - return ` - - ${ price } - - `; - } - - let template = ` - - - ${ createPriceElement( includingPrice, true ) } - ${ createPriceElement( excludingPrice, false ) } - - `; - + let texts = null; if ( setText ) { if ( ! vm.vatTexts ) { - vm.vatTexts = TaxSwitchHelper.getVatTexts( - this.initialPriceElement + vm.vatTexts = TaxSwitchElementBuilder.getVatTexts( + vm.initialPriceElement ); } - if ( vm.vatTexts ) { - function createTextElement( text, isIncludingVat ) { - const visibilityClass = getVisibilityClass( - isIncludingVat === displayIncludingVat - ); - const priceType = isIncludingVat ? 'incl' : 'excl'; - - return ` - - ${ text } - - `; - } - - template += ` - - ${ createTextElement( vm.vatTexts.including, true ) } - ${ createTextElement( vm.vatTexts.excluding, false ) } - - `; - } - } - - template += ''; - - $element.html( template.trim() ); - } - - getPricesBasedOnTaxDisplay( originalPrice, alternatePrice ) { - if ( this.originalTaxDisplay === 'incl' ) { - return { - including: originalPrice, - excluding: alternatePrice, - }; + texts = vm.vatTexts; } + const displayIncludingVat = TaxSwitchHelper.displayIncludingVat( + this.originalTaxDisplay + ); + const template = vm.taxSwitchElementBuilder.build( + displayIncludingVat, + originalPrice, + alternatePrice, + texts + ); - return { - including: alternatePrice, - excluding: originalPrice, - }; + $element.html( template ); } } -export default ProductAddOns; +export default YithProductAddOns; diff --git a/block/src/includes/TaxSwitchElementBuilder.js b/block/src/includes/TaxSwitchElementBuilder.js new file mode 100644 index 0000000..9855111 --- /dev/null +++ b/block/src/includes/TaxSwitchElementBuilder.js @@ -0,0 +1,129 @@ +class TaxSwitchElementBuilder { + constructor( originalTaxDisplay ) { + this.originalTaxDisplay = originalTaxDisplay; + } + + build( + displayIncludingVat, + originalPrice, + alternatePrice, + vatTexts = null + ) { + const vm = this; + + const prices = vm.getPricesBasedOnTaxDisplay( + originalPrice, + alternatePrice + ); + const includingPrice = prices.including; + const excludingPrice = prices.excluding; + + function getVisibilityClass( isVisible ) { + return isVisible ? 'wts-active' : 'wts-inactive'; + } + + function createPriceElement( price, isIncludingVat ) { + const visibilityClass = getVisibilityClass( + isIncludingVat === displayIncludingVat + ); + const priceType = isIncludingVat ? 'incl' : 'excl'; + + return ` + + ${ price } + + `; + } + + let template = ` + + + ${ createPriceElement( includingPrice, true ) } + ${ createPriceElement( excludingPrice, false ) } + + `; + + if ( vatTexts ) { + function createTextElement( text, isIncludingVat ) { + const visibilityClass = getVisibilityClass( + isIncludingVat === displayIncludingVat + ); + const priceType = isIncludingVat ? 'incl' : 'excl'; + + return ` + + ${ text } + + `; + } + + template += ` + + ${ createTextElement( vatTexts.including, true ) } + ${ createTextElement( vatTexts.excluding, false ) } + + `; + } + + template += ''; + + return template.trim(); + } + + getPricesBasedOnTaxDisplay( originalPrice, alternatePrice ) { + if ( this.originalTaxDisplay === 'incl' ) { + return { + including: originalPrice, + excluding: alternatePrice, + }; + } + + return { + including: alternatePrice, + excluding: originalPrice, + }; + } + + static getVatTexts( existingWrapper = null ) { + const space = document.createTextNode( ' ' ).nodeValue; + let $includingText, $excludingText; + if ( existingWrapper ) { + const $wrapper = jQuery( existingWrapper ); + $includingText = $wrapper + .find( '.wts-price-incl .wts-vat-text' ) + .first(); + $excludingText = $wrapper + .find( '.wts-price-excl .wts-vat-text' ) + .first(); + + if ( $includingText.length || $excludingText.length ) { + return { + including: $includingText.length + ? space + $includingText.clone().prop( 'outerHTML' ) + : '', + excluding: $excludingText.length + ? space + $excludingText.clone().prop( 'outerHTML' ) + : '', + }; + } + } + + $includingText = jQuery( + '.wts-price-wrapper .wts-price-incl .wts-vat-text' + ).first(); + $excludingText = jQuery( + '.wts-price-wrapper .wts-price-excl .wts-vat-text' + ).first(); + + return { + including: $includingText.length + ? space + $includingText.clone().prop( 'outerHTML' ) + : '', + excluding: $excludingText.length + ? space + $excludingText.clone().prop( 'outerHTML' ) + : '', + }; + } +} + +export default TaxSwitchElementBuilder; diff --git a/block/src/includes/TaxSwitchHelper.js b/block/src/includes/TaxSwitchHelper.js index 6e55e47..c794c9c 100644 --- a/block/src/includes/TaxSwitchHelper.js +++ b/block/src/includes/TaxSwitchHelper.js @@ -55,45 +55,23 @@ class TaxSwitchHelper { ); } - static getVatTexts( existingWrapper = null ) { - const space = document.createTextNode( ' ' ).nodeValue; - let $includingText, $excludingText; - if ( existingWrapper ) { - const $wrapper = jQuery( existingWrapper ); - $includingText = $wrapper - .find( '.wts-price-incl .wts-vat-text' ) - .first(); - $excludingText = $wrapper - .find( '.wts-price-excl .wts-vat-text' ) - .first(); - - if ( $includingText.length || $excludingText.length ) { - return { - including: $includingText.length - ? space + $includingText.clone().prop( 'outerHTML' ) - : '', - excluding: $excludingText.length - ? space + $excludingText.clone().prop( 'outerHTML' ) - : '', - }; - } + static calculateAlternatePrice( price, originalTaxDisplay, taxRate ) { + // Guard clauses + if ( ! price || price <= 0 || ! taxRate ) { + return price; } - $includingText = jQuery( - '.wts-price-wrapper .wts-price-incl .wts-vat-text' - ).first(); - $excludingText = jQuery( - '.wts-price-wrapper .wts-price-excl .wts-vat-text' - ).first(); + const displayIncludingVat = originalTaxDisplay === 'incl'; + const taxMultiplier = 1 + taxRate / 100; + + let alternatePrice; + if ( displayIncludingVat ) { + alternatePrice = price / taxMultiplier; + } else { + alternatePrice = price * taxMultiplier; + } - return { - including: $includingText.length - ? space + $includingText.clone().prop( 'outerHTML' ) - : '', - excluding: $excludingText.length - ? space + $excludingText.clone().prop( 'outerHTML' ) - : '', - }; + return Number( alternatePrice.toFixed( 2 ) ); } } diff --git a/block/src/includes/store.js b/block/src/includes/store.js index 494e748..5211b2e 100644 --- a/block/src/includes/store.js +++ b/block/src/includes/store.js @@ -43,16 +43,14 @@ const selectors = { }, }; -let store; +let store = select( 'wdevs-tax-switch/store' ); -if ( ! select( 'wdevs-tax-switch/store' ) ) { +if ( store === undefined ) { store = registerStore( 'wdevs-tax-switch/store', { reducer, actions, selectors, } ); -} else { - store = select( 'wdevs-tax-switch/store' ); } export default store; diff --git a/block/src/woocommerce-product-addons.js b/block/src/woocommerce-product-addons.js new file mode 100644 index 0000000..cb3e5a3 --- /dev/null +++ b/block/src/woocommerce-product-addons.js @@ -0,0 +1,17 @@ +import WoocommerceProductAddOns from './compatibility/WoocommerceProductAddons'; + +window.addEventListener( 'DOMContentLoaded', () => { + const viewConfig = window.wtsViewObject || { + originalTaxDisplay: 'incl', + }; + + const wtsCompatibilityObject = window.wtsCompatibilityObject || { + baseTaxRate: 0, + }; + + const wpado = new WoocommerceProductAddOns( + viewConfig.originalTaxDisplay, + wtsCompatibilityObject.baseTaxRate + ); + wpado.init(); +} ); diff --git a/block/src/yith-woocommerce-product-add-ons.js b/block/src/yith-woocommerce-product-add-ons.js index 7ebd366..4f19359 100644 --- a/block/src/yith-woocommerce-product-add-ons.js +++ b/block/src/yith-woocommerce-product-add-ons.js @@ -1,4 +1,4 @@ -import ProductAddOns from './compatibility/ProductAddOns'; +import YithProductAddOns from './compatibility/YithProductAddOns'; window.addEventListener( 'DOMContentLoaded', () => { const viewConfig = window.wtsViewObject || { @@ -8,7 +8,7 @@ window.addEventListener( 'DOMContentLoaded', () => { const wtsCompatibilityObject = window.wtsCompatibilityObject || { baseTaxRate: 0, }; - const ywpado = new ProductAddOns( + const ywpado = new YithProductAddOns( viewConfig.originalTaxDisplay, wtsCompatibilityObject.baseTaxRate ); diff --git a/includes/class-wdevs-tax-switch-compatibility.php b/includes/class-wdevs-tax-switch-compatibility.php index 16ffaca..356b76f 100644 --- a/includes/class-wdevs-tax-switch-compatibility.php +++ b/includes/class-wdevs-tax-switch-compatibility.php @@ -64,18 +64,33 @@ public function enqueue_compatibility_scripts() { $wcmpc_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/woocommerce-measurement-price-calculator.asset.php' ); wp_enqueue_script( 'wdevs-tax-switch-woocommerce-measurement-price-calculator', plugin_dir_url( dirname( __FILE__ ) ) . 'build/woocommerce-measurement-price-calculator.js', $wcmpc_asset['dependencies'], $wcmpc_asset['version'] ); } + + $tax_rate = $this->get_product_tax_rate( wc_get_product() ); + $ywpado_plugin_path = trailingslashit( WP_PLUGIN_DIR ) . 'yith-woocommerce-product-add-ons/init.php'; $ywpadop_plugin_path = trailingslashit( WP_PLUGIN_DIR ) . 'yith-woocommerce-advanced-product-options-premium/init.php'; if ( in_array( $ywpado_plugin_path, $active_plugins ) || in_array( $ywpadop_plugin_path, $active_plugins ) ) { $ywpado_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/yith-woocommerce-product-add-ons.asset.php' ); wp_enqueue_script( 'wdevs-tax-switch-yith-woocommerce-product-add-ons', plugin_dir_url( dirname( __FILE__ ) ) . 'build/yith-woocommerce-product-add-ons.js', array_merge( $ywpado_asset['dependencies'], [ 'yith_wapo_front' ] ), $ywpado_asset['version'] ); - // Localize de script met extra data wp_localize_script( 'wdevs-tax-switch-yith-woocommerce-product-add-ons', 'wtsCompatibilityObject', [ - 'baseTaxRate' => $this->get_product_tax_rate( wc_get_product() ) + 'baseTaxRate' => $tax_rate + ] + ); + } + + $wpado_plugin_path = trailingslashit( WP_PLUGIN_DIR ) . 'woocommerce-product-addons/woocommerce-product-addons.php'; + if ( in_array( $wpado_plugin_path, $active_plugins ) ) { + $wpado_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/woocommerce-product-addons.asset.php' ); + wp_enqueue_script( 'wdevs-tax-switch-woocommerce-product-addons', plugin_dir_url( dirname( __FILE__ ) ) . 'build/woocommerce-product-addons.js', $wpado_asset['dependencies'], $wpado_asset['version'] ); + wp_localize_script( + 'wdevs-tax-switch-woocommerce-product-addons', + 'wtsCompatibilityObject', + [ + 'baseTaxRate' => $tax_rate ] ); } @@ -87,6 +102,7 @@ public function enqueue_compatibility_scripts() { wp_enqueue_script( 'wdevs-tax-switch-woocommerce-tiered-price-table', plugin_dir_url( dirname( __FILE__ ) ) . 'build/woocommerce-tiered-price-table.js', $wctpt_asset['dependencies'], $wctpt_asset['version'] ); } + } public function activate_wc_product_table_compatibility( $element ) { diff --git a/package-lock.json b/package-lock.json index 7ec764e..4327547 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,17 @@ { - "name": "wdevs-tax-switch-block", - "version": "0.1.0", + "name": "wdevs-tax-switch", + "version": "1.1.10", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "wdevs-tax-switch-block", - "version": "0.1.0", + "name": "wdevs-tax-switch", + "version": "1.1.10", + "hasInstallScript": true, "license": "GPL-2.0-or-later", + "dependencies": { + "@wordpress/data": "^10.11.0" + }, "devDependencies": { "@wordpress/scripts": "^27.9.0" } @@ -1914,10 +1918,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", - "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", - "dev": true, + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -3260,7 +3263,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@tannin/compile/-/compile-1.1.0.tgz", "integrity": "sha512-n8m9eNDfoNZoxdvWiTfW/hSPhehzLJ3zW7f8E7oT6mCROoMNWCB4TYtv041+2FMAxweiE0j7i1jubQU4MEC/Gg==", - "dev": true, "dependencies": { "@tannin/evaluate": "^1.2.0", "@tannin/postfix": "^1.1.0" @@ -3269,14 +3271,12 @@ "node_modules/@tannin/evaluate": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@tannin/evaluate/-/evaluate-1.2.0.tgz", - "integrity": "sha512-3ioXvNowbO/wSrxsDG5DKIMxC81P0QrQTYai8zFNY+umuoHWRPbQ/TuuDEOju9E+jQDXmj6yI5GyejNuh8I+eg==", - "dev": true + "integrity": "sha512-3ioXvNowbO/wSrxsDG5DKIMxC81P0QrQTYai8zFNY+umuoHWRPbQ/TuuDEOju9E+jQDXmj6yI5GyejNuh8I+eg==" }, "node_modules/@tannin/plural-forms": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@tannin/plural-forms/-/plural-forms-1.1.0.tgz", "integrity": "sha512-xl9R2mDZO/qiHam1AgMnAES6IKIg7OBhcXqy6eDsRCdXuxAFPcjrej9HMjyCLE0DJ/8cHf0i5OQTstuBRhpbHw==", - "dev": true, "dependencies": { "@tannin/compile": "^1.1.0" } @@ -3284,8 +3284,7 @@ "node_modules/@tannin/postfix": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@tannin/postfix/-/postfix-1.1.0.tgz", - "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==", - "dev": true + "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==" }, "node_modules/@tootallnate/once": { "version": "2.0.0", @@ -3539,6 +3538,11 @@ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, + "node_modules/@types/mousetrap": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/@types/mousetrap/-/mousetrap-1.6.15.tgz", + "integrity": "sha512-qL0hyIMNPow317QWW/63RvL1x5MVMV+Ru3NaY9f/CuEpCqrmb7WeuK2071ZY5hczOnm38qExWM2i2WtkXLSqFw==" + }, "node_modules/@types/node": { "version": "22.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.3.0.tgz", @@ -3569,6 +3573,11 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", "dev": true }, + "node_modules/@types/prop-types": { + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==" + }, "node_modules/@types/qs": { "version": "6.9.15", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", @@ -3581,6 +3590,23 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, + "node_modules/@types/react": { + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -4240,6 +4266,70 @@ "node": ">=14" } }, + "node_modules/@wordpress/compose": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-7.11.0.tgz", + "integrity": "sha512-8Gv95+lJza3WiHxvaZgA2nKAlaEJonpFa82jF2c2ecGxHJNJUiF+kwmfr/yJpjVxSvNvHfpZlTuXHDi4hoMfYg==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@types/mousetrap": "^1.6.8", + "@wordpress/deprecated": "*", + "@wordpress/dom": "*", + "@wordpress/element": "*", + "@wordpress/is-shallow-equal": "*", + "@wordpress/keycodes": "*", + "@wordpress/priority-queue": "*", + "@wordpress/undo-manager": "*", + "change-case": "^4.1.2", + "clipboard": "^2.0.11", + "mousetrap": "^1.6.5", + "use-memo-one": "^1.1.1" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, + "node_modules/@wordpress/data": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-10.11.0.tgz", + "integrity": "sha512-2JvezC51tv8zpg1zUo+VNegtTHHKWBNGZ0uRFoeH6riswT4iZMXsZ83vrWZSCR/bY6ilK0kN/UHDvvSRYov2Rw==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/compose": "*", + "@wordpress/deprecated": "*", + "@wordpress/element": "*", + "@wordpress/is-shallow-equal": "*", + "@wordpress/priority-queue": "*", + "@wordpress/private-apis": "*", + "@wordpress/redux-routine": "*", + "deepmerge": "^4.3.0", + "equivalent-key-map": "^0.2.2", + "is-plain-object": "^5.0.0", + "is-promise": "^4.0.0", + "redux": "^4.1.2", + "rememo": "^4.0.2", + "use-memo-one": "^1.1.1" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, + "node_modules/@wordpress/data/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@wordpress/dependency-extraction-webpack-plugin": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.9.0.tgz", @@ -4255,6 +4345,32 @@ "webpack": "^5.0.0" } }, + "node_modules/@wordpress/deprecated": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-4.11.0.tgz", + "integrity": "sha512-CPXMS2IbGonba6Ny3IhzOudZ8QSCQzjg8AaS8dAq6p47AIUNxfj8bef+7C36lJKt9KPDkez7eY5x7UF5CaDkug==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/hooks": "*" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/dom": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-4.11.0.tgz", + "integrity": "sha512-8u9USBEpGiQvVZeWSY82Ze3Yrwj5JkmmPUF+HfKvqywFlYIZfYLLc5lNrvUCqw7klIje+LO3MnKR3kfRx/uozA==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/deprecated": "*" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/e2e-test-utils-playwright": { "version": "0.26.0", "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.26.0.tgz", @@ -4278,6 +4394,45 @@ "@playwright/test": ">=1" } }, + "node_modules/@wordpress/element": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.11.0.tgz", + "integrity": "sha512-UvHFYkT+EEaXEyEfw+iqLHRO9OwBjjsUydEMHcqntzkNcsYeAbmaL9V8R9ikXHLe6ftdbkwoXgF85xVPhVsL+Q==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", + "@wordpress/escape-html": "*", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^18.3.0", + "react-dom": "^18.3.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/element/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@wordpress/escape-html": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.11.0.tgz", + "integrity": "sha512-TGiUoUpnPxNKCvpZzskIjtgPH8UhZAYTflbHTaA9IALBc1alq0SDdmMAfQ7qhnKer4CPU9+dSXv79q7olobeLQ==", + "dependencies": { + "@babel/runtime": "7.25.7" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/eslint-plugin": { "version": "18.1.0", "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", @@ -4368,7 +4523,6 @@ "version": "3.58.0", "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.58.0.tgz", "integrity": "sha512-9LB0ZHnZRQlORttux9t/xbAskF+dk2ujqzPGsVzc92mSKpQP3K2a5Wy74fUnInguB1vLUNHT6nrNdkVom5qX1Q==", - "dev": true, "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -4380,7 +4534,6 @@ "version": "4.58.0", "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.58.0.tgz", "integrity": "sha512-VfvS3BWv/RDjRKD6PscIcvYfWKnGJcI/DEqyDgUMhxCM6NRwoL478CsUKTiGJIymeyRodNRfprdcF086DpGKYw==", - "dev": true, "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/hooks": "^3.58.0", @@ -4396,6 +4549,18 @@ "node": ">=12" } }, + "node_modules/@wordpress/is-shallow-equal": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-5.11.0.tgz", + "integrity": "sha512-LWMFSHcsD/FecJytZP3uboNUkVyowUN4HtFz3rJkAjpcvgZV9S++4ALejzN9jegOWfD6KNKAyWc7FyV25WXPYw==", + "dependencies": { + "@babel/runtime": "7.25.7" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/jest-console": { "version": "7.29.0", "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.29.0.tgz", @@ -4433,7 +4598,6 @@ "version": "3.58.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.58.0.tgz", "integrity": "sha512-Q/LRKpx8ndzuHlkxSQ2BD+NTYYKQPIneNNMng8hTAfyU7RFwXpqj06HpeOFGh4XIdPKCs/8hmucoLJRmmLmZJA==", - "dev": true, "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/i18n": "^4.58.0" @@ -4482,6 +4646,57 @@ "prettier": ">=3" } }, + "node_modules/@wordpress/priority-queue": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-3.11.0.tgz", + "integrity": "sha512-gllst2BJrDnEeXQYAuDXl31st/rhXcdeHOYt9UgOH1CnzPym3H0cdKR+zp9osGECCWN5pyoFalgckMZ5mPRAGg==", + "dependencies": { + "@babel/runtime": "7.25.7", + "requestidlecallback": "^0.3.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/private-apis": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-1.11.0.tgz", + "integrity": "sha512-ohTXVFf+a5t585qivy1XWfu0JDoloB/t19mJpFAcLGw1zw6wWs4upYyOsiJ8skSL+mbHCWpSWWZjGre/LcD0Ew==", + "dependencies": { + "@babel/runtime": "7.25.7" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/redux-routine": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-5.11.0.tgz", + "integrity": "sha512-RKBRTO+qZLDlh0/H5vDtsHLrBbIDweEhKyexfrm40klDsIzLO7OrW0zeM1wBGfHz3JxPOck859gGBoa7tyJf6A==", + "dependencies": { + "@babel/runtime": "7.25.7", + "is-plain-object": "^5.0.0", + "is-promise": "^4.0.0", + "rungen": "^0.3.2" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "redux": ">=4" + } + }, + "node_modules/@wordpress/redux-routine/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@wordpress/scripts": { "version": "27.9.0", "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.9.0.tgz", @@ -4576,6 +4791,19 @@ "stylelint": "^14.2" } }, + "node_modules/@wordpress/undo-manager": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-1.11.0.tgz", + "integrity": "sha512-Z+GlI2e4bMRI0fjqUTFFy8MuGtWgxlc4PcDtN4qJkFVix83TnAJO5DEDo4UlntzPKfj+zv0Ua8HWm4luhvqAkw==", + "dependencies": { + "@babel/runtime": "7.25.7", + "@wordpress/is-shallow-equal": "*" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/url": { "version": "3.59.0", "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.59.0.tgz", @@ -5710,7 +5938,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" @@ -5790,7 +6017,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dev": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -5817,7 +6043,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", - "dev": true, "dependencies": { "camel-case": "^4.1.2", "capital-case": "^1.0.4", @@ -5981,6 +6206,16 @@ "webpack": "*" } }, + "node_modules/clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "dependencies": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -6192,7 +6427,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", - "dev": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -6720,6 +6954,11 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, "node_modules/cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", @@ -6941,7 +7180,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -7079,6 +7317,11 @@ "node": ">=0.4.0" } }, + "node_modules/delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -7236,7 +7479,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -7312,7 +7554,6 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -7376,6 +7617,11 @@ "node": ">=4" } }, + "node_modules/equivalent-key-map": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/equivalent-key-map/-/equivalent-key-map-0.2.2.tgz", + "integrity": "sha512-xvHeyCDbZzkpN4VHQj/n+j2lOwL0VWszG30X4cOrc9Y7Tuo2qCdZK/0AMod23Z5dCtNUbaju6p0rwOhHUk05ew==" + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -9374,7 +9620,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.4.0.tgz", "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==", - "dev": true, "dependencies": { "encoding": "^0.1.12", "safe-buffer": "^5.1.1" @@ -9520,6 +9765,14 @@ "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", "dev": true }, + "node_modules/good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", + "dependencies": { + "delegate": "^3.1.2" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -9659,7 +9912,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", - "dev": true, "dependencies": { "capital-case": "^1.0.4", "tslib": "^2.0.3" @@ -9916,7 +10168,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -10565,6 +10816,11 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -11511,8 +11767,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -12156,7 +12411,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -12168,7 +12422,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, "dependencies": { "tslib": "^2.0.3" } @@ -12413,8 +12666,7 @@ "node_modules/memize": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/memize/-/memize-2.1.0.tgz", - "integrity": "sha512-yywVJy8ctVlN5lNPxsep5urnZ6TTclwPEyigM9M3Bi8vseJBOfqNrGWN/r8NzuIt3PovM323W04blJfGQfQSVg==", - "dev": true + "integrity": "sha512-yywVJy8ctVlN5lNPxsep5urnZ6TTclwPEyigM9M3Bi8vseJBOfqNrGWN/r8NzuIt3PovM323W04blJfGQfQSVg==" }, "node_modules/meow": { "version": "9.0.0", @@ -12693,6 +12945,11 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, + "node_modules/mousetrap": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz", + "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==" + }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -12773,7 +13030,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" @@ -13395,7 +13651,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -13471,7 +13726,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -13481,7 +13735,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", - "dev": true, "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -14762,7 +15015,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -14774,8 +15026,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "dev": true, - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -14927,6 +15177,14 @@ "node": ">=8" } }, + "node_modules/redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -14969,8 +15227,7 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regenerator-transform": { "version": "0.15.2", @@ -15037,12 +15294,22 @@ "jsesc": "bin/jsesc" } }, + "node_modules/rememo": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" + }, "node_modules/remove-accents": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.5.0.tgz", "integrity": "sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==", "dev": true }, + "node_modules/requestidlecallback": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/requestidlecallback/-/requestidlecallback-0.3.0.tgz", + "integrity": "sha512-TWHFkT7S9p7IxLC5A1hYmAYQx2Eb9w1skrXmQ+dS1URyvR8tenMLl4lHbqEOUnpEYxNKpkVMXUgknVpBZWXXfQ==" + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -15304,6 +15571,11 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rungen": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/rungen/-/rungen-0.3.2.tgz", + "integrity": "sha512-zWl10xu2D7zoR8zSC2U6bg5bYF6T/Wk7rxwp8IPaJH7f0Ge21G03kNHVgHR7tyVkSSfAOG0Rqf/Cl38JftSmtw==" + }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", @@ -15335,7 +15607,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -15371,8 +15642,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { "version": "1.77.8", @@ -15445,8 +15715,6 @@ "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dev": true, - "peer": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -15504,6 +15772,11 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -15593,7 +15866,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dev": true, "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -15890,7 +16162,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -16119,8 +16390,7 @@ "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" }, "node_modules/stack-utils": { "version": "2.0.6", @@ -16725,7 +16995,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/tannin/-/tannin-1.2.0.tgz", "integrity": "sha512-U7GgX/RcSeUETbV7gYgoz8PD7Ni4y95pgIP/Z6ayI3CfhSujwKEBlGFTCRN+Aqnuyf4AN2yHL+L8x+TCGjb9uA==", - "dev": true, "dependencies": { "@tannin/plural-forms": "^1.1.0" } @@ -16960,6 +17229,11 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -17119,8 +17393,7 @@ "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -17426,7 +17699,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dev": true, "dependencies": { "tslib": "^2.0.3" } @@ -17435,7 +17707,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dev": true, "dependencies": { "tslib": "^2.0.3" } @@ -17504,6 +17775,14 @@ "requires-port": "^1.0.0" } }, + "node_modules/use-memo-one": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz", + "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index d208ed1..2e46413 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wdevs-tax-switch", - "version": "1.1.10", + "version": "1.1.11", "description": "Let customers toggle between inclusive and exclusive VAT pricing in your WooCommerce store.", "author": "Wijnberg Developments", "license": "GPL-2.0-or-later", @@ -19,5 +19,8 @@ }, "devDependencies": { "@wordpress/scripts": "^27.9.0" + }, + "dependencies": { + "@wordpress/data": "^10.11.0" } } diff --git a/wdevs-tax-switch.php b/wdevs-tax-switch.php index bf2b2ca..5879be8 100644 --- a/wdevs-tax-switch.php +++ b/wdevs-tax-switch.php @@ -16,7 +16,7 @@ * Plugin Name: Tax Switch for WooCommerce * Plugin URI: https://wijnberg.dev * Description: Let customers toggle between inclusive and exclusive VAT pricing in your WooCommerce store. - * Version: 1.1.10 + * Version: 1.1.11 * Author: Wijnberg Developments * Author URI: https://wijnberg.dev/ * License: GPL-2.0+ @@ -41,7 +41,7 @@ * Start at version 1.0.0 and use SemVer - https://semver.org * Rename this for your plugin and update it as you release new versions. */ -define( 'WDEVS_TAX_SWITCH_VERSION', '1.1.10' ); +define( 'WDEVS_TAX_SWITCH_VERSION', '1.1.11' ); /** * The code that runs during plugin activation. diff --git a/webpack.config.js b/webpack.config.js index 0e2eefc..0333530 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -21,5 +21,10 @@ module.exports = { 'block/src', 'yith-woocommerce-product-add-ons.js' ), + 'woocommerce-product-addons': path.resolve( + process.cwd(), + 'block/src', + 'woocommerce-product-addons.js' + ), }, };