@daffodil/cart 0.48.0 → 0.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/magento/public_api.d.ts +1 -0
- package/esm2020/driver/magento/public_api.mjs +2 -1
- package/fesm2015/daffodil-cart-driver-magento.mjs +55 -55
- package/fesm2015/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver-magento.mjs +53 -53
- package/fesm2020/daffodil-cart-driver-magento.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -7,6 +7,7 @@ export { DaffMagentoCartService } from './cart.service';
|
|
|
7
7
|
export { DaffMagentoCartItemService } from './cart-item.service';
|
|
8
8
|
export { DaffMagentoCartPaymentService } from './cart-payment.service';
|
|
9
9
|
export { DaffMagentoCartPaymentMethodsService } from './cart-payment-methods.service';
|
|
10
|
+
export { DaffMagentoCartAddressService } from './cart-address.service';
|
|
10
11
|
export { DaffMagentoCartBillingAddressService } from './cart-billing-address.service';
|
|
11
12
|
export { DaffMagentoCartShippingAddressService } from './cart-shipping-address.service';
|
|
12
13
|
export { DaffMagentoCartShippingMethodsService } from './cart-shipping-methods.service';
|
|
@@ -7,9 +7,10 @@ export { DaffMagentoCartService } from './cart.service';
|
|
|
7
7
|
export { DaffMagentoCartItemService } from './cart-item.service';
|
|
8
8
|
export { DaffMagentoCartPaymentService } from './cart-payment.service';
|
|
9
9
|
export { DaffMagentoCartPaymentMethodsService } from './cart-payment-methods.service';
|
|
10
|
+
export { DaffMagentoCartAddressService } from './cart-address.service';
|
|
10
11
|
export { DaffMagentoCartBillingAddressService } from './cart-billing-address.service';
|
|
11
12
|
export { DaffMagentoCartShippingAddressService } from './cart-shipping-address.service';
|
|
12
13
|
export { DaffMagentoCartShippingMethodsService } from './cart-shipping-methods.service';
|
|
13
14
|
export { DaffMagentoCartShippingInformationService } from './cart-shipping-information.service';
|
|
14
15
|
export { DaffCartMagentoDriverModule } from './cart-driver.module';
|
|
15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Rob2RzLnNlcnZpY2UnO1xuZXhwb3J0IHsgRGFmZk1hZ2VudG9DYXJ0U2hpcHBpbmdJbmZvcm1hdGlvblNlcnZpY2UgfSBmcm9tICcuL2NhcnQtc2hpcHBpbmctaW5mb3JtYXRpb24uc2VydmljZSc7XG5cbmV4cG9ydCB7IERhZmZDYXJ0TWFnZW50b0RyaXZlck1vZHVsZSB9IGZyb20gJy4vY2FydC1kcml2ZXIubW9kdWxlJztcbiJdfQ==
|
|
@@ -1731,6 +1731,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
1731
1731
|
}] }, { type: DaffMagentoCartPaymentTransformer }];
|
|
1732
1732
|
} });
|
|
1733
1733
|
|
|
1734
|
+
/**
|
|
1735
|
+
* A service for making Magento GraphQL queries for carts.
|
|
1736
|
+
*
|
|
1737
|
+
* @inheritdoc
|
|
1738
|
+
*/
|
|
1739
|
+
class DaffMagentoCartAddressService {
|
|
1740
|
+
constructor(mutationQueue, extraCartFragments, cartTransformer, cartAddressInputTransformer) {
|
|
1741
|
+
this.mutationQueue = mutationQueue;
|
|
1742
|
+
this.extraCartFragments = extraCartFragments;
|
|
1743
|
+
this.cartTransformer = cartTransformer;
|
|
1744
|
+
this.cartAddressInputTransformer = cartAddressInputTransformer;
|
|
1745
|
+
}
|
|
1746
|
+
update(cartId, address) {
|
|
1747
|
+
return address.email ? this.updateAddressWithEmail(cartId, address) : this.updateAddress(cartId, address);
|
|
1748
|
+
}
|
|
1749
|
+
updateAddress(cartId, address) {
|
|
1750
|
+
return this.mutationQueue.mutate({
|
|
1751
|
+
mutation: updateAddress(this.extraCartFragments),
|
|
1752
|
+
variables: {
|
|
1753
|
+
cartId,
|
|
1754
|
+
address: this.cartAddressInputTransformer.transform(address),
|
|
1755
|
+
},
|
|
1756
|
+
fetchPolicy: 'network-only',
|
|
1757
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
|
|
1758
|
+
}
|
|
1759
|
+
updateAddressWithEmail(cartId, address) {
|
|
1760
|
+
return this.mutationQueue.mutate({
|
|
1761
|
+
mutation: updateAddressWithEmail(this.extraCartFragments),
|
|
1762
|
+
variables: {
|
|
1763
|
+
cartId,
|
|
1764
|
+
email: address.email,
|
|
1765
|
+
address: this.cartAddressInputTransformer.transform(address),
|
|
1766
|
+
},
|
|
1767
|
+
fetchPolicy: 'network-only',
|
|
1768
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
/** @nocollapse */ DaffMagentoCartAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1772
|
+
/** @nocollapse */ DaffMagentoCartAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, providedIn: 'root' });
|
|
1773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, decorators: [{
|
|
1774
|
+
type: Injectable,
|
|
1775
|
+
args: [{
|
|
1776
|
+
providedIn: 'root',
|
|
1777
|
+
}]
|
|
1778
|
+
}], ctorParameters: function () {
|
|
1779
|
+
return [{ type: i5.DaffQueuedApollo, decorators: [{
|
|
1780
|
+
type: Inject,
|
|
1781
|
+
args: [DAFF_MAGENTO_CART_MUTATION_QUEUE]
|
|
1782
|
+
}] }, { type: undefined, decorators: [{
|
|
1783
|
+
type: Inject,
|
|
1784
|
+
args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS]
|
|
1785
|
+
}] }, { type: DaffMagentoCartTransformer }, { type: DaffMagentoCartAddressInputTransformer }];
|
|
1786
|
+
} });
|
|
1787
|
+
|
|
1734
1788
|
/**
|
|
1735
1789
|
* A service for making Magento GraphQL queries for carts.
|
|
1736
1790
|
*
|
|
@@ -1965,60 +2019,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
1965
2019
|
}] }, { type: DaffMagentoCartTransformer }, { type: DaffMagentoCartShippingRateTransformer }, { type: DaffMagentoShippingMethodInputTransformer }];
|
|
1966
2020
|
} });
|
|
1967
2021
|
|
|
1968
|
-
/**
|
|
1969
|
-
* A service for making Magento GraphQL queries for carts.
|
|
1970
|
-
*
|
|
1971
|
-
* @inheritdoc
|
|
1972
|
-
*/
|
|
1973
|
-
class DaffMagentoCartAddressService {
|
|
1974
|
-
constructor(mutationQueue, extraCartFragments, cartTransformer, cartAddressInputTransformer) {
|
|
1975
|
-
this.mutationQueue = mutationQueue;
|
|
1976
|
-
this.extraCartFragments = extraCartFragments;
|
|
1977
|
-
this.cartTransformer = cartTransformer;
|
|
1978
|
-
this.cartAddressInputTransformer = cartAddressInputTransformer;
|
|
1979
|
-
}
|
|
1980
|
-
update(cartId, address) {
|
|
1981
|
-
return address.email ? this.updateAddressWithEmail(cartId, address) : this.updateAddress(cartId, address);
|
|
1982
|
-
}
|
|
1983
|
-
updateAddress(cartId, address) {
|
|
1984
|
-
return this.mutationQueue.mutate({
|
|
1985
|
-
mutation: updateAddress(this.extraCartFragments),
|
|
1986
|
-
variables: {
|
|
1987
|
-
cartId,
|
|
1988
|
-
address: this.cartAddressInputTransformer.transform(address),
|
|
1989
|
-
},
|
|
1990
|
-
fetchPolicy: 'network-only',
|
|
1991
|
-
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
|
|
1992
|
-
}
|
|
1993
|
-
updateAddressWithEmail(cartId, address) {
|
|
1994
|
-
return this.mutationQueue.mutate({
|
|
1995
|
-
mutation: updateAddressWithEmail(this.extraCartFragments),
|
|
1996
|
-
variables: {
|
|
1997
|
-
cartId,
|
|
1998
|
-
email: address.email,
|
|
1999
|
-
address: this.cartAddressInputTransformer.transform(address),
|
|
2000
|
-
},
|
|
2001
|
-
fetchPolicy: 'network-only',
|
|
2002
|
-
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
/** @nocollapse */ DaffMagentoCartAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2006
|
-
/** @nocollapse */ DaffMagentoCartAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, providedIn: 'root' });
|
|
2007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCartAddressService, decorators: [{
|
|
2008
|
-
type: Injectable,
|
|
2009
|
-
args: [{
|
|
2010
|
-
providedIn: 'root',
|
|
2011
|
-
}]
|
|
2012
|
-
}], ctorParameters: function () {
|
|
2013
|
-
return [{ type: i5.DaffQueuedApollo, decorators: [{
|
|
2014
|
-
type: Inject,
|
|
2015
|
-
args: [DAFF_MAGENTO_CART_MUTATION_QUEUE]
|
|
2016
|
-
}] }, { type: undefined, decorators: [{
|
|
2017
|
-
type: Inject,
|
|
2018
|
-
args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS]
|
|
2019
|
-
}] }, { type: DaffMagentoCartTransformer }, { type: DaffMagentoCartAddressInputTransformer }];
|
|
2020
|
-
} });
|
|
2021
|
-
|
|
2022
2022
|
/**
|
|
2023
2023
|
* Transforms magento carts into an object usable by daffodil.
|
|
2024
2024
|
*/
|
|
@@ -2252,5 +2252,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
2252
2252
|
* Generated bundle index. Do not edit.
|
|
2253
2253
|
*/
|
|
2254
2254
|
|
|
2255
|
-
export { DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS, DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingInformationTransformer, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, daffProvideCartMagentoCartItemTransforms, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, magentoMergeCartsMutation, moneyFragment, placeOrder, pricesFragment, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail };
|
|
2255
|
+
export { DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS, DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressService, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingInformationTransformer, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, daffProvideCartMagentoCartItemTransforms, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, magentoMergeCartsMutation, moneyFragment, placeOrder, pricesFragment, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail };
|
|
2256
2256
|
//# sourceMappingURL=daffodil-cart-driver-magento.mjs.map
|