@daffodil/product 0.87.2 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/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 +28 -17
- 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 +26 -20
- package/fesm2022/daffodil-product-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-shopify.mjs +27 -15
- 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 +37 -120
- 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/assets/products/0.jpg +0 -0
- package/assets/products/1.jpg +0 -0
- package/assets/products/10.jpg +0 -0
- package/assets/products/100.jpg +0 -0
- package/assets/products/11.jpg +0 -0
- package/assets/products/12.jpg +0 -0
- package/assets/products/13.jpg +0 -0
- package/assets/products/14.jpg +0 -0
- package/assets/products/15.jpg +0 -0
- package/assets/products/16.jpg +0 -0
- package/assets/products/17.jpg +0 -0
- package/assets/products/18.jpg +0 -0
- package/assets/products/19.jpg +0 -0
- package/assets/products/2.jpg +0 -0
- package/assets/products/20.jpg +0 -0
- package/assets/products/21.jpg +0 -0
- package/assets/products/22.jpg +0 -0
- package/assets/products/23.jpg +0 -0
- package/assets/products/24.jpg +0 -0
- package/assets/products/25.jpg +0 -0
- package/assets/products/26.jpg +0 -0
- package/assets/products/27.jpg +0 -0
- package/assets/products/28.jpg +0 -0
- package/assets/products/29.jpg +0 -0
- package/assets/products/3.jpg +0 -0
- package/assets/products/30.jpg +0 -0
- package/assets/products/31.jpg +0 -0
- package/assets/products/32.jpg +0 -0
- package/assets/products/33.jpg +0 -0
- package/assets/products/34.jpg +0 -0
- package/assets/products/35.jpg +0 -0
- package/assets/products/36.jpg +0 -0
- package/assets/products/37.jpg +0 -0
- package/assets/products/38.jpg +0 -0
- package/assets/products/39.jpg +0 -0
- package/assets/products/4.jpg +0 -0
- package/assets/products/40.jpg +0 -0
- package/assets/products/41.jpg +0 -0
- package/assets/products/42.jpg +0 -0
- package/assets/products/43.jpg +0 -0
- package/assets/products/44.jpg +0 -0
- package/assets/products/45.jpg +0 -0
- package/assets/products/46.jpg +0 -0
- package/assets/products/47.jpg +0 -0
- package/assets/products/48.jpg +0 -0
- package/assets/products/49.jpg +0 -0
- package/assets/products/5.jpg +0 -0
- package/assets/products/50.jpg +0 -0
- package/assets/products/51.jpg +0 -0
- package/assets/products/52.jpg +0 -0
- package/assets/products/53.jpg +0 -0
- package/assets/products/54.jpg +0 -0
- package/assets/products/55.jpg +0 -0
- package/assets/products/56.jpg +0 -0
- package/assets/products/57.jpg +0 -0
- package/assets/products/58.jpg +0 -0
- package/assets/products/59.jpg +0 -0
- package/assets/products/6.jpg +0 -0
- package/assets/products/60.jpg +0 -0
- package/assets/products/61.jpg +0 -0
- package/assets/products/62.jpg +0 -0
- package/assets/products/63.jpg +0 -0
- package/assets/products/64.jpg +0 -0
- package/assets/products/65.jpg +0 -0
- package/assets/products/66.jpg +0 -0
- package/assets/products/67.jpg +0 -0
- package/assets/products/68.jpg +0 -0
- package/assets/products/69.jpg +0 -0
- package/assets/products/7.jpg +0 -0
- package/assets/products/70.jpg +0 -0
- package/assets/products/71.jpg +0 -0
- package/assets/products/72.jpg +0 -0
- package/assets/products/73.jpg +0 -0
- package/assets/products/74.jpg +0 -0
- package/assets/products/75.jpg +0 -0
- package/assets/products/76.jpg +0 -0
- package/assets/products/77.jpg +0 -0
- package/assets/products/78.jpg +0 -0
- package/assets/products/79.jpg +0 -0
- package/assets/products/8.jpg +0 -0
- package/assets/products/80.jpg +0 -0
- package/assets/products/81.jpg +0 -0
- package/assets/products/82.jpg +0 -0
- package/assets/products/83.jpg +0 -0
- package/assets/products/84.jpg +0 -0
- package/assets/products/85.jpg +0 -0
- package/assets/products/86.jpg +0 -0
- package/assets/products/87.jpg +0 -0
- package/assets/products/88.jpg +0 -0
- package/assets/products/89.jpg +0 -0
- package/assets/products/9.jpg +0 -0
- package/assets/products/90.jpg +0 -0
- package/assets/products/91.jpg +0 -0
- package/assets/products/92.jpg +0 -0
- package/assets/products/93.jpg +0 -0
- package/assets/products/94.jpg +0 -0
- package/assets/products/95.jpg +0 -0
- package/assets/products/96.jpg +0 -0
- package/assets/products/97.jpg +0 -0
- package/assets/products/98.jpg +0 -0
- package/assets/products/99.jpg +0 -0
- 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/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 -5
- 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/public_api.d.ts +0 -8
- 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
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { ActionsSubject, Store } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffRoutingUriNormalizer } from '@daffodil/core/routing';
|
|
5
|
-
import { DaffProductStateRootSlice } from '@daffodil/product/state';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Resolves product data for product pages, and will only resolve the url
|
|
9
|
-
* after a product request succeeds or fails. This resolver will take a full
|
|
10
|
-
* a url of the form `some/url.html(secondary:outlet)?query=param#fragment` and attempt to resolve a product from it.
|
|
11
|
-
* Assumes that the URL to be resolved is the primary outlet.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffProductPageUrlResolver {
|
|
14
|
-
private platformId;
|
|
15
|
-
private store;
|
|
16
|
-
private dispatcher;
|
|
17
|
-
private urlNormalizer;
|
|
18
|
-
constructor(platformId: string, store: Store<DaffProductStateRootSlice>, dispatcher: ActionsSubject, urlNormalizer: DaffRoutingUriNormalizer);
|
|
19
|
-
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageUrlResolver, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductPageUrlResolver>;
|
|
22
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Params } from '@angular/router';
|
|
2
|
-
import { DaffCollectionRequest } from '@daffodil/core';
|
|
3
|
-
import { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';
|
|
4
|
-
import { DaffProductRoutingConfig } from '../config/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Builds a query param map from a {@link DaffCollectionRequest}.
|
|
8
|
-
* Its behavior can be configured via the {@link DAFF_PRODUCT_ROUTING_CONFIG} injection token.
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffProductGetQueryParamsFromRequest {
|
|
11
|
-
private config;
|
|
12
|
-
private discreteFilters;
|
|
13
|
-
constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
|
|
14
|
-
getQueryParams(request: DaffCollectionRequest): Params;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetQueryParamsFromRequest, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGetQueryParamsFromRequest>;
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ParamMap } from '@angular/router';
|
|
2
|
-
import { DaffCollectionRequest } from '@daffodil/core';
|
|
3
|
-
import { DaffRoutingQueryParamFilter } from '@daffodil/core/routing';
|
|
4
|
-
import { DaffProductRoutingConfig } from '../config/public_api';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Builds a {@link DaffCollectionRequest} from the query params of the passed route.
|
|
8
|
-
* Its behavior can be configured via the {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAMS} and
|
|
9
|
-
* {@link DAFF_PRODUCT_COLLECTION_QUERY_PARAM_TRANSFORMS} injection tokens.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffProductGetCollectionRequestFromRoute {
|
|
12
|
-
private config;
|
|
13
|
-
private discreteFilters;
|
|
14
|
-
constructor(config: DaffProductRoutingConfig, discreteFilters: DaffRoutingQueryParamFilter[]);
|
|
15
|
-
getRequest(queryParamMap: ParamMap): DaffCollectionRequest;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGetCollectionRequestFromRoute, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGetCollectionRequestFromRoute>;
|
|
18
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
/**
|
|
5
|
-
* Action types for Product Grid Actions.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum DaffProductGridActionTypes {
|
|
8
|
-
ProductGridLoadAction = "[@daffodil/product] ProductGrid Load Action",
|
|
9
|
-
ProductGridLoadSuccessAction = "[@daffodil/product] ProductGrid Load Success Action",
|
|
10
|
-
ProductGridLoadFailureAction = "[@daffodil/product] ProductGrid Load Failure Action",
|
|
11
|
-
ProductGridResetAction = "[@daffodil/product] ProductGrid Reset Action"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Triggers a request for an array of products.
|
|
15
|
-
*/
|
|
16
|
-
export declare class DaffProductGridLoad implements Action {
|
|
17
|
-
readonly type = DaffProductGridActionTypes.ProductGridLoadAction;
|
|
18
|
-
constructor();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* An action called when a request for of an array of products succeeded.
|
|
22
|
-
*
|
|
23
|
-
* @param payload - An array of Products
|
|
24
|
-
*/
|
|
25
|
-
export declare class DaffProductGridLoadSuccess<T extends DaffProduct = DaffProduct> implements Action {
|
|
26
|
-
payload: T[];
|
|
27
|
-
readonly type = DaffProductGridActionTypes.ProductGridLoadSuccessAction;
|
|
28
|
-
constructor(payload: T[]);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* An action called when a request for an array of products failed.
|
|
32
|
-
*
|
|
33
|
-
* @param payload - An error message
|
|
34
|
-
*/
|
|
35
|
-
export declare class DaffProductGridLoadFailure implements Action {
|
|
36
|
-
payload: DaffStateError;
|
|
37
|
-
readonly type = DaffProductGridActionTypes.ProductGridLoadFailureAction;
|
|
38
|
-
constructor(payload: DaffStateError);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Resets the state of the product grid redux store to its initial state.
|
|
42
|
-
*/
|
|
43
|
-
export declare class DaffProductGridReset implements Action {
|
|
44
|
-
readonly type = DaffProductGridActionTypes.ProductGridResetAction;
|
|
45
|
-
constructor();
|
|
46
|
-
}
|
|
47
|
-
export type DaffProductGridActions<T extends DaffProduct = DaffProduct> = DaffProductGridLoad | DaffProductGridLoadSuccess<T> | DaffProductGridLoadFailure | DaffProductGridReset;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductDriverResponse } from '@daffodil/product/driver';
|
|
5
|
-
/**
|
|
6
|
-
* Action types for Product Page Actions.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum DaffProductPageActionTypes {
|
|
9
|
-
ProductPageLoadByUrlAction = "[@daffodil/product] Product Page Load By URL Action",
|
|
10
|
-
ProductPageLoadAction = "[@daffodil/product] Product Page Load Action",
|
|
11
|
-
ProductPageLoadSuccessAction = "[@daffodil/product] Product Page Load Success Action",
|
|
12
|
-
ProductPageLoadFailureAction = "[@daffodil/product] Product Page Load Failure Action",
|
|
13
|
-
UpdateQtyAction = "[@daffodil/product] Product Page Update Qty Action"
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* An action triggered to initialize a product page load.
|
|
17
|
-
* This is intended to be used for loading a product page rather than only a product.
|
|
18
|
-
*
|
|
19
|
-
* @param payload - URL of the requested product
|
|
20
|
-
*/
|
|
21
|
-
export declare class DaffProductPageLoadByUrl<T extends DaffProduct = DaffProduct> implements Action {
|
|
22
|
-
payload: T['url'];
|
|
23
|
-
readonly type = DaffProductPageActionTypes.ProductPageLoadByUrlAction;
|
|
24
|
-
constructor(payload: T['url']);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* An action triggered to initialize a product page load.
|
|
28
|
-
* This is intended to be used for loading a product page rather than only a product.
|
|
29
|
-
*
|
|
30
|
-
* @param payload - Id of the requested product
|
|
31
|
-
*/
|
|
32
|
-
export declare class DaffProductPageLoad implements Action {
|
|
33
|
-
payload: string;
|
|
34
|
-
readonly type = DaffProductPageActionTypes.ProductPageLoadAction;
|
|
35
|
-
constructor(payload: string);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* An action triggered upon a successful product page request.
|
|
39
|
-
*
|
|
40
|
-
* @param payload - A DaffProduct
|
|
41
|
-
*/
|
|
42
|
-
export declare class DaffProductPageLoadSuccess<T extends DaffProduct = DaffProduct> implements Action {
|
|
43
|
-
payload: DaffProductDriverResponse<T>;
|
|
44
|
-
readonly type = DaffProductPageActionTypes.ProductPageLoadSuccessAction;
|
|
45
|
-
constructor(payload: DaffProductDriverResponse<T>);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* An action triggered upon a failed product page request.
|
|
49
|
-
*
|
|
50
|
-
* @param payload - an error message
|
|
51
|
-
*/
|
|
52
|
-
export declare class DaffProductPageLoadFailure implements Action {
|
|
53
|
-
payload: DaffStateError;
|
|
54
|
-
readonly type = DaffProductPageActionTypes.ProductPageLoadFailureAction;
|
|
55
|
-
constructor(payload: DaffStateError);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Update the qty of the current product.
|
|
59
|
-
*
|
|
60
|
-
* @param payload - The qty of the product.
|
|
61
|
-
*/
|
|
62
|
-
export declare class DaffProductPageUpdateQty implements Action {
|
|
63
|
-
payload: number;
|
|
64
|
-
readonly type = DaffProductPageActionTypes.UpdateQtyAction;
|
|
65
|
-
constructor(payload: number);
|
|
66
|
-
}
|
|
67
|
-
export type DaffProductPageActions<T extends DaffProduct = DaffProduct> = DaffProductPageLoadByUrl<T> | DaffProductPageLoad | DaffProductPageLoadSuccess<T> | DaffProductPageLoadFailure | DaffProductPageUpdateQty;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductDriverResponse } from '@daffodil/product/driver';
|
|
5
|
-
/**
|
|
6
|
-
* Action types for Product Actions.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum DaffProductActionTypes {
|
|
9
|
-
ProductLoadAction = "[@daffodil/product] Product Load Action",
|
|
10
|
-
ProductLoadSuccessAction = "[@daffodil/product] Product Load Success Action",
|
|
11
|
-
ProductLoadFailureAction = "[@daffodil/product] Product Load Failure Action"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Triggers a request for a Product.
|
|
15
|
-
*
|
|
16
|
-
* @param payload - Id of requested Product
|
|
17
|
-
*/
|
|
18
|
-
export declare class DaffProductLoad implements Action {
|
|
19
|
-
payload: string;
|
|
20
|
-
readonly type = DaffProductActionTypes.ProductLoadAction;
|
|
21
|
-
constructor(payload: string);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* An action called when a request for a Product succeeded.
|
|
25
|
-
*
|
|
26
|
-
* @param payload - A Product
|
|
27
|
-
*/
|
|
28
|
-
export declare class DaffProductLoadSuccess<T extends DaffProduct = DaffProduct> implements Action {
|
|
29
|
-
payload: DaffProductDriverResponse<T>;
|
|
30
|
-
readonly type = DaffProductActionTypes.ProductLoadSuccessAction;
|
|
31
|
-
constructor(payload: DaffProductDriverResponse<T>);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* An action called when a request for a Product failed.
|
|
35
|
-
*
|
|
36
|
-
* @param payload - An error message
|
|
37
|
-
*/
|
|
38
|
-
export declare class DaffProductLoadFailure implements Action {
|
|
39
|
-
payload: DaffStateError;
|
|
40
|
-
readonly type = DaffProductActionTypes.ProductLoadFailureAction;
|
|
41
|
-
constructor(payload: DaffStateError);
|
|
42
|
-
}
|
|
43
|
-
export type DaffProductActions<T extends DaffProduct = DaffProduct> = DaffProductLoad | DaffProductLoadSuccess<T> | DaffProductLoadFailure;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
import { DaffProductServiceInterface } from '@daffodil/product/driver';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Effects for handling product grid actions and for triggering corresponding service requests.
|
|
9
|
-
*
|
|
10
|
-
* @param action$ - Redux action object
|
|
11
|
-
* @param driver - A product service driver
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffProductGridEffects<T extends DaffProduct> {
|
|
14
|
-
private actions$;
|
|
15
|
-
private driver;
|
|
16
|
-
private errorMatcher;
|
|
17
|
-
constructor(actions$: Actions, driver: DaffProductServiceInterface<T>, errorMatcher: ErrorTransformer);
|
|
18
|
-
/**
|
|
19
|
-
* Handles ProductGridLoadAction by making a service call for products and returning a success or failure action
|
|
20
|
-
* to the action stream.
|
|
21
|
-
*
|
|
22
|
-
* @returns An Observable of a DaffProductGridAction
|
|
23
|
-
*/
|
|
24
|
-
loadAll$: Observable<any>;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGridEffects<any>, never>;
|
|
26
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGridEffects<any>>;
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
import { DaffProductServiceInterface } from '@daffodil/product/driver';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Effects for handling product actions and for triggering corresponding service requests.
|
|
9
|
-
*
|
|
10
|
-
* @param action$ - Redux action object
|
|
11
|
-
* @param driver - A product service driver
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffProductPageEffects<T extends DaffProduct> {
|
|
14
|
-
private actions$;
|
|
15
|
-
private driver;
|
|
16
|
-
private errorMatcher;
|
|
17
|
-
constructor(actions$: Actions, driver: DaffProductServiceInterface<T>, errorMatcher: ErrorTransformer);
|
|
18
|
-
/**
|
|
19
|
-
* Handles ProductPageLoadAction by making a service call for a product and returning a success or
|
|
20
|
-
* failure action to the action stream.
|
|
21
|
-
*
|
|
22
|
-
* @returns An Observable of a ProductLoadAction
|
|
23
|
-
*/
|
|
24
|
-
load$: Observable<any>;
|
|
25
|
-
loadByUrl$: Observable<any>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageEffects<any>, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductPageEffects<any>>;
|
|
28
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
import { DaffProductServiceInterface } from '@daffodil/product/driver';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Effects for handling product actions and for triggering corresponding service requests.
|
|
9
|
-
*
|
|
10
|
-
* @param action$ - Redux action object
|
|
11
|
-
* @param driver - A product service driver
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffProductEffects<T extends DaffProduct> {
|
|
14
|
-
private actions$;
|
|
15
|
-
private driver;
|
|
16
|
-
private errorMatcher;
|
|
17
|
-
constructor(actions$: Actions, driver: DaffProductServiceInterface<T>, errorMatcher: ErrorTransformer);
|
|
18
|
-
/**
|
|
19
|
-
* Handles ProductLoadAction by making a service call for a product and returning a success or
|
|
20
|
-
* failure action to the action stream.
|
|
21
|
-
*
|
|
22
|
-
* @returns An Observable of a ProductLoadAction
|
|
23
|
-
*/
|
|
24
|
-
load$: Observable<any>;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductEffects<any>, never>;
|
|
26
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductEffects<any>>;
|
|
27
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffStoreFacade } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
/**
|
|
6
|
-
* A facade for getting state about a particular product.
|
|
7
|
-
*/
|
|
8
|
-
export interface DaffProductFacadeInterface<T extends DaffProduct = DaffProduct> extends DaffStoreFacade<Action> {
|
|
9
|
-
/**
|
|
10
|
-
* Get a product.
|
|
11
|
-
*
|
|
12
|
-
* @param id a product id
|
|
13
|
-
*/
|
|
14
|
-
getProduct(id: T['id']): Observable<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Get the original price for a product.
|
|
17
|
-
*
|
|
18
|
-
* @param id a product id
|
|
19
|
-
*/
|
|
20
|
-
getPrice(id: T['id']): Observable<number>;
|
|
21
|
-
/**
|
|
22
|
-
* Whether a particular product has a discount.
|
|
23
|
-
*
|
|
24
|
-
* @param id a product id
|
|
25
|
-
*/
|
|
26
|
-
hasDiscount(id: T['id']): Observable<boolean>;
|
|
27
|
-
/**
|
|
28
|
-
* Get the discount amount of a product.
|
|
29
|
-
*
|
|
30
|
-
* @param id a product id
|
|
31
|
-
*/
|
|
32
|
-
getDiscountAmount(id: T['id']): Observable<number>;
|
|
33
|
-
/**
|
|
34
|
-
* Get the discounted price for a product.
|
|
35
|
-
*
|
|
36
|
-
* @param id a product id
|
|
37
|
-
*/
|
|
38
|
-
getDiscountedPrice(id: T['id']): Observable<number>;
|
|
39
|
-
/**
|
|
40
|
-
* Get the discount percent of a product.
|
|
41
|
-
*
|
|
42
|
-
* @param id a product id
|
|
43
|
-
*/
|
|
44
|
-
getDiscountPercent(id: T['id']): Observable<number>;
|
|
45
|
-
/**
|
|
46
|
-
* Whether a product is out of stock.
|
|
47
|
-
*
|
|
48
|
-
* @param id a product id
|
|
49
|
-
*/
|
|
50
|
-
isOutOfStock(id: T['id']): Observable<boolean>;
|
|
51
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Store, Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductFacadeInterface } from './product-facade.interface';
|
|
5
|
-
import { DaffProductStateRootSlice } from '../../reducers/product-reducers-state.interface';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* A facade for getting state about a particular product.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffProductFacade<T extends DaffProduct = DaffProduct> implements DaffProductFacadeInterface<T> {
|
|
13
|
-
private store;
|
|
14
|
-
private selectors;
|
|
15
|
-
constructor(store: Store<DaffProductStateRootSlice<T>>);
|
|
16
|
-
getProduct(id: T['id']): Observable<T>;
|
|
17
|
-
getPrice(id: T['id']): Observable<number>;
|
|
18
|
-
hasDiscount(id: T['id']): Observable<boolean>;
|
|
19
|
-
getDiscountAmount(id: T['id']): Observable<number>;
|
|
20
|
-
getDiscountedPrice(id: T['id']): Observable<number>;
|
|
21
|
-
getDiscountPercent(id: T['id']): Observable<number>;
|
|
22
|
-
isOutOfStock(id: T['id']): Observable<boolean>;
|
|
23
|
-
dispatch(action: Action): void;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductFacade<any>, never>;
|
|
25
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductFacade<any>>;
|
|
26
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffStoreFacade } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
export interface DaffProductGridFacadeInterface<T extends DaffProduct = DaffProduct> extends DaffStoreFacade<Action> {
|
|
6
|
-
/**
|
|
7
|
-
* The loading state for retrieving a list of products.
|
|
8
|
-
*/
|
|
9
|
-
loading$: Observable<boolean>;
|
|
10
|
-
/**
|
|
11
|
-
* The state for a list of products.
|
|
12
|
-
*/
|
|
13
|
-
products$: Observable<T[]>;
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Store, Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductGridFacadeInterface } from './product-grid-facade.interface';
|
|
5
|
-
import { DaffProductStateRootSlice } from '../../reducers/product-reducers-state.interface';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* A facade for accessing state for a list of products from an application component.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffProductGridFacade<T extends DaffProduct = DaffProduct> implements DaffProductGridFacadeInterface<T> {
|
|
13
|
-
private store;
|
|
14
|
-
loading$: Observable<boolean>;
|
|
15
|
-
products$: Observable<T[]>;
|
|
16
|
-
constructor(store: Store<DaffProductStateRootSlice<T>>);
|
|
17
|
-
dispatch(action: Action): void;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductGridFacade<any>, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductGridFacade<any>>;
|
|
20
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Store, Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffState, DaffStateError } from '@daffodil/core/state';
|
|
4
|
-
import { DaffProduct } from '@daffodil/product';
|
|
5
|
-
import { DaffProductPageFacadeInterface } from './facade.interface';
|
|
6
|
-
import { DaffProductStateRootSlice } from '../../reducers/product-reducers-state.interface';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* A facade for getting state about a particular product.
|
|
10
|
-
*
|
|
11
|
-
* @inheritdoc
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffProductPageFacade<T extends DaffProduct = DaffProduct> implements DaffProductPageFacadeInterface<T> {
|
|
14
|
-
private store;
|
|
15
|
-
loadingState$: Observable<DaffState>;
|
|
16
|
-
loading$: Observable<boolean>;
|
|
17
|
-
mutating$: Observable<boolean>;
|
|
18
|
-
resolving$: Observable<boolean>;
|
|
19
|
-
errors$: Observable<DaffStateError[]>;
|
|
20
|
-
hasErrors$: Observable<boolean>;
|
|
21
|
-
product$: Observable<T>;
|
|
22
|
-
private selectors;
|
|
23
|
-
constructor(store: Store<DaffProductStateRootSlice<T>>);
|
|
24
|
-
dispatch(action: Action): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductPageFacade<any>, never>;
|
|
26
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffProductPageFacade<any>>;
|
|
27
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffOperationStateFacadeInterface } from '@daffodil/core/state';
|
|
3
|
-
import { DaffProduct } from '@daffodil/product';
|
|
4
|
-
import { DaffProductReducerState } from '../../reducers/public_api';
|
|
5
|
-
/**
|
|
6
|
-
* A facade for getting state about a particular product.
|
|
7
|
-
*/
|
|
8
|
-
export interface DaffProductPageFacadeInterface<T extends DaffProduct = DaffProduct> extends DaffOperationStateFacadeInterface<DaffProductReducerState> {
|
|
9
|
-
/**
|
|
10
|
-
* The product loaded for the product page.
|
|
11
|
-
*/
|
|
12
|
-
product$: Observable<T>;
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { DaffProductFacadeInterface } from './product/product-facade.interface';
|
|
2
|
-
export { DaffProductFacade } from './product/product.facade';
|
|
3
|
-
export { DaffProductPageFacadeInterface } from './product-page/facade.interface';
|
|
4
|
-
export { DaffProductPageFacade } from './product-page/facade';
|
|
5
|
-
export { DaffProductGridFacadeInterface } from './product-grid/product-grid-facade.interface';
|
|
6
|
-
export { DaffProductGridFacade } from './product-grid/product-grid.facade';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { daffTransformErrorToStateError } from '@daffodil/core/state';
|
|
2
|
-
export declare const DAFF_PRODUCT_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffProductErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './error-matcher.token';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@ngrx/store";
|
|
3
|
-
import * as i2 from "@ngrx/effects";
|
|
4
|
-
/**
|
|
5
|
-
* A module that provides the default reducers and effects for the product redux state.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffProductStateModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffProductStateModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffProductStateModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffProductStateModule>;
|
|
11
|
-
}
|
package/state/public_api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './actions/public_api';
|
|
2
|
-
export * from './effects/public_api';
|
|
3
|
-
export * from './facades/public_api';
|
|
4
|
-
export * from './reducers/public_api';
|
|
5
|
-
export * from './selectors/public_api';
|
|
6
|
-
export * from './injection-tokens/public_api';
|
|
7
|
-
export { DaffProductStateModule } from './product-state.module';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { StoreConfig } from '@ngrx/store';
|
|
2
|
-
import { DaffProductReducersState } from '../product-reducers-state.interface';
|
|
3
|
-
export declare const DAFF_PRODUCT_STORE_CONFIG: import("@angular/core").InjectionToken<StoreConfig<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>>, provideDaffProductStoreConfig: <R extends StoreConfig<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>> = StoreConfig<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ActionReducer } from '@ngrx/store';
|
|
2
|
-
import { DaffProductReducersState } from '../product-reducers-state.interface';
|
|
3
|
-
export declare const DAFF_PRODUCT_EXTRA_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>[]>, daffProductProvideExtraReducers: <R extends ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>> = ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { MetaReducer } from '@ngrx/store';
|
|
2
|
-
import { DaffProductReducersState } from '../product-reducers-state.interface';
|
|
3
|
-
export declare const DAFF_PRODUCT_META_REDUCERS: import("@angular/core").InjectionToken<MetaReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>>[]>, daffProductProvideMetaReducers: <R extends MetaReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>> = MetaReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ActionReducer } from '@ngrx/store';
|
|
2
|
-
import { DaffProductReducersState } from '../product-reducers-state.interface';
|
|
3
|
-
export declare const DAFF_PRODUCT_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>>, provideDaffProductReducers: <R extends ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>> = ActionReducer<DaffProductReducersState<import("@daffodil/product").DaffProduct>, import("@ngrx/store").Action<string>>>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DaffOperationState } from '@daffodil/core/state';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
/**
|
|
4
|
-
* An interface describing product redux state. This state describes the current product that is loaded for a product page.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffProductReducerState extends DaffOperationState {
|
|
7
|
-
/**
|
|
8
|
-
* The id of the current product.
|
|
9
|
-
*/
|
|
10
|
-
currentProductId: DaffProduct['id'];
|
|
11
|
-
/**
|
|
12
|
-
* The quantity chosen for the current product.
|
|
13
|
-
*/
|
|
14
|
-
qty: number;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DaffProduct } from '@daffodil/product';
|
|
2
|
-
import { DaffProductReducerState } from './product-reducer-state.interface';
|
|
3
|
-
import { DaffProductPageActions } from '../../actions/public_api';
|
|
4
|
-
/**
|
|
5
|
-
* Initial values of the product state.
|
|
6
|
-
*/
|
|
7
|
-
export declare const daffProductReducerInitialState: DaffProductReducerState;
|
|
8
|
-
/**
|
|
9
|
-
* Reducer function that catches actions and changes/overwrites product state.
|
|
10
|
-
*
|
|
11
|
-
* @param state current State of the redux store
|
|
12
|
-
* @param action a product action
|
|
13
|
-
* @returns product state
|
|
14
|
-
*/
|
|
15
|
-
export declare function daffProductReducer<T extends DaffProduct>(state: DaffProductReducerState, action: DaffProductPageActions<T>): DaffProductReducerState;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EntityState } from '@ngrx/entity';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
import { DaffProductGridActions, DaffProductActions, DaffProductPageActions } from '../../actions/public_api';
|
|
4
|
-
/**
|
|
5
|
-
* Reducer function that catches actions and changes/overwrites product entities state.
|
|
6
|
-
*
|
|
7
|
-
* @param state current State of the redux store
|
|
8
|
-
* @param action ProductGrid, BestSellers, or Product actions
|
|
9
|
-
* @returns Product entities state
|
|
10
|
-
*/
|
|
11
|
-
export declare function daffProductEntitiesReducer<T extends DaffProduct>(state: EntityState<T>, action: DaffProductGridActions<T> | DaffProductActions<T> | DaffProductPageActions<T>): EntityState<T>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for product grid redux state.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffProductGridReducerState<T extends DaffProduct = DaffProduct> {
|
|
7
|
-
/**
|
|
8
|
-
* The array of products that have already been loaded.
|
|
9
|
-
*/
|
|
10
|
-
products: T[];
|
|
11
|
-
/**
|
|
12
|
-
* Whether a grid of products is loading.
|
|
13
|
-
*/
|
|
14
|
-
loading: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Errors associated with loading a grid of products.
|
|
17
|
-
*/
|
|
18
|
-
errors: DaffStateError[];
|
|
19
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DaffProduct } from '@daffodil/product';
|
|
2
|
-
import { DaffProductGridReducerState } from './product-grid-reducer-state.interface';
|
|
3
|
-
import { DaffProductGridActions } from '../../actions/public_api';
|
|
4
|
-
/**
|
|
5
|
-
* Initial values of the product grid state.
|
|
6
|
-
*/
|
|
7
|
-
export declare const initialState: DaffProductGridReducerState<any>;
|
|
8
|
-
/**
|
|
9
|
-
* Reducer function that catches actions and changes/overwrites product grid state.
|
|
10
|
-
*
|
|
11
|
-
* @param state current State of the redux store
|
|
12
|
-
* @param action a product grid action
|
|
13
|
-
* @returns Product grid state
|
|
14
|
-
*/
|
|
15
|
-
export declare function daffProductGridReducer<T extends DaffProduct>(state: DaffProductGridReducerState<any>, action: DaffProductGridActions<T>): DaffProductGridReducerState<T>;
|