@daffodil/search 0.87.2 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/federated/index.d.ts +50 -1
- package/driver/in-memory/index.d.ts +84 -1
- package/driver/index.d.ts +96 -1
- package/driver/testing/index.d.ts +34 -1
- package/fesm2022/daffodil-search-driver-federated.mjs +7 -7
- package/fesm2022/daffodil-search-driver-federated.mjs.map +1 -1
- package/fesm2022/daffodil-search-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-search-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-search-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-search-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search-driver.mjs.map +1 -1
- package/fesm2022/daffodil-search-routing.mjs +7 -7
- package/fesm2022/daffodil-search-routing.mjs.map +1 -1
- package/fesm2022/daffodil-search-state-testing.mjs +7 -7
- package/fesm2022/daffodil-search-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search-state.mjs +24 -24
- package/fesm2022/daffodil-search-state.mjs.map +1 -1
- package/fesm2022/daffodil-search-testing.mjs +10 -10
- package/fesm2022/daffodil-search-testing.mjs.map +1 -1
- package/fesm2022/daffodil-search.mjs.map +1 -1
- package/index.d.ts +19 -1
- package/package.json +1 -1
- package/routing/index.d.ts +36 -1
- package/state/index.d.ts +334 -1
- package/state/testing/index.d.ts +32 -1
- package/testing/index.d.ts +51 -1
- package/driver/errors/invalid-api-response.d.ts +0 -10
- package/driver/errors/map.d.ts +0 -9
- package/driver/errors/public_api.d.ts +0 -3
- package/driver/errors/query-too-short.d.ts +0 -10
- package/driver/federated/config/default.d.ts +0 -5
- package/driver/federated/config/interface.d.ts +0 -12
- package/driver/federated/config/public_api.d.ts +0 -2
- package/driver/federated/injection-tokens/drivers.token.d.ts +0 -2
- package/driver/federated/public_api.d.ts +0 -3
- package/driver/federated/search-driver.module.d.ts +0 -14
- package/driver/federated/search.service.d.ts +0 -19
- package/driver/in-memory/backend/search.service.d.ts +0 -35
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/driver/search-driver.module.d.ts +0 -13
- package/driver/in-memory/driver/search.service.d.ts +0 -20
- package/driver/in-memory/injection-tokens/backends.token.d.ts +0 -2
- package/driver/in-memory/interfaces/get-backend.interface.d.ts +0 -14
- package/driver/in-memory/interfaces/public_api.d.ts +0 -1
- package/driver/in-memory/public_api.d.ts +0 -5
- package/driver/interfaces/response.interface.d.ts +0 -12
- package/driver/interfaces/search-service-kinded.interface.d.ts +0 -13
- package/driver/interfaces/search-service.interface.d.ts +0 -38
- package/driver/public_api.d.ts +0 -4
- package/driver/testing/drivers/public_api.d.ts +0 -2
- package/driver/testing/drivers/search-driver.module.d.ts +0 -12
- package/driver/testing/drivers/search.service.d.ts +0 -19
- package/driver/testing/public_api.d.ts +0 -1
- package/models/public_api.d.ts +0 -2
- package/models/search-result-collection.type.d.ts +0 -5
- package/models/search-result.type.d.ts +0 -5
- package/public_api.d.ts +0 -2
- package/routing/injection-tokens/public_api.d.ts +0 -2
- package/routing/injection-tokens/search-options/builder.token.d.ts +0 -2
- package/routing/injection-tokens/search-options/builders.token.d.ts +0 -4
- package/routing/module.d.ts +0 -6
- package/routing/public_api.d.ts +0 -3
- package/routing/resolvers/public_api.d.ts +0 -1
- package/routing/resolvers/search/search.resolver.d.ts +0 -20
- package/state/actions/search.actions.d.ts +0 -75
- package/state/config/default.d.ts +0 -5
- package/state/config/interface.d.ts +0 -12
- package/state/config/public_api.d.ts +0 -3
- package/state/config/token.d.ts +0 -2
- package/state/effects/incremental.effects.d.ts +0 -21
- package/state/effects/page.effects.d.ts +0 -18
- package/state/facades/public_api.d.ts +0 -4
- package/state/facades/search/base.facade.d.ts +0 -23
- package/state/facades/search/incremental.facade.d.ts +0 -16
- package/state/facades/search/page.facade.d.ts +0 -16
- package/state/facades/search/search-facade.interface.d.ts +0 -29
- package/state/incremental.module.d.ts +0 -11
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -1
- package/state/page.module.d.ts +0 -8
- package/state/public_api.d.ts +0 -9
- package/state/reducers/incremental/public_api.d.ts +0 -1
- package/state/reducers/incremental/reducer.d.ts +0 -7
- package/state/reducers/page/public_api.d.ts +0 -1
- package/state/reducers/page/reducer.d.ts +0 -7
- package/state/reducers/public_api.d.ts +0 -7
- package/state/reducers/reducers.d.ts +0 -6
- package/state/reducers/reducers.interface.d.ts +0 -16
- package/state/reducers/search/adapter.d.ts +0 -26
- package/state/reducers/search/initial-state.d.ts +0 -5
- package/state/reducers/search/interface.d.ts +0 -25
- package/state/reducers/search/public_api.d.ts +0 -3
- package/state/reducers/store-feature-key.d.ts +0 -4
- package/state/reducers/token/extra.token.d.ts +0 -3
- package/state/reducers/token/public_api.d.ts +0 -1
- package/state/reducers/token/reducers.token.d.ts +0 -3
- package/state/search.module.d.ts +0 -10
- package/state/selectors/incremental/selectors.d.ts +0 -3
- package/state/selectors/page/selectors.d.ts +0 -3
- package/state/selectors/public_api.d.ts +0 -4
- package/state/selectors/search-feature.selector.d.ts +0 -10
- package/state/selectors/search.selector.d.ts +0 -39
- package/state/testing/mock-search-facade.d.ts +0 -20
- package/state/testing/public_api.d.ts +0 -2
- package/state/testing/search-testing.module.d.ts +0 -9
- package/testing/factories/kind.factory.d.ts +0 -18
- package/testing/factories/public_api.d.ts +0 -2
- package/testing/factories/search-result.factory.d.ts +0 -19
- package/testing/injection-tokens/factories/kind.token.d.ts +0 -3
- package/testing/injection-tokens/public_api.d.ts +0 -1
- package/testing/public_api.d.ts +0 -3
- package/testing/testing.module.d.ts +0 -9
- package/transforms/public_api.d.ts +0 -1
- package/transforms/results-to-collection.d.ts +0 -5
package/state/index.d.ts
CHANGED
|
@@ -1 +1,334 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _ngrx_store from '@ngrx/store';
|
|
2
|
+
import { Action, ActionReducerMap, ActionReducer, MemoizedSelector, Store } from '@ngrx/store';
|
|
3
|
+
import { DaffStateError, DaffStoreFacade, daffTransformErrorToStateError } from '@daffodil/core/state';
|
|
4
|
+
import * as _daffodil_search from '@daffodil/search';
|
|
5
|
+
import { DaffSearchResult, DaffSearchResultCollection } from '@daffodil/search';
|
|
6
|
+
import { DaffSearchDriverOptions, DaffSearchDriverResponse } from '@daffodil/search/driver';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
9
|
+
import { Observable } from 'rxjs';
|
|
10
|
+
import * as i1 from '@ngrx/effects';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The search action types enum.
|
|
14
|
+
*/
|
|
15
|
+
declare enum DaffSearchActionTypes {
|
|
16
|
+
SearchLoadAction = "[@daffodil/search] Search Load Action",
|
|
17
|
+
SearchLoadSuccessAction = "[@daffodil/search] Search Load Success Action",
|
|
18
|
+
SearchLoadFailureAction = "[@daffodil/search] Search Load Failure Action",
|
|
19
|
+
SearchIncrementalAction = "[@daffodil/search] Search Incremental Action",
|
|
20
|
+
SearchIncrementalSuccessAction = "[@daffodil/search] Search Incremental Success Action",
|
|
21
|
+
SearchIncrementalFailureAction = "[@daffodil/search] Search Incremental Failure Action"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Searches for the specified phrase.
|
|
25
|
+
*
|
|
26
|
+
* @param query The search query.
|
|
27
|
+
*/
|
|
28
|
+
declare class DaffSearchLoad implements Action {
|
|
29
|
+
query: string;
|
|
30
|
+
options: DaffSearchDriverOptions;
|
|
31
|
+
readonly type = DaffSearchActionTypes.SearchLoadAction;
|
|
32
|
+
constructor(query: string, options?: DaffSearchDriverOptions);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A successful search with the dictionary of results.
|
|
36
|
+
*/
|
|
37
|
+
declare class DaffSearchLoadSuccess<T extends DaffSearchResult = DaffSearchResult> implements Action {
|
|
38
|
+
payload: DaffSearchDriverResponse<T>;
|
|
39
|
+
readonly type = DaffSearchActionTypes.SearchLoadSuccessAction;
|
|
40
|
+
constructor(payload: DaffSearchDriverResponse<T>);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A failed search with the error message.
|
|
44
|
+
*/
|
|
45
|
+
declare class DaffSearchLoadFailure implements Action {
|
|
46
|
+
payload: DaffStateError;
|
|
47
|
+
readonly type = DaffSearchActionTypes.SearchLoadFailureAction;
|
|
48
|
+
constructor(payload: DaffStateError);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Searches for the specified phrase.
|
|
52
|
+
* Automatically applies a result limit and
|
|
53
|
+
* does not save the search query in state.
|
|
54
|
+
*
|
|
55
|
+
* @param query The search query.
|
|
56
|
+
*/
|
|
57
|
+
declare class DaffSearchIncremental implements Action {
|
|
58
|
+
query: string;
|
|
59
|
+
options: DaffSearchDriverOptions;
|
|
60
|
+
readonly type = DaffSearchActionTypes.SearchIncrementalAction;
|
|
61
|
+
constructor(query: string, options?: DaffSearchDriverOptions);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A successful search with the dictionary of results.
|
|
65
|
+
*/
|
|
66
|
+
declare class DaffSearchIncrementalSuccess<T extends DaffSearchResult = DaffSearchResult> implements Action {
|
|
67
|
+
payload: DaffSearchResultCollection<T>;
|
|
68
|
+
readonly type = DaffSearchActionTypes.SearchIncrementalSuccessAction;
|
|
69
|
+
constructor(payload: DaffSearchResultCollection<T>);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A failed search with the error message.
|
|
73
|
+
*/
|
|
74
|
+
declare class DaffSearchIncrementalFailure implements Action {
|
|
75
|
+
payload: DaffStateError;
|
|
76
|
+
readonly type = DaffSearchActionTypes.SearchIncrementalFailureAction;
|
|
77
|
+
constructor(payload: DaffStateError);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A union of the search action types.
|
|
81
|
+
*/
|
|
82
|
+
type DaffSearchActions<T extends DaffSearchResult = DaffSearchResult> = DaffSearchLoad | DaffSearchLoadSuccess<T> | DaffSearchLoadFailure | DaffSearchIncremental | DaffSearchIncrementalSuccess<T> | DaffSearchIncrementalFailure;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The main search state.
|
|
86
|
+
* Contains info about the current or most recent search operation.
|
|
87
|
+
*/
|
|
88
|
+
interface DaffSearchReducerState<T extends DaffSearchResult = DaffSearchResult> {
|
|
89
|
+
/**
|
|
90
|
+
* Whether there is a pending search operation.
|
|
91
|
+
*/
|
|
92
|
+
loading: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* A list of search errors, if any.
|
|
95
|
+
*/
|
|
96
|
+
errors: DaffStateError[];
|
|
97
|
+
/**
|
|
98
|
+
* The result IDs of the most recent search grouped by kind.
|
|
99
|
+
*/
|
|
100
|
+
results: Record<T['kind'], T['id'][]>;
|
|
101
|
+
/**
|
|
102
|
+
* A list of the most recently used search queries.
|
|
103
|
+
* Does not include incremental searches.
|
|
104
|
+
*/
|
|
105
|
+
recent: string[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Manages {@link DaffSearchReducerState}.
|
|
110
|
+
*/
|
|
111
|
+
declare class DaffSearchStateReducerAdapter<T extends DaffSearchResult = DaffSearchResult> {
|
|
112
|
+
private state;
|
|
113
|
+
constructor(state: DaffSearchReducerState<T>);
|
|
114
|
+
/**
|
|
115
|
+
* Begins the search operation flow.
|
|
116
|
+
* Sets loading to true and stores the query in the list of recent searches.
|
|
117
|
+
* Resets the collection of results.
|
|
118
|
+
*/
|
|
119
|
+
search(query: string): DaffSearchReducerState<T>;
|
|
120
|
+
/**
|
|
121
|
+
* Stores the results of a completed search.
|
|
122
|
+
* Also sets loading to false and resets errors.
|
|
123
|
+
*/
|
|
124
|
+
storeResults(collection: DaffSearchResultCollection<T>): DaffSearchReducerState<T>;
|
|
125
|
+
/**
|
|
126
|
+
* Stores the from a failed search.
|
|
127
|
+
* Also sets loading to false.
|
|
128
|
+
*/
|
|
129
|
+
storeError(error: DaffStateError): DaffSearchReducerState<T>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The initial state for the main search state, see {@link DaffSearchReducerState}.
|
|
134
|
+
*/
|
|
135
|
+
declare const daffSearchInitialState: DaffSearchReducerState;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The key under which the search feature state will be stored.
|
|
139
|
+
*/
|
|
140
|
+
declare const DAFF_SEARCH_STORE_FEATURE_KEY = "daffSearch";
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The feature state for search.
|
|
144
|
+
*/
|
|
145
|
+
interface DaffSearchReducersState<T extends DaffSearchResult = DaffSearchResult> {
|
|
146
|
+
search: DaffSearchReducerState<T>;
|
|
147
|
+
incremental: DaffSearchReducerState;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The footprint of search feature state in the root application state.
|
|
151
|
+
*/
|
|
152
|
+
interface DaffSearchStateRootSlice<T extends DaffSearchResult = DaffSearchResult> {
|
|
153
|
+
[DAFF_SEARCH_STORE_FEATURE_KEY]: DaffSearchReducersState<T>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The reducers for the entire search feature state.
|
|
158
|
+
*/
|
|
159
|
+
declare const daffSearchReducers: ActionReducerMap<DaffSearchReducersState>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The reducer for the search page state, see {@link DaffSearchReducerState}.
|
|
163
|
+
*/
|
|
164
|
+
declare function daffSearchPageReducer<T extends DaffSearchResult = DaffSearchResult>(state: DaffSearchReducerState<DaffSearchResult>, action: DaffSearchActions<T>): DaffSearchReducerState;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The reducer for the incremental part of search state, see {@link DaffSearchReducerState}.
|
|
168
|
+
*/
|
|
169
|
+
declare function daffSearchIncrementalReducer<T extends DaffSearchResult = DaffSearchResult>(state: DaffSearchReducerState<DaffSearchResult>, action: DaffSearchActions<T>): DaffSearchReducerState;
|
|
170
|
+
|
|
171
|
+
declare const DAFF_SEARCH_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffSearchReducersState<_daffodil_search.DaffSearchResult>, _ngrx_store.Action<string>>[]>;
|
|
172
|
+
declare const daffSearchProvideExtraReducers: <R extends ActionReducer<DaffSearchReducersState<_daffodil_search.DaffSearchResult>, _ngrx_store.Action<string>> = ActionReducer<DaffSearchReducersState<_daffodil_search.DaffSearchResult>, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Selectors for the main part of search state.
|
|
176
|
+
*/
|
|
177
|
+
interface DaffSearchSelectors<T extends DaffSearchResult = DaffSearchResult, R extends DaffSearchStateRootSlice<T> = DaffSearchStateRootSlice<T>> {
|
|
178
|
+
/**
|
|
179
|
+
* Selects whether there is a pending search operation.
|
|
180
|
+
*/
|
|
181
|
+
selectSearchLoading: MemoizedSelector<R, boolean>;
|
|
182
|
+
/**
|
|
183
|
+
* Selects the list of search errors, if any.
|
|
184
|
+
*/
|
|
185
|
+
selectSearchErrors: MemoizedSelector<R, DaffStateError[]>;
|
|
186
|
+
/**
|
|
187
|
+
* Selects the results of the most recent search grouped by kind.
|
|
188
|
+
*/
|
|
189
|
+
selectSearchResultIds: MemoizedSelector<R, Record<T['kind'], T['id'][]>>;
|
|
190
|
+
/**
|
|
191
|
+
* Selects the recent search queries.
|
|
192
|
+
*/
|
|
193
|
+
selectRecent: MemoizedSelector<R, string[]>;
|
|
194
|
+
/**
|
|
195
|
+
* Selects the number of results in the most recent search.
|
|
196
|
+
*/
|
|
197
|
+
selectResultCount: MemoizedSelector<R, number>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Creates a group of selectors for {@link DaffSearchReducerState} that use the passed state selector as the basis.
|
|
201
|
+
*/
|
|
202
|
+
declare const daffSearchCreateSearchSelectors: <T extends DaffSearchResult = DaffSearchResult, R extends DaffSearchStateRootSlice<T> = DaffSearchStateRootSlice<T>>(stateSelector: MemoizedSelector<R, DaffSearchReducerState<T>>) => {
|
|
203
|
+
selectSearchLoading: MemoizedSelector<R, boolean, (s1: DaffSearchReducerState<T>) => boolean>;
|
|
204
|
+
selectSearchErrors: MemoizedSelector<R, DaffStateError[], (s1: DaffSearchReducerState<T>) => DaffStateError[]>;
|
|
205
|
+
selectSearchResultIds: MemoizedSelector<R, Record<T["kind"], T["id"][]>, (s1: DaffSearchReducerState<T>) => Record<T["kind"], T["id"][]>>;
|
|
206
|
+
selectRecent: MemoizedSelector<R, string[], (s1: DaffSearchReducerState<T>) => string[]>;
|
|
207
|
+
selectResultCount: MemoizedSelector<R, number, (s1: Record<T["kind"], T["id"][]>) => number>;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
declare const daffSearchGetPageSelectors: <T extends DaffSearchResult = DaffSearchResult>() => DaffSearchSelectors<T>;
|
|
211
|
+
|
|
212
|
+
declare const daffSearchGetIncrementalSelectors: <T extends DaffSearchResult = DaffSearchResult>() => DaffSearchSelectors<T>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Selector for the search feature state.
|
|
216
|
+
*/
|
|
217
|
+
interface DaffSearchFeatureSelector<T extends DaffSearchResult = DaffSearchResult> {
|
|
218
|
+
selectSearchFeatureState: MemoizedSelector<DaffSearchStateRootSlice<T>, DaffSearchReducersState<T>>;
|
|
219
|
+
}
|
|
220
|
+
declare const getDaffSearchReducersStateSelector: <T extends DaffSearchResult = DaffSearchResult>() => DaffSearchFeatureSelector<T>;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Exposes the search state selectors.
|
|
224
|
+
*/
|
|
225
|
+
interface DaffSearchFacadeInterface<T extends DaffSearchResult = DaffSearchResult> extends DaffStoreFacade<Action> {
|
|
226
|
+
/**
|
|
227
|
+
* Whether there is a pending search operation.
|
|
228
|
+
*/
|
|
229
|
+
loading$: Observable<boolean>;
|
|
230
|
+
/**
|
|
231
|
+
* A list of search errors, if any.
|
|
232
|
+
*/
|
|
233
|
+
errors$: Observable<DaffStateError[]>;
|
|
234
|
+
/**
|
|
235
|
+
* The recent search queries.
|
|
236
|
+
*/
|
|
237
|
+
recent$: Observable<string[]>;
|
|
238
|
+
/**
|
|
239
|
+
* The result IDs of the most recent search.
|
|
240
|
+
*/
|
|
241
|
+
searchResultIds$: Observable<Record<T['kind'], T['id'][]>>;
|
|
242
|
+
/**
|
|
243
|
+
* The number of results in the most recent search.
|
|
244
|
+
*/
|
|
245
|
+
resultCount$: Observable<number>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @inheritdoc
|
|
250
|
+
*
|
|
251
|
+
* Serves as the base for a search facade.
|
|
252
|
+
* Extend this class and pass in the selectors for the specific state you wish to target.
|
|
253
|
+
*/
|
|
254
|
+
declare abstract class DaffSearchFacadeBase<T extends DaffSearchResult = DaffSearchResult, R extends DaffSearchStateRootSlice<T> = DaffSearchStateRootSlice<T>> implements DaffSearchFacadeInterface<T> {
|
|
255
|
+
private store;
|
|
256
|
+
loading$: Observable<boolean>;
|
|
257
|
+
errors$: Observable<DaffStateError[]>;
|
|
258
|
+
searchResultIds$: Observable<Record<T['kind'], T['id'][]>>;
|
|
259
|
+
recent$: Observable<string[]>;
|
|
260
|
+
resultCount$: Observable<number>;
|
|
261
|
+
constructor(store: Store<R>, selectors: DaffSearchSelectors<T, R>);
|
|
262
|
+
dispatch(action: Action): void;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @inheritdoc
|
|
267
|
+
*
|
|
268
|
+
* A facade for the incremental search state.
|
|
269
|
+
*/
|
|
270
|
+
declare class DaffSearchIncrementalFacade<T extends DaffSearchResult = DaffSearchResult, R extends DaffSearchStateRootSlice<T> = DaffSearchStateRootSlice<T>> extends DaffSearchFacadeBase<T, R> implements DaffSearchFacadeInterface<T> {
|
|
271
|
+
constructor(store: Store<R>);
|
|
272
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchIncrementalFacade<any, any>, never>;
|
|
273
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchIncrementalFacade<any, any>>;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @inheritdoc
|
|
278
|
+
*
|
|
279
|
+
* A facade for the search page state.
|
|
280
|
+
*/
|
|
281
|
+
declare class DaffSearchPageFacade<T extends DaffSearchResult = DaffSearchResult, R extends DaffSearchStateRootSlice<T> = DaffSearchStateRootSlice<T>> extends DaffSearchFacadeBase<T, R> implements DaffSearchFacadeInterface<T> {
|
|
282
|
+
constructor(store: Store<R>);
|
|
283
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchPageFacade<any, any>, never>;
|
|
284
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchPageFacade<any, any>>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* An interface for providing @daffodil/search/state with necessary config values.
|
|
289
|
+
*/
|
|
290
|
+
interface DaffSearchStateConfig {
|
|
291
|
+
/**
|
|
292
|
+
* The result limit to pass to the driver during an incremental search.
|
|
293
|
+
* See {@link DaffSearchDriverOptions#limit}
|
|
294
|
+
*
|
|
295
|
+
* Defaults to 5.
|
|
296
|
+
*/
|
|
297
|
+
incrementalResultLimit?: number;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The default configuration for the {@link DaffSearchStateConfig}.
|
|
302
|
+
*/
|
|
303
|
+
declare const DAFF_SEARCH_STATE_CONFIG_DEFAULT: DaffSearchStateConfig;
|
|
304
|
+
|
|
305
|
+
declare const DAFF_SEARCH_STATE_CONFIG: i0.InjectionToken<DaffSearchStateConfig>;
|
|
306
|
+
declare const provideDaffSearchStateConfig: <R extends DaffSearchStateConfig = DaffSearchStateConfig>(config: Partial<R> | i0.InjectionToken<Partial<R>>) => i0.FactoryProvider;
|
|
307
|
+
|
|
308
|
+
declare const DAFF_SEARCH_ERROR_MATCHER: i0.InjectionToken<typeof daffTransformErrorToStateError>;
|
|
309
|
+
declare const provideDaffSearchErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => i0.ValueProvider;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Creates the search feature store.
|
|
313
|
+
*/
|
|
314
|
+
declare class DaffSearchStateModule {
|
|
315
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchStateModule, never>;
|
|
316
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchStateModule, never, [typeof _ngrx_store.StoreFeatureModule], never>;
|
|
317
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchStateModule>;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare class DaffSearchIncrementalStateModule {
|
|
321
|
+
static withConfig(config?: DaffSearchStateConfig): ModuleWithProviders<DaffSearchIncrementalStateModule>;
|
|
322
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchIncrementalStateModule, never>;
|
|
323
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchIncrementalStateModule, never, [typeof i1.EffectsFeatureModule, typeof DaffSearchStateModule], never>;
|
|
324
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchIncrementalStateModule>;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
declare class DaffSearchPageStateModule {
|
|
328
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchPageStateModule, never>;
|
|
329
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchPageStateModule, never, [typeof i1.EffectsFeatureModule, typeof DaffSearchStateModule], never>;
|
|
330
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchPageStateModule>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export { DAFF_SEARCH_ERROR_MATCHER, DAFF_SEARCH_EXTRA_REDUCERS, DAFF_SEARCH_STATE_CONFIG, DAFF_SEARCH_STATE_CONFIG_DEFAULT, DAFF_SEARCH_STORE_FEATURE_KEY, DaffSearchActionTypes, DaffSearchFacadeBase, DaffSearchIncremental, DaffSearchIncrementalFacade, DaffSearchIncrementalFailure, DaffSearchIncrementalStateModule, DaffSearchIncrementalSuccess, DaffSearchLoad, DaffSearchLoadFailure, DaffSearchLoadSuccess, DaffSearchPageFacade, DaffSearchPageStateModule, DaffSearchStateModule, DaffSearchStateReducerAdapter, daffSearchCreateSearchSelectors, daffSearchGetIncrementalSelectors, daffSearchGetPageSelectors, daffSearchIncrementalReducer, daffSearchInitialState, daffSearchPageReducer, daffSearchProvideExtraReducers, daffSearchReducers, getDaffSearchReducersStateSelector, provideDaffSearchErrorMatcher, provideDaffSearchStateConfig };
|
|
334
|
+
export type { DaffSearchActions, DaffSearchFacadeInterface, DaffSearchFeatureSelector, DaffSearchReducerState, DaffSearchReducersState, DaffSearchSelectors, DaffSearchStateConfig, DaffSearchStateRootSlice };
|
package/state/testing/index.d.ts
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import { Action } from '@ngrx/store';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { DaffStateError } from '@daffodil/core/state';
|
|
4
|
+
import { DaffSearchFacadeInterface } from '@daffodil/search/state';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Mocks out facade fields and methods for testing purposes.
|
|
9
|
+
*
|
|
10
|
+
* @inheritdoc
|
|
11
|
+
*/
|
|
12
|
+
declare class MockDaffSearchFacade implements DaffSearchFacadeInterface {
|
|
13
|
+
loading$: BehaviorSubject<boolean>;
|
|
14
|
+
errors$: BehaviorSubject<DaffStateError[]>;
|
|
15
|
+
recent$: BehaviorSubject<string[]>;
|
|
16
|
+
searchResultIds$: BehaviorSubject<Record<string, string[]>>;
|
|
17
|
+
resultCount$: BehaviorSubject<number>;
|
|
18
|
+
dispatch(action: Action): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffSearchFacade, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffSearchFacade>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Provides the {@link MockDaffSearchFacade} for {@link DaffSearchFacade}.
|
|
25
|
+
*/
|
|
26
|
+
declare class DaffSearchStateTestingModule {
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchStateTestingModule, never>;
|
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchStateTestingModule, never, never, never>;
|
|
29
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchStateTestingModule>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { DaffSearchStateTestingModule, MockDaffSearchFacade };
|
package/testing/index.d.ts
CHANGED
|
@@ -1 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import { DaffSearchResult } from '@daffodil/search';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import * as _daffodil_core from '@daffodil/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Mock class for {@link DaffSearchResult}.
|
|
8
|
+
*/
|
|
9
|
+
declare class MockSearchResult implements DaffSearchResult {
|
|
10
|
+
kind: string;
|
|
11
|
+
id: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Model factory for {@link DaffSearchResult}.
|
|
16
|
+
*/
|
|
17
|
+
declare class DaffSearchResultFactory extends DaffModelFactory<DaffSearchResult> {
|
|
18
|
+
constructor();
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchResultFactory, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchResultFactory>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Factory for creating DaffSearchResults.
|
|
25
|
+
* This will create a search result of random kind.
|
|
26
|
+
*/
|
|
27
|
+
declare class DaffSearchResultKindFactory extends DaffModelFactory<DaffSearchResult> {
|
|
28
|
+
private kindFactories;
|
|
29
|
+
constructor(kindFactories: DaffModelFactory<DaffSearchResult>[]);
|
|
30
|
+
private get _randomFactory();
|
|
31
|
+
/**
|
|
32
|
+
* Creates a search result of random kind.
|
|
33
|
+
*/
|
|
34
|
+
create(partial?: {}): DaffSearchResult;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchResultKindFactory, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchResultKindFactory>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare const DAFF_SEARCH_RESULT_KIND_FACTORIES: i0.InjectionToken<DaffModelFactory<DaffSearchResult, _daffodil_core.Constructable<DaffSearchResult>>[]>;
|
|
40
|
+
declare const provideDaffSearchResultKindFactories: <R extends DaffModelFactory<DaffSearchResult, _daffodil_core.Constructable<DaffSearchResult>> = DaffModelFactory<DaffSearchResult, _daffodil_core.Constructable<DaffSearchResult>>>(...classes: i0.Type<R>[]) => Array<i0.ExistingProvider>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Provides the default search result factory as a search result type factory.
|
|
44
|
+
*/
|
|
45
|
+
declare class DaffSearchTestingModule {
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchTestingModule, never>;
|
|
47
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchTestingModule, never, never, never>;
|
|
48
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchTestingModule>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { DAFF_SEARCH_RESULT_KIND_FACTORIES, DaffSearchResultFactory, DaffSearchResultKindFactory, DaffSearchTestingModule, MockSearchResult, provideDaffSearchResultKindFactories };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
export declare const DAFF_SEARCH_INVALID_API_RESPONSE_ERROR_CODE = "DAFF_SEARCH_INVALID_API_RESPONSE";
|
|
3
|
-
/**
|
|
4
|
-
* A general error indicating that the platform returned a response which cannot be processed.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffSearchInvalidAPIResponseError extends DaffInheritableError implements DaffError {
|
|
7
|
-
message: string;
|
|
8
|
-
readonly code: string;
|
|
9
|
-
constructor(message: string);
|
|
10
|
-
}
|
package/driver/errors/map.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffSearchInvalidAPIResponseError } from './invalid-api-response';
|
|
2
|
-
import { DaffSearchQueryTooShortError } from './query-too-short';
|
|
3
|
-
/**
|
|
4
|
-
* A mapping from error codes to error class constructors.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DaffSearchDriverErrorMap: {
|
|
7
|
-
DAFF_SEARCH_INVALID_API_RESPONSE: typeof DaffSearchInvalidAPIResponseError;
|
|
8
|
-
DAFF_SEARCH_QUERY_TOO_SHORT: typeof DaffSearchQueryTooShortError;
|
|
9
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { DaffSearchInvalidAPIResponseError, DAFF_SEARCH_INVALID_API_RESPONSE_ERROR_CODE, } from './invalid-api-response';
|
|
2
|
-
export { DaffSearchDriverErrorMap } from './map';
|
|
3
|
-
export { DaffSearchQueryTooShortError, DAFF_SEARCH_QUERY_TOO_SHORT_ERROR_CODE, } from './query-too-short';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
export declare const DAFF_SEARCH_QUERY_TOO_SHORT_ERROR_CODE = "DAFF_SEARCH_QUERY_TOO_SHORT";
|
|
3
|
-
/**
|
|
4
|
-
* Thrown when the specified search query is too short.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffSearchQueryTooShortError extends DaffInheritableError implements DaffError {
|
|
7
|
-
message: string;
|
|
8
|
-
readonly code: string;
|
|
9
|
-
constructor(message: string);
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_SEARCH_FEDERATED_CONFIG_TOKEN: import("@angular/core").InjectionToken<DaffSearchFederatedDriverConfig>, provideDaffSearchFederatedConfig: <R extends DaffSearchFederatedDriverConfig = DaffSearchFederatedDriverConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
2
|
-
/**
|
|
3
|
-
* An interface for providing @daffodil/search/driver/federated with necessary config values.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffSearchFederatedDriverConfig {
|
|
6
|
-
/**
|
|
7
|
-
* The search driver kind that is the main kind of search result.
|
|
8
|
-
* Optional.
|
|
9
|
-
* If set, the search response metadata will be entirely from this kind.
|
|
10
|
-
*/
|
|
11
|
-
preferredDriverKind?: string;
|
|
12
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffSearchDriverKindedInterface } from '@daffodil/search/driver';
|
|
2
|
-
export declare const DAFF_SEARCH_FEDERATED_DRIVERS: import("@angular/core").InjectionToken<DaffSearchDriverKindedInterface<import("@daffodil/search").DaffSearchResult>[]>, provideDaffSearchFederatedDrivers: <R extends DaffSearchDriverKindedInterface<import("@daffodil/search").DaffSearchResult> = DaffSearchDriverKindedInterface<import("@daffodil/search").DaffSearchResult>>(...classes: import("@angular/core").Type<R>[]) => Array<import("@angular/core").ExistingProvider>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { DaffSearchFederatedDriverConfig } from './config/public_api';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
/**
|
|
6
|
-
* Provides the {@link DaffSearchFederatedDriver} as the {@link DaffSearchDriver}.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffSearchFederatedDriverModule {
|
|
9
|
-
static forRoot(config?: DaffSearchFederatedDriverConfig): ModuleWithProviders<DaffSearchFederatedDriverModule>;
|
|
10
|
-
static forFeature(config?: DaffSearchFederatedDriverConfig): ModuleWithProviders<DaffSearchFederatedDriverModule>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchFederatedDriverModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchFederatedDriverModule, never, [typeof i1.CommonModule], never>;
|
|
13
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchFederatedDriverModule>;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffSearchResultCollection } from '@daffodil/search';
|
|
3
|
-
import { DaffSearchDriverInterface, DaffSearchDriverKindedInterface, DaffSearchDriverOptions, DaffSearchDriverResponse } from '@daffodil/search/driver';
|
|
4
|
-
import { DaffSearchFederatedDriverConfig } from './config/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* A service for calling and combining the results of provided federated search drivers.
|
|
8
|
-
*
|
|
9
|
-
* @inheritdoc
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffSearchFederatedDriver implements DaffSearchDriverInterface {
|
|
12
|
-
private drivers;
|
|
13
|
-
private config;
|
|
14
|
-
constructor(drivers: DaffSearchDriverKindedInterface[], config: DaffSearchFederatedDriverConfig);
|
|
15
|
-
search(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchDriverResponse>;
|
|
16
|
-
incremental(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchResultCollection>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchFederatedDriver, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSearchFederatedDriver>;
|
|
19
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffSearchInMemoryChildBackend } from '../interfaces/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* An in-memory service that delegates search queries to child backends
|
|
7
|
-
* via the {@link DAFF_SEARCH_IN_MEMORY_BACKENDS}.
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffInMemoryBackendSearchDriver implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
10
|
-
private backends;
|
|
11
|
-
readonly collectionName = "search";
|
|
12
|
-
constructor(backends: DaffSearchInMemoryChildBackend[]);
|
|
13
|
-
/**
|
|
14
|
-
* Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
|
|
15
|
-
*
|
|
16
|
-
* @param url initial url
|
|
17
|
-
* @param utils utility to parse url
|
|
18
|
-
* @returns ParsedRequestUrl
|
|
19
|
-
* @docs-private
|
|
20
|
-
*/
|
|
21
|
-
parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
|
|
22
|
-
/**
|
|
23
|
-
* @docs-private
|
|
24
|
-
*/
|
|
25
|
-
createDb(): any;
|
|
26
|
-
/**
|
|
27
|
-
* Searches for entities in child backends.
|
|
28
|
-
*
|
|
29
|
-
* @param reqInfo request object
|
|
30
|
-
* @returns An http response object
|
|
31
|
-
*/
|
|
32
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendSearchDriver, never>;
|
|
34
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendSearchDriver>;
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_SEARCH_IN_MEMORY_COLLECTION_NAME = "search";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "@daffodil/search/testing";
|
|
5
|
-
/**
|
|
6
|
-
* Provides the {@link DaffInMemorySearchDriver} as the {@link DaffSearchDriver}.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffSearchInMemoryDriverModule {
|
|
9
|
-
static forRoot(): ModuleWithProviders<DaffSearchInMemoryDriverModule>;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSearchInMemoryDriverModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSearchInMemoryDriverModule, never, [typeof i1.CommonModule, typeof i2.DaffSearchTestingModule], never>;
|
|
12
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSearchInMemoryDriverModule>;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
5
|
-
import { DaffSearchResultCollection } from '@daffodil/search';
|
|
6
|
-
import { DaffSearchDriverInterface, DaffSearchDriverOptions, DaffSearchDriverResponse } from '@daffodil/search/driver';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* The search inmemory driver to mock the search backend service.
|
|
10
|
-
*
|
|
11
|
-
* @inheritdoc
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffInMemorySearchDriver extends DaffInMemoryDriverBase implements DaffSearchDriverInterface {
|
|
14
|
-
private http;
|
|
15
|
-
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
16
|
-
search(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchDriverResponse>;
|
|
17
|
-
incremental(query: string, options?: DaffSearchDriverOptions): Observable<DaffSearchResultCollection>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemorySearchDriver, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemorySearchDriver>;
|
|
20
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DaffSearchInMemoryChildBackend } from '../interfaces/public_api';
|
|
2
|
-
export declare const DAFF_SEARCH_IN_MEMORY_BACKENDS: import("@angular/core").InjectionToken<DaffSearchInMemoryChildBackend[]>, provideDaffSearchInMemoryBackends: <R extends DaffSearchInMemoryChildBackend = DaffSearchInMemoryChildBackend>(...classes: import("@angular/core").Type<R>[]) => Array<import("@angular/core").ExistingProvider>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HttpResponse } from '@angular/common/http';
|
|
2
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffSearchDriverResponse } from '@daffodil/search/driver';
|
|
5
|
-
/**
|
|
6
|
-
* The child backends to which the search in-memory backend will delegate search queries.
|
|
7
|
-
*/
|
|
8
|
-
export interface DaffSearchInMemoryChildBackend {
|
|
9
|
-
readonly kind: string;
|
|
10
|
-
/**
|
|
11
|
-
* Search for entities and get the results.
|
|
12
|
-
*/
|
|
13
|
-
get(reqInfo: RequestInfo): Observable<HttpResponse<DaffSearchDriverResponse>>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffSearchInMemoryChildBackend } from './get-backend.interface';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { DaffInMemoryBackendSearchDriver } from './backend/search.service';
|
|
2
|
-
export { DaffInMemorySearchDriver } from './driver/search.service';
|
|
3
|
-
export { DaffSearchInMemoryDriverModule } from './driver/search-driver.module';
|
|
4
|
-
export * from './interfaces/get-backend.interface';
|
|
5
|
-
export * from './injection-tokens/backends.token';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DaffSearchResult, DaffSearchResultCollection } from '@daffodil/search';
|
|
2
|
-
export interface DaffSearchDriverResponse<T extends DaffSearchResult = DaffSearchResult> {
|
|
3
|
-
/**
|
|
4
|
-
* The collection of search result entities.
|
|
5
|
-
*/
|
|
6
|
-
collection: DaffSearchResultCollection<T>;
|
|
7
|
-
/**
|
|
8
|
-
* A place for specific drivers to return extra info that applies to the entire response.
|
|
9
|
-
* For example, this could be pagination, sorting, or filtering.
|
|
10
|
-
*/
|
|
11
|
-
metadata: unknown;
|
|
12
|
-
}
|