@daffodil/search-product 0.88.1 → 0.90.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 +15 -1
- package/driver/index.d.ts +25 -1
- package/driver/magento/index.d.ts +102 -1
- package/driver/testing/index.d.ts +15 -1
- package/fesm2022/daffodil-search-product-driver-in-memory.mjs +7 -7
- package/fesm2022/daffodil-search-product-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-driver-magento.mjs +15 -15
- package/fesm2022/daffodil-search-product-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-driver-testing.mjs +4 -4
- package/fesm2022/daffodil-search-product-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-routing.mjs +7 -7
- package/fesm2022/daffodil-search-product-routing.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-state-testing.mjs +7 -7
- package/fesm2022/daffodil-search-product-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-state.mjs +24 -24
- package/fesm2022/daffodil-search-product-state.mjs.map +1 -1
- package/fesm2022/daffodil-search-product-testing.mjs +7 -7
- package/fesm2022/daffodil-search-product-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search-product.mjs.map +1 -1
- package/index.d.ts +22 -1
- package/package.json +1 -1
- package/routing/index.d.ts +12 -1
- package/state/index.d.ts +249 -1
- package/state/testing/index.d.ts +31 -1
- package/testing/index.d.ts +26 -1
- package/constants/public_api.d.ts +0 -1
- package/constants/search-result-kind.d.ts +0 -5
- package/driver/in-memory/backend/search.service.d.ts +0 -36
- package/driver/in-memory/in-memory.module.d.ts +0 -12
- package/driver/in-memory/public_api.d.ts +0 -1
- package/driver/interfaces/options.interface.d.ts +0 -4
- package/driver/interfaces/public_api.d.ts +0 -3
- package/driver/interfaces/response.interface.d.ts +0 -6
- package/driver/interfaces/search-product-service.interface.d.ts +0 -16
- package/driver/magento/core.module.d.ts +0 -10
- package/driver/magento/driver.module.d.ts +0 -13
- package/driver/magento/errors/map.d.ts +0 -6
- package/driver/magento/errors/transform.d.ts +0 -13
- package/driver/magento/federated-driver.module.d.ts +0 -20
- package/driver/magento/models/incremental-response.interface.d.ts +0 -9
- package/driver/magento/models/public_api.d.ts +0 -2
- package/driver/magento/models/search-response.interface.d.ts +0 -13
- package/driver/magento/product-search.service.d.ts +0 -29
- package/driver/magento/public_api.d.ts +0 -6
- package/driver/magento/queries/fragments/product-result.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -1
- package/driver/magento/queries/product-incremental.d.ts +0 -3
- package/driver/magento/queries/product-search.d.ts +0 -3
- package/driver/magento/queries/public_api.d.ts +0 -3
- package/driver/public_api.d.ts +0 -1
- package/driver/testing/public_api.d.ts +0 -1
- package/driver/testing/testing.module.d.ts +0 -12
- package/models/product-search-result.type.d.ts +0 -9
- package/models/public_api.d.ts +0 -1
- package/public_api.d.ts +0 -3
- package/routing/effects/collection-route.effects.d.ts +0 -10
- package/routing/module.d.ts +0 -9
- package/routing/public_api.d.ts +0 -1
- package/state/actions/product-collection.actions.d.ts +0 -95
- package/state/core.module.d.ts +0 -9
- package/state/effects/collection.effects.d.ts +0 -29
- package/state/facades/collection/facade.d.ts +0 -9
- package/state/facades/public_api.d.ts +0 -5
- package/state/facades/search/incremental.facade.d.ts +0 -15
- package/state/facades/search/page.facade.d.ts +0 -15
- package/state/facades/search/search-facade.interface.d.ts +0 -13
- package/state/facades/search/search.facade.d.ts +0 -15
- package/state/page.module.d.ts +0 -9
- package/state/public_api.d.ts +0 -6
- package/state/reducers/collection/public_api.d.ts +0 -3
- package/state/reducers/collection/reducer.d.ts +0 -4
- package/state/reducers/collection/search-reducers.d.ts +0 -3
- package/state/reducers/collection/search.reducer.d.ts +0 -6
- package/state/reducers/product/entities.reducer.d.ts +0 -7
- package/state/reducers/product/public_api.d.ts +0 -2
- package/state/reducers/product/reducers.d.ts +0 -3
- package/state/reducers/public_api.d.ts +0 -5
- package/state/reducers/reducers.d.ts +0 -6
- package/state/reducers/reducers.interface.d.ts +0 -16
- package/state/reducers/store-feature-key.d.ts +0 -4
- package/state/selectors/collection/selectors.d.ts +0 -3
- package/state/selectors/incremental/selectors.d.ts +0 -2
- package/state/selectors/page/selectors.d.ts +0 -2
- package/state/selectors/public_api.d.ts +0 -5
- package/state/selectors/search-feature.selector.d.ts +0 -9
- package/state/selectors/search.selector.d.ts +0 -23
- package/state/state.module.d.ts +0 -7
- package/state/testing/mock-search-facade.d.ts +0 -19
- package/state/testing/public_api.d.ts +0 -2
- package/state/testing/testing.module.d.ts +0 -9
- package/testing/factories/product-search-result.factory.d.ts +0 -14
- package/testing/factories/public_api.d.ts +0 -1
- package/testing/public_api.d.ts +0 -2
- package/testing/testing.module.d.ts +0 -9
- package/transforms/products-to-result.d.ts +0 -6
- package/transforms/public_api.d.ts +0 -1
package/routing/public_api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffSearchProductRoutingModule } from './module';
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { DaffCollectionRequest, DaffFilterRequest, DaffFilterToggleRequest } from '@daffodil/core';
|
|
2
|
-
import { DaffCollectionChangePageSize, DaffCollectionChangeCurrentPage, DaffCollectionChangeSortingOption, DaffCollectionReplaceFilters, DaffCollectionApplyFilters, DaffCollectionRemoveFilters, DaffCollectionToggleFilter, DaffCollectionClearFilters } from '@daffodil/core/state';
|
|
3
|
-
/**
|
|
4
|
-
* The search action types enum.
|
|
5
|
-
*/
|
|
6
|
-
export declare enum DaffSearchProductCollectionActionTypes {
|
|
7
|
-
SearchProductReplaceFiltersAction = "[@daffodil/search-product] Search Product Replace Filters Action",
|
|
8
|
-
SearchProductApplyFiltersAction = "[@daffodil/search-product] Search Product Apply Filters Action",
|
|
9
|
-
SearchProductRemoveFiltersAction = "[@daffodil/search-product] Search Product Remove Filters Action",
|
|
10
|
-
SearchProductClearFiltersAction = "[@daffodil/search-product] Search Product Clear Filters Action",
|
|
11
|
-
SearchProductToggleFiltersAction = "[@daffodil/search-product] Search Product Toggle Filters Action",
|
|
12
|
-
SearchProductChangePageSizeAction = "[@daffodil/search-product] Search Product Change Page Size Action",
|
|
13
|
-
SearchProductChangeCurrentPageAction = "[@daffodil/search-product] Search Product Change Current Page Action",
|
|
14
|
-
SearchProductChangeSortingOptionAction = "[@daffodil/search-product] Search Product Change Sorting Option Action"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @inheritdoc
|
|
18
|
-
* @role action
|
|
19
|
-
*/
|
|
20
|
-
export declare class DaffSearchProductCollectionReplaceFilters implements DaffCollectionReplaceFilters {
|
|
21
|
-
filters: DaffFilterRequest[];
|
|
22
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction;
|
|
23
|
-
constructor(filters: DaffFilterRequest[]);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @inheritdoc
|
|
27
|
-
* @role action
|
|
28
|
-
*/
|
|
29
|
-
export declare class DaffSearchProductCollectionApplyFilters implements DaffCollectionApplyFilters {
|
|
30
|
-
filters: DaffFilterRequest[];
|
|
31
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction;
|
|
32
|
-
constructor(filters: DaffFilterRequest[]);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @inheritdoc
|
|
36
|
-
* @role action
|
|
37
|
-
*/
|
|
38
|
-
export declare class DaffSearchProductCollectionRemoveFilters implements DaffCollectionRemoveFilters {
|
|
39
|
-
filters: DaffFilterRequest[];
|
|
40
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction;
|
|
41
|
-
constructor(filters: DaffFilterRequest[]);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @inheritdoc
|
|
45
|
-
* @role action
|
|
46
|
-
*/
|
|
47
|
-
export declare class DaffSearchProductCollectionClearFilters implements DaffCollectionClearFilters {
|
|
48
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @inheritdoc
|
|
52
|
-
* @role action
|
|
53
|
-
*/
|
|
54
|
-
export declare class DaffSearchProductCollectionToggleFilter implements DaffCollectionToggleFilter {
|
|
55
|
-
filter: DaffFilterToggleRequest;
|
|
56
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction;
|
|
57
|
-
constructor(filter: DaffFilterToggleRequest);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* @inheritdoc
|
|
61
|
-
* @role action
|
|
62
|
-
*/
|
|
63
|
-
export declare class DaffSearchProductCollectionChangePageSize implements DaffCollectionChangePageSize {
|
|
64
|
-
pageSize: number;
|
|
65
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction;
|
|
66
|
-
constructor(pageSize: number);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @inheritdoc
|
|
70
|
-
* @role action
|
|
71
|
-
*/
|
|
72
|
-
export declare class DaffSearchProductCollectionChangeCurrentPage implements DaffCollectionChangeCurrentPage {
|
|
73
|
-
currentPage: number;
|
|
74
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction;
|
|
75
|
-
constructor(currentPage: number);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @inheritdoc
|
|
79
|
-
* @role action
|
|
80
|
-
*/
|
|
81
|
-
export declare class DaffSearchProductCollectionChangeSortingOption implements DaffCollectionChangeSortingOption {
|
|
82
|
-
sort: {
|
|
83
|
-
option: DaffCollectionRequest['appliedSortOption'];
|
|
84
|
-
direction: DaffCollectionRequest['appliedSortDirection'];
|
|
85
|
-
};
|
|
86
|
-
readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction;
|
|
87
|
-
constructor(sort: {
|
|
88
|
-
option: DaffCollectionRequest['appliedSortOption'];
|
|
89
|
-
direction: DaffCollectionRequest['appliedSortDirection'];
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* A union of the search product action types.
|
|
94
|
-
*/
|
|
95
|
-
export type DaffSearchProductCollectionActions = DaffSearchProductCollectionReplaceFilters | DaffSearchProductCollectionApplyFilters | DaffSearchProductCollectionRemoveFilters | DaffSearchProductCollectionClearFilters | DaffSearchProductCollectionToggleFilter | DaffSearchProductCollectionChangePageSize | DaffSearchProductCollectionChangeCurrentPage | DaffSearchProductCollectionChangeSortingOption;
|
package/state/core.module.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@ngrx/store";
|
|
3
|
-
import * as i2 from "@daffodil/product/state";
|
|
4
|
-
import * as i3 from "@daffodil/search/state";
|
|
5
|
-
export declare class DaffSearchProductStateCoreModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateCoreModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateCoreModule, never, [typeof i1.StoreFeatureModule, typeof i2.DaffProductStateModule, typeof i3.DaffSearchStateModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateCoreModule>;
|
|
9
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
3
|
-
import { DaffSearchPageFacade, DaffSearchLoadFailure, DaffSearchLoadSuccess } from '@daffodil/search/state';
|
|
4
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
5
|
-
import { DaffSearchProductDriverInterface } from '@daffodil/search-product/driver';
|
|
6
|
-
import { DaffSearchProductCollectionActionTypes } from '../actions/product-collection.actions';
|
|
7
|
-
import { DaffSearchProductCollectionFacade } from '../facades/public_api';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare const DAFF_SEARCH_PRODUCT_COLLECTION_ACTION_TYPES: DaffSearchProductCollectionActionTypes[];
|
|
10
|
-
export declare class DaffSearchProductCollectionEffects<T extends DaffSearchProductResult = DaffSearchProductResult> {
|
|
11
|
-
private actions$;
|
|
12
|
-
private collectionFacade;
|
|
13
|
-
private searchFacade;
|
|
14
|
-
private driver;
|
|
15
|
-
private errorMatcher;
|
|
16
|
-
constructor(actions$: Actions, collectionFacade: DaffSearchProductCollectionFacade, searchFacade: DaffSearchPageFacade, driver: DaffSearchProductDriverInterface<T>, errorMatcher: ErrorTransformer);
|
|
17
|
-
/**
|
|
18
|
-
* Updates the product collection according to the action.
|
|
19
|
-
* It will take the request metedata, including currently
|
|
20
|
-
* applied filters, from state, form them into a request,
|
|
21
|
-
* and pass that into the {@link DaffProductCollectionDriverCall} provided to this class.
|
|
22
|
-
*
|
|
23
|
-
* @param throttleWindow the amount of time to delay when apply/removing filters
|
|
24
|
-
* in a sequence.
|
|
25
|
-
*/
|
|
26
|
-
update$: ((throttleWindow?: any, scheduler?: any) => import("rxjs").Observable<DaffSearchLoadFailure | DaffSearchLoadSuccess<T>>) & import("@ngrx/effects").CreateEffectMetadata;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductCollectionEffects<any>, never>;
|
|
28
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductCollectionEffects<any>>;
|
|
29
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Store } from '@ngrx/store';
|
|
2
|
-
import { DaffCollectionFacade, DaffCollectionFacadeInterface } from '@daffodil/core/state';
|
|
3
|
-
import { DaffSearchProductStateRootSlice } from '../../reducers/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffSearchProductCollectionFacade extends DaffCollectionFacade<DaffSearchProductStateRootSlice> implements DaffCollectionFacadeInterface {
|
|
6
|
-
constructor(store: Store<DaffSearchProductStateRootSlice>);
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductCollectionFacade, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductCollectionFacade>;
|
|
9
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { DaffSearchProductFacadeInterface } from './search/search-facade.interface';
|
|
2
|
-
export { DaffSearchProductFacade } from './search/search.facade';
|
|
3
|
-
export { DaffSearchProductPageFacade } from './search/page.facade';
|
|
4
|
-
export { DaffSearchProductIncrementalFacade } from './search/incremental.facade';
|
|
5
|
-
export { DaffSearchProductCollectionFacade } from './collection/facade';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Store } from '@ngrx/store';
|
|
2
|
-
import { DaffSearchProductFacadeInterface } from './search-facade.interface';
|
|
3
|
-
import { DaffSearchProductFacade } from './search.facade';
|
|
4
|
-
import { DaffSearchProductStateRootSlice } from '../../reducers/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*
|
|
9
|
-
* A facade for the normal search state.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffSearchProductIncrementalFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
|
|
12
|
-
constructor(store: Store<DaffSearchProductStateRootSlice>);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductIncrementalFacade, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductIncrementalFacade>;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Store } from '@ngrx/store';
|
|
2
|
-
import { DaffSearchProductFacadeInterface } from './search-facade.interface';
|
|
3
|
-
import { DaffSearchProductFacade } from './search.facade';
|
|
4
|
-
import { DaffSearchProductStateRootSlice } from '../../reducers/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*
|
|
9
|
-
* A facade for the normal search state.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffSearchProductPageFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
|
|
12
|
-
constructor(store: Store<DaffSearchProductStateRootSlice>);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageFacade, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductPageFacade>;
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffStoreFacade } from '@daffodil/core/state';
|
|
4
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
5
|
-
/**
|
|
6
|
-
* Exposes the search state selectors.
|
|
7
|
-
*/
|
|
8
|
-
export interface DaffSearchProductFacadeInterface extends DaffStoreFacade<Action> {
|
|
9
|
-
/**
|
|
10
|
-
* The products returned in the most recent search.
|
|
11
|
-
*/
|
|
12
|
-
productResults$: Observable<Array<DaffSearchProductResult>>;
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Action, Store } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
4
|
-
import { DaffSearchProductFacadeInterface } from './search-facade.interface';
|
|
5
|
-
import { DaffSearchProductStateRootSlice } from '../../reducers/public_api';
|
|
6
|
-
import { DaffSearchProductSelectors } from '../../selectors/public_api';
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
|
|
11
|
-
private store;
|
|
12
|
-
productResults$: Observable<Array<DaffSearchProductResult>>;
|
|
13
|
-
constructor(store: Store<DaffSearchProductStateRootSlice>, selectors: DaffSearchProductSelectors);
|
|
14
|
-
dispatch(action: Action): void;
|
|
15
|
-
}
|
package/state/page.module.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./core.module";
|
|
3
|
-
import * as i2 from "@daffodil/search/state";
|
|
4
|
-
import * as i3 from "@ngrx/effects";
|
|
5
|
-
export declare class DaffSearchProductPageStateModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageStateModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductPageStateModule, never, [typeof i1.DaffSearchProductStateCoreModule, typeof i2.DaffSearchPageStateModule, typeof i3.EffectsFeatureModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductPageStateModule>;
|
|
9
|
-
}
|
package/state/public_api.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './reducers/public_api';
|
|
2
|
-
export * from './selectors/public_api';
|
|
3
|
-
export * from './facades/public_api';
|
|
4
|
-
export * from './actions/product-collection.actions';
|
|
5
|
-
export { DaffSearchProductStateModule } from './state.module';
|
|
6
|
-
export { DaffSearchProductPageStateModule } from './page.module';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { DaffCollectionMetadata } from '@daffodil/core';
|
|
2
|
-
import { DaffSearchActions } from '@daffodil/search/state';
|
|
3
|
-
import { DaffSearchProductCollectionActions } from '../../actions/product-collection.actions';
|
|
4
|
-
export declare const daffSearchProductCollectionReducer: (state: DaffCollectionMetadata, action: DaffSearchActions | DaffSearchProductCollectionActions) => DaffCollectionMetadata;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffSearchReducerState } from '@daffodil/search/state';
|
|
2
|
-
import { DaffSearchProductCollectionActions } from '../../actions/product-collection.actions';
|
|
3
|
-
/**
|
|
4
|
-
* The reducer for handling apply product filters actions in the main search state.
|
|
5
|
-
*/
|
|
6
|
-
export declare function daffSearchProductCollectionSearchReducer(state: DaffSearchReducerState<import("@daffodil/search").DaffSearchResult>, action: DaffSearchProductCollectionActions): DaffSearchReducerState;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EntityState } from '@ngrx/entity';
|
|
2
|
-
import { DaffSearchActions } from '@daffodil/search/state';
|
|
3
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
4
|
-
/**
|
|
5
|
-
* Reducer function that catches actions and changes/overwrites search entities state.
|
|
6
|
-
*/
|
|
7
|
-
export declare function daffSearchProductEntitiesReducer<T extends DaffSearchProductResult = DaffSearchProductResult>(state: EntityState<T>, action: DaffSearchActions<T>): EntityState<T>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { daffSearchProductReducers } from './reducers';
|
|
2
|
-
export { DaffSearchProductReducersState, DaffSearchProductStateRootSlice, } from './reducers.interface';
|
|
3
|
-
export { DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY } from './store-feature-key';
|
|
4
|
-
export * from './collection/public_api';
|
|
5
|
-
export * from './product/public_api';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionReducerMap } from '@ngrx/store';
|
|
2
|
-
import { DaffSearchProductReducersState } from './reducers.interface';
|
|
3
|
-
/**
|
|
4
|
-
* The reducers for the entire search feature state.
|
|
5
|
-
*/
|
|
6
|
-
export declare const daffSearchProductReducers: ActionReducerMap<DaffSearchProductReducersState>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DaffCollectionMetadata } from '@daffodil/core';
|
|
2
|
-
import { DaffProductStateRootSlice } from '@daffodil/product/state';
|
|
3
|
-
import { DaffSearchStateRootSlice } from '@daffodil/search/state';
|
|
4
|
-
import { DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY } from './store-feature-key';
|
|
5
|
-
/**
|
|
6
|
-
* The feature state for search.
|
|
7
|
-
*/
|
|
8
|
-
export interface DaffSearchProductReducersState {
|
|
9
|
-
productCollection: DaffCollectionMetadata;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* The footprint of search feature state in the root application state.
|
|
13
|
-
*/
|
|
14
|
-
export interface DaffSearchProductStateRootSlice extends DaffSearchStateRootSlice, DaffProductStateRootSlice {
|
|
15
|
-
[DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY]: DaffSearchProductReducersState;
|
|
16
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DaffCollectionMemoizedSelectors } from '@daffodil/core/state';
|
|
2
|
-
import { DaffSearchProductStateRootSlice } from '../../reducers/public_api';
|
|
3
|
-
export declare const getSearchProductCollectionSelectors: () => DaffCollectionMemoizedSelectors<DaffSearchProductStateRootSlice>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MemoizedSelector } from '@ngrx/store';
|
|
2
|
-
import { DaffSearchProductStateRootSlice, DaffSearchProductReducersState } from '../reducers/public_api';
|
|
3
|
-
/**
|
|
4
|
-
* Selector for the search product feature state.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffSearchProductFeatureSelector {
|
|
7
|
-
selectSearchProductFeatureState: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductReducersState>;
|
|
8
|
-
}
|
|
9
|
-
export declare const getDaffSearchProductReducersStateSelector: () => DaffSearchProductFeatureSelector;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Dictionary } from '@ngrx/entity';
|
|
2
|
-
import { MemoizedSelector } from '@ngrx/store';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffSearchSelectors } from '@daffodil/search/state';
|
|
5
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
6
|
-
import { DaffSearchProductStateRootSlice } from '../reducers/public_api';
|
|
7
|
-
/**
|
|
8
|
-
* Selectors for product results on a search page.
|
|
9
|
-
*/
|
|
10
|
-
export interface DaffSearchProductSelectors {
|
|
11
|
-
/**
|
|
12
|
-
* Select the product search result IDs from the main search state.
|
|
13
|
-
*/
|
|
14
|
-
selectProductResultIds: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult['id']>>;
|
|
15
|
-
/**
|
|
16
|
-
* Select the product search results from the main product state.
|
|
17
|
-
*/
|
|
18
|
-
selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult>>;
|
|
19
|
-
}
|
|
20
|
-
export declare const daffSearchProductCreateSelectors: (selectSearchResultIds: DaffSearchSelectors["selectSearchResultIds"]) => {
|
|
21
|
-
selectProductResultIds: MemoizedSelector<import("@daffodil/search/state").DaffSearchStateRootSlice<import("@daffodil/search").DaffSearchResult>, string[], (s1: Record<string, string[]>) => string[]>;
|
|
22
|
-
selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductResult[], (s_0: string[], s_1: Dictionary<DaffProduct>) => DaffSearchProductResult[]>;
|
|
23
|
-
};
|
package/state/state.module.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./core.module";
|
|
3
|
-
export declare class DaffSearchProductStateModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateModule, never, [typeof i1.DaffSearchProductStateCoreModule], never>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateModule>;
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { DaffFilters } from '@daffodil/core';
|
|
4
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
5
|
-
import { DaffSearchProductFacadeInterface } from '@daffodil/search-product/state';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Mocks out facade fields and methods for testing purposes.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class MockDaffSearchProductFacade implements DaffSearchProductFacadeInterface {
|
|
13
|
-
filters$: BehaviorSubject<DaffFilters>;
|
|
14
|
-
appliedFilters$: BehaviorSubject<DaffFilters>;
|
|
15
|
-
productResults$: BehaviorSubject<DaffSearchProductResult[]>;
|
|
16
|
-
dispatch(action: Action): void;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffSearchProductFacade, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffSearchProductFacade>;
|
|
19
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Provides the {@link MockDaffSearchProductFacade} for {@link DaffSearchProductFacade}.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffSearchProductStateTestingModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateTestingModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateTestingModule, never, never, never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateTestingModule>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
-
import { DaffProductKindFactory } from '@daffodil/product/testing';
|
|
3
|
-
import { DaffSearchProductResult } from '@daffodil/search-product';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Factory for creating {@link DaffSearchProductResult}s.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffSearchProductResultFactory extends DaffModelFactory<DaffSearchProductResult> {
|
|
9
|
-
private productKindFactory;
|
|
10
|
-
constructor(productKindFactory: DaffProductKindFactory);
|
|
11
|
-
create(partial?: {}): DaffSearchProductResult;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductResultFactory, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductResultFactory>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffSearchProductResultFactory } from './product-search-result.factory';
|
package/testing/public_api.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Provides the default search result factory as a search result type factory.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffSearchProductTestingModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductTestingModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductTestingModule, never, never, never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductTestingModule>;
|
|
9
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffProduct } from '@daffodil/product';
|
|
2
|
-
import { DaffSearchProductResult } from '../models/public_api';
|
|
3
|
-
/**
|
|
4
|
-
* Transforms a list of products into a list of product search results.
|
|
5
|
-
*/
|
|
6
|
-
export declare const daffTransformProductsToSearchResults: <T extends DaffProduct = DaffProduct>(products: T[]) => DaffSearchProductResult<T>[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { daffTransformProductsToSearchResults } from './products-to-result';
|