@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,10 +0,0 @@
|
|
|
1
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
2
|
-
import { Actions } from '@ngrx/effects';
|
|
3
|
-
import { DaffCategoryProductCollectionFacade } from '@daffodil/category/state';
|
|
4
|
-
import { DaffProductGetQueryParamsFromRequest, DaffProductRoutingCollectionEffects } from '@daffodil/product/routing';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DaffCategoryRoutingCollectionEffects extends DaffProductRoutingCollectionEffects {
|
|
7
|
-
constructor(actions$: Actions, router: Router, collectionFacade: DaffCategoryProductCollectionFacade, getQueryParams: DaffProductGetQueryParamsFromRequest, route: ActivatedRoute);
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryRoutingCollectionEffects, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryRoutingCollectionEffects>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS, provideDaffCategoryRoutingRequestBuilders, DaffCategoryRoutingRequestBuilder, } from './request/builders.token';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffCategoryRoutingRequestBuilder } from './builders.token';
|
|
2
|
-
export declare const DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER: import("@angular/core").InjectionToken<DaffCategoryRoutingRequestBuilder>, provideDaffCategoryRoutingOptionsBuilder: <R extends DaffCategoryRoutingRequestBuilder = DaffCategoryRoutingRequestBuilder>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
2
|
-
import { DaffCollectionRequest } from '@daffodil/core';
|
|
3
|
-
export type DaffCategoryRoutingRequestBuilder<T extends DaffCollectionRequest = DaffCollectionRequest> = (route: ActivatedRouteSnapshot) => T;
|
|
4
|
-
export declare const DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS: import("@angular/core").InjectionToken<DaffCategoryRoutingRequestBuilder<DaffCollectionRequest>[]>, provideDaffCategoryRoutingRequestBuilders: <R extends DaffCategoryRoutingRequestBuilder<DaffCollectionRequest> = DaffCategoryRoutingRequestBuilder<DaffCollectionRequest>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
package/routing/module.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@daffodil/product/routing";
|
|
3
|
-
import * as i2 from "@ngrx/effects";
|
|
4
|
-
export declare class DaffCategoryRoutingModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryRoutingModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryRoutingModule, never, [typeof i1.DaffProductRoutingModule, typeof i2.EffectsFeatureModule], never>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryRoutingModule>;
|
|
8
|
-
}
|
package/routing/public_api.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
2
|
-
import { ActionsSubject, Store } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffCategoryReducersState } from '@daffodil/category/state';
|
|
5
|
-
import { DaffCategoryRoutingRequestBuilder } from '../../injection-tokens/public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Resolves category data for category pages, and will only resolve the url after a category request succeeds or fails. This resolver expects a url
|
|
9
|
-
* of the form `some/url/{id}` where `{id}` is the category id.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffCategoryPageIdResolver {
|
|
12
|
-
private platformId;
|
|
13
|
-
private requestBuilder;
|
|
14
|
-
private store;
|
|
15
|
-
private dispatcher;
|
|
16
|
-
constructor(platformId: string, requestBuilder: DaffCategoryRoutingRequestBuilder, store: Store<DaffCategoryReducersState>, dispatcher: ActionsSubject);
|
|
17
|
-
resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryPageIdResolver, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryPageIdResolver>;
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { ActionsSubject, Store } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffCategoryReducersState } from '@daffodil/category/state';
|
|
5
|
-
import { DaffCategoryRoutingUrlRequestBuilder } from '../../services/public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Resolves category data for category pages, and will only resolve the url
|
|
9
|
-
* after a category request succeeds or fails. This resolver will take a full
|
|
10
|
-
* a url of the form `some/url.html(secondary:outlet)?query=param#fragment` and attempt to resolve a product from it.
|
|
11
|
-
* Assumes that the URL to be resolved is the primary outlet.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffCategoryPageUrlResolver {
|
|
14
|
-
private platformId;
|
|
15
|
-
private store;
|
|
16
|
-
private dispatcher;
|
|
17
|
-
private requestBuilder;
|
|
18
|
-
constructor(platformId: string, store: Store<DaffCategoryReducersState>, dispatcher: ActionsSubject, requestBuilder: DaffCategoryRoutingUrlRequestBuilder);
|
|
19
|
-
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryPageUrlResolver, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryPageUrlResolver>;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffCategoryRoutingUrlRequestBuilder } from './url-request-builder.service';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { DaffCategoryUrlRequest } from '@daffodil/category';
|
|
3
|
-
import { DaffRoutingUriNormalizer } from '@daffodil/core/routing';
|
|
4
|
-
import { DaffCategoryRoutingRequestBuilder } from '../injection-tokens/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DaffCategoryRoutingUrlRequestBuilder {
|
|
7
|
-
private requestBuilder;
|
|
8
|
-
private urlNormalizer;
|
|
9
|
-
constructor(requestBuilder: DaffCategoryRoutingRequestBuilder, urlNormalizer: DaffRoutingUriNormalizer);
|
|
10
|
-
/**
|
|
11
|
-
* Builds a category URL request from the provided route and router state that
|
|
12
|
-
* is suitable for passing to {@link DaffCategoryPageLoadByUrl}.
|
|
13
|
-
*/
|
|
14
|
-
build(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): DaffCategoryUrlRequest;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryRoutingUrlRequestBuilder, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryRoutingUrlRequestBuilder>;
|
|
17
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffCategoryRequest } from '@daffodil/category';
|
|
3
|
-
import { DaffFilterRequest, DaffFilterToggleRequest } from '@daffodil/core';
|
|
4
|
-
/**
|
|
5
|
-
* The possible types of category page filter actions.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum DaffCategoryPageProductCollectionActionTypes {
|
|
8
|
-
CategoryPageReplaceFiltersAction = "[@daffodil/category] Category Page Replace Filters Action",
|
|
9
|
-
CategoryPageApplyFiltersAction = "[@daffodil/category] Category Page Apply Filters Action",
|
|
10
|
-
CategoryPageRemoveFiltersAction = "[@daffodil/category] Category Page Remove Filters Action",
|
|
11
|
-
CategoryPageClearFiltersAction = "[@daffodil/category] Category Page Clear Filters Action",
|
|
12
|
-
CategoryPageToggleFilterAction = "[@daffodil/category] Category Page Toggle Filter Action",
|
|
13
|
-
CategoryPageChangeSizeAction = "[@daffodil/category] Category Page Change Size Action",
|
|
14
|
-
CategoryPageChangeCurrentPageAction = "[@daffodil/category] Category Page Change Current Page Action",
|
|
15
|
-
CategoryPageChangeSortingOptionAction = "[@daffodil/category] Category Page Change Sorting Option Action"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* An action for replacing the filters for the current category.
|
|
19
|
-
* All existing filters will be removed and the specified filters will be applied.
|
|
20
|
-
*
|
|
21
|
-
* @param filters - Filters to be set on the current category.
|
|
22
|
-
*/
|
|
23
|
-
export declare class DaffCategoryPageReplaceFilters implements Action {
|
|
24
|
-
filters: DaffFilterRequest[];
|
|
25
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageReplaceFiltersAction;
|
|
26
|
-
constructor(filters: DaffFilterRequest[]);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* An action for applying the specified filters for the current category.
|
|
30
|
-
*
|
|
31
|
-
* @param filters - Filters to be applied to the current category.
|
|
32
|
-
*/
|
|
33
|
-
export declare class DaffCategoryPageApplyFilters implements Action {
|
|
34
|
-
filters: DaffFilterRequest[];
|
|
35
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageApplyFiltersAction;
|
|
36
|
-
constructor(filters: DaffFilterRequest[]);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* An action for removing the specified filters for the current category.
|
|
40
|
-
*
|
|
41
|
-
* @param filters - Filters to be removed from the current category.
|
|
42
|
-
*/
|
|
43
|
-
export declare class DaffCategoryPageRemoveFilters implements Action {
|
|
44
|
-
filters: DaffFilterRequest[];
|
|
45
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageRemoveFiltersAction;
|
|
46
|
-
constructor(filters: DaffFilterRequest[]);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* An action for removing all the filters for the current category.
|
|
50
|
-
*/
|
|
51
|
-
export declare class DaffCategoryPageClearFilters implements Action {
|
|
52
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageClearFiltersAction;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* An action for toggling a filters for the current category.
|
|
56
|
-
*
|
|
57
|
-
* @param filter - Filter to be toggled on the current category.
|
|
58
|
-
*/
|
|
59
|
-
export declare class DaffCategoryPageToggleFilter implements Action {
|
|
60
|
-
filter: DaffFilterToggleRequest;
|
|
61
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageToggleFilterAction;
|
|
62
|
-
constructor(filter: DaffFilterToggleRequest);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* An action for changing the number of products shown on each page for the selected category.
|
|
66
|
-
*
|
|
67
|
-
* @param pageSize - The number of products per page.
|
|
68
|
-
*/
|
|
69
|
-
export declare class DaffCategoryPageChangePageSize implements Action {
|
|
70
|
-
pageSize: number;
|
|
71
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageChangeSizeAction;
|
|
72
|
-
constructor(pageSize: number);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* An action for changing the current page of products for the selected category.
|
|
76
|
-
*
|
|
77
|
-
* @param currentPage - The current page of products for the selected category.
|
|
78
|
-
*/
|
|
79
|
-
export declare class DaffCategoryPageChangeCurrentPage implements Action {
|
|
80
|
-
currentPage: number;
|
|
81
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageChangeCurrentPageAction;
|
|
82
|
-
constructor(currentPage: number);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* An action for changing the sorting option for the selected category.
|
|
86
|
-
*
|
|
87
|
-
* @param sort - The sort option to be applied.
|
|
88
|
-
*/
|
|
89
|
-
export declare class DaffCategoryPageChangeSortingOption implements Action {
|
|
90
|
-
sort: {
|
|
91
|
-
option: DaffCategoryRequest['appliedSortOption'];
|
|
92
|
-
direction: DaffCategoryRequest['appliedSortDirection'];
|
|
93
|
-
};
|
|
94
|
-
readonly type = DaffCategoryPageProductCollectionActionTypes.CategoryPageChangeSortingOptionAction;
|
|
95
|
-
constructor(sort: {
|
|
96
|
-
option: DaffCategoryRequest['appliedSortOption'];
|
|
97
|
-
direction: DaffCategoryRequest['appliedSortDirection'];
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
export type DaffCategoryPageProductCollectionActions = DaffCategoryPageReplaceFilters | DaffCategoryPageApplyFilters | DaffCategoryPageRemoveFilters | DaffCategoryPageClearFilters | DaffCategoryPageToggleFilter | DaffCategoryPageChangePageSize | DaffCategoryPageChangeCurrentPage | DaffCategoryPageChangeSortingOption;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffGenericCategory, DaffCategory, DaffGetCategoryResponse, DaffCategoryIdRequest, DaffCategoryUrlRequest } from '@daffodil/category';
|
|
3
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
/**
|
|
6
|
-
* The possible types of category page actions.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum DaffCategoryPageActionTypes {
|
|
9
|
-
CategoryPageLoadAction = "[@daffodil/category] Category Page Load Action",
|
|
10
|
-
CategoryPageLoadByUrlAction = "[@daffodil/category] Category Page Load By URL Action",
|
|
11
|
-
CategoryPageLoadSuccessAction = "[@daffodil/category] Category Page Load Success Action",
|
|
12
|
-
CategoryPageLoadFailureAction = "[@daffodil/category] Category Page Load Failure Action"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* An action triggered to initialize a category page load request.
|
|
16
|
-
* This is intended to be used for loading full category pages.
|
|
17
|
-
* Queries the category by ID.
|
|
18
|
-
*
|
|
19
|
-
* @param request - DaffCategoryRequest object
|
|
20
|
-
*/
|
|
21
|
-
export declare class DaffCategoryPageLoad implements Action {
|
|
22
|
-
request: DaffCategoryIdRequest;
|
|
23
|
-
readonly type = DaffCategoryPageActionTypes.CategoryPageLoadAction;
|
|
24
|
-
constructor(request: DaffCategoryIdRequest);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* An action triggered to initialize a category page load request.
|
|
28
|
-
* This is intended to be used for loading full category pages.
|
|
29
|
-
* Queries the category by URL.
|
|
30
|
-
*
|
|
31
|
-
* @param request - DaffCategoryRequest object
|
|
32
|
-
*/
|
|
33
|
-
export declare class DaffCategoryPageLoadByUrl implements Action {
|
|
34
|
-
request: DaffCategoryUrlRequest;
|
|
35
|
-
readonly type = DaffCategoryPageActionTypes.CategoryPageLoadByUrlAction;
|
|
36
|
-
constructor(request: DaffCategoryUrlRequest);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* An action triggered upon a successful category page request.
|
|
40
|
-
*
|
|
41
|
-
* @param response - DaffGetCategoryResponse object
|
|
42
|
-
*/
|
|
43
|
-
export declare class DaffCategoryPageLoadSuccess<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> implements Action {
|
|
44
|
-
response: DaffGetCategoryResponse<V, W>;
|
|
45
|
-
readonly type = DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction;
|
|
46
|
-
constructor(response: DaffGetCategoryResponse<V, W>);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* An action triggered upon a failed category page request.
|
|
50
|
-
*
|
|
51
|
-
* @param errorMessage - an error message
|
|
52
|
-
*/
|
|
53
|
-
export declare class DaffCategoryPageLoadFailure implements Action {
|
|
54
|
-
errorMessage: DaffStateError;
|
|
55
|
-
readonly type = DaffCategoryPageActionTypes.CategoryPageLoadFailureAction;
|
|
56
|
-
constructor(errorMessage: DaffStateError);
|
|
57
|
-
}
|
|
58
|
-
export type DaffCategoryPageActions<U extends DaffGenericCategory<U> = DaffCategory, W extends DaffProduct = DaffProduct> = DaffCategoryPageLoad | DaffCategoryPageLoadByUrl | DaffCategoryPageLoadSuccess<U, W> | DaffCategoryPageLoadFailure;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffGenericCategory, DaffCategory, DaffGetCategoryResponse, DaffCategoryIdRequest } from '@daffodil/category';
|
|
3
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
/**
|
|
6
|
-
* The possible types of category actions.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum DaffCategoryActionTypes {
|
|
9
|
-
CategoryLoadAction = "[@daffodil/category] Category Load Action",
|
|
10
|
-
CategoryLoadSuccessAction = "[@daffodil/category] Category Load Success Action",
|
|
11
|
-
CategoryLoadFailureAction = "[@daffodil/category] Category Load Failure Action"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* An action triggered to initialize a category load request.
|
|
15
|
-
*
|
|
16
|
-
* @param request - DaffCategoryRequest object
|
|
17
|
-
*/
|
|
18
|
-
export declare class DaffCategoryLoad implements Action {
|
|
19
|
-
request: DaffCategoryIdRequest;
|
|
20
|
-
readonly type = DaffCategoryActionTypes.CategoryLoadAction;
|
|
21
|
-
constructor(request: DaffCategoryIdRequest);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* An action triggered upon a successful category request.
|
|
25
|
-
*
|
|
26
|
-
* @param response - DaffGetCategoryResponse object
|
|
27
|
-
*/
|
|
28
|
-
export declare class DaffCategoryLoadSuccess<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> implements Action {
|
|
29
|
-
response: DaffGetCategoryResponse<V, W>;
|
|
30
|
-
readonly type = DaffCategoryActionTypes.CategoryLoadSuccessAction;
|
|
31
|
-
constructor(response: DaffGetCategoryResponse<V, W>);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* An action triggered upon a failed category request.
|
|
35
|
-
*
|
|
36
|
-
* @param errorMessage - an error message
|
|
37
|
-
*/
|
|
38
|
-
export declare class DaffCategoryLoadFailure implements Action {
|
|
39
|
-
errorMessage: DaffStateError;
|
|
40
|
-
readonly type = DaffCategoryActionTypes.CategoryLoadFailureAction;
|
|
41
|
-
constructor(errorMessage: DaffStateError);
|
|
42
|
-
}
|
|
43
|
-
export type DaffCategoryActions<U extends DaffGenericCategory<U> = DaffCategory, W extends DaffProduct = DaffProduct> = DaffCategoryLoad | DaffCategoryLoadSuccess<U, W> | DaffCategoryLoadFailure;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@ngrx/store";
|
|
3
|
-
import * as i2 from "@ngrx/effects";
|
|
4
|
-
import * as i3 from "@daffodil/product/state";
|
|
5
|
-
/**
|
|
6
|
-
* A module that provides default reducers and effects for the category redux state.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffCategoryStateModule {
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryStateModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryStateModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule, typeof i3.DaffProductStateModule], never>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryStateModule>;
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AsyncScheduler } from 'rxjs/internal/scheduler/AsyncScheduler';
|
|
4
|
-
import { DaffGenericCategory } from '@daffodil/category';
|
|
5
|
-
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
6
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
7
|
-
import { DaffProduct } from '@daffodil/product';
|
|
8
|
-
import { DaffProductGridLoadSuccess } from '@daffodil/product/state';
|
|
9
|
-
import { DaffCategoryPageLoadSuccess, DaffCategoryPageLoadFailure } from '../actions/category-page.actions';
|
|
10
|
-
import { DaffCategoryProductCollectionFacade } from '../facades/public_api';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
export declare class DaffCategoryPageMetadataEffects<V extends DaffGenericCategory<V>, W extends DaffProduct> {
|
|
13
|
-
private actions$;
|
|
14
|
-
private driver;
|
|
15
|
-
private errorMatcher;
|
|
16
|
-
private facade;
|
|
17
|
-
constructor(actions$: Actions, driver: DaffCategoryServiceInterface<V, W>, errorMatcher: ErrorTransformer, facade: DaffCategoryProductCollectionFacade);
|
|
18
|
-
/**
|
|
19
|
-
* Updates the filters applied to the category page. It will take the currently
|
|
20
|
-
* applied filters from state, form them into a request, and attempt to apply
|
|
21
|
-
* that request to a backend service.
|
|
22
|
-
*
|
|
23
|
-
* @param throttleWindow the amount of time to delay when apply/removing filters
|
|
24
|
-
* in a sequence.
|
|
25
|
-
*/
|
|
26
|
-
update$: (throttleWindow: number, scheduler: AsyncScheduler) => Observable<DaffProductGridLoadSuccess | DaffCategoryPageLoadSuccess | DaffCategoryPageLoadFailure>;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryPageMetadataEffects<any, any>, never>;
|
|
28
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryPageMetadataEffects<any, any>>;
|
|
29
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffGenericCategory } from '@daffodil/category';
|
|
4
|
-
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
5
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
6
|
-
import { DaffProduct } from '@daffodil/product';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class DaffCategoryPageEffects<V extends DaffGenericCategory<V>, W extends DaffProduct> {
|
|
9
|
-
private actions$;
|
|
10
|
-
private driver;
|
|
11
|
-
private errorMatcher;
|
|
12
|
-
constructor(actions$: Actions, driver: DaffCategoryServiceInterface<V, W>, errorMatcher: ErrorTransformer);
|
|
13
|
-
loadCategoryPage$: Observable<any>;
|
|
14
|
-
loadCategoryPageByUrl$: Observable<any>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryPageEffects<any, any>, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryPageEffects<any, any>>;
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffGenericCategory } from '@daffodil/category';
|
|
4
|
-
import { DaffCategoryServiceInterface } from '@daffodil/category/driver';
|
|
5
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
6
|
-
import { DaffProduct } from '@daffodil/product';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class DaffCategoryEffects<V extends DaffGenericCategory<V>, W extends DaffProduct> {
|
|
9
|
-
private actions$;
|
|
10
|
-
private driver;
|
|
11
|
-
private errorMatcher;
|
|
12
|
-
constructor(actions$: Actions, driver: DaffCategoryServiceInterface<V, W>, errorMatcher: ErrorTransformer);
|
|
13
|
-
loadCategory$: Observable<any>;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryEffects<any, any>, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryEffects<any, any>>;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Store } from '@ngrx/store';
|
|
2
|
-
import { DaffCollectionFacade, DaffCollectionFacadeInterface } from '@daffodil/core/state';
|
|
3
|
-
import { DaffCategoryStateRootSlice } from '../../reducers/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffCategoryProductCollectionFacade extends DaffCollectionFacade<DaffCategoryStateRootSlice> implements DaffCollectionFacadeInterface {
|
|
6
|
-
constructor(store: Store<DaffCategoryStateRootSlice>);
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryProductCollectionFacade, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryProductCollectionFacade>;
|
|
9
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffGenericCategory, DaffCategory } from '@daffodil/category';
|
|
3
|
-
import { DaffOperationStateFacadeInterface } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
import { DaffCategoryReducerState } from '../../reducers/category/category-reducer-state.interface';
|
|
6
|
-
/**
|
|
7
|
-
* A facade for interacting with the category state.
|
|
8
|
-
* This facade exposes many parts of the state for easy access and allows dispatching of actions.
|
|
9
|
-
*/
|
|
10
|
-
export interface DaffCategoryFacadeInterface<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> extends DaffOperationStateFacadeInterface<DaffCategoryReducerState> {
|
|
11
|
-
/**
|
|
12
|
-
* The currently selected category.
|
|
13
|
-
*/
|
|
14
|
-
category$: Observable<V>;
|
|
15
|
-
/**
|
|
16
|
-
* Products of the current category.
|
|
17
|
-
*/
|
|
18
|
-
products$: Observable<W[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Is the category page empty of products.
|
|
21
|
-
*/
|
|
22
|
-
isCategoryEmpty$: Observable<boolean>;
|
|
23
|
-
/**
|
|
24
|
-
* Get a category by the provided Id.
|
|
25
|
-
*
|
|
26
|
-
* @param id
|
|
27
|
-
*/
|
|
28
|
-
getCategoryById(id: V['id']): Observable<V>;
|
|
29
|
-
/**
|
|
30
|
-
* Get products by a category Id.
|
|
31
|
-
*
|
|
32
|
-
* @param categoryId
|
|
33
|
-
*/
|
|
34
|
-
getProductsByCategory(categoryId: V['id']): Observable<W[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Get products by a category Id.
|
|
37
|
-
*
|
|
38
|
-
* @param categoryId
|
|
39
|
-
*/
|
|
40
|
-
getTotalProductsByCategory(categoryId: V['id']): Observable<number>;
|
|
41
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Store, Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffGenericCategory, DaffCategory } from '@daffodil/category';
|
|
4
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
5
|
-
import { DaffProduct } from '@daffodil/product';
|
|
6
|
-
import { DaffCategoryFacadeInterface } from './category-facade.interface';
|
|
7
|
-
import { DaffCategoryStateRootSlice, DaffCategoryReducerState } from '../../reducers/public_api';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* A facade for interacting with the category state.
|
|
11
|
-
* This facade exposes many parts of the state for easy access and allows dispatching of actions.
|
|
12
|
-
*
|
|
13
|
-
* @inheritdoc
|
|
14
|
-
*/
|
|
15
|
-
export declare class DaffCategoryFacade<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> implements DaffCategoryFacadeInterface<V, W> {
|
|
16
|
-
private store;
|
|
17
|
-
private categorySelectors;
|
|
18
|
-
category$: Observable<V>;
|
|
19
|
-
loadingState$: Observable<DaffCategoryReducerState['daffState']>;
|
|
20
|
-
loading$: Observable<boolean>;
|
|
21
|
-
mutating$: Observable<boolean>;
|
|
22
|
-
resolving$: Observable<boolean>;
|
|
23
|
-
products$: Observable<W[]>;
|
|
24
|
-
errors$: Observable<DaffStateError[]>;
|
|
25
|
-
hasErrors$: Observable<boolean>;
|
|
26
|
-
isCategoryEmpty$: Observable<boolean>;
|
|
27
|
-
getCategoryById(id: V['id']): Observable<V>;
|
|
28
|
-
getProductsByCategory(categoryId: V['id']): Observable<W[]>;
|
|
29
|
-
getTotalProductsByCategory(categoryId: V['id']): Observable<number>;
|
|
30
|
-
constructor(store: Store<DaffCategoryStateRootSlice<V, W>>);
|
|
31
|
-
/**
|
|
32
|
-
* Dispatches the given action.
|
|
33
|
-
*
|
|
34
|
-
* @param action action to dispatch.
|
|
35
|
-
*/
|
|
36
|
-
dispatch(action: Action): void;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryFacade<any, any>, never>;
|
|
38
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCategoryFacade<any, any>>;
|
|
39
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { daffTransformErrorToStateError } from '@daffodil/core/state';
|
|
2
|
-
export declare const DAFF_CATEGORY_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffCategoryErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './error-matcher.token';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@daffodil/product/state";
|
|
3
|
-
/**
|
|
4
|
-
* A module that provides injectable reducers into product state.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffCategoryProductStateModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCategoryProductStateModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCategoryProductStateModule, never, [typeof i1.DaffProductStateModule], never>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCategoryProductStateModule>;
|
|
10
|
-
}
|
package/state/public_api.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { DaffCategoryStateModule } from './category-state.module';
|
|
2
|
-
export { DaffCategoryProductStateModule } from './product-state.module';
|
|
3
|
-
export * from './selectors/category.selector';
|
|
4
|
-
export * from './reducers/public_api';
|
|
5
|
-
export * from './facades/public_api';
|
|
6
|
-
export * from './actions/category.actions';
|
|
7
|
-
export * from './actions/category-page.actions';
|
|
8
|
-
export * from './actions/category-page-filter.actions';
|
|
9
|
-
export * from './injection-tokens/public_api';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffCategory } from '@daffodil/category';
|
|
2
|
-
import { DaffOperationState } from '@daffodil/core/state';
|
|
3
|
-
export interface DaffCategoryReducerState extends DaffOperationState {
|
|
4
|
-
/**
|
|
5
|
-
* The ID of the currently loaded category.
|
|
6
|
-
*/
|
|
7
|
-
id: DaffCategory['id'];
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffGenericCategory } from '@daffodil/category';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
import { DaffCategoryReducerState } from './category-reducer-state.interface';
|
|
4
|
-
import { DaffCategoryPageProductCollectionActions } from '../../actions/category-page-filter.actions';
|
|
5
|
-
import { DaffCategoryPageActions } from '../../actions/category-page.actions';
|
|
6
|
-
import { DaffCategoryActions } from '../../actions/category.actions';
|
|
7
|
-
export declare const daffCategoryInitialState: DaffCategoryReducerState;
|
|
8
|
-
/**
|
|
9
|
-
* Returns the state for category data except for category entities.
|
|
10
|
-
*/
|
|
11
|
-
export declare function daffCategoryReducer<U extends DaffGenericCategory<U>, W extends DaffProduct>(state: DaffCategoryReducerState, action: DaffCategoryActions<U, W> | DaffCategoryPageActions<U, W> | DaffCategoryPageProductCollectionActions): DaffCategoryReducerState;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EntityState } from '@ngrx/entity';
|
|
2
|
-
import { DaffGenericCategory, DaffCategory } from '@daffodil/category';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffCategoryPageActions } from '../../actions/category-page.actions';
|
|
5
|
-
import { DaffCategoryActions } from '../../actions/category.actions';
|
|
6
|
-
/**
|
|
7
|
-
* A reducer function to store category entities from DaffCategoryLoadSuccess and DaffCategoryPageLoadSuccess actions.
|
|
8
|
-
*/
|
|
9
|
-
export declare function daffCategoryEntitiesReducer<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct>(state: EntityState<V>, action: DaffCategoryActions<V, W> | DaffCategoryPageActions<V, W>): EntityState<V>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EntityState } from '@ngrx/entity';
|
|
2
|
-
import { DaffGenericCategory, DaffCategory } from '@daffodil/category';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductStateRootSlice } from '@daffodil/product/state';
|
|
5
|
-
import { DaffCategoryReducerState } from './category/category-reducer-state.interface';
|
|
6
|
-
import { DAFF_CATEGORY_STORE_FEATURE_KEY } from './category-store-feature-key';
|
|
7
|
-
import { DaffCategoryPageMetadataReducerState } from './page-metadata/state.interface';
|
|
8
|
-
/**
|
|
9
|
-
* An interface to describe all of category state.
|
|
10
|
-
*/
|
|
11
|
-
export interface DaffCategoryReducersState<V extends DaffGenericCategory<V> = DaffCategory> {
|
|
12
|
-
/**
|
|
13
|
-
* Redux state for category page metadata, category loading state, and errors associated with loading a category.
|
|
14
|
-
*/
|
|
15
|
-
category: DaffCategoryReducerState;
|
|
16
|
-
/**
|
|
17
|
-
* Redux state for category entities.
|
|
18
|
-
*/
|
|
19
|
-
categoryEntities: EntityState<V>;
|
|
20
|
-
/**
|
|
21
|
-
* The product collection metadata for the category page.
|
|
22
|
-
*/
|
|
23
|
-
pageMetadata: DaffCategoryPageMetadataReducerState;
|
|
24
|
-
}
|
|
25
|
-
export interface DaffCategoryStateRootSlice<V extends DaffGenericCategory<V> = DaffCategory, W extends DaffProduct = DaffProduct> extends DaffProductStateRootSlice<W> {
|
|
26
|
-
[DAFF_CATEGORY_STORE_FEATURE_KEY]: DaffCategoryReducersState<V>;
|
|
27
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffGenericCategory } from '@daffodil/category';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
import { DaffCategoryPageMetadataReducerState } from './state.interface';
|
|
4
|
-
import { DaffCategoryPageProductCollectionActions } from '../../actions/category-page-filter.actions';
|
|
5
|
-
import { DaffCategoryPageActions } from '../../actions/category-page.actions';
|
|
6
|
-
import { DaffCategoryActions } from '../../actions/category.actions';
|
|
7
|
-
export declare const daffCategoryPageMetadataInitialState: DaffCategoryPageMetadataReducerState;
|
|
8
|
-
/**
|
|
9
|
-
* Returns the state for category data except for category entities.
|
|
10
|
-
*/
|
|
11
|
-
export declare function daffCategoryPageMetadataReducer<U extends DaffGenericCategory<U>, W extends DaffProduct>(state: import("@daffodil/category").DaffCategoryPageMetadata, action: DaffCategoryActions<U, W> | DaffCategoryPageActions<U, W> | DaffCategoryPageProductCollectionActions): DaffCategoryPageMetadataReducerState;
|