@daffodil/product 0.56.1 → 0.57.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/magento/models/magento-product.d.ts +0 -4
- package/driver/magento/models/product-preview.interface.d.ts +1 -1
- package/driver/magento/queries/fragments/product-page.d.ts +1 -0
- package/driver/magento/queries/fragments/public_api.d.ts +5 -0
- package/driver/magento/queries/public_api.d.ts +1 -4
- package/driver/magento/testing/factories/core/product-preview.factory.d.ts +1 -1
- package/driver/magento/testing/factories/core/product.factory.d.ts +2 -32
- package/esm2020/driver/magento/models/magento-product.mjs +1 -1
- package/esm2020/driver/magento/models/product-preview.interface.mjs +1 -1
- package/esm2020/driver/magento/queries/fragments/product-page.mjs +20 -0
- package/esm2020/driver/magento/queries/fragments/product-preview.mjs +2 -2
- package/esm2020/driver/magento/queries/fragments/product.mjs +1 -15
- package/esm2020/driver/magento/queries/fragments/public_api.mjs +6 -0
- package/esm2020/driver/magento/queries/get-all-products.mjs +4 -4
- package/esm2020/driver/magento/queries/get-product-by-url.mjs +4 -4
- package/esm2020/driver/magento/queries/get-product.mjs +4 -4
- package/esm2020/driver/magento/queries/public_api.mjs +2 -5
- package/esm2020/driver/magento/testing/factories/core/product-preview.factory.mjs +2 -2
- package/esm2020/driver/magento/testing/factories/core/product.factory.mjs +4 -33
- package/esm2020/driver/magento/transforms/product-preview.mjs +2 -2
- package/esm2020/driver/magento/transforms/simple-product-transformers.mjs +3 -3
- package/esm2020/models/product.mjs +1 -1
- package/fesm2015/daffodil-product-driver-magento-testing.mjs +29 -59
- package/fesm2015/daffodil-product-driver-magento-testing.mjs.map +1 -1
- package/fesm2015/daffodil-product-driver-magento.mjs +45 -40
- package/fesm2015/daffodil-product-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-product.mjs.map +1 -1
- package/fesm2020/daffodil-product-driver-magento-testing.mjs +29 -59
- package/fesm2020/daffodil-product-driver-magento-testing.mjs.map +1 -1
- package/fesm2020/daffodil-product-driver-magento.mjs +45 -41
- package/fesm2020/daffodil-product-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-product.mjs.map +1 -1
- package/models/product.d.ts +1 -1
- package/package.json +3 -3
|
@@ -4,16 +4,13 @@ import { DaffModelFactory } from '@daffodil/core/testing';
|
|
|
4
4
|
import { MagentoProductTypeEnum, MagentoProductStockStatusEnum, MagentoProductFilterType } from '@daffodil/product/driver/magento';
|
|
5
5
|
import { faker } from '@faker-js/faker/locale/en_US';
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class MockMagentoProductPreview {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.__typename = MagentoProductTypeEnum.SimpleProduct;
|
|
10
10
|
this.uid = faker.datatype.uuid();
|
|
11
11
|
this.url_key = faker.random.alphaNumeric(16);
|
|
12
12
|
this.url_suffix = '.html';
|
|
13
|
-
this.canonical_url = faker.internet.url();
|
|
14
13
|
this.name = faker.random.word();
|
|
15
|
-
this.meta_title = faker.random.word();
|
|
16
|
-
this.meta_description = faker.random.words(3);
|
|
17
14
|
this.sku = faker.random.alphaNumeric(16);
|
|
18
15
|
this.stock_status = MagentoProductStockStatusEnum.InStock;
|
|
19
16
|
this.image = {
|
|
@@ -21,11 +18,6 @@ class MockMagentoCoreProduct {
|
|
|
21
18
|
label: faker.random.words(3),
|
|
22
19
|
url: faker.image.imageUrl(),
|
|
23
20
|
};
|
|
24
|
-
this.thumbnail = {
|
|
25
|
-
__typename: 'ProductImage',
|
|
26
|
-
label: faker.random.words(3),
|
|
27
|
-
url: faker.image.imageUrl(),
|
|
28
|
-
};
|
|
29
21
|
this.description = {
|
|
30
22
|
__typename: 'ComplexTextValue',
|
|
31
23
|
html: faker.random.words(5),
|
|
@@ -46,6 +38,34 @@ class MockMagentoCoreProduct {
|
|
|
46
38
|
},
|
|
47
39
|
},
|
|
48
40
|
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class MagentoProductPreviewFactory extends DaffModelFactory {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(MockMagentoProductPreview);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** @nocollapse */ MagentoProductPreviewFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
/** @nocollapse */ MagentoProductPreviewFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{
|
|
53
|
+
providedIn: 'root',
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: function () { return []; } });
|
|
56
|
+
|
|
57
|
+
class MockMagentoCoreProduct extends MockMagentoProductPreview {
|
|
58
|
+
constructor() {
|
|
59
|
+
super(...arguments);
|
|
60
|
+
this.__typename = MagentoProductTypeEnum.SimpleProduct;
|
|
61
|
+
this.canonical_url = faker.internet.url();
|
|
62
|
+
this.meta_title = faker.random.word();
|
|
63
|
+
this.meta_description = faker.random.words(3);
|
|
64
|
+
this.stock_status = MagentoProductStockStatusEnum.InStock;
|
|
65
|
+
this.description = {
|
|
66
|
+
__typename: 'ComplexTextValue',
|
|
67
|
+
html: faker.random.words(5),
|
|
68
|
+
};
|
|
49
69
|
this.short_description = {
|
|
50
70
|
__typename: 'ComplexTextValue',
|
|
51
71
|
html: faker.random.words(3),
|
|
@@ -93,56 +113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
93
113
|
}]
|
|
94
114
|
}], ctorParameters: function () { return []; } });
|
|
95
115
|
|
|
96
|
-
class MockMagentoProductPreview {
|
|
97
|
-
constructor() {
|
|
98
|
-
this.__typename = MagentoProductTypeEnum.SimpleProduct;
|
|
99
|
-
this.uid = faker.datatype.uuid();
|
|
100
|
-
this.url_key = faker.random.alphaNumeric(16);
|
|
101
|
-
this.url_suffix = '.html';
|
|
102
|
-
this.name = faker.random.word();
|
|
103
|
-
this.sku = faker.random.alphaNumeric(16);
|
|
104
|
-
this.stock_status = MagentoProductStockStatusEnum.InStock;
|
|
105
|
-
this.thumbnail = {
|
|
106
|
-
__typename: 'ProductImage',
|
|
107
|
-
label: faker.random.words(3),
|
|
108
|
-
url: faker.image.imageUrl(),
|
|
109
|
-
};
|
|
110
|
-
this.description = {
|
|
111
|
-
__typename: 'ComplexTextValue',
|
|
112
|
-
html: faker.random.words(5),
|
|
113
|
-
};
|
|
114
|
-
this.price_range = {
|
|
115
|
-
__typename: 'PriceRange',
|
|
116
|
-
maximum_price: {
|
|
117
|
-
__typename: 'ProductPrice',
|
|
118
|
-
regular_price: {
|
|
119
|
-
__typename: 'Money',
|
|
120
|
-
value: faker.datatype.number({ min: 100, max: 1000 }),
|
|
121
|
-
currency: null,
|
|
122
|
-
},
|
|
123
|
-
discount: {
|
|
124
|
-
__typename: 'ProductDiscount',
|
|
125
|
-
amount_off: faker.datatype.number({ min: 1, max: 99 }),
|
|
126
|
-
percent_off: faker.datatype.number({ min: 1, max: 99 }),
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
class MagentoProductPreviewFactory extends DaffModelFactory {
|
|
133
|
-
constructor() {
|
|
134
|
-
super(MockMagentoProductPreview);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/** @nocollapse */ MagentoProductPreviewFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
138
|
-
/** @nocollapse */ MagentoProductPreviewFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' });
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
|
|
140
|
-
type: Injectable,
|
|
141
|
-
args: [{
|
|
142
|
-
providedIn: 'root',
|
|
143
|
-
}]
|
|
144
|
-
}], ctorParameters: function () { return []; } });
|
|
145
|
-
|
|
146
116
|
class MockMagentoAggregationSelect {
|
|
147
117
|
constructor() {
|
|
148
118
|
this.__typename = 'Aggregation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-product-driver-magento-testing.mjs","sources":["../../../libs/product/driver/magento/testing/src/factories/core/product.factory.ts","../../../libs/product/driver/magento/testing/src/factories/simple/simple.factory.ts","../../../libs/product/driver/magento/testing/src/factories/core/product-preview.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/select.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/price.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/aggregation.factory.ts","../../../libs/product/driver/magento/testing/src/factories/filter-type-field.factory.ts","../../../libs/product/driver/magento/testing/src/factories/sort-fields.factory.ts","../../../libs/product/driver/magento/testing/src/daffodil-product-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 {\n MagentoProduct,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport class MockMagentoCoreProduct implements MagentoProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n uid = faker.datatype.uuid();\n url_key = faker.random.alphaNumeric(16);\n url_suffix = '.html';\n canonical_url = faker.internet.url();\n name = faker.random.word();\n meta_title = faker.random.word();\n meta_description = faker.random.words(3);\n sku = faker.random.alphaNumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.random.words(3),\n url: faker.image.imageUrl(),\n };\n thumbnail = {\n __typename: 'ProductImage',\n label: faker.random.words(3),\n url: faker.image.imageUrl(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.datatype.number({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.datatype.number({ min: 1, max: 99 }),\n percent_off: faker.datatype.number({ min: 1, max: 99 }),\n },\n },\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(3),\n };\n media_gallery_entries = [];\n}\n\n/**\n * A factory for creating stub data for {@link MagentoProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCoreProductFactory extends DaffModelFactory<MagentoProduct> {\n\n constructor(){\n super(MockMagentoCoreProduct);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductTypeEnum,\n MagentoSimpleProduct,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoCoreProduct } from '../core/product.factory';\n\nexport class MockMagentoSimpleProduct extends MockMagentoCoreProduct implements MagentoSimpleProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n}\n\n/**\n * A factory for creating stub data for {@link MagentoSimpleProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoSimpleProductFactory extends DaffModelFactory<MagentoSimpleProduct> {\n\n constructor(){\n super(MockMagentoSimpleProduct);\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 MagentoProductPreview,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport class MockMagentoProductPreview implements MagentoProductPreview {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n uid = faker.datatype.uuid();\n url_key = faker.random.alphaNumeric(16);\n url_suffix = '.html';\n name = faker.random.word();\n sku = faker.random.alphaNumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n thumbnail = {\n __typename: 'ProductImage',\n label: faker.random.words(3),\n url: faker.image.imageUrl(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.datatype.number({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.datatype.number({ min: 1, max: 99 }),\n percent_off: faker.datatype.number({ min: 1, max: 99 }),\n },\n },\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductPreviewFactory extends DaffModelFactory<MagentoProductPreview> {\n\n constructor(){\n super(MockMagentoProductPreview);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationSelect implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'select';\n type = MagentoProductFilterType.Equal;\n count = faker.datatype.number();\n label = faker.random.word();\n options = [\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationSelectFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationSelect);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationPrice implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'price';\n type = MagentoProductFilterType.Range;\n count = faker.datatype.number();\n label = 'Price';\n options = [\n\t {\n\t value: '0-10',\n\t count: faker.datatype.number(),\n\t label: '0-10',\n\t },\n\t {\n\t value: '10-20',\n\t count: faker.datatype.number(),\n\t label: '10-20',\n\t },\n\t {\n\t value: '20-30',\n\t count: faker.datatype.number(),\n\t label: '20-30',\n\t },\n\t {\n\t value: '30-40',\n\t count: faker.datatype.number(),\n\t label: '30-40',\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationPriceFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationPrice);\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 { MagentoAggregation } from '@daffodil/product/driver/magento';\n\nimport { MagentoProductAggregationPriceFactory } from './type/price.factory';\nimport { MagentoProductAggregationSelectFactory } from './type/select.factory';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(private selectFactory: MagentoProductAggregationSelectFactory, private priceFactory: MagentoProductAggregationPriceFactory){\n super(faker.datatype.number({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);\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 MagentoProductFilterTypeField,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nconst TYPES = [\n MagentoProductFilterType.Equal,\n MagentoProductFilterType.Range,\n MagentoProductFilterType.Match,\n];\n\nclass MockMagentoProductFilterTypeField implements MagentoProductFilterTypeField {\n name = faker.random.word();\n type = {\n name: TYPES[faker.datatype.number({ min: 0, max: TYPES.length - 1 })],\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductFilterTypeFieldFactory extends DaffModelFactory<MagentoProductFilterTypeField> {\n constructor(){\n super(MockMagentoProductFilterTypeField);\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 { MagentoProductSortFields } from '@daffodil/product/driver/magento';\n\nclass MockMagentoProductSortFields implements MagentoProductSortFields {\n __typename: 'SortFields' = 'SortFields';\n default = 'position';\n options = [\n {\n label: 'string',\n value: 'position',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductSortFieldsFactory extends DaffModelFactory<MagentoProductSortFields> {\n constructor(){\n super(MockMagentoProductSortFields);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoProductAggregationSelectFactory","i2.MagentoProductAggregationPriceFactory"],"mappings":";;;;;;MAUa,sBAAsB,CAAA;AAAnC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,UAAU,GAAG,sBAAsB,CAAC,aAAa,CAAC;QAClD,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AACxC,QAAA,IAAU,CAAA,UAAA,GAAG,OAAO,CAAC;QACrB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QACrC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC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/factories/core/product-preview.factory.ts","../../../libs/product/driver/magento/testing/src/factories/core/product.factory.ts","../../../libs/product/driver/magento/testing/src/factories/simple/simple.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/select.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/price.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/aggregation.factory.ts","../../../libs/product/driver/magento/testing/src/factories/filter-type-field.factory.ts","../../../libs/product/driver/magento/testing/src/factories/sort-fields.factory.ts","../../../libs/product/driver/magento/testing/src/daffodil-product-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 {\n MagentoProductPreview,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nexport class MockMagentoProductPreview implements MagentoProductPreview {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n uid = faker.datatype.uuid();\n url_key = faker.random.alphaNumeric(16);\n url_suffix = '.html';\n name = faker.random.word();\n sku = faker.random.alphaNumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.random.words(3),\n url: faker.image.imageUrl(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.datatype.number({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.datatype.number({ min: 1, max: 99 }),\n percent_off: faker.datatype.number({ min: 1, max: 99 }),\n },\n },\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductPreviewFactory extends DaffModelFactory<MagentoProductPreview> {\n\n constructor(){\n super(MockMagentoProductPreview);\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 MagentoProduct,\n MagentoProductTypeEnum,\n MagentoProductStockStatusEnum,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoProductPreview } from './product-preview.factory';\n\nexport class MockMagentoCoreProduct extends MockMagentoProductPreview implements MagentoProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n canonical_url = faker.internet.url();\n meta_title = faker.random.word();\n meta_description = faker.random.words(3);\n stock_status = MagentoProductStockStatusEnum.InStock;\n description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(5),\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.random.words(3),\n };\n media_gallery_entries = [];\n}\n\n/**\n * A factory for creating stub data for {@link MagentoProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCoreProductFactory extends DaffModelFactory<MagentoProduct> {\n\n constructor(){\n super(MockMagentoCoreProduct);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoProductTypeEnum,\n MagentoSimpleProduct,\n} from '@daffodil/product/driver/magento';\n\nimport { MockMagentoCoreProduct } from '../core/product.factory';\n\nexport class MockMagentoSimpleProduct extends MockMagentoCoreProduct implements MagentoSimpleProduct {\n __typename = MagentoProductTypeEnum.SimpleProduct;\n}\n\n/**\n * A factory for creating stub data for {@link MagentoSimpleProduct}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoSimpleProductFactory extends DaffModelFactory<MagentoSimpleProduct> {\n\n constructor(){\n super(MockMagentoSimpleProduct);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationSelect implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'select';\n type = MagentoProductFilterType.Equal;\n count = faker.datatype.number();\n label = faker.random.word();\n options = [\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n\t {\n\t count: faker.datatype.number(),\n\t label: faker.random.word(),\n\t value: faker.datatype.uuid(),\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationSelectFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationSelect);\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 MagentoAggregation,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nclass MockMagentoAggregationPrice implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'price';\n type = MagentoProductFilterType.Range;\n count = faker.datatype.number();\n label = 'Price';\n options = [\n\t {\n\t value: '0-10',\n\t count: faker.datatype.number(),\n\t label: '0-10',\n\t },\n\t {\n\t value: '10-20',\n\t count: faker.datatype.number(),\n\t label: '10-20',\n\t },\n\t {\n\t value: '20-30',\n\t count: faker.datatype.number(),\n\t label: '20-30',\n\t },\n\t {\n\t value: '30-40',\n\t count: faker.datatype.number(),\n\t label: '30-40',\n\t },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationPriceFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(){\n super(MockMagentoAggregationPrice);\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 { MagentoAggregation } from '@daffodil/product/driver/magento';\n\nimport { MagentoProductAggregationPriceFactory } from './type/price.factory';\nimport { MagentoProductAggregationSelectFactory } from './type/select.factory';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductAggregationFactory extends DaffModelFactory<MagentoAggregation> {\n constructor(private selectFactory: MagentoProductAggregationSelectFactory, private priceFactory: MagentoProductAggregationPriceFactory){\n super(faker.datatype.number({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);\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 MagentoProductFilterTypeField,\n MagentoProductFilterType,\n} from '@daffodil/product/driver/magento';\n\nconst TYPES = [\n MagentoProductFilterType.Equal,\n MagentoProductFilterType.Range,\n MagentoProductFilterType.Match,\n];\n\nclass MockMagentoProductFilterTypeField implements MagentoProductFilterTypeField {\n name = faker.random.word();\n type = {\n name: TYPES[faker.datatype.number({ min: 0, max: TYPES.length - 1 })],\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductFilterTypeFieldFactory extends DaffModelFactory<MagentoProductFilterTypeField> {\n constructor(){\n super(MockMagentoProductFilterTypeField);\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 { MagentoProductSortFields } from '@daffodil/product/driver/magento';\n\nclass MockMagentoProductSortFields implements MagentoProductSortFields {\n __typename: 'SortFields' = 'SortFields';\n default = 'position';\n options = [\n {\n label: 'string',\n value: 'position',\n },\n ];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoProductSortFieldsFactory extends DaffModelFactory<MagentoProductSortFields> {\n constructor(){\n super(MockMagentoProductSortFields);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MagentoProductAggregationSelectFactory","i2.MagentoProductAggregationPriceFactory"],"mappings":";;;;;;MAUa,yBAAyB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,UAAU,GAAG,sBAAsB,CAAC,aAAa,CAAC;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A;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -148,7 +148,7 @@ function transformMagentoSimpleProductPreview(product, mediaUrl) {
|
|
|
148
148
|
id: product.sku,
|
|
149
149
|
url: `/${product.url_key}${product.url_suffix}`,
|
|
150
150
|
name: product.name,
|
|
151
|
-
thumbnail: transformThumbnail(product.
|
|
151
|
+
thumbnail: transformThumbnail(product.image),
|
|
152
152
|
price: getPrice(product),
|
|
153
153
|
discount: getDiscount(product),
|
|
154
154
|
images: transformMediaGalleryEntries(product, mediaUrl),
|
|
@@ -234,7 +234,8 @@ class DaffMagentoSimpleProductTransformers {
|
|
|
234
234
|
this.productPreviewTransform = productPreviewTransform;
|
|
235
235
|
}
|
|
236
236
|
transformMagentoSimpleProduct(product, mediaUrl) {
|
|
237
|
-
|
|
237
|
+
var _a, _b;
|
|
238
|
+
return Object.assign(Object.assign({}, this.productPreviewTransform(product, mediaUrl)), { description: (_a = product.description) === null || _a === void 0 ? void 0 : _a.html, short_description: (_b = product.short_description) === null || _b === void 0 ? void 0 : _b.html, meta_title: product.meta_title, meta_description: product.meta_description, canonicalUrl: product.canonical_url });
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
241
|
/** @nocollapse */ DaffMagentoSimpleProductTransformers.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoSimpleProductTransformers, deps: [{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -591,7 +592,7 @@ const magentoProductPreviewFragment = gql `
|
|
|
591
592
|
}
|
|
592
593
|
}
|
|
593
594
|
}
|
|
594
|
-
|
|
595
|
+
image {
|
|
595
596
|
url
|
|
596
597
|
label
|
|
597
598
|
}
|
|
@@ -607,10 +608,17 @@ const magentoProductFragment = gql `
|
|
|
607
608
|
meta_description
|
|
608
609
|
canonical_url
|
|
609
610
|
stock_status
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
label
|
|
611
|
+
short_description {
|
|
612
|
+
html
|
|
613
613
|
}
|
|
614
|
+
}
|
|
615
|
+
${magentoProductPreviewFragment}
|
|
616
|
+
`;
|
|
617
|
+
|
|
618
|
+
const magentoProductPageFragment = gql `
|
|
619
|
+
fragment magentoProductPage on ProductInterface {
|
|
620
|
+
...product
|
|
621
|
+
__typename
|
|
614
622
|
media_gallery_entries {
|
|
615
623
|
label
|
|
616
624
|
file
|
|
@@ -618,14 +626,34 @@ const magentoProductFragment = gql `
|
|
|
618
626
|
disabled
|
|
619
627
|
uid
|
|
620
628
|
}
|
|
621
|
-
short_description {
|
|
622
|
-
html
|
|
623
|
-
}
|
|
624
629
|
description {
|
|
625
630
|
html
|
|
626
631
|
}
|
|
627
632
|
}
|
|
628
|
-
${
|
|
633
|
+
${magentoProductFragment}
|
|
634
|
+
`;
|
|
635
|
+
|
|
636
|
+
const magentoProductAggregationsFragment = gql `
|
|
637
|
+
fragment magentoProductAggregations on Aggregation {
|
|
638
|
+
label
|
|
639
|
+
count
|
|
640
|
+
attribute_code
|
|
641
|
+
options {
|
|
642
|
+
count
|
|
643
|
+
label
|
|
644
|
+
value
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
`;
|
|
648
|
+
|
|
649
|
+
const magentoProductSortFieldsFragment = gql `
|
|
650
|
+
fragment magentoProductSortFields on SortFields {
|
|
651
|
+
default
|
|
652
|
+
options {
|
|
653
|
+
label
|
|
654
|
+
value
|
|
655
|
+
}
|
|
656
|
+
}
|
|
629
657
|
`;
|
|
630
658
|
|
|
631
659
|
const DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME = 'MagentoGetAllProducts';
|
|
@@ -634,7 +662,7 @@ const getAllProducts = (extraProductFragments = []) => gql `
|
|
|
634
662
|
products(pageSize: $pageSize) {
|
|
635
663
|
total_count
|
|
636
664
|
items {
|
|
637
|
-
...
|
|
665
|
+
...magentoProductPage
|
|
638
666
|
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
639
667
|
}
|
|
640
668
|
page_info {
|
|
@@ -643,7 +671,7 @@ const getAllProducts = (extraProductFragments = []) => gql `
|
|
|
643
671
|
}
|
|
644
672
|
}
|
|
645
673
|
}
|
|
646
|
-
${
|
|
674
|
+
${magentoProductPageFragment}
|
|
647
675
|
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
648
676
|
`;
|
|
649
677
|
|
|
@@ -656,12 +684,12 @@ const getProduct = (extraProductFragments = []) => gql `
|
|
|
656
684
|
}
|
|
657
685
|
}){
|
|
658
686
|
items {
|
|
659
|
-
...
|
|
687
|
+
...magentoProductPage
|
|
660
688
|
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
661
689
|
}
|
|
662
690
|
}
|
|
663
691
|
}
|
|
664
|
-
${
|
|
692
|
+
${magentoProductPageFragment}
|
|
665
693
|
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
666
694
|
`;
|
|
667
695
|
|
|
@@ -674,12 +702,12 @@ const getProductByUrl = (extraProductFragments = []) => gql `
|
|
|
674
702
|
}
|
|
675
703
|
}){
|
|
676
704
|
items {
|
|
677
|
-
...
|
|
705
|
+
...magentoProductPage
|
|
678
706
|
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
679
707
|
}
|
|
680
708
|
}
|
|
681
709
|
}
|
|
682
|
-
${
|
|
710
|
+
${magentoProductPageFragment}
|
|
683
711
|
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
684
712
|
`;
|
|
685
713
|
|
|
@@ -827,32 +855,9 @@ query ${DAFF_MAGENTO_GET_FILTER_TYPES_QUERY_NAME} {
|
|
|
827
855
|
}
|
|
828
856
|
`;
|
|
829
857
|
|
|
830
|
-
const magentoProductAggregationsFragment = gql `
|
|
831
|
-
fragment magentoProductAggregations on Aggregation {
|
|
832
|
-
label
|
|
833
|
-
count
|
|
834
|
-
attribute_code
|
|
835
|
-
options {
|
|
836
|
-
count
|
|
837
|
-
label
|
|
838
|
-
value
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
`;
|
|
842
|
-
|
|
843
|
-
const magentoProductSortFieldsFragment = gql `
|
|
844
|
-
fragment magentoProductSortFields on SortFields {
|
|
845
|
-
default
|
|
846
|
-
options {
|
|
847
|
-
label
|
|
848
|
-
value
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
`;
|
|
852
|
-
|
|
853
858
|
/**
|
|
854
859
|
* Generated bundle index. Do not edit.
|
|
855
860
|
*/
|
|
856
861
|
|
|
857
|
-
export { DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_BY_URL_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_QUERY_NAME, DAFF_MAGENTO_GET_FILTER_TYPES_QUERY_NAME, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS, DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM, DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM, DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM, DaffMagentoProductResponseTransformers, DaffMagentoProductService, DaffMagentoProductsTransformer, DaffMagentoSimpleProductTransformers, DaffProductMagentoDriverModule, MAGENTO_PRODUCT_CONFIG_DEFAULT, MAGENTO_PRODUCT_CONFIG_TOKEN, MagentoProductAppliedFiltersTransformService, MagentoProductFilterActionEnum, MagentoProductFilterType, MagentoProductGetFilterTypes, MagentoProductStockStatusEnum, MagentoProductTypeEnum, MagentoSortDirectionEnum, daffProvideProductMagentoExtraProductFragments, daffProvideProductMagentoExtraProductPageFragments, daffProvideProductMagentoExtraProductPreviewFragments, daffProvideProductMagentoExtraProductPreviewTransforms, daffProvideProductMagentoExtraProductResponseTransforms, daffProvideProductMagentoExtraProductTransforms, getAllProducts, getProduct, getProductByUrl, magentoAppliedSortOptionTransform, magentoProductAddMetadataTypesToAggregates, magentoProductAggregationsFragment, magentoProductCollectionMetadataTransform, magentoProductFragment, magentoProductGetMatchedAttributeType, magentoProductPreviewFragment, magentoProductSortFieldsFragment, magentoProductTransformAggregate, magentoProductTruncateUrl };
|
|
862
|
+
export { DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_BY_URL_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_QUERY_NAME, DAFF_MAGENTO_GET_FILTER_TYPES_QUERY_NAME, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS, DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS, DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM, DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM, DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM, DaffMagentoProductResponseTransformers, DaffMagentoProductService, DaffMagentoProductsTransformer, DaffMagentoSimpleProductTransformers, DaffProductMagentoDriverModule, MAGENTO_PRODUCT_CONFIG_DEFAULT, MAGENTO_PRODUCT_CONFIG_TOKEN, MagentoProductAppliedFiltersTransformService, MagentoProductFilterActionEnum, MagentoProductFilterType, MagentoProductGetFilterTypes, MagentoProductStockStatusEnum, MagentoProductTypeEnum, MagentoSortDirectionEnum, daffProvideProductMagentoExtraProductFragments, daffProvideProductMagentoExtraProductPageFragments, daffProvideProductMagentoExtraProductPreviewFragments, daffProvideProductMagentoExtraProductPreviewTransforms, daffProvideProductMagentoExtraProductResponseTransforms, daffProvideProductMagentoExtraProductTransforms, getAllProducts, getProduct, getProductByUrl, magentoAppliedSortOptionTransform, magentoProductAddMetadataTypesToAggregates, magentoProductAggregationsFragment, magentoProductCollectionMetadataTransform, magentoProductFragment, magentoProductGetMatchedAttributeType, magentoProductPageFragment, magentoProductPreviewFragment, magentoProductSortFieldsFragment, magentoProductTransformAggregate, magentoProductTruncateUrl };
|
|
858
863
|
//# sourceMappingURL=daffodil-product-driver-magento.mjs.map
|