@daffodil/product 0.88.1 → 0.89.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/driver/in-memory/index.d.ts +99 -1
- package/driver/index.d.ts +78 -1
- package/driver/magento/index.d.ts +378 -1
- package/driver/magento/testing/index.d.ts +114 -1
- package/driver/shopify/index.d.ts +89 -1
- package/driver/testing/index.d.ts +38 -1
- 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 +24 -24
- 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 +27 -15
- 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-driver.mjs.map +1 -1
- package/fesm2022/daffodil-product-routing.mjs +16 -16
- 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 +22 -22
- package/fesm2022/daffodil-product-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-testing.mjs +19 -19
- package/fesm2022/daffodil-product-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product.mjs.map +1 -1
- package/index.d.ts +141 -1
- package/package.json +1 -1
- package/routing/index.d.ts +168 -1
- package/state/index.d.ts +574 -1
- package/state/testing/index.d.ts +56 -1
- package/testing/index.d.ts +133 -1
- package/driver/errors/codes.enum.d.ts +0 -4
- package/driver/errors/invalid-api-response.d.ts +0 -6
- package/driver/errors/map.d.ts +0 -9
- package/driver/errors/product-not-found.d.ts +0 -8
- package/driver/errors/public_api.d.ts +0 -4
- package/driver/in-memory/backend/product.service.d.ts +0 -48
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/driver/product-driver.module.d.ts +0 -13
- package/driver/in-memory/driver/product.service.d.ts +0 -24
- package/driver/in-memory/driver/provider.d.ts +0 -5
- package/driver/in-memory/injection-tokens/public_api.d.ts +0 -2
- package/driver/in-memory/injection-tokens/transforms/product-response/response-extra.token.d.ts +0 -2
- package/driver/in-memory/injection-tokens/transforms/product-response/response.token.d.ts +0 -2
- package/driver/in-memory/interfaces/product-response-extra-transform.type.d.ts +0 -3
- package/driver/in-memory/interfaces/product-response-transform.type.d.ts +0 -3
- package/driver/in-memory/interfaces/public_api.d.ts +0 -2
- package/driver/in-memory/public_api.d.ts +0 -6
- package/driver/interfaces/product-service.interface.d.ts +0 -27
- package/driver/magento/config/default.d.ts +0 -5
- package/driver/magento/config/public_api.d.ts +0 -1
- package/driver/magento/injection-tokens/fragments/product-page.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/product-preview.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/product.token.d.ts +0 -2
- package/driver/magento/injection-tokens/public_api.d.ts +0 -9
- package/driver/magento/injection-tokens/transforms/product/extra.token.d.ts +0 -20
- package/driver/magento/injection-tokens/transforms/product/token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-preview/preview-extra.token.d.ts +0 -20
- package/driver/magento/injection-tokens/transforms/product-preview/preview.token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-response/response-extra.token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-response/response.token.d.ts +0 -2
- package/driver/magento/interfaces/config.interface.d.ts +0 -11
- package/driver/magento/interfaces/product-preview-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-preview-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-response-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-response-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/public_api.d.ts +0 -5
- package/driver/magento/models/aggregation.d.ts +0 -17
- package/driver/magento/models/filter-type-field.interface.d.ts +0 -7
- package/driver/magento/models/filter-type.enum.d.ts +0 -5
- package/driver/magento/models/filters.d.ts +0 -13
- package/driver/magento/models/get-filter-types-response.interface.d.ts +0 -6
- package/driver/magento/models/get-product-response.interface.d.ts +0 -8
- package/driver/magento/models/magento-product.d.ts +0 -27
- package/driver/magento/models/product-preview.interface.d.ts +0 -35
- package/driver/magento/models/public_api.d.ts +0 -11
- package/driver/magento/models/simple-product.d.ts +0 -6
- package/driver/magento/models/sort-fields.d.ts +0 -9
- package/driver/magento/models/sort.d.ts +0 -7
- package/driver/magento/product-driver.module.d.ts +0 -14
- package/driver/magento/product.service.d.ts +0 -28
- package/driver/magento/provider.d.ts +0 -3
- package/driver/magento/public_api.d.ts +0 -9
- package/driver/magento/queries/fragments/product-aggregations.d.ts +0 -1
- package/driver/magento/queries/fragments/product-page.d.ts +0 -1
- package/driver/magento/queries/fragments/product-preview.d.ts +0 -1
- package/driver/magento/queries/fragments/product.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -5
- package/driver/magento/queries/fragments/sort-fields.d.ts +0 -1
- package/driver/magento/queries/get-all-products.d.ts +0 -3
- package/driver/magento/queries/get-filter-types.d.ts +0 -2
- package/driver/magento/queries/get-product-by-url/public_api.d.ts +0 -4
- package/driver/magento/queries/get-product-by-url/query.d.ts +0 -5
- package/driver/magento/queries/get-product-by-url/response.type.d.ts +0 -5
- package/driver/magento/queries/get-product-by-url/validator.d.ts +0 -3
- package/driver/magento/queries/get-product-by-url/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-product.d.ts +0 -3
- package/driver/magento/queries/public_api.d.ts +0 -5
- package/driver/magento/testing/factories/aggregation/aggregation.factory.d.ts +0 -12
- package/driver/magento/testing/factories/aggregation/public_api.d.ts +0 -3
- package/driver/magento/testing/factories/aggregation/type/price.factory.d.ts +0 -8
- package/driver/magento/testing/factories/aggregation/type/select.factory.d.ts +0 -8
- package/driver/magento/testing/factories/core/product-preview.factory.d.ts +0 -42
- package/driver/magento/testing/factories/core/product.factory.d.ts +0 -28
- package/driver/magento/testing/factories/filter-type-field.factory.d.ts +0 -8
- package/driver/magento/testing/factories/public_api.d.ts +0 -7
- package/driver/magento/testing/factories/simple/simple.factory.d.ts +0 -15
- package/driver/magento/testing/factories/sort-fields.factory.d.ts +0 -8
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transforms/aggregate/add-metadata-types-to-aggregates.d.ts +0 -2
- package/driver/magento/transforms/aggregate/get-matched-attribute-type.d.ts +0 -2
- package/driver/magento/transforms/aggregate/public_api.d.ts +0 -3
- package/driver/magento/transforms/aggregate/transform.d.ts +0 -3
- package/driver/magento/transforms/aggregate/type/equal.d.ts +0 -3
- package/driver/magento/transforms/aggregate/type/range.d.ts +0 -8
- package/driver/magento/transforms/applied-filter-transformer.service.d.ts +0 -18
- package/driver/magento/transforms/applied-sort-option.d.ts +0 -3
- package/driver/magento/transforms/collection-metadata.d.ts +0 -8
- package/driver/magento/transforms/product-preview.d.ts +0 -12
- package/driver/magento/transforms/product-response.d.ts +0 -17
- package/driver/magento/transforms/product-transformers.d.ts +0 -20
- package/driver/magento/transforms/public_api.d.ts +0 -7
- package/driver/magento/transforms/simple-product-transformers.d.ts +0 -16
- package/driver/magento/transforms/sort-options/sort-default-option-first.d.ts +0 -2
- package/driver/models/public_api.d.ts +0 -1
- package/driver/models/response.interface.d.ts +0 -18
- package/driver/public_api.d.ts +0 -3
- package/driver/shopify/product-driver.module.d.ts +0 -12
- package/driver/shopify/product.service.d.ts +0 -20
- package/driver/shopify/public_api.d.ts +0 -4
- package/driver/shopify/queries/gql/get-all-products.d.ts +0 -6
- package/driver/shopify/queries/gql/get-product-by-url.d.ts +0 -8
- package/driver/shopify/queries/gql/get-product.d.ts +0 -6
- package/driver/shopify/queries/gql/public_api.d.ts +0 -3
- package/driver/shopify/queries/public_api.d.ts +0 -3
- package/driver/shopify/queries/response.types.d.ts +0 -6
- package/driver/shopify/queries/variables.types.d.ts +0 -9
- package/driver/shopify/transforms/public_api.d.ts +0 -1
- package/driver/shopify/transforms/shopify-daff-product-transform.d.ts +0 -9
- package/driver/testing/drivers/product-driver.module.d.ts +0 -13
- package/driver/testing/drivers/product.service.d.ts +0 -22
- package/driver/testing/public_api.d.ts +0 -2
- package/helpers/has-discount.d.ts +0 -7
- package/helpers/has-price-range.d.ts +0 -7
- package/helpers/public_api.d.ts +0 -2
- package/models/collection.interface.d.ts +0 -8
- package/models/prices.d.ts +0 -31
- package/models/product-image.d.ts +0 -10
- package/models/product.d.ts +0 -76
- package/models/public_api.d.ts +0 -4
- package/public_api.d.ts +0 -2
- package/routing/config/default.d.ts +0 -9
- package/routing/config/interface.d.ts +0 -18
- package/routing/config/public_api.d.ts +0 -3
- package/routing/config/token.d.ts +0 -2
- package/routing/constants/collection-request-fields.d.ts +0 -5
- package/routing/constants/public_api.d.ts +0 -1
- package/routing/discrete-filter-params/public_api.d.ts +0 -1
- package/routing/discrete-filter-params/token.d.ts +0 -10
- package/routing/effects/collection.effects.d.ts +0 -20
- package/routing/effects/public_api.d.ts +0 -1
- package/routing/models/collection-request-query-param-transforms.interface.d.ts +0 -22
- package/routing/models/collection-request-query-params.interface.d.ts +0 -8
- package/routing/models/public_api.d.ts +0 -2
- package/routing/module.d.ts +0 -9
- package/routing/public_api.d.ts +0 -8
- package/routing/resolvers/product-page-id/product-page-id.resolver.d.ts +0 -18
- package/routing/resolvers/product-page-url/product-page-url.resolver.d.ts +0 -22
- package/routing/resolvers/public_api.d.ts +0 -2
- package/routing/services/get-query-params-from-request.service.d.ts +0 -17
- package/routing/services/get-request-from-route.service.d.ts +0 -18
- package/routing/services/public_api.d.ts +0 -2
- package/state/actions/product-grid.actions.d.ts +0 -47
- package/state/actions/product-page.actions.d.ts +0 -67
- package/state/actions/product.actions.d.ts +0 -43
- package/state/actions/public_api.d.ts +0 -3
- package/state/effects/product-grid.effects.d.ts +0 -27
- package/state/effects/product-page.effects.d.ts +0 -28
- package/state/effects/product.effects.d.ts +0 -27
- package/state/effects/public_api.d.ts +0 -2
- package/state/facades/product/product-facade.interface.d.ts +0 -51
- package/state/facades/product/product.facade.d.ts +0 -26
- package/state/facades/product-grid/product-grid-facade.interface.d.ts +0 -14
- package/state/facades/product-grid/product-grid.facade.d.ts +0 -20
- package/state/facades/product-page/facade.d.ts +0 -27
- package/state/facades/product-page/facade.interface.d.ts +0 -13
- package/state/facades/public_api.d.ts +0 -6
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -1
- package/state/product-state.module.d.ts +0 -11
- package/state/public_api.d.ts +0 -7
- package/state/reducers/injection-tokens/config.token.d.ts +0 -3
- package/state/reducers/injection-tokens/extra.token.d.ts +0 -3
- package/state/reducers/injection-tokens/meta.token.d.ts +0 -3
- package/state/reducers/injection-tokens/public_api.d.ts +0 -2
- package/state/reducers/injection-tokens/reducers.token.d.ts +0 -3
- package/state/reducers/product/product-reducer-state.interface.d.ts +0 -15
- package/state/reducers/product/product.reducer.d.ts +0 -15
- package/state/reducers/product-entities/product-entities-reducer-adapter.d.ts +0 -6
- package/state/reducers/product-entities/product-entities.reducer.d.ts +0 -11
- package/state/reducers/product-grid/product-grid-reducer-state.interface.d.ts +0 -19
- package/state/reducers/product-grid/product-grid.reducer.d.ts +0 -15
- package/state/reducers/product-reducers-state.interface.d.ts +0 -16
- package/state/reducers/product-reducers.d.ts +0 -6
- package/state/reducers/product-store-feature-key.d.ts +0 -1
- package/state/reducers/public_api.d.ts +0 -10
- package/state/selectors/all-selectors.selectors.d.ts +0 -15
- package/state/selectors/product/product.selectors.d.ts +0 -27
- package/state/selectors/product-entities/product-entities.selectors.d.ts +0 -75
- package/state/selectors/product-feature.selector.d.ts +0 -13
- package/state/selectors/product-grid/product-grid.selectors.d.ts +0 -22
- package/state/selectors/public_api.d.ts +0 -5
- package/state/testing/mock-product-facade.d.ts +0 -19
- package/state/testing/mock-product-grid-facade.d.ts +0 -14
- package/state/testing/mock-product-page-facade.d.ts +0 -20
- package/state/testing/product-testing.module.d.ts +0 -6
- package/state/testing/public_api.d.ts +0 -4
- package/testing/factories/collection.factory.d.ts +0 -18
- package/testing/factories/default-product.factory.d.ts +0 -39
- package/testing/factories/extension.factory.d.ts +0 -21
- package/testing/factories/kind.factory.d.ts +0 -20
- package/testing/factories/product-image.factory.d.ts +0 -19
- package/testing/factories/public_api.d.ts +0 -6
- package/testing/helpers.d.ts +0 -7
- package/testing/injection-tokens/factories/extra.token.d.ts +0 -3
- package/testing/injection-tokens/factories/type.token.d.ts +0 -3
- package/testing/injection-tokens/public_api.d.ts +0 -2
- package/testing/public_api.d.ts +0 -4
- package/testing/testing.module.d.ts +0 -9
|
@@ -1 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
import * as apollo_angular from 'apollo-angular';
|
|
2
|
+
import { Apollo } from 'apollo-angular';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DaffProduct } from '@daffodil/product';
|
|
5
|
+
import { DaffProductServiceInterface, DaffProductDriverResponse } from '@daffodil/product/driver';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { ModuleWithProviders, Provider } from '@angular/core';
|
|
8
|
+
import * as i1 from '@angular/common';
|
|
9
|
+
import { ShopifyProductGraph, ShopifyProductNode } from '@daffodil/driver/shopify';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A service for getting DaffProducts {@link DaffProduct} from apollo shopify product requests.
|
|
13
|
+
*
|
|
14
|
+
* @inheritdoc
|
|
15
|
+
*/
|
|
16
|
+
declare class DaffShopifyProductService implements DaffProductServiceInterface {
|
|
17
|
+
private apollo;
|
|
18
|
+
defaultLength: number;
|
|
19
|
+
constructor(apollo: Apollo);
|
|
20
|
+
getAll(): Observable<DaffProduct[]>;
|
|
21
|
+
get(productId: DaffProduct['id']): Observable<DaffProductDriverResponse>;
|
|
22
|
+
getByUrl(url: DaffProduct['url']): Observable<DaffProductDriverResponse>;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffShopifyProductService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffShopifyProductService>;
|
|
25
|
+
}
|
|
26
|
+
|
|
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
|
+
/**
|
|
40
|
+
* Provides the Shopify product driver.
|
|
41
|
+
*
|
|
42
|
+
* @returns Array of Angular providers for the Shopify product driver
|
|
43
|
+
*/
|
|
44
|
+
declare const provideDaffProductShopifyDriver: () => Provider[];
|
|
45
|
+
|
|
46
|
+
interface ShopifyProductAllResponse {
|
|
47
|
+
products?: ShopifyProductGraph;
|
|
48
|
+
}
|
|
49
|
+
interface ShopifyProductSingleResponse {
|
|
50
|
+
product: ShopifyProductNode;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface ShopifyProductAllVariables {
|
|
54
|
+
length: number;
|
|
55
|
+
}
|
|
56
|
+
interface ShopifyProductIDVariables {
|
|
57
|
+
id: string;
|
|
58
|
+
}
|
|
59
|
+
interface ShopifyProductUrlVariables {
|
|
60
|
+
handle: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* GraphQL query object for getting all products.
|
|
65
|
+
*/
|
|
66
|
+
declare const getAllProducts: apollo_angular.TypedDocumentNode<ShopifyProductAllResponse, ShopifyProductAllVariables>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* GraphQL query object for getting a product by URL.
|
|
70
|
+
*
|
|
71
|
+
* The DaffLocatable url is transformed into a Shopify product handle for querying.
|
|
72
|
+
*/
|
|
73
|
+
declare const getProductByUrl: apollo_angular.TypedDocumentNode<ShopifyProductSingleResponse, ShopifyProductUrlVariables>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* GraphQL query object for getting a single product by ID.
|
|
77
|
+
*/
|
|
78
|
+
declare const getProduct: apollo_angular.TypedDocumentNode<ShopifyProductSingleResponse, ShopifyProductIDVariables>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Transforms a ProductNode into a different object.
|
|
82
|
+
*
|
|
83
|
+
* @param node - ProductNode object
|
|
84
|
+
* @returns A Product object
|
|
85
|
+
*/
|
|
86
|
+
declare const daffShopifyProductTransformer: (node: ShopifyProductNode) => DaffProduct;
|
|
87
|
+
|
|
88
|
+
export { DaffProductShopifyDriverModule, DaffShopifyProductService, daffShopifyProductTransformer, getAllProducts, getProduct, getProductByUrl, provideDaffProductShopifyDriver };
|
|
89
|
+
export type { ShopifyProductAllResponse, ShopifyProductAllVariables, ShopifyProductIDVariables, ShopifyProductSingleResponse, ShopifyProductUrlVariables };
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DaffProduct } from '@daffodil/product';
|
|
3
|
+
import { DaffProductServiceInterface, DaffProductDriverResponse } from '@daffodil/product/driver';
|
|
4
|
+
import * as i2 from '@daffodil/product/testing';
|
|
5
|
+
import { DaffProductExtensionFactory, DaffProductImageFactory } from '@daffodil/product/testing';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
8
|
+
import * as i1 from '@angular/common';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The product testing driver to mock the backend product service.
|
|
12
|
+
*
|
|
13
|
+
* @inheritdoc
|
|
14
|
+
* @param productFactory - A DaffProductFactory instance
|
|
15
|
+
* @param productImageFactory - A DaffProductImageFactory instance
|
|
16
|
+
*/
|
|
17
|
+
declare class DaffTestingProductService implements DaffProductServiceInterface {
|
|
18
|
+
private productFactory;
|
|
19
|
+
private productImageFactory;
|
|
20
|
+
constructor(productFactory: DaffProductExtensionFactory, productImageFactory: DaffProductImageFactory);
|
|
21
|
+
getAll(): Observable<DaffProduct[]>;
|
|
22
|
+
get(productId: DaffProduct['id']): Observable<DaffProductDriverResponse>;
|
|
23
|
+
getByUrl(url: DaffProduct['url']): Observable<DaffProductDriverResponse>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingProductService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingProductService>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Module for providing the {@link DaffProductTestingService} driver as the {@link DaffProductDriver}.
|
|
30
|
+
*/
|
|
31
|
+
declare class DaffProductTestingDriverModule {
|
|
32
|
+
static forRoot(): ModuleWithProviders<DaffProductTestingDriverModule>;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductTestingDriverModule, never>;
|
|
34
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductTestingDriverModule, never, [typeof i1.CommonModule, typeof i2.DaffProductTestingModule], never>;
|
|
35
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductTestingDriverModule>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { DaffProductTestingDriverModule, DaffTestingProductService };
|
|
@@ -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: "
|
|
112
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
183
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
184
184
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryProductService, decorators: [{
|
|
186
186
|
type: Injectable
|
|
187
187
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i2.InMemoryBackendConfigArgs, decorators: [{
|
|
188
188
|
type: Inject,
|
|
@@ -207,13 +207,13 @@ class DaffProductInMemoryDriverModule {
|
|
|
207
207
|
],
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
211
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
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,
|
|
212
212
|
DaffProductTestingModule] }); }
|
|
213
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
213
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, imports: [CommonModule,
|
|
214
214
|
DaffProductTestingModule] }); }
|
|
215
215
|
}
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductInMemoryDriverModule, decorators: [{
|
|
217
217
|
type: NgModule,
|
|
218
218
|
args: [{
|
|
219
219
|
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/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;;;IAGvB,WACU,CAAA,cAA2C,EAC3C,mBAA4C,EAAA;QAD5C,IAAc,CAAA,cAAA,GAAd,cAAc;QACd,IAAmB,CAAA,mBAAA,GAAnB,mBAAmB;QAbpB,IAAc,CAAA,cAAA,GAAG,sCAAsC;QAEtD,IAAS,CAAA,SAAA,GAAkB,EAAE;QAYrC,IAAI,CAAC,SAAS,GAAG;YACf,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,M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,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,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,SAAA,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;;;ACXD;;AAEG;AACU,MAAA,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/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":";;;;;;;;;;;;;AAA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AAiC,CAAC;;;ACrBhE;;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: "
|
|
48
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
84
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
85
85
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
107
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
108
108
|
}
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
152
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
153
153
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
192
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
193
193
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
208
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
209
209
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
235
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
236
236
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
261
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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' }); }
|
|
262
262
|
}
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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,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,KAAK,CAAC,IAAI,EAAE;QACzB,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,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,gBAAA,UAAU,EAAE,cAAc;AAC1B,gBAAA,aAAa,EAAE;AACb,oBAAA,UAAU,EAAE,OAAO;AACnB,oBAAA,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,G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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,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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,IAAA,CAAA,UAAU,GAAU,YAAY;QAChC,IAAA,CAAA,OAAO,GAAG,UAAU;AACpB,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA;AACE,gBAAA,KAAK,EAAE,QAAQ;AACf,gBAAA,KAAK,EAAE,UAAU;AAClB,aAAA;SACF;IACH;AAAC;AAKK,MAAO,+BAAgC,SAAQ,gBAA0C,CAAA;AAC7F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,4BAA4B,CAAC;IACrC;iIAHW,+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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,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;;;;"}
|
|
@@ -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: "
|
|
117
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
116
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAppliedFiltersTransformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
117
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoProductAppliedFiltersTransformService, providedIn: 'root' }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
241
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
240
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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: "20.3.1", ngImport: i0, type: DaffMagentoSimpleProductTransformers, providedIn: 'root' }); }
|
|
242
242
|
}
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
279
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
278
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoProductsTransformer, deps: [{ token: DaffMagentoSimpleProductTransformers }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
279
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoProductsTransformer, providedIn: 'root' }); }
|
|
280
280
|
}
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "
|
|
348
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
347
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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: "20.3.1", ngImport: i0, type: DaffMagentoProductResponseTransformers, providedIn: 'root' }); }
|
|
349
349
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoProductResponseTransformers, decorators: [{
|
|
351
351
|
type: Injectable,
|
|
352
352
|
args: [{
|
|
353
353
|
providedIn: 'root',
|
|
@@ -779,10 +779,10 @@ class DaffMagentoProductService {
|
|
|
779
779
|
]),
|
|
780
780
|
}).pipe(map(result => this.magentoProductsTransformer.transformManyMagentoProducts(result.data.products.items, this.config.baseMediaUrl)));
|
|
781
781
|
}
|
|
782
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
783
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
782
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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 }); }
|
|
783
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoProductService, providedIn: 'root' }); }
|
|
784
784
|
}
|
|
785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoProductService, decorators: [{
|
|
786
786
|
type: Injectable,
|
|
787
787
|
args: [{
|
|
788
788
|
providedIn: 'root',
|
|
@@ -819,11 +819,11 @@ class DaffProductMagentoDriverModule {
|
|
|
819
819
|
],
|
|
820
820
|
};
|
|
821
821
|
}
|
|
822
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
823
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
824
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
822
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
823
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffProductMagentoDriverModule, imports: [CommonModule] }); }
|
|
824
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductMagentoDriverModule, imports: [CommonModule] }); }
|
|
825
825
|
}
|
|
826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductMagentoDriverModule, decorators: [{
|
|
827
827
|
type: NgModule,
|
|
828
828
|
args: [{
|
|
829
829
|
imports: [
|