@daffodil/core 0.94.1-rc.0 → 0.95.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/fesm2022/daffodil-core-external-script-testing.mjs +42 -56
- package/fesm2022/daffodil-core-external-script-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core-external-script.mjs +77 -95
- package/fesm2022/daffodil-core-external-script.mjs.map +1 -1
- package/fesm2022/daffodil-core-graphql.mjs +94 -145
- package/fesm2022/daffodil-core-graphql.mjs.map +1 -1
- package/fesm2022/daffodil-core-routing.mjs +53 -85
- package/fesm2022/daffodil-core-routing.mjs.map +1 -1
- package/fesm2022/daffodil-core-state-testing.mjs +90 -62
- package/fesm2022/daffodil-core-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core-state.mjs +282 -456
- package/fesm2022/daffodil-core-state.mjs.map +1 -1
- package/fesm2022/daffodil-core-testing.mjs +1077 -657
- package/fesm2022/daffodil-core-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core.mjs +720 -1342
- package/fesm2022/daffodil-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/daffodil-core-external-script-testing.d.ts +14 -18
- package/types/daffodil-core-external-script.d.ts +42 -47
- package/types/daffodil-core-graphql.d.ts +35 -51
- package/types/daffodil-core-routing.d.ts +40 -51
- package/types/daffodil-core-state-testing.d.ts +31 -35
- package/types/daffodil-core-state.d.ts +429 -465
- package/types/daffodil-core-testing.d.ts +220 -245
- package/types/daffodil-core.d.ts +518 -641
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { PipeTransform } from
|
|
3
|
-
import { EnforceOptions } from
|
|
4
|
-
import { Constructable,
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { PipeTransform } from "@angular/core";
|
|
3
|
+
import { EnforceOptions } from "enforce-unique";
|
|
4
|
+
import { Constructable, DaffCollection, DaffCollectionMetadata, DaffCollectionRequest, DaffFilter, DaffFilterEqual, DaffFilterEqualOption, DaffFilterEqualRequest, DaffFilterEqualToggleRequest, DaffFilterRangeNumeric, DaffFilterRangeNumericRequest, DaffFilterRangeNumericToggleRequest, DaffFilterRangeOption, DaffFilterRangePair, DaffFilterRangeRequestOption, DaffFilterRequest, DaffFilterToggleRequest, DaffFilterType, DaffFilters, DaffIdentifiable, DaffNumericallyPaginable, DaffSortDirectionEnum, DaffSortOption, DaffSortOptions, DaffSortable } from "@daffodil/core";
|
|
6
5
|
/**
|
|
7
6
|
* @docs
|
|
8
7
|
* A mock CurrencyPipe that does nothing to a given input.
|
|
9
8
|
* This pipe is useful for asserting that a CurrencyPipe is in use via a spy,
|
|
10
9
|
* but ignoring the actual underlying implementation
|
|
11
10
|
*/
|
|
12
|
-
declare class DaffMockCurrencyPipe implements PipeTransform {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
export declare class DaffMockCurrencyPipe implements PipeTransform {
|
|
12
|
+
transform(value: number): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMockCurrencyPipe, never>;
|
|
14
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DaffMockCurrencyPipe, "currency", true>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated in favor of importing the standalone {@link DaffMockCurrencyPipe} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
18
|
+
*/
|
|
19
|
+
export declare class DaffCoreTestingModule {
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCoreTestingModule, never>;
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCoreTestingModule, never, [typeof DaffMockCurrencyPipe], [typeof DaffMockCurrencyPipe]>;
|
|
22
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCoreTestingModule>;
|
|
23
|
+
}
|
|
24
24
|
type Func = (...args: Array<any>) => any;
|
|
25
25
|
/**
|
|
26
26
|
* Wraps `UniqueEnforcer` to provide function-specific instances.
|
|
27
27
|
*/
|
|
28
|
-
declare const enforceUnique: <T extends Func>(func: T, options?: EnforceOptions) => ReturnType<T>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
28
|
+
export declare const enforceUnique: <T extends Func>(func: T, options?: EnforceOptions) => ReturnType<T>;
|
|
29
|
+
export interface IDaffModelFactory<T> {
|
|
30
|
+
create<R extends T = T>(partial: Partial<T> & T extends R ? Partial<T> : R): T & R;
|
|
31
|
+
create(partial?: Partial<T>): T;
|
|
32
|
+
createMany(qty: number, partial?: Partial<T>): T[];
|
|
33
|
+
}
|
|
36
34
|
/**
|
|
37
35
|
* The base class for model factories.
|
|
38
36
|
*
|
|
@@ -65,299 +63,276 @@ interface IDaffModelFactory<T> {
|
|
|
65
63
|
* }
|
|
66
64
|
* ```
|
|
67
65
|
*/
|
|
68
|
-
declare abstract class DaffModelFactory<T extends Record<string, any>, Klass extends Constructable<T> = Constructable<T>> implements IDaffModelFactory<T> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
declare class
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
declare class MockFilterEqual implements DaffFilterEqual {
|
|
111
|
-
type: DaffFilterType.Equal;
|
|
112
|
-
label: string;
|
|
113
|
-
name: string;
|
|
114
|
-
options: {};
|
|
66
|
+
export declare abstract class DaffModelFactory<T extends Record<string, any>, Klass extends Constructable<T> = Constructable<T>> implements IDaffModelFactory<T> {
|
|
67
|
+
type?: Klass;
|
|
68
|
+
_instantiationArgs: ConstructorParameters<Klass>;
|
|
69
|
+
constructor(type?: Klass, ...args: ConstructorParameters<Klass>);
|
|
70
|
+
create<R extends T = T>(partial: Partial<T> & T extends R ? Partial<T> : R): T & R;
|
|
71
|
+
create(partial?: Partial<T>): T;
|
|
72
|
+
createMany(qty?: number, partial?: Partial<T>): T[];
|
|
73
|
+
}
|
|
74
|
+
export declare class MockDaffIdentifiable implements DaffIdentifiable {
|
|
75
|
+
id: string;
|
|
76
|
+
}
|
|
77
|
+
export declare class DaffIdentifiableFactory extends DaffModelFactory<DaffIdentifiable> {
|
|
78
|
+
constructor();
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffIdentifiableFactory, never>;
|
|
80
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
81
|
+
}
|
|
82
|
+
export declare class DaffNumericallyPaginableFactory extends DaffModelFactory<DaffNumericallyPaginable> {
|
|
83
|
+
constructor();
|
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffNumericallyPaginableFactory, never>;
|
|
85
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
86
|
+
}
|
|
87
|
+
export declare class DaffSortOptionFactory extends DaffModelFactory<DaffSortOption> {
|
|
88
|
+
constructor();
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSortOptionFactory, never>;
|
|
90
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
91
|
+
}
|
|
92
|
+
export declare class DaffSortOptionsFactory extends DaffModelFactory<DaffSortOptions> {
|
|
93
|
+
constructor(optionFactory: DaffSortOptionFactory);
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSortOptionsFactory, never>;
|
|
95
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
96
|
+
}
|
|
97
|
+
export declare class DaffSortableFactory extends DaffModelFactory<DaffSortable> {
|
|
98
|
+
constructor(optionFactory: DaffSortOptionsFactory);
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSortableFactory, never>;
|
|
100
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
101
|
+
}
|
|
102
|
+
export declare class MockFilterEqual implements DaffFilterEqual {
|
|
103
|
+
type: DaffFilterType.Equal;
|
|
104
|
+
label: string;
|
|
105
|
+
name: string;
|
|
106
|
+
options: {};
|
|
115
107
|
}
|
|
116
108
|
/**
|
|
117
109
|
* A factory for creating a {@link DaffFilterEqual}.
|
|
118
110
|
*/
|
|
119
|
-
declare class DaffFilterEqualFactory extends DaffModelFactory<DaffFilterEqual> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
options: {};
|
|
111
|
+
export declare class DaffFilterEqualFactory extends DaffModelFactory<DaffFilterEqual> {
|
|
112
|
+
constructor();
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterEqualFactory, never>;
|
|
114
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
115
|
+
}
|
|
116
|
+
export declare class MockFilterRangeNumeric implements DaffFilterRangeNumeric {
|
|
117
|
+
type: DaffFilterType.RangeNumeric;
|
|
118
|
+
label: string;
|
|
119
|
+
name: string;
|
|
120
|
+
min: number;
|
|
121
|
+
max: number;
|
|
122
|
+
options: {};
|
|
132
123
|
}
|
|
133
124
|
/**
|
|
134
125
|
* A factory for creating a {@link DaffFilterRangeNumeric}.
|
|
135
126
|
*/
|
|
136
|
-
declare class DaffFilterRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumeric> {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
127
|
+
export declare class DaffFilterRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumeric> {
|
|
128
|
+
constructor();
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRangeNumericFactory, never>;
|
|
130
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
140
131
|
}
|
|
141
|
-
|
|
142
132
|
/**
|
|
143
133
|
* A factory for creating a {@link DaffFilter}.
|
|
144
134
|
*/
|
|
145
|
-
declare class DaffFilterFactory extends DaffModelFactory<DaffFilter> {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
value: string[];
|
|
135
|
+
export declare class DaffFilterFactory extends DaffModelFactory<DaffFilter> {
|
|
136
|
+
private equalFactory;
|
|
137
|
+
private rangeFactory;
|
|
138
|
+
constructor(equalFactory: DaffFilterEqualFactory, rangeFactory: DaffFilterRangeNumericFactory);
|
|
139
|
+
create(partial?: Partial<DaffFilter>): DaffFilter;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterFactory, never>;
|
|
141
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
142
|
+
}
|
|
143
|
+
export declare class MockDaffFilterEqualRequest implements DaffFilterEqualRequest {
|
|
144
|
+
type: DaffFilterType.Equal;
|
|
145
|
+
name: string;
|
|
146
|
+
value: string[];
|
|
158
147
|
}
|
|
159
148
|
/**
|
|
160
149
|
* A factory for creating a {@link DaffFilterEqualRequest}.
|
|
161
150
|
*/
|
|
162
|
-
declare class DaffFilterRequestEqualFactory extends DaffModelFactory<DaffFilterEqualRequest> {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
151
|
+
export declare class DaffFilterRequestEqualFactory extends DaffModelFactory<DaffFilterEqualRequest> {
|
|
152
|
+
constructor();
|
|
153
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRequestEqualFactory, never>;
|
|
154
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
166
155
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
max: number;
|
|
156
|
+
export declare class MockDaffFilterRangeNumericRequestOption implements DaffFilterRangeRequestOption<number> {
|
|
157
|
+
min: number;
|
|
158
|
+
max: number;
|
|
171
159
|
}
|
|
172
160
|
/**
|
|
173
161
|
* A factory for creating a {@link DaffFilterRangeRequestOption}.
|
|
174
162
|
*/
|
|
175
|
-
declare class DaffFilterRangeNumericRequestOptionFactory extends DaffModelFactory<DaffFilterRangeRequestOption<number>> {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
export declare class DaffFilterRangeNumericRequestOptionFactory extends DaffModelFactory<DaffFilterRangeRequestOption<number>> {
|
|
164
|
+
constructor();
|
|
165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRangeNumericRequestOptionFactory, never>;
|
|
166
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
179
167
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
value: DaffFilterRangeRequestOption<number>;
|
|
168
|
+
export declare class MockDaffFilterRangeNumericRequest implements DaffFilterRangeNumericRequest {
|
|
169
|
+
type: DaffFilterType.RangeNumeric;
|
|
170
|
+
name: string;
|
|
171
|
+
value: DaffFilterRangeRequestOption<number>;
|
|
185
172
|
}
|
|
186
173
|
/**
|
|
187
174
|
* A factory for creating a {@link DaffFilterRangeNumericRequest}.
|
|
188
175
|
*/
|
|
189
|
-
declare class DaffFilterRequestRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumericRequest> {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
176
|
+
export declare class DaffFilterRequestRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumericRequest> {
|
|
177
|
+
private option;
|
|
178
|
+
constructor(option?: DaffFilterRangeNumericRequestOptionFactory);
|
|
179
|
+
create(partial?: Partial<DaffFilterRangeNumericRequest>): {
|
|
180
|
+
type: DaffFilterType.RangeNumeric;
|
|
181
|
+
name: string;
|
|
182
|
+
value: DaffFilterRangeRequestOption<number>;
|
|
183
|
+
};
|
|
184
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRequestRangeNumericFactory, never>;
|
|
185
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
186
|
+
}
|
|
201
187
|
/**
|
|
202
188
|
* A factory for creating a {@link DaffFilterRequest}.
|
|
203
189
|
*/
|
|
204
|
-
declare class DaffFilterRequestFactory extends DaffModelFactory<DaffFilterRequest> {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
value: string;
|
|
190
|
+
export declare class DaffFilterRequestFactory extends DaffModelFactory<DaffFilterRequest> {
|
|
191
|
+
constructor(equalFactory: DaffFilterRequestEqualFactory, rangeFactory: DaffFilterRequestRangeNumericFactory);
|
|
192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRequestFactory, never>;
|
|
193
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
194
|
+
}
|
|
195
|
+
export declare class MockDaffFilterToggleEqualRequest implements DaffFilterEqualToggleRequest {
|
|
196
|
+
type: DaffFilterType.Equal;
|
|
197
|
+
name: string;
|
|
198
|
+
value: string;
|
|
214
199
|
}
|
|
215
200
|
/**
|
|
216
201
|
* A factory for creating a {@link DaffFilterEqualToggleRequest}.
|
|
217
202
|
*/
|
|
218
|
-
declare class DaffFilterToggleRequestEqualFactory extends DaffModelFactory<DaffFilterEqualToggleRequest> {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
203
|
+
export declare class DaffFilterToggleRequestEqualFactory extends DaffModelFactory<DaffFilterEqualToggleRequest> {
|
|
204
|
+
constructor();
|
|
205
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterToggleRequestEqualFactory, never>;
|
|
206
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
222
207
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
value: DaffFilterRangeRequestOption<number>;
|
|
208
|
+
export declare class MockDaffFilterToggleRangeNumericRequest implements DaffFilterRangeNumericToggleRequest {
|
|
209
|
+
type: DaffFilterType.RangeNumeric;
|
|
210
|
+
name: string;
|
|
211
|
+
value: DaffFilterRangeRequestOption<number>;
|
|
228
212
|
}
|
|
229
213
|
/**
|
|
230
214
|
* A factory for creating a {@link DaffFilterRangeNumericToggleRequest}.
|
|
231
215
|
*/
|
|
232
|
-
declare class DaffFilterToggleRequestRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumericToggleRequest> {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
216
|
+
export declare class DaffFilterToggleRequestRangeNumericFactory extends DaffModelFactory<DaffFilterRangeNumericToggleRequest> {
|
|
217
|
+
private option;
|
|
218
|
+
constructor(option: DaffFilterRangeNumericRequestOptionFactory);
|
|
219
|
+
create(partial?: Partial<DaffFilterRangeNumericToggleRequest>): DaffFilterRangeNumericToggleRequest;
|
|
220
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterToggleRequestRangeNumericFactory, never>;
|
|
221
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
222
|
+
}
|
|
240
223
|
/**
|
|
241
224
|
* A factory for creating a {@link DaffFilterToggleRequest}.
|
|
242
225
|
*/
|
|
243
|
-
declare class DaffFilterToggleRequestFactory extends DaffModelFactory<DaffFilterToggleRequest> {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
count: number;
|
|
226
|
+
export declare class DaffFilterToggleRequestFactory extends DaffModelFactory<DaffFilterToggleRequest> {
|
|
227
|
+
private equalFactory;
|
|
228
|
+
private rangeFactory;
|
|
229
|
+
constructor(equalFactory: DaffFilterToggleRequestEqualFactory, rangeFactory: DaffFilterToggleRequestRangeNumericFactory);
|
|
230
|
+
create(partial?: Partial<DaffFilterToggleRequest>): DaffFilterToggleRequest;
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterToggleRequestFactory, never>;
|
|
232
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
233
|
+
}
|
|
234
|
+
export declare class MockDaffFilterEqualOption implements DaffFilterEqualOption {
|
|
235
|
+
applied: boolean;
|
|
236
|
+
value: string;
|
|
237
|
+
label: string;
|
|
238
|
+
count: number;
|
|
257
239
|
}
|
|
258
240
|
/**
|
|
259
241
|
* A factory for creating a {@link DaffFilterEqualOption}.
|
|
260
242
|
*/
|
|
261
|
-
declare class DaffFilterEqualOptionFactory extends DaffModelFactory<DaffFilterEqualOption> {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
243
|
+
export declare class DaffFilterEqualOptionFactory extends DaffModelFactory<DaffFilterEqualOption> {
|
|
244
|
+
constructor();
|
|
245
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterEqualOptionFactory, never>;
|
|
246
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
265
247
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
label: string;
|
|
248
|
+
export declare class MockFilterRangeNumericOption implements DaffFilterRangeOption<number> {
|
|
249
|
+
value: number;
|
|
250
|
+
label: string;
|
|
270
251
|
}
|
|
271
252
|
/**
|
|
272
253
|
* A factory for creating a {@link DaffFilterRangeOption}.
|
|
273
254
|
*/
|
|
274
|
-
declare class DaffFilterRangeNumericOptionFactory extends DaffModelFactory<DaffFilterRangeOption<number>> {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
255
|
+
export declare class DaffFilterRangeNumericOptionFactory extends DaffModelFactory<DaffFilterRangeOption<number>> {
|
|
256
|
+
constructor();
|
|
257
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRangeNumericOptionFactory, never>;
|
|
258
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
278
259
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
min: DaffFilterRangeOption<number>;
|
|
260
|
+
export declare class MockDaffFilterRangeNumericPair implements DaffFilterRangePair<number> {
|
|
261
|
+
applied: true;
|
|
262
|
+
max: DaffFilterRangeOption<number>;
|
|
263
|
+
min: DaffFilterRangeOption<number>;
|
|
284
264
|
}
|
|
285
265
|
/**
|
|
286
266
|
* A factory for creating a {@link DaffFilterRangePair}.
|
|
287
267
|
*/
|
|
288
|
-
declare class DaffFilterRangeNumericPairFactory extends DaffModelFactory<DaffFilterRangePair<number>> {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
268
|
+
export declare class DaffFilterRangeNumericPairFactory extends DaffModelFactory<DaffFilterRangePair<number>> {
|
|
269
|
+
private option;
|
|
270
|
+
constructor(option: DaffFilterRangeNumericOptionFactory);
|
|
271
|
+
create(partial?: Partial<DaffFilterRangePair<number>>): {
|
|
272
|
+
applied: true;
|
|
273
|
+
min: DaffFilterRangeOption<number>;
|
|
274
|
+
max: DaffFilterRangeOption<number>;
|
|
275
|
+
};
|
|
276
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffFilterRangeNumericPairFactory, never>;
|
|
277
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
278
|
+
}
|
|
300
279
|
/**
|
|
301
280
|
* Mocked {@link DaffCollectionMetadata} object.
|
|
302
281
|
*/
|
|
303
|
-
declare class MockCollectionMetadata implements DaffCollectionMetadata {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
282
|
+
export declare class MockCollectionMetadata implements DaffCollectionMetadata {
|
|
283
|
+
currentPage: number;
|
|
284
|
+
totalPages: number;
|
|
285
|
+
pageSize: number;
|
|
286
|
+
sortOptions: DaffSortOptions;
|
|
287
|
+
appliedSortOption: DaffSortOption['value'];
|
|
288
|
+
appliedSortDirection: DaffSortDirectionEnum;
|
|
289
|
+
count: number;
|
|
290
|
+
ids: DaffIdentifiable['id'][];
|
|
291
|
+
filters: DaffFilters;
|
|
292
|
+
constructor(pageInfoFactory: DaffNumericallyPaginableFactory, sortFieldsFactory: DaffSortableFactory, filterFactory: DaffFilterFactory);
|
|
314
293
|
}
|
|
315
294
|
/**
|
|
316
295
|
* Factory for creating {@link DaffCollectionMetadata}s.
|
|
317
296
|
*/
|
|
318
|
-
declare class DaffCollectionMetadataFactory extends DaffModelFactory<DaffCollectionMetadata> {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
297
|
+
export declare class DaffCollectionMetadataFactory extends DaffModelFactory<DaffCollectionMetadata> {
|
|
298
|
+
constructor(pageInfoFactory: DaffNumericallyPaginableFactory, sortFieldsFactory: DaffSortableFactory, filterFactory: DaffFilterFactory);
|
|
299
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCollectionMetadataFactory, never>;
|
|
300
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
322
301
|
}
|
|
323
|
-
|
|
324
302
|
/**
|
|
325
303
|
* Mocked {@link DaffCollectionRequest} object.
|
|
326
304
|
*/
|
|
327
|
-
declare class MockCollectionRequest implements DaffCollectionRequest {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
305
|
+
export declare class MockCollectionRequest implements DaffCollectionRequest {
|
|
306
|
+
private filterRequestFactory;
|
|
307
|
+
currentPage: number;
|
|
308
|
+
appliedSortDirection: DaffSortDirectionEnum;
|
|
309
|
+
pageSize: number;
|
|
310
|
+
appliedSortOption: string;
|
|
311
|
+
filterRequests: DaffFilterRequest[];
|
|
312
|
+
constructor(filterRequestFactory: DaffFilterRequestFactory);
|
|
313
|
+
private createFilterRequests;
|
|
336
314
|
}
|
|
337
315
|
/**
|
|
338
316
|
* Factory for creating {@link DaffCollectionRequest}s.
|
|
339
317
|
*/
|
|
340
|
-
declare class DaffCollectionRequestFactory extends DaffModelFactory<DaffCollectionRequest> {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
318
|
+
export declare class DaffCollectionRequestFactory extends DaffModelFactory<DaffCollectionRequest> {
|
|
319
|
+
constructor(filterRequestFactory: DaffFilterRequestFactory);
|
|
320
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCollectionRequestFactory, never>;
|
|
321
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
344
322
|
}
|
|
345
|
-
|
|
346
323
|
/**
|
|
347
324
|
* Mocked {@link DaffCollection} object.
|
|
348
325
|
*
|
|
349
326
|
* It should be customized by passing the factory for the contained entity as the first constructor argument.
|
|
350
327
|
*/
|
|
351
|
-
declare class MockCollection<T extends DaffIdentifiable = DaffIdentifiable> implements DaffCollection<T> {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export { DaffCollectionMetadataFactory, DaffCollectionRequestFactory, DaffCoreTestingModule, DaffFilterEqualFactory, DaffFilterEqualOptionFactory, DaffFilterFactory, DaffFilterRangeNumericFactory, DaffFilterRangeNumericOptionFactory, DaffFilterRangeNumericPairFactory, DaffFilterRangeNumericRequestOptionFactory, DaffFilterRequestEqualFactory, DaffFilterRequestFactory, DaffFilterRequestRangeNumericFactory, DaffFilterToggleRequestEqualFactory, DaffFilterToggleRequestFactory, DaffFilterToggleRequestRangeNumericFactory, DaffIdentifiableFactory, DaffMockCurrencyPipe, DaffModelFactory, DaffNumericallyPaginableFactory, DaffSortOptionFactory, DaffSortOptionsFactory, DaffSortableFactory, MockCollection, MockCollectionMetadata, MockCollectionRequest, MockDaffFilterEqualOption, MockDaffFilterEqualRequest, MockDaffFilterRangeNumericPair, MockDaffFilterRangeNumericRequest, MockDaffFilterRangeNumericRequestOption, MockDaffFilterToggleEqualRequest, MockDaffFilterToggleRangeNumericRequest, MockDaffIdentifiable, MockFilterEqual, MockFilterRangeNumeric, MockFilterRangeNumericOption, enforceUnique };
|
|
363
|
-
export type { IDaffModelFactory };
|
|
328
|
+
export declare class MockCollection<T extends DaffIdentifiable = DaffIdentifiable> implements DaffCollection<T> {
|
|
329
|
+
private itemFactory;
|
|
330
|
+
private metadataFactory;
|
|
331
|
+
private _items;
|
|
332
|
+
metadata: DaffCollectionMetadata;
|
|
333
|
+
data: Record<T["id"], T>;
|
|
334
|
+
constructor(itemFactory: DaffModelFactory<T>, metadataFactory: DaffCollectionMetadataFactory);
|
|
335
|
+
private createItems;
|
|
336
|
+
private createMetadata;
|
|
337
|
+
}
|
|
338
|
+
export {};
|