Remove imports from file that doesn’t exist in packages (https://github.com/woocommerce/woocommerce-admin/pull/876)

This commit is contained in:
Kelly Dwan 2018-11-16 14:31:20 -05:00 committed by GitHub
parent 098b24e99e
commit 87cf118878
5 changed files with 9 additions and 12 deletions

View File

@ -13,7 +13,6 @@ import { stringifyQuery } from '@woocommerce/navigation';
* Internal dependencies
*/
import { computeSuggestionMatch } from './utils';
import { NAMESPACE } from 'store/constants';
/**
* A coupon completer.
@ -33,7 +32,7 @@ export default {
};
payload = stringifyQuery( query );
}
return apiFetch( { path: `${ NAMESPACE }coupons${ payload }` } );
return apiFetch( { path: `/wc/v3/coupons${ payload }` } );
},
isDebounced: true,
getOptionKeywords( coupon ) {

View File

@ -13,7 +13,6 @@ import { stringifyQuery } from '@woocommerce/navigation';
* Internal dependencies
*/
import { computeSuggestionMatch } from './utils';
import { NAMESPACE } from 'store/constants';
/**
* A product categories completer.
@ -34,7 +33,7 @@ export default {
};
payload = stringifyQuery( query );
}
return apiFetch( { path: `${ NAMESPACE }products/categories${ payload }` } );
return apiFetch( { path: `/wc/v3/products/categories${ payload }` } );
},
isDebounced: true,
getOptionKeywords( cat ) {

View File

@ -14,7 +14,6 @@ import { stringifyQuery } from '@woocommerce/navigation';
*/
import { computeSuggestionMatch } from './utils';
import ProductImage from '../../product-image';
import { NAMESPACE } from 'store/constants';
/**
* A products completer.
@ -35,7 +34,7 @@ export default {
};
payload = stringifyQuery( query );
}
return apiFetch( { path: `${ NAMESPACE }products${ payload }` } );
return apiFetch( { path: `/wc/v3/products${ payload }` } );
},
isDebounced: true,
getOptionKeywords( product ) {

View File

@ -14,7 +14,6 @@ import { stringifyQuery, getQuery } from '@woocommerce/navigation';
*/
import { computeSuggestionMatch } from './utils';
import ProductImage from '../../product-image';
import { NAMESPACE } from 'store/constants';
/**
* Create a variation name by concatenating each of the variation's
@ -53,7 +52,7 @@ export default {
if ( ! product || product.includes( ',' ) ) {
console.warn( 'Invalid product id supplied to Variations autocompleter' );
}
return apiFetch( { path: `${ NAMESPACE }products/${ product }/variations${ payload }` } );
return apiFetch( { path: `/wc/v3/products/${ product }/variations${ payload }` } );
},
isDebounced: true,
getOptionKeywords( variation ) {

View File

@ -7,10 +7,11 @@ import { find } from 'lodash';
import { __ } from '@wordpress/i18n';
import { getSettings, format as formatDate } from '@wordpress/date';
/**
* Internal dependencies
*/
import { QUERY_DEFAULTS } from 'store/constants';
const QUERY_DEFAULTS = {
pageSize: 25,
period: 'month',
compare: 'previous_year',
};
export const isoDateFormat = 'YYYY-MM-DD';