@crystaldesign/product-handler 24.15.0-beta.2 → 24.15.0-beta.21
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
|
@@ -58,6 +58,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
58
58
|
_defineProperty__default["default"](this, "_apiKey", void 0);
|
|
59
59
|
_defineProperty__default["default"](this, "_catalogService", '');
|
|
60
60
|
_defineProperty__default["default"](this, "_mediaService", '');
|
|
61
|
+
_defineProperty__default["default"](this, "_basketService", '');
|
|
61
62
|
_defineProperty__default["default"](this, "_api2", '');
|
|
62
63
|
_defineProperty__default["default"](this, "_sessionGuid", '');
|
|
63
64
|
_defineProperty__default["default"](this, "_organization", {});
|
|
@@ -78,6 +79,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
78
79
|
set: function set(val) {
|
|
79
80
|
this._catalogService = val;
|
|
80
81
|
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "basketService",
|
|
84
|
+
get: function get() {
|
|
85
|
+
return this._basketService;
|
|
86
|
+
},
|
|
87
|
+
set: function set(val) {
|
|
88
|
+
this._basketService = val;
|
|
89
|
+
}
|
|
81
90
|
}, {
|
|
82
91
|
key: "mediaService",
|
|
83
92
|
get: function get() {
|
|
@@ -205,43 +214,44 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
205
214
|
_baseProduct,
|
|
206
215
|
_basket$getProductCon,
|
|
207
216
|
_baseProduct2,
|
|
208
|
-
_baseProduct3,
|
|
209
217
|
_baseProduct$divaNr,
|
|
218
|
+
_baseProduct3,
|
|
210
219
|
_baseProduct4,
|
|
220
|
+
_baseProduct5,
|
|
211
221
|
_dataByBasket$price$a,
|
|
212
222
|
_dataByBasket$price,
|
|
213
|
-
_baseProduct5,
|
|
214
|
-
_dataByBasket$image,
|
|
215
223
|
_baseProduct6,
|
|
216
|
-
_dataByBasket$
|
|
224
|
+
_dataByBasket$image,
|
|
217
225
|
_baseProduct7,
|
|
218
|
-
_dataByBasket$
|
|
226
|
+
_dataByBasket$image2D,
|
|
219
227
|
_baseProduct8,
|
|
220
|
-
|
|
228
|
+
_dataByBasket$docking,
|
|
221
229
|
_baseProduct9,
|
|
230
|
+
_baseProduct$organiza,
|
|
231
|
+
_baseProduct10,
|
|
222
232
|
_this$organization$pa,
|
|
223
233
|
_this$organization$pa2,
|
|
224
234
|
_baseProduct$createdB,
|
|
225
|
-
_baseProduct10,
|
|
226
|
-
_this$user,
|
|
227
235
|
_baseProduct11,
|
|
236
|
+
_this$user,
|
|
228
237
|
_baseProduct12,
|
|
229
238
|
_baseProduct13,
|
|
230
239
|
_baseProduct14,
|
|
231
|
-
_dataByBasket$orderTe,
|
|
232
240
|
_baseProduct15,
|
|
233
|
-
_dataByBasket$
|
|
241
|
+
_dataByBasket$orderTe,
|
|
234
242
|
_baseProduct16,
|
|
243
|
+
_dataByBasket$technic,
|
|
235
244
|
_baseProduct17,
|
|
245
|
+
_baseProduct18,
|
|
236
246
|
_ref3,
|
|
237
247
|
_baseProduct$configur3,
|
|
238
|
-
|
|
239
|
-
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;
|
|
248
|
+
_baseProduct19;
|
|
249
|
+
var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, _baseProduct$configur, _baseProduct$configur2, _basket$OrderSets$map, dataByBasket, oldClassificationData, i, variant, key, oldUniqueHash, configuration, myDivaNr, 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;
|
|
240
250
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
241
251
|
while (1) switch (_context2.prev = _context2.next) {
|
|
242
252
|
case 0:
|
|
243
|
-
basket = _ref2.basket, divaNr = _ref2.divaNr, catalogData = _ref2.catalogData, productData = _ref2.productData, classificationFields = _ref2.classificationFields, fieldConfiguration = _ref2.fieldConfiguration, customBaseFields = _ref2.customBaseFields, classificationConfig = _ref2.classificationConfig, _ref2$availableLangua = _ref2.availableLanguages, availableLanguages = _ref2$availableLangua === void 0 ? ['de', 'fr', 'it', 'en'] : _ref2$availableLangua, _ref2$currentLang = _ref2.currentLang, currentLang = _ref2$currentLang === void 0 ? 'de' : _ref2$currentLang;
|
|
244
|
-
if (!(!productData && !divaNr)) {
|
|
253
|
+
basket = _ref2.basket, divaNr = _ref2.divaNr, catalogData = _ref2.catalogData, productData = _ref2.productData, classificationFields = _ref2.classificationFields, fieldConfiguration = _ref2.fieldConfiguration, customBaseFields = _ref2.customBaseFields, classificationConfig = _ref2.classificationConfig, _ref2$availableLangua = _ref2.availableLanguages, availableLanguages = _ref2$availableLangua === void 0 ? ['de', 'fr', 'it', 'en'] : _ref2$availableLangua, _ref2$currentLang = _ref2.currentLang, currentLang = _ref2$currentLang === void 0 ? 'de' : _ref2$currentLang, getUniqueNewDivaNr = _ref2.getUniqueNewDivaNr;
|
|
254
|
+
if (!(!productData && !divaNr && !getUniqueNewDivaNr)) {
|
|
245
255
|
_context2.next = 3;
|
|
246
256
|
break;
|
|
247
257
|
}
|
|
@@ -321,25 +331,35 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
321
331
|
}
|
|
322
332
|
oldUniqueHash = (_baseProduct = baseProduct) === null || _baseProduct === void 0 ? void 0 : _baseProduct.uniqueHash;
|
|
323
333
|
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;
|
|
334
|
+
myDivaNr = (_baseProduct$divaNr = (_baseProduct3 = baseProduct) === null || _baseProduct3 === void 0 ? void 0 : _baseProduct3.divaNr) !== null && _baseProduct$divaNr !== void 0 ? _baseProduct$divaNr : basket === null || basket === void 0 ? void 0 : basket.DivaNr;
|
|
335
|
+
if (!(!((_baseProduct4 = baseProduct) !== null && _baseProduct4 !== void 0 && _baseProduct4.divaNr) && getUniqueNewDivaNr)) {
|
|
336
|
+
_context2.next = 35;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
_context2.next = 34;
|
|
340
|
+
return this.apiGetUniqueDivaNr();
|
|
341
|
+
case 34:
|
|
342
|
+
myDivaNr = _context2.sent;
|
|
343
|
+
case 35:
|
|
324
344
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, dataByBasket), baseProduct), {}, {
|
|
325
|
-
_id: ((
|
|
326
|
-
divaNr:
|
|
327
|
-
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 : (
|
|
328
|
-
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (
|
|
329
|
-
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (
|
|
345
|
+
_id: ((_baseProduct5 = baseProduct) === null || _baseProduct5 === void 0 ? void 0 : _baseProduct5._id) || DivaUtils.nanoid(),
|
|
346
|
+
divaNr: myDivaNr,
|
|
347
|
+
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 : (_baseProduct6 = baseProduct) === null || _baseProduct6 === void 0 ? void 0 : _baseProduct6.addedPrice,
|
|
348
|
+
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (_baseProduct7 = baseProduct) === null || _baseProduct7 === void 0 ? void 0 : _baseProduct7.image,
|
|
349
|
+
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (_baseProduct8 = baseProduct) === null || _baseProduct8 === void 0 ? void 0 : _baseProduct8.image2D,
|
|
330
350
|
configuration: configuration,
|
|
331
|
-
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (
|
|
351
|
+
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (_baseProduct9 = baseProduct) === null || _baseProduct9 === void 0 ? void 0 : _baseProduct9.dockingPoints,
|
|
332
352
|
currency: DivaUtils__default["default"].defaultPriceFormat.currency,
|
|
333
|
-
organizationId: (_baseProduct$organiza = (
|
|
353
|
+
organizationId: (_baseProduct$organiza = (_baseProduct10 = baseProduct) === null || _baseProduct10 === void 0 ? void 0 : _baseProduct10.organizationId) !== null && _baseProduct$organiza !== void 0 ? _baseProduct$organiza : this.organization._id,
|
|
334
354
|
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) {
|
|
335
355
|
return o._id;
|
|
336
356
|
})) !== null && _this$organization$pa !== void 0 ? _this$organization$pa : []), [this.organization._id]),
|
|
337
|
-
createdBy: (_baseProduct$createdB = (
|
|
338
|
-
createdBy_displayText: (
|
|
339
|
-
archived: (
|
|
340
|
-
isTopseller: !!((
|
|
341
|
-
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (
|
|
342
|
-
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (
|
|
357
|
+
createdBy: (_baseProduct$createdB = (_baseProduct11 = baseProduct) === null || _baseProduct11 === void 0 ? void 0 : _baseProduct11.createdBy) !== null && _baseProduct$createdB !== void 0 ? _baseProduct$createdB : (_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user._id,
|
|
358
|
+
createdBy_displayText: (_baseProduct12 = baseProduct) === null || _baseProduct12 === void 0 ? void 0 : _baseProduct12.createdBy_displayText,
|
|
359
|
+
archived: (_baseProduct13 = baseProduct) !== null && _baseProduct13 !== void 0 && _baseProduct13.archived ? (_baseProduct14 = baseProduct) === null || _baseProduct14 === void 0 ? void 0 : _baseProduct14.archived : false,
|
|
360
|
+
isTopseller: !!((_baseProduct15 = baseProduct) !== null && _baseProduct15 !== void 0 && _baseProduct15.isTopseller),
|
|
361
|
+
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.orderText,
|
|
362
|
+
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.technicalDescription
|
|
343
363
|
});
|
|
344
364
|
metaData = basket === null || basket === void 0 ? void 0 : basket.OrderSets.reduce(function (prev, curr) {
|
|
345
365
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData || {});
|
|
@@ -348,7 +368,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
348
368
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData_locales || {});
|
|
349
369
|
}, {});
|
|
350
370
|
_this$parseMetaDataAn = this.parseMetaDataAndClassificationInformation(metaData, metaData_locales, baseProduct, classificationConfig, customBaseFields), classificationData = _this$parseMetaDataAn.classificationData, customData = _this$parseMetaDataAn.customData, optMap = _this$parseMetaDataAn.optMap;
|
|
351
|
-
baseData.customData = _objectSpread(_objectSpread({}, (
|
|
371
|
+
baseData.customData = _objectSpread(_objectSpread({}, (_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.customData), customData);
|
|
352
372
|
|
|
353
373
|
//add livingarea,maincategorie,subcategorie of loaded product if not exists
|
|
354
374
|
classificationConfig = this.checkAndAddClassificationConfigCategories(baseProduct, classificationConfig);
|
|
@@ -365,11 +385,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
365
385
|
optFields = [];
|
|
366
386
|
initialSelectedFields = [];
|
|
367
387
|
if (!dataByBasket.isSet) {
|
|
368
|
-
_context2.next =
|
|
388
|
+
_context2.next = 51;
|
|
369
389
|
break;
|
|
370
390
|
}
|
|
371
391
|
throw new Error('Variants are currently not supported for set products');
|
|
372
|
-
case
|
|
392
|
+
case 51:
|
|
373
393
|
//iterate all existing variant products and add them to the variants
|
|
374
394
|
usedVariantIds = [];
|
|
375
395
|
variantProducts.forEach(function (product) {
|
|
@@ -425,7 +445,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
425
445
|
}
|
|
426
446
|
|
|
427
447
|
//get opt data
|
|
428
|
-
differingOPTs = Object.entries(((_ref3 = (_baseProduct$configur3 = (
|
|
448
|
+
differingOPTs = Object.entries(((_ref3 = (_baseProduct$configur3 = (_baseProduct19 = baseProduct) === null || _baseProduct19 === void 0 ? void 0 : _baseProduct19.configuration) !== null && _baseProduct$configur3 !== void 0 ? _baseProduct$configur3 : basket) === null || _ref3 === void 0 || (_ref3 = _ref3.OrderSets[0].Favorites) === null || _ref3 === void 0 ? void 0 : _ref3.VariantValues) || []).filter(function (_ref4) {
|
|
429
449
|
var _ref5 = _slicedToArray__default["default"](_ref4, 2);
|
|
430
450
|
_ref5[0];
|
|
431
451
|
var value = _ref5[1];
|
|
@@ -500,7 +520,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
500
520
|
availableLanguages: availableLanguages,
|
|
501
521
|
currentLang: currentLang
|
|
502
522
|
});
|
|
503
|
-
case
|
|
523
|
+
case 64:
|
|
504
524
|
case "end":
|
|
505
525
|
return _context2.stop();
|
|
506
526
|
}
|
|
@@ -876,11 +896,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
876
896
|
var value = _ref18[1];
|
|
877
897
|
return value;
|
|
878
898
|
}).forEach(function (_ref19) {
|
|
879
|
-
var
|
|
899
|
+
var _baseProduct20;
|
|
880
900
|
var _ref20 = _slicedToArray__default["default"](_ref19, 2),
|
|
881
901
|
key = _ref20[0],
|
|
882
902
|
value = _ref20[1];
|
|
883
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
903
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct20 = baseProduct["dc_".concat(key)]) !== null && _baseProduct20 !== void 0 ? _baseProduct20 : {}), {}, {
|
|
884
904
|
opt: value.field
|
|
885
905
|
});
|
|
886
906
|
});
|
|
@@ -1975,12 +1995,62 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1975
1995
|
return apiMarkAsFavorite;
|
|
1976
1996
|
}()
|
|
1977
1997
|
}, {
|
|
1978
|
-
key: "
|
|
1998
|
+
key: "apiGetUniqueDivaNr",
|
|
1979
1999
|
value: function () {
|
|
1980
|
-
var
|
|
1981
|
-
var
|
|
2000
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12() {
|
|
2001
|
+
var _res5;
|
|
2002
|
+
var fullUrl, res, resData;
|
|
1982
2003
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context14) {
|
|
1983
2004
|
while (1) switch (_context14.prev = _context14.next) {
|
|
2005
|
+
case 0:
|
|
2006
|
+
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
2007
|
+
_context14.prev = 1;
|
|
2008
|
+
_context14.next = 4;
|
|
2009
|
+
return axios__default["default"].get(fullUrl.toString(), {
|
|
2010
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2011
|
+
'Content-Type': 'application/json'
|
|
2012
|
+
})
|
|
2013
|
+
});
|
|
2014
|
+
case 4:
|
|
2015
|
+
res = _context14.sent;
|
|
2016
|
+
_context14.next = 7;
|
|
2017
|
+
return res.data;
|
|
2018
|
+
case 7:
|
|
2019
|
+
resData = _context14.sent;
|
|
2020
|
+
_context14.next = 13;
|
|
2021
|
+
break;
|
|
2022
|
+
case 10:
|
|
2023
|
+
_context14.prev = 10;
|
|
2024
|
+
_context14.t0 = _context14["catch"](1);
|
|
2025
|
+
throw new Error('Error on activate product', {
|
|
2026
|
+
cause: _context14.t0
|
|
2027
|
+
});
|
|
2028
|
+
case 13:
|
|
2029
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 200)) {
|
|
2030
|
+
_context14.next = 15;
|
|
2031
|
+
break;
|
|
2032
|
+
}
|
|
2033
|
+
return _context14.abrupt("return", resData.divaNr);
|
|
2034
|
+
case 15:
|
|
2035
|
+
throw new Error(resData.error);
|
|
2036
|
+
case 16:
|
|
2037
|
+
case "end":
|
|
2038
|
+
return _context14.stop();
|
|
2039
|
+
}
|
|
2040
|
+
}, _callee12, this, [[1, 10]]);
|
|
2041
|
+
}));
|
|
2042
|
+
function apiGetUniqueDivaNr() {
|
|
2043
|
+
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
2044
|
+
}
|
|
2045
|
+
return apiGetUniqueDivaNr;
|
|
2046
|
+
}()
|
|
2047
|
+
}, {
|
|
2048
|
+
key: "apiDeleteProducts",
|
|
2049
|
+
value: function () {
|
|
2050
|
+
var _apiDeleteProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(products) {
|
|
2051
|
+
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2052
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
|
|
2053
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1984
2054
|
case 0:
|
|
1985
2055
|
fullUrl = this.catalogService + '/products';
|
|
1986
2056
|
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
@@ -1991,7 +2061,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1991
2061
|
i = 0;
|
|
1992
2062
|
case 5:
|
|
1993
2063
|
if (!(i < productsInChunks.length)) {
|
|
1994
|
-
|
|
2064
|
+
_context15.next = 13;
|
|
1995
2065
|
break;
|
|
1996
2066
|
}
|
|
1997
2067
|
promises = productsInChunks[i].map(function (p) {
|
|
@@ -2013,17 +2083,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2013
2083
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
2014
2084
|
dontRenderForm: true
|
|
2015
2085
|
});
|
|
2016
|
-
|
|
2086
|
+
_context15.next = 10;
|
|
2017
2087
|
return Promise.all(promises);
|
|
2018
2088
|
case 10:
|
|
2019
2089
|
i++;
|
|
2020
|
-
|
|
2090
|
+
_context15.next = 5;
|
|
2021
2091
|
break;
|
|
2022
2092
|
case 13:
|
|
2023
2093
|
case "end":
|
|
2024
|
-
return
|
|
2094
|
+
return _context15.stop();
|
|
2025
2095
|
}
|
|
2026
|
-
},
|
|
2096
|
+
}, _callee13, this);
|
|
2027
2097
|
}));
|
|
2028
2098
|
function apiDeleteProducts(_x20) {
|
|
2029
2099
|
return _apiDeleteProducts.apply(this, arguments);
|
|
@@ -2042,13 +2112,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2042
2112
|
}, {
|
|
2043
2113
|
key: "apiLoadProductVariantsGrouped",
|
|
2044
2114
|
value: function () {
|
|
2045
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2115
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(_ref45) {
|
|
2046
2116
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2047
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2048
|
-
while (1) switch (
|
|
2117
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
2118
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2049
2119
|
case 0:
|
|
2050
2120
|
limit = _ref45.limit, skip = _ref45.skip, fields = _ref45.fields, _ref45$search = _ref45.search, search = _ref45$search === void 0 ? [] : _ref45$search, sort = _ref45.sort, favorites = _ref45.favorites, abortController = _ref45.abortController;
|
|
2051
|
-
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils__default["default"].fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search ? '&search=' + DivaUtils__default["default"].fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils__default["default"].fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
2121
|
+
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils__default["default"].fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search.length ? '&search=' + DivaUtils__default["default"].fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils__default["default"].fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
2052
2122
|
headers = {
|
|
2053
2123
|
'Content-Type': 'application/json'
|
|
2054
2124
|
};
|
|
@@ -2069,15 +2139,15 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2069
2139
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2070
2140
|
});
|
|
2071
2141
|
});
|
|
2072
|
-
|
|
2142
|
+
_context16.next = 7;
|
|
2073
2143
|
return promise;
|
|
2074
2144
|
case 7:
|
|
2075
|
-
return
|
|
2145
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2076
2146
|
case 8:
|
|
2077
2147
|
case "end":
|
|
2078
|
-
return
|
|
2148
|
+
return _context16.stop();
|
|
2079
2149
|
}
|
|
2080
|
-
},
|
|
2150
|
+
}, _callee14, this);
|
|
2081
2151
|
}));
|
|
2082
2152
|
function apiLoadProductVariantsGrouped(_x21) {
|
|
2083
2153
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
@@ -2087,10 +2157,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2087
2157
|
}, {
|
|
2088
2158
|
key: "apiSaveProducts",
|
|
2089
2159
|
value: function () {
|
|
2090
|
-
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2160
|
+
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2091
2161
|
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, _i2, _loop3, j;
|
|
2092
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2093
|
-
while (1) switch (
|
|
2162
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context18) {
|
|
2163
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2094
2164
|
case 0:
|
|
2095
2165
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2096
2166
|
BATCH_SIZE = 40;
|
|
@@ -2099,34 +2169,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2099
2169
|
i = 0;
|
|
2100
2170
|
case 5:
|
|
2101
2171
|
if (!(i < products.length)) {
|
|
2102
|
-
|
|
2172
|
+
_context18.next = 15;
|
|
2103
2173
|
break;
|
|
2104
2174
|
}
|
|
2105
2175
|
if (!products[i].baseProduct) {
|
|
2106
|
-
|
|
2176
|
+
_context18.next = 9;
|
|
2107
2177
|
break;
|
|
2108
2178
|
}
|
|
2109
2179
|
baseProduct = products[i];
|
|
2110
|
-
return
|
|
2180
|
+
return _context18.abrupt("continue", 12);
|
|
2111
2181
|
case 9:
|
|
2112
2182
|
if (BATCH_SIZE < ((_productsPackages$gro = (_productsPackages$gro2 = productsPackages[groupIndex]) === null || _productsPackages$gro2 === void 0 ? void 0 : _productsPackages$gro2.length) !== null && _productsPackages$gro !== void 0 ? _productsPackages$gro : 0)) groupIndex++;
|
|
2113
2183
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2114
2184
|
productsPackages[groupIndex].push(products[i]);
|
|
2115
2185
|
case 12:
|
|
2116
2186
|
i++;
|
|
2117
|
-
|
|
2187
|
+
_context18.next = 5;
|
|
2118
2188
|
break;
|
|
2119
2189
|
case 15:
|
|
2120
2190
|
responseProducts = [];
|
|
2121
2191
|
_i2 = 0;
|
|
2122
2192
|
case 17:
|
|
2123
2193
|
if (!(_i2 < productsPackages.length)) {
|
|
2124
|
-
|
|
2194
|
+
_context18.next = 40;
|
|
2125
2195
|
break;
|
|
2126
2196
|
}
|
|
2127
2197
|
if (baseProduct) productsPackages[_i2].unshift(baseProduct);
|
|
2128
|
-
|
|
2129
|
-
|
|
2198
|
+
_context18.prev = 19;
|
|
2199
|
+
_context18.next = 22;
|
|
2130
2200
|
return fetch(fullUrl, {
|
|
2131
2201
|
method: 'PUT',
|
|
2132
2202
|
headers: {
|
|
@@ -2146,23 +2216,23 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2146
2216
|
return res.json();
|
|
2147
2217
|
});
|
|
2148
2218
|
case 22:
|
|
2149
|
-
response =
|
|
2219
|
+
response = _context18.sent;
|
|
2150
2220
|
if (!response.Error) {
|
|
2151
|
-
|
|
2221
|
+
_context18.next = 25;
|
|
2152
2222
|
break;
|
|
2153
2223
|
}
|
|
2154
2224
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2155
2225
|
case 25:
|
|
2156
|
-
|
|
2226
|
+
_context18.next = 30;
|
|
2157
2227
|
break;
|
|
2158
2228
|
case 27:
|
|
2159
|
-
|
|
2160
|
-
|
|
2229
|
+
_context18.prev = 27;
|
|
2230
|
+
_context18.t0 = _context18["catch"](19);
|
|
2161
2231
|
throw Error(status);
|
|
2162
2232
|
case 30:
|
|
2163
2233
|
_loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3(j) {
|
|
2164
|
-
return _regeneratorRuntime__default["default"].wrap(function _loop3$(
|
|
2165
|
-
while (1) switch (
|
|
2234
|
+
return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context17) {
|
|
2235
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2166
2236
|
case 0:
|
|
2167
2237
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2168
2238
|
if (!responseProducts.find(function (p) {
|
|
@@ -2172,32 +2242,32 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2172
2242
|
}
|
|
2173
2243
|
case 2:
|
|
2174
2244
|
case "end":
|
|
2175
|
-
return
|
|
2245
|
+
return _context17.stop();
|
|
2176
2246
|
}
|
|
2177
2247
|
}, _loop3);
|
|
2178
2248
|
});
|
|
2179
2249
|
j = 0;
|
|
2180
2250
|
case 32:
|
|
2181
2251
|
if (!(j < response.products.length)) {
|
|
2182
|
-
|
|
2252
|
+
_context18.next = 37;
|
|
2183
2253
|
break;
|
|
2184
2254
|
}
|
|
2185
|
-
return
|
|
2255
|
+
return _context18.delegateYield(_loop3(j), "t1", 34);
|
|
2186
2256
|
case 34:
|
|
2187
2257
|
j++;
|
|
2188
|
-
|
|
2258
|
+
_context18.next = 32;
|
|
2189
2259
|
break;
|
|
2190
2260
|
case 37:
|
|
2191
2261
|
_i2++;
|
|
2192
|
-
|
|
2262
|
+
_context18.next = 17;
|
|
2193
2263
|
break;
|
|
2194
2264
|
case 40:
|
|
2195
|
-
return
|
|
2265
|
+
return _context18.abrupt("return", responseProducts);
|
|
2196
2266
|
case 41:
|
|
2197
2267
|
case "end":
|
|
2198
|
-
return
|
|
2268
|
+
return _context18.stop();
|
|
2199
2269
|
}
|
|
2200
|
-
},
|
|
2270
|
+
}, _callee15, null, [[19, 27]]);
|
|
2201
2271
|
}));
|
|
2202
2272
|
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2203
2273
|
return _apiSaveProducts.apply(this, arguments);
|
|
@@ -2424,10 +2494,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2424
2494
|
}, {
|
|
2425
2495
|
key: "loadSelectOptions",
|
|
2426
2496
|
value: function () {
|
|
2427
|
-
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2497
|
+
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2428
2498
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2429
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2430
|
-
while (1) switch (
|
|
2499
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context19) {
|
|
2500
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2431
2501
|
case 0:
|
|
2432
2502
|
values = [];
|
|
2433
2503
|
apiUrl = dataSource.url;
|
|
@@ -2436,7 +2506,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2436
2506
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2437
2507
|
}
|
|
2438
2508
|
}
|
|
2439
|
-
|
|
2509
|
+
_context19.next = 5;
|
|
2440
2510
|
return fetch(apiUrl, {
|
|
2441
2511
|
headers: {
|
|
2442
2512
|
sessionGuid: sessionGuid
|
|
@@ -2448,7 +2518,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2448
2518
|
return res.json();
|
|
2449
2519
|
});
|
|
2450
2520
|
case 5:
|
|
2451
|
-
apiResult =
|
|
2521
|
+
apiResult = _context19.sent;
|
|
2452
2522
|
if (dataSource.useKey) {
|
|
2453
2523
|
apiResult = apiResult[dataSource.useKey];
|
|
2454
2524
|
}
|
|
@@ -2460,12 +2530,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2460
2530
|
text: text
|
|
2461
2531
|
});
|
|
2462
2532
|
}
|
|
2463
|
-
return
|
|
2533
|
+
return _context19.abrupt("return", values);
|
|
2464
2534
|
case 9:
|
|
2465
2535
|
case "end":
|
|
2466
|
-
return
|
|
2536
|
+
return _context19.stop();
|
|
2467
2537
|
}
|
|
2468
|
-
},
|
|
2538
|
+
}, _callee16);
|
|
2469
2539
|
}));
|
|
2470
2540
|
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2471
2541
|
return _loadSelectOptions.apply(this, arguments);
|
|
@@ -2501,7 +2571,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2501
2571
|
OPV: v.OPV,
|
|
2502
2572
|
OPTName: opt.Name,
|
|
2503
2573
|
OPVName: opv.Name,
|
|
2504
|
-
OPVImage: catalog.mediaUrl + opv.Image
|
|
2574
|
+
OPVImage: opv.Image ? catalog.mediaUrl + opv.Image : undefined
|
|
2505
2575
|
});
|
|
2506
2576
|
}
|
|
2507
2577
|
}
|
package/build/esm/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
40
40
|
_defineProperty(this, "_apiKey", void 0);
|
|
41
41
|
_defineProperty(this, "_catalogService", '');
|
|
42
42
|
_defineProperty(this, "_mediaService", '');
|
|
43
|
+
_defineProperty(this, "_basketService", '');
|
|
43
44
|
_defineProperty(this, "_api2", '');
|
|
44
45
|
_defineProperty(this, "_sessionGuid", '');
|
|
45
46
|
_defineProperty(this, "_organization", {});
|
|
@@ -60,6 +61,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
60
61
|
set: function set(val) {
|
|
61
62
|
this._catalogService = val;
|
|
62
63
|
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "basketService",
|
|
66
|
+
get: function get() {
|
|
67
|
+
return this._basketService;
|
|
68
|
+
},
|
|
69
|
+
set: function set(val) {
|
|
70
|
+
this._basketService = val;
|
|
71
|
+
}
|
|
63
72
|
}, {
|
|
64
73
|
key: "mediaService",
|
|
65
74
|
get: function get() {
|
|
@@ -187,43 +196,44 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
187
196
|
_baseProduct,
|
|
188
197
|
_basket$getProductCon,
|
|
189
198
|
_baseProduct2,
|
|
190
|
-
_baseProduct3,
|
|
191
199
|
_baseProduct$divaNr,
|
|
200
|
+
_baseProduct3,
|
|
192
201
|
_baseProduct4,
|
|
202
|
+
_baseProduct5,
|
|
193
203
|
_dataByBasket$price$a,
|
|
194
204
|
_dataByBasket$price,
|
|
195
|
-
_baseProduct5,
|
|
196
|
-
_dataByBasket$image,
|
|
197
205
|
_baseProduct6,
|
|
198
|
-
_dataByBasket$
|
|
206
|
+
_dataByBasket$image,
|
|
199
207
|
_baseProduct7,
|
|
200
|
-
_dataByBasket$
|
|
208
|
+
_dataByBasket$image2D,
|
|
201
209
|
_baseProduct8,
|
|
202
|
-
|
|
210
|
+
_dataByBasket$docking,
|
|
203
211
|
_baseProduct9,
|
|
212
|
+
_baseProduct$organiza,
|
|
213
|
+
_baseProduct10,
|
|
204
214
|
_this$organization$pa,
|
|
205
215
|
_this$organization$pa2,
|
|
206
216
|
_baseProduct$createdB,
|
|
207
|
-
_baseProduct10,
|
|
208
|
-
_this$user,
|
|
209
217
|
_baseProduct11,
|
|
218
|
+
_this$user,
|
|
210
219
|
_baseProduct12,
|
|
211
220
|
_baseProduct13,
|
|
212
221
|
_baseProduct14,
|
|
213
|
-
_dataByBasket$orderTe,
|
|
214
222
|
_baseProduct15,
|
|
215
|
-
_dataByBasket$
|
|
223
|
+
_dataByBasket$orderTe,
|
|
216
224
|
_baseProduct16,
|
|
225
|
+
_dataByBasket$technic,
|
|
217
226
|
_baseProduct17,
|
|
227
|
+
_baseProduct18,
|
|
218
228
|
_ref3,
|
|
219
229
|
_baseProduct$configur3,
|
|
220
|
-
|
|
221
|
-
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
|
+
_baseProduct19;
|
|
231
|
+
var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, _baseProduct$configur, _baseProduct$configur2, _basket$OrderSets$map, dataByBasket, oldClassificationData, i, variant, key, oldUniqueHash, configuration, myDivaNr, 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;
|
|
222
232
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
223
233
|
while (1) switch (_context2.prev = _context2.next) {
|
|
224
234
|
case 0:
|
|
225
|
-
basket = _ref2.basket, divaNr = _ref2.divaNr, catalogData = _ref2.catalogData, productData = _ref2.productData, classificationFields = _ref2.classificationFields, fieldConfiguration = _ref2.fieldConfiguration, customBaseFields = _ref2.customBaseFields, classificationConfig = _ref2.classificationConfig, _ref2$availableLangua = _ref2.availableLanguages, availableLanguages = _ref2$availableLangua === void 0 ? ['de', 'fr', 'it', 'en'] : _ref2$availableLangua, _ref2$currentLang = _ref2.currentLang, currentLang = _ref2$currentLang === void 0 ? 'de' : _ref2$currentLang;
|
|
226
|
-
if (!(!productData && !divaNr)) {
|
|
235
|
+
basket = _ref2.basket, divaNr = _ref2.divaNr, catalogData = _ref2.catalogData, productData = _ref2.productData, classificationFields = _ref2.classificationFields, fieldConfiguration = _ref2.fieldConfiguration, customBaseFields = _ref2.customBaseFields, classificationConfig = _ref2.classificationConfig, _ref2$availableLangua = _ref2.availableLanguages, availableLanguages = _ref2$availableLangua === void 0 ? ['de', 'fr', 'it', 'en'] : _ref2$availableLangua, _ref2$currentLang = _ref2.currentLang, currentLang = _ref2$currentLang === void 0 ? 'de' : _ref2$currentLang, getUniqueNewDivaNr = _ref2.getUniqueNewDivaNr;
|
|
236
|
+
if (!(!productData && !divaNr && !getUniqueNewDivaNr)) {
|
|
227
237
|
_context2.next = 3;
|
|
228
238
|
break;
|
|
229
239
|
}
|
|
@@ -303,25 +313,35 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
303
313
|
}
|
|
304
314
|
oldUniqueHash = (_baseProduct = baseProduct) === null || _baseProduct === void 0 ? void 0 : _baseProduct.uniqueHash;
|
|
305
315
|
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;
|
|
316
|
+
myDivaNr = (_baseProduct$divaNr = (_baseProduct3 = baseProduct) === null || _baseProduct3 === void 0 ? void 0 : _baseProduct3.divaNr) !== null && _baseProduct$divaNr !== void 0 ? _baseProduct$divaNr : basket === null || basket === void 0 ? void 0 : basket.DivaNr;
|
|
317
|
+
if (!(!((_baseProduct4 = baseProduct) !== null && _baseProduct4 !== void 0 && _baseProduct4.divaNr) && getUniqueNewDivaNr)) {
|
|
318
|
+
_context2.next = 35;
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
_context2.next = 34;
|
|
322
|
+
return this.apiGetUniqueDivaNr();
|
|
323
|
+
case 34:
|
|
324
|
+
myDivaNr = _context2.sent;
|
|
325
|
+
case 35:
|
|
306
326
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, dataByBasket), baseProduct), {}, {
|
|
307
|
-
_id: ((
|
|
308
|
-
divaNr:
|
|
309
|
-
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 : (
|
|
310
|
-
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (
|
|
311
|
-
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (
|
|
327
|
+
_id: ((_baseProduct5 = baseProduct) === null || _baseProduct5 === void 0 ? void 0 : _baseProduct5._id) || nanoid(),
|
|
328
|
+
divaNr: myDivaNr,
|
|
329
|
+
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 : (_baseProduct6 = baseProduct) === null || _baseProduct6 === void 0 ? void 0 : _baseProduct6.addedPrice,
|
|
330
|
+
image: (_dataByBasket$image = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image) !== null && _dataByBasket$image !== void 0 ? _dataByBasket$image : (_baseProduct7 = baseProduct) === null || _baseProduct7 === void 0 ? void 0 : _baseProduct7.image,
|
|
331
|
+
image2D: (_dataByBasket$image2D = dataByBasket === null || dataByBasket === void 0 ? void 0 : dataByBasket.image2D) !== null && _dataByBasket$image2D !== void 0 ? _dataByBasket$image2D : (_baseProduct8 = baseProduct) === null || _baseProduct8 === void 0 ? void 0 : _baseProduct8.image2D,
|
|
312
332
|
configuration: configuration,
|
|
313
|
-
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (
|
|
333
|
+
dockingPoints: (_dataByBasket$docking = dataByBasket.dockingPoints) !== null && _dataByBasket$docking !== void 0 ? _dataByBasket$docking : (_baseProduct9 = baseProduct) === null || _baseProduct9 === void 0 ? void 0 : _baseProduct9.dockingPoints,
|
|
314
334
|
currency: DivaUtils.defaultPriceFormat.currency,
|
|
315
|
-
organizationId: (_baseProduct$organiza = (
|
|
335
|
+
organizationId: (_baseProduct$organiza = (_baseProduct10 = baseProduct) === null || _baseProduct10 === void 0 ? void 0 : _baseProduct10.organizationId) !== null && _baseProduct$organiza !== void 0 ? _baseProduct$organiza : this.organization._id,
|
|
316
336
|
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) {
|
|
317
337
|
return o._id;
|
|
318
338
|
})) !== null && _this$organization$pa !== void 0 ? _this$organization$pa : []), [this.organization._id]),
|
|
319
|
-
createdBy: (_baseProduct$createdB = (
|
|
320
|
-
createdBy_displayText: (
|
|
321
|
-
archived: (
|
|
322
|
-
isTopseller: !!((
|
|
323
|
-
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (
|
|
324
|
-
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (
|
|
339
|
+
createdBy: (_baseProduct$createdB = (_baseProduct11 = baseProduct) === null || _baseProduct11 === void 0 ? void 0 : _baseProduct11.createdBy) !== null && _baseProduct$createdB !== void 0 ? _baseProduct$createdB : (_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user._id,
|
|
340
|
+
createdBy_displayText: (_baseProduct12 = baseProduct) === null || _baseProduct12 === void 0 ? void 0 : _baseProduct12.createdBy_displayText,
|
|
341
|
+
archived: (_baseProduct13 = baseProduct) !== null && _baseProduct13 !== void 0 && _baseProduct13.archived ? (_baseProduct14 = baseProduct) === null || _baseProduct14 === void 0 ? void 0 : _baseProduct14.archived : false,
|
|
342
|
+
isTopseller: !!((_baseProduct15 = baseProduct) !== null && _baseProduct15 !== void 0 && _baseProduct15.isTopseller),
|
|
343
|
+
orderText: (_dataByBasket$orderTe = dataByBasket.orderText) !== null && _dataByBasket$orderTe !== void 0 ? _dataByBasket$orderTe : (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.orderText,
|
|
344
|
+
technicalDescription: (_dataByBasket$technic = dataByBasket.technicalDescription) !== null && _dataByBasket$technic !== void 0 ? _dataByBasket$technic : (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.technicalDescription
|
|
325
345
|
});
|
|
326
346
|
metaData = basket === null || basket === void 0 ? void 0 : basket.OrderSets.reduce(function (prev, curr) {
|
|
327
347
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData || {});
|
|
@@ -330,7 +350,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
330
350
|
return _objectSpread(_objectSpread({}, prev), curr.MetaData_locales || {});
|
|
331
351
|
}, {});
|
|
332
352
|
_this$parseMetaDataAn = this.parseMetaDataAndClassificationInformation(metaData, metaData_locales, baseProduct, classificationConfig, customBaseFields), classificationData = _this$parseMetaDataAn.classificationData, customData = _this$parseMetaDataAn.customData, optMap = _this$parseMetaDataAn.optMap;
|
|
333
|
-
baseData.customData = _objectSpread(_objectSpread({}, (
|
|
353
|
+
baseData.customData = _objectSpread(_objectSpread({}, (_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.customData), customData);
|
|
334
354
|
|
|
335
355
|
//add livingarea,maincategorie,subcategorie of loaded product if not exists
|
|
336
356
|
classificationConfig = this.checkAndAddClassificationConfigCategories(baseProduct, classificationConfig);
|
|
@@ -347,11 +367,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
347
367
|
optFields = [];
|
|
348
368
|
initialSelectedFields = [];
|
|
349
369
|
if (!dataByBasket.isSet) {
|
|
350
|
-
_context2.next =
|
|
370
|
+
_context2.next = 51;
|
|
351
371
|
break;
|
|
352
372
|
}
|
|
353
373
|
throw new Error('Variants are currently not supported for set products');
|
|
354
|
-
case
|
|
374
|
+
case 51:
|
|
355
375
|
//iterate all existing variant products and add them to the variants
|
|
356
376
|
usedVariantIds = [];
|
|
357
377
|
variantProducts.forEach(function (product) {
|
|
@@ -407,7 +427,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
407
427
|
}
|
|
408
428
|
|
|
409
429
|
//get opt data
|
|
410
|
-
differingOPTs = Object.entries(((_ref3 = (_baseProduct$configur3 = (
|
|
430
|
+
differingOPTs = Object.entries(((_ref3 = (_baseProduct$configur3 = (_baseProduct19 = baseProduct) === null || _baseProduct19 === void 0 ? void 0 : _baseProduct19.configuration) !== null && _baseProduct$configur3 !== void 0 ? _baseProduct$configur3 : basket) === null || _ref3 === void 0 || (_ref3 = _ref3.OrderSets[0].Favorites) === null || _ref3 === void 0 ? void 0 : _ref3.VariantValues) || []).filter(function (_ref4) {
|
|
411
431
|
var _ref5 = _slicedToArray(_ref4, 2);
|
|
412
432
|
_ref5[0];
|
|
413
433
|
var value = _ref5[1];
|
|
@@ -482,7 +502,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
482
502
|
availableLanguages: availableLanguages,
|
|
483
503
|
currentLang: currentLang
|
|
484
504
|
});
|
|
485
|
-
case
|
|
505
|
+
case 64:
|
|
486
506
|
case "end":
|
|
487
507
|
return _context2.stop();
|
|
488
508
|
}
|
|
@@ -858,11 +878,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
858
878
|
var value = _ref18[1];
|
|
859
879
|
return value;
|
|
860
880
|
}).forEach(function (_ref19) {
|
|
861
|
-
var
|
|
881
|
+
var _baseProduct20;
|
|
862
882
|
var _ref20 = _slicedToArray(_ref19, 2),
|
|
863
883
|
key = _ref20[0],
|
|
864
884
|
value = _ref20[1];
|
|
865
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
885
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct20 = baseProduct["dc_".concat(key)]) !== null && _baseProduct20 !== void 0 ? _baseProduct20 : {}), {}, {
|
|
866
886
|
opt: value.field
|
|
867
887
|
});
|
|
868
888
|
});
|
|
@@ -1957,12 +1977,62 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1957
1977
|
return apiMarkAsFavorite;
|
|
1958
1978
|
}()
|
|
1959
1979
|
}, {
|
|
1960
|
-
key: "
|
|
1980
|
+
key: "apiGetUniqueDivaNr",
|
|
1961
1981
|
value: function () {
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
1982
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
1983
|
+
var _res5;
|
|
1984
|
+
var fullUrl, res, resData;
|
|
1964
1985
|
return _regeneratorRuntime.wrap(function _callee12$(_context14) {
|
|
1965
1986
|
while (1) switch (_context14.prev = _context14.next) {
|
|
1987
|
+
case 0:
|
|
1988
|
+
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
1989
|
+
_context14.prev = 1;
|
|
1990
|
+
_context14.next = 4;
|
|
1991
|
+
return axios.get(fullUrl.toString(), {
|
|
1992
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
1993
|
+
'Content-Type': 'application/json'
|
|
1994
|
+
})
|
|
1995
|
+
});
|
|
1996
|
+
case 4:
|
|
1997
|
+
res = _context14.sent;
|
|
1998
|
+
_context14.next = 7;
|
|
1999
|
+
return res.data;
|
|
2000
|
+
case 7:
|
|
2001
|
+
resData = _context14.sent;
|
|
2002
|
+
_context14.next = 13;
|
|
2003
|
+
break;
|
|
2004
|
+
case 10:
|
|
2005
|
+
_context14.prev = 10;
|
|
2006
|
+
_context14.t0 = _context14["catch"](1);
|
|
2007
|
+
throw new Error('Error on activate product', {
|
|
2008
|
+
cause: _context14.t0
|
|
2009
|
+
});
|
|
2010
|
+
case 13:
|
|
2011
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 200)) {
|
|
2012
|
+
_context14.next = 15;
|
|
2013
|
+
break;
|
|
2014
|
+
}
|
|
2015
|
+
return _context14.abrupt("return", resData.divaNr);
|
|
2016
|
+
case 15:
|
|
2017
|
+
throw new Error(resData.error);
|
|
2018
|
+
case 16:
|
|
2019
|
+
case "end":
|
|
2020
|
+
return _context14.stop();
|
|
2021
|
+
}
|
|
2022
|
+
}, _callee12, this, [[1, 10]]);
|
|
2023
|
+
}));
|
|
2024
|
+
function apiGetUniqueDivaNr() {
|
|
2025
|
+
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
2026
|
+
}
|
|
2027
|
+
return apiGetUniqueDivaNr;
|
|
2028
|
+
}()
|
|
2029
|
+
}, {
|
|
2030
|
+
key: "apiDeleteProducts",
|
|
2031
|
+
value: function () {
|
|
2032
|
+
var _apiDeleteProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(products) {
|
|
2033
|
+
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2034
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
2035
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1966
2036
|
case 0:
|
|
1967
2037
|
fullUrl = this.catalogService + '/products';
|
|
1968
2038
|
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
@@ -1973,7 +2043,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1973
2043
|
i = 0;
|
|
1974
2044
|
case 5:
|
|
1975
2045
|
if (!(i < productsInChunks.length)) {
|
|
1976
|
-
|
|
2046
|
+
_context15.next = 13;
|
|
1977
2047
|
break;
|
|
1978
2048
|
}
|
|
1979
2049
|
promises = productsInChunks[i].map(function (p) {
|
|
@@ -1995,17 +2065,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1995
2065
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
1996
2066
|
dontRenderForm: true
|
|
1997
2067
|
});
|
|
1998
|
-
|
|
2068
|
+
_context15.next = 10;
|
|
1999
2069
|
return Promise.all(promises);
|
|
2000
2070
|
case 10:
|
|
2001
2071
|
i++;
|
|
2002
|
-
|
|
2072
|
+
_context15.next = 5;
|
|
2003
2073
|
break;
|
|
2004
2074
|
case 13:
|
|
2005
2075
|
case "end":
|
|
2006
|
-
return
|
|
2076
|
+
return _context15.stop();
|
|
2007
2077
|
}
|
|
2008
|
-
},
|
|
2078
|
+
}, _callee13, this);
|
|
2009
2079
|
}));
|
|
2010
2080
|
function apiDeleteProducts(_x20) {
|
|
2011
2081
|
return _apiDeleteProducts.apply(this, arguments);
|
|
@@ -2024,13 +2094,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2024
2094
|
}, {
|
|
2025
2095
|
key: "apiLoadProductVariantsGrouped",
|
|
2026
2096
|
value: function () {
|
|
2027
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2097
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref45) {
|
|
2028
2098
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2029
|
-
return _regeneratorRuntime.wrap(function
|
|
2030
|
-
while (1) switch (
|
|
2099
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
2100
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2031
2101
|
case 0:
|
|
2032
2102
|
limit = _ref45.limit, skip = _ref45.skip, fields = _ref45.fields, _ref45$search = _ref45.search, search = _ref45$search === void 0 ? [] : _ref45$search, sort = _ref45.sort, favorites = _ref45.favorites, abortController = _ref45.abortController;
|
|
2033
|
-
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils.fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search ? '&search=' + DivaUtils.fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils.fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
2103
|
+
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils.fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search.length ? '&search=' + DivaUtils.fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils.fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
2034
2104
|
headers = {
|
|
2035
2105
|
'Content-Type': 'application/json'
|
|
2036
2106
|
};
|
|
@@ -2051,15 +2121,15 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2051
2121
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2052
2122
|
});
|
|
2053
2123
|
});
|
|
2054
|
-
|
|
2124
|
+
_context16.next = 7;
|
|
2055
2125
|
return promise;
|
|
2056
2126
|
case 7:
|
|
2057
|
-
return
|
|
2127
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2058
2128
|
case 8:
|
|
2059
2129
|
case "end":
|
|
2060
|
-
return
|
|
2130
|
+
return _context16.stop();
|
|
2061
2131
|
}
|
|
2062
|
-
},
|
|
2132
|
+
}, _callee14, this);
|
|
2063
2133
|
}));
|
|
2064
2134
|
function apiLoadProductVariantsGrouped(_x21) {
|
|
2065
2135
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
@@ -2069,10 +2139,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2069
2139
|
}, {
|
|
2070
2140
|
key: "apiSaveProducts",
|
|
2071
2141
|
value: function () {
|
|
2072
|
-
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2142
|
+
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2073
2143
|
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, _i2, _loop3, j;
|
|
2074
|
-
return _regeneratorRuntime.wrap(function
|
|
2075
|
-
while (1) switch (
|
|
2144
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context18) {
|
|
2145
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2076
2146
|
case 0:
|
|
2077
2147
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2078
2148
|
BATCH_SIZE = 40;
|
|
@@ -2081,34 +2151,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2081
2151
|
i = 0;
|
|
2082
2152
|
case 5:
|
|
2083
2153
|
if (!(i < products.length)) {
|
|
2084
|
-
|
|
2154
|
+
_context18.next = 15;
|
|
2085
2155
|
break;
|
|
2086
2156
|
}
|
|
2087
2157
|
if (!products[i].baseProduct) {
|
|
2088
|
-
|
|
2158
|
+
_context18.next = 9;
|
|
2089
2159
|
break;
|
|
2090
2160
|
}
|
|
2091
2161
|
baseProduct = products[i];
|
|
2092
|
-
return
|
|
2162
|
+
return _context18.abrupt("continue", 12);
|
|
2093
2163
|
case 9:
|
|
2094
2164
|
if (BATCH_SIZE < ((_productsPackages$gro = (_productsPackages$gro2 = productsPackages[groupIndex]) === null || _productsPackages$gro2 === void 0 ? void 0 : _productsPackages$gro2.length) !== null && _productsPackages$gro !== void 0 ? _productsPackages$gro : 0)) groupIndex++;
|
|
2095
2165
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2096
2166
|
productsPackages[groupIndex].push(products[i]);
|
|
2097
2167
|
case 12:
|
|
2098
2168
|
i++;
|
|
2099
|
-
|
|
2169
|
+
_context18.next = 5;
|
|
2100
2170
|
break;
|
|
2101
2171
|
case 15:
|
|
2102
2172
|
responseProducts = [];
|
|
2103
2173
|
_i2 = 0;
|
|
2104
2174
|
case 17:
|
|
2105
2175
|
if (!(_i2 < productsPackages.length)) {
|
|
2106
|
-
|
|
2176
|
+
_context18.next = 40;
|
|
2107
2177
|
break;
|
|
2108
2178
|
}
|
|
2109
2179
|
if (baseProduct) productsPackages[_i2].unshift(baseProduct);
|
|
2110
|
-
|
|
2111
|
-
|
|
2180
|
+
_context18.prev = 19;
|
|
2181
|
+
_context18.next = 22;
|
|
2112
2182
|
return fetch(fullUrl, {
|
|
2113
2183
|
method: 'PUT',
|
|
2114
2184
|
headers: {
|
|
@@ -2128,23 +2198,23 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2128
2198
|
return res.json();
|
|
2129
2199
|
});
|
|
2130
2200
|
case 22:
|
|
2131
|
-
response =
|
|
2201
|
+
response = _context18.sent;
|
|
2132
2202
|
if (!response.Error) {
|
|
2133
|
-
|
|
2203
|
+
_context18.next = 25;
|
|
2134
2204
|
break;
|
|
2135
2205
|
}
|
|
2136
2206
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2137
2207
|
case 25:
|
|
2138
|
-
|
|
2208
|
+
_context18.next = 30;
|
|
2139
2209
|
break;
|
|
2140
2210
|
case 27:
|
|
2141
|
-
|
|
2142
|
-
|
|
2211
|
+
_context18.prev = 27;
|
|
2212
|
+
_context18.t0 = _context18["catch"](19);
|
|
2143
2213
|
throw Error(status);
|
|
2144
2214
|
case 30:
|
|
2145
2215
|
_loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3(j) {
|
|
2146
|
-
return _regeneratorRuntime.wrap(function _loop3$(
|
|
2147
|
-
while (1) switch (
|
|
2216
|
+
return _regeneratorRuntime.wrap(function _loop3$(_context17) {
|
|
2217
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2148
2218
|
case 0:
|
|
2149
2219
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2150
2220
|
if (!responseProducts.find(function (p) {
|
|
@@ -2154,32 +2224,32 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2154
2224
|
}
|
|
2155
2225
|
case 2:
|
|
2156
2226
|
case "end":
|
|
2157
|
-
return
|
|
2227
|
+
return _context17.stop();
|
|
2158
2228
|
}
|
|
2159
2229
|
}, _loop3);
|
|
2160
2230
|
});
|
|
2161
2231
|
j = 0;
|
|
2162
2232
|
case 32:
|
|
2163
2233
|
if (!(j < response.products.length)) {
|
|
2164
|
-
|
|
2234
|
+
_context18.next = 37;
|
|
2165
2235
|
break;
|
|
2166
2236
|
}
|
|
2167
|
-
return
|
|
2237
|
+
return _context18.delegateYield(_loop3(j), "t1", 34);
|
|
2168
2238
|
case 34:
|
|
2169
2239
|
j++;
|
|
2170
|
-
|
|
2240
|
+
_context18.next = 32;
|
|
2171
2241
|
break;
|
|
2172
2242
|
case 37:
|
|
2173
2243
|
_i2++;
|
|
2174
|
-
|
|
2244
|
+
_context18.next = 17;
|
|
2175
2245
|
break;
|
|
2176
2246
|
case 40:
|
|
2177
|
-
return
|
|
2247
|
+
return _context18.abrupt("return", responseProducts);
|
|
2178
2248
|
case 41:
|
|
2179
2249
|
case "end":
|
|
2180
|
-
return
|
|
2250
|
+
return _context18.stop();
|
|
2181
2251
|
}
|
|
2182
|
-
},
|
|
2252
|
+
}, _callee15, null, [[19, 27]]);
|
|
2183
2253
|
}));
|
|
2184
2254
|
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2185
2255
|
return _apiSaveProducts.apply(this, arguments);
|
|
@@ -2406,10 +2476,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2406
2476
|
}, {
|
|
2407
2477
|
key: "loadSelectOptions",
|
|
2408
2478
|
value: function () {
|
|
2409
|
-
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2479
|
+
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2410
2480
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2411
|
-
return _regeneratorRuntime.wrap(function
|
|
2412
|
-
while (1) switch (
|
|
2481
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context19) {
|
|
2482
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2413
2483
|
case 0:
|
|
2414
2484
|
values = [];
|
|
2415
2485
|
apiUrl = dataSource.url;
|
|
@@ -2418,7 +2488,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2418
2488
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2419
2489
|
}
|
|
2420
2490
|
}
|
|
2421
|
-
|
|
2491
|
+
_context19.next = 5;
|
|
2422
2492
|
return fetch(apiUrl, {
|
|
2423
2493
|
headers: {
|
|
2424
2494
|
sessionGuid: sessionGuid
|
|
@@ -2430,7 +2500,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2430
2500
|
return res.json();
|
|
2431
2501
|
});
|
|
2432
2502
|
case 5:
|
|
2433
|
-
apiResult =
|
|
2503
|
+
apiResult = _context19.sent;
|
|
2434
2504
|
if (dataSource.useKey) {
|
|
2435
2505
|
apiResult = apiResult[dataSource.useKey];
|
|
2436
2506
|
}
|
|
@@ -2442,12 +2512,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2442
2512
|
text: text
|
|
2443
2513
|
});
|
|
2444
2514
|
}
|
|
2445
|
-
return
|
|
2515
|
+
return _context19.abrupt("return", values);
|
|
2446
2516
|
case 9:
|
|
2447
2517
|
case "end":
|
|
2448
|
-
return
|
|
2518
|
+
return _context19.stop();
|
|
2449
2519
|
}
|
|
2450
|
-
},
|
|
2520
|
+
}, _callee16);
|
|
2451
2521
|
}));
|
|
2452
2522
|
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2453
2523
|
return _loadSelectOptions.apply(this, arguments);
|
|
@@ -2483,7 +2553,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2483
2553
|
OPV: v.OPV,
|
|
2484
2554
|
OPTName: opt.Name,
|
|
2485
2555
|
OPVName: opv.Name,
|
|
2486
|
-
OPVImage: catalog.mediaUrl + opv.Image
|
|
2556
|
+
OPVImage: opv.Image ? catalog.mediaUrl + opv.Image : undefined
|
|
2487
2557
|
});
|
|
2488
2558
|
}
|
|
2489
2559
|
}
|
|
@@ -22,6 +22,7 @@ export interface LoadProductsParams {
|
|
|
22
22
|
classificationConfig?: ClassificationData;
|
|
23
23
|
availableLanguages?: string[];
|
|
24
24
|
currentLang?: string;
|
|
25
|
+
getUniqueNewDivaNr?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export interface PrepareDataParams {
|
|
27
28
|
basket?: BasketData;
|
|
@@ -68,6 +69,7 @@ export declare class ProductHandlerAbstract {
|
|
|
68
69
|
private _apiKey?;
|
|
69
70
|
private _catalogService;
|
|
70
71
|
private _mediaService;
|
|
72
|
+
private _basketService;
|
|
71
73
|
private _api2;
|
|
72
74
|
private _sessionGuid?;
|
|
73
75
|
private _organization;
|
|
@@ -75,6 +77,8 @@ export declare class ProductHandlerAbstract {
|
|
|
75
77
|
set langs(val: string[]);
|
|
76
78
|
set catalogService(val: string);
|
|
77
79
|
get catalogService(): string;
|
|
80
|
+
set basketService(val: string);
|
|
81
|
+
get basketService(): string;
|
|
78
82
|
set mediaService(val: string);
|
|
79
83
|
get mediaService(): string;
|
|
80
84
|
get api2(): string;
|
|
@@ -102,7 +106,7 @@ export declare class ProductHandlerAbstract {
|
|
|
102
106
|
* @param catalogServiceUrl the url for the catalog service
|
|
103
107
|
* @param productData an optional list of products, if set no products get loaded from the server
|
|
104
108
|
*/
|
|
105
|
-
loadProducts({ basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, availableLanguages, currentLang, }: LoadProductsParams): Promise<{
|
|
109
|
+
loadProducts({ basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, availableLanguages, currentLang, getUniqueNewDivaNr, }: LoadProductsParams): Promise<{
|
|
106
110
|
baseData: ProductDataAbstract;
|
|
107
111
|
classificationData: any;
|
|
108
112
|
optFields: OPTValueField[];
|
|
@@ -237,6 +241,7 @@ export declare class ProductHandlerAbstract {
|
|
|
237
241
|
data: any[];
|
|
238
242
|
}>;
|
|
239
243
|
apiMarkAsFavorite(id: string, organizationId: string): Promise<void>;
|
|
244
|
+
apiGetUniqueDivaNr(): Promise<any>;
|
|
240
245
|
static loadSelectOptions(sessionGuid: string, dataSource: DataSourceApi, additionalFilter?: [{
|
|
241
246
|
key: string;
|
|
242
247
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAoB,aAAa,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAIp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E,CAa5C;IAEF,MAAM,CAAC,sBAAsB,EAAE,cAAc,EAAE,CA0D7C;IAEF,MAAM,CAAC,cAAc,EAAE,cAAc,EAAE,CAAsG;IAE7I,MAAM,CAAC,wBAAwB,EAAE,cAAc,EAAE,CAI/C;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/product-handler",
|
|
3
|
-
"version": "24.15.0-beta.
|
|
3
|
+
"version": "24.15.0-beta.21",
|
|
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": "35f68e92ee56efc006300e1ff754898adef7962a"
|
|
16
16
|
}
|