@daffodil/product 0.84.0 → 0.85.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.
- package/fesm2022/daffodil-product-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-product-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-magento-testing.mjs +57 -57
- package/fesm2022/daffodil-product-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-magento.mjs +19 -19
- package/fesm2022/daffodil-product-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-shopify.mjs +7 -7
- package/fesm2022/daffodil-product-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-product-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-routing.mjs +17 -17
- package/fesm2022/daffodil-product-routing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state-testing.mjs +13 -13
- package/fesm2022/daffodil-product-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state.mjs +23 -23
- package/fesm2022/daffodil-product-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-testing.mjs +25 -25
- package/fesm2022/daffodil-product-testing.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -108,10 +108,10 @@ class DaffInMemoryBackendProductService {
|
|
|
108
108
|
}
|
|
109
109
|
return undefined;
|
|
110
110
|
}
|
|
111
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
112
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
111
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", 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: "19.2.11", ngImport: i0, type: DaffInMemoryBackendProductService, providedIn: 'root' }); }
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffInMemoryBackendProductService, decorators: [{
|
|
115
115
|
type: Injectable,
|
|
116
116
|
args: [{
|
|
117
117
|
providedIn: 'root',
|
|
@@ -179,10 +179,10 @@ class DaffInMemoryProductService extends DaffInMemoryDriverBase {
|
|
|
179
179
|
getByUrl(url) {
|
|
180
180
|
return this.http.get(`${this.url}${url}`).pipe(map(this.transform));
|
|
181
181
|
}
|
|
182
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
183
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
182
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffInMemoryProductService, deps: [{ token: i1$1.HttpClient }, { token: i2.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: "19.2.11", ngImport: i0, type: DaffInMemoryProductService, providedIn: 'root' }); }
|
|
184
184
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffInMemoryProductService, decorators: [{
|
|
186
186
|
type: Injectable,
|
|
187
187
|
args: [{
|
|
188
188
|
providedIn: 'root',
|
|
@@ -206,13 +206,13 @@ class DaffProductInMemoryDriverModule {
|
|
|
206
206
|
],
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
210
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
209
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
210
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
|
|
211
211
|
DaffProductTestingModule] }); }
|
|
212
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
212
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
|
|
213
213
|
DaffProductTestingModule] }); }
|
|
214
214
|
}
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductInMemoryDriverModule, decorators: [{
|
|
216
216
|
type: NgModule,
|
|
217
217
|
args: [{
|
|
218
218
|
imports: [
|
|
@@ -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/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 { InMemoryBackendConfig } 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({\n providedIn: 'root',\n})\nexport class DaffInMemoryProductService extends DaffInMemoryDriverBase implements DaffProductServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\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 provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,UAAU;;ACiBhE;;;;;;AAMG;MAIU,iCAAiC,CAAA;AAK5C;;AAEG;AACH,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;;;IAGvB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AAA,CAAA;kBAHtC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAKI,MAAM;2BAAC,iDAAiD;;;AChB7D;;AAEG;MAOU,+BAA+B,CAAA;AAC1C,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,+BAA+B;AACzC,YAAA,SAAS,EAAE;gBACT,wBAAwB,CAAC,0BAA0B,CAAC;gBACpD,mCAAmC,CAAC,yBAAyB,CAAC;gBAC9D,2BAA2B,CAAC,iCAAiC,CAAC;AAC/D,aAAA;SACF;;iIATQ,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA/B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,YAJxC,YAAY;YACZ,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAGf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,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;;;ACzBD;;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/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/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 { InMemoryBackendConfig } 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({\n providedIn: 'root',\n})\nexport class DaffInMemoryProductService extends DaffInMemoryDriverBase implements DaffProductServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\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 provideDaffProductDriver(DaffInMemoryProductService),\n provideDaffProductExtraFactoryTypes(DaffDefaultProductFactory),\n provideDaffInMemoryBackends(DaffInMemoryBackendProductService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,UAAU;;ACiBhE;;;;;;AAMG;MAIU,iCAAiC,CAAA;AAK5C;;AAEG;AACH,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;;;IAGv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
|
9
9
|
this.__typename = MagentoProductTypeEnum.SimpleProduct;
|
|
10
|
-
this.uid = faker.
|
|
11
|
-
this.url_key = faker.
|
|
10
|
+
this.uid = faker.string.uuid();
|
|
11
|
+
this.url_key = faker.string.alphanumeric(16);
|
|
12
12
|
this.url_suffix = '.html';
|
|
13
|
-
this.name = faker.
|
|
14
|
-
this.sku = faker.
|
|
13
|
+
this.name = faker.lorem.word();
|
|
14
|
+
this.sku = faker.string.alphanumeric(16);
|
|
15
15
|
this.stock_status = MagentoProductStockStatusEnum.InStock;
|
|
16
16
|
this.image = {
|
|
17
17
|
__typename: 'ProductImage',
|
|
18
|
-
label: faker.
|
|
19
|
-
url: faker.image.
|
|
18
|
+
label: faker.lorem.words(3),
|
|
19
|
+
url: faker.image.url(),
|
|
20
20
|
};
|
|
21
21
|
this.description = {
|
|
22
22
|
__typename: 'ComplexTextValue',
|
|
23
|
-
html: faker.
|
|
23
|
+
html: faker.lorem.words(5),
|
|
24
24
|
};
|
|
25
25
|
this.price_range = {
|
|
26
26
|
__typename: 'PriceRange',
|
|
@@ -28,13 +28,13 @@ class MockMagentoProductPreview {
|
|
|
28
28
|
__typename: 'ProductPrice',
|
|
29
29
|
regular_price: {
|
|
30
30
|
__typename: 'Money',
|
|
31
|
-
value: faker.
|
|
31
|
+
value: faker.number.int({ min: 100, max: 1000 }),
|
|
32
32
|
currency: null,
|
|
33
33
|
},
|
|
34
34
|
discount: {
|
|
35
35
|
__typename: 'ProductDiscount',
|
|
36
|
-
amount_off: faker.
|
|
37
|
-
percent_off: faker.
|
|
36
|
+
amount_off: faker.number.int({ min: 1, max: 99 }),
|
|
37
|
+
percent_off: faker.number.int({ min: 1, max: 99 }),
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
};
|
|
@@ -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: "19.
|
|
48
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
|
|
51
51
|
type: Injectable,
|
|
52
52
|
args: [{
|
|
53
53
|
providedIn: 'root',
|
|
@@ -59,16 +59,16 @@ class MockMagentoCoreProduct extends MockMagentoProductPreview {
|
|
|
59
59
|
super(...arguments);
|
|
60
60
|
this.__typename = MagentoProductTypeEnum.SimpleProduct;
|
|
61
61
|
this.canonical_url = faker.internet.url();
|
|
62
|
-
this.meta_title = faker.
|
|
63
|
-
this.meta_description = faker.
|
|
62
|
+
this.meta_title = faker.lorem.word();
|
|
63
|
+
this.meta_description = faker.lorem.words(3);
|
|
64
64
|
this.stock_status = MagentoProductStockStatusEnum.InStock;
|
|
65
65
|
this.description = {
|
|
66
66
|
__typename: 'ComplexTextValue',
|
|
67
|
-
html: faker.
|
|
67
|
+
html: faker.lorem.words(5),
|
|
68
68
|
};
|
|
69
69
|
this.short_description = {
|
|
70
70
|
__typename: 'ComplexTextValue',
|
|
71
|
-
html: faker.
|
|
71
|
+
html: faker.lorem.words(3),
|
|
72
72
|
};
|
|
73
73
|
this.media_gallery_entries = [];
|
|
74
74
|
}
|
|
@@ -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: "19.
|
|
84
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
83
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoCoreProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
84
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoCoreProductFactory, providedIn: 'root' }); }
|
|
85
85
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", 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: "19.
|
|
107
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
106
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoSimpleProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
107
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoSimpleProductFactory, providedIn: 'root' }); }
|
|
108
108
|
}
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoSimpleProductFactory, decorators: [{
|
|
110
110
|
type: Injectable,
|
|
111
111
|
args: [{
|
|
112
112
|
providedIn: 'root',
|
|
@@ -118,27 +118,27 @@ class MockMagentoAggregationPrice {
|
|
|
118
118
|
this.__typename = 'Aggregation';
|
|
119
119
|
this.attribute_code = 'price';
|
|
120
120
|
this.type = MagentoProductFilterType.Range;
|
|
121
|
-
this.count = faker.
|
|
121
|
+
this.count = faker.number.int();
|
|
122
122
|
this.label = 'Price';
|
|
123
123
|
this.options = [
|
|
124
124
|
{
|
|
125
125
|
value: '0-10',
|
|
126
|
-
count: faker.
|
|
126
|
+
count: faker.number.int(),
|
|
127
127
|
label: '0-10',
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
value: '10-20',
|
|
131
|
-
count: faker.
|
|
131
|
+
count: faker.number.int(),
|
|
132
132
|
label: '10-20',
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
value: '20-30',
|
|
136
|
-
count: faker.
|
|
136
|
+
count: faker.number.int(),
|
|
137
137
|
label: '20-30',
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
value: '30-40',
|
|
141
|
-
count: faker.
|
|
141
|
+
count: faker.number.int(),
|
|
142
142
|
label: '30-40',
|
|
143
143
|
},
|
|
144
144
|
];
|
|
@@ -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: "19.
|
|
152
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
151
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationPriceFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
152
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationPriceFactory, providedIn: 'root' }); }
|
|
153
153
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationPriceFactory, decorators: [{
|
|
155
155
|
type: Injectable,
|
|
156
156
|
args: [{
|
|
157
157
|
providedIn: 'root',
|
|
@@ -163,23 +163,23 @@ class MockMagentoAggregationSelect {
|
|
|
163
163
|
this.__typename = 'Aggregation';
|
|
164
164
|
this.attribute_code = 'select';
|
|
165
165
|
this.type = MagentoProductFilterType.Equal;
|
|
166
|
-
this.count = faker.
|
|
167
|
-
this.label = faker.
|
|
166
|
+
this.count = faker.number.int();
|
|
167
|
+
this.label = faker.lorem.word();
|
|
168
168
|
this.options = [
|
|
169
169
|
{
|
|
170
|
-
count: faker.
|
|
171
|
-
label: faker.
|
|
172
|
-
value: faker.
|
|
170
|
+
count: faker.number.int(),
|
|
171
|
+
label: faker.lorem.word(),
|
|
172
|
+
value: faker.string.uuid(),
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
count: faker.
|
|
176
|
-
label: faker.
|
|
177
|
-
value: faker.
|
|
175
|
+
count: faker.number.int(),
|
|
176
|
+
label: faker.lorem.word(),
|
|
177
|
+
value: faker.string.uuid(),
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
count: faker.
|
|
181
|
-
label: faker.
|
|
182
|
-
value: faker.
|
|
180
|
+
count: faker.number.int(),
|
|
181
|
+
label: faker.lorem.word(),
|
|
182
|
+
value: faker.string.uuid(),
|
|
183
183
|
},
|
|
184
184
|
];
|
|
185
185
|
}
|
|
@@ -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: "19.
|
|
192
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
191
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationSelectFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationSelectFactory, providedIn: 'root' }); }
|
|
193
193
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationSelectFactory, decorators: [{
|
|
195
195
|
type: Injectable,
|
|
196
196
|
args: [{
|
|
197
197
|
providedIn: 'root',
|
|
@@ -200,14 +200,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
200
200
|
|
|
201
201
|
class MagentoProductAggregationFactory extends DaffModelFactory {
|
|
202
202
|
constructor(selectFactory, priceFactory) {
|
|
203
|
-
super(faker.
|
|
203
|
+
super(faker.number.int({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);
|
|
204
204
|
this.selectFactory = selectFactory;
|
|
205
205
|
this.priceFactory = priceFactory;
|
|
206
206
|
}
|
|
207
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
208
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
207
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", 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: "19.2.11", ngImport: i0, type: MagentoProductAggregationFactory, providedIn: 'root' }); }
|
|
209
209
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAggregationFactory, decorators: [{
|
|
211
211
|
type: Injectable,
|
|
212
212
|
args: [{
|
|
213
213
|
providedIn: 'root',
|
|
@@ -221,9 +221,9 @@ const TYPES = [
|
|
|
221
221
|
];
|
|
222
222
|
class MockMagentoProductFilterTypeField {
|
|
223
223
|
constructor() {
|
|
224
|
-
this.name = faker.
|
|
224
|
+
this.name = faker.lorem.word();
|
|
225
225
|
this.type = {
|
|
226
|
-
name: TYPES[faker.
|
|
226
|
+
name: TYPES[faker.number.int({ min: 0, max: TYPES.length - 1 })],
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -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: "19.
|
|
235
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
234
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
235
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, providedIn: 'root' }); }
|
|
236
236
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", 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: "19.
|
|
261
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
260
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductSortFieldsFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
261
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductSortFieldsFactory, providedIn: 'root' }); }
|
|
262
262
|
}
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", 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.datatype.uuid();\n url_key = faker.random.alphaNumeric(16);\n url_suffix = '.html';\n name = faker.random.word();\n sku = faker.random.alphaNumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.random.words(3),\n url: faker.image.imageUrl(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.datatype.number({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.datatype.number({ min: 1, max: 99 }),\n percent_off: faker.datatype.number({ 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.random.word();\n meta_description = faker.random.words(3);\n stock_status = MagentoProductStockStatusEnum.InStock;\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.random.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.datatype.number();\n label = 'Price';\n options = [\n {\n value: '0-10',\n count: faker.datatype.number(),\n label: '0-10',\n },\n {\n value: '10-20',\n count: faker.datatype.number(),\n label: '10-20',\n },\n {\n value: '20-30',\n count: faker.datatype.number(),\n label: '20-30',\n },\n {\n value: '30-40',\n count: faker.datatype.number(),\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.datatype.number();\n label = faker.random.word();\n options = [\n {\n count: faker.datatype.number(),\n label: faker.random.word(),\n value: faker.datatype.uuid(),\n },\n {\n count: faker.datatype.number(),\n label: faker.random.word(),\n value: faker.datatype.uuid(),\n },\n {\n count: faker.datatype.number(),\n label: faker.random.word(),\n value: faker.datatype.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.datatype.number({ 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.random.word();\n type = {\n name: TYPES[faker.datatype.number({ 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,QAAQ,CAAC,IAAI,EAAE;QAC3B,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,IAAU,CAAA,UAAA,GAAG,OAAO;AACpB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;QAC1B,IAAG,CAAA,GAAA,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,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5B,YAAA,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;SAC5B;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,kBAAkB;YAC9B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SAC5B;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,YAAY;AACxB,YAAA,aAAa,EAAE;AACb,gBAAA,UAAU,EAAE,cAAc;AAC1B,gBAAA,aAAa,EAAE;AACb,oBAAA,UAAU,EAAE,OAAO;AACnB,oBAAA,K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,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":";;;;;;MAUa,yBAAyB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,UAAU,GAAG,sBAAsB,CAAC,aAAa;AACjD,QAAA,IAAA,CA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AAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnBD,MAAM,4BAA4B,CAAA;AAAlC,IAAA,WAAA,GAAA;QACE,IAAU,CAAA,UAAA,GAAU,YAAY;QAChC,IAAO,CAAA,OAAA,GAAG,UAAU;AACpB,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA;AACE,gBAAA,KAAK,EAAE,QAAQ;AACf,gBAAA,KAAK,EAAE,UAAU;AAClB,aAAA;SACF;;AACF;AAKK,MAAO,+BAAgC,SAAQ,gBAA0C,CAAA;AAC7F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,4BAA4B,CAAC;;kIAF1B,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cAF9B,MAAM,EAAA,CAAA,CAAA;;4FAEP,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAH3C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -113,10 +113,10 @@ class MagentoProductAppliedFiltersTransformService {
|
|
|
113
113
|
getRangeToValue(toValue) {
|
|
114
114
|
return toValue !== '*' ? { [MagentoProductFilterActionEnum.To]: toValue } : null;
|
|
115
115
|
}
|
|
116
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
117
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
116
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAppliedFiltersTransformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
117
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAppliedFiltersTransformService, providedIn: 'root' }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoProductAppliedFiltersTransformService, decorators: [{
|
|
120
120
|
type: Injectable,
|
|
121
121
|
args: [{
|
|
122
122
|
providedIn: 'root',
|
|
@@ -237,10 +237,10 @@ class DaffMagentoSimpleProductTransformers {
|
|
|
237
237
|
...product.media_gallery_entries && { images: transformMediaGalleryEntries(product, mediaUrl) },
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
241
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
240
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoSimpleProductTransformers, deps: [{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
241
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoSimpleProductTransformers, providedIn: 'root' }); }
|
|
242
242
|
}
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoSimpleProductTransformers, decorators: [{
|
|
244
244
|
type: Injectable,
|
|
245
245
|
args: [{
|
|
246
246
|
providedIn: 'root',
|
|
@@ -275,10 +275,10 @@ class DaffMagentoProductsTransformer {
|
|
|
275
275
|
transformManyMagentoProducts(products, mediaUrl) {
|
|
276
276
|
return products.map(product => this.transformMagentoProduct(product, mediaUrl));
|
|
277
277
|
}
|
|
278
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
279
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
278
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductsTransformer, deps: [{ token: DaffMagentoSimpleProductTransformers }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
279
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductsTransformer, providedIn: 'root' }); }
|
|
280
280
|
}
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductsTransformer, decorators: [{
|
|
282
282
|
type: Injectable,
|
|
283
283
|
args: [{
|
|
284
284
|
providedIn: 'root',
|
|
@@ -344,10 +344,10 @@ class DaffMagentoProductResponseTransformers {
|
|
|
344
344
|
products: [daffProduct],
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
348
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
347
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductResponseTransformers, deps: [{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
348
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductResponseTransformers, providedIn: 'root' }); }
|
|
349
349
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductResponseTransformers, decorators: [{
|
|
351
351
|
type: Injectable,
|
|
352
352
|
args: [{
|
|
353
353
|
providedIn: 'root',
|
|
@@ -769,10 +769,10 @@ class DaffMagentoProductService {
|
|
|
769
769
|
]),
|
|
770
770
|
}).pipe(map(result => this.magentoProductsTransformer.transformManyMagentoProducts(result.data.products.items, this.config.baseMediaUrl)));
|
|
771
771
|
}
|
|
772
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
773
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
772
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductService, deps: [{ token: i1.Apollo }, { token: MAGENTO_PRODUCT_CONFIG_TOKEN }, { token: DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM }, { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS }, { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS }, { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS }, { token: DaffMagentoProductsTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
773
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductService, providedIn: 'root' }); }
|
|
774
774
|
}
|
|
775
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoProductService, decorators: [{
|
|
776
776
|
type: Injectable,
|
|
777
777
|
args: [{
|
|
778
778
|
providedIn: 'root',
|
|
@@ -809,11 +809,11 @@ class DaffProductMagentoDriverModule {
|
|
|
809
809
|
],
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
813
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
814
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
812
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
813
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffProductMagentoDriverModule, imports: [CommonModule] }); }
|
|
814
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductMagentoDriverModule, imports: [CommonModule] }); }
|
|
815
815
|
}
|
|
816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffProductMagentoDriverModule, decorators: [{
|
|
817
817
|
type: NgModule,
|
|
818
818
|
args: [{
|
|
819
819
|
imports: [
|