@crystaldesign/product-handler 24.12.0-beta.34 → 24.12.0-beta.36
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/build/cjs/index.js
CHANGED
|
@@ -203,30 +203,38 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
203
203
|
var _loadProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(_ref2) {
|
|
204
204
|
var _this = this,
|
|
205
205
|
_baseProduct,
|
|
206
|
+
_basket$getProductCon,
|
|
206
207
|
_baseProduct2,
|
|
207
|
-
_baseProduct$divaNr,
|
|
208
208
|
_baseProduct3,
|
|
209
|
+
_baseProduct$divaNr,
|
|
210
|
+
_baseProduct4,
|
|
209
211
|
_dataByBasket$price$a,
|
|
210
212
|
_dataByBasket$price,
|
|
211
|
-
_baseProduct4,
|
|
212
|
-
_basket$getProductCon,
|
|
213
213
|
_baseProduct5,
|
|
214
|
-
_dataByBasket$
|
|
214
|
+
_dataByBasket$image,
|
|
215
215
|
_baseProduct6,
|
|
216
|
-
|
|
216
|
+
_dataByBasket$image2D,
|
|
217
217
|
_baseProduct7,
|
|
218
|
+
_dataByBasket$docking,
|
|
219
|
+
_baseProduct8,
|
|
220
|
+
_baseProduct$organiza,
|
|
221
|
+
_baseProduct9,
|
|
218
222
|
_this$organization$pa,
|
|
219
223
|
_this$organization$pa2,
|
|
220
224
|
_baseProduct$createdB,
|
|
221
|
-
_baseProduct8,
|
|
222
|
-
_this$user,
|
|
223
|
-
_baseProduct9,
|
|
224
225
|
_baseProduct10,
|
|
226
|
+
_this$user,
|
|
225
227
|
_baseProduct11,
|
|
226
228
|
_baseProduct12,
|
|
227
229
|
_baseProduct13,
|
|
228
|
-
_baseProduct14
|
|
229
|
-
|
|
230
|
+
_baseProduct14,
|
|
231
|
+
_dataByBasket$orderTe,
|
|
232
|
+
_baseProduct15,
|
|
233
|
+
_dataByBasket$technic,
|
|
234
|
+
_baseProduct16,
|
|
235
|
+
_baseProduct17,
|
|
236
|
+
_baseProduct18;
|
|
237
|
+
var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, products, baseProduct, variantProducts, _baseProduct$configur, _baseProduct$configur2, _basket$OrderSets$map, dataByBasket, oldClassificationData, i, variant, key, oldUniqueHash, configuration, baseData, metaData, metaData_locales, _this$parseMetaDataAn, classificationData, customData, optMap, _ProductHandlerAbstra, shortDescription, shortDescriptionModified, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, usedVariantIds, newVariantPosition, variantPositions, currentVariantPos, _basket$OrderSets$0$C2, differingOPTs, _variantData$, opts, _i, initializedOptMap;
|
|
230
238
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
231
239
|
while (1) switch (_context2.prev = _context2.next) {
|
|
232
240
|
case 0:
|
|
@@ -278,7 +286,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
278
286
|
}
|
|
279
287
|
_context2.next = 17;
|
|
280
288
|
return Promise.all((_baseProduct$configur = (_baseProduct$configur2 = baseProduct.configuration) === null || _baseProduct$configur2 === void 0 ? void 0 : _baseProduct$configur2.OrderSets.map(function (os) {
|
|
281
|
-
return _this.apiGetCatalogData(os.CatalogCodex, currentLang, os.AccountGUID);
|
|
289
|
+
return _this.apiGetCatalogData(os.CatalogCodex, os.CatalogGUID, currentLang, os.AccountGUID);
|
|
282
290
|
})) !== null && _baseProduct$configur !== void 0 ? _baseProduct$configur : []);
|
|
283
291
|
case 17:
|
|
284
292
|
catalogData = _context2.sent;
|
|
@@ -287,7 +295,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
287
295
|
case 20:
|
|
288
296
|
_context2.next = 22;
|
|
289
297
|
return Promise.all((_basket$OrderSets$map = basket === null || basket === void 0 ? void 0 : basket.OrderSets.map(function (os) {
|
|
290
|
-
return _this.apiGetCatalogData(os.CatalogCodex, currentLang, os.AccountGUID);
|
|
298
|
+
return _this.apiGetCatalogData(os.CatalogCodex, os.CatalogGUID, currentLang, os.AccountGUID);
|
|
291
299
|
})) !== null && _basket$OrderSets$map !== void 0 ? _basket$OrderSets$map : []);
|
|
292
300
|
case 22:
|
|
293
301
|
catalogData = _context2.sent;
|
|
@@ -310,21 +318,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
310
318
|
}
|
|
311
319
|
}
|
|
312
320
|
oldUniqueHash = (_baseProduct = baseProduct) === null || _baseProduct === void 0 ? void 0 : _baseProduct.uniqueHash;
|
|
321
|
+
configuration = (_basket$getProductCon = basket === null || basket === void 0 ? void 0 : basket.getProductConfiguration()) !== null && _basket$getProductCon !== void 0 ? _basket$getProductCon : (_baseProduct2 = baseProduct) === null || _baseProduct2 === void 0 ? void 0 : _baseProduct2.configuration;
|
|
313
322
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, dataByBasket), baseProduct), {}, {
|
|
314
|
-
_id: ((
|
|
315
|
-
divaNr: (_baseProduct$divaNr = (
|
|
316
|
-
addedPrice: (_dataByBasket$price$a = dataByBasket === null || dataByBasket === void 0 || (_dataByBasket$price = dataByBasket.price) === null || _dataByBasket$price === void 0 ? void 0 : _dataByBasket$price.addedPrice) !== null && _dataByBasket$price$a !== void 0 ? _dataByBasket$price$a : (
|
|
317
|
-
|
|
318
|
-
|
|
323
|
+
_id: ((_baseProduct3 = baseProduct) === null || _baseProduct3 === void 0 ? void 0 : _baseProduct3._id) || DivaUtils.nanoid(),
|
|
324
|
+
divaNr: (_baseProduct$divaNr = (_baseProduct4 = baseProduct) === null || _baseProduct4 === void 0 ? void 0 : _baseProduct4.divaNr) !== null && _baseProduct$divaNr !== void 0 ? _baseProduct$divaNr : basket === null || basket === void 0 ? void 0 : basket.DivaNr,
|
|
325
|
+
addedPrice: (_dataByBasket$price$a = dataByBasket === null || dataByBasket === void 0 || (_dataByBasket$price = dataByBasket.price) === null || _dataByBasket$price === void 0 ? void 0 : _dataByBasket$price.addedPrice) !== null && _dataByBasket$price$a !== void 0 ? _dataByBasket$price$a : (_baseProduct5 = baseProduct) === null || _baseProduct5 === void 0 ? void 0 : _baseProduct5.addedPrice,
|
|
326
|
+
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (_baseProduct6 = baseProduct) === null || _baseProduct6 === void 0 ? void 0 : _baseProduct6.image,
|
|
327
|
+
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (_baseProduct7 = baseProduct) === null || _baseProduct7 === void 0 ? void 0 : _baseProduct7.image2D,
|
|
328
|
+
configuration: configuration,
|
|
329
|
+
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (_baseProduct8 = baseProduct) === null || _baseProduct8 === void 0 ? void 0 : _baseProduct8.dockingPoints,
|
|
319
330
|
currency: DivaUtils__default["default"].defaultPriceFormat.currency,
|
|
320
|
-
organizationId: (_baseProduct$organiza = (
|
|
331
|
+
organizationId: (_baseProduct$organiza = (_baseProduct9 = baseProduct) === null || _baseProduct9 === void 0 ? void 0 : _baseProduct9.organizationId) !== null && _baseProduct$organiza !== void 0 ? _baseProduct$organiza : this.organization._id,
|
|
321
332
|
inheritedOrganizations: [].concat(_toConsumableArray__default["default"]((_this$organization$pa = (_this$organization$pa2 = this.organization.parentOrganizations) === null || _this$organization$pa2 === void 0 ? void 0 : _this$organization$pa2.map(function (o) {
|
|
322
333
|
return o._id;
|
|
323
334
|
})) !== null && _this$organization$pa !== void 0 ? _this$organization$pa : []), [this.organization._id]),
|
|
324
|
-
createdBy: (_baseProduct$createdB = (
|
|
325
|
-
createdBy_displayText: (
|
|
326
|
-
archived: (
|
|
327
|
-
isTopseller: !!((
|
|
335
|
+
createdBy: (_baseProduct$createdB = (_baseProduct10 = baseProduct) === null || _baseProduct10 === void 0 ? void 0 : _baseProduct10.createdBy) !== null && _baseProduct$createdB !== void 0 ? _baseProduct$createdB : (_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user._id,
|
|
336
|
+
createdBy_displayText: (_baseProduct11 = baseProduct) === null || _baseProduct11 === void 0 ? void 0 : _baseProduct11.createdBy_displayText,
|
|
337
|
+
archived: (_baseProduct12 = baseProduct) !== null && _baseProduct12 !== void 0 && _baseProduct12.archived ? (_baseProduct13 = baseProduct) === null || _baseProduct13 === void 0 ? void 0 : _baseProduct13.archived : false,
|
|
338
|
+
isTopseller: !!((_baseProduct14 = baseProduct) !== null && _baseProduct14 !== void 0 && _baseProduct14.isTopseller),
|
|
339
|
+
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.orderText,
|
|
340
|
+
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.technicalDescription
|
|
328
341
|
});
|
|
329
342
|
metaData = basket === null || basket === void 0 ? void 0 : basket.OrderSets.reduce(function (prev, curr) {
|
|
330
343
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData || {});
|
|
@@ -333,7 +346,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
333
346
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData_locales || {});
|
|
334
347
|
}, {});
|
|
335
348
|
_this$parseMetaDataAn = this.parseMetaDataAndClassificationInformation(metaData, metaData_locales, baseProduct, classificationConfig, customBaseFields), classificationData = _this$parseMetaDataAn.classificationData, customData = _this$parseMetaDataAn.customData, optMap = _this$parseMetaDataAn.optMap;
|
|
336
|
-
baseData.customData = _objectSpread(_objectSpread({}, (
|
|
349
|
+
baseData.customData = _objectSpread(_objectSpread({}, (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.customData), customData);
|
|
337
350
|
|
|
338
351
|
//add livingarea,maincategorie,subcategorie of loaded product if not exists
|
|
339
352
|
classificationConfig = this.checkAndAddClassificationConfigCategories(baseProduct, classificationConfig);
|
|
@@ -350,11 +363,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
350
363
|
optFields = [];
|
|
351
364
|
initialSelectedFields = [];
|
|
352
365
|
if (!dataByBasket.isSet) {
|
|
353
|
-
_context2.next =
|
|
366
|
+
_context2.next = 46;
|
|
354
367
|
break;
|
|
355
368
|
}
|
|
356
369
|
throw new Error('Variants are currently not supported for set products');
|
|
357
|
-
case
|
|
370
|
+
case 46:
|
|
358
371
|
//iterate all existing variant products and add them to the variants
|
|
359
372
|
usedVariantIds = [];
|
|
360
373
|
variantProducts.forEach(function (product) {
|
|
@@ -410,7 +423,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
410
423
|
}
|
|
411
424
|
|
|
412
425
|
//get opt data
|
|
413
|
-
differingOPTs = Object.entries(((
|
|
426
|
+
differingOPTs = Object.entries(((_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 || (_baseProduct18 = _baseProduct18.configuration) === null || _baseProduct18 === void 0 || (_baseProduct18 = _baseProduct18.OrderSets[0].Favorites) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.VariantValues) || []).filter(function (_ref3) {
|
|
414
427
|
var _ref4 = _slicedToArray__default["default"](_ref3, 2);
|
|
415
428
|
_ref4[0];
|
|
416
429
|
var value = _ref4[1];
|
|
@@ -483,7 +496,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
483
496
|
availableLanguages: availableLanguages,
|
|
484
497
|
currentLang: currentLang
|
|
485
498
|
});
|
|
486
|
-
case
|
|
499
|
+
case 59:
|
|
487
500
|
case "end":
|
|
488
501
|
return _context2.stop();
|
|
489
502
|
}
|
|
@@ -852,11 +865,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
852
865
|
var value = _ref17[1];
|
|
853
866
|
return value;
|
|
854
867
|
}).forEach(function (_ref18) {
|
|
855
|
-
var
|
|
868
|
+
var _baseProduct19;
|
|
856
869
|
var _ref19 = _slicedToArray__default["default"](_ref18, 2),
|
|
857
870
|
key = _ref19[0],
|
|
858
871
|
value = _ref19[1];
|
|
859
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
872
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct19 = baseProduct["dc_".concat(key)]) !== null && _baseProduct19 !== void 0 ? _baseProduct19 : {}), {}, {
|
|
860
873
|
opt: value.field
|
|
861
874
|
});
|
|
862
875
|
});
|
|
@@ -1644,14 +1657,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1644
1657
|
}, {
|
|
1645
1658
|
key: "apiGetCatalogData",
|
|
1646
1659
|
value: function () {
|
|
1647
|
-
var _apiGetCatalogData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(catalogCodex, language, accountId) {
|
|
1660
|
+
var _apiGetCatalogData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(catalogCodex, catalogId, language, accountId) {
|
|
1648
1661
|
var _response$CollectionG, _response$Properties, _response$Properties2;
|
|
1649
1662
|
var currentAccountSessionId, fullUrl, response, actCatalogInfoData;
|
|
1650
1663
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context8) {
|
|
1651
1664
|
while (1) switch (_context8.prev = _context8.next) {
|
|
1652
1665
|
case 0:
|
|
1653
1666
|
_context8.next = 2;
|
|
1654
|
-
return this.apiAccountLogin(accountId);
|
|
1667
|
+
return this.apiAccountLogin(accountId, catalogId);
|
|
1655
1668
|
case 2:
|
|
1656
1669
|
currentAccountSessionId = _context8.sent;
|
|
1657
1670
|
if (currentAccountSessionId) {
|
|
@@ -1714,7 +1727,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1714
1727
|
}
|
|
1715
1728
|
}, _callee7, this);
|
|
1716
1729
|
}));
|
|
1717
|
-
function apiGetCatalogData(_x9, _x10, _x11) {
|
|
1730
|
+
function apiGetCatalogData(_x9, _x10, _x11, _x12) {
|
|
1718
1731
|
return _apiGetCatalogData.apply(this, arguments);
|
|
1719
1732
|
}
|
|
1720
1733
|
return apiGetCatalogData;
|
|
@@ -1722,8 +1735,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1722
1735
|
}, {
|
|
1723
1736
|
key: "apiAccountLogin",
|
|
1724
1737
|
value: function () {
|
|
1725
|
-
var _apiAccountLogin = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(accountId) {
|
|
1726
|
-
var fullUrl, response;
|
|
1738
|
+
var _apiAccountLogin = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(accountId, catalogId) {
|
|
1739
|
+
var fullUrl, response, fallbackUrl, fallbackResponse;
|
|
1727
1740
|
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context9) {
|
|
1728
1741
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1729
1742
|
case 0:
|
|
@@ -1749,14 +1762,42 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1749
1762
|
});
|
|
1750
1763
|
case 10:
|
|
1751
1764
|
response = _context9.sent;
|
|
1765
|
+
if (!response.SessionGUID) {
|
|
1766
|
+
_context9.next = 13;
|
|
1767
|
+
break;
|
|
1768
|
+
}
|
|
1752
1769
|
return _context9.abrupt("return", response.SessionGUID);
|
|
1753
|
-
case
|
|
1770
|
+
case 13:
|
|
1771
|
+
fallbackUrl = this.api2 + '?function=JsonAccountLogin&UserRole=v&catalogGuid=' + catalogId;
|
|
1772
|
+
_context9.t5 = fetch;
|
|
1773
|
+
_context9.t6 = fallbackUrl;
|
|
1774
|
+
_context9.next = 18;
|
|
1775
|
+
return this.sessionGuid;
|
|
1776
|
+
case 18:
|
|
1777
|
+
_context9.t7 = _context9.sent;
|
|
1778
|
+
_context9.t8 = {
|
|
1779
|
+
sessionGuid: _context9.t7
|
|
1780
|
+
};
|
|
1781
|
+
_context9.t9 = {
|
|
1782
|
+
headers: _context9.t8
|
|
1783
|
+
};
|
|
1784
|
+
_context9.next = 23;
|
|
1785
|
+
return (0, _context9.t5)(_context9.t6, _context9.t9).then(function (res) {
|
|
1786
|
+
if (res.status !== 200) {
|
|
1787
|
+
throw new Error('Collections not loaded.');
|
|
1788
|
+
}
|
|
1789
|
+
return res.json();
|
|
1790
|
+
});
|
|
1791
|
+
case 23:
|
|
1792
|
+
fallbackResponse = _context9.sent;
|
|
1793
|
+
return _context9.abrupt("return", fallbackResponse.SessionGUID);
|
|
1794
|
+
case 25:
|
|
1754
1795
|
case "end":
|
|
1755
1796
|
return _context9.stop();
|
|
1756
1797
|
}
|
|
1757
1798
|
}, _callee8, this);
|
|
1758
1799
|
}));
|
|
1759
|
-
function apiAccountLogin(
|
|
1800
|
+
function apiAccountLogin(_x13, _x14) {
|
|
1760
1801
|
return _apiAccountLogin.apply(this, arguments);
|
|
1761
1802
|
}
|
|
1762
1803
|
return apiAccountLogin;
|
|
@@ -1806,7 +1847,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1806
1847
|
}
|
|
1807
1848
|
}, _callee9, this, [[1, 10]]);
|
|
1808
1849
|
}));
|
|
1809
|
-
function apiGetProductVariants(
|
|
1850
|
+
function apiGetProductVariants(_x15, _x16) {
|
|
1810
1851
|
return _apiGetProductVariants.apply(this, arguments);
|
|
1811
1852
|
}
|
|
1812
1853
|
return apiGetProductVariants;
|
|
@@ -1877,7 +1918,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1877
1918
|
}
|
|
1878
1919
|
}, _callee10, this, [[4, 14]]);
|
|
1879
1920
|
}));
|
|
1880
|
-
function apiGetProductByFilter(
|
|
1921
|
+
function apiGetProductByFilter(_x17) {
|
|
1881
1922
|
return _apiGetProductByFilter.apply(this, arguments);
|
|
1882
1923
|
}
|
|
1883
1924
|
return apiGetProductByFilter;
|
|
@@ -1929,7 +1970,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1929
1970
|
}
|
|
1930
1971
|
}, _callee11, this, [[3, 12]]);
|
|
1931
1972
|
}));
|
|
1932
|
-
function apiSetCustomFlag(
|
|
1973
|
+
function apiSetCustomFlag(_x18, _x19, _x20, _x21) {
|
|
1933
1974
|
return _apiSetCustomFlag.apply(this, arguments);
|
|
1934
1975
|
}
|
|
1935
1976
|
return apiSetCustomFlag;
|
|
@@ -1985,7 +2026,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1985
2026
|
}
|
|
1986
2027
|
}, _callee12, this);
|
|
1987
2028
|
}));
|
|
1988
|
-
function apiDeleteProducts(
|
|
2029
|
+
function apiDeleteProducts(_x22) {
|
|
1989
2030
|
return _apiDeleteProducts.apply(this, arguments);
|
|
1990
2031
|
}
|
|
1991
2032
|
return apiDeleteProducts;
|
|
@@ -2039,7 +2080,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2039
2080
|
}
|
|
2040
2081
|
}, _callee13, this);
|
|
2041
2082
|
}));
|
|
2042
|
-
function apiLoadProductVariantsGrouped(
|
|
2083
|
+
function apiLoadProductVariantsGrouped(_x23) {
|
|
2043
2084
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2044
2085
|
}
|
|
2045
2086
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2048,13 +2089,37 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2048
2089
|
key: "apiSaveProducts",
|
|
2049
2090
|
value: function () {
|
|
2050
2091
|
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2051
|
-
var fullUrl, response, status;
|
|
2052
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee14$(
|
|
2053
|
-
while (1) switch (
|
|
2092
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, i, responseProducts, _i2, _responseProducts$fin, _loop2, j;
|
|
2093
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
2094
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2054
2095
|
case 0:
|
|
2055
2096
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2056
|
-
|
|
2057
|
-
|
|
2097
|
+
BATCH_SIZE = 40;
|
|
2098
|
+
productsPackages = [];
|
|
2099
|
+
groupIndex = 0;
|
|
2100
|
+
for (i = 0; i < products.length; i++) {
|
|
2101
|
+
if ((groupIndex + 1) * BATCH_SIZE < i) groupIndex++;
|
|
2102
|
+
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2103
|
+
productsPackages[groupIndex].push(products[i]);
|
|
2104
|
+
}
|
|
2105
|
+
responseProducts = [];
|
|
2106
|
+
_i2 = 0;
|
|
2107
|
+
case 7:
|
|
2108
|
+
if (!(_i2 < productsPackages.length)) {
|
|
2109
|
+
_context16.next = 30;
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
if (!productsPackages[_i2].find(function (p) {
|
|
2113
|
+
return !!p.baseProduct;
|
|
2114
|
+
})) {
|
|
2115
|
+
productsPackages[_i2].unshift((_responseProducts$fin = responseProducts.find(function (p) {
|
|
2116
|
+
return p.baseProduct;
|
|
2117
|
+
})) !== null && _responseProducts$fin !== void 0 ? _responseProducts$fin : products.find(function (p) {
|
|
2118
|
+
return p.baseProduct;
|
|
2119
|
+
}));
|
|
2120
|
+
}
|
|
2121
|
+
_context16.prev = 9;
|
|
2122
|
+
_context16.next = 12;
|
|
2058
2123
|
return fetch(fullUrl, {
|
|
2059
2124
|
method: 'PUT',
|
|
2060
2125
|
headers: {
|
|
@@ -2062,7 +2127,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2062
2127
|
'Content-Type': 'application/json'
|
|
2063
2128
|
},
|
|
2064
2129
|
body: JSON.stringify({
|
|
2065
|
-
products:
|
|
2130
|
+
products: productsPackages[_i2],
|
|
2066
2131
|
removedProductIds: removedProductIds,
|
|
2067
2132
|
awaitPDF: awaitPDF
|
|
2068
2133
|
})
|
|
@@ -2073,29 +2138,60 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2073
2138
|
}
|
|
2074
2139
|
return res.json();
|
|
2075
2140
|
});
|
|
2076
|
-
case
|
|
2077
|
-
response =
|
|
2141
|
+
case 12:
|
|
2142
|
+
response = _context16.sent;
|
|
2078
2143
|
if (!response.Error) {
|
|
2079
|
-
|
|
2144
|
+
_context16.next = 15;
|
|
2080
2145
|
break;
|
|
2081
2146
|
}
|
|
2082
2147
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2083
|
-
case
|
|
2084
|
-
|
|
2148
|
+
case 15:
|
|
2149
|
+
_context16.next = 20;
|
|
2085
2150
|
break;
|
|
2086
|
-
case
|
|
2087
|
-
|
|
2088
|
-
|
|
2151
|
+
case 17:
|
|
2152
|
+
_context16.prev = 17;
|
|
2153
|
+
_context16.t0 = _context16["catch"](9);
|
|
2089
2154
|
throw Error(status);
|
|
2090
|
-
case
|
|
2091
|
-
|
|
2092
|
-
|
|
2155
|
+
case 20:
|
|
2156
|
+
_loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(j) {
|
|
2157
|
+
return _regeneratorRuntime__default["default"].wrap(function _loop2$(_context15) {
|
|
2158
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2159
|
+
case 0:
|
|
2160
|
+
if (!responseProducts.find(function (p) {
|
|
2161
|
+
return p._id == response.products[j]._id;
|
|
2162
|
+
})) {
|
|
2163
|
+
responseProducts.push(response.products[j]);
|
|
2164
|
+
}
|
|
2165
|
+
case 1:
|
|
2166
|
+
case "end":
|
|
2167
|
+
return _context15.stop();
|
|
2168
|
+
}
|
|
2169
|
+
}, _loop2);
|
|
2170
|
+
});
|
|
2171
|
+
j = 0;
|
|
2172
|
+
case 22:
|
|
2173
|
+
if (!(j < response.products.length)) {
|
|
2174
|
+
_context16.next = 27;
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2177
|
+
return _context16.delegateYield(_loop2(j), "t1", 24);
|
|
2178
|
+
case 24:
|
|
2179
|
+
j++;
|
|
2180
|
+
_context16.next = 22;
|
|
2181
|
+
break;
|
|
2182
|
+
case 27:
|
|
2183
|
+
_i2++;
|
|
2184
|
+
_context16.next = 7;
|
|
2185
|
+
break;
|
|
2186
|
+
case 30:
|
|
2187
|
+
return _context16.abrupt("return", responseProducts);
|
|
2188
|
+
case 31:
|
|
2093
2189
|
case "end":
|
|
2094
|
-
return
|
|
2190
|
+
return _context16.stop();
|
|
2095
2191
|
}
|
|
2096
|
-
}, _callee14, null, [[
|
|
2192
|
+
}, _callee14, null, [[9, 17]]);
|
|
2097
2193
|
}));
|
|
2098
|
-
function apiSaveProducts(
|
|
2194
|
+
function apiSaveProducts(_x24, _x25, _x26, _x27, _x28) {
|
|
2099
2195
|
return _apiSaveProducts.apply(this, arguments);
|
|
2100
2196
|
}
|
|
2101
2197
|
return apiSaveProducts;
|
|
@@ -2145,7 +2241,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2145
2241
|
return true;
|
|
2146
2242
|
}
|
|
2147
2243
|
var orderlines = (_product$configuratio2 = (_product$configuratio3 = product.configuration) === null || _product$configuratio3 === void 0 ? void 0 : _product$configuratio3.OrderSets[0].OrderLines) !== null && _product$configuratio2 !== void 0 ? _product$configuratio2 : [];
|
|
2148
|
-
var
|
|
2244
|
+
var _loop3 = function _loop3() {
|
|
2149
2245
|
var article = orderlines[i];
|
|
2150
2246
|
var orderLine = orderLines.find(function (ol) {
|
|
2151
2247
|
return ol.ArticleCodex == article.ArticleCodex && catalogCodex == article.CatalogCodex;
|
|
@@ -2156,7 +2252,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2156
2252
|
};
|
|
2157
2253
|
}
|
|
2158
2254
|
if (article.VariantBasketDatas.length) {
|
|
2159
|
-
var
|
|
2255
|
+
var _loop4 = function _loop4() {
|
|
2160
2256
|
var varinatValue = article.VariantBasketDatas[j];
|
|
2161
2257
|
if (!varinatData.find(function (vb) {
|
|
2162
2258
|
return vb.OPT == varinatValue['OPT'] && vb.OPV == varinatValue['OPV'];
|
|
@@ -2170,14 +2266,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2170
2266
|
},
|
|
2171
2267
|
_ret2;
|
|
2172
2268
|
for (var j = 0; j < article.VariantBasketDatas.length; j++) {
|
|
2173
|
-
_ret2 =
|
|
2269
|
+
_ret2 = _loop4();
|
|
2174
2270
|
if (_ret2) return _ret2.v;
|
|
2175
2271
|
}
|
|
2176
2272
|
}
|
|
2177
2273
|
},
|
|
2178
2274
|
_ret;
|
|
2179
2275
|
for (var i = 0; i < orderlines.length; i++) {
|
|
2180
|
-
_ret =
|
|
2276
|
+
_ret = _loop3();
|
|
2181
2277
|
if (_ret) return _ret.v;
|
|
2182
2278
|
}
|
|
2183
2279
|
return true;
|
|
@@ -2255,7 +2351,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2255
2351
|
//calculate defaultShortDescription from template string
|
|
2256
2352
|
var shortDescriptionTemplate = (_configurationData$sh = configurationData === null || configurationData === void 0 ? void 0 : configurationData.shortDescription) !== null && _configurationData$sh !== void 0 ? _configurationData$sh : '${modelName} ${subCategory} ${mainColor}';
|
|
2257
2353
|
var parts = shortDescriptionTemplate.split(/\${|}/);
|
|
2258
|
-
var
|
|
2354
|
+
var _loop5 = function _loop5() {
|
|
2259
2355
|
var _classificationConfig2, _classificationConfig4, _value;
|
|
2260
2356
|
var field = parts[i];
|
|
2261
2357
|
var value;
|
|
@@ -2287,7 +2383,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2287
2383
|
shortDescriptionTemplate = shortDescriptionTemplate.replace("${".concat(field, "}"), (_value = value) !== null && _value !== void 0 ? _value : '');
|
|
2288
2384
|
};
|
|
2289
2385
|
for (var i = 1; i < parts.length; i = i + 2) {
|
|
2290
|
-
|
|
2386
|
+
_loop5();
|
|
2291
2387
|
}
|
|
2292
2388
|
|
|
2293
2389
|
//as long as shortDescription is not modified by user, autocalc it
|
|
@@ -2321,9 +2417,9 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2321
2417
|
key: "loadSelectOptions",
|
|
2322
2418
|
value: function () {
|
|
2323
2419
|
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(sessionGuid, dataSource, additionalFilter) {
|
|
2324
|
-
var values, apiUrl, i, apiResult,
|
|
2325
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee15$(
|
|
2326
|
-
while (1) switch (
|
|
2420
|
+
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2421
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context17) {
|
|
2422
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2327
2423
|
case 0:
|
|
2328
2424
|
values = [];
|
|
2329
2425
|
apiUrl = dataSource.url;
|
|
@@ -2332,7 +2428,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2332
2428
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2333
2429
|
}
|
|
2334
2430
|
}
|
|
2335
|
-
|
|
2431
|
+
_context17.next = 5;
|
|
2336
2432
|
return fetch(apiUrl, {
|
|
2337
2433
|
headers: {
|
|
2338
2434
|
sessionGuid: sessionGuid
|
|
@@ -2344,26 +2440,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2344
2440
|
return res.json();
|
|
2345
2441
|
});
|
|
2346
2442
|
case 5:
|
|
2347
|
-
apiResult =
|
|
2443
|
+
apiResult = _context17.sent;
|
|
2348
2444
|
if (dataSource.useKey) {
|
|
2349
2445
|
apiResult = apiResult[dataSource.useKey];
|
|
2350
2446
|
}
|
|
2351
|
-
for (
|
|
2352
|
-
value = apiResult[
|
|
2353
|
-
text = apiResult[
|
|
2447
|
+
for (_i3 = 0; _i3 < apiResult.length; _i3++) {
|
|
2448
|
+
value = apiResult[_i3][dataSource.fieldValueMapping];
|
|
2449
|
+
text = apiResult[_i3][dataSource.fieldDescriptionMapping];
|
|
2354
2450
|
values.push({
|
|
2355
2451
|
value: value,
|
|
2356
2452
|
text: text
|
|
2357
2453
|
});
|
|
2358
2454
|
}
|
|
2359
|
-
return
|
|
2455
|
+
return _context17.abrupt("return", values);
|
|
2360
2456
|
case 9:
|
|
2361
2457
|
case "end":
|
|
2362
|
-
return
|
|
2458
|
+
return _context17.stop();
|
|
2363
2459
|
}
|
|
2364
2460
|
}, _callee15);
|
|
2365
2461
|
}));
|
|
2366
|
-
function loadSelectOptions(
|
|
2462
|
+
function loadSelectOptions(_x29, _x30, _x31) {
|
|
2367
2463
|
return _loadSelectOptions.apply(this, arguments);
|
|
2368
2464
|
}
|
|
2369
2465
|
return loadSelectOptions;
|
|
@@ -2380,7 +2476,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2380
2476
|
key: "getVariantBasketDatasByOrderlines",
|
|
2381
2477
|
value: function getVariantBasketDatasByOrderlines(orderLines, catalogData) {
|
|
2382
2478
|
var variantBasketDatas = [];
|
|
2383
|
-
var
|
|
2479
|
+
var _loop6 = function _loop6() {
|
|
2384
2480
|
var ol = orderLines[i];
|
|
2385
2481
|
var catalog = catalogData.find(function (c) {
|
|
2386
2482
|
return c.codex === ol.CatalogCodex;
|
|
@@ -2402,7 +2498,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2402
2498
|
}
|
|
2403
2499
|
};
|
|
2404
2500
|
for (var i = 0; i < orderLines.length; i++) {
|
|
2405
|
-
if (
|
|
2501
|
+
if (_loop6()) continue;
|
|
2406
2502
|
}
|
|
2407
2503
|
return variantBasketDatas;
|
|
2408
2504
|
}
|
package/build/esm/index.js
CHANGED
|
@@ -185,30 +185,38 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
185
185
|
var _loadProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
|
|
186
186
|
var _this = this,
|
|
187
187
|
_baseProduct,
|
|
188
|
+
_basket$getProductCon,
|
|
188
189
|
_baseProduct2,
|
|
189
|
-
_baseProduct$divaNr,
|
|
190
190
|
_baseProduct3,
|
|
191
|
+
_baseProduct$divaNr,
|
|
192
|
+
_baseProduct4,
|
|
191
193
|
_dataByBasket$price$a,
|
|
192
194
|
_dataByBasket$price,
|
|
193
|
-
_baseProduct4,
|
|
194
|
-
_basket$getProductCon,
|
|
195
195
|
_baseProduct5,
|
|
196
|
-
_dataByBasket$
|
|
196
|
+
_dataByBasket$image,
|
|
197
197
|
_baseProduct6,
|
|
198
|
-
|
|
198
|
+
_dataByBasket$image2D,
|
|
199
199
|
_baseProduct7,
|
|
200
|
+
_dataByBasket$docking,
|
|
201
|
+
_baseProduct8,
|
|
202
|
+
_baseProduct$organiza,
|
|
203
|
+
_baseProduct9,
|
|
200
204
|
_this$organization$pa,
|
|
201
205
|
_this$organization$pa2,
|
|
202
206
|
_baseProduct$createdB,
|
|
203
|
-
_baseProduct8,
|
|
204
|
-
_this$user,
|
|
205
|
-
_baseProduct9,
|
|
206
207
|
_baseProduct10,
|
|
208
|
+
_this$user,
|
|
207
209
|
_baseProduct11,
|
|
208
210
|
_baseProduct12,
|
|
209
211
|
_baseProduct13,
|
|
210
|
-
_baseProduct14
|
|
211
|
-
|
|
212
|
+
_baseProduct14,
|
|
213
|
+
_dataByBasket$orderTe,
|
|
214
|
+
_baseProduct15,
|
|
215
|
+
_dataByBasket$technic,
|
|
216
|
+
_baseProduct16,
|
|
217
|
+
_baseProduct17,
|
|
218
|
+
_baseProduct18;
|
|
219
|
+
var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, products, baseProduct, variantProducts, _baseProduct$configur, _baseProduct$configur2, _basket$OrderSets$map, dataByBasket, oldClassificationData, i, variant, key, oldUniqueHash, configuration, baseData, metaData, metaData_locales, _this$parseMetaDataAn, classificationData, customData, optMap, _ProductHandlerAbstra, shortDescription, shortDescriptionModified, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, usedVariantIds, newVariantPosition, variantPositions, currentVariantPos, _basket$OrderSets$0$C2, differingOPTs, _variantData$, opts, _i, initializedOptMap;
|
|
212
220
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
213
221
|
while (1) switch (_context2.prev = _context2.next) {
|
|
214
222
|
case 0:
|
|
@@ -260,7 +268,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
260
268
|
}
|
|
261
269
|
_context2.next = 17;
|
|
262
270
|
return Promise.all((_baseProduct$configur = (_baseProduct$configur2 = baseProduct.configuration) === null || _baseProduct$configur2 === void 0 ? void 0 : _baseProduct$configur2.OrderSets.map(function (os) {
|
|
263
|
-
return _this.apiGetCatalogData(os.CatalogCodex, currentLang, os.AccountGUID);
|
|
271
|
+
return _this.apiGetCatalogData(os.CatalogCodex, os.CatalogGUID, currentLang, os.AccountGUID);
|
|
264
272
|
})) !== null && _baseProduct$configur !== void 0 ? _baseProduct$configur : []);
|
|
265
273
|
case 17:
|
|
266
274
|
catalogData = _context2.sent;
|
|
@@ -269,7 +277,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
269
277
|
case 20:
|
|
270
278
|
_context2.next = 22;
|
|
271
279
|
return Promise.all((_basket$OrderSets$map = basket === null || basket === void 0 ? void 0 : basket.OrderSets.map(function (os) {
|
|
272
|
-
return _this.apiGetCatalogData(os.CatalogCodex, currentLang, os.AccountGUID);
|
|
280
|
+
return _this.apiGetCatalogData(os.CatalogCodex, os.CatalogGUID, currentLang, os.AccountGUID);
|
|
273
281
|
})) !== null && _basket$OrderSets$map !== void 0 ? _basket$OrderSets$map : []);
|
|
274
282
|
case 22:
|
|
275
283
|
catalogData = _context2.sent;
|
|
@@ -292,21 +300,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
292
300
|
}
|
|
293
301
|
}
|
|
294
302
|
oldUniqueHash = (_baseProduct = baseProduct) === null || _baseProduct === void 0 ? void 0 : _baseProduct.uniqueHash;
|
|
303
|
+
configuration = (_basket$getProductCon = basket === null || basket === void 0 ? void 0 : basket.getProductConfiguration()) !== null && _basket$getProductCon !== void 0 ? _basket$getProductCon : (_baseProduct2 = baseProduct) === null || _baseProduct2 === void 0 ? void 0 : _baseProduct2.configuration;
|
|
295
304
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, dataByBasket), baseProduct), {}, {
|
|
296
|
-
_id: ((
|
|
297
|
-
divaNr: (_baseProduct$divaNr = (
|
|
298
|
-
addedPrice: (_dataByBasket$price$a = dataByBasket === null || dataByBasket === void 0 || (_dataByBasket$price = dataByBasket.price) === null || _dataByBasket$price === void 0 ? void 0 : _dataByBasket$price.addedPrice) !== null && _dataByBasket$price$a !== void 0 ? _dataByBasket$price$a : (
|
|
299
|
-
|
|
300
|
-
|
|
305
|
+
_id: ((_baseProduct3 = baseProduct) === null || _baseProduct3 === void 0 ? void 0 : _baseProduct3._id) || nanoid(),
|
|
306
|
+
divaNr: (_baseProduct$divaNr = (_baseProduct4 = baseProduct) === null || _baseProduct4 === void 0 ? void 0 : _baseProduct4.divaNr) !== null && _baseProduct$divaNr !== void 0 ? _baseProduct$divaNr : basket === null || basket === void 0 ? void 0 : basket.DivaNr,
|
|
307
|
+
addedPrice: (_dataByBasket$price$a = dataByBasket === null || dataByBasket === void 0 || (_dataByBasket$price = dataByBasket.price) === null || _dataByBasket$price === void 0 ? void 0 : _dataByBasket$price.addedPrice) !== null && _dataByBasket$price$a !== void 0 ? _dataByBasket$price$a : (_baseProduct5 = baseProduct) === null || _baseProduct5 === void 0 ? void 0 : _baseProduct5.addedPrice,
|
|
308
|
+
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (_baseProduct6 = baseProduct) === null || _baseProduct6 === void 0 ? void 0 : _baseProduct6.image,
|
|
309
|
+
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (_baseProduct7 = baseProduct) === null || _baseProduct7 === void 0 ? void 0 : _baseProduct7.image2D,
|
|
310
|
+
configuration: configuration,
|
|
311
|
+
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (_baseProduct8 = baseProduct) === null || _baseProduct8 === void 0 ? void 0 : _baseProduct8.dockingPoints,
|
|
301
312
|
currency: DivaUtils.defaultPriceFormat.currency,
|
|
302
|
-
organizationId: (_baseProduct$organiza = (
|
|
313
|
+
organizationId: (_baseProduct$organiza = (_baseProduct9 = baseProduct) === null || _baseProduct9 === void 0 ? void 0 : _baseProduct9.organizationId) !== null && _baseProduct$organiza !== void 0 ? _baseProduct$organiza : this.organization._id,
|
|
303
314
|
inheritedOrganizations: [].concat(_toConsumableArray((_this$organization$pa = (_this$organization$pa2 = this.organization.parentOrganizations) === null || _this$organization$pa2 === void 0 ? void 0 : _this$organization$pa2.map(function (o) {
|
|
304
315
|
return o._id;
|
|
305
316
|
})) !== null && _this$organization$pa !== void 0 ? _this$organization$pa : []), [this.organization._id]),
|
|
306
|
-
createdBy: (_baseProduct$createdB = (
|
|
307
|
-
createdBy_displayText: (
|
|
308
|
-
archived: (
|
|
309
|
-
isTopseller: !!((
|
|
317
|
+
createdBy: (_baseProduct$createdB = (_baseProduct10 = baseProduct) === null || _baseProduct10 === void 0 ? void 0 : _baseProduct10.createdBy) !== null && _baseProduct$createdB !== void 0 ? _baseProduct$createdB : (_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user._id,
|
|
318
|
+
createdBy_displayText: (_baseProduct11 = baseProduct) === null || _baseProduct11 === void 0 ? void 0 : _baseProduct11.createdBy_displayText,
|
|
319
|
+
archived: (_baseProduct12 = baseProduct) !== null && _baseProduct12 !== void 0 && _baseProduct12.archived ? (_baseProduct13 = baseProduct) === null || _baseProduct13 === void 0 ? void 0 : _baseProduct13.archived : false,
|
|
320
|
+
isTopseller: !!((_baseProduct14 = baseProduct) !== null && _baseProduct14 !== void 0 && _baseProduct14.isTopseller),
|
|
321
|
+
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.orderText,
|
|
322
|
+
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.technicalDescription
|
|
310
323
|
});
|
|
311
324
|
metaData = basket === null || basket === void 0 ? void 0 : basket.OrderSets.reduce(function (prev, curr) {
|
|
312
325
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData || {});
|
|
@@ -315,7 +328,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
315
328
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData_locales || {});
|
|
316
329
|
}, {});
|
|
317
330
|
_this$parseMetaDataAn = this.parseMetaDataAndClassificationInformation(metaData, metaData_locales, baseProduct, classificationConfig, customBaseFields), classificationData = _this$parseMetaDataAn.classificationData, customData = _this$parseMetaDataAn.customData, optMap = _this$parseMetaDataAn.optMap;
|
|
318
|
-
baseData.customData = _objectSpread(_objectSpread({}, (
|
|
331
|
+
baseData.customData = _objectSpread(_objectSpread({}, (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.customData), customData);
|
|
319
332
|
|
|
320
333
|
//add livingarea,maincategorie,subcategorie of loaded product if not exists
|
|
321
334
|
classificationConfig = this.checkAndAddClassificationConfigCategories(baseProduct, classificationConfig);
|
|
@@ -332,11 +345,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
332
345
|
optFields = [];
|
|
333
346
|
initialSelectedFields = [];
|
|
334
347
|
if (!dataByBasket.isSet) {
|
|
335
|
-
_context2.next =
|
|
348
|
+
_context2.next = 46;
|
|
336
349
|
break;
|
|
337
350
|
}
|
|
338
351
|
throw new Error('Variants are currently not supported for set products');
|
|
339
|
-
case
|
|
352
|
+
case 46:
|
|
340
353
|
//iterate all existing variant products and add them to the variants
|
|
341
354
|
usedVariantIds = [];
|
|
342
355
|
variantProducts.forEach(function (product) {
|
|
@@ -392,7 +405,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
392
405
|
}
|
|
393
406
|
|
|
394
407
|
//get opt data
|
|
395
|
-
differingOPTs = Object.entries(((
|
|
408
|
+
differingOPTs = Object.entries(((_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 || (_baseProduct18 = _baseProduct18.configuration) === null || _baseProduct18 === void 0 || (_baseProduct18 = _baseProduct18.OrderSets[0].Favorites) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.VariantValues) || []).filter(function (_ref3) {
|
|
396
409
|
var _ref4 = _slicedToArray(_ref3, 2);
|
|
397
410
|
_ref4[0];
|
|
398
411
|
var value = _ref4[1];
|
|
@@ -465,7 +478,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
465
478
|
availableLanguages: availableLanguages,
|
|
466
479
|
currentLang: currentLang
|
|
467
480
|
});
|
|
468
|
-
case
|
|
481
|
+
case 59:
|
|
469
482
|
case "end":
|
|
470
483
|
return _context2.stop();
|
|
471
484
|
}
|
|
@@ -834,11 +847,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
834
847
|
var value = _ref17[1];
|
|
835
848
|
return value;
|
|
836
849
|
}).forEach(function (_ref18) {
|
|
837
|
-
var
|
|
850
|
+
var _baseProduct19;
|
|
838
851
|
var _ref19 = _slicedToArray(_ref18, 2),
|
|
839
852
|
key = _ref19[0],
|
|
840
853
|
value = _ref19[1];
|
|
841
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
854
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct19 = baseProduct["dc_".concat(key)]) !== null && _baseProduct19 !== void 0 ? _baseProduct19 : {}), {}, {
|
|
842
855
|
opt: value.field
|
|
843
856
|
});
|
|
844
857
|
});
|
|
@@ -1626,14 +1639,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1626
1639
|
}, {
|
|
1627
1640
|
key: "apiGetCatalogData",
|
|
1628
1641
|
value: function () {
|
|
1629
|
-
var _apiGetCatalogData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(catalogCodex, language, accountId) {
|
|
1642
|
+
var _apiGetCatalogData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(catalogCodex, catalogId, language, accountId) {
|
|
1630
1643
|
var _response$CollectionG, _response$Properties, _response$Properties2;
|
|
1631
1644
|
var currentAccountSessionId, fullUrl, response, actCatalogInfoData;
|
|
1632
1645
|
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
1633
1646
|
while (1) switch (_context8.prev = _context8.next) {
|
|
1634
1647
|
case 0:
|
|
1635
1648
|
_context8.next = 2;
|
|
1636
|
-
return this.apiAccountLogin(accountId);
|
|
1649
|
+
return this.apiAccountLogin(accountId, catalogId);
|
|
1637
1650
|
case 2:
|
|
1638
1651
|
currentAccountSessionId = _context8.sent;
|
|
1639
1652
|
if (currentAccountSessionId) {
|
|
@@ -1696,7 +1709,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1696
1709
|
}
|
|
1697
1710
|
}, _callee7, this);
|
|
1698
1711
|
}));
|
|
1699
|
-
function apiGetCatalogData(_x9, _x10, _x11) {
|
|
1712
|
+
function apiGetCatalogData(_x9, _x10, _x11, _x12) {
|
|
1700
1713
|
return _apiGetCatalogData.apply(this, arguments);
|
|
1701
1714
|
}
|
|
1702
1715
|
return apiGetCatalogData;
|
|
@@ -1704,8 +1717,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1704
1717
|
}, {
|
|
1705
1718
|
key: "apiAccountLogin",
|
|
1706
1719
|
value: function () {
|
|
1707
|
-
var _apiAccountLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(accountId) {
|
|
1708
|
-
var fullUrl, response;
|
|
1720
|
+
var _apiAccountLogin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(accountId, catalogId) {
|
|
1721
|
+
var fullUrl, response, fallbackUrl, fallbackResponse;
|
|
1709
1722
|
return _regeneratorRuntime.wrap(function _callee8$(_context9) {
|
|
1710
1723
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1711
1724
|
case 0:
|
|
@@ -1731,14 +1744,42 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1731
1744
|
});
|
|
1732
1745
|
case 10:
|
|
1733
1746
|
response = _context9.sent;
|
|
1747
|
+
if (!response.SessionGUID) {
|
|
1748
|
+
_context9.next = 13;
|
|
1749
|
+
break;
|
|
1750
|
+
}
|
|
1734
1751
|
return _context9.abrupt("return", response.SessionGUID);
|
|
1735
|
-
case
|
|
1752
|
+
case 13:
|
|
1753
|
+
fallbackUrl = this.api2 + '?function=JsonAccountLogin&UserRole=v&catalogGuid=' + catalogId;
|
|
1754
|
+
_context9.t5 = fetch;
|
|
1755
|
+
_context9.t6 = fallbackUrl;
|
|
1756
|
+
_context9.next = 18;
|
|
1757
|
+
return this.sessionGuid;
|
|
1758
|
+
case 18:
|
|
1759
|
+
_context9.t7 = _context9.sent;
|
|
1760
|
+
_context9.t8 = {
|
|
1761
|
+
sessionGuid: _context9.t7
|
|
1762
|
+
};
|
|
1763
|
+
_context9.t9 = {
|
|
1764
|
+
headers: _context9.t8
|
|
1765
|
+
};
|
|
1766
|
+
_context9.next = 23;
|
|
1767
|
+
return (0, _context9.t5)(_context9.t6, _context9.t9).then(function (res) {
|
|
1768
|
+
if (res.status !== 200) {
|
|
1769
|
+
throw new Error('Collections not loaded.');
|
|
1770
|
+
}
|
|
1771
|
+
return res.json();
|
|
1772
|
+
});
|
|
1773
|
+
case 23:
|
|
1774
|
+
fallbackResponse = _context9.sent;
|
|
1775
|
+
return _context9.abrupt("return", fallbackResponse.SessionGUID);
|
|
1776
|
+
case 25:
|
|
1736
1777
|
case "end":
|
|
1737
1778
|
return _context9.stop();
|
|
1738
1779
|
}
|
|
1739
1780
|
}, _callee8, this);
|
|
1740
1781
|
}));
|
|
1741
|
-
function apiAccountLogin(
|
|
1782
|
+
function apiAccountLogin(_x13, _x14) {
|
|
1742
1783
|
return _apiAccountLogin.apply(this, arguments);
|
|
1743
1784
|
}
|
|
1744
1785
|
return apiAccountLogin;
|
|
@@ -1788,7 +1829,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1788
1829
|
}
|
|
1789
1830
|
}, _callee9, this, [[1, 10]]);
|
|
1790
1831
|
}));
|
|
1791
|
-
function apiGetProductVariants(
|
|
1832
|
+
function apiGetProductVariants(_x15, _x16) {
|
|
1792
1833
|
return _apiGetProductVariants.apply(this, arguments);
|
|
1793
1834
|
}
|
|
1794
1835
|
return apiGetProductVariants;
|
|
@@ -1859,7 +1900,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1859
1900
|
}
|
|
1860
1901
|
}, _callee10, this, [[4, 14]]);
|
|
1861
1902
|
}));
|
|
1862
|
-
function apiGetProductByFilter(
|
|
1903
|
+
function apiGetProductByFilter(_x17) {
|
|
1863
1904
|
return _apiGetProductByFilter.apply(this, arguments);
|
|
1864
1905
|
}
|
|
1865
1906
|
return apiGetProductByFilter;
|
|
@@ -1911,7 +1952,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1911
1952
|
}
|
|
1912
1953
|
}, _callee11, this, [[3, 12]]);
|
|
1913
1954
|
}));
|
|
1914
|
-
function apiSetCustomFlag(
|
|
1955
|
+
function apiSetCustomFlag(_x18, _x19, _x20, _x21) {
|
|
1915
1956
|
return _apiSetCustomFlag.apply(this, arguments);
|
|
1916
1957
|
}
|
|
1917
1958
|
return apiSetCustomFlag;
|
|
@@ -1967,7 +2008,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1967
2008
|
}
|
|
1968
2009
|
}, _callee12, this);
|
|
1969
2010
|
}));
|
|
1970
|
-
function apiDeleteProducts(
|
|
2011
|
+
function apiDeleteProducts(_x22) {
|
|
1971
2012
|
return _apiDeleteProducts.apply(this, arguments);
|
|
1972
2013
|
}
|
|
1973
2014
|
return apiDeleteProducts;
|
|
@@ -2021,7 +2062,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2021
2062
|
}
|
|
2022
2063
|
}, _callee13, this);
|
|
2023
2064
|
}));
|
|
2024
|
-
function apiLoadProductVariantsGrouped(
|
|
2065
|
+
function apiLoadProductVariantsGrouped(_x23) {
|
|
2025
2066
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2026
2067
|
}
|
|
2027
2068
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2030,13 +2071,37 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2030
2071
|
key: "apiSaveProducts",
|
|
2031
2072
|
value: function () {
|
|
2032
2073
|
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2033
|
-
var fullUrl, response, status;
|
|
2034
|
-
return _regeneratorRuntime.wrap(function _callee14$(
|
|
2035
|
-
while (1) switch (
|
|
2074
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, i, responseProducts, _i2, _responseProducts$fin, _loop2, j;
|
|
2075
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
2076
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2036
2077
|
case 0:
|
|
2037
2078
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2038
|
-
|
|
2039
|
-
|
|
2079
|
+
BATCH_SIZE = 40;
|
|
2080
|
+
productsPackages = [];
|
|
2081
|
+
groupIndex = 0;
|
|
2082
|
+
for (i = 0; i < products.length; i++) {
|
|
2083
|
+
if ((groupIndex + 1) * BATCH_SIZE < i) groupIndex++;
|
|
2084
|
+
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2085
|
+
productsPackages[groupIndex].push(products[i]);
|
|
2086
|
+
}
|
|
2087
|
+
responseProducts = [];
|
|
2088
|
+
_i2 = 0;
|
|
2089
|
+
case 7:
|
|
2090
|
+
if (!(_i2 < productsPackages.length)) {
|
|
2091
|
+
_context16.next = 30;
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
if (!productsPackages[_i2].find(function (p) {
|
|
2095
|
+
return !!p.baseProduct;
|
|
2096
|
+
})) {
|
|
2097
|
+
productsPackages[_i2].unshift((_responseProducts$fin = responseProducts.find(function (p) {
|
|
2098
|
+
return p.baseProduct;
|
|
2099
|
+
})) !== null && _responseProducts$fin !== void 0 ? _responseProducts$fin : products.find(function (p) {
|
|
2100
|
+
return p.baseProduct;
|
|
2101
|
+
}));
|
|
2102
|
+
}
|
|
2103
|
+
_context16.prev = 9;
|
|
2104
|
+
_context16.next = 12;
|
|
2040
2105
|
return fetch(fullUrl, {
|
|
2041
2106
|
method: 'PUT',
|
|
2042
2107
|
headers: {
|
|
@@ -2044,7 +2109,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2044
2109
|
'Content-Type': 'application/json'
|
|
2045
2110
|
},
|
|
2046
2111
|
body: JSON.stringify({
|
|
2047
|
-
products:
|
|
2112
|
+
products: productsPackages[_i2],
|
|
2048
2113
|
removedProductIds: removedProductIds,
|
|
2049
2114
|
awaitPDF: awaitPDF
|
|
2050
2115
|
})
|
|
@@ -2055,29 +2120,60 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2055
2120
|
}
|
|
2056
2121
|
return res.json();
|
|
2057
2122
|
});
|
|
2058
|
-
case
|
|
2059
|
-
response =
|
|
2123
|
+
case 12:
|
|
2124
|
+
response = _context16.sent;
|
|
2060
2125
|
if (!response.Error) {
|
|
2061
|
-
|
|
2126
|
+
_context16.next = 15;
|
|
2062
2127
|
break;
|
|
2063
2128
|
}
|
|
2064
2129
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2065
|
-
case
|
|
2066
|
-
|
|
2130
|
+
case 15:
|
|
2131
|
+
_context16.next = 20;
|
|
2067
2132
|
break;
|
|
2068
|
-
case
|
|
2069
|
-
|
|
2070
|
-
|
|
2133
|
+
case 17:
|
|
2134
|
+
_context16.prev = 17;
|
|
2135
|
+
_context16.t0 = _context16["catch"](9);
|
|
2071
2136
|
throw Error(status);
|
|
2072
|
-
case
|
|
2073
|
-
|
|
2074
|
-
|
|
2137
|
+
case 20:
|
|
2138
|
+
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(j) {
|
|
2139
|
+
return _regeneratorRuntime.wrap(function _loop2$(_context15) {
|
|
2140
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2141
|
+
case 0:
|
|
2142
|
+
if (!responseProducts.find(function (p) {
|
|
2143
|
+
return p._id == response.products[j]._id;
|
|
2144
|
+
})) {
|
|
2145
|
+
responseProducts.push(response.products[j]);
|
|
2146
|
+
}
|
|
2147
|
+
case 1:
|
|
2148
|
+
case "end":
|
|
2149
|
+
return _context15.stop();
|
|
2150
|
+
}
|
|
2151
|
+
}, _loop2);
|
|
2152
|
+
});
|
|
2153
|
+
j = 0;
|
|
2154
|
+
case 22:
|
|
2155
|
+
if (!(j < response.products.length)) {
|
|
2156
|
+
_context16.next = 27;
|
|
2157
|
+
break;
|
|
2158
|
+
}
|
|
2159
|
+
return _context16.delegateYield(_loop2(j), "t1", 24);
|
|
2160
|
+
case 24:
|
|
2161
|
+
j++;
|
|
2162
|
+
_context16.next = 22;
|
|
2163
|
+
break;
|
|
2164
|
+
case 27:
|
|
2165
|
+
_i2++;
|
|
2166
|
+
_context16.next = 7;
|
|
2167
|
+
break;
|
|
2168
|
+
case 30:
|
|
2169
|
+
return _context16.abrupt("return", responseProducts);
|
|
2170
|
+
case 31:
|
|
2075
2171
|
case "end":
|
|
2076
|
-
return
|
|
2172
|
+
return _context16.stop();
|
|
2077
2173
|
}
|
|
2078
|
-
}, _callee14, null, [[
|
|
2174
|
+
}, _callee14, null, [[9, 17]]);
|
|
2079
2175
|
}));
|
|
2080
|
-
function apiSaveProducts(
|
|
2176
|
+
function apiSaveProducts(_x24, _x25, _x26, _x27, _x28) {
|
|
2081
2177
|
return _apiSaveProducts.apply(this, arguments);
|
|
2082
2178
|
}
|
|
2083
2179
|
return apiSaveProducts;
|
|
@@ -2127,7 +2223,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2127
2223
|
return true;
|
|
2128
2224
|
}
|
|
2129
2225
|
var orderlines = (_product$configuratio2 = (_product$configuratio3 = product.configuration) === null || _product$configuratio3 === void 0 ? void 0 : _product$configuratio3.OrderSets[0].OrderLines) !== null && _product$configuratio2 !== void 0 ? _product$configuratio2 : [];
|
|
2130
|
-
var
|
|
2226
|
+
var _loop3 = function _loop3() {
|
|
2131
2227
|
var article = orderlines[i];
|
|
2132
2228
|
var orderLine = orderLines.find(function (ol) {
|
|
2133
2229
|
return ol.ArticleCodex == article.ArticleCodex && catalogCodex == article.CatalogCodex;
|
|
@@ -2138,7 +2234,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2138
2234
|
};
|
|
2139
2235
|
}
|
|
2140
2236
|
if (article.VariantBasketDatas.length) {
|
|
2141
|
-
var
|
|
2237
|
+
var _loop4 = function _loop4() {
|
|
2142
2238
|
var varinatValue = article.VariantBasketDatas[j];
|
|
2143
2239
|
if (!varinatData.find(function (vb) {
|
|
2144
2240
|
return vb.OPT == varinatValue['OPT'] && vb.OPV == varinatValue['OPV'];
|
|
@@ -2152,14 +2248,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2152
2248
|
},
|
|
2153
2249
|
_ret2;
|
|
2154
2250
|
for (var j = 0; j < article.VariantBasketDatas.length; j++) {
|
|
2155
|
-
_ret2 =
|
|
2251
|
+
_ret2 = _loop4();
|
|
2156
2252
|
if (_ret2) return _ret2.v;
|
|
2157
2253
|
}
|
|
2158
2254
|
}
|
|
2159
2255
|
},
|
|
2160
2256
|
_ret;
|
|
2161
2257
|
for (var i = 0; i < orderlines.length; i++) {
|
|
2162
|
-
_ret =
|
|
2258
|
+
_ret = _loop3();
|
|
2163
2259
|
if (_ret) return _ret.v;
|
|
2164
2260
|
}
|
|
2165
2261
|
return true;
|
|
@@ -2237,7 +2333,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2237
2333
|
//calculate defaultShortDescription from template string
|
|
2238
2334
|
var shortDescriptionTemplate = (_configurationData$sh = configurationData === null || configurationData === void 0 ? void 0 : configurationData.shortDescription) !== null && _configurationData$sh !== void 0 ? _configurationData$sh : '${modelName} ${subCategory} ${mainColor}';
|
|
2239
2335
|
var parts = shortDescriptionTemplate.split(/\${|}/);
|
|
2240
|
-
var
|
|
2336
|
+
var _loop5 = function _loop5() {
|
|
2241
2337
|
var _classificationConfig2, _classificationConfig4, _value;
|
|
2242
2338
|
var field = parts[i];
|
|
2243
2339
|
var value;
|
|
@@ -2269,7 +2365,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2269
2365
|
shortDescriptionTemplate = shortDescriptionTemplate.replace("${".concat(field, "}"), (_value = value) !== null && _value !== void 0 ? _value : '');
|
|
2270
2366
|
};
|
|
2271
2367
|
for (var i = 1; i < parts.length; i = i + 2) {
|
|
2272
|
-
|
|
2368
|
+
_loop5();
|
|
2273
2369
|
}
|
|
2274
2370
|
|
|
2275
2371
|
//as long as shortDescription is not modified by user, autocalc it
|
|
@@ -2303,9 +2399,9 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2303
2399
|
key: "loadSelectOptions",
|
|
2304
2400
|
value: function () {
|
|
2305
2401
|
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(sessionGuid, dataSource, additionalFilter) {
|
|
2306
|
-
var values, apiUrl, i, apiResult,
|
|
2307
|
-
return _regeneratorRuntime.wrap(function _callee15$(
|
|
2308
|
-
while (1) switch (
|
|
2402
|
+
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2403
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context17) {
|
|
2404
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2309
2405
|
case 0:
|
|
2310
2406
|
values = [];
|
|
2311
2407
|
apiUrl = dataSource.url;
|
|
@@ -2314,7 +2410,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2314
2410
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2315
2411
|
}
|
|
2316
2412
|
}
|
|
2317
|
-
|
|
2413
|
+
_context17.next = 5;
|
|
2318
2414
|
return fetch(apiUrl, {
|
|
2319
2415
|
headers: {
|
|
2320
2416
|
sessionGuid: sessionGuid
|
|
@@ -2326,26 +2422,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2326
2422
|
return res.json();
|
|
2327
2423
|
});
|
|
2328
2424
|
case 5:
|
|
2329
|
-
apiResult =
|
|
2425
|
+
apiResult = _context17.sent;
|
|
2330
2426
|
if (dataSource.useKey) {
|
|
2331
2427
|
apiResult = apiResult[dataSource.useKey];
|
|
2332
2428
|
}
|
|
2333
|
-
for (
|
|
2334
|
-
value = apiResult[
|
|
2335
|
-
text = apiResult[
|
|
2429
|
+
for (_i3 = 0; _i3 < apiResult.length; _i3++) {
|
|
2430
|
+
value = apiResult[_i3][dataSource.fieldValueMapping];
|
|
2431
|
+
text = apiResult[_i3][dataSource.fieldDescriptionMapping];
|
|
2336
2432
|
values.push({
|
|
2337
2433
|
value: value,
|
|
2338
2434
|
text: text
|
|
2339
2435
|
});
|
|
2340
2436
|
}
|
|
2341
|
-
return
|
|
2437
|
+
return _context17.abrupt("return", values);
|
|
2342
2438
|
case 9:
|
|
2343
2439
|
case "end":
|
|
2344
|
-
return
|
|
2440
|
+
return _context17.stop();
|
|
2345
2441
|
}
|
|
2346
2442
|
}, _callee15);
|
|
2347
2443
|
}));
|
|
2348
|
-
function loadSelectOptions(
|
|
2444
|
+
function loadSelectOptions(_x29, _x30, _x31) {
|
|
2349
2445
|
return _loadSelectOptions.apply(this, arguments);
|
|
2350
2446
|
}
|
|
2351
2447
|
return loadSelectOptions;
|
|
@@ -2362,7 +2458,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2362
2458
|
key: "getVariantBasketDatasByOrderlines",
|
|
2363
2459
|
value: function getVariantBasketDatasByOrderlines(orderLines, catalogData) {
|
|
2364
2460
|
var variantBasketDatas = [];
|
|
2365
|
-
var
|
|
2461
|
+
var _loop6 = function _loop6() {
|
|
2366
2462
|
var ol = orderLines[i];
|
|
2367
2463
|
var catalog = catalogData.find(function (c) {
|
|
2368
2464
|
return c.codex === ol.CatalogCodex;
|
|
@@ -2384,7 +2480,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2384
2480
|
}
|
|
2385
2481
|
};
|
|
2386
2482
|
for (var i = 0; i < orderLines.length; i++) {
|
|
2387
|
-
if (
|
|
2483
|
+
if (_loop6()) continue;
|
|
2388
2484
|
}
|
|
2389
2485
|
return variantBasketDatas;
|
|
2390
2486
|
}
|
|
@@ -151,7 +151,7 @@ export declare class ProductHandlerAbstract {
|
|
|
151
151
|
products: ProductDataAbstract[];
|
|
152
152
|
awaitPDF?: boolean;
|
|
153
153
|
removedProducts?: string[];
|
|
154
|
-
}): Promise<any>;
|
|
154
|
+
}): Promise<any[]>;
|
|
155
155
|
private setFirstVariant;
|
|
156
156
|
/**
|
|
157
157
|
* Calculates the inital state of one varinat data entry
|
|
@@ -218,7 +218,7 @@ export declare class ProductHandlerAbstract {
|
|
|
218
218
|
private apiRemoveMedia;
|
|
219
219
|
private getHeaders;
|
|
220
220
|
apiGetProducts(divanrOrID: string): Promise<any[]>;
|
|
221
|
-
apiGetCatalogData(catalogCodex: string, language: string, accountId: string): Promise<any>;
|
|
221
|
+
apiGetCatalogData(catalogCodex: string, catalogId: string, language: string, accountId: string): Promise<any>;
|
|
222
222
|
private apiAccountLogin;
|
|
223
223
|
apiGetProductVariants(id: string, full?: boolean): Promise<any[]>;
|
|
224
224
|
apiGetProductByFilter(filter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAoB,aAAa,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAIzE,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,KAAK,EACL,iBAAiB,EACjB,aAAa,EACb,aAAa,EAEb,mBAAmB,EACnB,KAAK,EACL,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,cA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
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/product-handler",
|
|
3
|
-
"version": "24.12.0-beta.
|
|
3
|
+
"version": "24.12.0-beta.36",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@crystaldesign/basket-model": "*",
|
|
6
6
|
"@crystaldesign/diva-utils": "*"
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"classnames": "^2.5.1"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "9ec2aeebddb19e4915a832c4252740c7f49c7d30"
|
|
16
16
|
}
|