Import `createInterpolateElement ` from `@wordpress/element` (https://github.com/woocommerce/woocommerce-blocks/pull/4368)

* change import for interpolate element

* remove dependency

* fix package lock

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
This commit is contained in:
Mike Jolley 2021-07-07 13:27:50 +01:00 committed by GitHub
parent 15fdc41e8f
commit b9d07173d4
10 changed files with 9 additions and 26 deletions

View File

@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Disabled, PanelBody, ToggleControl } from '@wordpress/components';
import { InspectorControls } from '@wordpress/block-editor';
import { createInterpolateElement } from 'wordpress-element';
import { createInterpolateElement } from '@wordpress/element';
import ToggleButtonControl from '@woocommerce/editor-components/toggle-button-control';
import { getAdminLink } from '@woocommerce/settings';

View File

@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { createInterpolateElement } from 'wordpress-element';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
import type { Currency } from '@woocommerce/price-format';

View File

@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from 'wordpress-element';
import { createInterpolateElement } from '@wordpress/element';
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
import PropTypes from 'prop-types';
import {

View File

@ -5,8 +5,8 @@ import { __, sprintf } from '@wordpress/i18n';
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { createInterpolateElement } from 'wordpress-element';
import { formatPrice } from '@woocommerce/price-format';
import { createInterpolateElement } from '@wordpress/element';
/**
* Internal dependencies

View File

@ -22,8 +22,7 @@ import {
useEditorContext,
CartProvider,
} from '@woocommerce/base-context';
import { createInterpolateElement } from 'wordpress-element';
import { useRef } from '@wordpress/element';
import { createInterpolateElement, useRef } from '@wordpress/element';
import { getAdminLink, getSetting } from '@woocommerce/settings';
import { previewCart } from '@woocommerce/resource-previews';

View File

@ -18,8 +18,7 @@ import {
CHECKOUT_PAGE_ID,
} from '@woocommerce/block-settings';
import { isWcVersion, getAdminLink, getSetting } from '@woocommerce/settings';
import { createInterpolateElement } from 'wordpress-element';
import { useRef } from '@wordpress/element';
import { createInterpolateElement, useRef } from '@wordpress/element';
import {
EditorProvider,
useEditorContext,

View File

@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from 'wordpress-element';
import { createInterpolateElement } from '@wordpress/element';
import {
Notice,
ToggleControl,

View File

@ -3,7 +3,7 @@
*/
import { Guide } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from 'wordpress-element';
import { createInterpolateElement } from '@wordpress/element';
import { isWpVersion } from '@woocommerce/settings';
import type { ReactElement } from 'react';

View File

@ -33742,20 +33742,6 @@
}
}
},
"wordpress-element": {
"version": "npm:@wordpress/element@2.18.0",
"resolved": "https://registry.npmjs.org/@wordpress/element/-/element-2.18.0.tgz",
"integrity": "sha512-aR1gOXFxIDcrLCSANe5PwOwYH40n29LzjqBascNkFo6f0LBekCZPbI3Bqq4EtoH/zjq2RKAO9PVPlQRDoQUlmA==",
"requires": {
"@babel/runtime": "^7.11.2",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@wordpress/escape-html": "^1.10.0",
"lodash": "^4.17.19",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
},
"worker-farm": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",

View File

@ -201,8 +201,7 @@
"trim-html": "0.1.9",
"use-debounce": "3.4.3",
"wordpress-components": "npm:@wordpress/components@11.1.5",
"wordpress-compose": "npm:@wordpress/compose@3.23.1",
"wordpress-element": "npm:@wordpress/element@2.18.0"
"wordpress-compose": "npm:@wordpress/compose@3.23.1"
},
"husky": {
"hooks": {