@daffodil/product 0.90.0 → 0.92.3-rc.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.
@@ -1,14 +1,14 @@
1
- import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';
1
+ import * as rxjs from 'rxjs';
2
+ import { Observable } from 'rxjs';
3
+ import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, RequestInfo, InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';
2
4
  import { DaffInMemorySingleRouteableBackend, DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
3
5
  import { DaffProduct } from '@daffodil/product';
4
- import * as i2 from '@daffodil/product/testing';
5
- import { DaffProductExtensionFactory, DaffProductImageFactory } from '@daffodil/product/testing';
6
6
  import * as i0 from '@angular/core';
7
- import { ModuleWithProviders, Provider } from '@angular/core';
7
+ import { ModuleWithProviders, Provider, EnvironmentProviders } from '@angular/core';
8
8
  import { HttpClient } from '@angular/common/http';
9
- import { Observable } from 'rxjs';
10
9
  import { DaffProductDriverResponse, DaffProductServiceInterface } from '@daffodil/product/driver';
11
10
  import * as i1 from '@angular/common';
11
+ import * as i2 from '@daffodil/product/testing';
12
12
 
13
13
  /**
14
14
  * An in-memory service that stubs out the backend services for getting products.
@@ -18,15 +18,13 @@ import * as i1 from '@angular/common';
18
18
  * @Param products: An array of Products
19
19
  */
20
20
  declare class DaffInMemoryBackendProductService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
21
- private productFactory;
22
- private productImageFactory;
23
21
  readonly collectionName = "products";
24
22
  protected _products: DaffProduct[];
25
23
  /**
26
24
  * The collection of products in the backend.
27
25
  */
28
26
  get products(): DaffProduct[];
29
- constructor(productFactory: DaffProductExtensionFactory, productImageFactory: DaffProductImageFactory);
27
+ constructor();
30
28
  /**
31
29
  * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
32
30
  *
@@ -49,7 +47,7 @@ declare class DaffInMemoryBackendProductService implements InMemoryDbService, Da
49
47
  * @param reqInfo request object
50
48
  * @returns An http response object
51
49
  */
52
- get(reqInfo: any): any;
50
+ get(reqInfo: RequestInfo): rxjs.Observable<any>;
53
51
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendProductService, never>;
54
52
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendProductService>;
55
53
  }
@@ -88,7 +86,7 @@ declare class DaffProductInMemoryDriverModule {
88
86
  /**
89
87
  * Provides the Daffodil product in-memory driver and its dependencies.
90
88
  */
91
- declare const provideDaffProductInMemoryDriver: () => Provider[];
89
+ declare const provideDaffProductInMemoryDriver: () => Array<Provider | EnvironmentProviders>;
92
90
 
93
91
  declare const DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS: i0.InjectionToken<DaffInMemoryProductResponseExtraTransform[]>;
94
92
  declare const provideDaffProductInMemoryExtraProductResponseTransforms: <R extends DaffInMemoryProductResponseExtraTransform = DaffInMemoryProductResponseExtraTransform>(...values: R[]) => Array<i0.ValueProvider>;
@@ -4,8 +4,7 @@ import { Observable } from 'rxjs';
4
4
  import { DaffProduct } from '@daffodil/product';
5
5
  import { DaffProductServiceInterface, DaffProductDriverResponse } from '@daffodil/product/driver';
6
6
  import * as i0 from '@angular/core';
7
- import { ModuleWithProviders, Provider } from '@angular/core';
8
- import * as i1 from '@angular/common';
7
+ import { Provider } from '@angular/core';
9
8
  import { ShopifyProductGraph, ShopifyProductNode } from '@daffodil/driver/shopify';
10
9
 
11
10
  /**
@@ -24,18 +23,6 @@ declare class DaffShopifyProductService implements DaffProductServiceInterface {
24
23
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffShopifyProductService>;
25
24
  }
26
25
 
27
- /**
28
- * A module that provides the {@link DaffProductDriver} as the {@link DaffShopifyProductService}.
29
- *
30
- * @deprecated Use {@link provideDaffProductShopifyDriver} instead. Deprecated in version 0.89.0. Will be removed in version 0.92.0.
31
- */
32
- declare class DaffProductShopifyDriverModule {
33
- static forRoot(): ModuleWithProviders<DaffProductShopifyDriverModule>;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductShopifyDriverModule, never>;
35
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductShopifyDriverModule, never, [typeof i1.CommonModule], never>;
36
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductShopifyDriverModule>;
37
- }
38
-
39
26
  /**
40
27
  * Provides the Shopify product driver.
41
28
  *
@@ -78,12 +65,11 @@ declare const getProductByUrl: apollo_angular.TypedDocumentNode<ShopifyProductSi
78
65
  declare const getProduct: apollo_angular.TypedDocumentNode<ShopifyProductSingleResponse, ShopifyProductIDVariables>;
79
66
 
80
67
  /**
81
- * Transforms a ProductNode into a different object.
68
+ * Transforms a ProductNode into a DaffProduct
82
69
  *
83
- * @param node - ProductNode object
84
- * @returns A Product object
70
+ * @param node
85
71
  */
86
72
  declare const daffShopifyProductTransformer: (node: ShopifyProductNode) => DaffProduct;
87
73
 
88
- export { DaffProductShopifyDriverModule, DaffShopifyProductService, daffShopifyProductTransformer, getAllProducts, getProduct, getProductByUrl, provideDaffProductShopifyDriver };
74
+ export { DaffShopifyProductService, daffShopifyProductTransformer, getAllProducts, getProduct, getProductByUrl, provideDaffProductShopifyDriver };
89
75
  export type { ShopifyProductAllResponse, ShopifyProductAllVariables, ShopifyProductIDVariables, ShopifyProductSingleResponse, ShopifyProductUrlVariables };
@@ -1,18 +1,20 @@
1
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, Inject, NgModule } from '@angular/core';
3
+ import { makeStateKey, inject, TransferState, PLATFORM_ID, Injectable, Inject, NgModule } from '@angular/core';
3
4
  import * as i2 from 'angular-in-memory-web-api';
4
5
  import { STATUS, InMemoryBackendConfig } from 'angular-in-memory-web-api';
5
- import * as i1 from '@daffodil/product/testing';
6
- import { provideDaffProductExtraFactoryTypes, DaffDefaultProductFactory, DaffProductTestingModule } from '@daffodil/product/testing';
7
- import * as i1$1 from '@angular/common/http';
6
+ import { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';
7
+ import { DaffProductExtensionFactory, provideDaffProductExtraFactoryTypes, DaffDefaultProductFactory, DaffProductTestingModule } from '@daffodil/product/testing';
8
+ import * as i1 from '@angular/common/http';
8
9
  import { map } from 'rxjs/operators';
9
- import { DaffInMemoryDriverBase, provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';
10
+ import { DaffInMemoryDriverBase, provideDaffInMemoryBackends, provideDaffInMemoryRoutableObjects } from '@daffodil/driver/in-memory';
10
11
  import { createMultiInjectionToken, createSingleInjectionToken } from '@daffodil/core';
11
- import { CommonModule } from '@angular/common';
12
12
  import { provideDaffProductDriver } from '@daffodil/product/driver';
13
13
 
14
14
  const DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME = 'products';
15
15
 
16
+ const TRANSFER_STATE_KEY = makeStateKey('DAFF_PRODUCTS_INMEMORY_DATA');
17
+
16
18
  /**
17
19
  * An in-memory service that stubs out the backend services for getting products.
18
20
  *
@@ -28,48 +30,19 @@ class DaffInMemoryBackendProductService {
28
30
  return this._products;
29
31
  }
30
32
  ;
31
- constructor(productFactory, productImageFactory) {
32
- this.productFactory = productFactory;
33
- this.productImageFactory = productImageFactory;
33
+ constructor() {
34
34
  this.collectionName = DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME;
35
35
  this._products = [];
36
- this._products = [
37
- '1001',
38
- '1002',
39
- '1003',
40
- '1004',
41
- '1005',
42
- '1006',
43
- '1007',
44
- '1008',
45
- '1009',
46
- '1010',
47
- '1011',
48
- '1012',
49
- '1013',
50
- '1014',
51
- '1015',
52
- '1016',
53
- '1017',
54
- '1018',
55
- '1019',
56
- '1020',
57
- '1021',
58
- '1022',
59
- '1023',
60
- '1024',
61
- '1025',
62
- '1026',
63
- '1027',
64
- '1028',
65
- '1029',
66
- '1030',
67
- '1031',
68
- '1032',
69
- '1033',
70
- '1034',
71
- '1035',
72
- ].map(id => this.productFactory.create({ id, url: `/${id}` }));
36
+ const transferState = inject(TransferState);
37
+ const platform = inject(PLATFORM_ID);
38
+ const productFactory = inject(DaffProductExtensionFactory);
39
+ if (isPlatformBrowser(platform)) {
40
+ this._products = transferState.get(TRANSFER_STATE_KEY, productFactory.createMany(35));
41
+ }
42
+ else {
43
+ this._products = productFactory.createMany(35);
44
+ transferState.set(TRANSFER_STATE_KEY, this._products);
45
+ }
73
46
  }
74
47
  /**
75
48
  * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
@@ -100,23 +73,27 @@ class DaffInMemoryBackendProductService {
100
73
  * @returns An http response object
101
74
  */
102
75
  get(reqInfo) {
103
- if (reqInfo.id === 'best-sellers') {
76
+ if (reqInfo.id?.includes('.html')) {
77
+ const product = this._products.find((p) => daffUriTruncateLeadingSlash(p.url) === reqInfo.id);
78
+ if (!product) {
79
+ return undefined;
80
+ }
104
81
  return reqInfo.utils.createResponse$(() => ({
105
- body: this._products.slice(0, 4),
82
+ body: product,
106
83
  status: STATUS.OK,
107
84
  }));
108
85
  }
109
86
  return undefined;
110
87
  }
111
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendProductService, deps: [{ token: i1.DaffProductExtensionFactory }, { token: i1.DaffProductImageFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
112
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendProductService, providedIn: 'root' }); }
88
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendProductService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
89
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendProductService, providedIn: 'root' }); }
113
90
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendProductService, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendProductService, decorators: [{
115
92
  type: Injectable,
116
93
  args: [{
117
94
  providedIn: 'root',
118
95
  }]
119
- }], ctorParameters: () => [{ type: i1.DaffProductExtensionFactory }, { type: i1.DaffProductImageFactory }] });
96
+ }], ctorParameters: () => [] });
120
97
 
121
98
  const {
122
99
  /**
@@ -177,14 +154,14 @@ class DaffInMemoryProductService extends DaffInMemoryDriverBase {
177
154
  return this.http.get(`${this.url}/${productId}`).pipe(map(this.transform));
178
155
  }
179
156
  getByUrl(url) {
180
- return this.http.get(`${this.url}${url}`).pipe(map(this.transform));
157
+ return this.http.get(`${this.url}/${daffUriTruncateLeadingSlash(url)}`).pipe(map(this.transform));
181
158
  }
182
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryProductService, deps: [{ token: i1$1.HttpClient }, { token: InMemoryBackendConfig }, { token: DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
183
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryProductService }); }
159
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryProductService, deps: [{ token: i1.HttpClient }, { token: InMemoryBackendConfig }, { token: DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
160
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryProductService }); }
184
161
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryProductService, decorators: [{
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryProductService, decorators: [{
186
163
  type: Injectable
187
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i2.InMemoryBackendConfigArgs, decorators: [{
164
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.InMemoryBackendConfigArgs, decorators: [{
188
165
  type: Inject,
189
166
  args: [InMemoryBackendConfig]
190
167
  }] }, { type: undefined, decorators: [{
@@ -207,13 +184,13 @@ class DaffProductInMemoryDriverModule {
207
184
  ],
208
185
  };
209
186
  }
210
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
211
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
187
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProductInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
188
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
212
189
  DaffProductTestingModule] }); }
213
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
190
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
214
191
  DaffProductTestingModule] }); }
215
192
  }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, decorators: [{
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProductInMemoryDriverModule, decorators: [{
217
194
  type: NgModule,
218
195
  args: [{
219
196
  imports: [
@@ -223,6 +200,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
223
200
  }]
224
201
  }] });
225
202
 
203
+ /**
204
+ * A factory function that provides routable product objects for the in-memory driver.
205
+ *
206
+ * Returns a function that provides all product entities with their URL properties.
207
+ * Used internally by {@link provideDaffProductInMemoryDriver} with
208
+ * {@link provideDaffInMemoryRoutableObjects} to enable automatic URL resolution for products.
209
+ *
210
+ * @docs-private
211
+ */
212
+ const daffProductInMemoryRoutableObjects = () => {
213
+ const service = inject(DaffInMemoryBackendProductService);
214
+ return service.products.map((p) => ({ url: p.url }));
215
+ };
216
+
226
217
  /**
227
218
  * Provides the Daffodil product in-memory driver and its dependencies.
228
219
  */
@@ -231,6 +222,7 @@ const provideDaffProductInMemoryDriver = () => [
231
222
  provideDaffProductDriver(DaffInMemoryProductService),
232
223
  provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),
233
224
  provideDaffInMemoryBackends(DaffInMemoryBackendProductService),
225
+ provideDaffInMemoryRoutableObjects('PRODUCT', daffProductInMemoryRoutableObjects),
234
226
  ];
235
227
 
236
228
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-product-driver-in-memory.mjs","sources":["../../../libs/product/driver/in-memory/src/collection-name.const.ts","../../../libs/product/driver/in-memory/src/backend/product.service.ts","../../../libs/product/driver/in-memory/src/injection-tokens/transforms/product-response/response-extra.token.ts","../../../libs/product/driver/in-memory/src/injection-tokens/transforms/product-response/response.token.ts","../../../libs/product/driver/in-memory/src/driver/product.service.ts","../../../libs/product/driver/in-memory/src/driver/product-driver.module.ts","../../../libs/product/driver/in-memory/src/driver/provider.ts","../../../libs/product/driver/in-memory/src/daffodil-product-driver-in-memory.ts"],"sourcesContent":["export const DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME = 'products';\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport {\n DaffProductImageFactory,\n DaffProductExtensionFactory,\n} from '@daffodil/product/testing';\n\nimport { DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that stubs out the backend services for getting products.\n *\n * @Param productFactory: DaffProductFactory instance\n * @Param productImageFactory: DaffProductImageFactory instance\n * @Param products: An array of Products\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendProductService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME;\n\n protected _products: DaffProduct[] = [];\n\n /**\n * The collection of products in the backend.\n */\n get products(): DaffProduct[] {\n return this._products;\n };\n\n constructor(\n private productFactory: DaffProductExtensionFactory,\n private productImageFactory: DaffProductImageFactory) {\n this._products = [\n '1001',\n '1002',\n '1003',\n '1004',\n '1005',\n '1006',\n '1007',\n '1008',\n '1009',\n '1010',\n '1011',\n '1012',\n '1013',\n '1014',\n '1015',\n '1016',\n '1017',\n '1018',\n '1019',\n '1020',\n '1021',\n '1022',\n '1023',\n '1024',\n '1025',\n '1026',\n '1027',\n '1028',\n '1029',\n '1030',\n '1031',\n '1032',\n '1033',\n '1034',\n '1035',\n ].map(id => this.productFactory.create({ id, url: `/${id}` }));\n }\n\n /**\n * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.\n *\n * @param url initial url\n * @param utils utility to parse url\n * @returns ParsedRequestUrl\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * Creates a fake database of products for the product inmemory backend service.\n *\n * @returns A fake database of an array of products\n * @docs-private\n */\n createDb(): any {\n return {\n products: this._products,\n };\n }\n\n /**\n * Returns products based on the url given.\n *\n * @param reqInfo request object\n * @returns An http response object\n */\n get(reqInfo: any) {\n if (reqInfo.id === 'best-sellers') {\n return reqInfo.utils.createResponse$(() => ({\n body: this._products.slice(0,4),\n status: STATUS.OK,\n }));\n }\n\n return undefined;\n }\n}\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffInMemoryProductResponseExtraTransform } from '../../../interfaces/public_api';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product In-Memory driver.\n * It is run after the standard transforms and passed both the current transformed Daffodil response and the In-Memory product response.\n */\n token: DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS,\n\n /**\n * Provides extra product transforms for the In-Memory product driver.\n *\n * See {@link DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductInMemoryExtraProductResponseTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\n provider: provideDaffProductInMemoryExtraProductResponseTransforms,\n} = createMultiInjectionToken<DaffInMemoryProductResponseExtraTransform>('DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS');\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\nimport { DaffProduct } from '@daffodil/product';\n\nimport { DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS } from './response-extra.token';\nimport { DaffInMemoryProductResponseTransform } from '../../../interfaces/public_api';\n\nexport const {\n /**\n * An internal token to combine the In-Memory response transform with the injected transforms.\n */\n token: DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM}.\n */\n provider: provideDaffProductInMemoryProductResponseTransform,\n} = createSingleInjectionToken<DaffInMemoryProductResponseTransform>(\n 'DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS);\n return (product: DaffProduct) =>\n transforms.reduce(\n (daffProductResponse, transform) => transform(daffProductResponse, product),\n {\n id: product.id,\n products: [product],\n },\n );\n },\n },\n);\n","import { HttpClient } from '@angular/common/http';\nimport {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n} from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport {\n DaffProductDriverResponse,\n DaffProductServiceInterface,\n} from '@daffodil/product/driver';\n\nimport { DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\nimport { DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM } from '../injection-tokens/public_api';\nimport { DaffInMemoryProductResponseTransform } from '../interfaces/public_api';\n\n/**\n * The product inmemory driver to mock the product backend service.\n *\n * @inheritdoc\n * @Param HttpClient\n */\n@Injectable()\nexport class DaffInMemoryProductService extends DaffInMemoryDriverBase implements DaffProductServiceInterface {\n constructor(\n private http: HttpClient,\n @Inject(InMemoryBackendConfig) config: InMemoryBackendConfigArgs,\n @Inject(DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM) private transform: DaffInMemoryProductResponseTransform,\n ) {\n super(config, DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME);\n }\n\n getAll(): Observable<DaffProduct[]> {\n return this.http.get<DaffProduct[]>(this.url);\n }\n\n get(productId: DaffProduct['id']): Observable<DaffProductDriverResponse> {\n return this.http.get<DaffProduct>(`${this.url}/${productId}`).pipe(\n map(this.transform),\n );\n }\n\n getByUrl(url: DaffProduct['url']): Observable<DaffProductDriverResponse> {\n return this.http.get<DaffProduct>(`${this.url}${url}`).pipe(\n map(this.transform),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffProductDriver } from '@daffodil/product/driver';\nimport {\n DaffDefaultProductFactory,\n DaffProductTestingModule,\n provideDaffProductExtraFactoryTypes,\n} from '@daffodil/product/testing';\n\nimport { DaffInMemoryProductService } from './product.service';\nimport { DaffInMemoryBackendProductService } from '../backend/product.service';\n\n/**\n * Module for providing the DaffInMemoryProductService driver to your application.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffProductTestingModule,\n ],\n})\nexport class DaffProductInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffProductInMemoryDriverModule> {\n return {\n ngModule: DaffProductInMemoryDriverModule,\n providers: [\n DaffInMemoryProductService,\n provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n ],\n };\n }\n}\n","import { Provider } from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffProductDriver } from '@daffodil/product/driver';\nimport {\n DaffDefaultProductFactory,\n provideDaffProductExtraFactoryTypes,\n} from '@daffodil/product/testing';\n\nimport {\n DaffInMemoryBackendProductService,\n DaffInMemoryProductService,\n} from '../public_api';\n\n/**\n * Provides the Daffodil product in-memory driver and its dependencies.\n */\nexport const provideDaffProductInMemoryDriver = (): Provider[] => [\n DaffInMemoryProductService,\n provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,UAAU;;ACiBhE;;;;;;AAMG;MAIU,iCAAiC,CAAA;AAK5C;;AAEG;AACH,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;;IAEA,WAAA,CACU,cAA2C,EAC3C,mBAA4C,EAAA;QAD5C,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,mBAAmB,GAAnB,mBAAmB;QAbpB,IAAA,CAAA,cAAc,GAAG,sCAAsC;QAEtD,IAAA,CAAA,SAAS,GAAkB,EAAE;QAYrC,IAAI,CAAC,SAAS,GAAG;YACf,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;SACP,CAAC,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,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AA,EAAA,+BAA+B,YAJxC,YAAY;YACZ,wBAAwB,CAAA,EAAA,CAAA,CAAA;;2FAGf,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAN3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;ACXD;;AAEG;AACI,MAAM,gCAAgC,GAAG,MAAkB;IAChE,0BAA0B;IAC1B,wBAAwB,CAAC,0BAA0B,CAAC;IACpD,mCAAmC,CAAC,yBAAyB,CAAC;IAC9D,2BAA2B,CAAC,iCAAiC,CAAC;;;ACrBhE;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-product-driver-in-memory.mjs","sources":["../../../libs/product/driver/in-memory/src/collection-name.const.ts","../../../libs/product/driver/in-memory/src/backend/transfer-state-key.ts","../../../libs/product/driver/in-memory/src/backend/product.service.ts","../../../libs/product/driver/in-memory/src/injection-tokens/transforms/product-response/response-extra.token.ts","../../../libs/product/driver/in-memory/src/injection-tokens/transforms/product-response/response.token.ts","../../../libs/product/driver/in-memory/src/driver/product.service.ts","../../../libs/product/driver/in-memory/src/driver/product-driver.module.ts","../../../libs/product/driver/in-memory/src/driver/routable-objects.token.ts","../../../libs/product/driver/in-memory/src/driver/provider.ts","../../../libs/product/driver/in-memory/src/daffodil-product-driver-in-memory.ts"],"sourcesContent":["export const DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME = 'products';\n","import { makeStateKey } from '@angular/core';\n\nimport { DaffProduct } from '@daffodil/product';\n\nexport const TRANSFER_STATE_KEY = makeStateKey<DaffProduct[]>('DAFF_PRODUCTS_INMEMORY_DATA');\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n inject,\n Injectable,\n PLATFORM_ID,\n TransferState,\n} from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductExtensionFactory } from '@daffodil/product/testing';\n\nimport { DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\nimport { TRANSFER_STATE_KEY } from './transfer-state-key';\n/**\n * An in-memory service that stubs out the backend services for getting products.\n *\n * @Param productFactory: DaffProductFactory instance\n * @Param productImageFactory: DaffProductImageFactory instance\n * @Param products: An array of Products\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendProductService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME;\n\n protected _products: DaffProduct[] = [];\n\n /**\n * The collection of products in the backend.\n */\n get products(): DaffProduct[] {\n return this._products;\n };\n\n constructor(){\n const transferState = inject(TransferState);\n const platform = inject(PLATFORM_ID);\n const productFactory = inject(DaffProductExtensionFactory);\n\n if(isPlatformBrowser(platform)) {\n this._products = transferState.get(TRANSFER_STATE_KEY, productFactory.createMany(35));\n } else {\n this._products = productFactory.createMany(35);\n transferState.set(TRANSFER_STATE_KEY, this._products);\n }\n }\n\n /**\n * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.\n *\n * @param url initial url\n * @param utils utility to parse url\n * @returns ParsedRequestUrl\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * Creates a fake database of products for the product inmemory backend service.\n *\n * @returns A fake database of an array of products\n * @docs-private\n */\n createDb(): any {\n return {\n products: this._products,\n };\n }\n\n /**\n * Returns products based on the url given.\n *\n * @param reqInfo request object\n * @returns An http response object\n */\n get(reqInfo: RequestInfo) {\n if(reqInfo.id?.includes('.html')) {\n const product = this._products.find((p) => daffUriTruncateLeadingSlash(p.url) === reqInfo.id);\n\n if(!product) {\n return undefined;\n }\n\n return reqInfo.utils.createResponse$(() => ({\n body: product,\n status: STATUS.OK,\n }));\n }\n return undefined;\n }\n}\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffInMemoryProductResponseExtraTransform } from '../../../interfaces/public_api';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product In-Memory driver.\n * It is run after the standard transforms and passed both the current transformed Daffodil response and the In-Memory product response.\n */\n token: DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS,\n\n /**\n * Provides extra product transforms for the In-Memory product driver.\n *\n * See {@link DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductInMemoryExtraProductResponseTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\n provider: provideDaffProductInMemoryExtraProductResponseTransforms,\n} = createMultiInjectionToken<DaffInMemoryProductResponseExtraTransform>('DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS');\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\nimport { DaffProduct } from '@daffodil/product';\n\nimport { DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS } from './response-extra.token';\nimport { DaffInMemoryProductResponseTransform } from '../../../interfaces/public_api';\n\nexport const {\n /**\n * An internal token to combine the In-Memory response transform with the injected transforms.\n */\n token: DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM}.\n */\n provider: provideDaffProductInMemoryProductResponseTransform,\n} = createSingleInjectionToken<DaffInMemoryProductResponseTransform>(\n 'DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_IN_MEMORY_EXTRA_PRODUCT_RESPONSE_TRANSFORMS);\n return (product: DaffProduct) =>\n transforms.reduce(\n (daffProductResponse, transform) => transform(daffProductResponse, product),\n {\n id: product.id,\n products: [product],\n },\n );\n },\n },\n);\n","import { HttpClient } from '@angular/common/http';\nimport {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n} from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport {\n DaffProductDriverResponse,\n DaffProductServiceInterface,\n} from '@daffodil/product/driver';\n\nimport { DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\nimport { DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM } from '../injection-tokens/public_api';\nimport { DaffInMemoryProductResponseTransform } from '../interfaces/public_api';\n\n/**\n * The product inmemory driver to mock the product backend service.\n *\n * @inheritdoc\n * @Param HttpClient\n */\n@Injectable()\nexport class DaffInMemoryProductService extends DaffInMemoryDriverBase implements DaffProductServiceInterface {\n constructor(\n private http: HttpClient,\n @Inject(InMemoryBackendConfig) config: InMemoryBackendConfigArgs,\n @Inject(DAFF_PRODUCT_IN_MEMORY_PRODUCT_RESPONSE_TRANSFORM) private transform: DaffInMemoryProductResponseTransform,\n ) {\n super(config, DAFF_PRODUCT_IN_MEMORY_COLLECTION_NAME);\n }\n\n getAll(): Observable<DaffProduct[]> {\n return this.http.get<DaffProduct[]>(this.url);\n }\n\n get(productId: DaffProduct['id']): Observable<DaffProductDriverResponse> {\n return this.http.get<DaffProduct>(`${this.url}/${productId}`).pipe(\n map(this.transform),\n );\n }\n\n getByUrl(url: DaffProduct['url']): Observable<DaffProductDriverResponse> {\n return this.http.get<DaffProduct>(`${this.url}/${daffUriTruncateLeadingSlash(url)}`).pipe(\n map(this.transform),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffProductDriver } from '@daffodil/product/driver';\nimport {\n DaffDefaultProductFactory,\n DaffProductTestingModule,\n provideDaffProductExtraFactoryTypes,\n} from '@daffodil/product/testing';\n\nimport { DaffInMemoryProductService } from './product.service';\nimport { DaffInMemoryBackendProductService } from '../backend/product.service';\n\n/**\n * Module for providing the DaffInMemoryProductService driver to your application.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffProductTestingModule,\n ],\n})\nexport class DaffProductInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffProductInMemoryDriverModule> {\n return {\n ngModule: DaffProductInMemoryDriverModule,\n providers: [\n DaffInMemoryProductService,\n provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n ],\n };\n }\n}\n","import { inject } from '@angular/core';\n\n\nimport { DaffInMemoryBackendProductService } from '../backend/product.service';\n\n/**\n * A factory function that provides routable product objects for the in-memory driver.\n *\n * Returns a function that provides all product entities with their URL properties.\n * Used internally by {@link provideDaffProductInMemoryDriver} with\n * {@link provideDaffInMemoryRoutableObjects} to enable automatic URL resolution for products.\n *\n * @docs-private\n */\nexport const daffProductInMemoryRoutableObjects = () => {\n const service = inject(DaffInMemoryBackendProductService);\n return service.products.map((p) => ({ url: p.url }));\n};\n","import {\n EnvironmentProviders,\n Provider,\n} from '@angular/core';\n\nimport {\n provideDaffInMemoryBackends,\n provideDaffInMemoryRoutableObjects,\n} from '@daffodil/driver/in-memory';\nimport { provideDaffProductDriver } from '@daffodil/product/driver';\nimport {\n DaffDefaultProductFactory,\n provideDaffProductExtraFactoryTypes,\n} from '@daffodil/product/testing';\n\nimport {\n DaffInMemoryBackendProductService,\n DaffInMemoryProductService,\n} from '../public_api';\nimport { daffProductInMemoryRoutableObjects } from './routable-objects.token';\n\n/**\n * Provides the Daffodil product in-memory driver and its dependencies.\n */\nexport const provideDaffProductInMemoryDriver = (): Array<Provider | EnvironmentProviders> => [\n DaffInMemoryProductService,\n provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n provideDaffInMemoryRoutableObjects('PRODUCT', daffProductInMemoryRoutableObjects),\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,UAAU;;ACIzD,MAAM,kBAAkB,GAAG,YAAY,CAAgB,6BAA6B,CAAC;;ACkB5F;;;;;;AAMG;MAIU,iCAAiC,CAAA;AAK5C;;AAEG;AACH,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;;AAEA,IAAA,WAAA,GAAA;QAXS,IAAA,CAAA,cAAc,GAAG,sCAAsC;QAEtD,IAAA,CAAA,SAAS,GAAkB,EAAE;AAUrC,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAC3C,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AACpC,QAAA,MAAM,cAAc,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAE1D,QAAA,IAAG,iBAAiB,CAAC,QAAQ,CAAC,EAAE;AAC9B,YAAA,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,kBAAkB,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACvF;aAAO;YACL,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9C,aAAa,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,SAA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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,YAJxC,YAAY;YACZ,wBAAwB,CAAA,EAAA,CAAA,CAAA;;4FAGf,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAN3C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;ACpBD;;;;;;;;AAQG;AACI,MAAM,kCAAkC,GAAG,MAAK;AACrD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,iCAAiC,CAAC;IACzD,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACtD,CAAC;;ACID;;AAEG;AACI,MAAM,gCAAgC,GAAG,MAA8C;IAC5F,0BAA0B;IAC1B,wBAAwB,CAAC,0BAA0B,CAAC;IACpD,mCAAmC,CAAC,yBAAyB,CAAC;IAC9D,2BAA2B,CAAC,iCAAiC,CAAC;AAC9D,IAAA,kCAAkC,CAAC,SAAS,EAAE,kCAAkC,CAAC;;;AC7BnF;;AAEG;;;;"}
@@ -44,10 +44,10 @@ class MagentoProductPreviewFactory extends DaffModelFactory {
44
44
  constructor() {
45
45
  super(MockMagentoProductPreview);
46
46
  }
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' }); }
47
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
51
51
  type: Injectable,
52
52
  args: [{
53
53
  providedIn: 'root',
@@ -80,10 +80,10 @@ class MagentoCoreProductFactory extends DaffModelFactory {
80
80
  constructor() {
81
81
  super(MockMagentoCoreProduct);
82
82
  }
83
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoCoreProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
84
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoCoreProductFactory, providedIn: 'root' }); }
83
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCoreProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
84
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCoreProductFactory, providedIn: 'root' }); }
85
85
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoCoreProductFactory, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCoreProductFactory, decorators: [{
87
87
  type: Injectable,
88
88
  args: [{
89
89
  providedIn: 'root',
@@ -103,10 +103,10 @@ class MagentoSimpleProductFactory extends DaffModelFactory {
103
103
  constructor() {
104
104
  super(MockMagentoSimpleProduct);
105
105
  }
106
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoSimpleProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
107
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoSimpleProductFactory, providedIn: 'root' }); }
106
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoSimpleProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
107
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoSimpleProductFactory, providedIn: 'root' }); }
108
108
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoSimpleProductFactory, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoSimpleProductFactory, decorators: [{
110
110
  type: Injectable,
111
111
  args: [{
112
112
  providedIn: 'root',
@@ -148,10 +148,10 @@ class MagentoProductAggregationPriceFactory extends DaffModelFactory {
148
148
  constructor() {
149
149
  super(MockMagentoAggregationPrice);
150
150
  }
151
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationPriceFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
152
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationPriceFactory, providedIn: 'root' }); }
151
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationPriceFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
152
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationPriceFactory, providedIn: 'root' }); }
153
153
  }
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationPriceFactory, decorators: [{
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationPriceFactory, decorators: [{
155
155
  type: Injectable,
156
156
  args: [{
157
157
  providedIn: 'root',
@@ -188,10 +188,10 @@ class MagentoProductAggregationSelectFactory extends DaffModelFactory {
188
188
  constructor() {
189
189
  super(MockMagentoAggregationSelect);
190
190
  }
191
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationSelectFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
192
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationSelectFactory, providedIn: 'root' }); }
191
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationSelectFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
192
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationSelectFactory, providedIn: 'root' }); }
193
193
  }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationSelectFactory, decorators: [{
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationSelectFactory, decorators: [{
195
195
  type: Injectable,
196
196
  args: [{
197
197
  providedIn: 'root',
@@ -204,10 +204,10 @@ class MagentoProductAggregationFactory extends DaffModelFactory {
204
204
  this.selectFactory = selectFactory;
205
205
  this.priceFactory = priceFactory;
206
206
  }
207
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationFactory, deps: [{ token: MagentoProductAggregationSelectFactory }, { token: MagentoProductAggregationPriceFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
208
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationFactory, providedIn: 'root' }); }
207
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationFactory, deps: [{ token: MagentoProductAggregationSelectFactory }, { token: MagentoProductAggregationPriceFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
208
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationFactory, providedIn: 'root' }); }
209
209
  }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAggregationFactory, decorators: [{
210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductAggregationFactory, decorators: [{
211
211
  type: Injectable,
212
212
  args: [{
213
213
  providedIn: 'root',
@@ -231,10 +231,10 @@ class MagentoProductFilterTypeFieldFactory extends DaffModelFactory {
231
231
  constructor() {
232
232
  super(MockMagentoProductFilterTypeField);
233
233
  }
234
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
235
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, providedIn: 'root' }); }
234
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
235
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, providedIn: 'root' }); }
236
236
  }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, decorators: [{
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, decorators: [{
238
238
  type: Injectable,
239
239
  args: [{
240
240
  providedIn: 'root',
@@ -257,10 +257,10 @@ class MagentoProductSortFieldsFactory extends DaffModelFactory {
257
257
  constructor() {
258
258
  super(MockMagentoProductSortFields);
259
259
  }
260
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductSortFieldsFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
261
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductSortFieldsFactory, providedIn: 'root' }); }
260
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductSortFieldsFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
261
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductSortFieldsFactory, providedIn: 'root' }); }
262
262
  }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductSortFieldsFactory, decorators: [{
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoProductSortFieldsFactory, decorators: [{
264
264
  type: Injectable,
265
265
  args: [{
266
266
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-product-driver-magento-testing.mjs","sources":["../../../libs/product/driver/magento/testing/src/factories/core/product-preview.factory.ts","../../../libs/product/driver/magento/testing/src/factories/core/product.factory.ts","../../../libs/product/driver/magento/testing/src/factories/simple/simple.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/price.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/select.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/aggregation.factory.ts","../../../libs/product/driver/magento/testing/src/factories/filter-type-field.factory.ts","../../../libs/product/driver/magento/testing/src/factories/sort-fields.factory.ts","../../../libs/product/driver/magento/testing/src/daffodil-product-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductPreview,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport class MockMagentoProductPreview implements MagentoProductPreview {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n uid = faker.string.uuid();\n url_key = faker.string.alphanumeric(16);\n url_suffix = '.html';\n name = faker.lorem.word();\n sku = faker.string.alphanumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.lorem.words(3),\n url: faker.image.url(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.number.int({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.number.int({ min: 1, max: 99 }),\n percent_off: faker.number.int({ min: 1, max: 99 }),\n },\n },\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductPreviewFactory extends DaffModelFactory<MagentoProductPreview> {\n\n constructor(){\n super(MockMagentoProductPreview);\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 MagentoProduct,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoProductPreview } from './product-preview.factory';\n\nexport class MockMagentoCoreProduct extends MockMagentoProductPreview implements MagentoProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n canonical_url = faker.internet.url();\n meta_title = faker.lorem.word();\n meta_description = faker.lorem.words(3);\n stock_status = MagentoProductStockStatusEnum.InStock;\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(3),\n };\n media_gallery_entries = [];\n}\n\n/**\n * A factory for creating stub data for {@link MagentoProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCoreProductFactory extends DaffModelFactory<MagentoProduct> {\n\n constructor(){\n super(MockMagentoCoreProduct);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductTypeEnum,\n MagentoSimpleProduct,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoCoreProduct } from '../core/product.factory';\n\nexport class MockMagentoSimpleProduct extends MockMagentoCoreProduct implements MagentoSimpleProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n}\n\n/**\n * A factory for creating stub data for {@link MagentoSimpleProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoSimpleProductFactory extends DaffModelFactory<MagentoSimpleProduct> {\n\n constructor(){\n super(MockMagentoSimpleProduct);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationPrice implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'price';\n type = MagentoProductFilterType.Range;\n count = faker.number.int();\n label = 'Price';\n options = [\n {\n value: '0-10',\n count: faker.number.int(),\n label: '0-10',\n },\n {\n value: '10-20',\n count: faker.number.int(),\n label: '10-20',\n },\n {\n value: '20-30',\n count: faker.number.int(),\n label: '20-30',\n },\n {\n value: '30-40',\n count: faker.number.int(),\n label: '30-40',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationPriceFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationPrice);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationSelect implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'select';\n type = MagentoProductFilterType.Equal;\n count = faker.number.int();\n label = faker.lorem.word();\n options = [\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationSelectFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationSelect);\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 { MagentoAggregation } from '@daffodil/product/driver/magento';\n\nimport { MagentoProductAggregationPriceFactory } from './type/price.factory';\nimport { MagentoProductAggregationSelectFactory } from './type/select.factory';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(private selectFactory: MagentoProductAggregationSelectFactory, private priceFactory: MagentoProductAggregationPriceFactory){\n super(faker.number.int({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);\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 MagentoProductFilterTypeField,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nconst TYPES = [\n MagentoProductFilterType.Equal,\n MagentoProductFilterType.Range,\n MagentoProductFilterType.Match,\n];\n\nclass MockMagentoProductFilterTypeField implements MagentoProductFilterTypeField {\n name = faker.lorem.word();\n type = {\n name: TYPES[faker.number.int({ min: 0, max: TYPES.length - 1 })],\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductFilterTypeFieldFactory extends DaffModelFactory<MagentoProductFilterTypeField> {\n constructor(){\n super(MockMagentoProductFilterTypeField);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoProductSortFields } from '@daffodil/product/driver/magento';\n\nclass MockMagentoProductSortFields implements MagentoProductSortFields {\n __typename = <const>'SortFields';\n default = 'position';\n options = [\n {\n label: 'string',\n value: 'position',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductSortFieldsFactory extends DaffModelFactory<MagentoProductSortFields> {\n constructor(){\n super(MockMagentoProductSortFields);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoProductAggregationSelectFactory","i2.MagentoProductAggregationPriceFactory"],"mappings":";;;;;;MAUa,yBAAyB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,UAAU,GAAG,sBAAsB,CAAC,aAAa;AACjD,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;QACzB,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,IAAA,CAAA,UAAU,GAAG,OAAO;AACpB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QACzB,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;AACnC,QAAA,IAAA,CAAA,YAAY,GAAG,6BAA6B,CAAC,OAAO;AACpD,QAAA,IAAA,CAAA,KAAK,GAAG;AACN,YAAA,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3B,YAAA,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE;SACvB;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,kBAAkB;YAC9B,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;SAC3B;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,YAAY;AACxB,YAAA,aAAa,EAAE;AACb,g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,cAF9B,MAAM,EAAA,CAAA,CAAA;;2FAEP,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAH3C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-product-driver-magento-testing.mjs","sources":["../../../libs/product/driver/magento/testing/src/factories/core/product-preview.factory.ts","../../../libs/product/driver/magento/testing/src/factories/core/product.factory.ts","../../../libs/product/driver/magento/testing/src/factories/simple/simple.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/price.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/select.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/aggregation.factory.ts","../../../libs/product/driver/magento/testing/src/factories/filter-type-field.factory.ts","../../../libs/product/driver/magento/testing/src/factories/sort-fields.factory.ts","../../../libs/product/driver/magento/testing/src/daffodil-product-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductPreview,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport class MockMagentoProductPreview implements MagentoProductPreview {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n uid = faker.string.uuid();\n url_key = faker.string.alphanumeric(16);\n url_suffix = '.html';\n name = faker.lorem.word();\n sku = faker.string.alphanumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.lorem.words(3),\n url: faker.image.url(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.number.int({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.number.int({ min: 1, max: 99 }),\n percent_off: faker.number.int({ min: 1, max: 99 }),\n },\n },\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductPreviewFactory extends DaffModelFactory<MagentoProductPreview> {\n\n constructor(){\n super(MockMagentoProductPreview);\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 MagentoProduct,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoProductPreview } from './product-preview.factory';\n\nexport class MockMagentoCoreProduct extends MockMagentoProductPreview implements MagentoProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n canonical_url = faker.internet.url();\n meta_title = faker.lorem.word();\n meta_description = faker.lorem.words(3);\n stock_status = MagentoProductStockStatusEnum.InStock;\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(3),\n };\n media_gallery_entries = [];\n}\n\n/**\n * A factory for creating stub data for {@link MagentoProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCoreProductFactory extends DaffModelFactory<MagentoProduct> {\n\n constructor(){\n super(MockMagentoCoreProduct);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductTypeEnum,\n MagentoSimpleProduct,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoCoreProduct } from '../core/product.factory';\n\nexport class MockMagentoSimpleProduct extends MockMagentoCoreProduct implements MagentoSimpleProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n}\n\n/**\n * A factory for creating stub data for {@link MagentoSimpleProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoSimpleProductFactory extends DaffModelFactory<MagentoSimpleProduct> {\n\n constructor(){\n super(MockMagentoSimpleProduct);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationPrice implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'price';\n type = MagentoProductFilterType.Range;\n count = faker.number.int();\n label = 'Price';\n options = [\n {\n value: '0-10',\n count: faker.number.int(),\n label: '0-10',\n },\n {\n value: '10-20',\n count: faker.number.int(),\n label: '10-20',\n },\n {\n value: '20-30',\n count: faker.number.int(),\n label: '20-30',\n },\n {\n value: '30-40',\n count: faker.number.int(),\n label: '30-40',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationPriceFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationPrice);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationSelect implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'select';\n type = MagentoProductFilterType.Equal;\n count = faker.number.int();\n label = faker.lorem.word();\n options = [\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationSelectFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationSelect);\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 { MagentoAggregation } from '@daffodil/product/driver/magento';\n\nimport { MagentoProductAggregationPriceFactory } from './type/price.factory';\nimport { MagentoProductAggregationSelectFactory } from './type/select.factory';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(private selectFactory: MagentoProductAggregationSelectFactory, private priceFactory: MagentoProductAggregationPriceFactory){\n super(faker.number.int({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);\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 MagentoProductFilterTypeField,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nconst TYPES = [\n MagentoProductFilterType.Equal,\n MagentoProductFilterType.Range,\n MagentoProductFilterType.Match,\n];\n\nclass MockMagentoProductFilterTypeField implements MagentoProductFilterTypeField {\n name = faker.lorem.word();\n type = {\n name: TYPES[faker.number.int({ min: 0, max: TYPES.length - 1 })],\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductFilterTypeFieldFactory extends DaffModelFactory<MagentoProductFilterTypeField> {\n constructor(){\n super(MockMagentoProductFilterTypeField);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoProductSortFields } from '@daffodil/product/driver/magento';\n\nclass MockMagentoProductSortFields implements MagentoProductSortFields {\n __typename = <const>'SortFields';\n default = 'position';\n options = [\n {\n label: 'string',\n value: 'position',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductSortFieldsFactory extends DaffModelFactory<MagentoProductSortFields> {\n constructor(){\n super(MockMagentoProductSortFields);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoProductAggregationSelectFactory","i2.MagentoProductAggregationPriceFactory"],"mappings":";;;;;;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