@daffodil/category 0.84.0 → 0.86.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-category-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-category-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-magento-testing.mjs +11 -11
- package/fesm2022/daffodil-category-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-magento.mjs +19 -19
- package/fesm2022/daffodil-category-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-category-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-category-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-routing.mjs +17 -17
- package/fesm2022/daffodil-category-routing.mjs.map +1 -1
- package/fesm2022/daffodil-category-state-testing.mjs +7 -7
- package/fesm2022/daffodil-category-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-category-state.mjs +24 -24
- package/fesm2022/daffodil-category-state.mjs.map +1 -1
- package/fesm2022/daffodil-category-testing.mjs +21 -21
- package/fesm2022/daffodil-category-testing.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isPlatformBrowser } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { PLATFORM_ID,
|
3
|
+
import { PLATFORM_ID, Inject, Injectable, inject, NgModule } from '@angular/core';
|
4
4
|
import * as i1$2 from '@ngrx/effects';
|
5
5
|
import { ofType, EffectsModule } from '@ngrx/effects';
|
6
6
|
import * as i1 from '@ngrx/store';
|
@@ -46,10 +46,10 @@ class DaffCategoryPageIdResolver {
|
|
46
46
|
}));
|
47
47
|
return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction), map(() => true), take(1));
|
48
48
|
}
|
49
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
50
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
49
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageIdResolver, deps: [{ token: PLATFORM_ID }, { token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER }, { token: i1.Store }, { token: i1.ActionsSubject }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
50
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageIdResolver }); }
|
51
51
|
}
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageIdResolver, decorators: [{
|
53
53
|
type: Injectable
|
54
54
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
55
55
|
type: Inject,
|
@@ -75,10 +75,10 @@ class DaffCategoryRoutingUrlRequestBuilder {
|
|
75
75
|
kind: DaffCategoryRequestKind.URL,
|
76
76
|
};
|
77
77
|
}
|
78
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
79
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingUrlRequestBuilder, deps: [{ token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER }, { token: i1$1.DaffRoutingUriNormalizer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
79
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingUrlRequestBuilder, providedIn: 'any' }); }
|
80
80
|
}
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingUrlRequestBuilder, decorators: [{
|
82
82
|
type: Injectable,
|
83
83
|
args: [{
|
84
84
|
providedIn: 'any',
|
@@ -105,10 +105,10 @@ class DaffCategoryPageUrlResolver {
|
|
105
105
|
this.store.dispatch(new DaffCategoryPageLoadByUrl(this.requestBuilder.build(route, state)));
|
106
106
|
return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction), map(() => true), take(1));
|
107
107
|
}
|
108
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
109
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
108
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageUrlResolver, deps: [{ token: PLATFORM_ID }, { token: i1.Store }, { token: i1.ActionsSubject }, { token: DaffCategoryRoutingUrlRequestBuilder }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
109
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageUrlResolver }); }
|
110
110
|
}
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageUrlResolver, decorators: [{
|
112
112
|
type: Injectable
|
113
113
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
114
114
|
type: Inject,
|
@@ -144,17 +144,17 @@ class DaffCategoryRoutingCollectionEffects extends DaffProductRoutingCollectionE
|
|
144
144
|
constructor(actions$, router, collectionFacade, getQueryParams, route) {
|
145
145
|
super(actions$, router, Object.values(DaffCategoryPageProductCollectionActionTypes), collectionFacade, getQueryParams, route);
|
146
146
|
}
|
147
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
148
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
147
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingCollectionEffects, deps: [{ token: i1$2.Actions }, { token: i2.Router }, { token: i3.DaffCategoryProductCollectionFacade }, { token: i4.DaffProductGetQueryParamsFromRequest }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
148
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingCollectionEffects }); }
|
149
149
|
}
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingCollectionEffects, decorators: [{
|
151
151
|
type: Injectable
|
152
152
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2.Router }, { type: i3.DaffCategoryProductCollectionFacade }, { type: i4.DaffProductGetQueryParamsFromRequest }, { type: i2.ActivatedRoute }] });
|
153
153
|
|
154
154
|
class DaffCategoryRoutingModule {
|
155
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
156
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
157
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
155
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
156
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingModule, imports: [DaffProductRoutingModule, i1$2.EffectsFeatureModule] }); }
|
157
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingModule, providers: [
|
158
158
|
DaffCategoryPageIdResolver,
|
159
159
|
DaffCategoryPageUrlResolver,
|
160
160
|
DaffCategoryRoutingUrlRequestBuilder,
|
@@ -179,7 +179,7 @@ class DaffCategoryRoutingModule {
|
|
179
179
|
DaffCategoryRoutingCollectionEffects,
|
180
180
|
])] }); }
|
181
181
|
}
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryRoutingModule, decorators: [{
|
183
183
|
type: NgModule,
|
184
184
|
args: [{
|
185
185
|
imports: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-category-routing.mjs","sources":["../../../libs/category/routing/src/injection-tokens/request/builder.token.ts","../../../libs/category/routing/src/resolvers/category-page-id/category-page-id.resolver.ts","../../../libs/category/routing/src/services/url-request-builder.service.ts","../../../libs/category/routing/src/resolvers/category-page-url/category-page-url.resolver.ts","../../../libs/category/routing/src/injection-tokens/request/builders.token.ts","../../../libs/category/routing/src/effects/collection-route.effects.ts","../../../libs/category/routing/src/module.ts","../../../libs/category/routing/src/daffodil-category-routing.ts"],"sourcesContent":["import { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DaffCategoryRoutingRequestBuilder } from './builders.token';\n\n\nexport const {\n /**\n * An internal token to combine the {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS} into a single builder.\n */\n token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER,\n /**\n * Provider function for {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER}.\n */\n provider: provideDaffCategoryRoutingOptionsBuilder,\n} = createSingleInjectionToken<DaffCategoryRoutingRequestBuilder>(\n 'DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER',\n {\n factory: () => () => ({}),\n },\n);\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { ofType } from '@ngrx/effects';\nimport {\n ActionsSubject,\n Store,\n} from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n map,\n take,\n} from 'rxjs/operators';\n\nimport { DaffCategoryRequestKind } from '@daffodil/category';\nimport {\n DaffCategoryReducersState,\n DaffCategoryPageLoad,\n DaffCategoryPageActionTypes,\n} from '@daffodil/category/state';\n\nimport { DaffCategoryRoutingRequestBuilder } from '../../injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from '../../injection-tokens/request/builder.token';\n\n/**\n * Resolves category data for category pages, and will only resolve the url after a category request succeeds or fails. This resolver expects a url\n * of the form `some/url/{id}` where `{id}` is the category id.\n */\n@Injectable()\nexport class DaffCategoryPageIdResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n @Inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER) private requestBuilder: DaffCategoryRoutingRequestBuilder,\n private store: Store<DaffCategoryReducersState>,\n private dispatcher: ActionsSubject,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffCategoryPageLoad({\n ...this.requestBuilder(route),\n id: route.paramMap.get('id'),\n kind: DaffCategoryRequestKind.ID,\n }));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n} from '@angular/router';\n\nimport {\n DaffCategoryRequestKind,\n DaffCategoryUrlRequest,\n} from '@daffodil/category';\nimport { DaffRoutingUriNormalizer } from '@daffodil/core/routing';\n\nimport { DaffCategoryRoutingRequestBuilder } from '../injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from '../injection-tokens/request/builder.token';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class DaffCategoryRoutingUrlRequestBuilder {\n constructor(\n @Inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER) private requestBuilder: DaffCategoryRoutingRequestBuilder,\n private urlNormalizer: DaffRoutingUriNormalizer,\n ) { }\n\n /**\n * Builds a category URL request from the provided route and router state that\n * is suitable for passing to {@link DaffCategoryPageLoadByUrl}.\n */\n build(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): DaffCategoryUrlRequest {\n return {\n ...this.requestBuilder(route),\n url: this.urlNormalizer.normalize(state.url),\n kind: DaffCategoryRequestKind.URL,\n };\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n} from '@angular/router';\nimport { ofType } from '@ngrx/effects';\nimport {\n ActionsSubject,\n Store,\n} from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n map,\n take,\n} from 'rxjs/operators';\n\nimport {\n DaffCategoryReducersState,\n DaffCategoryPageActionTypes,\n DaffCategoryPageLoadByUrl,\n} from '@daffodil/category/state';\n\nimport { DaffCategoryRoutingUrlRequestBuilder } from '../../services/public_api';\n\n/**\n * Resolves category data for category pages, and will only resolve the url\n * after a category request succeeds or fails. This resolver will take a full\n * a url of the form `some/url.html(secondary:outlet)?query=param#fragment` and attempt to resolve a product from it.\n * Assumes that the URL to be resolved is the primary outlet.\n */\n@Injectable()\nexport class DaffCategoryPageUrlResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffCategoryReducersState>,\n private dispatcher: ActionsSubject,\n private requestBuilder: DaffCategoryRoutingUrlRequestBuilder,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffCategoryPageLoadByUrl(this.requestBuilder.build(route, state)));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n createMultiInjectionToken,\n} from '@daffodil/core';\n\nexport type DaffCategoryRoutingRequestBuilder<T extends DaffCollectionRequest = DaffCollectionRequest> = (route: ActivatedRouteSnapshot) => T;\n\nexport const {\n /**\n * A multi-provider injection token for category request builders.\n * These builders are called with the requested route during the resolve step\n * and return options to pass to the category driver.\n */\n token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n\n /**\n * Provides category request builders for the routing layer.\n *\n * See {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffCategoryRoutingRequestBuilders(\n * route => ({\n * currentPage: route.queryParams.page\n * })\n * )\n * ]\n * ```\n */\n provider: provideDaffCategoryRoutingRequestBuilders,\n} = createMultiInjectionToken<DaffCategoryRoutingRequestBuilder>('DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS');\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport { Actions } from '@ngrx/effects';\n\nimport {\n DaffCategoryPageProductCollectionActionTypes,\n DaffCategoryProductCollectionFacade,\n} from '@daffodil/category/state';\nimport {\n DaffProductGetQueryParamsFromRequest,\n DaffProductRoutingCollectionEffects,\n} from '@daffodil/product/routing';\n\n@Injectable()\nexport class DaffCategoryRoutingCollectionEffects extends DaffProductRoutingCollectionEffects {\n constructor(\n actions$: Actions,\n router: Router,\n collectionFacade: DaffCategoryProductCollectionFacade,\n getQueryParams: DaffProductGetQueryParamsFromRequest,\n route: ActivatedRoute,\n ) {\n super(\n actions$,\n router,\n Object.values(DaffCategoryPageProductCollectionActionTypes),\n collectionFacade,\n getQueryParams,\n route,\n );\n }\n}\n","import {\n inject,\n NgModule,\n} from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { EffectsModule } from '@ngrx/effects';\n\nimport {\n DaffProductGetCollectionRequestFromRoute,\n DaffProductRoutingModule,\n} from '@daffodil/product/routing';\n\nimport { DaffCategoryRoutingCollectionEffects } from './effects/collection-route.effects';\nimport {\n DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n DaffCategoryRoutingRequestBuilder,\n} from './injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from './injection-tokens/request/builder.token';\nimport {\n DaffCategoryPageIdResolver,\n DaffCategoryPageUrlResolver,\n} from './resolvers/public_api';\nimport { DaffCategoryRoutingUrlRequestBuilder } from './services/public_api';\n\n@NgModule({\n imports: [\n DaffProductRoutingModule,\n EffectsModule.forFeature([\n DaffCategoryRoutingCollectionEffects,\n ]),\n ],\n providers: [\n DaffCategoryPageIdResolver,\n DaffCategoryPageUrlResolver,\n DaffCategoryRoutingUrlRequestBuilder,\n {\n provide: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n useFactory: () => {\n const service = inject(DaffProductGetCollectionRequestFromRoute);\n const builder: DaffCategoryRoutingRequestBuilder = route => service.getRequest(route.queryParamMap);\n return builder;\n },\n multi: true,\n },\n {\n provide: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER,\n useFactory: () => {\n const builders = inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS);\n return (route: ActivatedRouteSnapshot) =>\n Object.assign({}, ...builders.map(builder => builder(route)));\n },\n },\n ],\n})\nexport class DaffCategoryRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffCategoryRoutingUrlRequestBuilder"],"mappings":";;;;;;;;;;;;;;;;;AAKO,MAAM;AACX;;AAEG;AACH,KAAK,EAAE,qCAAqC;AAC5C;;AAEG;AACH,QAAQ,EAAE,wCAAwC,GACnD,GAAG,0BAA0B,CAC5B,uCAAuC,EACvC;IACE,OAAO,EAAE,MAAM,OAAO,EAAE,CAAC;AAC1B,CAAA,CACF;;ACYD;;;AAGG;MAEU,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAC+B,UAAkB,EACQ,cAAiD,EAChG,KAAuC,EACvC,UAA0B,EAAA;QAHL,IAAU,CAAA,UAAA,GAAV,UAAU;QACgB,IAAc,CAAA,cAAA,GAAd,cAAc;QAC7D,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAU,CAAA,UAAA,GAAV,UAAU;;AAGpB,IAAA,OAAO,CAAC,KAA6B,EAAA;AACnC,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,oBAAoB,CAAC;AAC3C,YAAA,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;YAC7B,EAAE,EAAE,KA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BAAA;AACF,qBAAA;AACF,iBAAA;;;ACrDD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"daffodil-category-routing.mjs","sources":["../../../libs/category/routing/src/injection-tokens/request/builder.token.ts","../../../libs/category/routing/src/resolvers/category-page-id/category-page-id.resolver.ts","../../../libs/category/routing/src/services/url-request-builder.service.ts","../../../libs/category/routing/src/resolvers/category-page-url/category-page-url.resolver.ts","../../../libs/category/routing/src/injection-tokens/request/builders.token.ts","../../../libs/category/routing/src/effects/collection-route.effects.ts","../../../libs/category/routing/src/module.ts","../../../libs/category/routing/src/daffodil-category-routing.ts"],"sourcesContent":["import { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DaffCategoryRoutingRequestBuilder } from './builders.token';\n\n\nexport const {\n /**\n * An internal token to combine the {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS} into a single builder.\n */\n token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER,\n /**\n * Provider function for {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER}.\n */\n provider: provideDaffCategoryRoutingOptionsBuilder,\n} = createSingleInjectionToken<DaffCategoryRoutingRequestBuilder>(\n 'DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER',\n {\n factory: () => () => ({}),\n },\n);\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { ofType } from '@ngrx/effects';\nimport {\n ActionsSubject,\n Store,\n} from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n map,\n take,\n} from 'rxjs/operators';\n\nimport { DaffCategoryRequestKind } from '@daffodil/category';\nimport {\n DaffCategoryReducersState,\n DaffCategoryPageLoad,\n DaffCategoryPageActionTypes,\n} from '@daffodil/category/state';\n\nimport { DaffCategoryRoutingRequestBuilder } from '../../injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from '../../injection-tokens/request/builder.token';\n\n/**\n * Resolves category data for category pages, and will only resolve the url after a category request succeeds or fails. This resolver expects a url\n * of the form `some/url/{id}` where `{id}` is the category id.\n */\n@Injectable()\nexport class DaffCategoryPageIdResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n @Inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER) private requestBuilder: DaffCategoryRoutingRequestBuilder,\n private store: Store<DaffCategoryReducersState>,\n private dispatcher: ActionsSubject,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffCategoryPageLoad({\n ...this.requestBuilder(route),\n id: route.paramMap.get('id'),\n kind: DaffCategoryRequestKind.ID,\n }));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n} from '@angular/router';\n\nimport {\n DaffCategoryRequestKind,\n DaffCategoryUrlRequest,\n} from '@daffodil/category';\nimport { DaffRoutingUriNormalizer } from '@daffodil/core/routing';\n\nimport { DaffCategoryRoutingRequestBuilder } from '../injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from '../injection-tokens/request/builder.token';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class DaffCategoryRoutingUrlRequestBuilder {\n constructor(\n @Inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER) private requestBuilder: DaffCategoryRoutingRequestBuilder,\n private urlNormalizer: DaffRoutingUriNormalizer,\n ) { }\n\n /**\n * Builds a category URL request from the provided route and router state that\n * is suitable for passing to {@link DaffCategoryPageLoadByUrl}.\n */\n build(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): DaffCategoryUrlRequest {\n return {\n ...this.requestBuilder(route),\n url: this.urlNormalizer.normalize(state.url),\n kind: DaffCategoryRequestKind.URL,\n };\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n} from '@angular/router';\nimport { ofType } from '@ngrx/effects';\nimport {\n ActionsSubject,\n Store,\n} from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n map,\n take,\n} from 'rxjs/operators';\n\nimport {\n DaffCategoryReducersState,\n DaffCategoryPageActionTypes,\n DaffCategoryPageLoadByUrl,\n} from '@daffodil/category/state';\n\nimport { DaffCategoryRoutingUrlRequestBuilder } from '../../services/public_api';\n\n/**\n * Resolves category data for category pages, and will only resolve the url\n * after a category request succeeds or fails. This resolver will take a full\n * a url of the form `some/url.html(secondary:outlet)?query=param#fragment` and attempt to resolve a product from it.\n * Assumes that the URL to be resolved is the primary outlet.\n */\n@Injectable()\nexport class DaffCategoryPageUrlResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffCategoryReducersState>,\n private dispatcher: ActionsSubject,\n private requestBuilder: DaffCategoryRoutingUrlRequestBuilder,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffCategoryPageLoadByUrl(this.requestBuilder.build(route, state)));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffCategoryPageActionTypes.CategoryPageLoadSuccessAction, DaffCategoryPageActionTypes.CategoryPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n createMultiInjectionToken,\n} from '@daffodil/core';\n\nexport type DaffCategoryRoutingRequestBuilder<T extends DaffCollectionRequest = DaffCollectionRequest> = (route: ActivatedRouteSnapshot) => T;\n\nexport const {\n /**\n * A multi-provider injection token for category request builders.\n * These builders are called with the requested route during the resolve step\n * and return options to pass to the category driver.\n */\n token: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n\n /**\n * Provides category request builders for the routing layer.\n *\n * See {@link DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffCategoryRoutingRequestBuilders(\n * route => ({\n * currentPage: route.queryParams.page\n * })\n * )\n * ]\n * ```\n */\n provider: provideDaffCategoryRoutingRequestBuilders,\n} = createMultiInjectionToken<DaffCategoryRoutingRequestBuilder>('DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS');\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport { Actions } from '@ngrx/effects';\n\nimport {\n DaffCategoryPageProductCollectionActionTypes,\n DaffCategoryProductCollectionFacade,\n} from '@daffodil/category/state';\nimport {\n DaffProductGetQueryParamsFromRequest,\n DaffProductRoutingCollectionEffects,\n} from '@daffodil/product/routing';\n\n@Injectable()\nexport class DaffCategoryRoutingCollectionEffects extends DaffProductRoutingCollectionEffects {\n constructor(\n actions$: Actions,\n router: Router,\n collectionFacade: DaffCategoryProductCollectionFacade,\n getQueryParams: DaffProductGetQueryParamsFromRequest,\n route: ActivatedRoute,\n ) {\n super(\n actions$,\n router,\n Object.values(DaffCategoryPageProductCollectionActionTypes),\n collectionFacade,\n getQueryParams,\n route,\n );\n }\n}\n","import {\n inject,\n NgModule,\n} from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { EffectsModule } from '@ngrx/effects';\n\nimport {\n DaffProductGetCollectionRequestFromRoute,\n DaffProductRoutingModule,\n} from '@daffodil/product/routing';\n\nimport { DaffCategoryRoutingCollectionEffects } from './effects/collection-route.effects';\nimport {\n DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n DaffCategoryRoutingRequestBuilder,\n} from './injection-tokens/public_api';\nimport { DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER } from './injection-tokens/request/builder.token';\nimport {\n DaffCategoryPageIdResolver,\n DaffCategoryPageUrlResolver,\n} from './resolvers/public_api';\nimport { DaffCategoryRoutingUrlRequestBuilder } from './services/public_api';\n\n@NgModule({\n imports: [\n DaffProductRoutingModule,\n EffectsModule.forFeature([\n DaffCategoryRoutingCollectionEffects,\n ]),\n ],\n providers: [\n DaffCategoryPageIdResolver,\n DaffCategoryPageUrlResolver,\n DaffCategoryRoutingUrlRequestBuilder,\n {\n provide: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS,\n useFactory: () => {\n const service = inject(DaffProductGetCollectionRequestFromRoute);\n const builder: DaffCategoryRoutingRequestBuilder = route => service.getRequest(route.queryParamMap);\n return builder;\n },\n multi: true,\n },\n {\n provide: DAFF_CATEGORY_ROUTING_OPTIONS_BUILDER,\n useFactory: () => {\n const builders = inject(DAFF_CATEGORY_ROUTING_OPTIONS_BUILDERS);\n return (route: ActivatedRouteSnapshot) =>\n Object.assign({}, ...builders.map(builder => builder(route)));\n },\n },\n ],\n})\nexport class DaffCategoryRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffCategoryRoutingUrlRequestBuilder"],"mappings":";;;;;;;;;;;;;;;;;AAKO,MAAM;AACX;;AAEG;AACH,KAAK,EAAE,qCAAqC;AAC5C;;AAEG;AACH,QAAQ,EAAE,wCAAwC,GACnD,GAAG,0BAA0B,CAC5B,uCAAuC,EACvC;IACE,OAAO,EAAE,MAAM,OAAO,EAAE,CAAC;AAC1B,CAAA,CACF;;ACYD;;;AAGG;MAEU,0BAA0B,CAAA;AACrC,IAAA,WAAA,CAC+B,UAAkB,EACQ,cAAiD,EAChG,KAAuC,EACvC,UAA0B,EAAA;QAHL,IAAU,CAAA,UAAA,GAAV,UAAU;QACgB,IAAc,CAAA,cAAA,GAAd,cAAc;QAC7D,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IA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QAAQ,GAAG,MAAM,CAAC,sCAAsC,CAAC;gCAC/D,QAAO,CAAC,KAA6B,KACnC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,GAAG,EAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,EAAC,CAAC;AACjE,6BAAC,CAAA;AACF,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACrDD;;AAEG;;;;"}
|
@@ -35,10 +35,10 @@ class MockDaffCategoryFacade {
|
|
35
35
|
;
|
36
36
|
dispatch(action) { }
|
37
37
|
;
|
38
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
39
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
38
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MockDaffCategoryFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
39
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MockDaffCategoryFacade, providedIn: 'root' }); }
|
40
40
|
}
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MockDaffCategoryFacade, decorators: [{
|
42
42
|
type: Injectable,
|
43
43
|
args: [{ providedIn: 'root' }]
|
44
44
|
}] });
|
@@ -47,14 +47,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
47
47
|
* A module that mocks out the {@link DaffCategoryFacade} with {@link MockDaffCategoryFacade} for testing environments.
|
48
48
|
*/
|
49
49
|
class DaffCategoryStateTestingModule {
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
51
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
52
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
51
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateTestingModule }); }
|
52
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateTestingModule, providers: [
|
53
53
|
{ provide: DaffCategoryFacade, useExisting: MockDaffCategoryFacade },
|
54
54
|
{ provide: DaffCategoryProductCollectionFacade, useExisting: MockDaffCollectionFacade },
|
55
55
|
] }); }
|
56
56
|
}
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateTestingModule, decorators: [{
|
58
58
|
type: NgModule,
|
59
59
|
args: [{
|
60
60
|
providers: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-category-state-testing.mjs","sources":["../../../libs/category/state/testing/src/mock-category-facade.ts","../../../libs/category/state/testing/src/category-testing.module.ts","../../../libs/category/state/testing/src/daffodil-category-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffCategory } from '@daffodil/category';\nimport { DaffCategoryFacadeInterface } from '@daffodil/category/state';\nimport { DaffCategoryReducerState } from '@daffodil/category/state';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffProduct } from '@daffodil/product';\n\n/**\n * Can be used to mock out the {@link DaffCategoryFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCategoryFacade implements DaffCategoryFacadeInterface {\n category$: BehaviorSubject<DaffCategory> = new BehaviorSubject(null);\n loadingState$: BehaviorSubject<DaffCategoryReducerState['daffState']> = new BehaviorSubject(null);\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n mutating$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n resolving$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n hasErrors$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n products$: BehaviorSubject<DaffProduct[]> = new BehaviorSubject([]);\n errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([]);\n isCategoryEmpty$: BehaviorSubject<boolean> = new BehaviorSubject(true);\n\n getCategoryById(id: DaffCategory['id']): BehaviorSubject<DaffCategory> {\n return new BehaviorSubject(null);\n };\n\n getProductsByCategory(categoryId: DaffCategory['id']): BehaviorSubject<DaffProduct[]> {\n return new BehaviorSubject([]);\n };\n\n getTotalProductsByCategory(categoryId: DaffCategory['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n };\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffCategoryFacade,\n DaffCategoryProductCollectionFacade,\n} from '@daffodil/category/state';\nimport { MockDaffCollectionFacade } from '@daffodil/core/state/testing';\n\nimport { MockDaffCategoryFacade } from './mock-category-facade';\n\n/**\n * A module that mocks out the {@link DaffCategoryFacade} with {@link MockDaffCategoryFacade} for testing environments.\n */\n@NgModule({\n providers: [\n { provide: DaffCategoryFacade, useExisting: MockDaffCategoryFacade },\n { provide: DaffCategoryProductCollectionFacade, useExisting: MockDaffCollectionFacade },\n ],\n})\nexport class DaffCategoryStateTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAUA;;;;AAIG;MAEU,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAAkC,IAAI,eAAe,CAAC,IAAI,CAAC;AACpE,QAAA,IAAA,CAAA,aAAa,GAA2D,IAAI,eAAe,CAAC,IAAI,CAAC;AACjG,QAAA,IAAA,CAAA,QAAQ,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AAC/D,QAAA,IAAA,CAAA,SAAS,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AAChE,QAAA,IAAA,CAAA,UAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AACjE,QAAA,IAAA,CAAA,UAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AACjE,QAAA,IAAA,CAAA,SAAS,GAAmC,IAAI,eAAe,CAAC,EAAE,CAAC;AACnE,QAAA,IAAA,CAAA,OAAO,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC;AACpE,QAAA,IAAA,CAAA,gBAAgB,GAA6B,IAAI,eAAe,CAAC,IAAI,CAAC;AAevE;AAbC,IAAA,eAAe,CAAC,EAAsB,EAAA;AACpC,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC;;;AAGlC,IAAA,qBAAqB,CAAC,UAA8B,EAAA;AAClD,QAAA,OAAO,IAAI,eAAe,CAAC,EAAE,CAAC;;;AAGhC,IAAA,0BAA0B,CAAC,UAA8B,EAAA;AACvD,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC;;;IAGlC,QAAQ,CAAC,MAAc,EAAA;;
|
1
|
+
{"version":3,"file":"daffodil-category-state-testing.mjs","sources":["../../../libs/category/state/testing/src/mock-category-facade.ts","../../../libs/category/state/testing/src/category-testing.module.ts","../../../libs/category/state/testing/src/daffodil-category-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffCategory } from '@daffodil/category';\nimport { DaffCategoryFacadeInterface } from '@daffodil/category/state';\nimport { DaffCategoryReducerState } from '@daffodil/category/state';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffProduct } from '@daffodil/product';\n\n/**\n * Can be used to mock out the {@link DaffCategoryFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCategoryFacade implements DaffCategoryFacadeInterface {\n category$: BehaviorSubject<DaffCategory> = new BehaviorSubject(null);\n loadingState$: BehaviorSubject<DaffCategoryReducerState['daffState']> = new BehaviorSubject(null);\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n mutating$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n resolving$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n hasErrors$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n products$: BehaviorSubject<DaffProduct[]> = new BehaviorSubject([]);\n errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([]);\n isCategoryEmpty$: BehaviorSubject<boolean> = new BehaviorSubject(true);\n\n getCategoryById(id: DaffCategory['id']): BehaviorSubject<DaffCategory> {\n return new BehaviorSubject(null);\n };\n\n getProductsByCategory(categoryId: DaffCategory['id']): BehaviorSubject<DaffProduct[]> {\n return new BehaviorSubject([]);\n };\n\n getTotalProductsByCategory(categoryId: DaffCategory['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n };\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffCategoryFacade,\n DaffCategoryProductCollectionFacade,\n} from '@daffodil/category/state';\nimport { MockDaffCollectionFacade } from '@daffodil/core/state/testing';\n\nimport { MockDaffCategoryFacade } from './mock-category-facade';\n\n/**\n * A module that mocks out the {@link DaffCategoryFacade} with {@link MockDaffCategoryFacade} for testing environments.\n */\n@NgModule({\n providers: [\n { provide: DaffCategoryFacade, useExisting: MockDaffCategoryFacade },\n { provide: DaffCategoryProductCollectionFacade, useExisting: MockDaffCollectionFacade },\n ],\n})\nexport class DaffCategoryStateTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAUA;;;;AAIG;MAEU,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAAkC,IAAI,eAAe,CAAC,IAAI,CAAC;AACpE,QAAA,IAAA,CAAA,aAAa,GAA2D,IAAI,eAAe,CAAC,IAAI,CAAC;AACjG,QAAA,IAAA,CAAA,QAAQ,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AAC/D,QAAA,IAAA,CAAA,SAAS,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AAChE,QAAA,IAAA,CAAA,UAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AACjE,QAAA,IAAA,CAAA,UAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC;AACjE,QAAA,IAAA,CAAA,SAAS,GAAmC,IAAI,eAAe,CAAC,EAAE,CAAC;AACnE,QAAA,IAAA,CAAA,OAAO,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC;AACpE,QAAA,IAAA,CAAA,gBAAgB,GAA6B,IAAI,eAAe,CAAC,IAAI,CAAC;AAevE;AAbC,IAAA,eAAe,CAAC,EAAsB,EAAA;AACpC,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC;;;AAGlC,IAAA,qBAAqB,CAAC,UAA8B,EAAA;AAClD,QAAA,OAAO,IAAI,eAAe,CAAC,EAAE,CAAC;;;AAGhC,IAAA,0BAA0B,CAAC,UAA8B,EAAA;AACvD,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC;;;IAGlC,QAAQ,CAAC,MAAc,EAAA;;kIAvBZ,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CA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 from '@ngrx/store';
|
6
6
|
import { createFeatureSelector, createSelector, defaultMemoize, select, combineReducers, StoreModule } from '@ngrx/store';
|
7
7
|
import { getDaffProductSelectors, DaffProductGridLoadSuccess, DaffProductStateModule, daffProductReducerInitialState, daffProductProvideExtraReducers } from '@daffodil/product/state';
|
8
|
-
import {
|
8
|
+
import { asyncScheduler, of } from 'rxjs';
|
9
9
|
import { withLatestFrom, map, throttleTime, switchMap, catchError, mergeMap } from 'rxjs/operators';
|
10
10
|
import { DaffCategoryRequestKind } from '@daffodil/category';
|
11
11
|
import { DaffCategoryDriver } from '@daffodil/category/driver';
|
@@ -502,10 +502,10 @@ class DaffCategoryFacade {
|
|
502
502
|
dispatch(action) {
|
503
503
|
this.store.dispatch(action);
|
504
504
|
}
|
505
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
506
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
505
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
506
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryFacade, providedIn: 'root' }); }
|
507
507
|
}
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryFacade, decorators: [{
|
509
509
|
type: Injectable,
|
510
510
|
args: [{
|
511
511
|
providedIn: 'root',
|
@@ -516,10 +516,10 @@ class DaffCategoryProductCollectionFacade extends DaffCollectionFacade {
|
|
516
516
|
constructor(store) {
|
517
517
|
super(store, getCategoryProductCollectionSelectors());
|
518
518
|
}
|
519
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
520
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
519
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductCollectionFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
520
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductCollectionFacade, providedIn: 'root' }); }
|
521
521
|
}
|
522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductCollectionFacade, decorators: [{
|
523
523
|
type: Injectable,
|
524
524
|
args: [{
|
525
525
|
providedIn: 'root',
|
@@ -564,10 +564,10 @@ class DaffCategoryPageMetadataEffects {
|
|
564
564
|
new DaffCategoryPageLoadSuccess(resp),
|
565
565
|
]), catchError((error) => of(new DaffCategoryPageLoadFailure(this.errorMatcher(error))))))));
|
566
566
|
}
|
567
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
568
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
567
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageMetadataEffects, deps: [{ token: i1$1.Actions }, { token: DaffCategoryDriver }, { token: DAFF_CATEGORY_ERROR_MATCHER }, { token: DaffCategoryProductCollectionFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
568
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageMetadataEffects }); }
|
569
569
|
}
|
570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageMetadataEffects, decorators: [{
|
571
571
|
type: Injectable
|
572
572
|
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
573
573
|
type: Inject,
|
@@ -591,10 +591,10 @@ class DaffCategoryPageEffects {
|
|
591
591
|
new DaffCategoryPageLoadSuccess(resp),
|
592
592
|
]), catchError((error) => of(new DaffCategoryPageLoadFailure(this.errorMatcher(error))))))));
|
593
593
|
}
|
594
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
595
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
594
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageEffects, deps: [{ token: i1$1.Actions }, { token: DaffCategoryDriver }, { token: DAFF_CATEGORY_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
595
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageEffects }); }
|
596
596
|
}
|
597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryPageEffects, decorators: [{
|
598
598
|
type: Injectable
|
599
599
|
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
600
600
|
type: Inject,
|
@@ -611,10 +611,10 @@ class DaffCategoryEffects {
|
|
611
611
|
this.errorMatcher = errorMatcher;
|
612
612
|
this.loadCategory$ = createEffect(() => this.actions$.pipe(ofType(DaffCategoryActionTypes.CategoryLoadAction), mergeMap((action) => this.driver.get(action.request).pipe(switchMap((resp) => of(new DaffProductGridLoadSuccess(resp.products), new DaffCategoryLoadSuccess(resp))), catchError((error) => of(new DaffCategoryLoadFailure(this.errorMatcher(error))))))));
|
613
613
|
}
|
614
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
615
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
614
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryEffects, deps: [{ token: i1$1.Actions }, { token: DaffCategoryDriver }, { token: DAFF_CATEGORY_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
615
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryEffects }); }
|
616
616
|
}
|
617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryEffects, decorators: [{
|
618
618
|
type: Injectable
|
619
619
|
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
620
620
|
type: Inject,
|
@@ -647,13 +647,13 @@ provider: provideDaffCategoryReducers, } = createSingleInjectionToken('DAFF_CATE
|
|
647
647
|
* A module that provides default reducers and effects for the category redux state.
|
648
648
|
*/
|
649
649
|
class DaffCategoryStateModule {
|
650
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
651
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
652
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
650
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
651
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule, DaffProductStateModule] }); }
|
652
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateModule, imports: [StoreModule.forFeature(DAFF_CATEGORY_STORE_FEATURE_KEY, DAFF_CATEGORY_REDUCERS),
|
653
653
|
EffectsModule.forFeature([DaffCategoryEffects, DaffCategoryPageEffects, DaffCategoryPageMetadataEffects]),
|
654
654
|
DaffProductStateModule] }); }
|
655
655
|
}
|
656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryStateModule, decorators: [{
|
657
657
|
type: NgModule,
|
658
658
|
args: [{
|
659
659
|
imports: [
|
@@ -699,13 +699,13 @@ const daffCategoryProductReducers = {
|
|
699
699
|
* A module that provides injectable reducers into product state.
|
700
700
|
*/
|
701
701
|
class DaffCategoryProductStateModule {
|
702
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
703
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
704
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
702
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
703
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductStateModule, imports: [DaffProductStateModule] }); }
|
704
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductStateModule, providers: [
|
705
705
|
...daffProductProvideExtraReducers(combineReducers(daffCategoryProductReducers)),
|
706
706
|
], imports: [DaffProductStateModule] }); }
|
707
707
|
}
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffCategoryProductStateModule, decorators: [{
|
709
709
|
type: NgModule,
|
710
710
|
args: [{
|
711
711
|
imports: [
|