@daffodil/driver 0.81.1 → 0.82.0

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 (38) hide show
  1. package/fesm2022/daffodil-driver-in-memory.mjs +7 -7
  2. package/fesm2022/daffodil-driver-magento-testing.mjs +9 -9
  3. package/fesm2022/daffodil-driver-magento.mjs +13 -13
  4. package/fesm2022/daffodil-driver-shopify-testing.mjs +142 -0
  5. package/fesm2022/daffodil-driver-shopify-testing.mjs.map +1 -0
  6. package/fesm2022/daffodil-driver-shopify.mjs +2418 -0
  7. package/fesm2022/daffodil-driver-shopify.mjs.map +1 -0
  8. package/fesm2022/daffodil-driver.mjs +3 -3
  9. package/package.json +1 -1
  10. package/shopify/codegen/generated-shopify-types.d.ts +8214 -0
  11. package/shopify/codegen/public_api.d.ts +1 -0
  12. package/shopify/graphql/apollo-links/auth-link.d.ts +8 -0
  13. package/shopify/graphql/apollo-links/error-link.d.ts +7 -0
  14. package/shopify/graphql/apollo-links/http-link.d.ts +8 -0
  15. package/shopify/graphql/apollo-links/public_api.d.ts +3 -0
  16. package/shopify/graphql/provide-shopify-apollo-driver.d.ts +8 -0
  17. package/shopify/graphql/public_api.d.ts +1 -0
  18. package/shopify/index.d.ts +1 -0
  19. package/shopify/models/image-node.d.ts +5 -0
  20. package/shopify/models/money.d.ts +3 -0
  21. package/shopify/models/product-graph.d.ts +5 -0
  22. package/shopify/models/product-images.d.ts +5 -0
  23. package/shopify/models/product-node.d.ts +4 -0
  24. package/shopify/models/product-price-range.d.ts +5 -0
  25. package/shopify/models/public_api.d.ts +6 -0
  26. package/shopify/public_api.d.ts +4 -0
  27. package/shopify/testing/factories/money.factory.d.ts +13 -0
  28. package/shopify/testing/factories/product-graph.factory.d.ts +15 -0
  29. package/shopify/testing/factories/product-image-node.factory.d.ts +14 -0
  30. package/shopify/testing/factories/product-images.factory.d.ts +15 -0
  31. package/shopify/testing/factories/product-node.factory.d.ts +24 -0
  32. package/shopify/testing/factories/product-price-range.factory.d.ts +16 -0
  33. package/shopify/testing/factories/public_api.d.ts +6 -0
  34. package/shopify/testing/index.d.ts +1 -0
  35. package/shopify/transforms/public_api.d.ts +3 -0
  36. package/shopify/transforms/shopify-handle-transform.d.ts +7 -0
  37. package/shopify/transforms/shopify-id-transform.d.ts +10 -0
  38. package/shopify/transforms/shopify-url-transform.d.ts +9 -0
@@ -72,10 +72,10 @@ class DaffInMemoryRootBackend extends DaffInMemoryBackendDelegate {
72
72
  ...backend.createDb(reqInfo),
73
73
  }), {})));
74
74
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryRootBackend, deps: [{ token: DAFF_IN_MEMORY_BACKENDS }], target: i0.ɵɵFactoryTarget.Injectable }); }
76
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryRootBackend, providedIn: 'root' }); }
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryRootBackend, deps: [{ token: DAFF_IN_MEMORY_BACKENDS }], target: i0.ɵɵFactoryTarget.Injectable }); }
76
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryRootBackend, providedIn: 'root' }); }
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryRootBackend, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryRootBackend, decorators: [{
79
79
  type: Injectable,
80
80
  args: [{
81
81
  providedIn: 'root',
@@ -123,11 +123,11 @@ class DaffInMemoryDriverModule {
123
123
  ],
124
124
  };
125
125
  }
126
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
127
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryDriverModule }); }
128
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryDriverModule }); }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
127
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryDriverModule }); }
128
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryDriverModule }); }
129
129
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffInMemoryDriverModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffInMemoryDriverModule, decorators: [{
131
131
  type: NgModule
132
132
  }] });
133
133
 
@@ -15,10 +15,10 @@ class MagentoMoneyFactory extends DaffModelFactory {
15
15
  constructor() {
16
16
  super(MockMagentoMoney);
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoMoneyFactory, providedIn: 'root' }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoMoneyFactory, providedIn: 'root' }); }
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoMoneyFactory, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoMoneyFactory, decorators: [{
22
22
  type: Injectable,
23
23
  args: [{
24
24
  providedIn: 'root',
@@ -40,10 +40,10 @@ class MagentoDiscountFactory extends DaffModelFactory {
40
40
  constructor() {
41
41
  super(MockMagentoDiscount);
42
42
  }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoDiscountFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
44
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoDiscountFactory, providedIn: 'root' }); }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoDiscountFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
44
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoDiscountFactory, providedIn: 'root' }); }
45
45
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoDiscountFactory, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoDiscountFactory, decorators: [{
47
47
  type: Injectable,
48
48
  args: [{
49
49
  providedIn: 'root',
@@ -61,10 +61,10 @@ class MagentoSearchResultPageInfoFactory extends DaffModelFactory {
61
61
  constructor() {
62
62
  super(MockMagentoSearchResultPageInfo);
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoSearchResultPageInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
65
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoSearchResultPageInfoFactory, providedIn: 'root' }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoSearchResultPageInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoSearchResultPageInfoFactory, providedIn: 'root' }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MagentoSearchResultPageInfoFactory, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: MagentoSearchResultPageInfoFactory, decorators: [{
68
68
  type: Injectable,
69
69
  args: [{
70
70
  providedIn: 'root',
@@ -183,10 +183,10 @@ class DaffMagentoApolloCacheableOperationsLinkGenerator {
183
183
  return forward(operation);
184
184
  });
185
185
  }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, deps: [{ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS }], target: i0.ɵɵFactoryTarget.Injectable }); }
187
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: 'root' }); }
186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, deps: [{ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS }], target: i0.ɵɵFactoryTarget.Injectable }); }
187
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: 'root' }); }
188
188
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, decorators: [{
190
190
  type: Injectable,
191
191
  args: [{
192
192
  providedIn: 'root',
@@ -441,10 +441,10 @@ class DaffDriverHttpClientCacheMagentoService {
441
441
  location.reload();
442
442
  }
443
443
  }
444
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
445
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, providedIn: 'root' }); }
444
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
445
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, providedIn: 'root' }); }
446
446
  }
447
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, decorators: [{
447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverHttpClientCacheMagentoService, decorators: [{
448
448
  type: Injectable,
449
449
  args: [{
450
450
  providedIn: 'root',
@@ -482,10 +482,10 @@ class DaffMagentoCacheHeaderApolloLinkGenerator {
482
482
  });
483
483
  });
484
484
  }
485
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
486
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, providedIn: 'root' }); }
485
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
486
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, providedIn: 'root' }); }
487
487
  }
488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, decorators: [{
488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, decorators: [{
489
489
  type: Injectable,
490
490
  args: [{
491
491
  providedIn: 'root',
@@ -532,13 +532,13 @@ const magentoMoneyFragment = gql `
532
532
  `;
533
533
 
534
534
  class DaffDriverMagentoModule {
535
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
536
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverMagentoModule }); }
537
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverMagentoModule, providers: [
535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
536
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverMagentoModule }); }
537
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverMagentoModule, providers: [
538
538
  provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),
539
539
  ] }); }
540
540
  }
541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffDriverMagentoModule, decorators: [{
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DaffDriverMagentoModule, decorators: [{
542
542
  type: NgModule,
543
543
  args: [{
544
544
  providers: [
@@ -0,0 +1,142 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import { DaffModelFactory } from '@daffodil/core/testing';
4
+ import { faker } from '@faker-js/faker/locale/en_US';
5
+ import { shopifyIdTransformer, CurrencyCode, shopifyHandleTransformer } from '@daffodil/driver/shopify';
6
+
7
+ class MockShopifyProductImageNode {
8
+ constructor() {
9
+ this.id = shopifyIdTransformer(`${faker.datatype.number({ min: 10000000000 })}`, 'ProductImage');
10
+ this.url = faker.image.imageUrl();
11
+ this.altText = faker.random.words(5);
12
+ }
13
+ }
14
+ class ShopifyProductImageNodeFactory extends DaffModelFactory {
15
+ constructor() {
16
+ super(MockShopifyProductImageNode);
17
+ }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImageNodeFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImageNodeFactory, providedIn: 'root' }); }
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImageNodeFactory, decorators: [{
22
+ type: Injectable,
23
+ args: [{
24
+ providedIn: 'root',
25
+ }]
26
+ }], ctorParameters: () => [] });
27
+
28
+ class MockShopifyProductImages {
29
+ constructor(shopifyProductImageNodeFactory) {
30
+ this.shopifyProductImageNodeFactory = shopifyProductImageNodeFactory;
31
+ this.nodes = this.shopifyProductImageNodeFactory.createMany();
32
+ }
33
+ }
34
+ class ShopifyProductImagesFactory extends DaffModelFactory {
35
+ constructor(shopifyProductImageNodeFactory) {
36
+ super(MockShopifyProductImages, shopifyProductImageNodeFactory);
37
+ }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImagesFactory, deps: [{ token: ShopifyProductImageNodeFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImagesFactory, providedIn: 'root' }); }
40
+ }
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductImagesFactory, decorators: [{
42
+ type: Injectable,
43
+ args: [{
44
+ providedIn: 'root',
45
+ }]
46
+ }], ctorParameters: () => [{ type: ShopifyProductImageNodeFactory }] });
47
+
48
+ class MockShopifyMoney {
49
+ constructor() {
50
+ this.amount = parseFloat(faker.commerce.price());
51
+ this.currencyCode = faker.helpers.objectValue(CurrencyCode);
52
+ }
53
+ }
54
+ class ShopifyMoneyFactory extends DaffModelFactory {
55
+ constructor() {
56
+ super(MockShopifyMoney);
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyMoneyFactory, providedIn: 'root' }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyMoneyFactory, decorators: [{
62
+ type: Injectable,
63
+ args: [{
64
+ providedIn: 'root',
65
+ }]
66
+ }], ctorParameters: () => [] });
67
+
68
+ class MockShopifyProductPriceRange {
69
+ constructor(shopifyMoneyFactory) {
70
+ this.shopifyMoneyFactory = shopifyMoneyFactory;
71
+ this.maxVariantPrice = this.shopifyMoneyFactory.create();
72
+ this.minVariantPrice = this.shopifyMoneyFactory.create();
73
+ }
74
+ }
75
+ class ShopifyProductPriceRangeFactory extends DaffModelFactory {
76
+ constructor(shopifyMoneyFactory) {
77
+ super(MockShopifyProductPriceRange, shopifyMoneyFactory);
78
+ }
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductPriceRangeFactory, deps: [{ token: ShopifyMoneyFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
80
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductPriceRangeFactory, providedIn: 'root' }); }
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductPriceRangeFactory, decorators: [{
83
+ type: Injectable,
84
+ args: [{
85
+ providedIn: 'root',
86
+ }]
87
+ }], ctorParameters: () => [{ type: ShopifyMoneyFactory }] });
88
+
89
+ class MockShopifyProductNode {
90
+ constructor(shopifyProductPriceRangeFactory, shopifyProductImagesFactory) {
91
+ this.shopifyProductPriceRangeFactory = shopifyProductPriceRangeFactory;
92
+ this.shopifyProductImagesFactory = shopifyProductImagesFactory;
93
+ this.title = faker.commerce.productName();
94
+ this.handle = shopifyHandleTransformer(faker.commerce.productName());
95
+ this.id = shopifyIdTransformer(`${faker.datatype.number({ min: 100000000000 })}`, 'Product');
96
+ this.description = faker.commerce.productDescription();
97
+ this.onlineStoreUrl = faker.internet.domainName();
98
+ this.availableForSale = faker.datatype.boolean();
99
+ this.priceRange = this.shopifyProductPriceRangeFactory.create();
100
+ this.images = this.shopifyProductImagesFactory.create();
101
+ }
102
+ }
103
+ class ShopifyProductNodeFactory extends DaffModelFactory {
104
+ constructor(shopifyProductPriceRangeFactory, shopifyProductImagesFactory) {
105
+ super(MockShopifyProductNode, shopifyProductPriceRangeFactory, shopifyProductImagesFactory);
106
+ }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductNodeFactory, deps: [{ token: ShopifyProductPriceRangeFactory }, { token: ShopifyProductImagesFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
108
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductNodeFactory, providedIn: 'root' }); }
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductNodeFactory, decorators: [{
111
+ type: Injectable,
112
+ args: [{
113
+ providedIn: 'root',
114
+ }]
115
+ }], ctorParameters: () => [{ type: ShopifyProductPriceRangeFactory }, { type: ShopifyProductImagesFactory }] });
116
+
117
+ class MockShopifyProductGraph {
118
+ constructor(shopifyProductNodeFactory) {
119
+ this.shopifyProductNodeFactory = shopifyProductNodeFactory;
120
+ this.nodes = this.shopifyProductNodeFactory.createMany();
121
+ }
122
+ }
123
+ class ShopifyProductGraphFactory extends DaffModelFactory {
124
+ constructor(shopifyProductNodeFactory) {
125
+ super(MockShopifyProductGraph, shopifyProductNodeFactory);
126
+ }
127
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductGraphFactory, deps: [{ token: ShopifyProductNodeFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
128
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductGraphFactory, providedIn: 'root' }); }
129
+ }
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ShopifyProductGraphFactory, decorators: [{
131
+ type: Injectable,
132
+ args: [{
133
+ providedIn: 'root',
134
+ }]
135
+ }], ctorParameters: () => [{ type: ShopifyProductNodeFactory }] });
136
+
137
+ /**
138
+ * Generated bundle index. Do not edit.
139
+ */
140
+
141
+ export { ShopifyMoneyFactory, ShopifyProductGraphFactory, ShopifyProductImageNodeFactory, ShopifyProductImagesFactory, ShopifyProductNodeFactory, ShopifyProductPriceRangeFactory };
142
+ //# sourceMappingURL=daffodil-driver-shopify-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-driver-shopify-testing.mjs","sources":["../../../libs/driver/shopify/testing/src/factories/product-image-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-images.factory.ts","../../../libs/driver/shopify/testing/src/factories/money.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-price-range.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-graph.factory.ts","../../../libs/driver/shopify/testing/src/daffodil-driver-shopify-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyImageNode,\n shopifyIdTransformer,\n} from '@daffodil/driver/shopify';\n\nclass MockShopifyProductImageNode implements ShopifyImageNode {\n id = shopifyIdTransformer(`${faker.datatype.number({ min: 10000000000 })}`, 'ProductImage');\n url = faker.image.imageUrl();\n altText = faker.random.words(5);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductImageNodeFactory extends DaffModelFactory<ShopifyImageNode, typeof MockShopifyProductImageNode> {\n constructor(){\n super(MockShopifyProductImageNode);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductImages } from '@daffodil/driver/shopify';\n\nimport { ShopifyProductImageNodeFactory } from './product-image-node.factory';\n\nclass MockShopifyProductImages implements ShopifyProductImages {\n nodes = this.shopifyProductImageNodeFactory.createMany();\n\n constructor(\n protected shopifyProductImageNodeFactory: ShopifyProductImageNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductImagesFactory extends DaffModelFactory<ShopifyProductImages, typeof MockShopifyProductImages> {\n constructor(\n shopifyProductImageNodeFactory: ShopifyProductImageNodeFactory,\n ){\n super(MockShopifyProductImages, shopifyProductImageNodeFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyMoney,\n CurrencyCode,\n} from '@daffodil/driver/shopify';\n\nclass MockShopifyMoney implements ShopifyMoney {\n amount = parseFloat(faker.commerce.price());\n currencyCode = faker.helpers.objectValue(CurrencyCode);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyMoneyFactory extends DaffModelFactory<ShopifyMoney, typeof MockShopifyMoney> {\n constructor(){\n super(MockShopifyMoney);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductPriceRange } from '@daffodil/driver/shopify';\n\nimport { ShopifyMoneyFactory } from './money.factory';\n\nclass MockShopifyProductPriceRange implements ShopifyProductPriceRange {\n maxVariantPrice = this.shopifyMoneyFactory.create();\n minVariantPrice = this.shopifyMoneyFactory.create();\n constructor(\n protected shopifyMoneyFactory: ShopifyMoneyFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductPriceRangeFactory extends DaffModelFactory<ShopifyProductPriceRange, typeof MockShopifyProductPriceRange> {\n constructor(\n shopifyMoneyFactory: ShopifyMoneyFactory,\n ){\n super(MockShopifyProductPriceRange, shopifyMoneyFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyProductNode,\n shopifyHandleTransformer,\n shopifyIdTransformer,\n} from '@daffodil/driver/shopify';\n\nimport { ShopifyProductImagesFactory } from './product-images.factory';\nimport { ShopifyProductPriceRangeFactory } from './product-price-range.factory';\n\nclass MockShopifyProductNode implements ShopifyProductNode {\n title = faker.commerce.productName();\n handle = shopifyHandleTransformer(faker.commerce.productName());\n id = shopifyIdTransformer(`${faker.datatype.number({ min: 100000000000 })}`, 'Product');\n description = faker.commerce.productDescription();\n onlineStoreUrl = faker.internet.domainName();\n availableForSale = faker.datatype.boolean();\n priceRange = this.shopifyProductPriceRangeFactory.create();\n images = this.shopifyProductImagesFactory.create();\n\n constructor(\n protected shopifyProductPriceRangeFactory: ShopifyProductPriceRangeFactory,\n protected shopifyProductImagesFactory: ShopifyProductImagesFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductNodeFactory extends DaffModelFactory<ShopifyProductNode, typeof MockShopifyProductNode> {\n constructor(\n shopifyProductPriceRangeFactory: ShopifyProductPriceRangeFactory,\n shopifyProductImagesFactory: ShopifyProductImagesFactory,\n ) {\n super(MockShopifyProductNode, shopifyProductPriceRangeFactory, shopifyProductImagesFactory);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductGraph } from '@daffodil/driver/shopify';\n\nimport { ShopifyProductNodeFactory } from './product-node.factory';\n\nclass MockShopifyProductGraph implements ShopifyProductGraph {\n nodes = this.shopifyProductNodeFactory.createMany();\n\n constructor(\n protected shopifyProductNodeFactory: ShopifyProductNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductGraphFactory extends DaffModelFactory<ShopifyProductGraph, typeof MockShopifyProductGraph> {\n constructor(\n shopifyProductNodeFactory: ShopifyProductNodeFactory,\n ){\n super(MockShopifyProductGraph, shopifyProductNodeFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ShopifyProductImageNodeFactory","i1.ShopifyMoneyFactory","i1.ShopifyProductPriceRangeFactory","i2.ShopifyProductImagesFactory","i1.ShopifyProductNodeFactory"],"mappings":";;;;;;AAUA,MAAM,2BAA2B,CAAA;AAAjC,IAAA,WAAA,GAAA;QACE,IAAE,CAAA,EAAA,GAAG,oBAAoB,CAAC,CAAA,EAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC;AAC3F,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;QAC5B,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;;AAChC;AAKK,MAAO,8BAA+B,SAAQ,gBAAsE,CAAA;AACxH,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,2BAA2B,CAAC;;8GAFzB,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,E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