@daffodil/product 0.94.1 → 0.95.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/fesm2022/daffodil-product-driver-in-memory.mjs +200 -227
- package/fesm2022/daffodil-product-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs +444 -0
- package/fesm2022/daffodil-product-driver-magento-2.4.7-testing.mjs.map +1 -0
- package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs +704 -0
- package/fesm2022/daffodil-product-driver-magento-2.4.7.mjs.map +1 -0
- package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs +7 -0
- package/fesm2022/daffodil-product-driver-magento-auto-testing.mjs.map +1 -0
- package/fesm2022/daffodil-product-driver-magento-auto.mjs +7 -0
- package/fesm2022/daffodil-product-driver-magento-auto.mjs.map +1 -0
- package/fesm2022/daffodil-product-driver-shopify.mjs +99 -127
- package/fesm2022/daffodil-product-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver-testing.mjs +117 -87
- package/fesm2022/daffodil-product-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-driver.mjs +22 -45
- package/fesm2022/daffodil-product-driver.mjs.map +1 -1
- package/fesm2022/daffodil-product-routing.mjs +347 -285
- package/fesm2022/daffodil-product-routing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state-testing.mjs +189 -106
- package/fesm2022/daffodil-product-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product-state.mjs +566 -659
- package/fesm2022/daffodil-product-state.mjs.map +1 -1
- package/fesm2022/daffodil-product-testing.mjs +316 -276
- package/fesm2022/daffodil-product-testing.mjs.map +1 -1
- package/fesm2022/daffodil-product.mjs +8 -29
- package/fesm2022/daffodil-product.mjs.map +1 -1
- package/package.json +1 -1
- package/types/daffodil-product-driver-in-memory.d.ts +65 -75
- package/types/daffodil-product-driver-magento-2.4.7-testing.d.ts +105 -0
- package/types/daffodil-product-driver-magento-2.4.7.d.ts +337 -0
- package/types/daffodil-product-driver-magento-auto-testing.d.ts +1 -0
- package/types/daffodil-product-driver-magento-auto.d.ts +1 -0
- package/types/daffodil-product-driver-shopify.d.ts +31 -43
- package/types/daffodil-product-driver-testing.d.ts +28 -26
- package/types/daffodil-product-driver.d.ts +50 -61
- package/types/daffodil-product-routing.d.ts +101 -110
- package/types/daffodil-product-state-testing.d.ts +45 -43
- package/types/daffodil-product-state.d.ts +347 -375
- package/types/daffodil-product-testing.d.ts +82 -89
- package/types/daffodil-product.d.ts +93 -102
- package/fesm2022/daffodil-product-driver-magento-testing.mjs +0 -275
- package/fesm2022/daffodil-product-driver-magento-testing.mjs.map +0 -1
- package/fesm2022/daffodil-product-driver-magento.mjs +0 -855
- package/fesm2022/daffodil-product-driver-magento.mjs.map +0 -1
- package/types/daffodil-product-driver-magento-testing.d.ts +0 -114
- package/types/daffodil-product-driver-magento.d.ts +0 -396
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Inject, Injectable, NgModule, inject } from "@angular/core";
|
|
3
|
+
import * as i1 from "apollo-angular";
|
|
4
|
+
import { gql } from "apollo-angular";
|
|
5
|
+
import { map } from "rxjs/operators";
|
|
6
|
+
import { daffUriTruncateQueryFragment } from "@daffodil/core/routing";
|
|
7
|
+
import { DaffFilterType, DaffSortDirectionEnum, createConfigInjectionToken, createMultiInjectionToken, createSingleInjectionToken, daffFilterArrayToDict } from "@daffodil/core";
|
|
8
|
+
import { DaffProductTypeEnum } from "@daffodil/product";
|
|
9
|
+
import { daffBuildFragmentDefinition, daffBuildFragmentNameSpread } from "@daffodil/core/graphql";
|
|
10
|
+
import { DaffProductInvalidAPIResponseError, provideDaffProductDriver } from "@daffodil/product/driver";
|
|
11
|
+
import { CommonModule } from "@angular/common";
|
|
12
|
+
import { provideManyDaffMagentoCacheableOperations } from "@daffodil/driver/magento/2.4.7";
|
|
13
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS, provider: provideDaffProductMagentoExtraProductResponseTransforms } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS");
|
|
14
|
+
var MagentoProductTypeEnum;
|
|
15
|
+
(function(MagentoProductTypeEnum) {
|
|
16
|
+
MagentoProductTypeEnum["BundledProduct"] = "BundleProduct";
|
|
17
|
+
MagentoProductTypeEnum["ConfigurableProduct"] = "ConfigurableProduct";
|
|
18
|
+
MagentoProductTypeEnum["SimpleProduct"] = "SimpleProduct";
|
|
19
|
+
})(MagentoProductTypeEnum || (MagentoProductTypeEnum = {}));
|
|
20
|
+
var MagentoProductStockStatusEnum;
|
|
21
|
+
(function(MagentoProductStockStatusEnum) {
|
|
22
|
+
MagentoProductStockStatusEnum["InStock"] = "IN_STOCK";
|
|
23
|
+
MagentoProductStockStatusEnum["OutOfStock"] = "OUT_OF_STOCK";
|
|
24
|
+
})(MagentoProductStockStatusEnum || (MagentoProductStockStatusEnum = {}));
|
|
25
|
+
var MagentoProductFilterActionEnum;
|
|
26
|
+
(function(MagentoProductFilterActionEnum) {
|
|
27
|
+
MagentoProductFilterActionEnum["Equal"] = "eq";
|
|
28
|
+
MagentoProductFilterActionEnum["To"] = "to";
|
|
29
|
+
MagentoProductFilterActionEnum["From"] = "from";
|
|
30
|
+
MagentoProductFilterActionEnum["In"] = "in";
|
|
31
|
+
MagentoProductFilterActionEnum["Match"] = "match";
|
|
32
|
+
})(MagentoProductFilterActionEnum || (MagentoProductFilterActionEnum = {}));
|
|
33
|
+
var MagentoProductFilterType;
|
|
34
|
+
(function(MagentoProductFilterType) {
|
|
35
|
+
MagentoProductFilterType["Equal"] = "FilterEqualTypeInput";
|
|
36
|
+
MagentoProductFilterType["Match"] = "FilterMatchTypeInput";
|
|
37
|
+
MagentoProductFilterType["Range"] = "FilterRangeTypeInput";
|
|
38
|
+
})(MagentoProductFilterType || (MagentoProductFilterType = {}));
|
|
39
|
+
var MagentoSortDirectionEnum;
|
|
40
|
+
(function(MagentoSortDirectionEnum) {
|
|
41
|
+
MagentoSortDirectionEnum["Ascending"] = "ASC";
|
|
42
|
+
MagentoSortDirectionEnum["Decending"] = "DESC";
|
|
43
|
+
})(MagentoSortDirectionEnum || (MagentoSortDirectionEnum = {}));
|
|
44
|
+
var MagentoProductAppliedFiltersTransformService = class MagentoProductAppliedFiltersTransformService {
|
|
45
|
+
transform(daffFilters) {
|
|
46
|
+
const magentoFilters = {};
|
|
47
|
+
if (!daffFilters) return magentoFilters;
|
|
48
|
+
daffFilters.forEach((filter) => {
|
|
49
|
+
if (filter.type === DaffFilterType.RangeNumeric) magentoFilters[filter.name] = {
|
|
50
|
+
...magentoFilters[filter.name],
|
|
51
|
+
...this.getRangeFromValue(filter.value.min.toString()),
|
|
52
|
+
...this.getRangeToValue(filter.value.max.toString())
|
|
53
|
+
};
|
|
54
|
+
else magentoFilters[filter.name] = {
|
|
55
|
+
...magentoFilters[filter.name],
|
|
56
|
+
[this.getFilterAction(filter.type)]: this.getFilterValue(filter.type, filter.value)
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
return magentoFilters;
|
|
60
|
+
}
|
|
61
|
+
getFilterAction(type) {
|
|
62
|
+
return type === DaffFilterType.Equal ? MagentoProductFilterActionEnum.In : MagentoProductFilterActionEnum.Match;
|
|
63
|
+
}
|
|
64
|
+
getFilterValue(type, value) {
|
|
65
|
+
return type === DaffFilterType.Equal ? value : value[0];
|
|
66
|
+
}
|
|
67
|
+
getRangeFromValue(fromValue) {
|
|
68
|
+
return fromValue !== "*" ? { [MagentoProductFilterActionEnum.From]: fromValue } : null;
|
|
69
|
+
}
|
|
70
|
+
getRangeToValue(toValue) {
|
|
71
|
+
return toValue !== "*" ? { [MagentoProductFilterActionEnum.To]: toValue } : null;
|
|
72
|
+
}
|
|
73
|
+
static {
|
|
74
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
75
|
+
minVersion: "12.0.0",
|
|
76
|
+
version: "22.2.4",
|
|
77
|
+
ngImport: i0,
|
|
78
|
+
type: MagentoProductAppliedFiltersTransformService,
|
|
79
|
+
deps: [],
|
|
80
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
static {
|
|
84
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
85
|
+
minVersion: "12.0.0",
|
|
86
|
+
version: "22.2.4",
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
type: MagentoProductAppliedFiltersTransformService,
|
|
89
|
+
providedIn: "root"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
94
|
+
minVersion: "12.0.0",
|
|
95
|
+
version: "22.2.4",
|
|
96
|
+
ngImport: i0,
|
|
97
|
+
type: MagentoProductAppliedFiltersTransformService,
|
|
98
|
+
decorators: [{
|
|
99
|
+
type: Injectable,
|
|
100
|
+
args: [{ providedIn: "root" }]
|
|
101
|
+
}]
|
|
102
|
+
});
|
|
103
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS, provider: provider$1 } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS");
|
|
104
|
+
function provideDaffProductMagentoExtraProductPreviewTransforms(...transforms) {
|
|
105
|
+
return provider$1(...transforms);
|
|
106
|
+
}
|
|
107
|
+
function transformMagentoProductPreview(product) {
|
|
108
|
+
return transformMagentoSimpleProductPreview(product);
|
|
109
|
+
}
|
|
110
|
+
const getType = (product) => {
|
|
111
|
+
switch (product.__typename) {
|
|
112
|
+
case MagentoProductTypeEnum.BundledProduct: return DaffProductTypeEnum.Composite;
|
|
113
|
+
case MagentoProductTypeEnum.ConfigurableProduct: return DaffProductTypeEnum.Configurable;
|
|
114
|
+
default: return DaffProductTypeEnum.Simple;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
function transformMagentoSimpleProductPreview(product) {
|
|
118
|
+
return {
|
|
119
|
+
type: getType(product),
|
|
120
|
+
id: product.sku,
|
|
121
|
+
url: `/${product.url_key}${product.url_suffix}`,
|
|
122
|
+
name: product.name,
|
|
123
|
+
thumbnail: transformThumbnail(product.image),
|
|
124
|
+
price: getPrice(product),
|
|
125
|
+
discount: getDiscount(product),
|
|
126
|
+
in_stock: product.stock_status === MagentoProductStockStatusEnum.InStock
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function transformThumbnail(image) {
|
|
130
|
+
return {
|
|
131
|
+
url: image.url,
|
|
132
|
+
label: image.label,
|
|
133
|
+
id: null
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function getPrice(product) {
|
|
137
|
+
return product.price_range?.maximum_price?.regular_price?.value;
|
|
138
|
+
}
|
|
139
|
+
function getDiscount(product) {
|
|
140
|
+
return product.price_range?.maximum_price?.discount ? {
|
|
141
|
+
amount: product.price_range.maximum_price.discount.amount_off,
|
|
142
|
+
percent: product.price_range.maximum_price.discount.percent_off
|
|
143
|
+
} : {
|
|
144
|
+
amount: null,
|
|
145
|
+
percent: null
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const { token: DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM, provider: provideDaffProductMagentoProductPreviewTransform } = createSingleInjectionToken("DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM", { factory: () => {
|
|
149
|
+
const transforms = inject(DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_TRANSFORMS);
|
|
150
|
+
return (magentoProduct, mediaUrl) => transforms.reduce((daffProduct, transform) => transform(daffProduct, magentoProduct, mediaUrl), transformMagentoProductPreview(magentoProduct));
|
|
151
|
+
} });
|
|
152
|
+
var DaffMagentoSimpleProductTransformers = class DaffMagentoSimpleProductTransformers {
|
|
153
|
+
constructor(productPreviewTransform) {
|
|
154
|
+
this.productPreviewTransform = productPreviewTransform;
|
|
155
|
+
}
|
|
156
|
+
transformMagentoSimpleProduct(product, mediaUrl) {
|
|
157
|
+
return {
|
|
158
|
+
...this.productPreviewTransform(product, mediaUrl),
|
|
159
|
+
...product.description?.html && { description: product.description?.html },
|
|
160
|
+
...product.short_description?.html && { short_description: product.short_description?.html },
|
|
161
|
+
...product.meta_title && { meta_title: product.meta_title },
|
|
162
|
+
...product.meta_description && { meta_description: product.meta_description },
|
|
163
|
+
...product.canonical_url && { canonicalUrl: product.canonical_url },
|
|
164
|
+
...product.media_gallery_entries && { images: transformMediaGalleryEntries(product, mediaUrl) }
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
static {
|
|
168
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
169
|
+
minVersion: "12.0.0",
|
|
170
|
+
version: "22.2.4",
|
|
171
|
+
ngImport: i0,
|
|
172
|
+
type: DaffMagentoSimpleProductTransformers,
|
|
173
|
+
deps: [{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM }],
|
|
174
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
static {
|
|
178
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
179
|
+
minVersion: "12.0.0",
|
|
180
|
+
version: "22.2.4",
|
|
181
|
+
ngImport: i0,
|
|
182
|
+
type: DaffMagentoSimpleProductTransformers,
|
|
183
|
+
providedIn: "root"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
188
|
+
minVersion: "12.0.0",
|
|
189
|
+
version: "22.2.4",
|
|
190
|
+
ngImport: i0,
|
|
191
|
+
type: DaffMagentoSimpleProductTransformers,
|
|
192
|
+
decorators: [{
|
|
193
|
+
type: Injectable,
|
|
194
|
+
args: [{ providedIn: "root" }]
|
|
195
|
+
}],
|
|
196
|
+
ctorParameters: () => [{
|
|
197
|
+
type: void 0,
|
|
198
|
+
decorators: [{
|
|
199
|
+
type: Inject,
|
|
200
|
+
args: [DAFF_PRODUCT_MAGENTO_PRODUCT_PREVIEW_TRANSFORM]
|
|
201
|
+
}]
|
|
202
|
+
}]
|
|
203
|
+
});
|
|
204
|
+
function transformMediaGalleryEntries(product, mediaUrl) {
|
|
205
|
+
return product.media_gallery_entries?.map((image) => ({
|
|
206
|
+
url: mediaUrl + "catalog/product" + image.file,
|
|
207
|
+
label: image.label,
|
|
208
|
+
id: image.uid.toString()
|
|
209
|
+
})) || [];
|
|
210
|
+
}
|
|
211
|
+
var DaffMagentoProductsTransformer = class DaffMagentoProductsTransformer {
|
|
212
|
+
constructor(magentoSimpleProductTransformers) {
|
|
213
|
+
this.magentoSimpleProductTransformers = magentoSimpleProductTransformers;
|
|
214
|
+
}
|
|
215
|
+
transformMagentoProduct(product, mediaUrl) {
|
|
216
|
+
return this.magentoSimpleProductTransformers.transformMagentoSimpleProduct(product, mediaUrl);
|
|
217
|
+
}
|
|
218
|
+
transformManyMagentoProducts(products, mediaUrl) {
|
|
219
|
+
return products.map((product) => this.transformMagentoProduct(product, mediaUrl));
|
|
220
|
+
}
|
|
221
|
+
static {
|
|
222
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
223
|
+
minVersion: "12.0.0",
|
|
224
|
+
version: "22.2.4",
|
|
225
|
+
ngImport: i0,
|
|
226
|
+
type: DaffMagentoProductsTransformer,
|
|
227
|
+
deps: [{ token: DaffMagentoSimpleProductTransformers }],
|
|
228
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
static {
|
|
232
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
233
|
+
minVersion: "12.0.0",
|
|
234
|
+
version: "22.2.4",
|
|
235
|
+
ngImport: i0,
|
|
236
|
+
type: DaffMagentoProductsTransformer,
|
|
237
|
+
providedIn: "root"
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
242
|
+
minVersion: "12.0.0",
|
|
243
|
+
version: "22.2.4",
|
|
244
|
+
ngImport: i0,
|
|
245
|
+
type: DaffMagentoProductsTransformer,
|
|
246
|
+
decorators: [{
|
|
247
|
+
type: Injectable,
|
|
248
|
+
args: [{ providedIn: "root" }]
|
|
249
|
+
}],
|
|
250
|
+
ctorParameters: () => [{ type: DaffMagentoSimpleProductTransformers }]
|
|
251
|
+
});
|
|
252
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS, provider } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS");
|
|
253
|
+
function provideDaffProductMagentoExtraProductTransforms(...transforms) {
|
|
254
|
+
return provider(...transforms);
|
|
255
|
+
}
|
|
256
|
+
const { token: DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM, provider: provideDaffProductMagentoProductTransform } = createSingleInjectionToken("DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM", { factory: () => {
|
|
257
|
+
const transforms = inject(DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_TRANSFORMS);
|
|
258
|
+
const transformer = inject(DaffMagentoProductsTransformer);
|
|
259
|
+
return (magentoProduct, mediaUrl) => transforms.reduce((daffProduct, transform) => transform(daffProduct, magentoProduct, mediaUrl), transformer.transformMagentoProduct(magentoProduct, mediaUrl));
|
|
260
|
+
} });
|
|
261
|
+
var DaffMagentoProductResponseTransformers = class DaffMagentoProductResponseTransformers {
|
|
262
|
+
constructor(transformMagentoProduct) {
|
|
263
|
+
this.transformMagentoProduct = transformMagentoProduct;
|
|
264
|
+
}
|
|
265
|
+
transformMagentoProductResponse(product, mediaUrl) {
|
|
266
|
+
const daffProduct = this.transformMagentoProduct(product, mediaUrl);
|
|
267
|
+
return {
|
|
268
|
+
id: daffProduct.id,
|
|
269
|
+
products: [daffProduct]
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
static {
|
|
273
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
274
|
+
minVersion: "12.0.0",
|
|
275
|
+
version: "22.2.4",
|
|
276
|
+
ngImport: i0,
|
|
277
|
+
type: DaffMagentoProductResponseTransformers,
|
|
278
|
+
deps: [{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM }],
|
|
279
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
static {
|
|
283
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
284
|
+
minVersion: "12.0.0",
|
|
285
|
+
version: "22.2.4",
|
|
286
|
+
ngImport: i0,
|
|
287
|
+
type: DaffMagentoProductResponseTransformers,
|
|
288
|
+
providedIn: "root"
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
293
|
+
minVersion: "12.0.0",
|
|
294
|
+
version: "22.2.4",
|
|
295
|
+
ngImport: i0,
|
|
296
|
+
type: DaffMagentoProductResponseTransformers,
|
|
297
|
+
decorators: [{
|
|
298
|
+
type: Injectable,
|
|
299
|
+
args: [{ providedIn: "root" }]
|
|
300
|
+
}],
|
|
301
|
+
ctorParameters: () => [{
|
|
302
|
+
type: void 0,
|
|
303
|
+
decorators: [{
|
|
304
|
+
type: Inject,
|
|
305
|
+
args: [DAFF_PRODUCT_MAGENTO_PRODUCT_TRANSFORM]
|
|
306
|
+
}]
|
|
307
|
+
}]
|
|
308
|
+
});
|
|
309
|
+
const transformAggregateEqual = (aggregate) => ({
|
|
310
|
+
label: aggregate.label,
|
|
311
|
+
type: DaffFilterType.Equal,
|
|
312
|
+
name: aggregate.attribute_code,
|
|
313
|
+
options: aggregate.options.reduce((acc, option) => {
|
|
314
|
+
acc[option.value] = {
|
|
315
|
+
applied: false,
|
|
316
|
+
label: option.label,
|
|
317
|
+
count: option.count,
|
|
318
|
+
value: option.value
|
|
319
|
+
};
|
|
320
|
+
return acc;
|
|
321
|
+
}, {})
|
|
322
|
+
});
|
|
323
|
+
const transformAggregateRange = (aggregate) => ({
|
|
324
|
+
label: aggregate.label,
|
|
325
|
+
type: DaffFilterType.RangeNumeric,
|
|
326
|
+
name: aggregate.attribute_code,
|
|
327
|
+
min: parseInt(aggregate.options[0].value.split("-")[0], 10),
|
|
328
|
+
max: parseInt(aggregate.options[aggregate.options.length - 1].value.split("-")[1], 10),
|
|
329
|
+
options: {}
|
|
330
|
+
});
|
|
331
|
+
const magentoProductTransformAggregate = (aggregate) => {
|
|
332
|
+
switch (aggregate.type) {
|
|
333
|
+
case MagentoProductFilterType.Range: return transformAggregateRange(aggregate);
|
|
334
|
+
case MagentoProductFilterType.Equal:
|
|
335
|
+
case MagentoProductFilterType.Match:
|
|
336
|
+
default: return transformAggregateEqual(aggregate);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
const magentoProductGetMatchedAttributeType = (aggregate, inputFields) => inputFields.find((item) => item.name === aggregate.attribute_code).type.name;
|
|
340
|
+
function magentoProductAddMetadataTypesToAggregates(inputFields, aggregations) {
|
|
341
|
+
return aggregations.map((aggregate) => ({
|
|
342
|
+
...aggregate,
|
|
343
|
+
type: magentoProductGetMatchedAttributeType(aggregate, inputFields)
|
|
344
|
+
}));
|
|
345
|
+
}
|
|
346
|
+
const transformDirection = (direction) => {
|
|
347
|
+
if (direction === DaffSortDirectionEnum.Ascending) return MagentoSortDirectionEnum.Ascending;
|
|
348
|
+
else if (direction === DaffSortDirectionEnum.Descending) return MagentoSortDirectionEnum.Decending;
|
|
349
|
+
};
|
|
350
|
+
const magentoAppliedSortOptionTransform = (appliedOption, appliedDirection) => ({ [appliedOption]: transformDirection(appliedDirection) });
|
|
351
|
+
function coerceDefaultSortOptionFirst(sort_fields) {
|
|
352
|
+
const index = sort_fields.options.findIndex((option) => sort_fields.default === option.value);
|
|
353
|
+
return {
|
|
354
|
+
...sort_fields,
|
|
355
|
+
options: [
|
|
356
|
+
sort_fields.options[index],
|
|
357
|
+
...sort_fields.options.slice(0, index),
|
|
358
|
+
...sort_fields.options.slice(index + 1)
|
|
359
|
+
]
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
const magentoProductCollectionMetadataTransform = (aggregates, pageInfo, sortFields, products, count, appliedSortOption, appliedSortDirection) => ({
|
|
363
|
+
ids: products.map(({ sku }) => sku),
|
|
364
|
+
count,
|
|
365
|
+
pageSize: pageInfo.page_size,
|
|
366
|
+
currentPage: pageInfo.current_page,
|
|
367
|
+
totalPages: pageInfo.total_pages,
|
|
368
|
+
filters: daffFilterArrayToDict(aggregates.map(magentoProductTransformAggregate)),
|
|
369
|
+
sortOptions: {
|
|
370
|
+
default: sortFields.default,
|
|
371
|
+
options: coerceDefaultSortOptionFirst(sortFields).options
|
|
372
|
+
},
|
|
373
|
+
appliedSortDirection,
|
|
374
|
+
appliedSortOption: appliedSortOption || sortFields.default
|
|
375
|
+
});
|
|
376
|
+
const { token: DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM, provider: provideDaffProductMagentoProductResponseTransform } = createSingleInjectionToken("DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM", { factory: () => {
|
|
377
|
+
const transforms = inject(DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_RESPONSE_TRANSFORMS);
|
|
378
|
+
const daffResponseTransformer = inject(DaffMagentoProductResponseTransformers);
|
|
379
|
+
return (magentoProduct, mediaUrl) => transforms.reduce((daffProductResponse, transform) => transform(daffProductResponse, magentoProduct, mediaUrl), daffResponseTransformer.transformMagentoProductResponse(magentoProduct, mediaUrl));
|
|
380
|
+
} });
|
|
381
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS, provider: provideDaffProductMagentoExtraProductPageFragments } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS");
|
|
382
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS, provider: provideDaffProductMagentoExtraProductPreviewFragments } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS");
|
|
383
|
+
const { token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS, provider: provideDaffProductMagentoExtraProductFragments } = createMultiInjectionToken("DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS");
|
|
384
|
+
const MAGENTO_PRODUCT_CONFIG_DEFAULT = { baseMediaUrl: "" };
|
|
385
|
+
const { token: MAGENTO_PRODUCT_CONFIG_TOKEN, provider: provideMagentoProductConfig } = createConfigInjectionToken(MAGENTO_PRODUCT_CONFIG_DEFAULT, "MAGENTO_PRODUCT_CONFIG_TOKEN");
|
|
386
|
+
const magentoProductPreviewFragment = gql`
|
|
387
|
+
fragment magentoProductPreview on ProductInterface {
|
|
388
|
+
__typename
|
|
389
|
+
uid
|
|
390
|
+
url_key
|
|
391
|
+
url_suffix
|
|
392
|
+
name
|
|
393
|
+
sku
|
|
394
|
+
stock_status
|
|
395
|
+
price_range {
|
|
396
|
+
maximum_price {
|
|
397
|
+
regular_price {
|
|
398
|
+
value
|
|
399
|
+
currency
|
|
400
|
+
}
|
|
401
|
+
discount {
|
|
402
|
+
amount_off
|
|
403
|
+
percent_off
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
image {
|
|
408
|
+
url
|
|
409
|
+
label
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
`;
|
|
413
|
+
const magentoProductFragment = gql`
|
|
414
|
+
fragment product on ProductInterface {
|
|
415
|
+
...magentoProductPreview
|
|
416
|
+
__typename
|
|
417
|
+
name
|
|
418
|
+
meta_title
|
|
419
|
+
meta_description
|
|
420
|
+
canonical_url
|
|
421
|
+
stock_status
|
|
422
|
+
short_description {
|
|
423
|
+
html
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
${magentoProductPreviewFragment}
|
|
427
|
+
`;
|
|
428
|
+
const magentoProductPageFragment = gql`
|
|
429
|
+
fragment magentoProductPage on ProductInterface {
|
|
430
|
+
...product
|
|
431
|
+
__typename
|
|
432
|
+
media_gallery_entries {
|
|
433
|
+
label
|
|
434
|
+
file
|
|
435
|
+
position
|
|
436
|
+
disabled
|
|
437
|
+
uid
|
|
438
|
+
}
|
|
439
|
+
description {
|
|
440
|
+
html
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
${magentoProductFragment}
|
|
444
|
+
`;
|
|
445
|
+
const magentoProductAggregationsFragment = gql`
|
|
446
|
+
fragment magentoProductAggregations on Aggregation {
|
|
447
|
+
label
|
|
448
|
+
count
|
|
449
|
+
attribute_code
|
|
450
|
+
options {
|
|
451
|
+
count
|
|
452
|
+
label
|
|
453
|
+
value
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
`;
|
|
457
|
+
const magentoProductSortFieldsFragment = gql`
|
|
458
|
+
fragment magentoProductSortFields on SortFields {
|
|
459
|
+
default
|
|
460
|
+
options {
|
|
461
|
+
label
|
|
462
|
+
value
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
`;
|
|
466
|
+
const DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME = "MagentoGetAllProducts";
|
|
467
|
+
const getAllProducts = (extraProductFragments = []) => gql`
|
|
468
|
+
query ${DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME}($pageSize: Int) {
|
|
469
|
+
products(pageSize: $pageSize, search: "") {
|
|
470
|
+
total_count
|
|
471
|
+
items {
|
|
472
|
+
...magentoProductPage
|
|
473
|
+
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
474
|
+
}
|
|
475
|
+
page_info {
|
|
476
|
+
page_size
|
|
477
|
+
current_page
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
${magentoProductPageFragment}
|
|
482
|
+
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
483
|
+
`;
|
|
484
|
+
const DAFF_MAGENTO_GET_A_PRODUCT_QUERY_NAME = "MagentoGetAProduct";
|
|
485
|
+
const getProduct = (extraProductFragments = []) => gql`
|
|
486
|
+
query ${DAFF_MAGENTO_GET_A_PRODUCT_QUERY_NAME}($sku: String!){
|
|
487
|
+
products(filter: {
|
|
488
|
+
sku: {
|
|
489
|
+
eq: $sku
|
|
490
|
+
}
|
|
491
|
+
}){
|
|
492
|
+
items {
|
|
493
|
+
...magentoProductPage
|
|
494
|
+
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
${magentoProductPageFragment}
|
|
499
|
+
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
500
|
+
`;
|
|
501
|
+
const DAFF_MAGENTO_GET_A_PRODUCT_BY_URL_QUERY_NAME = "MagentoGetAProductByUrl";
|
|
502
|
+
const getProductByUrl = (extraProductFragments = []) => gql`
|
|
503
|
+
query ${DAFF_MAGENTO_GET_A_PRODUCT_BY_URL_QUERY_NAME}($url: String!){
|
|
504
|
+
route(url: $url) {
|
|
505
|
+
... on ProductInterface {
|
|
506
|
+
...magentoProductPage
|
|
507
|
+
${daffBuildFragmentNameSpread(...extraProductFragments)}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
${magentoProductPageFragment}
|
|
512
|
+
${daffBuildFragmentDefinition(...extraProductFragments)}
|
|
513
|
+
`;
|
|
514
|
+
const isValid$1 = (response) => !!response.data?.route?.sku;
|
|
515
|
+
const magentoProductGetByUrlValidator = (response) => {
|
|
516
|
+
if (isValid$1(response)) return response;
|
|
517
|
+
throw new DaffProductInvalidAPIResponseError("The platform did not respond with a product.");
|
|
518
|
+
};
|
|
519
|
+
const DAFF_MAGENTO_GET_FILTER_TYPES_QUERY_NAME = "MagentoGetProductFilterFieldTypes";
|
|
520
|
+
const MagentoProductGetFilterTypes = gql`
|
|
521
|
+
query ${DAFF_MAGENTO_GET_FILTER_TYPES_QUERY_NAME} {
|
|
522
|
+
__type (name: "ProductAttributeFilterInput") {
|
|
523
|
+
inputFields {
|
|
524
|
+
name
|
|
525
|
+
type {
|
|
526
|
+
name
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
`;
|
|
532
|
+
const isValid = (response) => !!response.data?.products?.items;
|
|
533
|
+
const magentoProductGetAllValidator = (response) => {
|
|
534
|
+
if (isValid(response)) return response;
|
|
535
|
+
throw new DaffProductInvalidAPIResponseError("The platform did not respond with products.");
|
|
536
|
+
};
|
|
537
|
+
var DaffMagentoProductService = class DaffMagentoProductService {
|
|
538
|
+
constructor(apollo, config, responseTransform, extraPageFragments, extraFragments, extraPreviewFragments, magentoProductsTransformer) {
|
|
539
|
+
this.apollo = apollo;
|
|
540
|
+
this.config = config;
|
|
541
|
+
this.responseTransform = responseTransform;
|
|
542
|
+
this.extraPageFragments = extraPageFragments;
|
|
543
|
+
this.extraFragments = extraFragments;
|
|
544
|
+
this.extraPreviewFragments = extraPreviewFragments;
|
|
545
|
+
this.magentoProductsTransformer = magentoProductsTransformer;
|
|
546
|
+
}
|
|
547
|
+
get(productId) {
|
|
548
|
+
return this.apollo.query({
|
|
549
|
+
query: getProduct([
|
|
550
|
+
...this.extraPreviewFragments,
|
|
551
|
+
...this.extraFragments,
|
|
552
|
+
...this.extraPageFragments
|
|
553
|
+
]),
|
|
554
|
+
variables: { sku: productId }
|
|
555
|
+
}).pipe(map((result) => this.responseTransform(result.data.products.items[0], this.config.baseMediaUrl)));
|
|
556
|
+
}
|
|
557
|
+
getByUrl(url) {
|
|
558
|
+
return this.apollo.query({
|
|
559
|
+
query: getProductByUrl([
|
|
560
|
+
...this.extraPreviewFragments,
|
|
561
|
+
...this.extraFragments,
|
|
562
|
+
...this.extraPageFragments
|
|
563
|
+
]),
|
|
564
|
+
variables: { url: daffUriTruncateQueryFragment(url) }
|
|
565
|
+
}).pipe(map(magentoProductGetByUrlValidator), map((result) => this.responseTransform(result.data.route, this.config.baseMediaUrl)));
|
|
566
|
+
}
|
|
567
|
+
getAll() {
|
|
568
|
+
return this.apollo.query({ query: getAllProducts([
|
|
569
|
+
...this.extraPreviewFragments,
|
|
570
|
+
...this.extraFragments,
|
|
571
|
+
...this.extraPageFragments
|
|
572
|
+
]) }).pipe(map(magentoProductGetAllValidator), map((result) => this.magentoProductsTransformer.transformManyMagentoProducts(result.data.products.items, this.config.baseMediaUrl)));
|
|
573
|
+
}
|
|
574
|
+
static {
|
|
575
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
576
|
+
minVersion: "12.0.0",
|
|
577
|
+
version: "22.2.4",
|
|
578
|
+
ngImport: i0,
|
|
579
|
+
type: DaffMagentoProductService,
|
|
580
|
+
deps: [
|
|
581
|
+
{ token: i1.Apollo },
|
|
582
|
+
{ token: MAGENTO_PRODUCT_CONFIG_TOKEN },
|
|
583
|
+
{ token: DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM },
|
|
584
|
+
{ token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS },
|
|
585
|
+
{ token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS },
|
|
586
|
+
{ token: DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS },
|
|
587
|
+
{ token: DaffMagentoProductsTransformer }
|
|
588
|
+
],
|
|
589
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
static {
|
|
593
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
594
|
+
minVersion: "12.0.0",
|
|
595
|
+
version: "22.2.4",
|
|
596
|
+
ngImport: i0,
|
|
597
|
+
type: DaffMagentoProductService,
|
|
598
|
+
providedIn: "root"
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
603
|
+
minVersion: "12.0.0",
|
|
604
|
+
version: "22.2.4",
|
|
605
|
+
ngImport: i0,
|
|
606
|
+
type: DaffMagentoProductService,
|
|
607
|
+
decorators: [{
|
|
608
|
+
type: Injectable,
|
|
609
|
+
args: [{ providedIn: "root" }]
|
|
610
|
+
}],
|
|
611
|
+
ctorParameters: () => [
|
|
612
|
+
{ type: i1.Apollo },
|
|
613
|
+
{
|
|
614
|
+
type: void 0,
|
|
615
|
+
decorators: [{
|
|
616
|
+
type: Inject,
|
|
617
|
+
args: [MAGENTO_PRODUCT_CONFIG_TOKEN]
|
|
618
|
+
}]
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
type: void 0,
|
|
622
|
+
decorators: [{
|
|
623
|
+
type: Inject,
|
|
624
|
+
args: [DAFF_PRODUCT_MAGENTO_PRODUCT_RESPONSE_TRANSFORM]
|
|
625
|
+
}]
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
type: void 0,
|
|
629
|
+
decorators: [{
|
|
630
|
+
type: Inject,
|
|
631
|
+
args: [DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PAGE_FRAGMENTS]
|
|
632
|
+
}]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
type: void 0,
|
|
636
|
+
decorators: [{
|
|
637
|
+
type: Inject,
|
|
638
|
+
args: [DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_FRAGMENTS]
|
|
639
|
+
}]
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
type: void 0,
|
|
643
|
+
decorators: [{
|
|
644
|
+
type: Inject,
|
|
645
|
+
args: [DAFF_PRODUCT_MAGENTO_EXTRA_PRODUCT_PREVIEW_FRAGMENTS]
|
|
646
|
+
}]
|
|
647
|
+
},
|
|
648
|
+
{ type: DaffMagentoProductsTransformer }
|
|
649
|
+
]
|
|
650
|
+
});
|
|
651
|
+
const provideDaffProductMagentoDriver = (config = MAGENTO_PRODUCT_CONFIG_DEFAULT) => [
|
|
652
|
+
provideDaffProductDriver(DaffMagentoProductService),
|
|
653
|
+
provideManyDaffMagentoCacheableOperations(DAFF_MAGENTO_GET_ALL_PRODUCTS_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_QUERY_NAME, DAFF_MAGENTO_GET_A_PRODUCT_BY_URL_QUERY_NAME),
|
|
654
|
+
provideMagentoProductConfig(config)
|
|
655
|
+
];
|
|
656
|
+
var DaffProductMagentoDriverModule = class DaffProductMagentoDriverModule {
|
|
657
|
+
static forRoot(config = MAGENTO_PRODUCT_CONFIG_DEFAULT) {
|
|
658
|
+
return {
|
|
659
|
+
ngModule: DaffProductMagentoDriverModule,
|
|
660
|
+
providers: [provideDaffProductMagentoDriver(config)]
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
static {
|
|
664
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
665
|
+
minVersion: "12.0.0",
|
|
666
|
+
version: "22.2.4",
|
|
667
|
+
ngImport: i0,
|
|
668
|
+
type: DaffProductMagentoDriverModule,
|
|
669
|
+
deps: [],
|
|
670
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
static {
|
|
674
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
675
|
+
minVersion: "14.0.0",
|
|
676
|
+
version: "22.2.4",
|
|
677
|
+
ngImport: i0,
|
|
678
|
+
type: DaffProductMagentoDriverModule,
|
|
679
|
+
imports: [CommonModule]
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
static {
|
|
683
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
684
|
+
minVersion: "12.0.0",
|
|
685
|
+
version: "22.2.4",
|
|
686
|
+
ngImport: i0,
|
|
687
|
+
type: DaffProductMagentoDriverModule,
|
|
688
|
+
imports: [CommonModule]
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
693
|
+
minVersion: "12.0.0",
|
|
694
|
+
version: "22.2.4",
|
|
695
|
+
ngImport: i0,
|
|
696
|
+
type: DaffProductMagentoDriverModule,
|
|
697
|
+
decorators: [{
|
|
698
|
+
type: NgModule,
|
|
699
|
+
args: [{ imports: [CommonModule] }]
|
|
700
|
+
}]
|
|
701
|
+
});
|
|
702
|
+
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, getAllProducts, getProduct, getProductByUrl, magentoAppliedSortOptionTransform, magentoProductAddMetadataTypesToAggregates, magentoProductAggregationsFragment, magentoProductCollectionMetadataTransform, magentoProductFragment, magentoProductGetAllValidator, magentoProductGetByUrlValidator, magentoProductGetMatchedAttributeType, magentoProductPageFragment, magentoProductPreviewFragment, magentoProductSortFieldsFragment, magentoProductTransformAggregate, provideDaffProductMagentoDriver, provideDaffProductMagentoExtraProductFragments, provideDaffProductMagentoExtraProductPageFragments, provideDaffProductMagentoExtraProductPreviewFragments, provideDaffProductMagentoExtraProductPreviewTransforms, provideDaffProductMagentoExtraProductResponseTransforms, provideDaffProductMagentoExtraProductTransforms, provideMagentoProductConfig };
|
|
703
|
+
|
|
704
|
+
//# sourceMappingURL=daffodil-product-driver-magento-2.4.7.mjs.map
|