@crystaldesign/product-handler 24.15.0-beta.20 → 24.15.0-beta.22
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
|
}
|
|
@@ -843,10 +863,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
843
863
|
this.trimStrings(baseData);
|
|
844
864
|
//the base product is constructed, based on baseData and classification data
|
|
845
865
|
baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref13) {
|
|
866
|
+
var _fieldConfiguration$c;
|
|
846
867
|
var _ref14 = _slicedToArray__default["default"](_ref13, 2),
|
|
847
868
|
key = _ref14[0],
|
|
848
869
|
value = _ref14[1];
|
|
849
|
-
prev["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0
|
|
870
|
+
prev["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$c = fieldConfiguration.classMap[key]) === null || _fieldConfiguration$c === void 0 ? void 0 : _fieldConfiguration$c.values);
|
|
850
871
|
return prev;
|
|
851
872
|
}, {})), {}, {
|
|
852
873
|
_id: originProductId && !(variantData !== null && variantData !== void 0 && variantData.length) ? originProductId : baseData._id,
|
|
@@ -876,11 +897,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
876
897
|
var value = _ref18[1];
|
|
877
898
|
return value;
|
|
878
899
|
}).forEach(function (_ref19) {
|
|
879
|
-
var
|
|
900
|
+
var _baseProduct20;
|
|
880
901
|
var _ref20 = _slicedToArray__default["default"](_ref19, 2),
|
|
881
902
|
key = _ref20[0],
|
|
882
903
|
value = _ref20[1];
|
|
883
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
904
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct20 = baseProduct["dc_".concat(key)]) !== null && _baseProduct20 !== void 0 ? _baseProduct20 : {}), {}, {
|
|
884
905
|
opt: value.field
|
|
885
906
|
});
|
|
886
907
|
});
|
|
@@ -1975,12 +1996,62 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1975
1996
|
return apiMarkAsFavorite;
|
|
1976
1997
|
}()
|
|
1977
1998
|
}, {
|
|
1978
|
-
key: "
|
|
1999
|
+
key: "apiGetUniqueDivaNr",
|
|
1979
2000
|
value: function () {
|
|
1980
|
-
var
|
|
1981
|
-
var
|
|
2001
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12() {
|
|
2002
|
+
var _res5;
|
|
2003
|
+
var fullUrl, res, resData;
|
|
1982
2004
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context14) {
|
|
1983
2005
|
while (1) switch (_context14.prev = _context14.next) {
|
|
2006
|
+
case 0:
|
|
2007
|
+
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
2008
|
+
_context14.prev = 1;
|
|
2009
|
+
_context14.next = 4;
|
|
2010
|
+
return axios__default["default"].get(fullUrl.toString(), {
|
|
2011
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2012
|
+
'Content-Type': 'application/json'
|
|
2013
|
+
})
|
|
2014
|
+
});
|
|
2015
|
+
case 4:
|
|
2016
|
+
res = _context14.sent;
|
|
2017
|
+
_context14.next = 7;
|
|
2018
|
+
return res.data;
|
|
2019
|
+
case 7:
|
|
2020
|
+
resData = _context14.sent;
|
|
2021
|
+
_context14.next = 13;
|
|
2022
|
+
break;
|
|
2023
|
+
case 10:
|
|
2024
|
+
_context14.prev = 10;
|
|
2025
|
+
_context14.t0 = _context14["catch"](1);
|
|
2026
|
+
throw new Error('Error on activate product', {
|
|
2027
|
+
cause: _context14.t0
|
|
2028
|
+
});
|
|
2029
|
+
case 13:
|
|
2030
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 200)) {
|
|
2031
|
+
_context14.next = 15;
|
|
2032
|
+
break;
|
|
2033
|
+
}
|
|
2034
|
+
return _context14.abrupt("return", resData.divaNr);
|
|
2035
|
+
case 15:
|
|
2036
|
+
throw new Error(resData.error);
|
|
2037
|
+
case 16:
|
|
2038
|
+
case "end":
|
|
2039
|
+
return _context14.stop();
|
|
2040
|
+
}
|
|
2041
|
+
}, _callee12, this, [[1, 10]]);
|
|
2042
|
+
}));
|
|
2043
|
+
function apiGetUniqueDivaNr() {
|
|
2044
|
+
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
2045
|
+
}
|
|
2046
|
+
return apiGetUniqueDivaNr;
|
|
2047
|
+
}()
|
|
2048
|
+
}, {
|
|
2049
|
+
key: "apiDeleteProducts",
|
|
2050
|
+
value: function () {
|
|
2051
|
+
var _apiDeleteProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(products) {
|
|
2052
|
+
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2053
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
|
|
2054
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1984
2055
|
case 0:
|
|
1985
2056
|
fullUrl = this.catalogService + '/products';
|
|
1986
2057
|
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
@@ -1991,7 +2062,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1991
2062
|
i = 0;
|
|
1992
2063
|
case 5:
|
|
1993
2064
|
if (!(i < productsInChunks.length)) {
|
|
1994
|
-
|
|
2065
|
+
_context15.next = 13;
|
|
1995
2066
|
break;
|
|
1996
2067
|
}
|
|
1997
2068
|
promises = productsInChunks[i].map(function (p) {
|
|
@@ -2013,17 +2084,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2013
2084
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
2014
2085
|
dontRenderForm: true
|
|
2015
2086
|
});
|
|
2016
|
-
|
|
2087
|
+
_context15.next = 10;
|
|
2017
2088
|
return Promise.all(promises);
|
|
2018
2089
|
case 10:
|
|
2019
2090
|
i++;
|
|
2020
|
-
|
|
2091
|
+
_context15.next = 5;
|
|
2021
2092
|
break;
|
|
2022
2093
|
case 13:
|
|
2023
2094
|
case "end":
|
|
2024
|
-
return
|
|
2095
|
+
return _context15.stop();
|
|
2025
2096
|
}
|
|
2026
|
-
},
|
|
2097
|
+
}, _callee13, this);
|
|
2027
2098
|
}));
|
|
2028
2099
|
function apiDeleteProducts(_x20) {
|
|
2029
2100
|
return _apiDeleteProducts.apply(this, arguments);
|
|
@@ -2042,10 +2113,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2042
2113
|
}, {
|
|
2043
2114
|
key: "apiLoadProductVariantsGrouped",
|
|
2044
2115
|
value: function () {
|
|
2045
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2116
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(_ref45) {
|
|
2046
2117
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2047
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2048
|
-
while (1) switch (
|
|
2118
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
2119
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2049
2120
|
case 0:
|
|
2050
2121
|
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
2122
|
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' : '');
|
|
@@ -2069,15 +2140,15 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2069
2140
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2070
2141
|
});
|
|
2071
2142
|
});
|
|
2072
|
-
|
|
2143
|
+
_context16.next = 7;
|
|
2073
2144
|
return promise;
|
|
2074
2145
|
case 7:
|
|
2075
|
-
return
|
|
2146
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2076
2147
|
case 8:
|
|
2077
2148
|
case "end":
|
|
2078
|
-
return
|
|
2149
|
+
return _context16.stop();
|
|
2079
2150
|
}
|
|
2080
|
-
},
|
|
2151
|
+
}, _callee14, this);
|
|
2081
2152
|
}));
|
|
2082
2153
|
function apiLoadProductVariantsGrouped(_x21) {
|
|
2083
2154
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
@@ -2087,10 +2158,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2087
2158
|
}, {
|
|
2088
2159
|
key: "apiSaveProducts",
|
|
2089
2160
|
value: function () {
|
|
2090
|
-
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2161
|
+
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2091
2162
|
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 (
|
|
2163
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context18) {
|
|
2164
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2094
2165
|
case 0:
|
|
2095
2166
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2096
2167
|
BATCH_SIZE = 40;
|
|
@@ -2099,34 +2170,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2099
2170
|
i = 0;
|
|
2100
2171
|
case 5:
|
|
2101
2172
|
if (!(i < products.length)) {
|
|
2102
|
-
|
|
2173
|
+
_context18.next = 15;
|
|
2103
2174
|
break;
|
|
2104
2175
|
}
|
|
2105
2176
|
if (!products[i].baseProduct) {
|
|
2106
|
-
|
|
2177
|
+
_context18.next = 9;
|
|
2107
2178
|
break;
|
|
2108
2179
|
}
|
|
2109
2180
|
baseProduct = products[i];
|
|
2110
|
-
return
|
|
2181
|
+
return _context18.abrupt("continue", 12);
|
|
2111
2182
|
case 9:
|
|
2112
2183
|
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
2184
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2114
2185
|
productsPackages[groupIndex].push(products[i]);
|
|
2115
2186
|
case 12:
|
|
2116
2187
|
i++;
|
|
2117
|
-
|
|
2188
|
+
_context18.next = 5;
|
|
2118
2189
|
break;
|
|
2119
2190
|
case 15:
|
|
2120
2191
|
responseProducts = [];
|
|
2121
2192
|
_i2 = 0;
|
|
2122
2193
|
case 17:
|
|
2123
2194
|
if (!(_i2 < productsPackages.length)) {
|
|
2124
|
-
|
|
2195
|
+
_context18.next = 40;
|
|
2125
2196
|
break;
|
|
2126
2197
|
}
|
|
2127
2198
|
if (baseProduct) productsPackages[_i2].unshift(baseProduct);
|
|
2128
|
-
|
|
2129
|
-
|
|
2199
|
+
_context18.prev = 19;
|
|
2200
|
+
_context18.next = 22;
|
|
2130
2201
|
return fetch(fullUrl, {
|
|
2131
2202
|
method: 'PUT',
|
|
2132
2203
|
headers: {
|
|
@@ -2146,23 +2217,23 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2146
2217
|
return res.json();
|
|
2147
2218
|
});
|
|
2148
2219
|
case 22:
|
|
2149
|
-
response =
|
|
2220
|
+
response = _context18.sent;
|
|
2150
2221
|
if (!response.Error) {
|
|
2151
|
-
|
|
2222
|
+
_context18.next = 25;
|
|
2152
2223
|
break;
|
|
2153
2224
|
}
|
|
2154
2225
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2155
2226
|
case 25:
|
|
2156
|
-
|
|
2227
|
+
_context18.next = 30;
|
|
2157
2228
|
break;
|
|
2158
2229
|
case 27:
|
|
2159
|
-
|
|
2160
|
-
|
|
2230
|
+
_context18.prev = 27;
|
|
2231
|
+
_context18.t0 = _context18["catch"](19);
|
|
2161
2232
|
throw Error(status);
|
|
2162
2233
|
case 30:
|
|
2163
2234
|
_loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3(j) {
|
|
2164
|
-
return _regeneratorRuntime__default["default"].wrap(function _loop3$(
|
|
2165
|
-
while (1) switch (
|
|
2235
|
+
return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context17) {
|
|
2236
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2166
2237
|
case 0:
|
|
2167
2238
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2168
2239
|
if (!responseProducts.find(function (p) {
|
|
@@ -2172,32 +2243,32 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2172
2243
|
}
|
|
2173
2244
|
case 2:
|
|
2174
2245
|
case "end":
|
|
2175
|
-
return
|
|
2246
|
+
return _context17.stop();
|
|
2176
2247
|
}
|
|
2177
2248
|
}, _loop3);
|
|
2178
2249
|
});
|
|
2179
2250
|
j = 0;
|
|
2180
2251
|
case 32:
|
|
2181
2252
|
if (!(j < response.products.length)) {
|
|
2182
|
-
|
|
2253
|
+
_context18.next = 37;
|
|
2183
2254
|
break;
|
|
2184
2255
|
}
|
|
2185
|
-
return
|
|
2256
|
+
return _context18.delegateYield(_loop3(j), "t1", 34);
|
|
2186
2257
|
case 34:
|
|
2187
2258
|
j++;
|
|
2188
|
-
|
|
2259
|
+
_context18.next = 32;
|
|
2189
2260
|
break;
|
|
2190
2261
|
case 37:
|
|
2191
2262
|
_i2++;
|
|
2192
|
-
|
|
2263
|
+
_context18.next = 17;
|
|
2193
2264
|
break;
|
|
2194
2265
|
case 40:
|
|
2195
|
-
return
|
|
2266
|
+
return _context18.abrupt("return", responseProducts);
|
|
2196
2267
|
case 41:
|
|
2197
2268
|
case "end":
|
|
2198
|
-
return
|
|
2269
|
+
return _context18.stop();
|
|
2199
2270
|
}
|
|
2200
|
-
},
|
|
2271
|
+
}, _callee15, null, [[19, 27]]);
|
|
2201
2272
|
}));
|
|
2202
2273
|
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2203
2274
|
return _apiSaveProducts.apply(this, arguments);
|
|
@@ -2424,10 +2495,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2424
2495
|
}, {
|
|
2425
2496
|
key: "loadSelectOptions",
|
|
2426
2497
|
value: function () {
|
|
2427
|
-
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2498
|
+
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2428
2499
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2429
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2430
|
-
while (1) switch (
|
|
2500
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context19) {
|
|
2501
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2431
2502
|
case 0:
|
|
2432
2503
|
values = [];
|
|
2433
2504
|
apiUrl = dataSource.url;
|
|
@@ -2436,7 +2507,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2436
2507
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2437
2508
|
}
|
|
2438
2509
|
}
|
|
2439
|
-
|
|
2510
|
+
_context19.next = 5;
|
|
2440
2511
|
return fetch(apiUrl, {
|
|
2441
2512
|
headers: {
|
|
2442
2513
|
sessionGuid: sessionGuid
|
|
@@ -2448,7 +2519,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2448
2519
|
return res.json();
|
|
2449
2520
|
});
|
|
2450
2521
|
case 5:
|
|
2451
|
-
apiResult =
|
|
2522
|
+
apiResult = _context19.sent;
|
|
2452
2523
|
if (dataSource.useKey) {
|
|
2453
2524
|
apiResult = apiResult[dataSource.useKey];
|
|
2454
2525
|
}
|
|
@@ -2460,12 +2531,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2460
2531
|
text: text
|
|
2461
2532
|
});
|
|
2462
2533
|
}
|
|
2463
|
-
return
|
|
2534
|
+
return _context19.abrupt("return", values);
|
|
2464
2535
|
case 9:
|
|
2465
2536
|
case "end":
|
|
2466
|
-
return
|
|
2537
|
+
return _context19.stop();
|
|
2467
2538
|
}
|
|
2468
|
-
},
|
|
2539
|
+
}, _callee16);
|
|
2469
2540
|
}));
|
|
2470
2541
|
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2471
2542
|
return _loadSelectOptions.apply(this, arguments);
|
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
|
}
|
|
@@ -825,10 +845,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
825
845
|
this.trimStrings(baseData);
|
|
826
846
|
//the base product is constructed, based on baseData and classification data
|
|
827
847
|
baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref13) {
|
|
848
|
+
var _fieldConfiguration$c;
|
|
828
849
|
var _ref14 = _slicedToArray(_ref13, 2),
|
|
829
850
|
key = _ref14[0],
|
|
830
851
|
value = _ref14[1];
|
|
831
|
-
prev["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0
|
|
852
|
+
prev["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$c = fieldConfiguration.classMap[key]) === null || _fieldConfiguration$c === void 0 ? void 0 : _fieldConfiguration$c.values);
|
|
832
853
|
return prev;
|
|
833
854
|
}, {})), {}, {
|
|
834
855
|
_id: originProductId && !(variantData !== null && variantData !== void 0 && variantData.length) ? originProductId : baseData._id,
|
|
@@ -858,11 +879,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
858
879
|
var value = _ref18[1];
|
|
859
880
|
return value;
|
|
860
881
|
}).forEach(function (_ref19) {
|
|
861
|
-
var
|
|
882
|
+
var _baseProduct20;
|
|
862
883
|
var _ref20 = _slicedToArray(_ref19, 2),
|
|
863
884
|
key = _ref20[0],
|
|
864
885
|
value = _ref20[1];
|
|
865
|
-
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (
|
|
886
|
+
return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct20 = baseProduct["dc_".concat(key)]) !== null && _baseProduct20 !== void 0 ? _baseProduct20 : {}), {}, {
|
|
866
887
|
opt: value.field
|
|
867
888
|
});
|
|
868
889
|
});
|
|
@@ -1957,12 +1978,62 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1957
1978
|
return apiMarkAsFavorite;
|
|
1958
1979
|
}()
|
|
1959
1980
|
}, {
|
|
1960
|
-
key: "
|
|
1981
|
+
key: "apiGetUniqueDivaNr",
|
|
1961
1982
|
value: function () {
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
1983
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
1984
|
+
var _res5;
|
|
1985
|
+
var fullUrl, res, resData;
|
|
1964
1986
|
return _regeneratorRuntime.wrap(function _callee12$(_context14) {
|
|
1965
1987
|
while (1) switch (_context14.prev = _context14.next) {
|
|
1988
|
+
case 0:
|
|
1989
|
+
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
1990
|
+
_context14.prev = 1;
|
|
1991
|
+
_context14.next = 4;
|
|
1992
|
+
return axios.get(fullUrl.toString(), {
|
|
1993
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
1994
|
+
'Content-Type': 'application/json'
|
|
1995
|
+
})
|
|
1996
|
+
});
|
|
1997
|
+
case 4:
|
|
1998
|
+
res = _context14.sent;
|
|
1999
|
+
_context14.next = 7;
|
|
2000
|
+
return res.data;
|
|
2001
|
+
case 7:
|
|
2002
|
+
resData = _context14.sent;
|
|
2003
|
+
_context14.next = 13;
|
|
2004
|
+
break;
|
|
2005
|
+
case 10:
|
|
2006
|
+
_context14.prev = 10;
|
|
2007
|
+
_context14.t0 = _context14["catch"](1);
|
|
2008
|
+
throw new Error('Error on activate product', {
|
|
2009
|
+
cause: _context14.t0
|
|
2010
|
+
});
|
|
2011
|
+
case 13:
|
|
2012
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 200)) {
|
|
2013
|
+
_context14.next = 15;
|
|
2014
|
+
break;
|
|
2015
|
+
}
|
|
2016
|
+
return _context14.abrupt("return", resData.divaNr);
|
|
2017
|
+
case 15:
|
|
2018
|
+
throw new Error(resData.error);
|
|
2019
|
+
case 16:
|
|
2020
|
+
case "end":
|
|
2021
|
+
return _context14.stop();
|
|
2022
|
+
}
|
|
2023
|
+
}, _callee12, this, [[1, 10]]);
|
|
2024
|
+
}));
|
|
2025
|
+
function apiGetUniqueDivaNr() {
|
|
2026
|
+
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
2027
|
+
}
|
|
2028
|
+
return apiGetUniqueDivaNr;
|
|
2029
|
+
}()
|
|
2030
|
+
}, {
|
|
2031
|
+
key: "apiDeleteProducts",
|
|
2032
|
+
value: function () {
|
|
2033
|
+
var _apiDeleteProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(products) {
|
|
2034
|
+
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2035
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
2036
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1966
2037
|
case 0:
|
|
1967
2038
|
fullUrl = this.catalogService + '/products';
|
|
1968
2039
|
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
@@ -1973,7 +2044,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1973
2044
|
i = 0;
|
|
1974
2045
|
case 5:
|
|
1975
2046
|
if (!(i < productsInChunks.length)) {
|
|
1976
|
-
|
|
2047
|
+
_context15.next = 13;
|
|
1977
2048
|
break;
|
|
1978
2049
|
}
|
|
1979
2050
|
promises = productsInChunks[i].map(function (p) {
|
|
@@ -1995,17 +2066,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1995
2066
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
1996
2067
|
dontRenderForm: true
|
|
1997
2068
|
});
|
|
1998
|
-
|
|
2069
|
+
_context15.next = 10;
|
|
1999
2070
|
return Promise.all(promises);
|
|
2000
2071
|
case 10:
|
|
2001
2072
|
i++;
|
|
2002
|
-
|
|
2073
|
+
_context15.next = 5;
|
|
2003
2074
|
break;
|
|
2004
2075
|
case 13:
|
|
2005
2076
|
case "end":
|
|
2006
|
-
return
|
|
2077
|
+
return _context15.stop();
|
|
2007
2078
|
}
|
|
2008
|
-
},
|
|
2079
|
+
}, _callee13, this);
|
|
2009
2080
|
}));
|
|
2010
2081
|
function apiDeleteProducts(_x20) {
|
|
2011
2082
|
return _apiDeleteProducts.apply(this, arguments);
|
|
@@ -2024,10 +2095,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2024
2095
|
}, {
|
|
2025
2096
|
key: "apiLoadProductVariantsGrouped",
|
|
2026
2097
|
value: function () {
|
|
2027
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2098
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref45) {
|
|
2028
2099
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2029
|
-
return _regeneratorRuntime.wrap(function
|
|
2030
|
-
while (1) switch (
|
|
2100
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
2101
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2031
2102
|
case 0:
|
|
2032
2103
|
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
2104
|
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' : '');
|
|
@@ -2051,15 +2122,15 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2051
2122
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2052
2123
|
});
|
|
2053
2124
|
});
|
|
2054
|
-
|
|
2125
|
+
_context16.next = 7;
|
|
2055
2126
|
return promise;
|
|
2056
2127
|
case 7:
|
|
2057
|
-
return
|
|
2128
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2058
2129
|
case 8:
|
|
2059
2130
|
case "end":
|
|
2060
|
-
return
|
|
2131
|
+
return _context16.stop();
|
|
2061
2132
|
}
|
|
2062
|
-
},
|
|
2133
|
+
}, _callee14, this);
|
|
2063
2134
|
}));
|
|
2064
2135
|
function apiLoadProductVariantsGrouped(_x21) {
|
|
2065
2136
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
@@ -2069,10 +2140,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2069
2140
|
}, {
|
|
2070
2141
|
key: "apiSaveProducts",
|
|
2071
2142
|
value: function () {
|
|
2072
|
-
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2143
|
+
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2073
2144
|
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 (
|
|
2145
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context18) {
|
|
2146
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2076
2147
|
case 0:
|
|
2077
2148
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2078
2149
|
BATCH_SIZE = 40;
|
|
@@ -2081,34 +2152,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2081
2152
|
i = 0;
|
|
2082
2153
|
case 5:
|
|
2083
2154
|
if (!(i < products.length)) {
|
|
2084
|
-
|
|
2155
|
+
_context18.next = 15;
|
|
2085
2156
|
break;
|
|
2086
2157
|
}
|
|
2087
2158
|
if (!products[i].baseProduct) {
|
|
2088
|
-
|
|
2159
|
+
_context18.next = 9;
|
|
2089
2160
|
break;
|
|
2090
2161
|
}
|
|
2091
2162
|
baseProduct = products[i];
|
|
2092
|
-
return
|
|
2163
|
+
return _context18.abrupt("continue", 12);
|
|
2093
2164
|
case 9:
|
|
2094
2165
|
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
2166
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2096
2167
|
productsPackages[groupIndex].push(products[i]);
|
|
2097
2168
|
case 12:
|
|
2098
2169
|
i++;
|
|
2099
|
-
|
|
2170
|
+
_context18.next = 5;
|
|
2100
2171
|
break;
|
|
2101
2172
|
case 15:
|
|
2102
2173
|
responseProducts = [];
|
|
2103
2174
|
_i2 = 0;
|
|
2104
2175
|
case 17:
|
|
2105
2176
|
if (!(_i2 < productsPackages.length)) {
|
|
2106
|
-
|
|
2177
|
+
_context18.next = 40;
|
|
2107
2178
|
break;
|
|
2108
2179
|
}
|
|
2109
2180
|
if (baseProduct) productsPackages[_i2].unshift(baseProduct);
|
|
2110
|
-
|
|
2111
|
-
|
|
2181
|
+
_context18.prev = 19;
|
|
2182
|
+
_context18.next = 22;
|
|
2112
2183
|
return fetch(fullUrl, {
|
|
2113
2184
|
method: 'PUT',
|
|
2114
2185
|
headers: {
|
|
@@ -2128,23 +2199,23 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2128
2199
|
return res.json();
|
|
2129
2200
|
});
|
|
2130
2201
|
case 22:
|
|
2131
|
-
response =
|
|
2202
|
+
response = _context18.sent;
|
|
2132
2203
|
if (!response.Error) {
|
|
2133
|
-
|
|
2204
|
+
_context18.next = 25;
|
|
2134
2205
|
break;
|
|
2135
2206
|
}
|
|
2136
2207
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2137
2208
|
case 25:
|
|
2138
|
-
|
|
2209
|
+
_context18.next = 30;
|
|
2139
2210
|
break;
|
|
2140
2211
|
case 27:
|
|
2141
|
-
|
|
2142
|
-
|
|
2212
|
+
_context18.prev = 27;
|
|
2213
|
+
_context18.t0 = _context18["catch"](19);
|
|
2143
2214
|
throw Error(status);
|
|
2144
2215
|
case 30:
|
|
2145
2216
|
_loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3(j) {
|
|
2146
|
-
return _regeneratorRuntime.wrap(function _loop3$(
|
|
2147
|
-
while (1) switch (
|
|
2217
|
+
return _regeneratorRuntime.wrap(function _loop3$(_context17) {
|
|
2218
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2148
2219
|
case 0:
|
|
2149
2220
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2150
2221
|
if (!responseProducts.find(function (p) {
|
|
@@ -2154,32 +2225,32 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2154
2225
|
}
|
|
2155
2226
|
case 2:
|
|
2156
2227
|
case "end":
|
|
2157
|
-
return
|
|
2228
|
+
return _context17.stop();
|
|
2158
2229
|
}
|
|
2159
2230
|
}, _loop3);
|
|
2160
2231
|
});
|
|
2161
2232
|
j = 0;
|
|
2162
2233
|
case 32:
|
|
2163
2234
|
if (!(j < response.products.length)) {
|
|
2164
|
-
|
|
2235
|
+
_context18.next = 37;
|
|
2165
2236
|
break;
|
|
2166
2237
|
}
|
|
2167
|
-
return
|
|
2238
|
+
return _context18.delegateYield(_loop3(j), "t1", 34);
|
|
2168
2239
|
case 34:
|
|
2169
2240
|
j++;
|
|
2170
|
-
|
|
2241
|
+
_context18.next = 32;
|
|
2171
2242
|
break;
|
|
2172
2243
|
case 37:
|
|
2173
2244
|
_i2++;
|
|
2174
|
-
|
|
2245
|
+
_context18.next = 17;
|
|
2175
2246
|
break;
|
|
2176
2247
|
case 40:
|
|
2177
|
-
return
|
|
2248
|
+
return _context18.abrupt("return", responseProducts);
|
|
2178
2249
|
case 41:
|
|
2179
2250
|
case "end":
|
|
2180
|
-
return
|
|
2251
|
+
return _context18.stop();
|
|
2181
2252
|
}
|
|
2182
|
-
},
|
|
2253
|
+
}, _callee15, null, [[19, 27]]);
|
|
2183
2254
|
}));
|
|
2184
2255
|
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2185
2256
|
return _apiSaveProducts.apply(this, arguments);
|
|
@@ -2406,10 +2477,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2406
2477
|
}, {
|
|
2407
2478
|
key: "loadSelectOptions",
|
|
2408
2479
|
value: function () {
|
|
2409
|
-
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2480
|
+
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2410
2481
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2411
|
-
return _regeneratorRuntime.wrap(function
|
|
2412
|
-
while (1) switch (
|
|
2482
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context19) {
|
|
2483
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2413
2484
|
case 0:
|
|
2414
2485
|
values = [];
|
|
2415
2486
|
apiUrl = dataSource.url;
|
|
@@ -2418,7 +2489,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2418
2489
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2419
2490
|
}
|
|
2420
2491
|
}
|
|
2421
|
-
|
|
2492
|
+
_context19.next = 5;
|
|
2422
2493
|
return fetch(apiUrl, {
|
|
2423
2494
|
headers: {
|
|
2424
2495
|
sessionGuid: sessionGuid
|
|
@@ -2430,7 +2501,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2430
2501
|
return res.json();
|
|
2431
2502
|
});
|
|
2432
2503
|
case 5:
|
|
2433
|
-
apiResult =
|
|
2504
|
+
apiResult = _context19.sent;
|
|
2434
2505
|
if (dataSource.useKey) {
|
|
2435
2506
|
apiResult = apiResult[dataSource.useKey];
|
|
2436
2507
|
}
|
|
@@ -2442,12 +2513,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2442
2513
|
text: text
|
|
2443
2514
|
});
|
|
2444
2515
|
}
|
|
2445
|
-
return
|
|
2516
|
+
return _context19.abrupt("return", values);
|
|
2446
2517
|
case 9:
|
|
2447
2518
|
case "end":
|
|
2448
|
-
return
|
|
2519
|
+
return _context19.stop();
|
|
2449
2520
|
}
|
|
2450
|
-
},
|
|
2521
|
+
}, _callee16);
|
|
2451
2522
|
}));
|
|
2452
2523
|
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2453
2524
|
return _loadSelectOptions.apply(this, arguments);
|
|
@@ -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;AAIpJ,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,KAAK,EACL,iBAAiB,EACjB,aAAa,E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sG;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.22",
|
|
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": "4b89be8b7d5cd32c87b0120f849156f85c23137f"
|
|
16
16
|
}
|