@daffodil/product 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.
Files changed (46) hide show
  1. package/fesm2022/daffodil-product-driver-in-memory.mjs +200 -227
  2. package/fesm2022/daffodil-product-driver-in-memory.mjs.map +1 -1
  3. package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs +444 -0
  4. package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs.map +1 -0
  5. package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs +704 -0
  6. package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs.map +1 -0
  7. package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs +7 -0
  8. package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs.map +1 -0
  9. package/fesm2022/daffodil-product-driver-magento-auto.mjs +7 -0
  10. package/fesm2022/daffodil-product-driver-magento-auto.mjs.map +1 -0
  11. package/fesm2022/daffodil-product-driver-shopify.mjs +99 -127
  12. package/fesm2022/daffodil-product-driver-shopify.mjs.map +1 -1
  13. package/fesm2022/daffodil-product-driver-testing.mjs +117 -87
  14. package/fesm2022/daffodil-product-driver-testing.mjs.map +1 -1
  15. package/fesm2022/daffodil-product-driver.mjs +22 -45
  16. package/fesm2022/daffodil-product-driver.mjs.map +1 -1
  17. package/fesm2022/daffodil-product-routing.mjs +347 -285
  18. package/fesm2022/daffodil-product-routing.mjs.map +1 -1
  19. package/fesm2022/daffodil-product-state-testing.mjs +189 -106
  20. package/fesm2022/daffodil-product-state-testing.mjs.map +1 -1
  21. package/fesm2022/daffodil-product-state.mjs +566 -659
  22. package/fesm2022/daffodil-product-state.mjs.map +1 -1
  23. package/fesm2022/daffodil-product-testing.mjs +316 -276
  24. package/fesm2022/daffodil-product-testing.mjs.map +1 -1
  25. package/fesm2022/daffodil-product.mjs +8 -29
  26. package/fesm2022/daffodil-product.mjs.map +1 -1
  27. package/package.json +1 -1
  28. package/types/daffodil-product-driver-in-memory.d.ts +65 -75
  29. package/types/daffodil-product-driver-magento-2.4.7-testing.d.ts +105 -0
  30. package/types/daffodil-product-driver-magento-2.4.7.d.ts +337 -0
  31. package/types/daffodil-product-driver-magento-auto-testing.d.ts +1 -0
  32. package/types/daffodil-product-driver-magento-auto.d.ts +1 -0
  33. package/types/daffodil-product-driver-shopify.d.ts +31 -43
  34. package/types/daffodil-product-driver-testing.d.ts +28 -26
  35. package/types/daffodil-product-driver.d.ts +50 -61
  36. package/types/daffodil-product-routing.d.ts +101 -110
  37. package/types/daffodil-product-state-testing.d.ts +45 -43
  38. package/types/daffodil-product-state.d.ts +347 -375
  39. package/types/daffodil-product-testing.d.ts +82 -89
  40. package/types/daffodil-product.d.ts +93 -102
  41. package/fesm2022/daffodil-product-driver-magento-testing.mjs +0 -275
  42. package/fesm2022/daffodil-product-driver-magento-testing.mjs.map +0 -1
  43. package/fesm2022/daffodil-product-driver-magento.mjs +0 -855
  44. package/fesm2022/daffodil-product-driver-magento.mjs.map +0 -1
  45. package/types/daffodil-product-driver-magento-testing.d.ts +0 -114
  46. package/types/daffodil-product-driver-magento.d.ts +0 -396
@@ -1,168 +1,159 @@
1
- import { ActivatedRouteSnapshot, RouterStateSnapshot, ParamMap, Params, Router, ActivatedRoute } from '@angular/router';
2
- import { Store, ActionsSubject } from '@ngrx/store';
3
- import * as rxjs from 'rxjs';
4
- import { Observable } from 'rxjs';
5
- import { DaffProductStateRootSlice } from '@daffodil/product/state';
6
- import * as i0 from '@angular/core';
7
- import { InjectionToken, ValueProvider, ModuleWithProviders } from '@angular/core';
8
- import { DaffRoutingUriNormalizer, DaffRoutingQueryParamFilter } from '@daffodil/core/routing';
9
- import { DaffCollectionRequest, DaffBase64Service } from '@daffodil/core';
10
- import * as _ngrx_effects from '@ngrx/effects';
11
- import { Actions } from '@ngrx/effects';
12
- import { DaffCollectionFacadeInterface } from '@daffodil/core/state';
13
-
1
+ import { ActivatedRoute, ActivatedRouteSnapshot, ParamMap, Params, Router, RouterStateSnapshot } from "@angular/router";
2
+ import { ActionsSubject, Store } from "@ngrx/store";
3
+ import { Observable } from "rxjs";
4
+ import { DaffProductStateRootSlice } from "@daffodil/product/state";
5
+ import * as i0 from "@angular/core";
6
+ import { EnvironmentProviders, InjectionToken, ModuleWithProviders, ValueProvider } from "@angular/core";
7
+ import { DaffRoutingQueryParamFilter, DaffRoutingUriNormalizer } from "@daffodil/core/routing";
8
+ import { DaffBase64Service, DaffCollectionRequest } from "@daffodil/core";
9
+ import { Actions } from "@ngrx/effects";
10
+ import { DaffCollectionFacadeInterface } from "@daffodil/core/state";
14
11
  /**
15
12
  * Resolves product data for product pages, and will only resolve the url after a product request succeeds or fails. This resolver expects a url
16
13
  * of the form `some/url/{id}` where `{id}` is the product id.
17
14
  */
18
- declare class DaffProductPageIdResolver {
19
- private platformId;
20
- private store;
21
- private dispatcher;
22
- constructor(platformId: string, store: Store<DaffProductStateRootSlice>, dispatcher: ActionsSubject);
23
- resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageIdResolver, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductPageIdResolver>;
15
+ export declare class DaffProductPageIdResolver {
16
+ private platformId;
17
+ private store;
18
+ private dispatcher;
19
+ constructor(platformId: string, store: Store<DaffProductStateRootSlice>, dispatcher: ActionsSubject);
20
+ resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageIdResolver, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
26
23
  }
27
-
28
24
  /**
29
25
  * Resolves product data for product pages, and will only resolve the url
30
26
  * after a product request succeeds or fails. This resolver will take a full
31
27
  * a url of the form `some/url.html(secondary:outlet)?query=param#fragment` and attempt to resolve a product from it.
32
28
  * Assumes that the URL to be resolved is the primary outlet.
33
29
  */
34
- declare class DaffProductPageUrlResolver {
35
- private platformId;
36
- private store;
37
- private dispatcher;
38
- private urlNormalizer;
39
- constructor(platformId: string, store: Store<DaffProductStateRootSlice>, dispatcher: ActionsSubject, urlNormalizer: DaffRoutingUriNormalizer);
40
- resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageUrlResolver, never>;
42
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductPageUrlResolver>;
30
+ export declare class DaffProductPageUrlResolver {
31
+ private platformId;
32
+ private store;
33
+ private dispatcher;
34
+ private urlNormalizer;
35
+ constructor(platformId: string, store: Store<DaffProductStateRootSlice>, dispatcher: ActionsSubject, urlNormalizer: DaffRoutingUriNormalizer);
36
+ resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageUrlResolver, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
43
39
  }
44
-
45
40
  type DaffCollectionRequestValue = DaffCollectionRequest[keyof DaffCollectionRequest];
46
41
  /**
47
42
  * Transforms for storing and retrieving {@link DaffCollectionRequest} values in a route's query params.
48
43
  */
49
- interface DaffCollectionRequestQueryParamTransform<T extends DaffCollectionRequestValue = DaffCollectionRequestValue> {
50
- /**
51
- * A function that is given the value of a query param and
52
- * returns the value that will be set to the product collection request.
53
- */
54
- request?: (queryParam: string) => T;
55
- /**
56
- * A function that is given the value of a product collection request field and
57
- * returns the value that will be set to the query params.
58
- */
59
- queryParam?: (requestValue: T) => string;
44
+ export interface DaffCollectionRequestQueryParamTransform<T extends DaffCollectionRequestValue = DaffCollectionRequestValue> {
45
+ /**
46
+ * A function that is given the value of a query param and
47
+ * returns the value that will be set to the product collection request.
48
+ */
49
+ request?: (queryParam: string) => T;
50
+ /**
51
+ * A function that is given the value of a product collection request field and
52
+ * returns the value that will be set to the query params.
53
+ */
54
+ queryParam?: (requestValue: T) => string;
60
55
  }
61
56
  /**
62
57
  * A collection of optional {@link DaffCollectionRequestQueryParamTransform}s.
63
58
  */
64
- type DaffCollectionRequestQueryParamTransforms = Partial<Record<keyof DaffCollectionRequest, DaffCollectionRequestQueryParamTransform>>;
65
-
59
+ export type DaffCollectionRequestQueryParamTransforms = Partial<Record<keyof DaffCollectionRequest, DaffCollectionRequestQueryParamTransform>>;
66
60
  /**
67
61
  * An object containing a mapping of a {@link DaffCollectionRequest} field to a query param name.
68
62
  * Setting a value for one of these fields will cause a resolver that operates on a product collection
69
63
  * to include the value of that specified query param after transforming it according to {@link DaffCollectionRequestQueryParamTransforms}.
70
64
  * Omitting a value for a field will disable using a query param for the request value.
71
65
  */
72
- type DaffCollectionRequestQueryParams = Partial<Record<keyof DaffCollectionRequest, string>>;
73
-
66
+ export type DaffCollectionRequestQueryParams = Partial<Record<keyof DaffCollectionRequest, string>>;
74
67
  /**
75
68
  * An interface for providing `@daffodil/product/routing` with necessary config values.
76
69
  */
77
- interface DaffProductRoutingConfig {
78
- /**
79
- * The query params transforms for each product collection request field.
80
- *
81
- * See {@link DaffCollectionRequestQueryParamTransforms}.
82
- */
83
- transforms?: DaffCollectionRequestQueryParamTransforms;
84
- /**
85
- * The mapping of query param fields.
86
- *
87
- * See {@link DaffCollectionRequestQueryParams}.
88
- */
89
- params?: DaffCollectionRequestQueryParams;
70
+ export interface DaffProductRoutingConfig {
71
+ /**
72
+ * The query params transforms for each product collection request field.
73
+ *
74
+ * See {@link DaffCollectionRequestQueryParamTransforms}.
75
+ */
76
+ transforms?: DaffCollectionRequestQueryParamTransforms;
77
+ /**
78
+ * The mapping of query param fields.
79
+ *
80
+ * See {@link DaffCollectionRequestQueryParams}.
81
+ */
82
+ params?: DaffCollectionRequestQueryParams;
90
83
  }
91
-
92
- declare const DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP: DaffProductRoutingConfig['params'];
84
+ export declare const DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP: DaffProductRoutingConfig['params'];
93
85
  /**
94
86
  * The default configuration for the {@link DaffProductRoutingConfig}.
95
87
  */
96
- declare const daffProductRoutingConfigDefaultFactory: (base64: DaffBase64Service) => DaffProductRoutingConfig;
97
- declare const DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT: InjectionToken<DaffProductRoutingConfig>;
98
-
99
- declare const DAFF_PRODUCT_ROUTING_CONFIG: i0.InjectionToken<DaffProductRoutingConfig>;
100
- declare const provideDaffProductRoutingConfig: <R extends DaffProductRoutingConfig = DaffProductRoutingConfig>(config: Partial<R> | i0.InjectionToken<Partial<R>>) => i0.FactoryProvider;
101
-
88
+ export declare const daffProductRoutingConfigDefaultFactory: (base64: DaffBase64Service) => DaffProductRoutingConfig;
89
+ export declare const DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT: InjectionToken<DaffProductRoutingConfig>;
90
+ export declare const DAFF_PRODUCT_ROUTING_CONFIG: import("@angular/core").InjectionToken<DaffProductRoutingConfig>, provideDaffProductRoutingConfig: <R extends DaffProductRoutingConfig = DaffProductRoutingConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
102
91
  /**
103
92
  * Builds a {@link DaffCollectionRequest} from the query params of the passed route.
104
93
  * Its behavior can be configured via the {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAMS} and
105
94
  * {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAM_TRANSFORMS} injection tokens.
106
95
  */
107
- declare class DaffProductGetCollectionRequestFromRoute {
108
- private config;
109
- private discreteFilters;
110
- constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
111
- getRequest(queryParamMap: ParamMap): DaffCollectionRequest;
112
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetCollectionRequestFromRoute, never>;
113
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGetCollectionRequestFromRoute>;
96
+ export declare class DaffProductGetCollectionRequestFromRoute {
97
+ private config;
98
+ private discreteFilters;
99
+ constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
100
+ getRequest(queryParamMap: ParamMap): DaffCollectionRequest;
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetCollectionRequestFromRoute, never>;
102
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
114
103
  }
115
-
116
104
  /**
117
105
  * Builds a query param map from a {@link DaffCollectionRequest}.
118
106
  * Its behavior can be configured via the {@link DAFF_PRODUCT_ROUTING_CONFIG} injection token.
119
107
  */
120
- declare class DaffProductGetQueryParamsFromRequest {
121
- private config;
122
- private discreteFilters;
123
- constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
124
- getQueryParams(request: DaffCollectionRequest): Params;
125
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetQueryParamsFromRequest, never>;
126
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGetQueryParamsFromRequest>;
108
+ export declare class DaffProductGetQueryParamsFromRequest {
109
+ private config;
110
+ private discreteFilters;
111
+ constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
112
+ getQueryParams(request: DaffCollectionRequest): Params;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetQueryParamsFromRequest, never>;
114
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
127
115
  }
128
-
129
116
  /**
130
117
  * A list of request fields that can be transformed to and from query params.
131
118
  */
132
- declare const DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS: (keyof DaffCollectionRequest)[];
133
-
119
+ export declare const DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS: (keyof DaffCollectionRequest)[];
134
120
  /**
135
121
  * An abstract class that provides an effect for modifying the browser URL.
136
122
  */
137
- declare abstract class DaffProductRoutingCollectionEffects {
138
- private actions$;
139
- private router;
140
- private actionTypes;
141
- private facade;
142
- private getQueryParams;
143
- private route;
144
- constructor(actions$: Actions, router: Router, actionTypes: string[], facade: DaffCollectionFacadeInterface, getQueryParams: DaffProductGetQueryParamsFromRequest, route: ActivatedRoute);
145
- /**
146
- * Updates the URL according to the product collection request in state.
147
- */
148
- update$: rxjs.Observable<never> & _ngrx_effects.CreateEffectMetadata;
123
+ export declare abstract class DaffProductRoutingCollectionEffects {
124
+ private actions$;
125
+ private router;
126
+ private actionTypes;
127
+ private facade;
128
+ private getQueryParams;
129
+ private route;
130
+ constructor(actions$: Actions, router: Router, actionTypes: string[], facade: DaffCollectionFacadeInterface, getQueryParams: DaffProductGetQueryParamsFromRequest, route: ActivatedRoute);
131
+ /**
132
+ * Updates the URL according to the product collection request in state.
133
+ */
134
+ update$: import("rxjs").Observable<never> & import("@ngrx/effects").CreateEffectMetadata;
149
135
  }
150
-
151
- declare const DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS: i0.InjectionToken<DaffRoutingQueryParamFilter[]>;
136
+ export declare const DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS: import("@angular/core").InjectionToken<DaffRoutingQueryParamFilter[]>;
152
137
  /**
153
138
  * A multi-provider for {@link DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS}.
154
139
  *
155
140
  * @param queryParam Defaults to `filterName`.
156
141
  * @param builder Defaults to {@link daffRoutingQueryParamFilterRequestEqualBuilder}.
157
142
  */
158
- declare function daffProductRoutingProvideDiscreteFilterParam(filterName: DaffRoutingQueryParamFilter['filterName'], queryParam?: DaffRoutingQueryParamFilter['queryParam'], builder?: DaffRoutingQueryParamFilter['builder']): ValueProvider;
159
-
160
- declare class DaffProductRoutingModule {
161
- static withConfig(config?: DaffProductRoutingConfig): ModuleWithProviders<DaffProductRoutingModule>;
162
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductRoutingModule, never>;
163
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductRoutingModule, never, never, never>;
164
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductRoutingModule>;
143
+ export declare function daffProductRoutingProvideDiscreteFilterParam(filterName: DaffRoutingQueryParamFilter['filterName'], queryParam?: DaffRoutingQueryParamFilter['queryParam'], builder?: DaffRoutingQueryParamFilter['builder']): ValueProvider;
144
+ /**
145
+ * @deprecated in favor of {@link provideDaffProductRouting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
146
+ */
147
+ export declare class DaffProductRoutingModule {
148
+ static withConfig(config?: DaffProductRoutingConfig): ModuleWithProviders<DaffProductRoutingModule>;
149
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductRoutingModule, never>;
150
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductRoutingModule, never, never, never>;
151
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductRoutingModule>;
165
152
  }
166
-
167
- export { DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS, DAFF_PRODUCT_ROUTING_CONFIG, DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT, DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS, DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP, DaffProductGetCollectionRequestFromRoute, DaffProductGetQueryParamsFromRequest, DaffProductPageIdResolver, DaffProductPageUrlResolver, DaffProductRoutingCollectionEffects, DaffProductRoutingModule, daffProductRoutingConfigDefaultFactory, daffProductRoutingProvideDiscreteFilterParam, provideDaffProductRoutingConfig };
168
- export type { DaffCollectionRequestQueryParamTransform, DaffCollectionRequestQueryParamTransforms, DaffCollectionRequestQueryParams, DaffProductRoutingConfig };
153
+ /**
154
+ * Provides the `@daffodil/product/routing` services.
155
+ * The {@link DAFF_PRODUCT_ROUTING_CONFIG} is only provided when a config is passed;
156
+ * otherwise, the token's default (or a config provided elsewhere) is used.
157
+ */
158
+ export declare const provideDaffProductRouting: (config?: DaffProductRoutingConfig) => EnvironmentProviders;
159
+ export {};
@@ -1,56 +1,58 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import { DaffProduct } from '@daffodil/product';
3
- import { DaffProductFacadeInterface, DaffProductGridFacadeInterface, DaffProductPageFacadeInterface } from '@daffodil/product/state';
4
- import * as i0 from '@angular/core';
5
- import { DaffState, DaffStateError } from '@daffodil/core/state';
6
-
1
+ import { BehaviorSubject } from "rxjs";
2
+ import { DaffProduct } from "@daffodil/product";
3
+ import { DaffProductFacadeInterface, DaffProductGridFacadeInterface, DaffProductPageFacadeInterface } from "@daffodil/product/state";
4
+ import * as i0 from "@angular/core";
5
+ import { EnvironmentProviders } from "@angular/core";
6
+ import { DaffState, DaffStateError } from "@daffodil/core/state";
7
7
  /**
8
8
  * @inheritdoc
9
9
  */
10
- declare class MockDaffProductFacade implements DaffProductFacadeInterface {
11
- getProduct(id: DaffProduct['id']): BehaviorSubject<DaffProduct>;
12
- getPrice(id: DaffProduct['id']): BehaviorSubject<number>;
13
- hasDiscount(id: DaffProduct['id']): BehaviorSubject<boolean>;
14
- getDiscountAmount(id: DaffProduct['id']): BehaviorSubject<number>;
15
- getDiscountedPrice(id: DaffProduct['id']): BehaviorSubject<number>;
16
- getDiscountPercent(id: DaffProduct['id']): BehaviorSubject<number>;
17
- isOutOfStock(id: DaffProduct['id']): BehaviorSubject<boolean>;
18
- dispatch(action: any): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductFacade, never>;
20
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffProductFacade>;
10
+ export declare class MockDaffProductFacade implements DaffProductFacadeInterface {
11
+ getProduct(id: DaffProduct['id']): BehaviorSubject<DaffProduct>;
12
+ getPrice(id: DaffProduct['id']): BehaviorSubject<number>;
13
+ hasDiscount(id: DaffProduct['id']): BehaviorSubject<boolean>;
14
+ getDiscountAmount(id: DaffProduct['id']): BehaviorSubject<number>;
15
+ getDiscountedPrice(id: DaffProduct['id']): BehaviorSubject<number>;
16
+ getDiscountPercent(id: DaffProduct['id']): BehaviorSubject<number>;
17
+ isOutOfStock(id: DaffProduct['id']): BehaviorSubject<boolean>;
18
+ dispatch(action: any): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductFacade, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
21
21
  }
22
-
23
22
  /**
24
23
  * @inheritdoc
25
24
  */
26
- declare class MockDaffProductGridFacade implements DaffProductGridFacadeInterface {
27
- loading$: BehaviorSubject<boolean>;
28
- products$: BehaviorSubject<DaffProduct[]>;
29
- dispatch(action: any): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductGridFacade, never>;
31
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffProductGridFacade>;
25
+ export declare class MockDaffProductGridFacade implements DaffProductGridFacadeInterface {
26
+ loading$: BehaviorSubject<boolean>;
27
+ products$: BehaviorSubject<DaffProduct[]>;
28
+ dispatch(action: any): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductGridFacade, never>;
30
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
32
31
  }
33
-
34
32
  /**
35
33
  * @inheritdoc
36
34
  */
37
- declare class MockDaffProductPageFacade implements DaffProductPageFacadeInterface {
38
- loadingState$: BehaviorSubject<DaffState>;
39
- loading$: BehaviorSubject<boolean>;
40
- mutating$: BehaviorSubject<boolean>;
41
- resolving$: BehaviorSubject<boolean>;
42
- errors$: BehaviorSubject<DaffStateError[]>;
43
- hasErrors$: BehaviorSubject<boolean>;
44
- product$: BehaviorSubject<DaffProduct>;
45
- dispatch(action: any): void;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductPageFacade, never>;
47
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffProductPageFacade>;
35
+ export declare class MockDaffProductPageFacade implements DaffProductPageFacadeInterface {
36
+ loadingState$: BehaviorSubject<DaffState>;
37
+ loading$: BehaviorSubject<boolean>;
38
+ mutating$: BehaviorSubject<boolean>;
39
+ resolving$: BehaviorSubject<boolean>;
40
+ errors$: BehaviorSubject<DaffStateError[]>;
41
+ hasErrors$: BehaviorSubject<boolean>;
42
+ product$: BehaviorSubject<DaffProduct>;
43
+ dispatch(action: any): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffProductPageFacade, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
48
46
  }
49
-
50
- declare class DaffProductStateTestingModule {
51
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductStateTestingModule, never>;
52
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductStateTestingModule, never, never, never>;
53
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductStateTestingModule>;
47
+ /**
48
+ * @deprecated in favor of {@link provideDaffProductStateTesting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
49
+ */
50
+ export declare class DaffProductStateTestingModule {
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductStateTestingModule, never>;
52
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductStateTestingModule, never, never, never>;
53
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductStateTestingModule>;
54
54
  }
55
-
56
- export { DaffProductStateTestingModule, MockDaffProductFacade, MockDaffProductGridFacade, MockDaffProductPageFacade };
55
+ /**
56
+ * Provides the mock product facades in place of the real ones.
57
+ */
58
+ export declare const provideDaffProductStateTesting: () => EnvironmentProviders;