@daffodil/product 0.88.1 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/in-memory/index.d.ts +99 -1
- package/driver/index.d.ts +78 -1
- package/driver/magento/index.d.ts +378 -1
- package/driver/magento/testing/index.d.ts +114 -1
- package/driver/shopify/index.d.ts +89 -1
- package/driver/testing/index.d.ts +38 -1
- package/fesm2022/daffodil-product-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-product-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-magento-testing.mjs +24 -24
- package/fesm2022/daffodil-product-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-magento.mjs +19 -19
- package/fesm2022/daffodil-product-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-shopify.mjs +28 -16
- package/fesm2022/daffodil-product-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-product-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver.mjs.map +1 -1
- package/fesm2022/daffodil-product-routing.mjs +16 -16
- package/fesm2022/daffodil-product-routing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state-testing.mjs +13 -13
- package/fesm2022/daffodil-product-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state.mjs +22 -22
- package/fesm2022/daffodil-product-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-testing.mjs +19 -19
- package/fesm2022/daffodil-product-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product.mjs.map +1 -1
- package/index.d.ts +141 -1
- package/package.json +1 -1
- package/routing/index.d.ts +168 -1
- package/state/index.d.ts +574 -1
- package/state/testing/index.d.ts +56 -1
- package/testing/index.d.ts +133 -1
- package/driver/errors/codes.enum.d.ts +0 -4
- package/driver/errors/invalid-api-response.d.ts +0 -6
- package/driver/errors/map.d.ts +0 -9
- package/driver/errors/product-not-found.d.ts +0 -8
- package/driver/errors/public_api.d.ts +0 -4
- package/driver/in-memory/backend/product.service.d.ts +0 -48
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/driver/product-driver.module.d.ts +0 -13
- package/driver/in-memory/driver/product.service.d.ts +0 -24
- package/driver/in-memory/driver/provider.d.ts +0 -5
- package/driver/in-memory/injection-tokens/public_api.d.ts +0 -2
- package/driver/in-memory/injection-tokens/transforms/product-response/response-extra.token.d.ts +0 -2
- package/driver/in-memory/injection-tokens/transforms/product-response/response.token.d.ts +0 -2
- package/driver/in-memory/interfaces/product-response-extra-transform.type.d.ts +0 -3
- package/driver/in-memory/interfaces/product-response-transform.type.d.ts +0 -3
- package/driver/in-memory/interfaces/public_api.d.ts +0 -2
- package/driver/in-memory/public_api.d.ts +0 -6
- package/driver/interfaces/product-service.interface.d.ts +0 -27
- package/driver/magento/config/default.d.ts +0 -5
- package/driver/magento/config/public_api.d.ts +0 -1
- package/driver/magento/injection-tokens/fragments/product-page.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/product-preview.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/product.token.d.ts +0 -2
- package/driver/magento/injection-tokens/public_api.d.ts +0 -9
- package/driver/magento/injection-tokens/transforms/product/extra.token.d.ts +0 -20
- package/driver/magento/injection-tokens/transforms/product/token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-preview/preview-extra.token.d.ts +0 -20
- package/driver/magento/injection-tokens/transforms/product-preview/preview.token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-response/response-extra.token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/product-response/response.token.d.ts +0 -2
- package/driver/magento/interfaces/config.interface.d.ts +0 -11
- package/driver/magento/interfaces/product-preview-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-preview-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-response-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/product-response-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/public_api.d.ts +0 -5
- package/driver/magento/models/aggregation.d.ts +0 -17
- package/driver/magento/models/filter-type-field.interface.d.ts +0 -7
- package/driver/magento/models/filter-type.enum.d.ts +0 -5
- package/driver/magento/models/filters.d.ts +0 -13
- package/driver/magento/models/get-filter-types-response.interface.d.ts +0 -6
- package/driver/magento/models/get-product-response.interface.d.ts +0 -8
- package/driver/magento/models/magento-product.d.ts +0 -27
- package/driver/magento/models/product-preview.interface.d.ts +0 -35
- package/driver/magento/models/public_api.d.ts +0 -11
- package/driver/magento/models/simple-product.d.ts +0 -6
- package/driver/magento/models/sort-fields.d.ts +0 -9
- package/driver/magento/models/sort.d.ts +0 -7
- package/driver/magento/product-driver.module.d.ts +0 -14
- package/driver/magento/product.service.d.ts +0 -28
- package/driver/magento/provider.d.ts +0 -3
- package/driver/magento/public_api.d.ts +0 -9
- package/driver/magento/queries/fragments/product-aggregations.d.ts +0 -1
- package/driver/magento/queries/fragments/product-page.d.ts +0 -1
- package/driver/magento/queries/fragments/product-preview.d.ts +0 -1
- package/driver/magento/queries/fragments/product.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -5
- package/driver/magento/queries/fragments/sort-fields.d.ts +0 -1
- package/driver/magento/queries/get-all-products.d.ts +0 -3
- package/driver/magento/queries/get-filter-types.d.ts +0 -2
- package/driver/magento/queries/get-product-by-url/public_api.d.ts +0 -4
- package/driver/magento/queries/get-product-by-url/query.d.ts +0 -5
- package/driver/magento/queries/get-product-by-url/response.type.d.ts +0 -5
- package/driver/magento/queries/get-product-by-url/validator.d.ts +0 -3
- package/driver/magento/queries/get-product-by-url/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-product.d.ts +0 -3
- package/driver/magento/queries/public_api.d.ts +0 -5
- package/driver/magento/testing/factories/aggregation/aggregation.factory.d.ts +0 -12
- package/driver/magento/testing/factories/aggregation/public_api.d.ts +0 -3
- package/driver/magento/testing/factories/aggregation/type/price.factory.d.ts +0 -8
- package/driver/magento/testing/factories/aggregation/type/select.factory.d.ts +0 -8
- package/driver/magento/testing/factories/core/product-preview.factory.d.ts +0 -42
- package/driver/magento/testing/factories/core/product.factory.d.ts +0 -28
- package/driver/magento/testing/factories/filter-type-field.factory.d.ts +0 -8
- package/driver/magento/testing/factories/public_api.d.ts +0 -7
- package/driver/magento/testing/factories/simple/simple.factory.d.ts +0 -15
- package/driver/magento/testing/factories/sort-fields.factory.d.ts +0 -8
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transforms/aggregate/add-metadata-types-to-aggregates.d.ts +0 -2
- package/driver/magento/transforms/aggregate/get-matched-attribute-type.d.ts +0 -2
- package/driver/magento/transforms/aggregate/public_api.d.ts +0 -3
- package/driver/magento/transforms/aggregate/transform.d.ts +0 -3
- package/driver/magento/transforms/aggregate/type/equal.d.ts +0 -3
- package/driver/magento/transforms/aggregate/type/range.d.ts +0 -8
- package/driver/magento/transforms/applied-filter-transformer.service.d.ts +0 -18
- package/driver/magento/transforms/applied-sort-option.d.ts +0 -3
- package/driver/magento/transforms/collection-metadata.d.ts +0 -8
- package/driver/magento/transforms/product-preview.d.ts +0 -12
- package/driver/magento/transforms/product-response.d.ts +0 -17
- package/driver/magento/transforms/product-transformers.d.ts +0 -20
- package/driver/magento/transforms/public_api.d.ts +0 -7
- package/driver/magento/transforms/simple-product-transformers.d.ts +0 -16
- package/driver/magento/transforms/sort-options/sort-default-option-first.d.ts +0 -2
- package/driver/models/public_api.d.ts +0 -1
- package/driver/models/response.interface.d.ts +0 -18
- package/driver/public_api.d.ts +0 -3
- package/driver/shopify/product-driver.module.d.ts +0 -12
- package/driver/shopify/product.service.d.ts +0 -20
- package/driver/shopify/public_api.d.ts +0 -4
- package/driver/shopify/queries/gql/get-all-products.d.ts +0 -6
- package/driver/shopify/queries/gql/get-product-by-url.d.ts +0 -8
- package/driver/shopify/queries/gql/get-product.d.ts +0 -6
- package/driver/shopify/queries/gql/public_api.d.ts +0 -3
- package/driver/shopify/queries/public_api.d.ts +0 -3
- package/driver/shopify/queries/response.types.d.ts +0 -6
- package/driver/shopify/queries/variables.types.d.ts +0 -9
- package/driver/shopify/transforms/public_api.d.ts +0 -1
- package/driver/shopify/transforms/shopify-daff-product-transform.d.ts +0 -9
- package/driver/testing/drivers/product-driver.module.d.ts +0 -13
- package/driver/testing/drivers/product.service.d.ts +0 -22
- package/driver/testing/public_api.d.ts +0 -2
- package/helpers/has-discount.d.ts +0 -7
- package/helpers/has-price-range.d.ts +0 -7
- package/helpers/public_api.d.ts +0 -2
- package/models/collection.interface.d.ts +0 -8
- package/models/prices.d.ts +0 -31
- package/models/product-image.d.ts +0 -10
- package/models/product.d.ts +0 -76
- package/models/public_api.d.ts +0 -4
- package/public_api.d.ts +0 -2
- package/routing/config/default.d.ts +0 -9
- package/routing/config/interface.d.ts +0 -18
- package/routing/config/public_api.d.ts +0 -3
- package/routing/config/token.d.ts +0 -2
- package/routing/constants/collection-request-fields.d.ts +0 -5
- package/routing/constants/public_api.d.ts +0 -1
- package/routing/discrete-filter-params/public_api.d.ts +0 -1
- package/routing/discrete-filter-params/token.d.ts +0 -10
- package/routing/effects/collection.effects.d.ts +0 -20
- package/routing/effects/public_api.d.ts +0 -1
- package/routing/models/collection-request-query-param-transforms.interface.d.ts +0 -22
- package/routing/models/collection-request-query-params.interface.d.ts +0 -8
- package/routing/models/public_api.d.ts +0 -2
- package/routing/module.d.ts +0 -9
- package/routing/public_api.d.ts +0 -8
- package/routing/resolvers/product-page-id/product-page-id.resolver.d.ts +0 -18
- package/routing/resolvers/product-page-url/product-page-url.resolver.d.ts +0 -22
- package/routing/resolvers/public_api.d.ts +0 -2
- package/routing/services/get-query-params-from-request.service.d.ts +0 -17
- package/routing/services/get-request-from-route.service.d.ts +0 -18
- package/routing/services/public_api.d.ts +0 -2
- package/state/actions/product-grid.actions.d.ts +0 -47
- package/state/actions/product-page.actions.d.ts +0 -67
- package/state/actions/product.actions.d.ts +0 -43
- package/state/actions/public_api.d.ts +0 -3
- package/state/effects/product-grid.effects.d.ts +0 -27
- package/state/effects/product-page.effects.d.ts +0 -28
- package/state/effects/product.effects.d.ts +0 -27
- package/state/effects/public_api.d.ts +0 -2
- package/state/facades/product/product-facade.interface.d.ts +0 -51
- package/state/facades/product/product.facade.d.ts +0 -26
- package/state/facades/product-grid/product-grid-facade.interface.d.ts +0 -14
- package/state/facades/product-grid/product-grid.facade.d.ts +0 -20
- package/state/facades/product-page/facade.d.ts +0 -27
- package/state/facades/product-page/facade.interface.d.ts +0 -13
- package/state/facades/public_api.d.ts +0 -6
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -1
- package/state/product-state.module.d.ts +0 -11
- package/state/public_api.d.ts +0 -7
- package/state/reducers/injection-tokens/config.token.d.ts +0 -3
- package/state/reducers/injection-tokens/extra.token.d.ts +0 -3
- package/state/reducers/injection-tokens/meta.token.d.ts +0 -3
- package/state/reducers/injection-tokens/public_api.d.ts +0 -2
- package/state/reducers/injection-tokens/reducers.token.d.ts +0 -3
- package/state/reducers/product/product-reducer-state.interface.d.ts +0 -15
- package/state/reducers/product/product.reducer.d.ts +0 -15
- package/state/reducers/product-entities/product-entities-reducer-adapter.d.ts +0 -6
- package/state/reducers/product-entities/product-entities.reducer.d.ts +0 -11
- package/state/reducers/product-grid/product-grid-reducer-state.interface.d.ts +0 -19
- package/state/reducers/product-grid/product-grid.reducer.d.ts +0 -15
- package/state/reducers/product-reducers-state.interface.d.ts +0 -16
- package/state/reducers/product-reducers.d.ts +0 -6
- package/state/reducers/product-store-feature-key.d.ts +0 -1
- package/state/reducers/public_api.d.ts +0 -10
- package/state/selectors/all-selectors.selectors.d.ts +0 -15
- package/state/selectors/product/product.selectors.d.ts +0 -27
- package/state/selectors/product-entities/product-entities.selectors.d.ts +0 -75
- package/state/selectors/product-feature.selector.d.ts +0 -13
- package/state/selectors/product-grid/product-grid.selectors.d.ts +0 -22
- package/state/selectors/public_api.d.ts +0 -5
- package/state/testing/mock-product-facade.d.ts +0 -19
- package/state/testing/mock-product-grid-facade.d.ts +0 -14
- package/state/testing/mock-product-page-facade.d.ts +0 -20
- package/state/testing/product-testing.module.d.ts +0 -6
- package/state/testing/public_api.d.ts +0 -4
- package/testing/factories/collection.factory.d.ts +0 -18
- package/testing/factories/default-product.factory.d.ts +0 -39
- package/testing/factories/extension.factory.d.ts +0 -21
- package/testing/factories/kind.factory.d.ts +0 -20
- package/testing/factories/product-image.factory.d.ts +0 -19
- package/testing/factories/public_api.d.ts +0 -6
- package/testing/helpers.d.ts +0 -7
- package/testing/injection-tokens/factories/extra.token.d.ts +0 -3
- package/testing/injection-tokens/factories/type.token.d.ts +0 -3
- package/testing/injection-tokens/public_api.d.ts +0 -2
- package/testing/public_api.d.ts +0 -4
- package/testing/testing.module.d.ts +0 -9
|
@@ -24,10 +24,10 @@ class DaffProductPageIdResolver {
|
|
|
24
24
|
this.store.dispatch(new DaffProductPageLoad(route.paramMap.get('id')));
|
|
25
25
|
return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction), map(() => true), take(1));
|
|
26
26
|
}
|
|
27
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
27
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageIdResolver, deps: [{ token: PLATFORM_ID }, { token: i1.Store }, { token: i1.ActionsSubject }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageIdResolver, providedIn: 'root' }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageIdResolver, decorators: [{
|
|
31
31
|
type: Injectable,
|
|
32
32
|
args: [{
|
|
33
33
|
providedIn: 'root',
|
|
@@ -54,10 +54,10 @@ class DaffProductPageUrlResolver {
|
|
|
54
54
|
this.store.dispatch(new DaffProductPageLoadByUrl(this.urlNormalizer.normalize(state.url)));
|
|
55
55
|
return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction), map(() => true), take(1));
|
|
56
56
|
}
|
|
57
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
57
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageUrlResolver, deps: [{ token: PLATFORM_ID }, { token: i1.Store }, { token: i1.ActionsSubject }, { token: i2.DaffRoutingUriNormalizer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
58
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageUrlResolver, providedIn: 'root' }); }
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageUrlResolver, decorators: [{
|
|
61
61
|
type: Injectable,
|
|
62
62
|
args: [{
|
|
63
63
|
providedIn: 'root',
|
|
@@ -176,10 +176,10 @@ class DaffProductGetCollectionRequestFromRoute {
|
|
|
176
176
|
}
|
|
177
177
|
return request;
|
|
178
178
|
}
|
|
179
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
180
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
179
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetCollectionRequestFromRoute, deps: [{ token: DAFF_PRODUCT_ROUTING_CONFIG }, { token: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
180
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetCollectionRequestFromRoute }); }
|
|
181
181
|
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetCollectionRequestFromRoute, decorators: [{
|
|
183
183
|
type: Injectable
|
|
184
184
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
185
185
|
type: Inject,
|
|
@@ -216,10 +216,10 @@ class DaffProductGetQueryParamsFromRequest {
|
|
|
216
216
|
return acc;
|
|
217
217
|
}, trimmedQueryParams);
|
|
218
218
|
}
|
|
219
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
220
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
219
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetQueryParamsFromRequest, deps: [{ token: DAFF_PRODUCT_ROUTING_CONFIG }, { token: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
220
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetQueryParamsFromRequest }); }
|
|
221
221
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGetQueryParamsFromRequest, decorators: [{
|
|
223
223
|
type: Injectable
|
|
224
224
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
225
225
|
type: Inject,
|
|
@@ -269,14 +269,14 @@ class DaffProductRoutingModule {
|
|
|
269
269
|
],
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
273
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
274
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
272
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
273
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffProductRoutingModule }); }
|
|
274
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductRoutingModule, providers: [
|
|
275
275
|
DaffProductGetCollectionRequestFromRoute,
|
|
276
276
|
DaffProductGetQueryParamsFromRequest,
|
|
277
277
|
] }); }
|
|
278
278
|
}
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductRoutingModule, decorators: [{
|
|
280
280
|
type: NgModule,
|
|
281
281
|
args: [{
|
|
282
282
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-product-routing.mjs","sources":["../../../libs/product/routing/src/resolvers/product-page-id/product-page-id.resolver.ts","../../../libs/product/routing/src/resolvers/product-page-url/product-page-url.resolver.ts","../../../libs/product/routing/src/config/default.ts","../../../libs/product/routing/src/config/token.ts","../../../libs/product/routing/src/constants/collection-request-fields.ts","../../../libs/product/routing/src/discrete-filter-params/token.ts","../../../libs/product/routing/src/services/get-request-from-route.service.ts","../../../libs/product/routing/src/services/get-query-params-from-request.service.ts","../../../libs/product/routing/src/effects/collection.effects.ts","../../../libs/product/routing/src/module.ts","../../../libs/product/routing/src/daffodil-product-routing.ts"],"sourcesContent":["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 {\n DaffProductStateRootSlice,\n DaffProductPageLoad,\n DaffProductPageActionTypes,\n} from '@daffodil/product/state';\n\n/**\n * Resolves product data for product pages, and will only resolve the url after a product request succeeds or fails. This resolver expects a url\n * of the form `some/url/{id}` where `{id}` is the product id.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffProductPageIdResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffProductStateRootSlice>,\n private dispatcher: ActionsSubject,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffProductPageLoad(route.paramMap.get('id')));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction),\n map(() => true),\n take(1),\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 { DaffRoutingUriNormalizer } from '@daffodil/core/routing';\nimport {\n DaffProductStateRootSlice,\n DaffProductPageLoadByUrl,\n DaffProductPageActionTypes,\n} from '@daffodil/product/state';\n\n/**\n * Resolves product data for product pages, and will only resolve the url\n * after a product 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({\n providedIn: 'root',\n})\nexport class DaffProductPageUrlResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffProductStateRootSlice>,\n private dispatcher: ActionsSubject,\n private urlNormalizer: DaffRoutingUriNormalizer,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n this.store.dispatch(\n new DaffProductPageLoadByUrl(this.urlNormalizer.normalize(state.url)),\n );\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\n\nimport {\n DaffBase64Service,\n DaffBase64ServiceToken,\n} from '@daffodil/core';\n\nimport { DaffProductRoutingConfig } from './interface';\n\nexport const DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP: DaffProductRoutingConfig['params'] = {\n filterRequests: 'filters',\n appliedSortOption: 'sortOption',\n appliedSortDirection: 'sortDir',\n currentPage: 'page',\n pageSize: 'size',\n};\n\n/**\n * The default configuration for the {@link DaffProductRoutingConfig}.\n */\nexport const daffProductRoutingConfigDefaultFactory = (base64: DaffBase64Service): DaffProductRoutingConfig => ({\n params: DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP,\n transforms: {\n pageSize: {\n request: str => Number(str),\n queryParam: pageSize => String(pageSize),\n },\n currentPage: {\n request: str => Number(str),\n queryParam: currentPage => String(currentPage),\n },\n filterRequests: {\n request: base64Str => JSON.parse(base64.decode(base64Str)),\n queryParam: filterRequests => base64.encode(JSON.stringify(filterRequests)),\n },\n },\n});\n\nexport const DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT = new InjectionToken<DaffProductRoutingConfig>(\n 'DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT',\n { factory: () => daffProductRoutingConfigDefaultFactory(inject(DaffBase64ServiceToken)) },\n);\n","import { createConfigInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT } from './default';\nimport { DaffProductRoutingConfig } from './interface';\n\nexport const {\n /**\n * The token used to provide @daffodil/product/routing config data.\n */\n token: DAFF_PRODUCT_ROUTING_CONFIG,\n /**\n * Provides the {@link DAFF_PRODUCT_ROUTING_CONFIG} token.\n */\n provider: provideDaffProductRoutingConfig,\n} = createConfigInjectionToken<DaffProductRoutingConfig>(DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT, 'DAFF_PRODUCT_ROUTING_CONFIG');\n\n","import { DaffCollectionRequest } from '@daffodil/core';\n\n/**\n * A list of request fields that can be transformed to and from query params.\n */\nexport const DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS: (keyof DaffCollectionRequest)[] = [\n 'filterRequests',\n 'appliedSortOption',\n 'appliedSortDirection',\n 'currentPage',\n 'pageSize',\n];\n","import { ValueProvider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport {\n DaffRoutingQueryParamFilter,\n daffRoutingQueryParamFilterRequestEqualBuilder,\n} from '@daffodil/core/routing';\n\nexport const {\n /**\n * A list of product filter requests that are contained directly in query params,\n * with a one-to-one mapping between filters and query params.\n * This is constrasted to {@link DaffCollectionRequestQueryParams#filterRequests}\n * which remains the actual canonical source of truth of the filter requests.\n * The discrete filter params persist in the URL as long as the corresponding filter remains applied.\n */\n token: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS,\n} = createMultiInjectionToken<DaffRoutingQueryParamFilter>(\n 'DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS',\n { providedIn: 'any' },\n);\n\n/**\n * A multi-provider for {@link DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS}.\n *\n * @param queryParam Defaults to `filterName`.\n * @param builder Defaults to {@link daffRoutingQueryParamFilterRequestEqualBuilder}.\n */\nexport function daffProductRoutingProvideDiscreteFilterParam(filterName: DaffRoutingQueryParamFilter['filterName'], queryParam?: DaffRoutingQueryParamFilter['queryParam'], builder?: DaffRoutingQueryParamFilter['builder']): ValueProvider {\n return {\n provide: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS,\n useValue: {\n filterName,\n queryParam: queryParam || filterName,\n builder: builder || daffRoutingQueryParamFilterRequestEqualBuilder,\n },\n multi: true,\n };\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ParamMap } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n DaffFilterRequest,\n} from '@daffodil/core';\nimport { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';\n\nimport {\n DaffProductRoutingConfig,\n DAFF_PRODUCT_ROUTING_CONFIG,\n} from '../config/public_api';\nimport { DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS } from '../constants/public_api';\nimport { DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS } from '../discrete-filter-params/public_api';\n\n/**\n * Builds a {@link DaffCollectionRequest} from the query params of the passed route.\n * Its behavior can be configured via the {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAMS} and\n * {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAM_TRANSFORMS} injection tokens.\n */\n@Injectable()\nexport class DaffProductGetCollectionRequestFromRoute {\n constructor(\n @Inject(DAFF_PRODUCT_ROUTING_CONFIG) private config: DaffProductRoutingConfig,\n @Inject(DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS) private discreteFilters: DaffRoutingQueryParamFilter[],\n ) {}\n\n getRequest(queryParamMap: ParamMap): DaffCollectionRequest {\n const request = DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS.reduce<DaffCollectionRequest>((acc, field) => {\n const qp = this.config.params[field] || field;\n if (queryParamMap.has(qp)) {\n const qpVal = queryParamMap.get(qp);\n // no idea why field needs to be typecasted\n acc[(<string>field)] = this.config.transforms?.[field]?.request?.(qpVal) || qpVal;\n }\n return acc;\n }, {});\n const filterRequests = this.discreteFilters.reduce<DaffFilterRequest[]>(\n (acc, { filterName, builder, queryParam }) =>\n queryParamMap.has(queryParam)\n ? [\n ...acc,\n builder(filterName, queryParamMap.getAll(queryParam)),\n ]\n : acc,\n request.filterRequests || [],\n );\n // add discrete filter params to the list of requests\n if (filterRequests.length > 0) {\n request.filterRequests = filterRequests;\n }\n\n return request;\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Params } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n daffArrayToDict,\n} from '@daffodil/core';\nimport { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';\n\nimport {\n DaffProductRoutingConfig,\n DAFF_PRODUCT_ROUTING_CONFIG,\n} from '../config/public_api';\nimport { DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS } from '../constants/public_api';\nimport { DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS } from '../discrete-filter-params/public_api';\n\n/**\n * Builds a query param map from a {@link DaffCollectionRequest}.\n * Its behavior can be configured via the {@link DAFF_PRODUCT_ROUTING_CONFIG} injection token.\n */\n@Injectable()\nexport class DaffProductGetQueryParamsFromRequest {\n constructor(\n @Inject(DAFF_PRODUCT_ROUTING_CONFIG) private config: DaffProductRoutingConfig,\n @Inject(DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS) private discreteFilters: DaffRoutingQueryParamFilter[],\n ) {}\n\n getQueryParams(request: DaffCollectionRequest): Params {\n const filterRequests = daffArrayToDict(request.filterRequests, (fr) => fr.name);\n // Specifically sets filter names missing from the filter requests to undefined\n // in order to remove them from the URL\n const trimmedQueryParams = this.discreteFilters.reduce(\n (acc, { filterName, queryParam }) => {\n if (!filterRequests[filterName]) {\n acc[queryParam] = undefined;\n }\n return acc;\n },\n {},\n );\n\n return DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS.reduce<Params>((acc, field) => {\n const val = request[field];\n if (val) {\n acc[this.config.params[field] || field] = this.config.transforms?.[field]?.queryParam?.(val) || String(val);\n }\n return acc;\n }, trimmedQueryParams);\n }\n}\n","import {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { EMPTY } from 'rxjs';\nimport {\n switchMap,\n map,\n withLatestFrom,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffCollectionRequest,\n daffFiltersToRequests,\n} from '@daffodil/core';\nimport { DaffCollectionFacadeInterface } from '@daffodil/core/state';\n\nimport { DaffProductGetQueryParamsFromRequest } from '../services/public_api';\n\n/**\n * An abstract class that provides an effect for modifying the browser URL.\n */\nexport abstract class DaffProductRoutingCollectionEffects {\n constructor(\n private actions$: Actions,\n private router: Router,\n private actionTypes: string[],\n private facade: DaffCollectionFacadeInterface,\n private getQueryParams: DaffProductGetQueryParamsFromRequest,\n private route: ActivatedRoute,\n ) {}\n\n /**\n * Updates the URL according to the product collection request in state.\n */\n update$ = createEffect(() => this.actions$.pipe(\n ofType(...this.actionTypes),\n withLatestFrom(this.facade.metadata$),\n map(([action, metadata]): [Action, DaffCollectionRequest] => [\n action,\n {\n filterRequests: daffFiltersToRequests(metadata.filters),\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n },\n ]),\n tap(([action, request]) => this.router.navigate(\n [],\n {\n relativeTo: this.route,\n queryParams: this.getQueryParams.getQueryParams(request),\n queryParamsHandling: 'merge',\n },\n )),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\n\nimport {\n DaffProductRoutingConfig,\n provideDaffProductRoutingConfig,\n} from './config/public_api';\nimport {\n DaffProductGetCollectionRequestFromRoute,\n DaffProductGetQueryParamsFromRequest,\n} from './services/public_api';\n\n@NgModule({\n providers: [\n DaffProductGetCollectionRequestFromRoute,\n DaffProductGetQueryParamsFromRequest,\n ],\n})\nexport class DaffProductRoutingModule {\n static withConfig(config?: DaffProductRoutingConfig): ModuleWithProviders<DaffProductRoutingModule> {\n return {\n ngModule: DaffProductRoutingModule,\n providers: [\n provideDaffProductRoutingConfig(config),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BA;;;AAGG;MAIU,yBAAyB,CAAA;AACpC,IAAA,WAAA,CAC+B,UAAkB,EACvC,KAAuC,EACvC,UAA0B,EAAA;QAFL,IAAU,CAAA,UAAA,GAAV,UAAU;QAC/B,IAA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A,QAAA,EAAA,CAAA,CAAA;mIAAxB,wBAAwB,EAAA,CAAA,CAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,EALxB,SAAA,EAAA;YACT,wCAAwC;YACxC,oCAAoC;AACrC,SAAA,EAAA,CAAA,CAAA;;4FAEU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT,wCAAwC;wBACxC,oCAAoC;AACrC,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-product-routing.mjs","sources":["../../../libs/product/routing/src/resolvers/product-page-id/product-page-id.resolver.ts","../../../libs/product/routing/src/resolvers/product-page-url/product-page-url.resolver.ts","../../../libs/product/routing/src/config/default.ts","../../../libs/product/routing/src/config/token.ts","../../../libs/product/routing/src/constants/collection-request-fields.ts","../../../libs/product/routing/src/discrete-filter-params/token.ts","../../../libs/product/routing/src/services/get-request-from-route.service.ts","../../../libs/product/routing/src/services/get-query-params-from-request.service.ts","../../../libs/product/routing/src/effects/collection.effects.ts","../../../libs/product/routing/src/module.ts","../../../libs/product/routing/src/daffodil-product-routing.ts"],"sourcesContent":["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 {\n DaffProductStateRootSlice,\n DaffProductPageLoad,\n DaffProductPageActionTypes,\n} from '@daffodil/product/state';\n\n/**\n * Resolves product data for product pages, and will only resolve the url after a product request succeeds or fails. This resolver expects a url\n * of the form `some/url/{id}` where `{id}` is the product id.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffProductPageIdResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffProductStateRootSlice>,\n private dispatcher: ActionsSubject,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot): Observable<boolean> {\n this.store.dispatch(new DaffProductPageLoad(route.paramMap.get('id')));\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction),\n map(() => true),\n take(1),\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 { DaffRoutingUriNormalizer } from '@daffodil/core/routing';\nimport {\n DaffProductStateRootSlice,\n DaffProductPageLoadByUrl,\n DaffProductPageActionTypes,\n} from '@daffodil/product/state';\n\n/**\n * Resolves product data for product pages, and will only resolve the url\n * after a product 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({\n providedIn: 'root',\n})\nexport class DaffProductPageUrlResolver {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n private store: Store<DaffProductStateRootSlice>,\n private dispatcher: ActionsSubject,\n private urlNormalizer: DaffRoutingUriNormalizer,\n ) { }\n\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n this.store.dispatch(\n new DaffProductPageLoadByUrl(this.urlNormalizer.normalize(state.url)),\n );\n\n return isPlatformBrowser(this.platformId) ? of(true) : this.dispatcher.pipe(\n ofType(DaffProductPageActionTypes.ProductPageLoadSuccessAction, DaffProductPageActionTypes.ProductPageLoadFailureAction),\n map(() => true),\n take(1),\n );\n }\n}\n","import {\n inject,\n InjectionToken,\n} from '@angular/core';\n\nimport {\n DaffBase64Service,\n DaffBase64ServiceToken,\n} from '@daffodil/core';\n\nimport { DaffProductRoutingConfig } from './interface';\n\nexport const DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP: DaffProductRoutingConfig['params'] = {\n filterRequests: 'filters',\n appliedSortOption: 'sortOption',\n appliedSortDirection: 'sortDir',\n currentPage: 'page',\n pageSize: 'size',\n};\n\n/**\n * The default configuration for the {@link DaffProductRoutingConfig}.\n */\nexport const daffProductRoutingConfigDefaultFactory = (base64: DaffBase64Service): DaffProductRoutingConfig => ({\n params: DAFF_PRODUCT_ROUTING_QUERY_PARAM_REQUEST_MAP,\n transforms: {\n pageSize: {\n request: str => Number(str),\n queryParam: pageSize => String(pageSize),\n },\n currentPage: {\n request: str => Number(str),\n queryParam: currentPage => String(currentPage),\n },\n filterRequests: {\n request: base64Str => JSON.parse(base64.decode(base64Str)),\n queryParam: filterRequests => base64.encode(JSON.stringify(filterRequests)),\n },\n },\n});\n\nexport const DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT = new InjectionToken<DaffProductRoutingConfig>(\n 'DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT',\n { factory: () => daffProductRoutingConfigDefaultFactory(inject(DaffBase64ServiceToken)) },\n);\n","import { createConfigInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT } from './default';\nimport { DaffProductRoutingConfig } from './interface';\n\nexport const {\n /**\n * The token used to provide @daffodil/product/routing config data.\n */\n token: DAFF_PRODUCT_ROUTING_CONFIG,\n /**\n * Provides the {@link DAFF_PRODUCT_ROUTING_CONFIG} token.\n */\n provider: provideDaffProductRoutingConfig,\n} = createConfigInjectionToken<DaffProductRoutingConfig>(DAFF_PRODUCT_ROUTING_CONFIG_DEFAULT, 'DAFF_PRODUCT_ROUTING_CONFIG');\n\n","import { DaffCollectionRequest } from '@daffodil/core';\n\n/**\n * A list of request fields that can be transformed to and from query params.\n */\nexport const DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS: (keyof DaffCollectionRequest)[] = [\n 'filterRequests',\n 'appliedSortOption',\n 'appliedSortDirection',\n 'currentPage',\n 'pageSize',\n];\n","import { ValueProvider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport {\n DaffRoutingQueryParamFilter,\n daffRoutingQueryParamFilterRequestEqualBuilder,\n} from '@daffodil/core/routing';\n\nexport const {\n /**\n * A list of product filter requests that are contained directly in query params,\n * with a one-to-one mapping between filters and query params.\n * This is constrasted to {@link DaffCollectionRequestQueryParams#filterRequests}\n * which remains the actual canonical source of truth of the filter requests.\n * The discrete filter params persist in the URL as long as the corresponding filter remains applied.\n */\n token: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS,\n} = createMultiInjectionToken<DaffRoutingQueryParamFilter>(\n 'DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS',\n { providedIn: 'any' },\n);\n\n/**\n * A multi-provider for {@link DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS}.\n *\n * @param queryParam Defaults to `filterName`.\n * @param builder Defaults to {@link daffRoutingQueryParamFilterRequestEqualBuilder}.\n */\nexport function daffProductRoutingProvideDiscreteFilterParam(filterName: DaffRoutingQueryParamFilter['filterName'], queryParam?: DaffRoutingQueryParamFilter['queryParam'], builder?: DaffRoutingQueryParamFilter['builder']): ValueProvider {\n return {\n provide: DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS,\n useValue: {\n filterName,\n queryParam: queryParam || filterName,\n builder: builder || daffRoutingQueryParamFilterRequestEqualBuilder,\n },\n multi: true,\n };\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ParamMap } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n DaffFilterRequest,\n} from '@daffodil/core';\nimport { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';\n\nimport {\n DaffProductRoutingConfig,\n DAFF_PRODUCT_ROUTING_CONFIG,\n} from '../config/public_api';\nimport { DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS } from '../constants/public_api';\nimport { DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS } from '../discrete-filter-params/public_api';\n\n/**\n * Builds a {@link DaffCollectionRequest} from the query params of the passed route.\n * Its behavior can be configured via the {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAMS} and\n * {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAM_TRANSFORMS} injection tokens.\n */\n@Injectable()\nexport class DaffProductGetCollectionRequestFromRoute {\n constructor(\n @Inject(DAFF_PRODUCT_ROUTING_CONFIG) private config: DaffProductRoutingConfig,\n @Inject(DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS) private discreteFilters: DaffRoutingQueryParamFilter[],\n ) {}\n\n getRequest(queryParamMap: ParamMap): DaffCollectionRequest {\n const request = DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS.reduce<DaffCollectionRequest>((acc, field) => {\n const qp = this.config.params[field] || field;\n if (queryParamMap.has(qp)) {\n const qpVal = queryParamMap.get(qp);\n // no idea why field needs to be typecasted\n acc[(<string>field)] = this.config.transforms?.[field]?.request?.(qpVal) || qpVal;\n }\n return acc;\n }, {});\n const filterRequests = this.discreteFilters.reduce<DaffFilterRequest[]>(\n (acc, { filterName, builder, queryParam }) =>\n queryParamMap.has(queryParam)\n ? [\n ...acc,\n builder(filterName, queryParamMap.getAll(queryParam)),\n ]\n : acc,\n request.filterRequests || [],\n );\n // add discrete filter params to the list of requests\n if (filterRequests.length > 0) {\n request.filterRequests = filterRequests;\n }\n\n return request;\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Params } from '@angular/router';\n\nimport {\n DaffCollectionRequest,\n daffArrayToDict,\n} from '@daffodil/core';\nimport { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';\n\nimport {\n DaffProductRoutingConfig,\n DAFF_PRODUCT_ROUTING_CONFIG,\n} from '../config/public_api';\nimport { DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS } from '../constants/public_api';\nimport { DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS } from '../discrete-filter-params/public_api';\n\n/**\n * Builds a query param map from a {@link DaffCollectionRequest}.\n * Its behavior can be configured via the {@link DAFF_PRODUCT_ROUTING_CONFIG} injection token.\n */\n@Injectable()\nexport class DaffProductGetQueryParamsFromRequest {\n constructor(\n @Inject(DAFF_PRODUCT_ROUTING_CONFIG) private config: DaffProductRoutingConfig,\n @Inject(DAFF_PRODUCT_ROUTING_DISCRETE_FILTER_PARAMS) private discreteFilters: DaffRoutingQueryParamFilter[],\n ) {}\n\n getQueryParams(request: DaffCollectionRequest): Params {\n const filterRequests = daffArrayToDict(request.filterRequests, (fr) => fr.name);\n // Specifically sets filter names missing from the filter requests to undefined\n // in order to remove them from the URL\n const trimmedQueryParams = this.discreteFilters.reduce(\n (acc, { filterName, queryParam }) => {\n if (!filterRequests[filterName]) {\n acc[queryParam] = undefined;\n }\n return acc;\n },\n {},\n );\n\n return DAFF_PRODUCT_COLLECTION_REQUEST_FIELDS.reduce<Params>((acc, field) => {\n const val = request[field];\n if (val) {\n acc[this.config.params[field] || field] = this.config.transforms?.[field]?.queryParam?.(val) || String(val);\n }\n return acc;\n }, trimmedQueryParams);\n }\n}\n","import {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { Action } from '@ngrx/store';\nimport { EMPTY } from 'rxjs';\nimport {\n switchMap,\n map,\n withLatestFrom,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffCollectionRequest,\n daffFiltersToRequests,\n} from '@daffodil/core';\nimport { DaffCollectionFacadeInterface } from '@daffodil/core/state';\n\nimport { DaffProductGetQueryParamsFromRequest } from '../services/public_api';\n\n/**\n * An abstract class that provides an effect for modifying the browser URL.\n */\nexport abstract class DaffProductRoutingCollectionEffects {\n constructor(\n private actions$: Actions,\n private router: Router,\n private actionTypes: string[],\n private facade: DaffCollectionFacadeInterface,\n private getQueryParams: DaffProductGetQueryParamsFromRequest,\n private route: ActivatedRoute,\n ) {}\n\n /**\n * Updates the URL according to the product collection request in state.\n */\n update$ = createEffect(() => this.actions$.pipe(\n ofType(...this.actionTypes),\n withLatestFrom(this.facade.metadata$),\n map(([action, metadata]): [Action, DaffCollectionRequest] => [\n action,\n {\n filterRequests: daffFiltersToRequests(metadata.filters),\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n },\n ]),\n tap(([action, request]) => this.router.navigate(\n [],\n {\n relativeTo: this.route,\n queryParams: this.getQueryParams.getQueryParams(request),\n queryParamsHandling: 'merge',\n },\n )),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\n\nimport {\n DaffProductRoutingConfig,\n provideDaffProductRoutingConfig,\n} from './config/public_api';\nimport {\n DaffProductGetCollectionRequestFromRoute,\n DaffProductGetQueryParamsFromRequest,\n} from './services/public_api';\n\n@NgModule({\n providers: [\n DaffProductGetCollectionRequestFromRoute,\n DaffProductGetQueryParamsFromRequest,\n ],\n})\nexport class DaffProductRoutingModule {\n static withConfig(config?: DaffProductRoutingConfig): ModuleWithProviders<DaffProductRoutingModule> {\n return {\n ngModule: DaffProductRoutingModule,\n providers: [\n provideDaffProductRoutingConfig(config),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BA;;;AAGG;MAIU,yBAA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QACjD,OAAO;AACL,YAAA,QAAQ,EAAE,wBAAwB;AAClC,YAAA,SAAS,EAAE;gBACT,+BAA+B,CAAC,MAAM,CAAC;AACxC,aAAA;SACF;IACH;iIARW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAxB,wBAAwB,EAAA,CAAA,CAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,EAAA,SAAA,EALxB;YACT,wCAAwC;YACxC,oCAAoC;AACrC,SAAA,EAAA,CAAA,CAAA;;2FAEU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT,wCAAwC;wBACxC,oCAAoC;AACrC,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -30,10 +30,10 @@ class MockDaffProductFacade {
|
|
|
30
30
|
}
|
|
31
31
|
dispatch(action) { }
|
|
32
32
|
;
|
|
33
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductFacade, providedIn: 'root' }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductFacade, decorators: [{
|
|
37
37
|
type: Injectable,
|
|
38
38
|
args: [{ providedIn: 'root' }]
|
|
39
39
|
}] });
|
|
@@ -48,10 +48,10 @@ class MockDaffProductGridFacade {
|
|
|
48
48
|
}
|
|
49
49
|
dispatch(action) { }
|
|
50
50
|
;
|
|
51
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
52
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
51
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductGridFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
52
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductGridFacade, providedIn: 'root' }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductGridFacade, decorators: [{
|
|
55
55
|
type: Injectable,
|
|
56
56
|
args: [{ providedIn: 'root' }]
|
|
57
57
|
}] });
|
|
@@ -71,24 +71,24 @@ class MockDaffProductPageFacade {
|
|
|
71
71
|
}
|
|
72
72
|
dispatch(action) { }
|
|
73
73
|
;
|
|
74
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
75
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
74
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductPageFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
75
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductPageFacade, providedIn: 'root' }); }
|
|
76
76
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffProductPageFacade, decorators: [{
|
|
78
78
|
type: Injectable,
|
|
79
79
|
args: [{ providedIn: 'root' }]
|
|
80
80
|
}] });
|
|
81
81
|
|
|
82
82
|
class DaffProductStateTestingModule {
|
|
83
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
84
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
85
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
83
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
84
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateTestingModule }); }
|
|
85
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateTestingModule, providers: [
|
|
86
86
|
{ provide: DaffProductFacade, useExisting: MockDaffProductFacade },
|
|
87
87
|
{ provide: DaffProductGridFacade, useExisting: MockDaffProductGridFacade },
|
|
88
88
|
{ provide: DaffProductPageFacade, useExisting: MockDaffProductPageFacade },
|
|
89
89
|
] }); }
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateTestingModule, decorators: [{
|
|
92
92
|
type: NgModule,
|
|
93
93
|
args: [{
|
|
94
94
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-product-state-testing.mjs","sources":["../../../libs/product/state/testing/src/mock-product-facade.ts","../../../libs/product/state/testing/src/mock-product-grid-facade.ts","../../../libs/product/state/testing/src/mock-product-page-facade.ts","../../../libs/product/state/testing/src/product-testing.module.ts","../../../libs/product/state/testing/src/daffodil-product-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductFacade implements DaffProductFacadeInterface {\n getProduct(id: DaffProduct['id']): BehaviorSubject<DaffProduct> {\n return new BehaviorSubject(null);\n }\n getPrice(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n hasDiscount(id: DaffProduct['id']): BehaviorSubject<boolean> {\n return new BehaviorSubject(false);\n }\n getDiscountAmount(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n getDiscountedPrice(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n getDiscountPercent(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n isOutOfStock(id: DaffProduct['id']): BehaviorSubject<boolean> {\n return new BehaviorSubject(false);\n }\n dispatch(action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductGridFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductGridFacade implements DaffProductGridFacadeInterface {\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n products$: BehaviorSubject<DaffProduct[]> = new BehaviorSubject([]);\n dispatch(action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffState,\n DaffStateError,\n} from '@daffodil/core/state';\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductPageFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductPageFacade implements DaffProductPageFacadeInterface {\n loadingState$ = new BehaviorSubject<DaffState>(DaffState.Stable);\n loading$ = new BehaviorSubject<boolean>(false);\n mutating$ = new BehaviorSubject<boolean>(false);\n resolving$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n hasErrors$ = new BehaviorSubject<boolean>(false);\n product$ = new BehaviorSubject<DaffProduct>(null);\n\n dispatch(action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffProductFacade,\n DaffProductGridFacade,\n DaffProductPageFacade,\n} from '@daffodil/product/state';\n\nimport { MockDaffProductFacade } from './mock-product-facade';\nimport { MockDaffProductGridFacade } from './mock-product-grid-facade';\nimport { MockDaffProductPageFacade } from './mock-product-page-facade';\n\n@NgModule({\n providers: [\n { provide: DaffProductFacade, useExisting: MockDaffProductFacade },\n { provide: DaffProductGridFacade, useExisting: MockDaffProductGridFacade },\n { provide: DaffProductPageFacade, useExisting: MockDaffProductPageFacade },\n ],\n})\nexport class DaffProductStateTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MAEU,qBAAqB,CAAA;AAChC,IAAA,UAAU,CAAC,EAAqB,EAAA;AAC9B,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"daffodil-product-state-testing.mjs","sources":["../../../libs/product/state/testing/src/mock-product-facade.ts","../../../libs/product/state/testing/src/mock-product-grid-facade.ts","../../../libs/product/state/testing/src/mock-product-page-facade.ts","../../../libs/product/state/testing/src/product-testing.module.ts","../../../libs/product/state/testing/src/daffodil-product-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductFacade implements DaffProductFacadeInterface {\n getProduct(id: DaffProduct['id']): BehaviorSubject<DaffProduct> {\n return new BehaviorSubject(null);\n }\n getPrice(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n hasDiscount(id: DaffProduct['id']): BehaviorSubject<boolean> {\n return new BehaviorSubject(false);\n }\n getDiscountAmount(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n getDiscountedPrice(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n getDiscountPercent(id: DaffProduct['id']): BehaviorSubject<number> {\n return new BehaviorSubject(null);\n }\n isOutOfStock(id: DaffProduct['id']): BehaviorSubject<boolean> {\n return new BehaviorSubject(false);\n }\n dispatch(action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductGridFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductGridFacade implements DaffProductGridFacadeInterface {\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n products$: BehaviorSubject<DaffProduct[]> = new BehaviorSubject([]);\n dispatch(action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffState,\n DaffStateError,\n} from '@daffodil/core/state';\nimport { DaffProduct } from '@daffodil/product';\nimport { DaffProductPageFacadeInterface } from '@daffodil/product/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffProductPageFacade implements DaffProductPageFacadeInterface {\n loadingState$ = new BehaviorSubject<DaffState>(DaffState.Stable);\n loading$ = new BehaviorSubject<boolean>(false);\n mutating$ = new BehaviorSubject<boolean>(false);\n resolving$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n hasErrors$ = new BehaviorSubject<boolean>(false);\n product$ = new BehaviorSubject<DaffProduct>(null);\n\n dispatch(action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffProductFacade,\n DaffProductGridFacade,\n DaffProductPageFacade,\n} from '@daffodil/product/state';\n\nimport { MockDaffProductFacade } from './mock-product-facade';\nimport { MockDaffProductGridFacade } from './mock-product-grid-facade';\nimport { MockDaffProductPageFacade } from './mock-product-page-facade';\n\n@NgModule({\n providers: [\n { provide: DaffProductFacade, useExisting: MockDaffProductFacade },\n { provide: DaffProductGridFacade, useExisting: MockDaffProductGridFacade },\n { provide: DaffProductPageFacade, useExisting: MockDaffProductPageFacade },\n ],\n})\nexport class DaffProductStateTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MAEU,qBAAqB,CAAA;AAChC,IAAA,UAAU,CAAC,EAAqB,EAAA;AAC9B,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC;IAClC;AACA,IAAA,QAAQ,CAAC,EAAqB,EAAA;AAC5B,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CA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A,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MCMrB,6BAA6B,CAAA;iIAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAA7B,6BAA6B,EAAA,CAAA,CAAA;AAA7B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAAA,SAAA,EAN7B;AACT,YAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,qBAAqB,EAAE;AAClE,YAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC1E,YAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC3E,SAAA,EAAA,CAAA,CAAA;;2FAEU,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAPzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,qBAAqB,EAAE;AAClE,wBAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC1E,wBAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC3E,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -203,10 +203,10 @@ class DaffProductGridEffects {
|
|
|
203
203
|
this.loadAll$ = createEffect(() => this.actions$.pipe(ofType(DaffProductGridActionTypes.ProductGridLoadAction), switchMap((action) => this.driver.getAll()
|
|
204
204
|
.pipe(map((resp) => new DaffProductGridLoadSuccess(resp)), catchError((error) => of(new DaffProductGridLoadFailure(this.errorMatcher(error))))))));
|
|
205
205
|
}
|
|
206
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
207
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
206
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridEffects, deps: [{ token: i1.Actions }, { token: DaffProductDriver }, { token: DAFF_PRODUCT_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
207
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridEffects }); }
|
|
208
208
|
}
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridEffects, decorators: [{
|
|
210
210
|
type: Injectable
|
|
211
211
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
212
212
|
type: Inject,
|
|
@@ -236,10 +236,10 @@ class DaffProductEffects {
|
|
|
236
236
|
this.load$ = createEffect(() => this.actions$.pipe(ofType(DaffProductActionTypes.ProductLoadAction), switchMap((action) => this.driver.get(action.payload)
|
|
237
237
|
.pipe(map((resp) => new DaffProductLoadSuccess(resp)), catchError((error) => of(new DaffProductLoadFailure(this.errorMatcher(error))))))));
|
|
238
238
|
}
|
|
239
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
240
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
239
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductEffects, deps: [{ token: i1.Actions }, { token: DaffProductDriver }, { token: DAFF_PRODUCT_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
240
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductEffects }); }
|
|
241
241
|
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductEffects, decorators: [{
|
|
243
243
|
type: Injectable
|
|
244
244
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
245
245
|
type: Inject,
|
|
@@ -408,10 +408,10 @@ class DaffProductFacade {
|
|
|
408
408
|
dispatch(action) {
|
|
409
409
|
this.store.dispatch(action);
|
|
410
410
|
}
|
|
411
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
412
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
411
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductFacade, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
412
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductFacade, providedIn: 'root' }); }
|
|
413
413
|
}
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductFacade, decorators: [{
|
|
415
415
|
type: Injectable,
|
|
416
416
|
args: [{
|
|
417
417
|
providedIn: 'root',
|
|
@@ -438,10 +438,10 @@ class DaffProductPageFacade {
|
|
|
438
438
|
dispatch(action) {
|
|
439
439
|
this.store.dispatch(action);
|
|
440
440
|
}
|
|
441
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
442
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
441
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageFacade, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
442
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageFacade, providedIn: 'root' }); }
|
|
443
443
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageFacade, decorators: [{
|
|
445
445
|
type: Injectable,
|
|
446
446
|
args: [{
|
|
447
447
|
providedIn: 'root',
|
|
@@ -463,10 +463,10 @@ class DaffProductGridFacade {
|
|
|
463
463
|
dispatch(action) {
|
|
464
464
|
this.store.dispatch(action);
|
|
465
465
|
}
|
|
466
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
467
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
466
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridFacade, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
467
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridFacade, providedIn: 'root' }); }
|
|
468
468
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductGridFacade, decorators: [{
|
|
470
470
|
type: Injectable,
|
|
471
471
|
args: [{
|
|
472
472
|
providedIn: 'root',
|
|
@@ -631,10 +631,10 @@ class DaffProductPageEffects {
|
|
|
631
631
|
this.loadByUrl$ = createEffect(() => this.actions$.pipe(ofType(DaffProductPageActionTypes.ProductPageLoadByUrlAction), switchMap((action) => this.driver.getByUrl(action.payload)
|
|
632
632
|
.pipe(map((resp) => new DaffProductPageLoadSuccess(resp)), catchError((error) => of(new DaffProductPageLoadFailure(this.errorMatcher(error))))))));
|
|
633
633
|
}
|
|
634
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
635
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
634
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageEffects, deps: [{ token: i1.Actions }, { token: DaffProductDriver }, { token: DAFF_PRODUCT_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
635
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageEffects }); }
|
|
636
636
|
}
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductPageEffects, decorators: [{
|
|
638
638
|
type: Injectable
|
|
639
639
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
640
640
|
type: Inject,
|
|
@@ -683,16 +683,16 @@ provider: provideDaffProductReducers, } = createSingleInjectionToken('DAFF_PRODU
|
|
|
683
683
|
* A module that provides the default reducers and effects for the product redux state.
|
|
684
684
|
*/
|
|
685
685
|
class DaffProductStateModule {
|
|
686
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
687
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
688
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
686
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
687
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateModule, imports: [i1$1.StoreFeatureModule, i1.EffectsFeatureModule] }); }
|
|
688
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateModule, imports: [StoreModule.forFeature(DAFF_PRODUCT_STORE_FEATURE_KEY, DAFF_PRODUCT_REDUCERS, DAFF_PRODUCT_STORE_CONFIG),
|
|
689
689
|
EffectsModule.forFeature([
|
|
690
690
|
DaffProductGridEffects,
|
|
691
691
|
DaffProductEffects,
|
|
692
692
|
DaffProductPageEffects,
|
|
693
693
|
])] }); }
|
|
694
694
|
}
|
|
695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffProductStateModule, decorators: [{
|
|
696
696
|
type: NgModule,
|
|
697
697
|
args: [{
|
|
698
698
|
imports: [
|