@daffodil/product 0.94.1 → 0.95.1

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.
Files changed (46) hide show
  1. package/fesm2022/daffodil-product-driver-in-memory.mjs +200 -227
  2. package/fesm2022/daffodil-product-driver-in-memory.mjs.map +1 -1
  3. package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs +444 -0
  4. package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs.map +1 -0
  5. package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs +704 -0
  6. package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs.map +1 -0
  7. package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs +7 -0
  8. package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs.map +1 -0
  9. package/fesm2022/daffodil-product-driver-magento-auto.mjs +7 -0
  10. package/fesm2022/daffodil-product-driver-magento-auto.mjs.map +1 -0
  11. package/fesm2022/daffodil-product-driver-shopify.mjs +99 -127
  12. package/fesm2022/daffodil-product-driver-shopify.mjs.map +1 -1
  13. package/fesm2022/daffodil-product-driver-testing.mjs +117 -87
  14. package/fesm2022/daffodil-product-driver-testing.mjs.map +1 -1
  15. package/fesm2022/daffodil-product-driver.mjs +22 -45
  16. package/fesm2022/daffodil-product-driver.mjs.map +1 -1
  17. package/fesm2022/daffodil-product-routing.mjs +347 -285
  18. package/fesm2022/daffodil-product-routing.mjs.map +1 -1
  19. package/fesm2022/daffodil-product-state-testing.mjs +189 -106
  20. package/fesm2022/daffodil-product-state-testing.mjs.map +1 -1
  21. package/fesm2022/daffodil-product-state.mjs +566 -659
  22. package/fesm2022/daffodil-product-state.mjs.map +1 -1
  23. package/fesm2022/daffodil-product-testing.mjs +316 -276
  24. package/fesm2022/daffodil-product-testing.mjs.map +1 -1
  25. package/fesm2022/daffodil-product.mjs +8 -29
  26. package/fesm2022/daffodil-product.mjs.map +1 -1
  27. package/package.json +1 -1
  28. package/types/daffodil-product-driver-in-memory.d.ts +65 -75
  29. package/types/daffodil-product-driver-magento-2.4.7-testing.d.ts +105 -0
  30. package/types/daffodil-product-driver-magento-2.4.7.d.ts +337 -0
  31. package/types/daffodil-product-driver-magento-auto-testing.d.ts +1 -0
  32. package/types/daffodil-product-driver-magento-auto.d.ts +1 -0
  33. package/types/daffodil-product-driver-shopify.d.ts +31 -43
  34. package/types/daffodil-product-driver-testing.d.ts +28 -26
  35. package/types/daffodil-product-driver.d.ts +50 -61
  36. package/types/daffodil-product-routing.d.ts +101 -110
  37. package/types/daffodil-product-state-testing.d.ts +45 -43
  38. package/types/daffodil-product-state.d.ts +347 -375
  39. package/types/daffodil-product-testing.d.ts +82 -89
  40. package/types/daffodil-product.d.ts +93 -102
  41. package/fesm2022/daffodil-product-driver-magento-testing.mjs +0 -275
  42. package/fesm2022/daffodil-product-driver-magento-testing.mjs.map +0 -1
  43. package/fesm2022/daffodil-product-driver-magento.mjs +0 -855
  44. package/fesm2022/daffodil-product-driver-magento.mjs.map +0 -1
  45. package/types/daffodil-product-driver-magento-testing.d.ts +0 -114
  46. package/types/daffodil-product-driver-magento.d.ts +0 -396
@@ -1,275 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
3
- import { DaffModelFactory } from '@daffodil/core/testing';
4
- import { MagentoProductTypeEnum, MagentoProductStockStatusEnum, MagentoProductFilterType } from '@daffodil/product/driver/magento';
5
- import { faker } from '@faker-js/faker/locale/en_US';
6
-
7
- class MockMagentoProductPreview {
8
- constructor() {
9
- this.__typename = MagentoProductTypeEnum.SimpleProduct;
10
- this.uid = faker.string.uuid();
11
- this.url_key = faker.string.alphanumeric(16);
12
- this.url_suffix = '.html';
13
- this.name = faker.lorem.word();
14
- this.sku = faker.string.alphanumeric(16);
15
- this.stock_status = MagentoProductStockStatusEnum.InStock;
16
- this.image = {
17
- __typename: 'ProductImage',
18
- label: faker.lorem.words(3),
19
- url: faker.image.url(),
20
- };
21
- this.description = {
22
- __typename: 'ComplexTextValue',
23
- html: faker.lorem.words(5),
24
- };
25
- this.price_range = {
26
- __typename: 'PriceRange',
27
- maximum_price: {
28
- __typename: 'ProductPrice',
29
- regular_price: {
30
- __typename: 'Money',
31
- value: faker.number.int({ min: 100, max: 1000 }),
32
- currency: null,
33
- },
34
- discount: {
35
- __typename: 'ProductDiscount',
36
- amount_off: faker.number.int({ min: 1, max: 99 }),
37
- percent_off: faker.number.int({ min: 1, max: 99 }),
38
- },
39
- },
40
- };
41
- }
42
- }
43
- class MagentoProductPreviewFactory extends DaffModelFactory {
44
- constructor() {
45
- super(MockMagentoProductPreview);
46
- }
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductPreviewFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductPreviewFactory, providedIn: 'root' }); }
49
- }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductPreviewFactory, decorators: [{
51
- type: Injectable,
52
- args: [{
53
- providedIn: 'root',
54
- }]
55
- }], ctorParameters: () => [] });
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.lorem.word();
63
- this.meta_description = faker.lorem.words(3);
64
- this.stock_status = MagentoProductStockStatusEnum.InStock;
65
- this.description = {
66
- __typename: 'ComplexTextValue',
67
- html: faker.lorem.words(5),
68
- };
69
- this.short_description = {
70
- __typename: 'ComplexTextValue',
71
- html: faker.lorem.words(3),
72
- };
73
- this.media_gallery_entries = [];
74
- }
75
- }
76
- /**
77
- * A factory for creating stub data for {@link MagentoProduct}s.
78
- */
79
- class MagentoCoreProductFactory extends DaffModelFactory {
80
- constructor() {
81
- super(MockMagentoCoreProduct);
82
- }
83
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCoreProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
84
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCoreProductFactory, providedIn: 'root' }); }
85
- }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCoreProductFactory, decorators: [{
87
- type: Injectable,
88
- args: [{
89
- providedIn: 'root',
90
- }]
91
- }], ctorParameters: () => [] });
92
-
93
- class MockMagentoSimpleProduct extends MockMagentoCoreProduct {
94
- constructor() {
95
- super(...arguments);
96
- this.__typename = MagentoProductTypeEnum.SimpleProduct;
97
- }
98
- }
99
- /**
100
- * A factory for creating stub data for {@link MagentoSimpleProduct}s.
101
- */
102
- class MagentoSimpleProductFactory extends DaffModelFactory {
103
- constructor() {
104
- super(MockMagentoSimpleProduct);
105
- }
106
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoSimpleProductFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
107
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoSimpleProductFactory, providedIn: 'root' }); }
108
- }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoSimpleProductFactory, decorators: [{
110
- type: Injectable,
111
- args: [{
112
- providedIn: 'root',
113
- }]
114
- }], ctorParameters: () => [] });
115
-
116
- class MockMagentoAggregationPrice {
117
- constructor() {
118
- this.__typename = 'Aggregation';
119
- this.attribute_code = 'price';
120
- this.type = MagentoProductFilterType.Range;
121
- this.count = faker.number.int();
122
- this.label = 'Price';
123
- this.options = [
124
- {
125
- value: '0-10',
126
- count: faker.number.int(),
127
- label: '0-10',
128
- },
129
- {
130
- value: '10-20',
131
- count: faker.number.int(),
132
- label: '10-20',
133
- },
134
- {
135
- value: '20-30',
136
- count: faker.number.int(),
137
- label: '20-30',
138
- },
139
- {
140
- value: '30-40',
141
- count: faker.number.int(),
142
- label: '30-40',
143
- },
144
- ];
145
- }
146
- }
147
- class MagentoProductAggregationPriceFactory extends DaffModelFactory {
148
- constructor() {
149
- super(MockMagentoAggregationPrice);
150
- }
151
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationPriceFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
152
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationPriceFactory, providedIn: 'root' }); }
153
- }
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationPriceFactory, decorators: [{
155
- type: Injectable,
156
- args: [{
157
- providedIn: 'root',
158
- }]
159
- }], ctorParameters: () => [] });
160
-
161
- class MockMagentoAggregationSelect {
162
- constructor() {
163
- this.__typename = 'Aggregation';
164
- this.attribute_code = 'select';
165
- this.type = MagentoProductFilterType.Equal;
166
- this.count = faker.number.int();
167
- this.label = faker.lorem.word();
168
- this.options = [
169
- {
170
- count: faker.number.int(),
171
- label: faker.lorem.word(),
172
- value: faker.string.uuid(),
173
- },
174
- {
175
- count: faker.number.int(),
176
- label: faker.lorem.word(),
177
- value: faker.string.uuid(),
178
- },
179
- {
180
- count: faker.number.int(),
181
- label: faker.lorem.word(),
182
- value: faker.string.uuid(),
183
- },
184
- ];
185
- }
186
- }
187
- class MagentoProductAggregationSelectFactory extends DaffModelFactory {
188
- constructor() {
189
- super(MockMagentoAggregationSelect);
190
- }
191
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationSelectFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
192
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationSelectFactory, providedIn: 'root' }); }
193
- }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationSelectFactory, decorators: [{
195
- type: Injectable,
196
- args: [{
197
- providedIn: 'root',
198
- }]
199
- }], ctorParameters: () => [] });
200
-
201
- class MagentoProductAggregationFactory extends DaffModelFactory {
202
- constructor(selectFactory, priceFactory) {
203
- super(faker.number.int({ min: 1, max: 2 }) === 2 ? selectFactory.type : priceFactory.type);
204
- this.selectFactory = selectFactory;
205
- this.priceFactory = priceFactory;
206
- }
207
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationFactory, deps: [{ token: MagentoProductAggregationSelectFactory }, { token: MagentoProductAggregationPriceFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
208
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationFactory, providedIn: 'root' }); }
209
- }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductAggregationFactory, decorators: [{
211
- type: Injectable,
212
- args: [{
213
- providedIn: 'root',
214
- }]
215
- }], ctorParameters: () => [{ type: MagentoProductAggregationSelectFactory }, { type: MagentoProductAggregationPriceFactory }] });
216
-
217
- const TYPES = [
218
- MagentoProductFilterType.Equal,
219
- MagentoProductFilterType.Range,
220
- MagentoProductFilterType.Match,
221
- ];
222
- class MockMagentoProductFilterTypeField {
223
- constructor() {
224
- this.name = faker.lorem.word();
225
- this.type = {
226
- name: TYPES[faker.number.int({ min: 0, max: TYPES.length - 1 })],
227
- };
228
- }
229
- }
230
- class MagentoProductFilterTypeFieldFactory extends DaffModelFactory {
231
- constructor() {
232
- super(MockMagentoProductFilterTypeField);
233
- }
234
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
235
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, providedIn: 'root' }); }
236
- }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductFilterTypeFieldFactory, decorators: [{
238
- type: Injectable,
239
- args: [{
240
- providedIn: 'root',
241
- }]
242
- }], ctorParameters: () => [] });
243
-
244
- class MockMagentoProductSortFields {
245
- constructor() {
246
- this.__typename = 'SortFields';
247
- this.default = 'position';
248
- this.options = [
249
- {
250
- label: 'string',
251
- value: 'position',
252
- },
253
- ];
254
- }
255
- }
256
- class MagentoProductSortFieldsFactory extends DaffModelFactory {
257
- constructor() {
258
- super(MockMagentoProductSortFields);
259
- }
260
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductSortFieldsFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
261
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductSortFieldsFactory, providedIn: 'root' }); }
262
- }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoProductSortFieldsFactory, decorators: [{
264
- type: Injectable,
265
- args: [{
266
- providedIn: 'root',
267
- }]
268
- }], ctorParameters: () => [] });
269
-
270
- /**
271
- * Generated bundle index. Do not edit.
272
- */
273
-
274
- export { MagentoCoreProductFactory, MagentoProductAggregationFactory, MagentoProductAggregationPriceFactory, MagentoProductAggregationSelectFactory, MagentoSimpleProductFactory as MagentoProductFactory, MagentoProductFilterTypeFieldFactory, MagentoProductPreviewFactory, MagentoProductSortFieldsFactory, MagentoSimpleProductFactory, MockMagentoCoreProduct, MockMagentoProductPreview, MockMagentoSimpleProduct };
275
- //# sourceMappingURL=daffodil-product-driver-magento-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daffodil-product-driver-magento-testing.mjs","sources":["../../../libs/product/driver/magento/testing/src/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/price.factory.ts","../../../libs/product/driver/magento/testing/src/factories/aggregation/type/select.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.string.uuid();\n url_key = faker.string.alphanumeric(16);\n url_suffix = '.html';\n name = faker.lorem.word();\n sku = faker.string.alphanumeric(16);\n stock_status = MagentoProductStockStatusEnum.InStock;\n image = {\n __typename: 'ProductImage',\n label: faker.lorem.words(3),\n url: faker.image.url(),\n };\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n price_range = {\n __typename: 'PriceRange',\n maximum_price: {\n __typename: 'ProductPrice',\n regular_price: {\n __typename: 'Money',\n value: faker.number.int({ min: 100, max: 1000 }),\n currency: null,\n },\n discount: {\n __typename: 'ProductDiscount',\n amount_off: faker.number.int({ min: 1, max: 99 }),\n percent_off: faker.number.int({ 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.lorem.word();\n meta_description = faker.lorem.words(3);\n stock_status = MagentoProductStockStatusEnum.InStock;\n description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.words(5),\n };\n short_description = {\n __typename: 'ComplexTextValue',\n html: faker.lorem.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 MockMagentoAggregationPrice implements MagentoAggregation {\n __typename = 'Aggregation';\n attribute_code = 'price';\n type = MagentoProductFilterType.Range;\n count = faker.number.int();\n label = 'Price';\n options = [\n {\n value: '0-10',\n count: faker.number.int(),\n label: '0-10',\n },\n {\n value: '10-20',\n count: faker.number.int(),\n label: '10-20',\n },\n {\n value: '20-30',\n count: faker.number.int(),\n label: '20-30',\n },\n {\n value: '30-40',\n count: faker.number.int(),\n label: '30-40',\n },\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 {\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.number.int();\n label = faker.lorem.word();\n options = [\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\n {\n count: faker.number.int(),\n label: faker.lorem.word(),\n value: faker.string.uuid(),\n },\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 { 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.number.int({ 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.lorem.word();\n type = {\n name: TYPES[faker.number.int({ 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';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoProductSortFields } from '@daffodil/product/driver/magento';\n\nclass MockMagentoProductSortFields implements MagentoProductSortFields {\n __typename = <const>'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;AACjD,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;QACzB,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,IAAA,CAAA,UAAU,GAAG,OAAO;AACpB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QACzB,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;AACnC,QAAA,IAAA,CAAA,YAAY,GAAG,6BAA6B,CAAC,OAAO;AACpD,QAAA,IAAA,CAAA,KAAK,GAAG;AACN,YAAA,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3B,YAAA,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE;SACvB;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,kBAAkB;YAC9B,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;SAC3B;AACD,QAAA,IAAA,CAAA,WAAW,GAAG;AACZ,YAAA,UAAU,EAAE,YAAY;AACxB,YAAA,aAAa,EAAE;AACb,gBAAA,U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