@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,411 +1,497 @@
1
- import * as i3 from '@daffodil/search/state';
2
- import { daffSearchInitialState, DaffSearchActionTypes, daffSearchGetPageSelectors, daffSearchGetIncrementalSelectors, DaffSearchStateModule, daffSearchProvideExtraReducers, DaffSearchLoadSuccess, DaffSearchLoadFailure, DAFF_SEARCH_ERROR_MATCHER, DaffSearchPageStateModule } from '@daffodil/search/state';
3
- import { daffIdentityReducer, daffCollectionReducerInitialState, getCollectionStateAdapter, daffCollectionSelectorFactory, DaffCollectionFacade } from '@daffodil/core/state';
4
- import { daffToggleRequestOnFilters, daffRemoveRequestsFromFilters, daffClearFilters, daffApplyRequestsToFilters, daffCollectionBuildRequestFromMetadata } from '@daffodil/core';
5
- import { daffProductEntitiesAdapter, getDaffProductSelectors, DaffProductStateModule, daffProductProvideExtraReducers } from '@daffodil/product/state';
6
- import { DAFF_SEARCH_PRODUCT_RESULT_KIND } from '@daffodil/search-product';
7
- import * as i1 from '@ngrx/store';
8
- import { defaultMemoize, createFeatureSelector, createSelector, select, StoreModule, combineReducers } from '@ngrx/store';
9
- import * as i0 from '@angular/core';
10
- import { Injectable, NgModule, Inject } from '@angular/core';
11
- import * as i1$1 from '@ngrx/effects';
12
- import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
13
- import { asyncScheduler, of } from 'rxjs';
14
- import { withLatestFrom, map, throttleTime, switchMap, catchError } from 'rxjs/operators';
15
- import { DaffSearchDriver } from '@daffodil/search/driver';
16
-
17
- /**
18
- * The search action types enum.
19
- */
1
+ import * as i3 from "@daffodil/search/state";
2
+ import { DAFF_SEARCH_ERROR_MATCHER, DaffSearchActionTypes, DaffSearchLoadFailure, DaffSearchLoadSuccess, DaffSearchPageStateModule, DaffSearchStateModule, daffSearchGetIncrementalSelectors, daffSearchGetPageSelectors, daffSearchInitialState, daffSearchProvideExtraReducers, provideDaffSearchPageState, provideDaffSearchState } from "@daffodil/search/state";
3
+ import { DaffCollectionFacade, daffCollectionReducerInitialState, daffCollectionSelectorFactory, daffIdentityReducer, getCollectionStateAdapter } from "@daffodil/core/state";
4
+ import { daffApplyRequestsToFilters, daffClearFilters, daffCollectionBuildRequestFromMetadata, daffRemoveRequestsFromFilters, daffToggleRequestOnFilters } from "@daffodil/core";
5
+ import { DaffProductStateModule, daffProductEntitiesAdapter, daffProductProvideExtraReducers, getDaffProductSelectors, provideDaffProductState } from "@daffodil/product/state";
6
+ import { DAFF_SEARCH_PRODUCT_RESULT_KIND } from "@daffodil/search-product";
7
+ import * as i1$1 from "@ngrx/store";
8
+ import { StoreModule, combineReducers, createFeatureSelector, createSelector, defaultMemoize, provideState, select } from "@ngrx/store";
9
+ import * as i0 from "@angular/core";
10
+ import { Inject, Injectable, NgModule, makeEnvironmentProviders } from "@angular/core";
11
+ import * as i1 from "@ngrx/effects";
12
+ import { EffectsModule, createEffect, ofType, provideEffects } from "@ngrx/effects";
13
+ import { asyncScheduler, of } from "rxjs";
14
+ import { catchError, map, switchMap, throttleTime, withLatestFrom } from "rxjs/operators";
15
+ import { DaffSearchDriver } from "@daffodil/search/driver";
20
16
  var DaffSearchProductCollectionActionTypes;
21
- (function (DaffSearchProductCollectionActionTypes) {
22
- DaffSearchProductCollectionActionTypes["SearchProductReplaceFiltersAction"] = "[@daffodil/search-product] Search Product Replace Filters Action";
23
- DaffSearchProductCollectionActionTypes["SearchProductApplyFiltersAction"] = "[@daffodil/search-product] Search Product Apply Filters Action";
24
- DaffSearchProductCollectionActionTypes["SearchProductRemoveFiltersAction"] = "[@daffodil/search-product] Search Product Remove Filters Action";
25
- DaffSearchProductCollectionActionTypes["SearchProductClearFiltersAction"] = "[@daffodil/search-product] Search Product Clear Filters Action";
26
- DaffSearchProductCollectionActionTypes["SearchProductToggleFiltersAction"] = "[@daffodil/search-product] Search Product Toggle Filters Action";
27
- DaffSearchProductCollectionActionTypes["SearchProductChangePageSizeAction"] = "[@daffodil/search-product] Search Product Change Page Size Action";
28
- DaffSearchProductCollectionActionTypes["SearchProductChangeCurrentPageAction"] = "[@daffodil/search-product] Search Product Change Current Page Action";
29
- DaffSearchProductCollectionActionTypes["SearchProductChangeSortingOptionAction"] = "[@daffodil/search-product] Search Product Change Sorting Option Action";
17
+ (function(DaffSearchProductCollectionActionTypes) {
18
+ DaffSearchProductCollectionActionTypes["SearchProductReplaceFiltersAction"] = "[@daffodil/search-product] Search Product Replace Filters Action";
19
+ DaffSearchProductCollectionActionTypes["SearchProductApplyFiltersAction"] = "[@daffodil/search-product] Search Product Apply Filters Action";
20
+ DaffSearchProductCollectionActionTypes["SearchProductRemoveFiltersAction"] = "[@daffodil/search-product] Search Product Remove Filters Action";
21
+ DaffSearchProductCollectionActionTypes["SearchProductClearFiltersAction"] = "[@daffodil/search-product] Search Product Clear Filters Action";
22
+ DaffSearchProductCollectionActionTypes["SearchProductToggleFiltersAction"] = "[@daffodil/search-product] Search Product Toggle Filters Action";
23
+ DaffSearchProductCollectionActionTypes["SearchProductChangePageSizeAction"] = "[@daffodil/search-product] Search Product Change Page Size Action";
24
+ DaffSearchProductCollectionActionTypes["SearchProductChangeCurrentPageAction"] = "[@daffodil/search-product] Search Product Change Current Page Action";
25
+ DaffSearchProductCollectionActionTypes["SearchProductChangeSortingOptionAction"] = "[@daffodil/search-product] Search Product Change Sorting Option Action";
30
26
  })(DaffSearchProductCollectionActionTypes || (DaffSearchProductCollectionActionTypes = {}));
31
- /**
32
- * @inheritdoc
33
- * @role action
34
- */
35
- class DaffSearchProductCollectionReplaceFilters {
36
- constructor(filters) {
37
- this.filters = filters;
38
- this.type = DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction;
39
- }
40
- }
41
- /**
42
- * @inheritdoc
43
- * @role action
44
- */
45
- class DaffSearchProductCollectionApplyFilters {
46
- constructor(filters) {
47
- this.filters = filters;
48
- this.type = DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction;
49
- }
50
- }
51
- /**
52
- * @inheritdoc
53
- * @role action
54
- */
55
- class DaffSearchProductCollectionRemoveFilters {
56
- constructor(filters) {
57
- this.filters = filters;
58
- this.type = DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction;
59
- }
60
- }
61
- /**
62
- * @inheritdoc
63
- * @role action
64
- */
65
- class DaffSearchProductCollectionClearFilters {
66
- constructor() {
67
- this.type = DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction;
68
- }
69
- }
70
- /**
71
- * @inheritdoc
72
- * @role action
73
- */
74
- class DaffSearchProductCollectionToggleFilter {
75
- constructor(filter) {
76
- this.filter = filter;
77
- this.type = DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction;
78
- }
79
- }
80
- /**
81
- * @inheritdoc
82
- * @role action
83
- */
84
- class DaffSearchProductCollectionChangePageSize {
85
- constructor(pageSize) {
86
- this.pageSize = pageSize;
87
- this.type = DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction;
88
- }
89
- }
90
- /**
91
- * @inheritdoc
92
- * @role action
93
- */
94
- class DaffSearchProductCollectionChangeCurrentPage {
95
- constructor(currentPage) {
96
- this.currentPage = currentPage;
97
- this.type = DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction;
98
- }
99
- }
100
- /**
101
- * @inheritdoc
102
- * @role action
103
- */
104
- class DaffSearchProductCollectionChangeSortingOption {
105
- constructor(sort) {
106
- this.sort = sort;
107
- this.type = DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction;
108
- }
109
- }
110
-
111
- /**
112
- * The reducer for handling apply product filters actions in the main search state.
113
- */
27
+ var DaffSearchProductCollectionReplaceFilters = class {
28
+ constructor(filters) {
29
+ this.filters = filters;
30
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction;
31
+ }
32
+ };
33
+ var DaffSearchProductCollectionApplyFilters = class {
34
+ constructor(filters) {
35
+ this.filters = filters;
36
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction;
37
+ }
38
+ };
39
+ var DaffSearchProductCollectionRemoveFilters = class {
40
+ constructor(filters) {
41
+ this.filters = filters;
42
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction;
43
+ }
44
+ };
45
+ var DaffSearchProductCollectionClearFilters = class {
46
+ constructor() {
47
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction;
48
+ }
49
+ };
50
+ var DaffSearchProductCollectionToggleFilter = class {
51
+ constructor(filter) {
52
+ this.filter = filter;
53
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction;
54
+ }
55
+ };
56
+ var DaffSearchProductCollectionChangePageSize = class {
57
+ constructor(pageSize) {
58
+ this.pageSize = pageSize;
59
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction;
60
+ }
61
+ };
62
+ var DaffSearchProductCollectionChangeCurrentPage = class {
63
+ constructor(currentPage) {
64
+ this.currentPage = currentPage;
65
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction;
66
+ }
67
+ };
68
+ var DaffSearchProductCollectionChangeSortingOption = class {
69
+ constructor(sort) {
70
+ this.sort = sort;
71
+ this.type = DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction;
72
+ }
73
+ };
114
74
  function daffSearchProductCollectionSearchReducer(state = daffSearchInitialState, action) {
115
- switch (action.type) {
116
- case DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction:
117
- case DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction:
118
- case DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction:
119
- case DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction:
120
- case DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction:
121
- case DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction:
122
- case DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction:
123
- case DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction:
124
- return {
125
- ...state,
126
- loading: true,
127
- };
128
- default:
129
- return state;
130
- }
75
+ switch (action.type) {
76
+ case DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction:
77
+ case DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction:
78
+ case DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction:
79
+ case DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction:
80
+ case DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction:
81
+ case DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction:
82
+ case DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction:
83
+ case DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction: return {
84
+ ...state,
85
+ loading: true
86
+ };
87
+ default: return state;
88
+ }
131
89
  }
132
-
133
90
  const daffSearchProductCollectionSearchReducers = {
134
- search: daffSearchProductCollectionSearchReducer,
135
- incremental: daffIdentityReducer,
91
+ search: daffSearchProductCollectionSearchReducer,
92
+ incremental: daffIdentityReducer
136
93
  };
137
-
138
94
  const daffSearchProductCollectionReducer = (state = daffCollectionReducerInitialState, action) => {
139
- switch (action.type) {
140
- case DaffSearchActionTypes.SearchLoadAction:
141
- return getCollectionStateAdapter().storeRequest(action.options, state);
142
- case DaffSearchActionTypes.SearchLoadSuccessAction:
143
- return getCollectionStateAdapter().setMetadata(action.payload.metadata, state);
144
- case DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction:
145
- return getCollectionStateAdapter().setPageSize(action.pageSize, state);
146
- case DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction:
147
- return getCollectionStateAdapter().setCurrentPage(action.currentPage, state);
148
- case DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction:
149
- return getCollectionStateAdapter().setSort(action.sort.option, action.sort.direction, state);
150
- case DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction:
151
- return getCollectionStateAdapter().setFilters(daffApplyRequestsToFilters(action.filters, daffClearFilters(state.filters)), state);
152
- case DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction:
153
- return getCollectionStateAdapter().setFilters(daffApplyRequestsToFilters(action.filters, state.filters), state);
154
- case DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction:
155
- return getCollectionStateAdapter().setFilters(daffClearFilters(state.filters), state);
156
- case DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction:
157
- return getCollectionStateAdapter().setFilters(daffRemoveRequestsFromFilters(action.filters, state.filters), state);
158
- case DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction:
159
- return getCollectionStateAdapter().setFilters(daffToggleRequestOnFilters(action.filter, state.filters), state);
160
- case DaffSearchActionTypes.SearchLoadFailureAction:
161
- return daffCollectionReducerInitialState;
162
- default:
163
- return state;
164
- }
165
- };
166
-
167
- /**
168
- * The reducers for the entire search feature state.
169
- */
170
- const daffSearchProductReducers = {
171
- productCollection: daffSearchProductCollectionReducer,
95
+ switch (action.type) {
96
+ case DaffSearchActionTypes.SearchLoadAction: return getCollectionStateAdapter().storeRequest(action.options, state);
97
+ case DaffSearchActionTypes.SearchLoadSuccessAction: return getCollectionStateAdapter().setMetadata(action.payload.metadata, state);
98
+ case DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction: return getCollectionStateAdapter().setPageSize(action.pageSize, state);
99
+ case DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction: return getCollectionStateAdapter().setCurrentPage(action.currentPage, state);
100
+ case DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction: return getCollectionStateAdapter().setSort(action.sort.option, action.sort.direction, state);
101
+ case DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction: return getCollectionStateAdapter().setFilters(daffApplyRequestsToFilters(action.filters, daffClearFilters(state.filters)), state);
102
+ case DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction: return getCollectionStateAdapter().setFilters(daffApplyRequestsToFilters(action.filters, state.filters), state);
103
+ case DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction: return getCollectionStateAdapter().setFilters(daffClearFilters(state.filters), state);
104
+ case DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction: return getCollectionStateAdapter().setFilters(daffRemoveRequestsFromFilters(action.filters, state.filters), state);
105
+ case DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction: return getCollectionStateAdapter().setFilters(daffToggleRequestOnFilters(action.filter, state.filters), state);
106
+ case DaffSearchActionTypes.SearchLoadFailureAction: return daffCollectionReducerInitialState;
107
+ default: return state;
108
+ }
172
109
  };
173
-
174
- /**
175
- * The key under which the search feature state will be stored.
176
- */
177
- const DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY = 'daffSearchProduct';
178
-
179
- /**
180
- * Reducer function that catches actions and changes/overwrites search entities state.
181
- */
110
+ const daffSearchProductReducers = { productCollection: daffSearchProductCollectionReducer };
111
+ const DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY = "daffSearchProduct";
182
112
  function daffSearchProductEntitiesReducer(state = daffProductEntitiesAdapter().getInitialState(), action) {
183
- const adapter = daffProductEntitiesAdapter();
184
- switch (action.type) {
185
- case DaffSearchActionTypes.SearchLoadSuccessAction:
186
- return adapter.upsertMany(action.payload.collection[DAFF_SEARCH_PRODUCT_RESULT_KIND] || [], state);
187
- case DaffSearchActionTypes.SearchIncrementalSuccessAction:
188
- return adapter.upsertMany(action.payload[DAFF_SEARCH_PRODUCT_RESULT_KIND] || [], state);
189
- default:
190
- return state;
191
- }
113
+ const adapter = daffProductEntitiesAdapter();
114
+ switch (action.type) {
115
+ case DaffSearchActionTypes.SearchLoadSuccessAction: return adapter.upsertMany(action.payload.collection[DAFF_SEARCH_PRODUCT_RESULT_KIND] || [], state);
116
+ case DaffSearchActionTypes.SearchIncrementalSuccessAction: return adapter.upsertMany(action.payload[DAFF_SEARCH_PRODUCT_RESULT_KIND] || [], state);
117
+ default: return state;
118
+ }
192
119
  }
193
-
194
120
  const daffSearchProductProductReducers = {
195
- products: daffSearchProductEntitiesReducer,
196
- product: daffIdentityReducer,
197
- productGrid: daffIdentityReducer,
121
+ products: daffSearchProductEntitiesReducer,
122
+ product: daffIdentityReducer,
123
+ productGrid: daffIdentityReducer
198
124
  };
199
-
200
- const getDaffSearchProductReducersStateSelector = defaultMemoize(() => ({
201
- selectSearchProductFeatureState: createFeatureSelector(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY),
202
- })).memoized;
203
-
204
- const { selectSearchProductFeatureState, } = getDaffSearchProductReducersStateSelector();
205
- const selectSearchProductCollectionState = createSelector(selectSearchProductFeatureState, state => state.productCollection);
125
+ const getDaffSearchProductReducersStateSelector = defaultMemoize(() => ({ selectSearchProductFeatureState: createFeatureSelector(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY) })).memoized;
126
+ const { selectSearchProductFeatureState } = getDaffSearchProductReducersStateSelector();
127
+ const selectSearchProductCollectionState = createSelector(selectSearchProductFeatureState, (state) => state.productCollection);
206
128
  const getSearchProductCollectionSelectors = defaultMemoize(() => daffCollectionSelectorFactory(selectSearchProductCollectionState)).memoized;
207
-
208
129
  const daffSearchProductCreateSelectors = (selectSearchResultIds) => {
209
- const { selectProductEntities } = getDaffProductSelectors();
210
- const selectProductResultIds = createSelector(selectSearchResultIds, state => state[DAFF_SEARCH_PRODUCT_RESULT_KIND] || []);
211
- const selectProductResults = createSelector(selectProductResultIds, selectProductEntities, (resultIds, products) => resultIds.reduce((acc, id) => {
212
- const product = products[id];
213
- if (product) {
214
- acc.push({
215
- ...product,
216
- kind: DAFF_SEARCH_PRODUCT_RESULT_KIND,
217
- });
218
- }
219
- return acc;
220
- }, []));
221
- return {
222
- selectProductResultIds,
223
- selectProductResults,
224
- };
130
+ const { selectProductEntities } = getDaffProductSelectors();
131
+ const selectProductResultIds = createSelector(selectSearchResultIds, (state) => state[DAFF_SEARCH_PRODUCT_RESULT_KIND] || []);
132
+ return {
133
+ selectProductResultIds,
134
+ selectProductResults: createSelector(selectProductResultIds, selectProductEntities, (resultIds, products) => resultIds.reduce((acc, id) => {
135
+ const product = products[id];
136
+ if (product) acc.push({
137
+ ...product,
138
+ kind: DAFF_SEARCH_PRODUCT_RESULT_KIND
139
+ });
140
+ return acc;
141
+ }, []))
142
+ };
225
143
  };
226
-
227
144
  const daffSearchProductGetPageSelectors = defaultMemoize(() => daffSearchProductCreateSelectors(daffSearchGetPageSelectors().selectSearchResultIds)).memoized;
228
-
229
145
  const daffSearchProductGetIncrementalSelectors = defaultMemoize(() => daffSearchProductCreateSelectors(daffSearchGetIncrementalSelectors().selectSearchResultIds)).memoized;
230
-
231
- /**
232
- * @inheritdoc
233
- */
234
- class DaffSearchProductFacade {
235
- constructor(store, selectors) {
236
- this.store = store;
237
- const { selectProductResults, } = selectors;
238
- this.productResults$ = this.store.pipe(select(selectProductResults));
239
- }
240
- dispatch(action) {
241
- this.store.dispatch(action);
242
- }
243
- }
244
-
245
- /**
246
- * @inheritdoc
247
- *
248
- * A facade for the normal search state.
249
- */
250
- class DaffSearchProductPageFacade extends DaffSearchProductFacade {
251
- constructor(store) {
252
- super(store, daffSearchProductGetPageSelectors());
253
- }
254
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
255
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageFacade, providedIn: 'root' }); }
256
- }
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageFacade, decorators: [{
258
- type: Injectable,
259
- args: [{
260
- providedIn: 'root',
261
- }]
262
- }], ctorParameters: () => [{ type: i1.Store }] });
263
-
264
- /**
265
- * @inheritdoc
266
- *
267
- * A facade for the normal search state.
268
- */
269
- class DaffSearchProductIncrementalFacade extends DaffSearchProductFacade {
270
- constructor(store) {
271
- super(store, daffSearchProductGetIncrementalSelectors());
272
- }
273
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductIncrementalFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
274
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductIncrementalFacade, providedIn: 'root' }); }
275
- }
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductIncrementalFacade, decorators: [{
277
- type: Injectable,
278
- args: [{
279
- providedIn: 'root',
280
- }]
281
- }], ctorParameters: () => [{ type: i1.Store }] });
282
-
283
- class DaffSearchProductCollectionFacade extends DaffCollectionFacade {
284
- constructor(store) {
285
- super(store, getSearchProductCollectionSelectors());
286
- }
287
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
288
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionFacade, providedIn: 'root' }); }
289
- }
290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionFacade, decorators: [{
291
- type: Injectable,
292
- args: [{
293
- providedIn: 'root',
294
- }]
295
- }], ctorParameters: () => [{ type: i1.Store }] });
296
-
297
- class DaffSearchProductStateCoreModule {
298
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
299
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateCoreModule, imports: [i1.StoreFeatureModule, DaffProductStateModule,
300
- DaffSearchStateModule] }); }
301
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateCoreModule, providers: [
302
- daffSearchProvideExtraReducers(combineReducers(daffSearchProductCollectionSearchReducers)),
303
- daffProductProvideExtraReducers(combineReducers(daffSearchProductProductReducers)),
304
- ], imports: [StoreModule.forFeature(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, daffSearchProductReducers),
305
- DaffProductStateModule,
306
- DaffSearchStateModule] }); }
307
- }
308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateCoreModule, decorators: [{
309
- type: NgModule,
310
- args: [{
311
- imports: [
312
- StoreModule.forFeature(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, daffSearchProductReducers),
313
- DaffProductStateModule,
314
- DaffSearchStateModule,
315
- ],
316
- providers: [
317
- daffSearchProvideExtraReducers(combineReducers(daffSearchProductCollectionSearchReducers)),
318
- daffProductProvideExtraReducers(combineReducers(daffSearchProductProductReducers)),
319
- ],
320
- }]
321
- }] });
322
-
323
- class DaffSearchProductStateModule {
324
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
325
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateModule, imports: [DaffSearchProductStateCoreModule] }); }
326
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateModule, imports: [DaffSearchProductStateCoreModule] }); }
327
- }
328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductStateModule, decorators: [{
329
- type: NgModule,
330
- args: [{
331
- imports: [
332
- DaffSearchProductStateCoreModule,
333
- ],
334
- }]
335
- }] });
336
-
146
+ var DaffSearchProductFacade = class {
147
+ constructor(store, selectors) {
148
+ this.store = store;
149
+ const { selectProductResults } = selectors;
150
+ this.productResults$ = this.store.pipe(select(selectProductResults));
151
+ }
152
+ dispatch(action) {
153
+ this.store.dispatch(action);
154
+ }
155
+ };
156
+ var DaffSearchProductPageFacade = class DaffSearchProductPageFacade extends DaffSearchProductFacade {
157
+ constructor(store) {
158
+ super(store, daffSearchProductGetPageSelectors());
159
+ }
160
+ static {
161
+ this.ɵfac = i0.ɵɵngDeclareFactory({
162
+ minVersion: "12.0.0",
163
+ version: "22.2.4",
164
+ ngImport: i0,
165
+ type: DaffSearchProductPageFacade,
166
+ deps: [{ token: i1$1.Store }],
167
+ target: i0.ɵɵFactoryTarget.Injectable
168
+ });
169
+ }
170
+ static {
171
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
172
+ minVersion: "12.0.0",
173
+ version: "22.2.4",
174
+ ngImport: i0,
175
+ type: DaffSearchProductPageFacade,
176
+ providedIn: "root"
177
+ });
178
+ }
179
+ };
180
+ i0.ɵɵngDeclareClassMetadata({
181
+ minVersion: "12.0.0",
182
+ version: "22.2.4",
183
+ ngImport: i0,
184
+ type: DaffSearchProductPageFacade,
185
+ decorators: [{
186
+ type: Injectable,
187
+ args: [{ providedIn: "root" }]
188
+ }],
189
+ ctorParameters: () => [{ type: i1$1.Store }]
190
+ });
191
+ var DaffSearchProductIncrementalFacade = class DaffSearchProductIncrementalFacade extends DaffSearchProductFacade {
192
+ constructor(store) {
193
+ super(store, daffSearchProductGetIncrementalSelectors());
194
+ }
195
+ static {
196
+ this.ɵfac = i0.ɵɵngDeclareFactory({
197
+ minVersion: "12.0.0",
198
+ version: "22.2.4",
199
+ ngImport: i0,
200
+ type: DaffSearchProductIncrementalFacade,
201
+ deps: [{ token: i1$1.Store }],
202
+ target: i0.ɵɵFactoryTarget.Injectable
203
+ });
204
+ }
205
+ static {
206
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
207
+ minVersion: "12.0.0",
208
+ version: "22.2.4",
209
+ ngImport: i0,
210
+ type: DaffSearchProductIncrementalFacade,
211
+ providedIn: "root"
212
+ });
213
+ }
214
+ };
215
+ i0.ɵɵngDeclareClassMetadata({
216
+ minVersion: "12.0.0",
217
+ version: "22.2.4",
218
+ ngImport: i0,
219
+ type: DaffSearchProductIncrementalFacade,
220
+ decorators: [{
221
+ type: Injectable,
222
+ args: [{ providedIn: "root" }]
223
+ }],
224
+ ctorParameters: () => [{ type: i1$1.Store }]
225
+ });
226
+ var DaffSearchProductCollectionFacade = class DaffSearchProductCollectionFacade extends DaffCollectionFacade {
227
+ constructor(store) {
228
+ super(store, getSearchProductCollectionSelectors());
229
+ }
230
+ static {
231
+ this.ɵfac = i0.ɵɵngDeclareFactory({
232
+ minVersion: "12.0.0",
233
+ version: "22.2.4",
234
+ ngImport: i0,
235
+ type: DaffSearchProductCollectionFacade,
236
+ deps: [{ token: i1$1.Store }],
237
+ target: i0.ɵɵFactoryTarget.Injectable
238
+ });
239
+ }
240
+ static {
241
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
242
+ minVersion: "12.0.0",
243
+ version: "22.2.4",
244
+ ngImport: i0,
245
+ type: DaffSearchProductCollectionFacade,
246
+ providedIn: "root"
247
+ });
248
+ }
249
+ };
250
+ i0.ɵɵngDeclareClassMetadata({
251
+ minVersion: "12.0.0",
252
+ version: "22.2.4",
253
+ ngImport: i0,
254
+ type: DaffSearchProductCollectionFacade,
255
+ decorators: [{
256
+ type: Injectable,
257
+ args: [{ providedIn: "root" }]
258
+ }],
259
+ ctorParameters: () => [{ type: i1$1.Store }]
260
+ });
261
+ var DaffSearchProductStateCoreModule = class DaffSearchProductStateCoreModule {
262
+ static {
263
+ this.ɵfac = i0.ɵɵngDeclareFactory({
264
+ minVersion: "12.0.0",
265
+ version: "22.2.4",
266
+ ngImport: i0,
267
+ type: DaffSearchProductStateCoreModule,
268
+ deps: [],
269
+ target: i0.ɵɵFactoryTarget.NgModule
270
+ });
271
+ }
272
+ static {
273
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
274
+ minVersion: "14.0.0",
275
+ version: "22.2.4",
276
+ ngImport: i0,
277
+ type: DaffSearchProductStateCoreModule,
278
+ imports: [
279
+ i1$1.StoreFeatureModule,
280
+ DaffProductStateModule,
281
+ DaffSearchStateModule
282
+ ]
283
+ });
284
+ }
285
+ static {
286
+ this.ɵinj = i0.ɵɵngDeclareInjector({
287
+ minVersion: "12.0.0",
288
+ version: "22.2.4",
289
+ ngImport: i0,
290
+ type: DaffSearchProductStateCoreModule,
291
+ providers: [daffSearchProvideExtraReducers(combineReducers(daffSearchProductCollectionSearchReducers)), daffProductProvideExtraReducers(combineReducers(daffSearchProductProductReducers))],
292
+ imports: [
293
+ StoreModule.forFeature(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, daffSearchProductReducers),
294
+ DaffProductStateModule,
295
+ DaffSearchStateModule
296
+ ]
297
+ });
298
+ }
299
+ };
300
+ i0.ɵɵngDeclareClassMetadata({
301
+ minVersion: "12.0.0",
302
+ version: "22.2.4",
303
+ ngImport: i0,
304
+ type: DaffSearchProductStateCoreModule,
305
+ decorators: [{
306
+ type: NgModule,
307
+ args: [{
308
+ imports: [
309
+ StoreModule.forFeature(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, daffSearchProductReducers),
310
+ DaffProductStateModule,
311
+ DaffSearchStateModule
312
+ ],
313
+ providers: [daffSearchProvideExtraReducers(combineReducers(daffSearchProductCollectionSearchReducers)), daffProductProvideExtraReducers(combineReducers(daffSearchProductProductReducers))]
314
+ }]
315
+ }]
316
+ });
317
+ var DaffSearchProductStateModule = class DaffSearchProductStateModule {
318
+ static {
319
+ this.ɵfac = i0.ɵɵngDeclareFactory({
320
+ minVersion: "12.0.0",
321
+ version: "22.2.4",
322
+ ngImport: i0,
323
+ type: DaffSearchProductStateModule,
324
+ deps: [],
325
+ target: i0.ɵɵFactoryTarget.NgModule
326
+ });
327
+ }
328
+ static {
329
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
330
+ minVersion: "14.0.0",
331
+ version: "22.2.4",
332
+ ngImport: i0,
333
+ type: DaffSearchProductStateModule,
334
+ imports: [DaffSearchProductStateCoreModule]
335
+ });
336
+ }
337
+ static {
338
+ this.ɵinj = i0.ɵɵngDeclareInjector({
339
+ minVersion: "12.0.0",
340
+ version: "22.2.4",
341
+ ngImport: i0,
342
+ type: DaffSearchProductStateModule,
343
+ imports: [DaffSearchProductStateCoreModule]
344
+ });
345
+ }
346
+ };
347
+ i0.ɵɵngDeclareClassMetadata({
348
+ minVersion: "12.0.0",
349
+ version: "22.2.4",
350
+ ngImport: i0,
351
+ type: DaffSearchProductStateModule,
352
+ decorators: [{
353
+ type: NgModule,
354
+ args: [{ imports: [DaffSearchProductStateCoreModule] }]
355
+ }]
356
+ });
337
357
  const DAFF_SEARCH_PRODUCT_COLLECTION_ACTION_TYPES = [
338
- DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction,
339
- DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction,
340
- DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction,
341
- DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction,
342
- DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction,
343
- DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction,
344
- DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction,
345
- DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction,
358
+ DaffSearchProductCollectionActionTypes.SearchProductApplyFiltersAction,
359
+ DaffSearchProductCollectionActionTypes.SearchProductRemoveFiltersAction,
360
+ DaffSearchProductCollectionActionTypes.SearchProductReplaceFiltersAction,
361
+ DaffSearchProductCollectionActionTypes.SearchProductToggleFiltersAction,
362
+ DaffSearchProductCollectionActionTypes.SearchProductChangeCurrentPageAction,
363
+ DaffSearchProductCollectionActionTypes.SearchProductChangePageSizeAction,
364
+ DaffSearchProductCollectionActionTypes.SearchProductChangeSortingOptionAction,
365
+ DaffSearchProductCollectionActionTypes.SearchProductClearFiltersAction
346
366
  ];
347
- class DaffSearchProductCollectionEffects {
348
- constructor(actions$, collectionFacade, searchFacade,
349
- // TODO: should we reference the product kind driver here?
350
- driver, errorMatcher) {
351
- this.actions$ = actions$;
352
- this.collectionFacade = collectionFacade;
353
- this.searchFacade = searchFacade;
354
- this.driver = driver;
355
- this.errorMatcher = errorMatcher;
356
- /**
357
- * Updates the product collection according to the action.
358
- * It will take the request metedata, including currently
359
- * applied filters, from state, form them into a request,
360
- * and pass that into the {@link DaffProductCollectionDriverCall} provided to this class.
361
- *
362
- * @param throttleWindow the amount of time to delay when apply/removing filters
363
- * in a sequence.
364
- */
365
- this.update$ = createEffect(() => (throttleWindow = 300, scheduler = asyncScheduler) => this.actions$.pipe(ofType(...DAFF_SEARCH_PRODUCT_COLLECTION_ACTION_TYPES), withLatestFrom(this.collectionFacade.metadata$, this.searchFacade.recent$), map(([action, metadata, recent]) => [
366
- recent[0],
367
- daffCollectionBuildRequestFromMetadata(metadata),
368
- ]), throttleTime(throttleWindow, scheduler, { leading: true, trailing: true }), switchMap(([recent, request]) => this.driver.search(recent, request).pipe(map(resp => new DaffSearchLoadSuccess(resp)), catchError((error) => of(new DaffSearchLoadFailure(this.errorMatcher(error))))))));
369
- }
370
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionEffects, deps: [{ token: i1$1.Actions }, { token: DaffSearchProductCollectionFacade }, { token: i3.DaffSearchPageFacade }, { token: DaffSearchDriver }, { token: DAFF_SEARCH_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
371
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionEffects }); }
372
- }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductCollectionEffects, decorators: [{
374
- type: Injectable
375
- }], ctorParameters: () => [{ type: i1$1.Actions }, { type: DaffSearchProductCollectionFacade }, { type: i3.DaffSearchPageFacade }, { type: undefined, decorators: [{
376
- type: Inject,
377
- args: [DaffSearchDriver]
378
- }] }, { type: undefined, decorators: [{
379
- type: Inject,
380
- args: [DAFF_SEARCH_ERROR_MATCHER]
381
- }] }] });
382
-
383
- class DaffSearchProductPageStateModule {
384
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
385
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageStateModule, imports: [DaffSearchProductStateCoreModule,
386
- DaffSearchPageStateModule, i1$1.EffectsFeatureModule] }); }
387
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageStateModule, imports: [DaffSearchProductStateCoreModule,
388
- DaffSearchPageStateModule,
389
- EffectsModule.forFeature([
390
- DaffSearchProductCollectionEffects,
391
- ])] }); }
392
- }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSearchProductPageStateModule, decorators: [{
394
- type: NgModule,
395
- args: [{
396
- imports: [
397
- DaffSearchProductStateCoreModule,
398
- DaffSearchPageStateModule,
399
- EffectsModule.forFeature([
400
- DaffSearchProductCollectionEffects,
401
- ]),
402
- ],
403
- }]
404
- }] });
405
-
406
- /**
407
- * Generated bundle index. Do not edit.
408
- */
367
+ var DaffSearchProductCollectionEffects = class DaffSearchProductCollectionEffects {
368
+ constructor(actions$, collectionFacade, searchFacade, driver, errorMatcher) {
369
+ this.actions$ = actions$;
370
+ this.collectionFacade = collectionFacade;
371
+ this.searchFacade = searchFacade;
372
+ this.driver = driver;
373
+ this.errorMatcher = errorMatcher;
374
+ this.update$ = createEffect(() => (throttleWindow = 300, scheduler = asyncScheduler) => this.actions$.pipe(ofType(...DAFF_SEARCH_PRODUCT_COLLECTION_ACTION_TYPES), withLatestFrom(this.collectionFacade.metadata$, this.searchFacade.recent$), map(([action, metadata, recent]) => [recent[0], daffCollectionBuildRequestFromMetadata(metadata)]), throttleTime(throttleWindow, scheduler, {
375
+ leading: true,
376
+ trailing: true
377
+ }), switchMap(([recent, request]) => this.driver.search(recent, request).pipe(map((resp) => new DaffSearchLoadSuccess(resp)), catchError((error) => of(new DaffSearchLoadFailure(this.errorMatcher(error))))))));
378
+ }
379
+ static {
380
+ this.ɵfac = i0.ɵɵngDeclareFactory({
381
+ minVersion: "12.0.0",
382
+ version: "22.2.4",
383
+ ngImport: i0,
384
+ type: DaffSearchProductCollectionEffects,
385
+ deps: [
386
+ { token: i1.Actions },
387
+ { token: DaffSearchProductCollectionFacade },
388
+ { token: i3.DaffSearchPageFacade },
389
+ { token: DaffSearchDriver },
390
+ { token: DAFF_SEARCH_ERROR_MATCHER }
391
+ ],
392
+ target: i0.ɵɵFactoryTarget.Injectable
393
+ });
394
+ }
395
+ static {
396
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
397
+ minVersion: "12.0.0",
398
+ version: "22.2.4",
399
+ ngImport: i0,
400
+ type: DaffSearchProductCollectionEffects
401
+ });
402
+ }
403
+ };
404
+ i0.ɵɵngDeclareClassMetadata({
405
+ minVersion: "12.0.0",
406
+ version: "22.2.4",
407
+ ngImport: i0,
408
+ type: DaffSearchProductCollectionEffects,
409
+ decorators: [{ type: Injectable }],
410
+ ctorParameters: () => [
411
+ { type: i1.Actions },
412
+ { type: DaffSearchProductCollectionFacade },
413
+ { type: i3.DaffSearchPageFacade },
414
+ {
415
+ type: void 0,
416
+ decorators: [{
417
+ type: Inject,
418
+ args: [DaffSearchDriver]
419
+ }]
420
+ },
421
+ {
422
+ type: void 0,
423
+ decorators: [{
424
+ type: Inject,
425
+ args: [DAFF_SEARCH_ERROR_MATCHER]
426
+ }]
427
+ }
428
+ ]
429
+ });
430
+ var DaffSearchProductPageStateModule = class DaffSearchProductPageStateModule {
431
+ static {
432
+ this.ɵfac = i0.ɵɵngDeclareFactory({
433
+ minVersion: "12.0.0",
434
+ version: "22.2.4",
435
+ ngImport: i0,
436
+ type: DaffSearchProductPageStateModule,
437
+ deps: [],
438
+ target: i0.ɵɵFactoryTarget.NgModule
439
+ });
440
+ }
441
+ static {
442
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
443
+ minVersion: "14.0.0",
444
+ version: "22.2.4",
445
+ ngImport: i0,
446
+ type: DaffSearchProductPageStateModule,
447
+ imports: [
448
+ DaffSearchProductStateCoreModule,
449
+ DaffSearchPageStateModule,
450
+ i1.EffectsFeatureModule
451
+ ]
452
+ });
453
+ }
454
+ static {
455
+ this.ɵinj = i0.ɵɵngDeclareInjector({
456
+ minVersion: "12.0.0",
457
+ version: "22.2.4",
458
+ ngImport: i0,
459
+ type: DaffSearchProductPageStateModule,
460
+ imports: [
461
+ DaffSearchProductStateCoreModule,
462
+ DaffSearchPageStateModule,
463
+ EffectsModule.forFeature([DaffSearchProductCollectionEffects])
464
+ ]
465
+ });
466
+ }
467
+ };
468
+ i0.ɵɵngDeclareClassMetadata({
469
+ minVersion: "12.0.0",
470
+ version: "22.2.4",
471
+ ngImport: i0,
472
+ type: DaffSearchProductPageStateModule,
473
+ decorators: [{
474
+ type: NgModule,
475
+ args: [{ imports: [
476
+ DaffSearchProductStateCoreModule,
477
+ DaffSearchPageStateModule,
478
+ EffectsModule.forFeature([DaffSearchProductCollectionEffects])
479
+ ] }]
480
+ }]
481
+ });
482
+ const provideDaffSearchProductStateCore = () => makeEnvironmentProviders([
483
+ provideState(DAFF_SEARCH_PRODUCT_STORE_FEATURE_KEY, daffSearchProductReducers),
484
+ provideDaffProductState(),
485
+ provideDaffSearchState(),
486
+ daffSearchProvideExtraReducers(combineReducers(daffSearchProductCollectionSearchReducers)),
487
+ daffProductProvideExtraReducers(combineReducers(daffSearchProductProductReducers))
488
+ ]);
489
+ const provideDaffSearchProductState = () => makeEnvironmentProviders([provideDaffSearchProductStateCore()]);
490
+ const provideDaffSearchProductPageState = () => makeEnvironmentProviders([
491
+ provideDaffSearchProductStateCore(),
492
+ provideDaffSearchPageState(),
493
+ provideEffects(DaffSearchProductCollectionEffects)
494
+ ]);
495
+ 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, provideDaffSearchProductPageState, provideDaffSearchProductState };
409
496
 
410
- 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 };
411
- //# sourceMappingURL=daffodil-search-product-state.mjs.map
497
+ //# sourceMappingURL=daffodil-search-product-state.mjs.map