@daffodil/search-product 0.94.1 → 0.95.1

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.
Files changed (34) hide show
  1. package/fesm2022/daffodil-search-product-driver-in-memory.mjs +112 -96
  2. package/fesm2022/daffodil-search-product-driver-in-memory.mjs.map +1 -1
  3. package/fesm2022/daffodil-search-product-driver-magento-2.4.7.mjs +337 -0
  4. package/fesm2022/daffodil-search-product-driver-magento-2.4.7.mjs.map +1 -0
  5. package/fesm2022/daffodil-search-product-driver-magento-auto.mjs +7 -0
  6. package/fesm2022/daffodil-search-product-driver-magento-auto.mjs.map +1 -0
  7. package/fesm2022/daffodil-search-product-driver-testing.mjs +54 -36
  8. package/fesm2022/daffodil-search-product-driver-testing.mjs.map +1 -1
  9. package/fesm2022/daffodil-search-product-driver.mjs +0 -4
  10. package/fesm2022/daffodil-search-product-routing.mjs +141 -71
  11. package/fesm2022/daffodil-search-product-routing.mjs.map +1 -1
  12. package/fesm2022/daffodil-search-product-state-testing.mjs +97 -55
  13. package/fesm2022/daffodil-search-product-state-testing.mjs.map +1 -1
  14. package/fesm2022/daffodil-search-product-state.mjs +477 -391
  15. package/fesm2022/daffodil-search-product-state.mjs.map +1 -1
  16. package/fesm2022/daffodil-search-product-testing.mjs +87 -52
  17. package/fesm2022/daffodil-search-product-testing.mjs.map +1 -1
  18. package/fesm2022/daffodil-search-product.mjs +6 -17
  19. package/fesm2022/daffodil-search-product.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/types/daffodil-search-product-driver-in-memory.d.ts +14 -11
  22. package/types/daffodil-search-product-driver-magento-2.4.7.d.ts +112 -0
  23. package/types/daffodil-search-product-driver-magento-auto.d.ts +1 -0
  24. package/types/daffodil-search-product-driver-testing.d.ts +14 -11
  25. package/types/daffodil-search-product-driver.d.ts +13 -19
  26. package/types/daffodil-search-product-routing.d.ts +17 -11
  27. package/types/daffodil-search-product-state-testing.d.ts +25 -21
  28. package/types/daffodil-search-product-state.d.ts +144 -152
  29. package/types/daffodil-search-product-testing.d.ts +21 -18
  30. package/types/daffodil-search-product.d.ts +6 -12
  31. package/fesm2022/daffodil-search-product-driver-magento.mjs +0 -333
  32. package/fesm2022/daffodil-search-product-driver-magento.mjs.map +0 -1
  33. package/fesm2022/daffodil-search-product-driver.mjs.map +0 -1
  34. package/types/daffodil-search-product-driver-magento.d.ts +0 -102
@@ -1,25 +1,19 @@
1
- import { Observable } from 'rxjs';
2
- import { DaffSearchResultCollection } from '@daffodil/search';
3
- import { DaffSearchDriverOptions, DaffSearchDriverResponse, DaffSearchDriverKindedInterface } from '@daffodil/search/driver';
4
- import { DaffSearchProductResult, DAFF_SEARCH_PRODUCT_RESULT_KIND } from '@daffodil/search-product';
5
- import { DaffCollectionRequest, DaffCollectionMetadata } from '@daffodil/core';
6
-
7
- interface DaffSearchProductDriverOptions extends DaffSearchDriverOptions, DaffCollectionRequest {
1
+ import { Observable } from "rxjs";
2
+ import { DaffSearchResultCollection } from "@daffodil/search";
3
+ import { DaffSearchDriverKindedInterface, DaffSearchDriverOptions, DaffSearchDriverResponse } from "@daffodil/search/driver";
4
+ import { DAFF_SEARCH_PRODUCT_RESULT_KIND, DaffSearchProductResult } from "@daffodil/search-product";
5
+ import { DaffCollectionMetadata, DaffCollectionRequest } from "@daffodil/core";
6
+ export interface DaffSearchProductDriverOptions extends DaffSearchDriverOptions, DaffCollectionRequest {}
7
+ export interface DaffSearchProductDriverResponse<T extends DaffSearchProductResult = DaffSearchProductResult> extends DaffSearchDriverResponse<T> {
8
+ metadata: DaffCollectionMetadata;
8
9
  }
9
-
10
- interface DaffSearchProductDriverResponse<T extends DaffSearchProductResult = DaffSearchProductResult> extends DaffSearchDriverResponse<T> {
11
- metadata: DaffCollectionMetadata;
12
- }
13
-
14
10
  /**
15
11
  * A driver interface for searching products.
16
12
  *
17
13
  * @inheritdoc
18
14
  */
19
- interface DaffSearchProductDriverInterface<T extends DaffSearchProductResult = DaffSearchProductResult> extends DaffSearchDriverKindedInterface<T> {
20
- readonly kind: typeof DAFF_SEARCH_PRODUCT_RESULT_KIND;
21
- search(query: string, options?: DaffSearchProductDriverOptions): Observable<DaffSearchProductDriverResponse<T>>;
22
- incremental(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchResultCollection<T>>;
23
- }
24
-
25
- export type { DaffSearchProductDriverInterface, DaffSearchProductDriverOptions, DaffSearchProductDriverResponse };
15
+ export interface DaffSearchProductDriverInterface<T extends DaffSearchProductResult = DaffSearchProductResult> extends DaffSearchDriverKindedInterface<T> {
16
+ readonly kind: typeof DAFF_SEARCH_PRODUCT_RESULT_KIND;
17
+ search(query: string, options?: DaffSearchProductDriverOptions): Observable<DaffSearchProductDriverResponse<T>>;
18
+ incremental(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchResultCollection<T>>;
19
+ }
@@ -1,12 +1,18 @@
1
- import * as i0 from '@angular/core';
2
- import * as i1 from '@daffodil/product/routing';
3
- import * as i2 from '@daffodil/search/routing';
4
- import * as i3 from '@ngrx/effects';
5
-
6
- declare class DaffSearchProductRoutingModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductRoutingModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductRoutingModule, never, [typeof i1.DaffProductRoutingModule, typeof i2.DaffSearchRoutingModule, typeof i3.EffectsFeatureModule], never>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductRoutingModule>;
1
+ import * as i0 from "@angular/core";
2
+ import { EnvironmentProviders } from "@angular/core";
3
+ import * as i1 from "@daffodil/product/routing";
4
+ import * as i2 from "@daffodil/search/routing";
5
+ import * as i3 from "@ngrx/effects";
6
+ /**
7
+ * @deprecated in favor of {@link provideDaffSearchProductRouting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
8
+ */
9
+ export declare class DaffSearchProductRoutingModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductRoutingModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductRoutingModule, never, [typeof i1.DaffProductRoutingModule, typeof i2.DaffSearchRoutingModule, typeof i3.EffectsFeatureModule], never>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductRoutingModule>;
10
13
  }
11
-
12
- export { DaffSearchProductRoutingModule };
14
+ /**
15
+ * Provides the `@daffodil/search-product/routing` effects and search routing options builder.
16
+ * Includes {@link provideDaffProductRouting} and {@link provideDaffSearchRouting}.
17
+ */
18
+ export declare const provideDaffSearchProductRouting: () => EnvironmentProviders;
@@ -1,31 +1,35 @@
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
-
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
+ import { EnvironmentProviders } from "@angular/core";
8
8
  /**
9
9
  * Mocks out facade fields and methods for testing purposes.
10
10
  *
11
11
  * @inheritdoc
12
12
  */
13
- declare class MockDaffSearchProductFacade implements DaffSearchProductFacadeInterface {
14
- filters$: BehaviorSubject<DaffFilters>;
15
- appliedFilters$: BehaviorSubject<DaffFilters>;
16
- productResults$: BehaviorSubject<DaffSearchProductResult[]>;
17
- dispatch(action: Action): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffSearchProductFacade, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffSearchProductFacade>;
13
+ export declare class MockDaffSearchProductFacade implements DaffSearchProductFacadeInterface {
14
+ filters$: BehaviorSubject<DaffFilters>;
15
+ appliedFilters$: BehaviorSubject<DaffFilters>;
16
+ productResults$: BehaviorSubject<DaffSearchProductResult[]>;
17
+ dispatch(action: Action): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffSearchProductFacade, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
20
20
  }
21
-
22
21
  /**
23
22
  * Provides the {@link MockDaffSearchProductFacade} for {@link DaffSearchProductFacade}.
23
+ *
24
+ * @deprecated in favor of {@link provideDaffSearchProductStateTesting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
24
25
  */
25
- declare class DaffSearchProductStateTestingModule {
26
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateTestingModule, never>;
27
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateTestingModule, never, never, never>;
28
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateTestingModule>;
26
+ export declare class DaffSearchProductStateTestingModule {
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateTestingModule, never>;
28
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateTestingModule, never, never, never>;
29
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateTestingModule>;
29
30
  }
30
-
31
- export { DaffSearchProductStateTestingModule, MockDaffSearchProductFacade };
31
+ /**
32
+ * Provides the {@link MockDaffSearchProductFacade} for {@link DaffSearchProductPageFacade} and {@link DaffSearchProductIncrementalFacade},
33
+ * and the {@link MockDaffCollectionFacade} for {@link DaffSearchProductCollectionFacade}.
34
+ */
35
+ export declare const provideDaffSearchProductStateTesting: () => EnvironmentProviders;
@@ -1,249 +1,241 @@
1
- import * as i1 from '@ngrx/store';
2
- import { ActionReducerMap, MemoizedSelector, Action, Store } from '@ngrx/store';
3
- import { DaffCollectionMetadata, DaffFilterRequest, DaffFilterToggleRequest, DaffCollectionRequest } from '@daffodil/core';
4
- import * as i2 from '@daffodil/product/state';
5
- import { DaffProductStateRootSlice, DaffProductReducersState } from '@daffodil/product/state';
6
- import * as _daffodil_search_state from '@daffodil/search/state';
7
- import { DaffSearchStateRootSlice, DaffSearchReducerState, DaffSearchReducersState, DaffSearchActions, DaffSearchSelectors } from '@daffodil/search/state';
8
- import * as _daffodil_search_types_daffodil_search from '@daffodil/search/types/daffodil-search';
9
- import { DaffCollectionReplaceFilters, DaffCollectionApplyFilters, DaffCollectionRemoveFilters, DaffCollectionClearFilters, DaffCollectionToggleFilter, DaffCollectionChangePageSize, DaffCollectionChangeCurrentPage, DaffCollectionChangeSortingOption, DaffCollectionMemoizedSelectors, DaffStoreFacade, DaffCollectionFacade, DaffCollectionFacadeInterface } from '@daffodil/core/state';
10
- import { EntityState, Dictionary } from '@ngrx/entity';
11
- import { DaffSearchProductResult } from '@daffodil/search-product';
12
- import { DaffProduct } from '@daffodil/product';
13
- import { Observable } from 'rxjs';
14
- import * as i0 from '@angular/core';
15
- import * as i3 from '@ngrx/effects';
16
-
1
+ import * as i1 from "@ngrx/store";
2
+ import { Action, ActionReducerMap, MemoizedSelector, Store } from "@ngrx/store";
3
+ import { DaffCollectionMetadata, DaffCollectionRequest, DaffFilterRequest, DaffFilterToggleRequest } from "@daffodil/core";
4
+ import * as i2 from "@daffodil/product/state";
5
+ import { DaffProductReducersState, DaffProductStateRootSlice } from "@daffodil/product/state";
6
+ import * as i3$1 from "@daffodil/search/state";
7
+ import { DaffSearchActions, DaffSearchReducerState, DaffSearchReducersState, DaffSearchSelectors, DaffSearchStateRootSlice } from "@daffodil/search/state";
8
+ import { DaffCollectionApplyFilters, DaffCollectionChangeCurrentPage, DaffCollectionChangePageSize, DaffCollectionChangeSortingOption, DaffCollectionClearFilters, DaffCollectionFacade, DaffCollectionFacadeInterface, DaffCollectionMemoizedSelectors, DaffCollectionRemoveFilters, DaffCollectionReplaceFilters, DaffCollectionToggleFilter, DaffStoreFacade } from "@daffodil/core/state";
9
+ import { Dictionary, EntityState } from "@ngrx/entity";
10
+ import { DaffSearchProductResult } from "@daffodil/search-product";
11
+ import { DaffProduct } from "@daffodil/product";
12
+ import { Observable } from "rxjs";
13
+ import * as i0 from "@angular/core";
14
+ import { EnvironmentProviders } from "@angular/core";
15
+ import * as i3 from "@ngrx/effects";
17
16
  /**
18
17
  * The key under which the search feature state will be stored.
19
18
  */
20
- declare const DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY = "daffSearchProduct";
21
-
19
+ export declare const DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY = "daffSearchProduct";
22
20
  /**
23
21
  * The feature state for search.
24
22
  */
25
- interface DaffSearchProductReducersState {
26
- productCollection: DaffCollectionMetadata;
23
+ export interface DaffSearchProductReducersState {
24
+ productCollection: DaffCollectionMetadata;
27
25
  }
28
26
  /**
29
27
  * The footprint of search feature state in the root application state.
30
28
  */
31
- interface DaffSearchProductStateRootSlice extends DaffSearchStateRootSlice, DaffProductStateRootSlice {
32
- [DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY]: DaffSearchProductReducersState;
29
+ export interface DaffSearchProductStateRootSlice extends DaffSearchStateRootSlice, DaffProductStateRootSlice {
30
+ [DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY]: DaffSearchProductReducersState;
33
31
  }
34
-
35
32
  /**
36
33
  * The reducers for the entire search feature state.
37
34
  */
38
- declare const daffSearchProductReducers: ActionReducerMap<DaffSearchProductReducersState>;
39
-
35
+ export declare const daffSearchProductReducers: ActionReducerMap<DaffSearchProductReducersState>;
40
36
  /**
41
37
  * The search action types enum.
42
38
  */
43
- declare enum DaffSearchProductCollectionActionTypes {
44
- SearchProductReplaceFiltersAction = "[@daffodil/search-product] Search Product Replace Filters Action",
45
- SearchProductApplyFiltersAction = "[@daffodil/search-product] Search Product Apply Filters Action",
46
- SearchProductRemoveFiltersAction = "[@daffodil/search-product] Search Product Remove Filters Action",
47
- SearchProductClearFiltersAction = "[@daffodil/search-product] Search Product Clear Filters Action",
48
- SearchProductToggleFiltersAction = "[@daffodil/search-product] Search Product Toggle Filters Action",
49
- SearchProductChangePageSizeAction = "[@daffodil/search-product] Search Product Change Page Size Action",
50
- SearchProductChangeCurrentPageAction = "[@daffodil/search-product] Search Product Change Current Page Action",
51
- SearchProductChangeSortingOptionAction = "[@daffodil/search-product] Search Product Change Sorting Option Action"
39
+ export declare enum DaffSearchProductCollectionActionTypes {
40
+ SearchProductReplaceFiltersAction = "[@daffodil/search-product] Search Product Replace Filters Action",
41
+ SearchProductApplyFiltersAction = "[@daffodil/search-product] Search Product Apply Filters Action",
42
+ SearchProductRemoveFiltersAction = "[@daffodil/search-product] Search Product Remove Filters Action",
43
+ SearchProductClearFiltersAction = "[@daffodil/search-product] Search Product Clear Filters Action",
44
+ SearchProductToggleFiltersAction = "[@daffodil/search-product] Search Product Toggle Filters Action",
45
+ SearchProductChangePageSizeAction = "[@daffodil/search-product] Search Product Change Page Size Action",
46
+ SearchProductChangeCurrentPageAction = "[@daffodil/search-product] Search Product Change Current Page Action",
47
+ SearchProductChangeSortingOptionAction = "[@daffodil/search-product] Search Product Change Sorting Option Action"
52
48
  }
53
49
  /**
54
50
  * @inheritdoc
55
51
  * @role action
56
52
  */
57
- declare class DaffSearchProductCollectionReplaceFilters implements DaffCollectionReplaceFilters {
58
- filters: DaffFilterRequest[];
59
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction;
60
- constructor(filters: DaffFilterRequest[]);
53
+ export declare class DaffSearchProductCollectionReplaceFilters implements DaffCollectionReplaceFilters {
54
+ filters: DaffFilterRequest[];
55
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction;
56
+ constructor(filters: DaffFilterRequest[]);
61
57
  }
62
58
  /**
63
59
  * @inheritdoc
64
60
  * @role action
65
61
  */
66
- declare class DaffSearchProductCollectionApplyFilters implements DaffCollectionApplyFilters {
67
- filters: DaffFilterRequest[];
68
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction;
69
- constructor(filters: DaffFilterRequest[]);
62
+ export declare class DaffSearchProductCollectionApplyFilters implements DaffCollectionApplyFilters {
63
+ filters: DaffFilterRequest[];
64
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction;
65
+ constructor(filters: DaffFilterRequest[]);
70
66
  }
71
67
  /**
72
68
  * @inheritdoc
73
69
  * @role action
74
70
  */
75
- declare class DaffSearchProductCollectionRemoveFilters implements DaffCollectionRemoveFilters {
76
- filters: DaffFilterRequest[];
77
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction;
78
- constructor(filters: DaffFilterRequest[]);
71
+ export declare class DaffSearchProductCollectionRemoveFilters implements DaffCollectionRemoveFilters {
72
+ filters: DaffFilterRequest[];
73
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction;
74
+ constructor(filters: DaffFilterRequest[]);
79
75
  }
80
76
  /**
81
77
  * @inheritdoc
82
78
  * @role action
83
79
  */
84
- declare class DaffSearchProductCollectionClearFilters implements DaffCollectionClearFilters {
85
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction;
80
+ export declare class DaffSearchProductCollectionClearFilters implements DaffCollectionClearFilters {
81
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction;
86
82
  }
87
83
  /**
88
84
  * @inheritdoc
89
85
  * @role action
90
86
  */
91
- declare class DaffSearchProductCollectionToggleFilter implements DaffCollectionToggleFilter {
92
- filter: DaffFilterToggleRequest;
93
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction;
94
- constructor(filter: DaffFilterToggleRequest);
87
+ export declare class DaffSearchProductCollectionToggleFilter implements DaffCollectionToggleFilter {
88
+ filter: DaffFilterToggleRequest;
89
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction;
90
+ constructor(filter: DaffFilterToggleRequest);
95
91
  }
96
92
  /**
97
93
  * @inheritdoc
98
94
  * @role action
99
95
  */
100
- declare class DaffSearchProductCollectionChangePageSize implements DaffCollectionChangePageSize {
101
- pageSize: number;
102
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction;
103
- constructor(pageSize: number);
96
+ export declare class DaffSearchProductCollectionChangePageSize implements DaffCollectionChangePageSize {
97
+ pageSize: number;
98
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction;
99
+ constructor(pageSize: number);
104
100
  }
105
101
  /**
106
102
  * @inheritdoc
107
103
  * @role action
108
104
  */
109
- declare class DaffSearchProductCollectionChangeCurrentPage implements DaffCollectionChangeCurrentPage {
110
- currentPage: number;
111
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction;
112
- constructor(currentPage: number);
105
+ export declare class DaffSearchProductCollectionChangeCurrentPage implements DaffCollectionChangeCurrentPage {
106
+ currentPage: number;
107
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction;
108
+ constructor(currentPage: number);
113
109
  }
114
110
  /**
115
111
  * @inheritdoc
116
112
  * @role action
117
113
  */
118
- declare class DaffSearchProductCollectionChangeSortingOption implements DaffCollectionChangeSortingOption {
119
- sort: {
120
- option: DaffCollectionRequest['appliedSortOption'];
121
- direction: DaffCollectionRequest['appliedSortDirection'];
122
- };
123
- readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction;
124
- constructor(sort: {
125
- option: DaffCollectionRequest['appliedSortOption'];
126
- direction: DaffCollectionRequest['appliedSortDirection'];
127
- });
114
+ export declare class DaffSearchProductCollectionChangeSortingOption implements DaffCollectionChangeSortingOption {
115
+ sort: {
116
+ option: DaffCollectionRequest['appliedSortOption'];
117
+ direction: DaffCollectionRequest['appliedSortDirection'];
118
+ };
119
+ readonly type = DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction;
120
+ constructor(sort: {
121
+ option: DaffCollectionRequest['appliedSortOption'];
122
+ direction: DaffCollectionRequest['appliedSortDirection'];
123
+ });
128
124
  }
129
125
  /**
130
126
  * A union of the search product action types.
131
127
  */
132
- type DaffSearchProductCollectionActions = DaffSearchProductCollectionReplaceFilters | DaffSearchProductCollectionApplyFilters | DaffSearchProductCollectionRemoveFilters | DaffSearchProductCollectionClearFilters | DaffSearchProductCollectionToggleFilter | DaffSearchProductCollectionChangePageSize | DaffSearchProductCollectionChangeCurrentPage | DaffSearchProductCollectionChangeSortingOption;
133
-
128
+ export type DaffSearchProductCollectionActions = DaffSearchProductCollectionReplaceFilters | DaffSearchProductCollectionApplyFilters | DaffSearchProductCollectionRemoveFilters | DaffSearchProductCollectionClearFilters | DaffSearchProductCollectionToggleFilter | DaffSearchProductCollectionChangePageSize | DaffSearchProductCollectionChangeCurrentPage | DaffSearchProductCollectionChangeSortingOption;
134
129
  /**
135
130
  * The reducer for handling apply product filters actions in the main search state.
136
131
  */
137
- declare function daffSearchProductCollectionSearchReducer(state: DaffSearchReducerState<_daffodil_search_types_daffodil_search.DaffSearchResult>, action: DaffSearchProductCollectionActions): DaffSearchReducerState;
138
-
139
- declare const daffSearchProductCollectionSearchReducers: ActionReducerMap<DaffSearchReducersState>;
140
-
141
- declare const daffSearchProductCollectionReducer: (state: DaffCollectionMetadata, action: DaffSearchActions | DaffSearchProductCollectionActions) => DaffCollectionMetadata;
142
-
132
+ export declare function daffSearchProductCollectionSearchReducer(state: DaffSearchReducerState<import("@daffodil/search/types/daffodil-search").DaffSearchResult>, action: DaffSearchProductCollectionActions): DaffSearchReducerState;
133
+ export declare const daffSearchProductCollectionSearchReducers: ActionReducerMap<DaffSearchReducersState>;
134
+ export declare const daffSearchProductCollectionReducer: (state: DaffCollectionMetadata, action: DaffSearchActions | DaffSearchProductCollectionActions) => DaffCollectionMetadata;
143
135
  /**
144
136
  * Reducer function that catches actions and changes/overwrites search entities state.
145
137
  */
146
- declare function daffSearchProductEntitiesReducer<T extends DaffSearchProductResult = DaffSearchProductResult>(state: EntityState<T>, action: DaffSearchActions<T>): EntityState<T>;
147
-
148
- declare const daffSearchProductProductReducers: ActionReducerMap<DaffProductReducersState>;
149
-
150
- declare const getSearchProductCollectionSelectors: () => DaffCollectionMemoizedSelectors<DaffSearchProductStateRootSlice>;
151
-
138
+ export declare function daffSearchProductEntitiesReducer<T extends DaffSearchProductResult = DaffSearchProductResult>(state: EntityState<T>, action: DaffSearchActions<T>): EntityState<T>;
139
+ export declare const daffSearchProductProductReducers: ActionReducerMap<DaffProductReducersState>;
140
+ export declare const getSearchProductCollectionSelectors: () => DaffCollectionMemoizedSelectors<DaffSearchProductStateRootSlice>;
152
141
  /**
153
142
  * Selectors for product results on a search page.
154
143
  */
155
- interface DaffSearchProductSelectors {
156
- /**
157
- * Select the product search result IDs from the main search state.
158
- */
159
- selectProductResultIds: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult['id']>>;
160
- /**
161
- * Select the product search results from the main product state.
162
- */
163
- selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult>>;
164
- }
165
- declare const daffSearchProductCreateSelectors: (selectSearchResultIds: DaffSearchSelectors["selectSearchResultIds"]) => {
166
- selectProductResultIds: MemoizedSelector<_daffodil_search_state.DaffSearchStateRootSlice<_daffodil_search_types_daffodil_search.DaffSearchResult>, string[], (s1: Record<string, string[]>) => string[]>;
167
- selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductResult[], (s_0: string[], s_1: Dictionary<DaffProduct>) => DaffSearchProductResult[]>;
144
+ export interface DaffSearchProductSelectors {
145
+ /**
146
+ * Select the product search result IDs from the main search state.
147
+ */
148
+ selectProductResultIds: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult['id']>>;
149
+ /**
150
+ * Select the product search results from the main product state.
151
+ */
152
+ selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, Array<DaffSearchProductResult>>;
153
+ }
154
+ export declare const daffSearchProductCreateSelectors: (selectSearchResultIds: DaffSearchSelectors["selectSearchResultIds"]) => {
155
+ selectProductResultIds: MemoizedSelector<import("@daffodil/search/state").DaffSearchStateRootSlice<import("@daffodil/search/types/daffodil-search").DaffSearchResult>, string[], (s1: Record<string, string[]>) => string[]>;
156
+ selectProductResults: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductResult[], (s_0: string[], s_1: Dictionary<DaffProduct>) => DaffSearchProductResult[]>;
168
157
  };
169
-
170
- declare const daffSearchProductGetPageSelectors: () => DaffSearchProductSelectors;
171
-
172
- declare const daffSearchProductGetIncrementalSelectors: () => DaffSearchProductSelectors;
173
-
158
+ export declare const daffSearchProductGetPageSelectors: () => DaffSearchProductSelectors;
159
+ export declare const daffSearchProductGetIncrementalSelectors: () => DaffSearchProductSelectors;
174
160
  /**
175
161
  * Selector for the search product feature state.
176
162
  */
177
- interface DaffSearchProductFeatureSelector {
178
- selectSearchProductFeatureState: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductReducersState>;
163
+ export interface DaffSearchProductFeatureSelector {
164
+ selectSearchProductFeatureState: MemoizedSelector<DaffSearchProductStateRootSlice, DaffSearchProductReducersState>;
179
165
  }
180
- declare const getDaffSearchProductReducersStateSelector: () => DaffSearchProductFeatureSelector;
181
-
166
+ export declare const getDaffSearchProductReducersStateSelector: () => DaffSearchProductFeatureSelector;
182
167
  /**
183
168
  * Exposes the search state selectors.
184
169
  */
185
- interface DaffSearchProductFacadeInterface extends DaffStoreFacade<Action> {
186
- /**
187
- * The products returned in the most recent search.
188
- */
189
- productResults$: Observable<Array<DaffSearchProductResult>>;
170
+ export interface DaffSearchProductFacadeInterface extends DaffStoreFacade<Action> {
171
+ /**
172
+ * The products returned in the most recent search.
173
+ */
174
+ productResults$: Observable<Array<DaffSearchProductResult>>;
190
175
  }
191
-
192
176
  /**
193
177
  * @inheritdoc
194
178
  */
195
- declare abstract class DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
196
- private store;
197
- productResults$: Observable<Array<DaffSearchProductResult>>;
198
- constructor(store: Store<DaffSearchProductStateRootSlice>, selectors: DaffSearchProductSelectors);
199
- dispatch(action: Action): void;
179
+ export declare abstract class DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
180
+ private store;
181
+ productResults$: Observable<Array<DaffSearchProductResult>>;
182
+ constructor(store: Store<DaffSearchProductStateRootSlice>, selectors: DaffSearchProductSelectors);
183
+ dispatch(action: Action): void;
200
184
  }
201
-
202
185
  /**
203
186
  * @inheritdoc
204
187
  *
205
188
  * A facade for the normal search state.
206
189
  */
207
- declare class DaffSearchProductPageFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
208
- constructor(store: Store<DaffSearchProductStateRootSlice>);
209
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageFacade, never>;
210
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductPageFacade>;
190
+ export declare class DaffSearchProductPageFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
191
+ constructor(store: Store<DaffSearchProductStateRootSlice>);
192
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageFacade, never>;
193
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
211
194
  }
212
-
213
195
  /**
214
196
  * @inheritdoc
215
197
  *
216
198
  * A facade for the normal search state.
217
199
  */
218
- declare class DaffSearchProductIncrementalFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
219
- constructor(store: Store<DaffSearchProductStateRootSlice>);
220
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductIncrementalFacade, never>;
221
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductIncrementalFacade>;
200
+ export declare class DaffSearchProductIncrementalFacade extends DaffSearchProductFacade implements DaffSearchProductFacadeInterface {
201
+ constructor(store: Store<DaffSearchProductStateRootSlice>);
202
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductIncrementalFacade, never>;
203
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
222
204
  }
223
-
224
- declare class DaffSearchProductCollectionFacade extends DaffCollectionFacade<DaffSearchProductStateRootSlice> implements DaffCollectionFacadeInterface {
225
- constructor(store: Store<DaffSearchProductStateRootSlice>);
226
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductCollectionFacade, never>;
227
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductCollectionFacade>;
205
+ export declare class DaffSearchProductCollectionFacade extends DaffCollectionFacade<DaffSearchProductStateRootSlice> implements DaffCollectionFacadeInterface {
206
+ constructor(store: Store<DaffSearchProductStateRootSlice>);
207
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductCollectionFacade, never>;
208
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
228
209
  }
229
-
230
210
  declare class DaffSearchProductStateCoreModule {
231
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateCoreModule, never>;
232
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateCoreModule, never, [typeof i1.StoreFeatureModule, typeof i2.DaffProductStateModule, typeof _daffodil_search_state.DaffSearchStateModule], never>;
233
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateCoreModule>;
234
- }
235
-
236
- declare class DaffSearchProductStateModule {
237
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateModule, never>;
238
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateModule, never, [typeof DaffSearchProductStateCoreModule], never>;
239
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateModule>;
240
- }
241
-
242
- declare class DaffSearchProductPageStateModule {
243
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageStateModule, never>;
244
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductPageStateModule, never, [typeof DaffSearchProductStateCoreModule, typeof _daffodil_search_state.DaffSearchPageStateModule, typeof i3.EffectsFeatureModule], never>;
245
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductPageStateModule>;
246
- }
247
-
248
- export { DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, DaffSearchProductCollectionActionTypes, DaffSearchProductCollectionApplyFilters, DaffSearchProductCollectionChangeCurrentPage, DaffSearchProductCollectionChangePageSize, DaffSearchProductCollectionChangeSortingOption, DaffSearchProductCollectionClearFilters, DaffSearchProductCollectionFacade, DaffSearchProductCollectionRemoveFilters, DaffSearchProductCollectionReplaceFilters, DaffSearchProductCollectionToggleFilter, DaffSearchProductFacade, DaffSearchProductIncrementalFacade, DaffSearchProductPageFacade, DaffSearchProductPageStateModule, DaffSearchProductStateModule, daffSearchProductCollectionReducer, daffSearchProductCollectionSearchReducer, daffSearchProductCollectionSearchReducers, daffSearchProductCreateSelectors, daffSearchProductEntitiesReducer, daffSearchProductGetIncrementalSelectors, daffSearchProductGetPageSelectors, daffSearchProductProductReducers, daffSearchProductReducers, getDaffSearchProductReducersStateSelector, getSearchProductCollectionSelectors };
249
- export type { DaffSearchProductCollectionActions, DaffSearchProductFacadeInterface, DaffSearchProductFeatureSelector, DaffSearchProductReducersState, DaffSearchProductSelectors, DaffSearchProductStateRootSlice };
211
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateCoreModule, never>;
212
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateCoreModule, never, [typeof i1.StoreFeatureModule, typeof i2.DaffProductStateModule, typeof i3$1.DaffSearchStateModule], never>;
213
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateCoreModule>;
214
+ }
215
+ /**
216
+ * @deprecated in favor of {@link provideDaffSearchProductState} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
217
+ */
218
+ export declare class DaffSearchProductStateModule {
219
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductStateModule, never>;
220
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductStateModule, never, [typeof DaffSearchProductStateCoreModule], never>;
221
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductStateModule>;
222
+ }
223
+ /**
224
+ * @deprecated in favor of {@link provideDaffSearchProductPageState} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
225
+ */
226
+ export declare class DaffSearchProductPageStateModule {
227
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductPageStateModule, never>;
228
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductPageStateModule, never, [typeof DaffSearchProductStateCoreModule, typeof i3$1.DaffSearchPageStateModule, typeof i3.EffectsFeatureModule], never>;
229
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductPageStateModule>;
230
+ }
231
+ /**
232
+ * Provides the search product state.
233
+ * Includes {@link provideDaffProductState} and {@link provideDaffSearchState}.
234
+ */
235
+ export declare const provideDaffSearchProductState: () => EnvironmentProviders;
236
+ /**
237
+ * Provides the search product state and the search product page effects.
238
+ * Includes {@link provideDaffProductState}, {@link provideDaffSearchState}, and {@link provideDaffSearchPageState}.
239
+ */
240
+ export declare const provideDaffSearchProductPageState: () => EnvironmentProviders;
241
+ export {};
@@ -1,26 +1,29 @@
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
-
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
+ import { EnvironmentProviders } from "@angular/core";
6
6
  /**
7
7
  * Factory for creating {@link DaffSearchProductResult}s.
8
8
  */
9
- declare class DaffSearchProductResultFactory extends DaffModelFactory<DaffSearchProductResult> {
10
- private productKindFactory;
11
- constructor(productKindFactory: DaffProductKindFactory);
12
- create(partial?: {}): DaffSearchProductResult;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductResultFactory, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchProductResultFactory>;
9
+ export declare class DaffSearchProductResultFactory extends DaffModelFactory<DaffSearchProductResult> {
10
+ private productKindFactory;
11
+ constructor(productKindFactory: DaffProductKindFactory);
12
+ create(partial?: {}): DaffSearchProductResult;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductResultFactory, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
15
15
  }
16
-
17
16
  /**
18
17
  * Provides the default search result factory as a search result type factory.
18
+ *
19
+ * @deprecated in favor of {@link provideDaffSearchProductTesting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
19
20
  */
20
- declare class DaffSearchProductTestingModule {
21
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductTestingModule, never>;
22
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductTestingModule, never, never, never>;
23
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductTestingModule>;
21
+ export declare class DaffSearchProductTestingModule {
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchProductTestingModule, never>;
23
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchProductTestingModule, never, never, never>;
24
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchProductTestingModule>;
24
25
  }
25
-
26
- export { DaffSearchProductResultFactory, DaffSearchProductTestingModule };
26
+ /**
27
+ * Provides the default search result factory as a search result type factory.
28
+ */
29
+ export declare const provideDaffSearchProductTesting: () => EnvironmentProviders;
@@ -1,22 +1,16 @@
1
- import { DaffProduct } from '@daffodil/product';
2
- import { DaffSearchResult } from '@daffodil/search';
3
-
1
+ import { DaffProduct } from "@daffodil/product";
2
+ import { DaffSearchResult } from "@daffodil/search";
4
3
  /**
5
4
  * The kind identifier for product search results.
6
5
  */
7
- declare const DAFF_SEARCH_PRODUCT_RESULT_KIND: DaffSearchResult['kind'];
8
-
6
+ export declare const DAFF_SEARCH_PRODUCT_RESULT_KIND: DaffSearchResult['kind'];
9
7
  /**
10
8
  * An extension of a {@link DaffSearchResult} for products.
11
9
  */
12
- type DaffSearchProductResult<T extends DaffProduct = DaffProduct> = DaffSearchResult & T & {
13
- kind: typeof DAFF_SEARCH_PRODUCT_RESULT_KIND;
10
+ export type DaffSearchProductResult<T extends DaffProduct = DaffProduct> = DaffSearchResult & T & {
11
+ kind: typeof DAFF_SEARCH_PRODUCT_RESULT_KIND;
14
12
  };
15
-
16
13
  /**
17
14
  * Transforms a list of products into a list of product search results.
18
15
  */
19
- declare const daffTransformProductsToSearchResults: <T extends DaffProduct = DaffProduct>(products: T[]) => DaffSearchProductResult<T>[];
20
-
21
- export { DAFF_SEARCH_PRODUCT_RESULT_KIND, daffTransformProductsToSearchResults };
22
- export type { DaffSearchProductResult };
16
+ export declare const daffTransformProductsToSearchResults: <T extends DaffProduct = DaffProduct>(products: T[]) => DaffSearchProductResult<T>[];