@daffodil/product-composite 0.88.1 → 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 +15 -1
- package/driver/magento/index.d.ts +133 -1
- package/driver/magento/testing/index.d.ts +62 -1
- package/driver/testing/index.d.ts +15 -1
- package/fesm2022/daffodil-product-composite-driver-in-memory.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-magento-testing.mjs +9 -9
- package/fesm2022/daffodil-product-composite-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-magento.mjs +10 -10
- package/fesm2022/daffodil-product-composite-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-driver-testing.mjs +4 -4
- package/fesm2022/daffodil-product-composite-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-routing.mjs +11 -12
- package/fesm2022/daffodil-product-composite-routing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-state-testing.mjs +7 -7
- package/fesm2022/daffodil-product-composite-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-state.mjs +7 -7
- package/fesm2022/daffodil-product-composite-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite-testing.mjs +9 -9
- package/fesm2022/daffodil-product-composite-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-composite.mjs.map +1 -1
- package/index.d.ts +88 -1
- package/package.json +1 -1
- package/routing/index.d.ts +75 -1
- package/state/index.d.ts +321 -1
- package/state/testing/index.d.ts +32 -1
- package/testing/index.d.ts +64 -1
- package/driver/in-memory/in-memory.module.d.ts +0 -12
- package/driver/in-memory/public_api.d.ts +0 -1
- package/driver/magento/composite-product-driver.module.d.ts +0 -12
- package/driver/magento/fragments/bundled-product.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/item.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/option.token.d.ts +0 -2
- package/driver/magento/injection-tokens/public_api.d.ts +0 -4
- package/driver/magento/injection-tokens/transforms/item/extra.token.d.ts +0 -21
- package/driver/magento/injection-tokens/transforms/item/token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/option/extra.token.d.ts +0 -21
- package/driver/magento/injection-tokens/transforms/option/token.d.ts +0 -2
- package/driver/magento/interfaces/item-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/item-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/option-extra-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/option-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/public_api.d.ts +0 -4
- package/driver/magento/models/bundled-product.d.ts +0 -39
- package/driver/magento/models/public_api.d.ts +0 -1
- package/driver/magento/public_api.d.ts +0 -6
- package/driver/magento/testing/factories/bundle/bundle-item-option.factory.d.ts +0 -24
- package/driver/magento/testing/factories/bundle/bundle-item.factory.d.ts +0 -22
- package/driver/magento/testing/factories/bundle/bundle.factory.d.ts +0 -21
- package/driver/magento/testing/factories/public_api.d.ts +0 -3
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transforms/item-transformer.service.d.ts +0 -11
- package/driver/magento/transforms/option.d.ts +0 -3
- package/driver/magento/transforms/product-transformer.service.d.ts +0 -17
- package/driver/magento/transforms/public_api.d.ts +0 -3
- package/driver/testing/public_api.d.ts +0 -1
- package/driver/testing/testing.module.d.ts +0 -12
- package/helpers/build-selection-payload.d.ts +0 -2
- package/helpers/public_api.d.ts +0 -1
- package/models/composite-configuration-item.d.ts +0 -14
- package/models/composite-product-item.d.ts +0 -48
- package/models/composite-product.d.ts +0 -16
- package/models/public_api.d.ts +0 -4
- package/models/selection-payload.type.d.ts +0 -5
- package/public_api.d.ts +0 -2
- package/routing/config/default.d.ts +0 -8
- package/routing/config/interface.d.ts +0 -20
- package/routing/config/public_api.d.ts +0 -3
- package/routing/config/token.d.ts +0 -2
- package/routing/effects/product-page.effects.d.ts +0 -22
- package/routing/effects/public_api.d.ts +0 -1
- package/routing/module.d.ts +0 -10
- package/routing/public_api.d.ts +0 -3
- package/routing/services/query-param.service.d.ts +0 -13
- package/state/actions/composite-product.actions.d.ts +0 -24
- package/state/actions/public_api.d.ts +0 -1
- package/state/composite-product-state.module.d.ts +0 -10
- package/state/facades/composite-product/composite-product-facade.interface.d.ts +0 -73
- package/state/facades/composite-product/composite-product.facade.d.ts +0 -31
- package/state/facades/public_api.d.ts +0 -2
- package/state/helpers/ensure-items.d.ts +0 -7
- package/state/helpers/public_api.d.ts +0 -1
- package/state/public_api.d.ts +0 -6
- package/state/reducers/composite-product-entities/composite-product-entities-reducer-adapter.d.ts +0 -49
- package/state/reducers/composite-product-entities/composite-product-entities.reducer.d.ts +0 -14
- package/state/reducers/composite-product-entities/composite-product-entity.d.ts +0 -16
- package/state/reducers/composite-product-reducers-state.interface.d.ts +0 -14
- package/state/reducers/composite-product-reducers.d.ts +0 -6
- package/state/reducers/composite-product-store-feature-key.d.ts +0 -1
- package/state/reducers/ensure-items.meta-reducer.d.ts +0 -6
- package/state/reducers/injection-tokens/extra.token.d.ts +0 -3
- package/state/reducers/injection-tokens/public_api.d.ts +0 -1
- package/state/reducers/injection-tokens/reducers.token.d.ts +0 -3
- package/state/reducers/public_api.d.ts +0 -7
- package/state/selectors/all.selector.d.ts +0 -13
- package/state/selectors/composite-product/composite-product.selectors.d.ts +0 -38
- package/state/selectors/composite-product-entities/composite-product-entities.selectors.d.ts +0 -45
- package/state/selectors/feature.selector.d.ts +0 -12
- package/state/selectors/public_api.d.ts +0 -4
- package/state/testing/mock-composite-product-facade.d.ts +0 -23
- package/state/testing/product-testing.module.d.ts +0 -6
- package/state/testing/public_api.d.ts +0 -2
- package/testing/factories/composite-product-item-option.factory.d.ts +0 -19
- package/testing/factories/composite-product-item.factory.d.ts +0 -25
- package/testing/factories/composite-product.factory.d.ts +0 -23
- package/testing/factories/public_api.d.ts +0 -3
- package/testing/public_api.d.ts +0 -1
@@ -1 +1,15 @@
|
|
1
|
-
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { ModuleWithProviders } from '@angular/core';
|
3
|
+
import * as i1 from '@angular/common';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Module for providing the composite product factory to the product kind factory.
|
7
|
+
*/
|
8
|
+
declare class DaffCompositeProductInMemoryDriverModule {
|
9
|
+
static forRoot(): ModuleWithProviders<DaffCompositeProductInMemoryDriverModule>;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductInMemoryDriverModule, never>;
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCompositeProductInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCompositeProductInMemoryDriverModule>;
|
13
|
+
}
|
14
|
+
|
15
|
+
export { DaffCompositeProductInMemoryDriverModule };
|
@@ -1 +1,133 @@
|
|
1
|
-
|
1
|
+
import * as apollo_angular from 'apollo-angular';
|
2
|
+
import { DocumentNode } from 'graphql';
|
3
|
+
import * as i0 from '@angular/core';
|
4
|
+
import { ModuleWithProviders, Provider } from '@angular/core';
|
5
|
+
import * as i1 from '@angular/common';
|
6
|
+
import { DaffProduct } from '@daffodil/product';
|
7
|
+
import { DaffCompositeProductItem, DaffCompositeProductItemOption, DaffCompositeProduct } from '@daffodil/product-composite';
|
8
|
+
import { MagentoProductStockStatusEnum, MagentoProduct } from '@daffodil/product/driver/magento';
|
9
|
+
|
10
|
+
declare const magentoBundledProductFragment: (extraItemFragments?: Array<DocumentNode>, extraOptionFragments?: Array<DocumentNode>) => apollo_angular.TypedDocumentNode<unknown, unknown>;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* A module that provides the product fragment for composite products along with a composite product transformer.
|
14
|
+
*/
|
15
|
+
declare class DaffCompositeProductMagentoDriverModule {
|
16
|
+
static forRoot(): ModuleWithProviders<DaffCompositeProductMagentoDriverModule>;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductMagentoDriverModule, never>;
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCompositeProductMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
19
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCompositeProductMagentoDriverModule>;
|
20
|
+
}
|
21
|
+
|
22
|
+
declare enum MagentoPriceTypeEnum {
|
23
|
+
fixed = "FIXED",
|
24
|
+
percent = "PERCENT",
|
25
|
+
dynamic = "DYNAMIC"
|
26
|
+
}
|
27
|
+
interface MagentoBundledProduct extends MagentoProduct {
|
28
|
+
items: MagentoBundledProductItem[];
|
29
|
+
}
|
30
|
+
interface MagentoBundledProductItem {
|
31
|
+
required: boolean;
|
32
|
+
title: string;
|
33
|
+
type: string;
|
34
|
+
options: MagentoBundledProductItemOption[];
|
35
|
+
option_id?: number;
|
36
|
+
}
|
37
|
+
interface MagentoBundledProductItemOption {
|
38
|
+
uid: string;
|
39
|
+
label: string;
|
40
|
+
quantity: number;
|
41
|
+
is_default: boolean;
|
42
|
+
position: number;
|
43
|
+
product: MagentoBundledProductItemOptionProduct;
|
44
|
+
}
|
45
|
+
interface MagentoBundledProductItemOptionProduct {
|
46
|
+
stock_status?: MagentoProductStockStatusEnum;
|
47
|
+
price_range: {
|
48
|
+
maximum_price: {
|
49
|
+
regular_price: {
|
50
|
+
value: number;
|
51
|
+
currency: any;
|
52
|
+
};
|
53
|
+
discount: {
|
54
|
+
amount_off: number;
|
55
|
+
percent_off: number;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
};
|
59
|
+
}
|
60
|
+
|
61
|
+
type MagentoBundleProductItemExtraTransform<T extends MagentoBundledProductItem = MagentoBundledProductItem, V extends DaffCompositeProductItem = DaffCompositeProductItem> = (daffItem: DaffCompositeProductItem, magentoItem: T) => V;
|
62
|
+
|
63
|
+
type MagentoBundleProductItemTransform<T extends MagentoBundledProductItem = MagentoBundledProductItem, V extends DaffCompositeProductItem = DaffCompositeProductItem> = (magentoItem: T) => V;
|
64
|
+
|
65
|
+
type MagentoBundleProductOptionExtraTransform<T extends MagentoBundledProductItemOption = MagentoBundledProductItemOption, V extends DaffCompositeProductItemOption = DaffCompositeProductItemOption> = (daffOption: DaffCompositeProductItemOption, magentoOption: T) => V;
|
66
|
+
|
67
|
+
type MagentoBundleProductOptionTransform<T extends MagentoBundledProductItemOption = MagentoBundledProductItemOption, V extends DaffCompositeProductItemOption = DaffCompositeProductItemOption> = (magentoOption: T) => V;
|
68
|
+
|
69
|
+
declare class MagentoBundledProductTransformer {
|
70
|
+
private itemTransform;
|
71
|
+
constructor(itemTransform: MagentoBundleProductItemTransform);
|
72
|
+
/**
|
73
|
+
* Transforms the magento MagentoProduct from the magento product query into a DaffProduct.
|
74
|
+
*
|
75
|
+
* @param response the response from a magento product query.
|
76
|
+
*/
|
77
|
+
transform(daffProduct: DaffProduct, { items }: MagentoBundledProduct): DaffCompositeProduct;
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundledProductTransformer, never>;
|
79
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoBundledProductTransformer>;
|
80
|
+
}
|
81
|
+
|
82
|
+
declare class MagentoBundledProductItemTransformer {
|
83
|
+
private optionTransform;
|
84
|
+
constructor(optionTransform: MagentoBundleProductOptionTransform);
|
85
|
+
transform(item: MagentoBundledProductItem): DaffCompositeProductItem;
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundledProductItemTransformer, never>;
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoBundledProductItemTransformer>;
|
88
|
+
}
|
89
|
+
|
90
|
+
declare function transformMagentoBundledProductItemOption(option: MagentoBundledProductItemOption): DaffCompositeProductItemOption;
|
91
|
+
|
92
|
+
declare const DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS: i0.InjectionToken<DocumentNode[]>;
|
93
|
+
declare const provideDaffProductCompositeMagentoExtraItemFragments: <R extends DocumentNode = DocumentNode>(...values: R[]) => Array<i0.ValueProvider>;
|
94
|
+
|
95
|
+
declare const DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS: i0.InjectionToken<DocumentNode[]>;
|
96
|
+
declare const provideDaffProductCompositeMagentoExtraOptionFragments: <R extends DocumentNode = DocumentNode>(...values: R[]) => Array<i0.ValueProvider>;
|
97
|
+
|
98
|
+
declare const DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS: i0.InjectionToken<MagentoBundleProductItemExtraTransform[]>;
|
99
|
+
/**
|
100
|
+
* Provides extra product preview transforms for the Magento product driver.
|
101
|
+
*
|
102
|
+
* See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS}.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* ```ts
|
106
|
+
* providers: [
|
107
|
+
* ...provideDaffProductCompositeMagentoExtraItemTransforms(
|
108
|
+
* myExtraProductTransform
|
109
|
+
* )
|
110
|
+
* ]
|
111
|
+
* ```
|
112
|
+
*/
|
113
|
+
declare function provideDaffProductCompositeMagentoExtraItemTransforms<T extends MagentoBundledProductItem = MagentoBundledProductItem, V extends DaffCompositeProductItem = DaffCompositeProductItem>(...transforms: MagentoBundleProductItemExtraTransform<T, V>[]): Provider[];
|
114
|
+
|
115
|
+
declare const DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS: i0.InjectionToken<MagentoBundleProductOptionExtraTransform[]>;
|
116
|
+
/**
|
117
|
+
* Provides extra product preview transforms for the Magento product driver.
|
118
|
+
*
|
119
|
+
* See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS}.
|
120
|
+
*
|
121
|
+
* @example
|
122
|
+
* ```ts
|
123
|
+
* providers: [
|
124
|
+
* ...provideDaffProductCompositeMagentoExtraOptionTransforms(
|
125
|
+
* myExtraProductTransform
|
126
|
+
* )
|
127
|
+
* ]
|
128
|
+
* ```
|
129
|
+
*/
|
130
|
+
declare function provideDaffProductCompositeMagentoExtraOptionTransforms<T extends MagentoBundledProductItemOption = MagentoBundledProductItemOption, V extends DaffCompositeProductItemOption = DaffCompositeProductItemOption>(...transforms: MagentoBundleProductOptionExtraTransform<T, V>[]): Provider[];
|
131
|
+
|
132
|
+
export { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS, DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS, DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS, DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS, DaffCompositeProductMagentoDriverModule, MagentoBundledProductItemTransformer, MagentoBundledProductTransformer, MagentoPriceTypeEnum, magentoBundledProductFragment, provideDaffProductCompositeMagentoExtraItemFragments, provideDaffProductCompositeMagentoExtraItemTransforms, provideDaffProductCompositeMagentoExtraOptionFragments, provideDaffProductCompositeMagentoExtraOptionTransforms, transformMagentoBundledProductItemOption };
|
133
|
+
export type { MagentoBundleProductItemExtraTransform, MagentoBundleProductItemTransform, MagentoBundleProductOptionExtraTransform, MagentoBundleProductOptionTransform, MagentoBundledProduct, MagentoBundledProductItem, MagentoBundledProductItemOption, MagentoBundledProductItemOptionProduct };
|
@@ -1 +1,62 @@
|
|
1
|
-
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
2
|
+
import { MagentoSimpleProduct, MagentoProductTypeEnum } from '@daffodil/product/driver/magento';
|
3
|
+
import { MagentoSimpleProductFactory, MockMagentoCoreProduct } from '@daffodil/product/driver/magento/testing';
|
4
|
+
import { MagentoBundledProductItemOption, MagentoBundledProductItem, MagentoBundledProduct } from '@daffodil/product-composite/driver/magento';
|
5
|
+
import * as i0 from '@angular/core';
|
6
|
+
|
7
|
+
declare class MockMagentoBundledProductItemOption implements MagentoBundledProductItemOption {
|
8
|
+
private simpleFactory;
|
9
|
+
constructor(simpleFactory: MagentoSimpleProductFactory);
|
10
|
+
uid: string;
|
11
|
+
label: string;
|
12
|
+
quantity: number;
|
13
|
+
is_default: boolean;
|
14
|
+
position: number;
|
15
|
+
product: MagentoSimpleProduct;
|
16
|
+
protected createProduct(): MagentoSimpleProduct;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* A factory for creating stub data for {@link MagentoBundledProduct}s.
|
20
|
+
*/
|
21
|
+
declare class MagentoBundledProductItemOptionFactory extends DaffModelFactory<MagentoBundledProductItemOption> {
|
22
|
+
constructor(simpleFactory: MagentoSimpleProductFactory);
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundledProductItemOptionFactory, never>;
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoBundledProductItemOptionFactory>;
|
25
|
+
}
|
26
|
+
|
27
|
+
declare class MockMagentoBundledProductItem implements MagentoBundledProductItem {
|
28
|
+
private optionFactory;
|
29
|
+
constructor(optionFactory: MagentoBundledProductItemOptionFactory);
|
30
|
+
required: boolean;
|
31
|
+
title: string;
|
32
|
+
type: string;
|
33
|
+
options: MagentoBundledProductItemOption[];
|
34
|
+
option_id: number;
|
35
|
+
protected createOptions(): MagentoBundledProductItemOption[];
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* A factory for creating stub data for {@link MagentoBundledProduct}s.
|
39
|
+
*/
|
40
|
+
declare class MagentoBundledProductItemFactory extends DaffModelFactory<MagentoBundledProductItem> {
|
41
|
+
constructor(optionFactory: MagentoBundledProductItemOptionFactory);
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundledProductItemFactory, never>;
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoBundledProductItemFactory>;
|
44
|
+
}
|
45
|
+
|
46
|
+
declare class MockMagentoBundledProduct extends MockMagentoCoreProduct implements MagentoBundledProduct {
|
47
|
+
private bundleItemFactory;
|
48
|
+
constructor(bundleItemFactory: MagentoBundledProductItemFactory);
|
49
|
+
__typename: MagentoProductTypeEnum;
|
50
|
+
items: MagentoBundledProductItem[];
|
51
|
+
protected createBundleItems(): MagentoBundledProductItem[];
|
52
|
+
}
|
53
|
+
/**
|
54
|
+
* A factory for creating stub data for {@link MagentoBundledProduct}s.
|
55
|
+
*/
|
56
|
+
declare class MagentoBundledProductFactory extends DaffModelFactory<MagentoBundledProduct> {
|
57
|
+
constructor(bundleItemFactory: MagentoBundledProductItemFactory);
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundledProductFactory, never>;
|
59
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoBundledProductFactory>;
|
60
|
+
}
|
61
|
+
|
62
|
+
export { MagentoBundledProductFactory, MagentoBundledProductItemFactory, MagentoBundledProductItemOptionFactory, MockMagentoBundledProduct, MockMagentoBundledProductItem, MockMagentoBundledProductItemOption };
|
@@ -1 +1,15 @@
|
|
1
|
-
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { ModuleWithProviders } from '@angular/core';
|
3
|
+
import * as i1 from '@angular/common';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Module for providing the composite product factory to the product kind factory.
|
7
|
+
*/
|
8
|
+
declare class DaffCompositeProductTestingDriverModule {
|
9
|
+
static forRoot(): ModuleWithProviders<DaffCompositeProductTestingDriverModule>;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeProductTestingDriverModule, never>;
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCompositeProductTestingDriverModule, never, [typeof i1.CommonModule], never>;
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCompositeProductTestingDriverModule>;
|
13
|
+
}
|
14
|
+
|
15
|
+
export { DaffCompositeProductTestingDriverModule };
|
@@ -16,11 +16,11 @@ class DaffCompositeProductInMemoryDriverModule {
|
|
16
16
|
],
|
17
17
|
};
|
18
18
|
}
|
19
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
20
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
21
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
19
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
20
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductInMemoryDriverModule, imports: [CommonModule] }); }
|
21
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductInMemoryDriverModule, imports: [CommonModule] }); }
|
22
22
|
}
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductInMemoryDriverModule, decorators: [{
|
24
24
|
type: NgModule,
|
25
25
|
args: [{
|
26
26
|
imports: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite-driver-in-memory.mjs","sources":["../../../libs/product-composite/driver/in-memory/src/in-memory.module.ts","../../../libs/product-composite/driver/in-memory/src/daffodil-product-composite-driver-in-memory.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffProductExtraFactoryTypes } from '@daffodil/product/testing';\nimport { DaffCompositeProductFactory } from '@daffodil/product-composite/testing';\n\n/**\n * Module for providing the composite product factory to the product kind factory.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductInMemoryDriverModule> {\n return {\n ngModule: DaffCompositeProductInMemoryDriverModule,\n providers: [\n provideDaffProductExtraFactoryTypes(DaffCompositeProductFactory),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MAMU,wCAAwC,CAAA;AACnD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,wCAAwC;AAClD,YAAA,SAAS,EAAE;gBACT,mCAAmC,CAAC,2BAA2B,CAAC;AACjE,aAAA;SACF
|
1
|
+
{"version":3,"file":"daffodil-product-composite-driver-in-memory.mjs","sources":["../../../libs/product-composite/driver/in-memory/src/in-memory.module.ts","../../../libs/product-composite/driver/in-memory/src/daffodil-product-composite-driver-in-memory.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffProductExtraFactoryTypes } from '@daffodil/product/testing';\nimport { DaffCompositeProductFactory } from '@daffodil/product-composite/testing';\n\n/**\n * Module for providing the composite product factory to the product kind factory.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductInMemoryDriverModule> {\n return {\n ngModule: DaffCompositeProductInMemoryDriverModule,\n providers: [\n provideDaffProductExtraFactoryTypes(DaffCompositeProductFactory),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MAMU,wCAAwC,CAAA;AACnD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,wCAAwC;AAClD,YAAA,SAAS,EAAE;gBACT,mCAAmC,CAAC,2BAA2B,CAAC;AACjE,aAAA;SACF;IACH;iIARW,wCAAwC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAxC,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,wCAAwC,YAHjD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,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,wCAAwC,YAHjD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBALpD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
@@ -27,10 +27,10 @@ class MagentoBundledProductItemOptionFactory extends DaffModelFactory {
|
|
27
27
|
constructor(simpleFactory) {
|
28
28
|
super(MockMagentoBundledProductItemOption, simpleFactory);
|
29
29
|
}
|
30
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
31
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
30
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemOptionFactory, deps: [{ token: i1.MagentoSimpleProductFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
31
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemOptionFactory, providedIn: 'root' }); }
|
32
32
|
}
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemOptionFactory, decorators: [{
|
34
34
|
type: Injectable,
|
35
35
|
args: [{
|
36
36
|
providedIn: 'root',
|
@@ -57,10 +57,10 @@ class MagentoBundledProductItemFactory extends DaffModelFactory {
|
|
57
57
|
constructor(optionFactory) {
|
58
58
|
super(MockMagentoBundledProductItem, optionFactory);
|
59
59
|
}
|
60
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
61
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
60
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemFactory, deps: [{ token: MagentoBundledProductItemOptionFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
61
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemFactory, providedIn: 'root' }); }
|
62
62
|
}
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemFactory, decorators: [{
|
64
64
|
type: Injectable,
|
65
65
|
args: [{
|
66
66
|
providedIn: 'root',
|
@@ -85,10 +85,10 @@ class MagentoBundledProductFactory extends DaffModelFactory {
|
|
85
85
|
constructor(bundleItemFactory) {
|
86
86
|
super(MockMagentoBundledProduct, bundleItemFactory);
|
87
87
|
}
|
88
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
89
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
88
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductFactory, deps: [{ token: MagentoBundledProductItemFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
89
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductFactory, providedIn: 'root' }); }
|
90
90
|
}
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductFactory, decorators: [{
|
92
92
|
type: Injectable,
|
93
93
|
args: [{
|
94
94
|
providedIn: 'root',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite-driver-magento-testing.mjs","sources":["../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle-item-option.factory.ts","../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle-item.factory.ts","../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle.factory.ts","../../../libs/product-composite/driver/magento/testing/src/daffodil-product-composite-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoSimpleProduct } from '@daffodil/product/driver/magento';\nimport { MagentoSimpleProductFactory } from '@daffodil/product/driver/magento/testing';\nimport { MagentoBundledProductItemOption } from '@daffodil/product-composite/driver/magento';\n\n\nexport class MockMagentoBundledProductItemOption implements MagentoBundledProductItemOption {\n constructor(\n private simpleFactory: MagentoSimpleProductFactory,\n ) {}\n\n uid = faker.string.uuid();\n label = faker.lorem.word();\n quantity = faker.number.int({ min: 1, max: 20 });\n is_default = faker.datatype.boolean();\n position = faker.number.int({ min: 1, max: 10 });\n product = this.createProduct();\n\n protected createProduct(): MagentoSimpleProduct {\n return this.simpleFactory.create();\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductItemOptionFactory extends DaffModelFactory<MagentoBundledProductItemOption> {\n constructor(\n simpleFactory: MagentoSimpleProductFactory,\n ) {\n super(MockMagentoBundledProductItemOption, simpleFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoBundledProductItem,\n MagentoBundledProductItemOption,\n} from '@daffodil/product-composite/driver/magento';\n\nimport { MagentoBundledProductItemOptionFactory } from './bundle-item-option.factory';\n\n\nexport class MockMagentoBundledProductItem implements MagentoBundledProductItem {\n constructor(\n private optionFactory: MagentoBundledProductItemOptionFactory,\n ) {}\n required = faker.datatype.boolean();\n title = faker.lorem.word();\n type = faker.lorem.word();\n options = this.createOptions();\n option_id = faker.number.int({ min: 1, max: 9999 });\n\n protected createOptions(): MagentoBundledProductItemOption[] {\n return this.optionFactory.createMany(faker.number.int({ min: 1, max: 5 }));\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductItemFactory extends DaffModelFactory<MagentoBundledProductItem> {\n constructor(\n optionFactory: MagentoBundledProductItemOptionFactory,\n ) {\n super(MockMagentoBundledProductItem, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoProductTypeEnum } from '@daffodil/product/driver/magento';\nimport { MockMagentoCoreProduct } from '@daffodil/product/driver/magento/testing';\nimport {\n MagentoBundledProduct,\n MagentoBundledProductItem,\n} from '@daffodil/product-composite/driver/magento';\n\nimport { MagentoBundledProductItemFactory } from './bundle-item.factory';\n\nexport class MockMagentoBundledProduct extends MockMagentoCoreProduct implements MagentoBundledProduct {\n constructor(\n private bundleItemFactory: MagentoBundledProductItemFactory,\n ) {\n super();\n }\n\n __typename = MagentoProductTypeEnum.BundledProduct;\n items = this.createBundleItems();\n\n protected createBundleItems(): MagentoBundledProductItem[] {\n return this.bundleItemFactory.createMany(faker.number.int({ min: 1, max: 5 }));\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductFactory extends DaffModelFactory<MagentoBundledProduct> {\n constructor(\n bundleItemFactory: MagentoBundledProductItemFactory,\n ) {\n super(MockMagentoBundledProduct, bundleItemFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoBundledProductItemOptionFactory","i1.MagentoBundledProductItemFactory"],"mappings":";;;;;;;;MASa,mCAAmC,CAAA;AAC9C,IAAA,WAAA,CACU,aAA0C,EAAA;QAA1C,
|
1
|
+
{"version":3,"file":"daffodil-product-composite-driver-magento-testing.mjs","sources":["../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle-item-option.factory.ts","../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle-item.factory.ts","../../../libs/product-composite/driver/magento/testing/src/factories/bundle/bundle.factory.ts","../../../libs/product-composite/driver/magento/testing/src/daffodil-product-composite-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoSimpleProduct } from '@daffodil/product/driver/magento';\nimport { MagentoSimpleProductFactory } from '@daffodil/product/driver/magento/testing';\nimport { MagentoBundledProductItemOption } from '@daffodil/product-composite/driver/magento';\n\n\nexport class MockMagentoBundledProductItemOption implements MagentoBundledProductItemOption {\n constructor(\n private simpleFactory: MagentoSimpleProductFactory,\n ) {}\n\n uid = faker.string.uuid();\n label = faker.lorem.word();\n quantity = faker.number.int({ min: 1, max: 20 });\n is_default = faker.datatype.boolean();\n position = faker.number.int({ min: 1, max: 10 });\n product = this.createProduct();\n\n protected createProduct(): MagentoSimpleProduct {\n return this.simpleFactory.create();\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductItemOptionFactory extends DaffModelFactory<MagentoBundledProductItemOption> {\n constructor(\n simpleFactory: MagentoSimpleProductFactory,\n ) {\n super(MockMagentoBundledProductItemOption, simpleFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoBundledProductItem,\n MagentoBundledProductItemOption,\n} from '@daffodil/product-composite/driver/magento';\n\nimport { MagentoBundledProductItemOptionFactory } from './bundle-item-option.factory';\n\n\nexport class MockMagentoBundledProductItem implements MagentoBundledProductItem {\n constructor(\n private optionFactory: MagentoBundledProductItemOptionFactory,\n ) {}\n required = faker.datatype.boolean();\n title = faker.lorem.word();\n type = faker.lorem.word();\n options = this.createOptions();\n option_id = faker.number.int({ min: 1, max: 9999 });\n\n protected createOptions(): MagentoBundledProductItemOption[] {\n return this.optionFactory.createMany(faker.number.int({ min: 1, max: 5 }));\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductItemFactory extends DaffModelFactory<MagentoBundledProductItem> {\n constructor(\n optionFactory: MagentoBundledProductItemOptionFactory,\n ) {\n super(MockMagentoBundledProductItem, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoProductTypeEnum } from '@daffodil/product/driver/magento';\nimport { MockMagentoCoreProduct } from '@daffodil/product/driver/magento/testing';\nimport {\n MagentoBundledProduct,\n MagentoBundledProductItem,\n} from '@daffodil/product-composite/driver/magento';\n\nimport { MagentoBundledProductItemFactory } from './bundle-item.factory';\n\nexport class MockMagentoBundledProduct extends MockMagentoCoreProduct implements MagentoBundledProduct {\n constructor(\n private bundleItemFactory: MagentoBundledProductItemFactory,\n ) {\n super();\n }\n\n __typename = MagentoProductTypeEnum.BundledProduct;\n items = this.createBundleItems();\n\n protected createBundleItems(): MagentoBundledProductItem[] {\n return this.bundleItemFactory.createMany(faker.number.int({ min: 1, max: 5 }));\n }\n}\n\n/**\n * A factory for creating stub data for {@link MagentoBundledProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoBundledProductFactory extends DaffModelFactory<MagentoBundledProduct> {\n constructor(\n bundleItemFactory: MagentoBundledProductItemFactory,\n ) {\n super(MockMagentoBundledProduct, bundleItemFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoBundledProductItemOptionFactory","i1.MagentoBundledProductItemFactory"],"mappings":";;;;;;;;MASa,mCAAmC,CAAA;AAC9C,IAAA,WAAA,CACU,aAA0C,EAAA;QAA1C,IAAA,CAAA,aAAa,GAAb,aAAa;AAGvB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;AACzB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC1B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AACrC,QAAA,IAAA,C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CAAC,iBAAiB,EAAE;IAHhC;IAKU,iBAAiB,GAAA;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAChF;AACD;AAED;;AAEG;AAIG,MAAO,4BAA6B,SAAQ,gBAAuC,CAAA;AACvF,IAAA,WAAA,CACE,iBAAmD,EAAA;AAEnD,QAAA,KAAK,CAAC,yBAAyB,EAAE,iBAAiB,CAAC;IACrD;iIALW,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,gCAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cAF3B,MAAM,EAAA,CAAA,CAAA;;2FAEP,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACjCD;;AAEG;;;;"}
|
@@ -194,10 +194,10 @@ class MagentoBundledProductTransformer {
|
|
194
194
|
items: items.map(this.itemTransform),
|
195
195
|
};
|
196
196
|
}
|
197
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
198
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
197
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductTransformer, deps: [{ token: DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
198
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductTransformer }); }
|
199
199
|
}
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductTransformer, decorators: [{
|
201
201
|
type: Injectable
|
202
202
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
203
203
|
type: Inject,
|
@@ -232,10 +232,10 @@ class MagentoBundledProductItemTransformer {
|
|
232
232
|
options: Array.from(item.options).sort((a, b) => a.position - b.position).map(this.optionTransform),
|
233
233
|
};
|
234
234
|
}
|
235
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
236
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
235
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemTransformer, deps: [{ token: DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
236
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemTransformer }); }
|
237
237
|
}
|
238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoBundledProductItemTransformer, decorators: [{
|
239
239
|
type: Injectable
|
240
240
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
241
241
|
type: Inject,
|
@@ -311,11 +311,11 @@ class DaffCompositeProductMagentoDriverModule {
|
|
311
311
|
],
|
312
312
|
};
|
313
313
|
}
|
314
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
315
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
316
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
314
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
315
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductMagentoDriverModule, imports: [CommonModule] }); }
|
316
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductMagentoDriverModule, imports: [CommonModule] }); }
|
317
317
|
}
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductMagentoDriverModule, decorators: [{
|
319
319
|
type: NgModule,
|
320
320
|
args: [{
|
321
321
|
imports: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite-driver-magento.mjs","sources":["../../../libs/product-composite/driver/magento/src/fragments/bundled-product.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/fragments/item.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/fragments/option.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/item/extra.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/option/extra.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/item/token.ts","../../../libs/product-composite/driver/magento/src/transforms/product-transformer.service.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/option/token.ts","../../../libs/product-composite/driver/magento/src/transforms/item-transformer.service.ts","../../../libs/product-composite/driver/magento/src/transforms/option.ts","../../../libs/product-composite/driver/magento/src/composite-product-driver.module.ts","../../../libs/product-composite/driver/magento/src/models/bundled-product.ts","../../../libs/product-composite/driver/magento/src/daffodil-product-composite-driver-magento.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\n\nimport {\n daffBuildFragmentDefinition,\n daffBuildFragmentNameSpread,\n} from '@daffodil/core/graphql';\n\nexport const magentoBundledProductFragment = (extraItemFragments: Array<DocumentNode> = [], extraOptionFragments: Array<DocumentNode> = []) => gql`\nfragment magentoBundledProduct on BundleProduct {\n\titems {\n\t\t${daffBuildFragmentNameSpread(...extraItemFragments)}\n\n\t\toption_id\n\t\trequired\n\t\ttitle\n\t\ttype\n\t\toptions {\n\t\t\t${daffBuildFragmentNameSpread(...extraOptionFragments)}\n\n\t\t\tuid\n\t\t\tis_default\n\t\t\tlabel\n\t\t\tquantity\n position\n\t\t\tproduct {\n\t\t\t\tstock_status\n\t\t\t\tprice_range {\n\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdiscount {\n\t\t\t\t\t\t\tamount_off\n\t\t\t\t\t\t\tpercent_off\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n${daffBuildFragmentDefinition(...extraItemFragments, ...extraOptionFragments)}\n`;\n","import { DocumentNode } from 'graphql';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra GraphQL fragments that will be spread into product queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n *\n * This can increase query complexity above the Magento default of 300.\n * Daffodil only guarantees that stock queries don't exceed the limit of 300.\n * Apps using this token should therefore increase the query complexity limit\n * to accommodate the extra complexity contributed by the provided fragments.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS,\n\n /**\n * Provides extra GraphQL fragments for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraItemFragments(\n * myExtraProductFragment\n * )\n * ]\n * ```\n */\n provider: provideDaffProductCompositeMagentoExtraItemFragments,\n} = createMultiInjectionToken<DocumentNode>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS');\n","import { DocumentNode } from 'graphql';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra GraphQL fragments that will be spread into product queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n *\n * This can increase query complexity above the Magento default of 300.\n * Daffodil only guarantees that stock queries don't exceed the limit of 300.\n * Apps using this token should therefore increase the query complexity limit\n * to accommodate the extra complexity contributed by the provided fragments.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS,\n\n /**\n * Provides extra GraphQL fragments for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraOptionFragments(\n * myExtraProductFragment\n * )\n * ]\n * ```\n */\n provider: provideDaffProductCompositeMagentoExtraOptionFragments,\n} = createMultiInjectionToken<DocumentNode>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS');\n","import { Provider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport { DaffCompositeProductItem } from '@daffodil/product-composite';\n\nimport { MagentoBundleProductItemExtraTransform } from '../../../interfaces/item-extra-transform.type';\nimport { MagentoBundledProductItem } from '../../../models/public_api';\n\nconst {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product Magento driver.\n * It is run after the standard transforms for each product preview and passed both the current transformed Daffodil product and the Magento product.\n *\n * See {@link MagentoBundledProductItem} for more info.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS,\n provider,\n} = createMultiInjectionToken<MagentoBundleProductItemExtraTransform>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS');\n\n/**\n * Provides extra product preview transforms for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraItemTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\nexport function provideDaffProductCompositeMagentoExtraItemTransforms<T extends MagentoBundledProductItem = MagentoBundledProductItem, V extends DaffCompositeProductItem = DaffCompositeProductItem>(...transforms: MagentoBundleProductItemExtraTransform<T, V>[]): Provider[] {\n return provider<MagentoBundleProductItemExtraTransform<T, V>>(...transforms);\n}\n\nexport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS };\n","import { Provider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\nimport { MagentoBundleProductOptionExtraTransform } from '../../../interfaces/option-extra-transform.type';\nimport { MagentoBundledProductItemOption } from '../../../models/public_api';\n\nconst {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product Magento driver.\n * It is run after the standard transforms for each product preview and passed both the current transformed Daffodil product and the Magento product.\n *\n * See {@link MagentoBundledProductItemOption} for more info.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS,\n provider,\n} = createMultiInjectionToken<MagentoBundleProductOptionExtraTransform>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS');\n\n/**\n * Provides extra product preview transforms for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraOptionTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\nexport function provideDaffProductCompositeMagentoExtraOptionTransforms<T extends MagentoBundledProductItemOption = MagentoBundledProductItemOption, V extends DaffCompositeProductItemOption = DaffCompositeProductItemOption>(...transforms: MagentoBundleProductOptionExtraTransform<T, V>[]): Provider[] {\n return provider<MagentoBundleProductOptionExtraTransform<T, V>>(...transforms);\n}\n\nexport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS };\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS } from './extra.token';\nimport { MagentoBundleProductItemTransform } from '../../../interfaces/public_api';\nimport { MagentoBundledProductItem } from '../../../models/public_api';\nimport { MagentoBundledProductItemTransformer } from '../../../transforms/public_api';\n\nexport const {\n /**\n * An internal token to combine the Magento preview transform with the injected transforms.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM}.\n */\n provider: provideDaffProductMagentoProductTransform,\n} = createSingleInjectionToken<MagentoBundleProductItemTransform>(\n 'DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS);\n const transformer = inject(MagentoBundledProductItemTransformer);\n return (magentoProduct: MagentoBundledProductItem) =>\n transforms.reduce(\n (daffProduct, transform) => transform(daffProduct, magentoProduct),\n transformer.transform(magentoProduct),\n );\n },\n },\n);\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\n\nimport {\n DaffProductTypeEnum,\n DaffProduct,\n} from '@daffodil/product';\nimport { DaffCompositeProduct } from '@daffodil/product-composite';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM } from '../injection-tokens/transforms/item/token';\nimport { MagentoBundleProductItemTransform } from '../interfaces/public_api';\nimport { MagentoBundledProduct } from '../models/bundled-product';\n\n@Injectable()\nexport class MagentoBundledProductTransformer {\n constructor(\n @Inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM) private itemTransform: MagentoBundleProductItemTransform,\n ) {}\n\n /**\n * Transforms the magento MagentoProduct from the magento product query into a DaffProduct.\n *\n * @param response the response from a magento product query.\n */\n transform(\n daffProduct: DaffProduct,\n { items }: MagentoBundledProduct,\n ): DaffCompositeProduct {\n return {\n ...daffProduct,\n ...items.length > 0 ? {\n price: 0,\n discount: {\n amount: 0,\n percent: 0,\n },\n } : {},\n type: DaffProductTypeEnum.Composite,\n items: items.map(this.itemTransform),\n };\n }\n}\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS } from './extra.token';\nimport { MagentoBundleProductOptionTransform } from '../../../interfaces/public_api';\nimport { MagentoBundledProductItemOption } from '../../../models/public_api';\nimport { transformMagentoBundledProductItemOption } from '../../../transforms/public_api';\n\nexport const {\n /**\n * An internal token to combine the Magento preview transform with the injected transforms.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM}.\n */\n provider: provideDaffProductMagentoProductTransform,\n} = createSingleInjectionToken<MagentoBundleProductOptionTransform>(\n 'DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS);\n return (magentoProduct: MagentoBundledProductItemOption) =>\n transforms.reduce(\n (daffProduct, transform) => transform(daffProduct, magentoProduct),\n transformMagentoBundledProductItemOption(magentoProduct),\n );\n },\n },\n);\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\n\nimport {\n DaffCompositeProductItem,\n DaffCompositeProductItemInputEnum,\n} from '@daffodil/product-composite';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM } from '../injection-tokens/transforms/option/token';\nimport { MagentoBundleProductOptionTransform } from '../interfaces/public_api';\nimport { MagentoBundledProductItem } from '../models/bundled-product';\n\n@Injectable()\nexport class MagentoBundledProductItemTransformer {\n constructor(\n @Inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM) private optionTransform: MagentoBundleProductOptionTransform,\n ) {}\n\n transform(item: MagentoBundledProductItem): DaffCompositeProductItem {\n return {\n id: item.option_id.toString(),\n required: item.required,\n title: item.title,\n input_type: <DaffCompositeProductItemInputEnum>item.type,\n options: Array.from(item.options).sort((a, b) => a.position - b.position).map(this.optionTransform),\n };\n }\n}\n","\nimport {\n DaffProductDiscount,\n DaffProductTypeEnum,\n} from '@daffodil/product';\nimport { MagentoProductStockStatusEnum } from '@daffodil/product/driver/magento';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\nimport {\n MagentoBundledProductItemOption,\n MagentoBundledProductItemOptionProduct,\n} from '../models/bundled-product';\n\nexport function transformMagentoBundledProductItemOption(option: MagentoBundledProductItemOption): DaffCompositeProductItemOption {\n return {\n id: option.uid.toString(),\n type: DaffProductTypeEnum.Simple,\n url: null,\n name: option.label,\n price: getPrice(option.product),\n images: [],\n thumbnail: null,\n discount: getDiscount(option.product),\n quantity: option.quantity,\n is_default: option.is_default,\n in_stock: option.product.stock_status === MagentoProductStockStatusEnum.InStock,\n };\n}\n\n/**\n * A function for null checking an object.\n */\nfunction getPrice(product: MagentoBundledProductItemOptionProduct): number {\n return product.price_range?.maximum_price?.regular_price?.value || null;\n}\n\nfunction getDiscount(product: MagentoBundledProductItemOptionProduct): DaffProductDiscount {\n return product.price_range?.maximum_price?.discount\n ? {\n amount: product.price_range.maximum_price.discount.amount_off,\n percent: product.price_range.maximum_price.discount.percent_off,\n } : { amount: null, percent: null };\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n inject,\n} from '@angular/core';\n\nimport {\n MagentoProductTypeEnum,\n provideDaffProductMagentoExtraProductPreviewTransforms,\n DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS,\n DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS,\n} from '@daffodil/product/driver/magento';\n\nimport { magentoBundledProductFragment } from './fragments/bundled-product';\nimport {\n DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS,\n DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS,\n} from './injection-tokens/public_api';\nimport { MagentoBundledProduct } from './models/public_api';\nimport {\n MagentoBundledProductItemTransformer,\n MagentoBundledProductTransformer,\n} from './transforms/public_api';\n\n/**\n * A module that provides the product fragment for composite products along with a composite product transformer.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductMagentoDriverModule> {\n return {\n ngModule: DaffCompositeProductMagentoDriverModule,\n providers: [\n MagentoBundledProductTransformer,\n MagentoBundledProductItemTransformer,\n {\n provide: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS,\n useFactory: () => magentoBundledProductFragment(\n inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS),\n inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS),\n ),\n multi: true,\n },\n {\n provide: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS,\n useFactory: () => {\n const transformer = inject(MagentoBundledProductTransformer);\n return (daffProduct, magentoProduct) =>\n magentoProduct.__typename === MagentoProductTypeEnum.BundledProduct\n ? transformer.transform(daffProduct, magentoProduct)\n : daffProduct;\n },\n multi: true,\n },\n // stub out composite fields for a preview\n ...provideDaffProductMagentoExtraProductPreviewTransforms<MagentoBundledProduct>(\n (daffProduct, magentoProduct) =>\n magentoProduct.__typename === MagentoProductTypeEnum.BundledProduct\n ? {\n ...daffProduct,\n items: [],\n price: 0,\n discount: {\n amount: 0,\n percent: 0,\n },\n }\n : daffProduct,\n ),\n ],\n };\n }\n}\n","import {\n MagentoProduct,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport enum MagentoPriceTypeEnum {\n fixed = 'FIXED',\n percent = 'PERCENT',\n dynamic = 'DYNAMIC'\n}\n\nexport interface MagentoBundledProduct extends MagentoProduct {\n items: MagentoBundledProductItem[];\n}\n\nexport interface MagentoBundledProductItem {\n required: boolean;\n title: string;\n type: string;\n options: MagentoBundledProductItemOption[];\n option_id?: number;\n}\n\nexport interface MagentoBundledProductItemOption {\n uid: string;\n label: string;\n quantity: number;\n is_default: boolean;\n position: number;\n product: MagentoBundledProductItemOptionProduct;\n}\n\nexport interface MagentoBundledProductItemOptionProduct {\n stock_status?: MagentoProductStockStatusEnum;\n price_range: {\n maximum_price: {\n regular_price: {\n value: number;\n currency: any;\n };\n discount: {\n amount_off: number;\n percent_off: number;\n };\n };\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["provider","provideDaffProductMagentoProductTransform"],"mappings":";;;;;;;;;AAQO,MAAM,6BAA6B,GAAG,CAAC,kBAA0C,GAAA,EAAE,EAAE,oBAAA,GAA4C,EAAE,KAAK,GAAG,CAAA;;;IAG9I,2BAA2B,CAAC,GAAG,kBAAkB,CAAC;;;;;;;KAOjD,2BAA2B,CAAC,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBvD,EAAA,2BAA2B,CAAC,GAAG,kBAAkB,EAAE,GAAG,oBAAoB,CAAC;;;ACvChE,MAAA;AACX;;;;;;;;;;AAUG;AACH,KAAK,EAAE,mDAAmD;AAE1D;;;;;;;;;;;;;AAaG;AACH,QAAQ,EAAE,oDAAoD,GAC/D,GAAG,yBAAyB,CAAe,qDAAqD;;AC7BpF,MAAA;AACX;;;;;;;;;;AAUG;AACH,KAAK,EAAE,qDAAqD;AAE5D;;;;;;;;;;;;;AAaG;AACH,QAAQ,EAAE,sDAAsD,GACjE,GAAG,yBAAyB,CAAe,uDAAuD;;ACzB7F,MAAA;AACJ;;;;;AAKG;AACH,KAAK,EAAE,oDAAoD,YAC3DA,UAAQ,GACT,GAAG,yBAAyB,CAAyC,sDAAsD;AAE5H;;;;;;;;;;;;;AAaG;AACa,SAAA,qDAAqD,CAAiI,GAAG,UAA0D,EAAA;AACjQ,IAAA,OAAOA,UAAQ,CAA+C,GAAG,UAAU,CAAC;AAC9E;;AC3BM,MAAA;AACJ;;;;;AAKG;AACH,KAAK,EAAE,sDAAsD,EAC7D,QAAQ,GACT,GAAG,yBAAyB,CAA2C,wDAAwD;AAEhI;;;;;;;;;;;;;AAaG;AACa,SAAA,uDAAuD,CAAyJ,GAAG,UAA4D,EAAA;AAC7R,IAAA,OAAO,QAAQ,CAAiD,GAAG,UAAU,CAAC;AAChF;;AC1BO,MAAM;AACX;;AAEG;AACH,KAAK,EAAE,6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EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uCAAuC,YAHhD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,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,uCAAuC,YAHhD,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGH,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBALnD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;IC3BW;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAI/B,EAAA,CAAA,CAAA;;ACTD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"daffodil-product-composite-driver-magento.mjs","sources":["../../../libs/product-composite/driver/magento/src/fragments/bundled-product.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/fragments/item.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/fragments/option.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/item/extra.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/option/extra.token.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/item/token.ts","../../../libs/product-composite/driver/magento/src/transforms/product-transformer.service.ts","../../../libs/product-composite/driver/magento/src/injection-tokens/transforms/option/token.ts","../../../libs/product-composite/driver/magento/src/transforms/item-transformer.service.ts","../../../libs/product-composite/driver/magento/src/transforms/option.ts","../../../libs/product-composite/driver/magento/src/composite-product-driver.module.ts","../../../libs/product-composite/driver/magento/src/models/bundled-product.ts","../../../libs/product-composite/driver/magento/src/daffodil-product-composite-driver-magento.ts"],"sourcesContent":["import { gql } from 'apollo-angular';\nimport { DocumentNode } from 'graphql';\n\nimport {\n daffBuildFragmentDefinition,\n daffBuildFragmentNameSpread,\n} from '@daffodil/core/graphql';\n\nexport const magentoBundledProductFragment = (extraItemFragments: Array<DocumentNode> = [], extraOptionFragments: Array<DocumentNode> = []) => gql`\nfragment magentoBundledProduct on BundleProduct {\n\titems {\n\t\t${daffBuildFragmentNameSpread(...extraItemFragments)}\n\n\t\toption_id\n\t\trequired\n\t\ttitle\n\t\ttype\n\t\toptions {\n\t\t\t${daffBuildFragmentNameSpread(...extraOptionFragments)}\n\n\t\t\tuid\n\t\t\tis_default\n\t\t\tlabel\n\t\t\tquantity\n position\n\t\t\tproduct {\n\t\t\t\tstock_status\n\t\t\t\tprice_range {\n\t\t\t\t\tmaximum_price {\n\t\t\t\t\t\tregular_price {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdiscount {\n\t\t\t\t\t\t\tamount_off\n\t\t\t\t\t\t\tpercent_off\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n${daffBuildFragmentDefinition(...extraItemFragments, ...extraOptionFragments)}\n`;\n","import { DocumentNode } from 'graphql';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra GraphQL fragments that will be spread into product queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n *\n * This can increase query complexity above the Magento default of 300.\n * Daffodil only guarantees that stock queries don't exceed the limit of 300.\n * Apps using this token should therefore increase the query complexity limit\n * to accommodate the extra complexity contributed by the provided fragments.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS,\n\n /**\n * Provides extra GraphQL fragments for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraItemFragments(\n * myExtraProductFragment\n * )\n * ]\n * ```\n */\n provider: provideDaffProductCompositeMagentoExtraItemFragments,\n} = createMultiInjectionToken<DocumentNode>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS');\n","import { DocumentNode } from 'graphql';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra GraphQL fragments that will be spread into product queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n *\n * This can increase query complexity above the Magento default of 300.\n * Daffodil only guarantees that stock queries don't exceed the limit of 300.\n * Apps using this token should therefore increase the query complexity limit\n * to accommodate the extra complexity contributed by the provided fragments.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS,\n\n /**\n * Provides extra GraphQL fragments for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraOptionFragments(\n * myExtraProductFragment\n * )\n * ]\n * ```\n */\n provider: provideDaffProductCompositeMagentoExtraOptionFragments,\n} = createMultiInjectionToken<DocumentNode>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS');\n","import { Provider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport { DaffCompositeProductItem } from '@daffodil/product-composite';\n\nimport { MagentoBundleProductItemExtraTransform } from '../../../interfaces/item-extra-transform.type';\nimport { MagentoBundledProductItem } from '../../../models/public_api';\n\nconst {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product Magento driver.\n * It is run after the standard transforms for each product preview and passed both the current transformed Daffodil product and the Magento product.\n *\n * See {@link MagentoBundledProductItem} for more info.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS,\n provider,\n} = createMultiInjectionToken<MagentoBundleProductItemExtraTransform>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS');\n\n/**\n * Provides extra product preview transforms for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraItemTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\nexport function provideDaffProductCompositeMagentoExtraItemTransforms<T extends MagentoBundledProductItem = MagentoBundledProductItem, V extends DaffCompositeProductItem = DaffCompositeProductItem>(...transforms: MagentoBundleProductItemExtraTransform<T, V>[]): Provider[] {\n return provider<MagentoBundleProductItemExtraTransform<T, V>>(...transforms);\n}\n\nexport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS };\n","import { Provider } from '@angular/core';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\nimport { MagentoBundleProductOptionExtraTransform } from '../../../interfaces/option-extra-transform.type';\nimport { MagentoBundledProductItemOption } from '../../../models/public_api';\n\nconst {\n /**\n * A multi-provider injection token for providing extra transform logic in the Product Magento driver.\n * It is run after the standard transforms for each product preview and passed both the current transformed Daffodil product and the Magento product.\n *\n * See {@link MagentoBundledProductItemOption} for more info.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS,\n provider,\n} = createMultiInjectionToken<MagentoBundleProductOptionExtraTransform>('DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS');\n\n/**\n * Provides extra product preview transforms for the Magento product driver.\n *\n * See {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffProductCompositeMagentoExtraOptionTransforms(\n * myExtraProductTransform\n * )\n * ]\n * ```\n */\nexport function provideDaffProductCompositeMagentoExtraOptionTransforms<T extends MagentoBundledProductItemOption = MagentoBundledProductItemOption, V extends DaffCompositeProductItemOption = DaffCompositeProductItemOption>(...transforms: MagentoBundleProductOptionExtraTransform<T, V>[]): Provider[] {\n return provider<MagentoBundleProductOptionExtraTransform<T, V>>(...transforms);\n}\n\nexport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS };\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS } from './extra.token';\nimport { MagentoBundleProductItemTransform } from '../../../interfaces/public_api';\nimport { MagentoBundledProductItem } from '../../../models/public_api';\nimport { MagentoBundledProductItemTransformer } from '../../../transforms/public_api';\n\nexport const {\n /**\n * An internal token to combine the Magento preview transform with the injected transforms.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM}.\n */\n provider: provideDaffProductMagentoProductTransform,\n} = createSingleInjectionToken<MagentoBundleProductItemTransform>(\n 'DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_TRANSFORMS);\n const transformer = inject(MagentoBundledProductItemTransformer);\n return (magentoProduct: MagentoBundledProductItem) =>\n transforms.reduce(\n (daffProduct, transform) => transform(daffProduct, magentoProduct),\n transformer.transform(magentoProduct),\n );\n },\n },\n);\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\n\nimport {\n DaffProductTypeEnum,\n DaffProduct,\n} from '@daffodil/product';\nimport { DaffCompositeProduct } from '@daffodil/product-composite';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM } from '../injection-tokens/transforms/item/token';\nimport { MagentoBundleProductItemTransform } from '../interfaces/public_api';\nimport { MagentoBundledProduct } from '../models/bundled-product';\n\n@Injectable()\nexport class MagentoBundledProductTransformer {\n constructor(\n @Inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_ITEM_TRANSFORM) private itemTransform: MagentoBundleProductItemTransform,\n ) {}\n\n /**\n * Transforms the magento MagentoProduct from the magento product query into a DaffProduct.\n *\n * @param response the response from a magento product query.\n */\n transform(\n daffProduct: DaffProduct,\n { items }: MagentoBundledProduct,\n ): DaffCompositeProduct {\n return {\n ...daffProduct,\n ...items.length > 0 ? {\n price: 0,\n discount: {\n amount: 0,\n percent: 0,\n },\n } : {},\n type: DaffProductTypeEnum.Composite,\n items: items.map(this.itemTransform),\n };\n }\n}\n","import { inject } from '@angular/core';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS } from './extra.token';\nimport { MagentoBundleProductOptionTransform } from '../../../interfaces/public_api';\nimport { MagentoBundledProductItemOption } from '../../../models/public_api';\nimport { transformMagentoBundledProductItemOption } from '../../../transforms/public_api';\n\nexport const {\n /**\n * An internal token to combine the Magento preview transform with the injected transforms.\n */\n token: DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM,\n /**\n * Provider function for {@link DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM}.\n */\n provider: provideDaffProductMagentoProductTransform,\n} = createSingleInjectionToken<MagentoBundleProductOptionTransform>(\n 'DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM',\n {\n factory: () => {\n const transforms = inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_TRANSFORMS);\n return (magentoProduct: MagentoBundledProductItemOption) =>\n transforms.reduce(\n (daffProduct, transform) => transform(daffProduct, magentoProduct),\n transformMagentoBundledProductItemOption(magentoProduct),\n );\n },\n },\n);\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\n\nimport {\n DaffCompositeProductItem,\n DaffCompositeProductItemInputEnum,\n} from '@daffodil/product-composite';\n\nimport { DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM } from '../injection-tokens/transforms/option/token';\nimport { MagentoBundleProductOptionTransform } from '../interfaces/public_api';\nimport { MagentoBundledProductItem } from '../models/bundled-product';\n\n@Injectable()\nexport class MagentoBundledProductItemTransformer {\n constructor(\n @Inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_OPTION_TRANSFORM) private optionTransform: MagentoBundleProductOptionTransform,\n ) {}\n\n transform(item: MagentoBundledProductItem): DaffCompositeProductItem {\n return {\n id: item.option_id.toString(),\n required: item.required,\n title: item.title,\n input_type: <DaffCompositeProductItemInputEnum>item.type,\n options: Array.from(item.options).sort((a, b) => a.position - b.position).map(this.optionTransform),\n };\n }\n}\n","\nimport {\n DaffProductDiscount,\n DaffProductTypeEnum,\n} from '@daffodil/product';\nimport { MagentoProductStockStatusEnum } from '@daffodil/product/driver/magento';\nimport { DaffCompositeProductItemOption } from '@daffodil/product-composite';\n\nimport {\n MagentoBundledProductItemOption,\n MagentoBundledProductItemOptionProduct,\n} from '../models/bundled-product';\n\nexport function transformMagentoBundledProductItemOption(option: MagentoBundledProductItemOption): DaffCompositeProductItemOption {\n return {\n id: option.uid.toString(),\n type: DaffProductTypeEnum.Simple,\n url: null,\n name: option.label,\n price: getPrice(option.product),\n images: [],\n thumbnail: null,\n discount: getDiscount(option.product),\n quantity: option.quantity,\n is_default: option.is_default,\n in_stock: option.product.stock_status === MagentoProductStockStatusEnum.InStock,\n };\n}\n\n/**\n * A function for null checking an object.\n */\nfunction getPrice(product: MagentoBundledProductItemOptionProduct): number {\n return product.price_range?.maximum_price?.regular_price?.value || null;\n}\n\nfunction getDiscount(product: MagentoBundledProductItemOptionProduct): DaffProductDiscount {\n return product.price_range?.maximum_price?.discount\n ? {\n amount: product.price_range.maximum_price.discount.amount_off,\n percent: product.price_range.maximum_price.discount.percent_off,\n } : { amount: null, percent: null };\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n inject,\n} from '@angular/core';\n\nimport {\n MagentoProductTypeEnum,\n provideDaffProductMagentoExtraProductPreviewTransforms,\n DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS,\n DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS,\n} from '@daffodil/product/driver/magento';\n\nimport { magentoBundledProductFragment } from './fragments/bundled-product';\nimport {\n DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS,\n DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS,\n} from './injection-tokens/public_api';\nimport { MagentoBundledProduct } from './models/public_api';\nimport {\n MagentoBundledProductItemTransformer,\n MagentoBundledProductTransformer,\n} from './transforms/public_api';\n\n/**\n * A module that provides the product fragment for composite products along with a composite product transformer.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductMagentoDriverModule> {\n return {\n ngModule: DaffCompositeProductMagentoDriverModule,\n providers: [\n MagentoBundledProductTransformer,\n MagentoBundledProductItemTransformer,\n {\n provide: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS,\n useFactory: () => magentoBundledProductFragment(\n inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_ITEM_FRAGMENTS),\n inject(DAFF_PRODUCT_COMPOSITE_MAGENTO_EXTRA_OPTION_FRAGMENTS),\n ),\n multi: true,\n },\n {\n provide: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS,\n useFactory: () => {\n const transformer = inject(MagentoBundledProductTransformer);\n return (daffProduct, magentoProduct) =>\n magentoProduct.__typename === MagentoProductTypeEnum.BundledProduct\n ? transformer.transform(daffProduct, magentoProduct)\n : daffProduct;\n },\n multi: true,\n },\n // stub out composite fields for a preview\n ...provideDaffProductMagentoExtraProductPreviewTransforms<MagentoBundledProduct>(\n (daffProduct, magentoProduct) =>\n magentoProduct.__typename === MagentoProductTypeEnum.BundledProduct\n ? {\n ...daffProduct,\n items: [],\n price: 0,\n discount: {\n amount: 0,\n percent: 0,\n },\n }\n : daffProduct,\n ),\n ],\n };\n }\n}\n","import {\n MagentoProduct,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport enum MagentoPriceTypeEnum {\n fixed = 'FIXED',\n percent = 'PERCENT',\n dynamic = 'DYNAMIC'\n}\n\nexport interface MagentoBundledProduct extends MagentoProduct {\n items: MagentoBundledProductItem[];\n}\n\nexport interface MagentoBundledProductItem {\n required: boolean;\n title: string;\n type: string;\n options: MagentoBundledProductItemOption[];\n option_id?: number;\n}\n\nexport interface MagentoBundledProductItemOption {\n uid: string;\n label: string;\n quantity: number;\n is_default: boolean;\n position: number;\n product: MagentoBundledProductItemOptionProduct;\n}\n\nexport interface MagentoBundledProductItemOptionProduct {\n stock_status?: MagentoProductStockStatusEnum;\n price_range: {\n maximum_price: {\n regular_price: {\n value: number;\n currency: any;\n };\n discount: {\n amount_off: number;\n percent_off: number;\n };\n };\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["provider","provideDaffProductMagentoProductTransform"],"mappings":";;;;;;;;;AAQO,MAAM,6BAA6B,GAAG,CAAC,kBAAA,GAA0C,EAAE,EAAE,oBAAA,GAA4C,EAAE,KAAK,GAAG,CAAA;;;IAG9I,2BAA2B,CAAC,GAAG,kBAAkB,CAAC;;;;;;;KAOjD,2BAA2B,CAAC,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AuC,YAHhD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBALnD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;IC3BW;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;ACLhC;;AAEG;;;;"}
|
@@ -16,11 +16,11 @@ class DaffCompositeProductTestingDriverModule {
|
|
16
16
|
],
|
17
17
|
};
|
18
18
|
}
|
19
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
20
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
21
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
19
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
20
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductTestingDriverModule, imports: [CommonModule] }); }
|
21
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductTestingDriverModule, imports: [CommonModule] }); }
|
22
22
|
}
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompositeProductTestingDriverModule, decorators: [{
|
24
24
|
type: NgModule,
|
25
25
|
args: [{
|
26
26
|
imports: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-product-composite-driver-testing.mjs","sources":["../../../libs/product-composite/driver/testing/src/testing.module.ts","../../../libs/product-composite/driver/testing/src/daffodil-product-composite-driver-testing.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffProductExtraFactoryTypes } from '@daffodil/product/testing';\nimport { DaffCompositeProductFactory } from '@daffodil/product-composite/testing';\n\n/**\n * Module for providing the composite product factory to the product kind factory.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductTestingDriverModule> {\n return {\n ngModule: DaffCompositeProductTestingDriverModule,\n providers: [\n provideDaffProductExtraFactoryTypes(DaffCompositeProductFactory),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MAMU,uCAAuC,CAAA;AAClD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,uCAAuC;AACjD,YAAA,SAAS,EAAE;gBACT,mCAAmC,CAAC,2BAA2B,CAAC;AACjE,aAAA;SACF
|
1
|
+
{"version":3,"file":"daffodil-product-composite-driver-testing.mjs","sources":["../../../libs/product-composite/driver/testing/src/testing.module.ts","../../../libs/product-composite/driver/testing/src/daffodil-product-composite-driver-testing.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffProductExtraFactoryTypes } from '@daffodil/product/testing';\nimport { DaffCompositeProductFactory } from '@daffodil/product-composite/testing';\n\n/**\n * Module for providing the composite product factory to the product kind factory.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCompositeProductTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffCompositeProductTestingDriverModule> {\n return {\n ngModule: DaffCompositeProductTestingDriverModule,\n providers: [\n provideDaffProductExtraFactoryTypes(DaffCompositeProductFactory),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MAMU,uCAAuC,CAAA;AAClD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,uCAAuC;AACjD,YAAA,SAAS,EAAE;gBACT,mCAAmC,CAAC,2BAA2B,CAAC;AACjE,aAAA;SACF;IACH;iIARW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvC,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,uCAAuC,YAHhD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,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,uCAAuC,YAHhD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBALnD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|