@daffodil/category 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 +81 -1
- package/driver/index.d.ts +23 -1
- package/driver/magento/index.d.ts +179 -1
- package/driver/magento/testing/index.d.ts +11 -1
- package/driver/testing/index.d.ts +36 -1
- package/fesm2022/daffodil-category-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-category-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-magento-testing.mjs +3 -3
- package/fesm2022/daffodil-category-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-magento.mjs +19 -19
- package/fesm2022/daffodil-category-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-category-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-routing.mjs +16 -16
- package/fesm2022/daffodil-category-routing.mjs.map +1 -1
- package/fesm2022/daffodil-category-state-testing.mjs +7 -7
- package/fesm2022/daffodil-category-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-state.mjs +23 -23
- package/fesm2022/daffodil-category-state.mjs.map +1 -1
- package/fesm2022/daffodil-category-testing.mjs +9 -9
- package/fesm2022/daffodil-category-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category.mjs +0 -1
- package/fesm2022/daffodil-category.mjs.map +1 -1
- package/index.d.ts +126 -1
- package/package.json +1 -1
- package/routing/index.d.ts +68 -1
- package/state/index.d.ts +456 -1
- package/state/testing/index.d.ts +41 -1
- package/testing/index.d.ts +71 -1
- package/driver/in-memory/backend/category.service.d.ts +0 -49
- package/driver/in-memory/backend/public_api.d.ts +0 -1
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/drivers/category-driver.module.d.ts +0 -12
- package/driver/in-memory/drivers/category.service.d.ts +0 -20
- package/driver/in-memory/drivers/public_api.d.ts +0 -2
- package/driver/in-memory/public_api.d.ts +0 -2
- package/driver/interfaces/category-service.interface.d.ts +0 -17
- package/driver/magento/category-driver.module.d.ts +0 -13
- package/driver/magento/category.service.d.ts +0 -29
- package/driver/magento/fragments/public_api.d.ts +0 -1
- package/driver/magento/fragments/token.d.ts +0 -2
- package/driver/magento/models/category.d.ts +0 -21
- package/driver/magento/models/complete-category-response.d.ts +0 -14
- package/driver/magento/models/get-category-and-products.interface.d.ts +0 -13
- package/driver/magento/models/public_api.d.ts +0 -6
- package/driver/magento/models/requests/custom-metadata-attribute.d.ts +0 -4
- package/driver/magento/models/requests/get-products-by-categories-request.d.ts +0 -9
- package/driver/magento/models/url-resolver.d.ts +0 -4
- package/driver/magento/public_api.d.ts +0 -7
- package/driver/magento/queries/fragments/category-tree.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -1
- package/driver/magento/queries/get-category-and-products.d.ts +0 -3
- package/driver/magento/queries/public_api.d.ts +0 -3
- package/driver/magento/queries/resolve-url/public_api.d.ts +0 -4
- package/driver/magento/queries/resolve-url/query.d.ts +0 -8
- package/driver/magento/queries/resolve-url/response.type.d.ts +0 -4
- package/driver/magento/queries/resolve-url/validator.d.ts +0 -3
- package/driver/magento/queries/resolve-url/variables.type.d.ts +0 -3
- package/driver/magento/testing/factories/category.factory.d.ts +0 -8
- package/driver/magento/testing/factories/public_api.d.ts +0 -1
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transformers/applied-filter-transformer.service.d.ts +0 -11
- package/driver/magento/transformers/category-page-config-transformer.service.d.ts +0 -8
- package/driver/magento/transformers/category-response-transform.service.d.ts +0 -15
- package/driver/magento/transformers/category-transformer.service.d.ts +0 -13
- package/driver/magento/transformers/public_api.d.ts +0 -4
- package/driver/magento/transformers/pure/add-metadata-types-to-aggregates.d.ts +0 -3
- package/driver/magento/transforms/public_api.d.ts +0 -2
- package/driver/magento/transforms/token.d.ts +0 -2
- package/driver/magento/transforms/type.d.ts +0 -7
- package/driver/public_api.d.ts +0 -1
- package/driver/testing/drivers/category-driver.module.d.ts +0 -12
- package/driver/testing/drivers/category.service.d.ts +0 -21
- package/driver/testing/drivers/public_api.d.ts +0 -2
- package/driver/testing/public_api.d.ts +0 -1
- package/models/category-breadcrumb.d.ts +0 -21
- package/models/category-page-metadata.d.ts +0 -7
- package/models/category-request.d.ts +0 -29
- package/models/category.d.ts +0 -6
- package/models/generic-category.d.ts +0 -45
- package/models/get-category-response.d.ts +0 -21
- package/models/public_api.d.ts +0 -6
- package/public_api.d.ts +0 -1
- package/routing/effects/collection-route.effects.d.ts +0 -10
- package/routing/injection-tokens/public_api.d.ts +0 -1
- package/routing/injection-tokens/request/builder.token.d.ts +0 -2
- package/routing/injection-tokens/request/builders.token.d.ts +0 -4
- package/routing/module.d.ts +0 -8
- package/routing/public_api.d.ts +0 -4
- package/routing/resolvers/category-page-id/category-page-id.resolver.d.ts +0 -20
- package/routing/resolvers/category-page-url/category-page-url.resolver.d.ts +0 -22
- package/routing/resolvers/public_api.d.ts +0 -2
- package/routing/services/public_api.d.ts +0 -1
- package/routing/services/url-request-builder.service.d.ts +0 -17
- package/state/actions/category-page-filter.actions.d.ts +0 -100
- package/state/actions/category-page.actions.d.ts +0 -58
- package/state/actions/category.actions.d.ts +0 -43
- package/state/category-state.module.d.ts +0 -12
- package/state/effects/category-page-metadata.effects.d.ts +0 -29
- package/state/effects/category-page.effects.d.ts +0 -17
- package/state/effects/category.effects.d.ts +0 -16
- package/state/facades/collection/facade.d.ts +0 -9
- package/state/facades/page/category-facade.interface.d.ts +0 -41
- package/state/facades/page/category.facade.d.ts +0 -39
- package/state/facades/public_api.d.ts +0 -3
- 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 -10
- package/state/public_api.d.ts +0 -9
- package/state/reducers/category/category-reducer-state.interface.d.ts +0 -8
- package/state/reducers/category/category.reducer.d.ts +0 -11
- package/state/reducers/category-entities/category-entities-adapter.d.ts +0 -3
- package/state/reducers/category-entities/category-entities.reducer.d.ts +0 -9
- package/state/reducers/category-reducers.d.ts +0 -6
- package/state/reducers/category-reducers.interface.d.ts +0 -27
- package/state/reducers/category-store-feature-key.d.ts +0 -4
- package/state/reducers/page-metadata/reducer.d.ts +0 -11
- package/state/reducers/page-metadata/state.interface.d.ts +0 -2
- package/state/reducers/product-reducers.d.ts +0 -3
- package/state/reducers/product.reducer.d.ts +0 -10
- package/state/reducers/public_api.d.ts +0 -9
- package/state/reducers/token/extra.token.d.ts +0 -3
- package/state/reducers/token/public_api.d.ts +0 -1
- package/state/reducers/token/reducers.token.d.ts +0 -3
- package/state/selectors/category-entities/category-entities.selector.d.ts +0 -33
- package/state/selectors/category-feature.selector.d.ts +0 -13
- package/state/selectors/category-page/category-page.selector.d.ts +0 -30
- package/state/selectors/category.selector.d.ts +0 -43
- package/state/selectors/collection/selectors.d.ts +0 -5
- package/state/testing/category-testing.module.d.ts +0 -9
- package/state/testing/mock-category-facade.d.ts +0 -30
- package/state/testing/public_api.d.ts +0 -2
- package/testing/factories/category-breadcrumb.factory.d.ts +0 -17
- package/testing/factories/category-page-metadata.factory.d.ts +0 -15
- package/testing/factories/category.factory.d.ts +0 -34
- package/testing/factories/public_api.d.ts +0 -3
- package/testing/helpers/category-helper.d.ts +0 -7
- package/testing/public_api.d.ts +0 -3
|
@@ -1 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { InMemoryBackendConfig, InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl } from 'angular-in-memory-web-api';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DaffCategoryIdRequest, DaffGetCategoryResponse, DaffCategoryUrlRequest, DaffCategory, DaffCategoryPageMetadata } from '@daffodil/category';
|
|
5
|
+
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
6
|
+
import { DaffInMemoryDriverBase, DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
9
|
+
import * as i1 from '@angular/common';
|
|
10
|
+
import { DaffCategoryFactory, DaffCategoryPageMetadataFactory } from '@daffodil/category/testing';
|
|
11
|
+
import { DaffProduct } from '@daffodil/product';
|
|
12
|
+
import { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The category in memory driver for mocking the {@link DaffCategoryDriver} with in memory data.
|
|
16
|
+
*
|
|
17
|
+
* @inheritdoc
|
|
18
|
+
*/
|
|
19
|
+
declare class DaffInMemoryCategoryService extends DaffInMemoryDriverBase implements DaffCategoryServiceInterface {
|
|
20
|
+
private http;
|
|
21
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
22
|
+
get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse>;
|
|
23
|
+
getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCategoryService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryCategoryService>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A module that provides the {@link DaffInMemoryCategoryService} for the {@link DaffCategoryDriver} token.
|
|
30
|
+
*/
|
|
31
|
+
declare class DaffCategoryInMemoryDriverModule {
|
|
32
|
+
static forRoot(): ModuleWithProviders<DaffCategoryInMemoryDriverModule>;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryInMemoryDriverModule, never>;
|
|
34
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
|
35
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryInMemoryDriverModule>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An in-memory service that mocks out the backend services for getting categories. See the angular in memory documentation for more details.
|
|
40
|
+
*/
|
|
41
|
+
declare class DaffInMemoryBackendCategoryService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
42
|
+
private categoryFactory;
|
|
43
|
+
private metadataFactory;
|
|
44
|
+
private productInMemoryBackendService;
|
|
45
|
+
readonly collectionName = "category";
|
|
46
|
+
protected _root: DaffCategory;
|
|
47
|
+
protected _categories: DaffCategory[];
|
|
48
|
+
protected _categoryPageMetadata: DaffCategoryPageMetadata;
|
|
49
|
+
get rootCategory(): DaffCategory;
|
|
50
|
+
/**
|
|
51
|
+
* The collection of categories in the backend.
|
|
52
|
+
*/
|
|
53
|
+
get categories(): DaffCategory[];
|
|
54
|
+
/**
|
|
55
|
+
* The metadata associated with the current page.
|
|
56
|
+
*/
|
|
57
|
+
get categoryPageMetadata(): DaffCategoryPageMetadata;
|
|
58
|
+
constructor(categoryFactory: DaffCategoryFactory, metadataFactory: DaffCategoryPageMetadataFactory, productInMemoryBackendService: DaffInMemoryBackendProductService);
|
|
59
|
+
/**
|
|
60
|
+
* @docs-private
|
|
61
|
+
*/
|
|
62
|
+
parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
|
|
63
|
+
/**
|
|
64
|
+
* @docs-private
|
|
65
|
+
*/
|
|
66
|
+
createDb(): any;
|
|
67
|
+
/**
|
|
68
|
+
* Get a category.
|
|
69
|
+
*
|
|
70
|
+
* @param reqInfo
|
|
71
|
+
*/
|
|
72
|
+
get(reqInfo: any): any;
|
|
73
|
+
protected getTotalPages(allIds: DaffProduct['id'][], pageSize: number): number;
|
|
74
|
+
protected trimProductIdsToSinglePage(allIds: any[], currentPage: number, pageSize: number): any[];
|
|
75
|
+
protected generatePageSize(reqInfo: any): number;
|
|
76
|
+
protected getCurrentPageParam(reqInfo: any): number;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCategoryService, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCategoryService>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { DaffCategoryInMemoryDriverModule, DaffInMemoryBackendCategoryService, DaffInMemoryCategoryService };
|
package/driver/index.d.ts
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DaffGenericCategory, DaffCategory, DaffCategoryIdRequest, DaffGetCategoryResponse, DaffCategoryUrlRequest } from '@daffodil/category';
|
|
4
|
+
import { DaffProduct } from '@daffodil/product';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An interface for category service drivers.
|
|
8
|
+
*/
|
|
9
|
+
interface DaffCategoryServiceInterface<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> {
|
|
10
|
+
/**
|
|
11
|
+
* Fetch a category by its ID.
|
|
12
|
+
*/
|
|
13
|
+
get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse<V, W>>;
|
|
14
|
+
/**
|
|
15
|
+
* Fetch a category by its associated URL.
|
|
16
|
+
*/
|
|
17
|
+
getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse<V, W>>;
|
|
18
|
+
}
|
|
19
|
+
declare const DaffCategoryDriver: _angular_core.InjectionToken<DaffCategoryServiceInterface<DaffCategory, DaffProduct>>;
|
|
20
|
+
declare const provideDaffCategoryDriver: <R extends DaffCategoryServiceInterface<DaffCategory, DaffProduct> = DaffCategoryServiceInterface<DaffCategory, DaffProduct>>(klass: _angular_core.Type<R>) => _angular_core.ExistingProvider;
|
|
21
|
+
|
|
22
|
+
export { DaffCategoryDriver, provideDaffCategoryDriver };
|
|
23
|
+
export type { DaffCategoryServiceInterface };
|
|
@@ -1 +1,179 @@
|
|
|
1
|
-
|
|
1
|
+
import * as apollo_angular from 'apollo-angular';
|
|
2
|
+
import { Apollo } from 'apollo-angular';
|
|
3
|
+
import { DocumentNode } from 'graphql';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { DaffCategory, DaffCategoryPageMetadata, DaffGetCategoryResponse, DaffCategoryIdRequest, DaffCategoryUrlRequest } from '@daffodil/category';
|
|
6
|
+
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
7
|
+
import { MagentoProductAppliedFiltersTransformService, MagentoProductFilters, MagentoAggregation, MagentoProduct, MagentoProductSortFields, MagentoSortFieldAction, DaffMagentoProductTransform, DaffProductMagentoDriverConfig } from '@daffodil/product/driver/magento';
|
|
8
|
+
import { DaffFilterRequest, DaffSortDirectionEnum } from '@daffodil/core';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
11
|
+
import { MagentoSearchResultPageInfo } from '@daffodil/driver/magento';
|
|
12
|
+
import * as i1 from '@angular/common';
|
|
13
|
+
import { GraphQlApolloValidator } from '@daffodil/core/graphql';
|
|
14
|
+
import { DocumentNode as DocumentNode$1 } from '@apollo/client/core';
|
|
15
|
+
|
|
16
|
+
declare class DaffMagentoAppliedFiltersTransformService {
|
|
17
|
+
private productFilterRequestsTransformer;
|
|
18
|
+
constructor(productFilterRequestsTransformer: MagentoProductAppliedFiltersTransformService);
|
|
19
|
+
transform(categoryId: DaffCategory['id'], daffFilters: DaffFilterRequest[]): MagentoProductFilters;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoAppliedFiltersTransformService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoAppliedFiltersTransformService>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface MagentoCategory {
|
|
25
|
+
__typename?: string;
|
|
26
|
+
uid: string;
|
|
27
|
+
url_path: string;
|
|
28
|
+
url_suffix: string;
|
|
29
|
+
canonical_url: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
meta_title?: string;
|
|
33
|
+
meta_description?: string;
|
|
34
|
+
breadcrumbs?: MagentoBreadcrumb[];
|
|
35
|
+
level?: number;
|
|
36
|
+
children_count?: number;
|
|
37
|
+
children?: MagentoCategory[];
|
|
38
|
+
}
|
|
39
|
+
interface MagentoBreadcrumb {
|
|
40
|
+
category_uid: MagentoCategory['uid'];
|
|
41
|
+
category_name: MagentoCategory['name'];
|
|
42
|
+
category_level: MagentoCategory['level'];
|
|
43
|
+
category_url_path: MagentoCategory['url_path'];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface MagentoCompleteCategoryResponse {
|
|
47
|
+
category: MagentoCategory;
|
|
48
|
+
aggregates: MagentoAggregation[];
|
|
49
|
+
products: MagentoProduct[];
|
|
50
|
+
sort_fields: MagentoProductSortFields;
|
|
51
|
+
page_info: MagentoSearchResultPageInfo;
|
|
52
|
+
total_count: number;
|
|
53
|
+
appliedSortOption?: string;
|
|
54
|
+
appliedSortDirection?: DaffSortDirectionEnum;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface MagentoGetCategoryAndProductsRequest {
|
|
58
|
+
productFilter: MagentoProductFilters;
|
|
59
|
+
categoryFilters: MagentoProductFilters;
|
|
60
|
+
search?: string;
|
|
61
|
+
pageSize?: number;
|
|
62
|
+
currentPage?: number;
|
|
63
|
+
sort?: MagentoSortFieldAction;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface MagentoCustomMetadataAttribute {
|
|
67
|
+
attribute_code: string;
|
|
68
|
+
entity_type: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface MagentoGetCategoryAndProductsResponse {
|
|
72
|
+
categoryList: MagentoCategory[];
|
|
73
|
+
products: {
|
|
74
|
+
items: MagentoProduct[];
|
|
75
|
+
page_info: MagentoSearchResultPageInfo;
|
|
76
|
+
total_count: number;
|
|
77
|
+
aggregations: MagentoAggregation[];
|
|
78
|
+
sort_fields: MagentoProductSortFields;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface MagentoCategoryUrlResolver {
|
|
83
|
+
__typename?: string;
|
|
84
|
+
uid: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare class DaffMagentoCategoryPageConfigTransformerService {
|
|
88
|
+
transform(categoryResponse: MagentoCompleteCategoryResponse): DaffCategoryPageMetadata;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCategoryPageConfigTransformerService, never>;
|
|
90
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCategoryPageConfigTransformerService>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A transform for the Magento driver that can add extra fields or otherwise modify the category driver response.
|
|
95
|
+
*/
|
|
96
|
+
type MagentoCategoryTreeTransform<T extends MagentoCategory = MagentoCategory, V extends DaffCategory = DaffCategory> = (daffCategory: DaffCategory, magentoCategory: T, products: MagentoProduct[]) => V;
|
|
97
|
+
|
|
98
|
+
declare const MAGENTO_CATEGORY_EXTRA_TRANSFORMS: i0.InjectionToken<MagentoCategoryTreeTransform[]>;
|
|
99
|
+
declare const magentoProvideCategoryExtraTransforms: <R extends MagentoCategoryTreeTransform = MagentoCategoryTreeTransform>(...values: R[]) => Array<i0.ValueProvider>;
|
|
100
|
+
|
|
101
|
+
declare class DaffMagentoCategoryTransformerService {
|
|
102
|
+
private extraTransforms;
|
|
103
|
+
constructor(extraTransforms: Array<MagentoCategoryTreeTransform>);
|
|
104
|
+
transform(category: MagentoCategory, products: MagentoProduct[]): DaffCategory;
|
|
105
|
+
private transformBreadcrumb;
|
|
106
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCategoryTransformerService, never>;
|
|
107
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCategoryTransformerService>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare class DaffMagentoCategoryResponseTransformService {
|
|
111
|
+
private magentoCategoryTransformerService;
|
|
112
|
+
private magentoCategoryPageConfigurationTransformerService;
|
|
113
|
+
private magentoProductsTransform;
|
|
114
|
+
constructor(magentoCategoryTransformerService: DaffMagentoCategoryTransformerService, magentoCategoryPageConfigurationTransformerService: DaffMagentoCategoryPageConfigTransformerService, magentoProductsTransform: DaffMagentoProductTransform);
|
|
115
|
+
transform(completeCategory: MagentoCompleteCategoryResponse, mediaUrl: string): DaffGetCategoryResponse;
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCategoryResponseTransformService, never>;
|
|
117
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCategoryResponseTransformService>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* A service for making magento apollo queries for categories. Should be provided via the {@link DaffCategoryDriver} token.
|
|
122
|
+
*
|
|
123
|
+
* @inheritdoc
|
|
124
|
+
*/
|
|
125
|
+
declare class DaffMagentoCategoryService implements DaffCategoryServiceInterface {
|
|
126
|
+
private apollo;
|
|
127
|
+
private magentoCategoryResponseTransformer;
|
|
128
|
+
private magentoAppliedFiltersTransformer;
|
|
129
|
+
private productConfig;
|
|
130
|
+
private extraProductFragments;
|
|
131
|
+
private extraProductPreviewFragments;
|
|
132
|
+
private extraCategoryFragments;
|
|
133
|
+
constructor(apollo: Apollo, magentoCategoryResponseTransformer: DaffMagentoCategoryResponseTransformService, magentoAppliedFiltersTransformer: DaffMagentoAppliedFiltersTransformService, productConfig: DaffProductMagentoDriverConfig, extraProductFragments: DocumentNode[], extraProductPreviewFragments: DocumentNode[], extraCategoryFragments: DocumentNode[]);
|
|
134
|
+
get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse>;
|
|
135
|
+
getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse>;
|
|
136
|
+
private getCategoryAndProductsQueryVariables;
|
|
137
|
+
private transformCategory;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCategoryService, never>;
|
|
139
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCategoryService>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* A module that provides the {@link DaffCategoryDriver} and {@link MAGENTO_CATEGORY_CONFIG_TOKEN} as the {@link DaffMagentoCategoryService} and
|
|
144
|
+
* {@link MAGENTO_CATEGORY_CONFIG_DEFAULT} respectively
|
|
145
|
+
*/
|
|
146
|
+
declare class DaffCategoryMagentoDriverModule {
|
|
147
|
+
static forRoot(): ModuleWithProviders<DaffCategoryMagentoDriverModule>;
|
|
148
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryMagentoDriverModule, never>;
|
|
149
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
|
150
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryMagentoDriverModule>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface MagentoCategoryUrlResolverResponse {
|
|
154
|
+
route: MagentoCategoryUrlResolver;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface MagentoResolveCategoryUrlVariables {
|
|
158
|
+
url: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare const DAFF_MAGENTO_RESOLVE_CATEGORY_URL_QUERY_NAME = "MagentoResolveCategoryUrl";
|
|
162
|
+
/**
|
|
163
|
+
* This query retrieves a URL resolution from Magento and informs you about
|
|
164
|
+
* what type of route the URL is.
|
|
165
|
+
*/
|
|
166
|
+
declare const MagentoResolveCategoryUrl: apollo_angular.TypedDocumentNode<MagentoCategoryUrlResolverResponse, MagentoResolveCategoryUrlVariables>;
|
|
167
|
+
|
|
168
|
+
declare const magentoCategoryGetByUrlValidator: GraphQlApolloValidator<MagentoCategoryUrlResolverResponse>;
|
|
169
|
+
|
|
170
|
+
declare const DAFF_MAGENTO_GET_CATEGORY_AND_PRODUCTS_QUERY_NAME = "MagentoGetCategoryAndProducts";
|
|
171
|
+
declare const MagentoGetCategoryAndProductsQuery: (extraCategoryFragments?: DocumentNode[], extraProductFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
172
|
+
|
|
173
|
+
declare const magentoCategoryTreeFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
174
|
+
|
|
175
|
+
declare const MAGENTO_CATEGORY_EXTRA_FRAGMENTS: i0.InjectionToken<DocumentNode$1[]>;
|
|
176
|
+
declare const magentoProvideCategoryExtraFragments: <R extends DocumentNode$1 = DocumentNode$1>(...values: R[]) => Array<i0.ValueProvider>;
|
|
177
|
+
|
|
178
|
+
export { DAFF_MAGENTO_GET_CATEGORY_AND_PRODUCTS_QUERY_NAME, DAFF_MAGENTO_RESOLVE_CATEGORY_URL_QUERY_NAME, DaffCategoryMagentoDriverModule, DaffMagentoAppliedFiltersTransformService, DaffMagentoCategoryPageConfigTransformerService, DaffMagentoCategoryResponseTransformService, DaffMagentoCategoryService, DaffMagentoCategoryTransformerService, MAGENTO_CATEGORY_EXTRA_FRAGMENTS, MAGENTO_CATEGORY_EXTRA_TRANSFORMS, MagentoGetCategoryAndProductsQuery, MagentoResolveCategoryUrl, magentoCategoryGetByUrlValidator, magentoCategoryTreeFragment, magentoProvideCategoryExtraFragments, magentoProvideCategoryExtraTransforms };
|
|
179
|
+
export type { MagentoBreadcrumb, MagentoCategory, MagentoCategoryTreeTransform, MagentoCategoryUrlResolver, MagentoCategoryUrlResolverResponse, MagentoCompleteCategoryResponse, MagentoCustomMetadataAttribute, MagentoGetCategoryAndProductsRequest, MagentoGetCategoryAndProductsResponse, MagentoResolveCategoryUrlVariables };
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { MagentoCategory } from '@daffodil/category/driver/magento';
|
|
2
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class DaffCategoryDriverMagentoCategoryFactory extends DaffModelFactory<MagentoCategory> {
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryDriverMagentoCategoryFactory, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryDriverMagentoCategoryFactory>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { DaffCategoryDriverMagentoCategoryFactory };
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DaffCategoryIdRequest, DaffGetCategoryResponse, DaffCategoryUrlRequest } from '@daffodil/category';
|
|
3
|
+
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
4
|
+
import { DaffCategoryFactory, DaffCategoryPageMetadataFactory } from '@daffodil/category/testing';
|
|
5
|
+
import { DaffProductFactory } 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 category testing driver to mock {@link DaffCategoryServiceInterface}.
|
|
12
|
+
*
|
|
13
|
+
* @inheritdoc
|
|
14
|
+
*/
|
|
15
|
+
declare class DaffTestingCategoryService implements DaffCategoryServiceInterface {
|
|
16
|
+
private categoryFactory;
|
|
17
|
+
private categoryPageMetadataFactory;
|
|
18
|
+
private productFactory;
|
|
19
|
+
constructor(categoryFactory: DaffCategoryFactory, categoryPageMetadataFactory: DaffCategoryPageMetadataFactory, productFactory: DaffProductFactory);
|
|
20
|
+
get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse>;
|
|
21
|
+
getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCategoryService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingCategoryService>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A module for providing the {@link DaffTestingCategoryService} for the {@link DaffCategoryDriver} token.
|
|
28
|
+
*/
|
|
29
|
+
declare class DaffCategoryTestingDriverModule {
|
|
30
|
+
static forRoot(): ModuleWithProviders<DaffCategoryTestingDriverModule>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryTestingDriverModule, never>;
|
|
32
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryTestingDriverModule, never, [typeof i1.CommonModule], never>;
|
|
33
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryTestingDriverModule>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { DaffCategoryTestingDriverModule, DaffTestingCategoryService };
|
|
@@ -36,10 +36,10 @@ class DaffInMemoryCategoryService extends DaffInMemoryDriverBase {
|
|
|
36
36
|
.set('currentPage', categoryRequest.currentPage ? categoryRequest.currentPage.toString() : null);
|
|
37
37
|
return this.http.get(`${this.url}/${daffUriTruncateLeadingSlash(categoryRequest.url)}`, { params });
|
|
38
38
|
}
|
|
39
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
39
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryCategoryService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
40
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryCategoryService, providedIn: 'root' }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryCategoryService, decorators: [{
|
|
43
43
|
type: Injectable,
|
|
44
44
|
args: [{
|
|
45
45
|
providedIn: 'root',
|
|
@@ -143,10 +143,10 @@ class DaffInMemoryBackendCategoryService {
|
|
|
143
143
|
}
|
|
144
144
|
return 1;
|
|
145
145
|
}
|
|
146
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
147
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
146
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendCategoryService, deps: [{ token: i1$1.DaffCategoryFactory }, { token: i1$1.DaffCategoryPageMetadataFactory }, { token: i2$1.DaffInMemoryBackendProductService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
147
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendCategoryService, providedIn: 'root' }); }
|
|
148
148
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffInMemoryBackendCategoryService, decorators: [{
|
|
150
150
|
type: Injectable,
|
|
151
151
|
args: [{
|
|
152
152
|
providedIn: 'root',
|
|
@@ -166,11 +166,11 @@ class DaffCategoryInMemoryDriverModule {
|
|
|
166
166
|
],
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
170
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
171
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
169
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
170
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryInMemoryDriverModule, imports: [CommonModule] }); }
|
|
171
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryInMemoryDriverModule, imports: [CommonModule] }); }
|
|
172
172
|
}
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryInMemoryDriverModule, decorators: [{
|
|
174
174
|
type: NgModule,
|
|
175
175
|
args: [{
|
|
176
176
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-category-driver-in-memory.mjs","sources":["../../../libs/category/driver/in-memory/src/collection-name.const.ts","../../../libs/category/driver/in-memory/src/drivers/category.service.ts","../../../libs/category/driver/in-memory/src/backend/category.service.ts","../../../libs/category/driver/in-memory/src/drivers/category-driver.module.ts","../../../libs/category/driver/in-memory/src/daffodil-category-driver-in-memory.ts"],"sourcesContent":["export const DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME = 'category';\n","import {\n HttpClient,\n HttpParams,\n} from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffGetCategoryResponse,\n DaffCategoryIdRequest,\n DaffCategoryUrlRequest,\n} from '@daffodil/category';\nimport { DaffCategoryServiceInterface } from '@daffodil/category/driver';\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The category in memory driver for mocking the {@link DaffCategoryDriver} with in memory data.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryCategoryService extends DaffInMemoryDriverBase implements DaffCategoryServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse> {\n const params = new HttpParams()\n .set('pageSize', categoryRequest.pageSize ? categoryRequest.pageSize.toString() : null)\n .set('currentPage', categoryRequest.currentPage ? categoryRequest.currentPage.toString() : null);\n\n return this.http.get<DaffGetCategoryResponse>(`${this.url}/${categoryRequest.id}`, { params });\n }\n\n getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse> {\n const params = new HttpParams()\n .set('pageSize', categoryRequest.pageSize ? categoryRequest.pageSize.toString() : null)\n .set('currentPage', categoryRequest.currentPage ? categoryRequest.currentPage.toString() : null);\n\n return this.http.get<DaffGetCategoryResponse>(`${this.url}/${daffUriTruncateLeadingSlash(categoryRequest.url)}`, { params });\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport {\n DaffCategory,\n DaffCategoryPageMetadata,\n} from '@daffodil/category';\nimport {\n DaffCategoryFactory,\n DaffCategoryPageMetadataFactory,\n} from '@daffodil/category/testing';\nimport { collect } from '@daffodil/core';\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';\n\nimport { DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that mocks out the backend services for getting categories. See the angular in memory documentation for more details.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendCategoryService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME;\n\n protected _root: DaffCategory;\n protected _categories: DaffCategory[] = [];\n protected _categoryPageMetadata: DaffCategoryPageMetadata;\n\n get rootCategory(): DaffCategory {\n return this._root;\n }\n\n /**\n * The collection of categories in the backend.\n */\n get categories(): DaffCategory[] {\n return this._categories;\n }\n\n /**\n * The metadata associated with the current page.\n */\n get categoryPageMetadata(): DaffCategoryPageMetadata {\n return this._categoryPageMetadata;\n }\n\n constructor(\n private categoryFactory: DaffCategoryFactory,\n private metadataFactory: DaffCategoryPageMetadataFactory,\n private productInMemoryBackendService: DaffInMemoryBackendProductService,\n ) {\n this._root = this.categoryFactory.createTree(\n 3,\n this.productInMemoryBackendService.products.map(({ id }) => id),\n );\n this._categories = collect(\n this._root,\n (category) => category?.children || [],\n );\n }\n\n /**\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * @docs-private\n */\n createDb(): any {\n return {\n categories: this.categories,\n };\n }\n\n /**\n * Get a category.\n *\n * @param reqInfo\n */\n get(reqInfo: any) {\n // this method is overloaded for both get by ID and URL so we check both\n const category = this.categories.filter(({ id, url }) => id === reqInfo.id || daffUriTruncateLeadingSlash(url) === reqInfo.id)[0];\n\n if (category) {\n this._categoryPageMetadata = this.metadataFactory.create({\n id: reqInfo.id,\n pageSize: this.generatePageSize(reqInfo),\n currentPage: this.getCurrentPageParam(reqInfo),\n totalPages: this.getTotalPages(category.product_ids, this.generatePageSize(reqInfo)),\n ids: this.trimProductIdsToSinglePage(category.product_ids, this.getCurrentPageParam(reqInfo), this.generatePageSize(reqInfo)),\n count: category.total_products,\n });\n\n return reqInfo.utils.createResponse$(() => ({\n body: {\n category,\n categoryPageMetadata: this._categoryPageMetadata,\n products: this.productInMemoryBackendService.products,\n },\n status: STATUS.OK,\n }));\n } else {\n this._categoryPageMetadata = null;\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.NOT_FOUND,\n }));\n }\n\n }\n\n protected getTotalPages(allIds: DaffProduct['id'][], pageSize: number) {\n return Math.ceil(allIds.length/pageSize);\n }\n\n protected trimProductIdsToSinglePage(allIds: any[], currentPage: number, pageSize: number) {\n const tempIds = [...allIds];\n tempIds.splice(0, (currentPage-1) * pageSize);\n tempIds.splice(pageSize, tempIds.length-pageSize);\n\n return tempIds;\n }\n\n protected generatePageSize(reqInfo) {\n if(reqInfo.req.params.map && reqInfo.req.params.map.get('pageSize') && reqInfo.req.params.map.get('pageSize')[0]) {\n return parseInt(reqInfo.req.params.map.get('pageSize')[0], 10);\n }\n return 10;\n }\n\n protected getCurrentPageParam(reqInfo) {\n if(reqInfo.req.params.map && reqInfo.req.params.map.get('currentPage') && reqInfo.req.params.map.get('currentPage')[0]) {\n return parseInt(reqInfo.req.params.map.get('currentPage')[0], 10);\n }\n return 1;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCategoryDriver } from '@daffodil/category/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffInMemoryCategoryService } from './category.service';\nimport { DaffInMemoryBackendCategoryService } from '../backend/category.service';\n\n/**\n * A module that provides the {@link DaffInMemoryCategoryService} for the {@link DaffCategoryDriver} token.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCategoryInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCategoryInMemoryDriverModule> {\n return {\n ngModule: DaffCategoryInMemoryDriverModule,\n providers: [\n provideDaffCategoryDriver(DaffInMemoryCategoryService),\n provideDaffInMemoryBackends(DaffInMemoryBackendCategoryService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,uCAAuC,GAAG,UAAU;;ACmBjE;;;;AAIG;AAIG,MAAO,2BAA4B,SAAQ,sBAAsB,CAAA;IACrE,WACU,CAAA,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,uCAAuC,CAAC;QAH9C,IAAI,CAAA,IAAA,GAAJ,IAAI;;AAMd,IAAA,GAAG,CAAC,eAAsC,EAAA;AACxC,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU;AAC1B,aAAA,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,IAAI;aACrF,GAAG,CAAC,aAAa,EAAE,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC;QAElG,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA0B,CAAA,EAAG,IAAI,CAAC,GAAG,IAAI,eAAe,CAAC,EAAE,CAAE,CAAA,EAAE,EAAE,MAAM,EAAE,CAAC;;AAGhG,IAAA,QAAQ,CAAC,eAAuC,EAAA;AAC9C,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU;AAC1B,aAAA,GAAG,CAAC,UAAU,EAAE,eAAe,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category/driver/in-memory/src/drivers/category.service.ts","../../../libs/category/driver/in-memory/src/backend/category.service.ts","../../../libs/category/driver/in-memory/src/drivers/category-driver.module.ts","../../../libs/category/driver/in-memory/src/daffodil-category-driver-in-memory.ts"],"sourcesContent":["export const DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME = 'category';\n","import {\n HttpClient,\n HttpParams,\n} from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffGetCategoryResponse,\n DaffCategoryIdRequest,\n DaffCategoryUrlRequest,\n} from '@daffodil/category';\nimport { DaffCategoryServiceInterface } from '@daffodil/category/driver';\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The category in memory driver for mocking the {@link DaffCategoryDriver} with in memory data.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryCategoryService extends DaffInMemoryDriverBase implements DaffCategoryServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(categoryRequest: DaffCategoryIdRequest): Observable<DaffGetCategoryResponse> {\n const params = new HttpParams()\n .set('pageSize', categoryRequest.pageSize ? categoryRequest.pageSize.toString() : null)\n .set('currentPage', categoryRequest.currentPage ? categoryRequest.currentPage.toString() : null);\n\n return this.http.get<DaffGetCategoryResponse>(`${this.url}/${categoryRequest.id}`, { params });\n }\n\n getByUrl(categoryRequest: DaffCategoryUrlRequest): Observable<DaffGetCategoryResponse> {\n const params = new HttpParams()\n .set('pageSize', categoryRequest.pageSize ? categoryRequest.pageSize.toString() : null)\n .set('currentPage', categoryRequest.currentPage ? categoryRequest.currentPage.toString() : null);\n\n return this.http.get<DaffGetCategoryResponse>(`${this.url}/${daffUriTruncateLeadingSlash(categoryRequest.url)}`, { params });\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport {\n DaffCategory,\n DaffCategoryPageMetadata,\n} from '@daffodil/category';\nimport {\n DaffCategoryFactory,\n DaffCategoryPageMetadataFactory,\n} from '@daffodil/category/testing';\nimport { collect } from '@daffodil/core';\nimport { daffUriTruncateLeadingSlash } from '@daffodil/core/routing';\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';\n\nimport { DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that mocks out the backend services for getting categories. See the angular in memory documentation for more details.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendCategoryService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME;\n\n protected _root: DaffCategory;\n protected _categories: DaffCategory[] = [];\n protected _categoryPageMetadata: DaffCategoryPageMetadata;\n\n get rootCategory(): DaffCategory {\n return this._root;\n }\n\n /**\n * The collection of categories in the backend.\n */\n get categories(): DaffCategory[] {\n return this._categories;\n }\n\n /**\n * The metadata associated with the current page.\n */\n get categoryPageMetadata(): DaffCategoryPageMetadata {\n return this._categoryPageMetadata;\n }\n\n constructor(\n private categoryFactory: DaffCategoryFactory,\n private metadataFactory: DaffCategoryPageMetadataFactory,\n private productInMemoryBackendService: DaffInMemoryBackendProductService,\n ) {\n this._root = this.categoryFactory.createTree(\n 3,\n this.productInMemoryBackendService.products.map(({ id }) => id),\n );\n this._categories = collect(\n this._root,\n (category) => category?.children || [],\n );\n }\n\n /**\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * @docs-private\n */\n createDb(): any {\n return {\n categories: this.categories,\n };\n }\n\n /**\n * Get a category.\n *\n * @param reqInfo\n */\n get(reqInfo: any) {\n // this method is overloaded for both get by ID and URL so we check both\n const category = this.categories.filter(({ id, url }) => id === reqInfo.id || daffUriTruncateLeadingSlash(url) === reqInfo.id)[0];\n\n if (category) {\n this._categoryPageMetadata = this.metadataFactory.create({\n id: reqInfo.id,\n pageSize: this.generatePageSize(reqInfo),\n currentPage: this.getCurrentPageParam(reqInfo),\n totalPages: this.getTotalPages(category.product_ids, this.generatePageSize(reqInfo)),\n ids: this.trimProductIdsToSinglePage(category.product_ids, this.getCurrentPageParam(reqInfo), this.generatePageSize(reqInfo)),\n count: category.total_products,\n });\n\n return reqInfo.utils.createResponse$(() => ({\n body: {\n category,\n categoryPageMetadata: this._categoryPageMetadata,\n products: this.productInMemoryBackendService.products,\n },\n status: STATUS.OK,\n }));\n } else {\n this._categoryPageMetadata = null;\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.NOT_FOUND,\n }));\n }\n\n }\n\n protected getTotalPages(allIds: DaffProduct['id'][], pageSize: number) {\n return Math.ceil(allIds.length/pageSize);\n }\n\n protected trimProductIdsToSinglePage(allIds: any[], currentPage: number, pageSize: number) {\n const tempIds = [...allIds];\n tempIds.splice(0, (currentPage-1) * pageSize);\n tempIds.splice(pageSize, tempIds.length-pageSize);\n\n return tempIds;\n }\n\n protected generatePageSize(reqInfo) {\n if(reqInfo.req.params.map && reqInfo.req.params.map.get('pageSize') && reqInfo.req.params.map.get('pageSize')[0]) {\n return parseInt(reqInfo.req.params.map.get('pageSize')[0], 10);\n }\n return 10;\n }\n\n protected getCurrentPageParam(reqInfo) {\n if(reqInfo.req.params.map && reqInfo.req.params.map.get('currentPage') && reqInfo.req.params.map.get('currentPage')[0]) {\n return parseInt(reqInfo.req.params.map.get('currentPage')[0], 10);\n }\n return 1;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCategoryDriver } from '@daffodil/category/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffInMemoryCategoryService } from './category.service';\nimport { DaffInMemoryBackendCategoryService } from '../backend/category.service';\n\n/**\n * A module that provides the {@link DaffInMemoryCategoryService} for the {@link DaffCategoryDriver} token.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCategoryInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCategoryInMemoryDriverModule> {\n return {\n ngModule: DaffCategoryInMemoryDriverModule,\n providers: [\n provideDaffCategoryDriver(DaffInMemoryCategoryService),\n provideDaffInMemoryBackends(DaffInMemoryBackendCategoryService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,uCAAuC,GAAG,UAAU;;ACmBjE;;;;AAIG;AAIG,MAAO,2BAA4B,SAAQ,sBAAsB,CAAA;IACrE,WAAA,CACU,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,uCAAuC,CAAC;QAH9C,IAAA,CAAA,IAAI,GAAJ,IAAI;IAId;AAEA,IAAA,GAAG,CAAC,eAAsC,EAAA;AACxC,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU;AAC1B,aAAA,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,IAAI;aACrF,GAAG,CAAC,aAAa,EAAE,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC;QAElG,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA0B,CAAA,EAAG,I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AA,CAAA,CAAA;;2FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -25,10 +25,10 @@ class DaffCategoryDriverMagentoCategoryFactory extends DaffModelFactory {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super(MockMagentoCategory);
|
|
27
27
|
}
|
|
28
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
29
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
28
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryDriverMagentoCategoryFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryDriverMagentoCategoryFactory, providedIn: 'root' }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryDriverMagentoCategoryFactory, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-category-driver-magento-testing.mjs","sources":["../../../libs/category/driver/magento/testing/src/factories/category.factory.ts","../../../libs/category/driver/magento/testing/src/daffodil-category-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { MagentoCategory } from '@daffodil/category/driver/magento';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nclass MockMagentoCategory implements MagentoCategory {\n __typename = 'CategoryTree';\n uid = faker.string.alphanumeric(10);\n url_path = faker.lorem.word();\n url_suffix = '.html';\n canonical_url = faker.internet.url();\n name? = faker.lorem.word();\n description? = faker.lorem.words(40);\n meta_title? = faker.lorem.words(2);\n meta_description? = faker.lorem.words(40);\n breadcrumbs? = [];\n level? = faker.number.int(15);\n children_count? = faker.number.int(15);\n products? = { items: []};\n children?: MagentoCategory[] = [];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCategoryDriverMagentoCategoryFactory extends DaffModelFactory<MagentoCategory> {\n constructor(){\n super(MockMagentoCategory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;QACE,
|
|
1
|
+
{"version":3,"file":"daffodil-category-driver-magento-testing.mjs","sources":["../../../libs/category/driver/magento/testing/src/factories/category.factory.ts","../../../libs/category/driver/magento/testing/src/daffodil-category-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { MagentoCategory } from '@daffodil/category/driver/magento';\nimport { DaffModelFactory } from '@daffodil/core/testing';\n\nclass MockMagentoCategory implements MagentoCategory {\n __typename = 'CategoryTree';\n uid = faker.string.alphanumeric(10);\n url_path = faker.lorem.word();\n url_suffix = '.html';\n canonical_url = faker.internet.url();\n name? = faker.lorem.word();\n description? = faker.lorem.words(40);\n meta_title? = faker.lorem.words(2);\n meta_description? = faker.lorem.words(40);\n breadcrumbs? = [];\n level? = faker.number.int(15);\n children_count? = faker.number.int(15);\n products? = { items: []};\n children?: MagentoCategory[] = [];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCategoryDriverMagentoCategoryFactory extends DaffModelFactory<MagentoCategory> {\n constructor(){\n super(MockMagentoCategory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,UAAU,GAAG,cAAc;QAC3B,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;AACnC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QAC7B,IAAA,CAAA,UAAU,GAAG,OAAO;AACpB,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;AACpC,QAAA,IAAA,CAAA,IAAI,GAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QAC1B,IAAA,CAAA,WAAW,GAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,IAAA,CAAA,UAAU,GAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAClC,IAAA,CAAA,gBAAgB,GAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,IAAA,CAAA,WAAW,GAAK,EAAE;QAClB,IAAA,CAAA,KAAK,GAAK,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,IAAA,CAAA,cAAc,GAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;AACtC,QAAA,IAAA,CAAA,QAAQ,GAAK,EAAE,KAAK,EAAE,EAAE,EAAC;QACzB,IAAA,CAAA,QAAQ,GAAuB,EAAE;IACnC;AAAC;AAKK,MAAO,wCAAyC,SAAQ,gBAAiC,CAAA;AAC7F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,mBAAmB,CAAC;IAC5B;iIAHW,wCAAwC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxC,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,wCAAwC,cAFvC,MAAM,EAAA,CAAA,CAAA;;2FAEP,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAHpD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -133,10 +133,10 @@ class DaffMagentoAppliedFiltersTransformService {
|
|
|
133
133
|
...this.productFilterRequestsTransformer.transform(daffFilters),
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
137
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
136
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAppliedFiltersTransformService, deps: [{ token: i1.MagentoProductAppliedFiltersTransformService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
137
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAppliedFiltersTransformService, providedIn: 'root' }); }
|
|
138
138
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAppliedFiltersTransformService, decorators: [{
|
|
140
140
|
type: Injectable,
|
|
141
141
|
args: [{
|
|
142
142
|
providedIn: 'root',
|
|
@@ -151,10 +151,10 @@ class DaffMagentoCategoryPageConfigTransformerService {
|
|
|
151
151
|
id: categoryResponse.category.uid,
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
155
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
154
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryPageConfigTransformerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
155
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryPageConfigTransformerService, providedIn: 'root' }); }
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryPageConfigTransformerService, decorators: [{
|
|
158
158
|
type: Injectable,
|
|
159
159
|
args: [{
|
|
160
160
|
providedIn: 'root',
|
|
@@ -212,10 +212,10 @@ class DaffMagentoCategoryTransformerService {
|
|
|
212
212
|
url: `/${breadcrumb.category_url_path}${category.url_suffix}`,
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
216
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
215
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryTransformerService, deps: [{ token: MAGENTO_CATEGORY_EXTRA_TRANSFORMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
216
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryTransformerService, providedIn: 'root' }); }
|
|
217
217
|
}
|
|
218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryTransformerService, decorators: [{
|
|
219
219
|
type: Injectable,
|
|
220
220
|
args: [{
|
|
221
221
|
providedIn: 'root',
|
|
@@ -239,10 +239,10 @@ class DaffMagentoCategoryResponseTransformService {
|
|
|
239
239
|
products: completeCategory.products.map(product => this.magentoProductsTransform(product, mediaUrl)),
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
243
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
242
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryResponseTransformService, deps: [{ token: DaffMagentoCategoryTransformerService }, { token: DaffMagentoCategoryPageConfigTransformerService }, { token: DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
243
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryResponseTransformService, providedIn: 'root' }); }
|
|
244
244
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryResponseTransformService, decorators: [{
|
|
246
246
|
type: Injectable,
|
|
247
247
|
args: [{
|
|
248
248
|
providedIn: 'root',
|
|
@@ -364,10 +364,10 @@ class DaffMagentoCategoryService {
|
|
|
364
364
|
};
|
|
365
365
|
return this.magentoCategoryResponseTransformer.transform(completeCategory, mediaUrl);
|
|
366
366
|
}
|
|
367
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
368
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
367
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryService, deps: [{ token: i1$1.Apollo }, { token: DaffMagentoCategoryResponseTransformService }, { token: DaffMagentoAppliedFiltersTransformService }, { token: MAGENTO_PRODUCT_CONFIG_TOKEN }, { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS }, { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS }, { token: MAGENTO_CATEGORY_EXTRA_FRAGMENTS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
368
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryService, providedIn: 'root' }); }
|
|
369
369
|
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoCategoryService, decorators: [{
|
|
371
371
|
type: Injectable,
|
|
372
372
|
args: [{
|
|
373
373
|
providedIn: 'root',
|
|
@@ -404,11 +404,11 @@ class DaffCategoryMagentoDriverModule {
|
|
|
404
404
|
],
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
408
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
409
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
407
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
408
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryMagentoDriverModule, imports: [CommonModule] }); }
|
|
409
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryMagentoDriverModule, imports: [CommonModule] }); }
|
|
410
410
|
}
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCategoryMagentoDriverModule, decorators: [{
|
|
412
412
|
type: NgModule,
|
|
413
413
|
args: [{
|
|
414
414
|
imports: [
|