@daffodil/cart 0.92.3 → 0.93.1

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.
Files changed (31) hide show
  1. package/fesm2022/daffodil-cart-driver-in-memory.mjs +73 -73
  2. package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
  3. package/fesm2022/daffodil-cart-driver-magento-testing.mjs +30 -30
  4. package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +1 -1
  5. package/fesm2022/daffodil-cart-driver-magento.mjs +108 -103
  6. package/fesm2022/daffodil-cart-driver-magento.mjs.map +1 -1
  7. package/fesm2022/daffodil-cart-driver-testing.mjs +37 -37
  8. package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
  9. package/fesm2022/daffodil-cart-driver.mjs +3 -3
  10. package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
  11. package/fesm2022/daffodil-cart-routing.mjs +37 -37
  12. package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
  13. package/fesm2022/daffodil-cart-state-testing.mjs +16 -16
  14. package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
  15. package/fesm2022/daffodil-cart-state.mjs +48 -48
  16. package/fesm2022/daffodil-cart-state.mjs.map +1 -1
  17. package/fesm2022/daffodil-cart-testing.mjs +27 -27
  18. package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
  19. package/fesm2022/daffodil-cart.mjs +3 -3
  20. package/fesm2022/daffodil-cart.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/{driver/magento/index.d.ts → types/daffodil-cart-driver-magento.d.ts} +6 -2
  23. package/{state/index.d.ts → types/daffodil-cart-state.d.ts} +8 -7
  24. package/{testing/index.d.ts → types/daffodil-cart-testing.d.ts} +1 -1
  25. /package/{driver/in-memory/index.d.ts → types/daffodil-cart-driver-in-memory.d.ts} +0 -0
  26. /package/{driver/magento/testing/index.d.ts → types/daffodil-cart-driver-magento-testing.d.ts} +0 -0
  27. /package/{driver/testing/index.d.ts → types/daffodil-cart-driver-testing.d.ts} +0 -0
  28. /package/{driver/index.d.ts → types/daffodil-cart-driver.d.ts} +0 -0
  29. /package/{routing/index.d.ts → types/daffodil-cart-routing.d.ts} +0 -0
  30. /package/{state/testing/index.d.ts → types/daffodil-cart-state-testing.d.ts} +0 -0
  31. /package/{index.d.ts → types/daffodil-cart.d.ts} +0 -0
@@ -8,6 +8,7 @@ import { gql, Apollo } from 'apollo-angular';
8
8
  import { magentoMoneyFragment, daffMagentoTransformGraphQlError, daffTransformMagentoError } from '@daffodil/driver/magento';
9
9
  import * as i5 from '@daffodil/core/graphql';
10
10
  import { daffBuildFragmentNameSpread, daffBuildFragmentDefinition, DaffQueuedApollo } from '@daffodil/core/graphql';
11
+ import { CombinedGraphQLErrors } from '@apollo/client';
11
12
  import { DaffUnauthorizedForCartError, DaffCartNotFoundError, DaffCartDriverErrorCodes, DaffCartInvalidAPIResponseError, DaffProductOutOfStockError, DaffCartDriverErrorMap, DaffInvalidCouponCodeError, DaffCartItemDriver, provideDaffCartDriver, provideDaffCartItemDriver, provideDaffCartAddressDriver, provideDaffCartBillingAddressDriver, provideDaffCartShippingAddressDriver, provideDaffCartShippingMethodsDriver, provideDaffCartShippingInformationDriver, provideDaffCartPaymentDriver, provideDaffCartPaymentMethodsDriver, provideDaffCartOrderDriver, provideDaffCartCouponDriver, daffCartDriverProvideFreePaymentMethod } from '@daffodil/cart/driver';
12
13
  import { DaffBadInputError } from '@daffodil/driver';
13
14
  import { DaffProductNotFoundError } from '@daffodil/product/driver';
@@ -47,10 +48,10 @@ class DaffMagentoCartAddressTransformer {
47
48
  prefix: null,
48
49
  } : null;
49
50
  }
50
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressTransformer, providedIn: 'root' }); }
51
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
52
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressTransformer, providedIn: 'root' }); }
52
53
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressTransformer, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressTransformer, decorators: [{
54
55
  type: Injectable,
55
56
  args: [{
56
57
  providedIn: 'root',
@@ -74,10 +75,10 @@ class DaffMagentoBillingAddressTransformer {
74
75
  ? this.addressTransformer.transform(address)
75
76
  : null;
76
77
  }
77
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressTransformer, deps: [{ token: DaffMagentoCartAddressTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
78
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressTransformer, providedIn: 'root' }); }
78
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressTransformer, deps: [{ token: DaffMagentoCartAddressTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
79
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressTransformer, providedIn: 'root' }); }
79
80
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressTransformer, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressTransformer, decorators: [{
81
82
  type: Injectable,
82
83
  args: [{
83
84
  providedIn: 'root',
@@ -202,10 +203,10 @@ class DaffMagentoCartPaymentTransformer {
202
203
  method: responsePayment.code,
203
204
  } : null;
204
205
  }
205
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
206
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentTransformer, providedIn: 'root' }); }
206
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
207
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentTransformer, providedIn: 'root' }); }
207
208
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentTransformer, decorators: [{
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentTransformer, decorators: [{
209
210
  type: Injectable,
210
211
  args: [{
211
212
  providedIn: 'root',
@@ -233,10 +234,10 @@ class DaffMagentoCartShippingRateTransformer {
233
234
  method_description: null,
234
235
  } : null;
235
236
  }
236
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
237
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, providedIn: 'root' }); }
237
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
238
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, providedIn: 'root' }); }
238
239
  }
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, decorators: [{
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingRateTransformer, decorators: [{
240
241
  type: Injectable,
241
242
  args: [{
242
243
  providedIn: 'root',
@@ -321,10 +322,10 @@ class DaffMagentoShippingAddressTransformer {
321
322
  ? this.addressTransformer.transform(address)
322
323
  : null;
323
324
  }
324
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressTransformer, deps: [{ token: DaffMagentoCartAddressTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
325
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressTransformer, providedIn: 'root' }); }
325
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressTransformer, deps: [{ token: DaffMagentoCartAddressTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
326
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressTransformer, providedIn: 'root' }); }
326
327
  }
327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressTransformer, decorators: [{
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressTransformer, decorators: [{
328
329
  type: Injectable,
329
330
  args: [{
330
331
  providedIn: 'root',
@@ -348,7 +349,7 @@ token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,
348
349
  /**
349
350
  * Provider function for {@link DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS}.
350
351
  */
351
- provider: provideDaffCartMagentoExtraCartFragments, } = createMultiInjectionToken('DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS');
352
+ provider: provideDaffCartMagentoExtraCartFragments, factoryProvider: provideDaffCartMagentoExtraCartFragmentFactories, } = createMultiInjectionToken('DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS');
352
353
 
353
354
  const {
354
355
  /**
@@ -370,7 +371,7 @@ token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS,
370
371
  * ]
371
372
  * ```
372
373
  */
373
- provider: provideDaffCartMagentoCartItemTransforms, } = createMultiInjectionToken('DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS');
374
+ provider: provideDaffCartMagentoCartItemTransforms, factoryProvider: provideDaffCartMagentoCartItemTransformFactories, } = createMultiInjectionToken('DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS');
374
375
 
375
376
  const {
376
377
  /**
@@ -392,7 +393,7 @@ token: DAFF_CART_MAGENTO_CART_TRANSFORMS,
392
393
  * ]
393
394
  * ```
394
395
  */
395
- provider: provideDaffCartMagentoCartTransforms, } = createMultiInjectionToken('DAFF_CART_MAGENTO_CART_TRANSFORMS');
396
+ provider: provideDaffCartMagentoCartTransforms, factoryProvider: provideDaffCartMagentoCartTransformFactories, } = createMultiInjectionToken('DAFF_CART_MAGENTO_CART_TRANSFORMS');
396
397
 
397
398
  /**
398
399
  * Transforms magento carts into an object usable by daffodil.
@@ -483,10 +484,10 @@ class DaffMagentoCartTransformer {
483
484
  id: cart.id,
484
485
  }) : null;
485
486
  }
486
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartTransformer, deps: [{ token: DaffMagentoShippingAddressTransformer }, { token: DaffMagentoBillingAddressTransformer }, { token: DaffMagentoCartPaymentTransformer }, { token: DaffMagentoCartShippingRateTransformer }, { token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }, { token: DAFF_CART_MAGENTO_CART_TRANSFORMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
487
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartTransformer, providedIn: 'root' }); }
487
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartTransformer, deps: [{ token: DaffMagentoShippingAddressTransformer }, { token: DaffMagentoBillingAddressTransformer }, { token: DaffMagentoCartPaymentTransformer }, { token: DaffMagentoCartShippingRateTransformer }, { token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }, { token: DAFF_CART_MAGENTO_CART_TRANSFORMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
488
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartTransformer, providedIn: 'root' }); }
488
489
  }
489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartTransformer, decorators: [{
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartTransformer, decorators: [{
490
491
  type: Injectable,
491
492
  args: [{
492
493
  providedIn: 'root',
@@ -517,10 +518,10 @@ class DaffMagentoCartAddressInputTransformer {
517
518
  telephone: cartAddress.telephone,
518
519
  };
519
520
  }
520
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
521
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, providedIn: 'root' }); }
521
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
522
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, providedIn: 'root' }); }
522
523
  }
523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressInputTransformer, decorators: [{
524
525
  type: Injectable,
525
526
  args: [{
526
527
  providedIn: 'root',
@@ -542,10 +543,10 @@ class DaffMagentoShippingAddressInputTransformer {
542
543
  customer_address_id: null,
543
544
  };
544
545
  }
545
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, deps: [{ token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
546
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, providedIn: 'root' }); }
546
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, deps: [{ token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
547
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, providedIn: 'root' }); }
547
548
  }
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, decorators: [{
549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingAddressInputTransformer, decorators: [{
549
550
  type: Injectable,
550
551
  args: [{
551
552
  providedIn: 'root',
@@ -567,10 +568,10 @@ class DaffMagentoBillingAddressInputTransformer {
567
568
  customer_address_id: null,
568
569
  };
569
570
  }
570
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, deps: [{ token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
571
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, providedIn: 'root' }); }
571
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, deps: [{ token: DaffMagentoCartAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
572
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, providedIn: 'root' }); }
572
573
  }
573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, decorators: [{
574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoBillingAddressInputTransformer, decorators: [{
574
575
  type: Injectable,
575
576
  args: [{
576
577
  providedIn: 'root',
@@ -584,10 +585,10 @@ class DaffMagentoCartItemUpdateInputTransformer {
584
585
  cart_item_id: Number(item.id),
585
586
  };
586
587
  }
587
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
588
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, providedIn: 'root' }); }
588
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
589
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, providedIn: 'root' }); }
589
590
  }
590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, decorators: [{
591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemUpdateInputTransformer, decorators: [{
591
592
  type: Injectable,
592
593
  args: [{
593
594
  providedIn: 'root',
@@ -600,10 +601,10 @@ class DaffMagentoPaymentMethodInputTransformer {
600
601
  ...payment.payment_info,
601
602
  };
602
603
  }
603
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
604
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, providedIn: 'root' }); }
604
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
605
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, providedIn: 'root' }); }
605
606
  }
606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, decorators: [{
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoPaymentMethodInputTransformer, decorators: [{
607
608
  type: Injectable,
608
609
  args: [{
609
610
  providedIn: 'root',
@@ -617,10 +618,10 @@ class DaffMagentoShippingMethodInputTransformer {
617
618
  method_code: method.method_code,
618
619
  };
619
620
  }
620
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
621
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, providedIn: 'root' }); }
621
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
622
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, providedIn: 'root' }); }
622
623
  }
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, decorators: [{
624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoShippingMethodInputTransformer, decorators: [{
624
625
  type: Injectable,
625
626
  args: [{
626
627
  providedIn: 'root',
@@ -1417,14 +1418,13 @@ function transformMagentoCartGraphQlError(error, requestPayload) {
1417
1418
  }
1418
1419
  return daffMagentoTransformGraphQlError(error, DaffCartMagentoErrorMap);
1419
1420
  }
1420
- ;
1421
1421
  /**
1422
1422
  * Transforms only the first GraphQL error with the cart magento error transformer,
1423
1423
  * otherwise falls back to a standard Magento error transform.
1424
1424
  */
1425
1425
  function transformCartMagentoError(error, requestPayload) {
1426
- if (error.graphQLErrors?.length) {
1427
- return transformMagentoCartGraphQlError(error.graphQLErrors[0], requestPayload);
1426
+ if (CombinedGraphQLErrors.is(error)) {
1427
+ return transformMagentoCartGraphQlError(error.errors[0], requestPayload);
1428
1428
  }
1429
1429
  else {
1430
1430
  return daffTransformMagentoError(error, DaffCartMagentoErrorMap);
@@ -1465,15 +1465,17 @@ class DaffMagentoCartService {
1465
1465
  query: getCart(this.extraCartFragments),
1466
1466
  variables: { cartId },
1467
1467
  errorPolicy: 'all',
1468
- }).pipe(map(({ data, errors }) => ({
1468
+ }).pipe(map(({ data, error }) => ({
1469
1469
  response: data ? this.cartTransformer.transform(data.cart) : undefined,
1470
- errors: errors?.map(e => {
1471
- const error = transformMagentoCartGraphQlError(e);
1472
- if (DAFF_MAGENTO_GET_RECOVERABLE_ERRORS.find(klass => error instanceof klass)) {
1473
- error.recoverable = true;
1474
- }
1475
- return error;
1476
- }) || [],
1470
+ errors: CombinedGraphQLErrors.is(error)
1471
+ ? error.errors?.map(e => {
1472
+ const err = transformMagentoCartGraphQlError(e);
1473
+ if (DAFF_MAGENTO_GET_RECOVERABLE_ERRORS.filter(klass => err instanceof klass).length > 0) {
1474
+ err.recoverable = true;
1475
+ }
1476
+ return err;
1477
+ }) || []
1478
+ : error ? [transformMagentoCartGraphQlError(error)] : [],
1477
1479
  })), switchMap((resp) => resp.errors.reduce((acc, err) => acc && err.recoverable, true)
1478
1480
  ? of(resp)
1479
1481
  : throwError(() => resp.errors.filter((err) => !err.recoverable)[0])));
@@ -1496,24 +1498,26 @@ class DaffMagentoCartService {
1496
1498
  },
1497
1499
  errorPolicy: 'all',
1498
1500
  fetchPolicy: 'network-only',
1499
- }).pipe(map(({ data, errors }) => ({
1501
+ }).pipe(map(({ data, error }) => ({
1500
1502
  response: data ? this.cartTransformer.transform(data.mergeCarts) : undefined,
1501
- errors: errors?.map(e => {
1502
- const error = transformMagentoCartGraphQlError(e);
1503
- if (DAFF_MAGENTO_GET_RECOVERABLE_ERRORS.filter(klass => error instanceof klass).length > 0) {
1504
- error.recoverable = true;
1505
- }
1506
- return error;
1507
- }) || [],
1503
+ errors: CombinedGraphQLErrors.is(error)
1504
+ ? error.errors?.map(e => {
1505
+ const err = transformMagentoCartGraphQlError(e);
1506
+ if (DAFF_MAGENTO_GET_RECOVERABLE_ERRORS.filter(klass => err instanceof klass).length > 0) {
1507
+ err.recoverable = true;
1508
+ }
1509
+ return err;
1510
+ }) || []
1511
+ : error ? [transformMagentoCartGraphQlError(error)] : [],
1508
1512
  })), switchMap((resp) => resp.errors.reduce((acc, err) => acc && err.recoverable, true)
1509
1513
  ? of(resp)
1510
1514
  : throwError(() => resp.errors.filter((err) => !err.recoverable)[0])));
1511
1515
  }
1512
1516
  ;
1513
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DaffMagentoCartTransformer }, { token: DaffCartItemDriver }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }], target: i0.ɵɵFactoryTarget.Injectable }); }
1514
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartService, providedIn: 'root' }); }
1517
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DaffMagentoCartTransformer }, { token: DaffCartItemDriver }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }], target: i0.ɵɵFactoryTarget.Injectable }); }
1518
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartService, providedIn: 'root' }); }
1515
1519
  }
1516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartService, decorators: [{
1520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartService, decorators: [{
1517
1521
  type: Injectable,
1518
1522
  args: [{
1519
1523
  providedIn: 'root',
@@ -1627,10 +1631,10 @@ class DaffMagentoCartItemService {
1627
1631
  ? throwError(() => magentoCartTransformUserError(result.data.addProductsToCart.user_errors[0]))
1628
1632
  : of(this.cartTransformer.transform(result.data.addProductsToCart.cart))), catchError(err => throwError(() => transformCartMagentoError(err))));
1629
1633
  }
1630
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartItemUpdateInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1631
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemService, providedIn: 'root' }); }
1634
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartItemUpdateInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1635
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemService, providedIn: 'root' }); }
1632
1636
  }
1633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartItemService, decorators: [{
1637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartItemService, decorators: [{
1634
1638
  type: Injectable,
1635
1639
  args: [{
1636
1640
  providedIn: 'root',
@@ -1718,10 +1722,10 @@ class DaffMagentoCartPaymentService {
1718
1722
  fetchPolicy: 'network-only',
1719
1723
  }).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
1720
1724
  }
1721
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartPaymentTransformer }, { token: DaffMagentoPaymentMethodInputTransformer }, { token: DaffMagentoBillingAddressInputTransformer }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }], target: i0.ɵɵFactoryTarget.Injectable }); }
1722
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentService, providedIn: 'root' }); }
1725
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartPaymentTransformer }, { token: DaffMagentoPaymentMethodInputTransformer }, { token: DaffMagentoBillingAddressInputTransformer }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }], target: i0.ɵɵFactoryTarget.Injectable }); }
1726
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentService, providedIn: 'root' }); }
1723
1727
  }
1724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentService, decorators: [{
1728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentService, decorators: [{
1725
1729
  type: Injectable,
1726
1730
  args: [{
1727
1731
  providedIn: 'root',
@@ -1752,10 +1756,10 @@ class DaffMagentoCartPaymentMethodsService {
1752
1756
  fetchPolicy: 'network-only',
1753
1757
  }).pipe(map(result => result.data.cart.available_payment_methods.map(item => this.paymentTransformer.transform(item))), catchError(error => throwError(() => transformCartMagentoError(error))));
1754
1758
  }
1755
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, deps: [{ token: i1.Apollo }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartPaymentTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1756
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, providedIn: 'root' }); }
1759
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, deps: [{ token: i1.Apollo }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartPaymentTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1760
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, providedIn: 'root' }); }
1757
1761
  }
1758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, decorators: [{
1762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartPaymentMethodsService, decorators: [{
1759
1763
  type: Injectable,
1760
1764
  args: [{
1761
1765
  providedIn: 'root',
@@ -1810,10 +1814,10 @@ class DaffMagentoCartAddressService {
1810
1814
  fetchPolicy: 'network-only',
1811
1815
  }).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
1812
1816
  }
1813
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", 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 }); }
1814
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressService, providedIn: 'root' }); }
1817
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", 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 }); }
1818
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressService, providedIn: 'root' }); }
1815
1819
  }
1816
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartAddressService, decorators: [{
1820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartAddressService, decorators: [{
1817
1821
  type: Injectable,
1818
1822
  args: [{
1819
1823
  providedIn: 'root',
@@ -1879,10 +1883,10 @@ class DaffMagentoCartBillingAddressService {
1879
1883
  email: resp.data.setGuestEmailOnCart.cart.email,
1880
1884
  })), catchError(error => throwError(() => transformCartMagentoError(error))));
1881
1885
  }
1882
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartBillingAddressService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoBillingAddressTransformer }, { token: DaffMagentoBillingAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1883
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartBillingAddressService, providedIn: 'root' }); }
1886
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartBillingAddressService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoBillingAddressTransformer }, { token: DaffMagentoBillingAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1887
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartBillingAddressService, providedIn: 'root' }); }
1884
1888
  }
1885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartBillingAddressService, decorators: [{
1889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartBillingAddressService, decorators: [{
1886
1890
  type: Injectable,
1887
1891
  args: [{
1888
1892
  providedIn: 'root',
@@ -1948,10 +1952,10 @@ class DaffMagentoCartShippingAddressService {
1948
1952
  email: resp.data.setGuestEmailOnCart.cart.email,
1949
1953
  })), catchError(error => throwError(() => transformCartMagentoError(error))));
1950
1954
  }
1951
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingAddressService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoShippingAddressTransformer }, { token: DaffMagentoShippingAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1952
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingAddressService, providedIn: 'root' }); }
1955
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingAddressService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoShippingAddressTransformer }, { token: DaffMagentoShippingAddressInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1956
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingAddressService, providedIn: 'root' }); }
1953
1957
  }
1954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingAddressService, decorators: [{
1958
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingAddressService, decorators: [{
1955
1959
  type: Injectable,
1956
1960
  args: [{
1957
1961
  providedIn: 'root',
@@ -1982,10 +1986,10 @@ class DaffMagentoCartShippingMethodsService {
1982
1986
  fetchPolicy: 'network-only',
1983
1987
  }).pipe(map(result => result.data.cart.shipping_addresses[0].available_shipping_methods.map(item => this.shippingRateTransformer.transform(item))), catchError(error => throwError(() => transformCartMagentoError(error))));
1984
1988
  }
1985
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingMethodsService, deps: [{ token: i1.Apollo }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartShippingRateTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1986
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingMethodsService, providedIn: 'root' }); }
1989
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingMethodsService, deps: [{ token: i1.Apollo }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartShippingRateTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1990
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingMethodsService, providedIn: 'root' }); }
1987
1991
  }
1988
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingMethodsService, decorators: [{
1992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingMethodsService, decorators: [{
1989
1993
  type: Injectable,
1990
1994
  args: [{
1991
1995
  providedIn: 'root',
@@ -2051,10 +2055,10 @@ class DaffMagentoCartShippingInformationService {
2051
2055
  },
2052
2056
  }).pipe(map(result => this.cartTransformer.transform(result.data.setShippingMethodsOnCart.cart)), catchError(error => throwError(() => transformCartMagentoError(error))));
2053
2057
  }
2054
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingInformationService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartShippingRateTransformer }, { token: DaffMagentoShippingMethodInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
2055
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingInformationService, providedIn: 'root' }); }
2058
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingInformationService, deps: [{ token: i1.Apollo }, { token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: DaffMagentoCartShippingRateTransformer }, { token: DaffMagentoShippingMethodInputTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
2059
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingInformationService, providedIn: 'root' }); }
2056
2060
  }
2057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartShippingInformationService, decorators: [{
2061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartShippingInformationService, decorators: [{
2058
2062
  type: Injectable,
2059
2063
  args: [{
2060
2064
  providedIn: 'root',
@@ -2073,10 +2077,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
2073
2077
  * @inheritdoc
2074
2078
  */
2075
2079
  class DaffMagentoCartCouponService {
2076
- constructor(mutationQueue, extraCartFragments, cartTransformer) {
2080
+ constructor(mutationQueue, extraCartFragments, cartTransformer, apollo) {
2077
2081
  this.mutationQueue = mutationQueue;
2078
2082
  this.extraCartFragments = extraCartFragments;
2079
2083
  this.cartTransformer = cartTransformer;
2084
+ this.apollo = apollo;
2080
2085
  }
2081
2086
  apply(cartId, coupon) {
2082
2087
  return this.mutationQueue.mutate({
@@ -2089,8 +2094,8 @@ class DaffMagentoCartCouponService {
2089
2094
  }).pipe(map(result => this.cartTransformer.transform(result.data.applyCouponToCart.cart)), catchError(err => throwError(() => transformCartMagentoError(err, coupon))));
2090
2095
  }
2091
2096
  list(cartId) {
2092
- return this.mutationQueue.mutate({
2093
- mutation: listCartCoupons(this.extraCartFragments),
2097
+ return this.apollo.query({
2098
+ query: listCartCoupons(this.extraCartFragments),
2094
2099
  variables: {
2095
2100
  cartId,
2096
2101
  },
@@ -2109,10 +2114,10 @@ class DaffMagentoCartCouponService {
2109
2114
  fetchPolicy: 'network-only',
2110
2115
  }).pipe(map(result => this.cartTransformer.transform(result.data.removeCouponFromCart.cart)), catchError(err => throwError(() => transformCartMagentoError(err))));
2111
2116
  }
2112
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
2113
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponService, providedIn: 'root' }); }
2117
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }, { token: DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS }, { token: DaffMagentoCartTransformer }, { token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2118
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponService, providedIn: 'root' }); }
2114
2119
  }
2115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponService, decorators: [{
2120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponService, decorators: [{
2116
2121
  type: Injectable,
2117
2122
  args: [{
2118
2123
  providedIn: 'root',
@@ -2123,7 +2128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
2123
2128
  }] }, { type: undefined, decorators: [{
2124
2129
  type: Inject,
2125
2130
  args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS]
2126
- }] }, { type: DaffMagentoCartTransformer }] });
2131
+ }] }, { type: DaffMagentoCartTransformer }, { type: i1.Apollo }] });
2127
2132
 
2128
2133
  /**
2129
2134
  * A service for making Magento GraphQL queries for carts.
@@ -2147,10 +2152,10 @@ class DaffMagentoCartOrderService {
2147
2152
  cartId,
2148
2153
  })), catchError(err => throwError(() => transformCartMagentoError(err))));
2149
2154
  }
2150
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartOrderService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }], target: i0.ɵɵFactoryTarget.Injectable }); }
2151
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartOrderService, providedIn: 'root' }); }
2155
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartOrderService, deps: [{ token: DAFF_MAGENTO_CART_MUTATION_QUEUE }], target: i0.ɵɵFactoryTarget.Injectable }); }
2156
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartOrderService, providedIn: 'root' }); }
2152
2157
  }
2153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartOrderService, decorators: [{
2158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartOrderService, decorators: [{
2154
2159
  type: Injectable,
2155
2160
  args: [{
2156
2161
  providedIn: 'root',
@@ -2193,10 +2198,10 @@ class DaffMagentoCartCouponResponseTransformer {
2193
2198
  id: cart.id,
2194
2199
  } : null;
2195
2200
  }
2196
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, deps: [{ token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
2197
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, providedIn: 'root' }); }
2201
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, deps: [{ token: DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
2202
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, providedIn: 'root' }); }
2198
2203
  }
2199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, decorators: [{
2204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCartCouponResponseTransformer, decorators: [{
2200
2205
  type: Injectable,
2201
2206
  args: [{
2202
2207
  providedIn: 'root',
@@ -2246,11 +2251,11 @@ class DaffCartMagentoDriverModule {
2246
2251
  ],
2247
2252
  };
2248
2253
  }
2249
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2250
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCartMagentoDriverModule, imports: [CommonModule] }); }
2251
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartMagentoDriverModule, imports: [CommonModule] }); }
2254
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCartMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2255
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCartMagentoDriverModule, imports: [CommonModule] }); }
2256
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCartMagentoDriverModule, imports: [CommonModule] }); }
2252
2257
  }
2253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartMagentoDriverModule, decorators: [{
2258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCartMagentoDriverModule, decorators: [{
2254
2259
  type: NgModule,
2255
2260
  args: [{
2256
2261
  imports: [
@@ -2263,5 +2268,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
2263
2268
  * Generated bundle index. Do not edit.
2264
2269
  */
2265
2270
 
2266
- export { DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS, DAFF_CART_MAGENTO_CART_TRANSFORMS, DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DAFF_MAGENTO_GET_RECOVERABLE_ERRORS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressService, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, MagentoCartUserInputErrorType, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, magentoCartUserError, magentoMergeCartsMutation, placeOrder, pricesFragment, provideDaffCartMagentoCartItemTransforms, provideDaffCartMagentoCartTransforms, provideDaffCartMagentoExtraCartFragments, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, transformMagentoCartGraphQlError, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail };
2271
+ export { DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS, DAFF_CART_MAGENTO_CART_TRANSFORMS, DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DAFF_MAGENTO_GET_RECOVERABLE_ERRORS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressService, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, MagentoCartUserInputErrorType, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, magentoCartUserError, magentoMergeCartsMutation, placeOrder, pricesFragment, provideDaffCartMagentoCartItemTransformFactories, provideDaffCartMagentoCartItemTransforms, provideDaffCartMagentoCartTransformFactories, provideDaffCartMagentoCartTransforms, provideDaffCartMagentoExtraCartFragmentFactories, provideDaffCartMagentoExtraCartFragments, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, transformMagentoCartGraphQlError, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail };
2267
2272
  //# sourceMappingURL=daffodil-cart-driver-magento.mjs.map