@crystaldesign/product-handler 26.5.0-beta.3 → 26.5.0-beta.30

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.
@@ -256,7 +256,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
256
256
  _ref3,
257
257
  _baseProduct$configur5,
258
258
  _baseProduct20;
259
- var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, isDifferentHash, _basket$OrderSets$map, _baseProduct$configur, _baseProduct$configur2, basketHashes, productHashes, _baseProduct$configur3, _baseProduct$configur4, _basket$OrderSets$map2, myDivaNr, 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;
259
+ var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, isDifferentHash, _basket$OrderSets$map, _baseProduct$configur, _baseProduct$configur2, basketHashes, productHashes, _baseProduct$configur3, _baseProduct$configur4, _basket$OrderSets$map2, myDivaNr, 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$0$config, _variantData$, _sourceConfiguration$, _sourceConfiguration$2, sourceConfiguration, orderLines, variantBasketDatas, opts, _i, initializedOptMap;
260
260
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
261
261
  while (1) switch (_context2.prev = _context2.next) {
262
262
  case 0:
@@ -486,20 +486,27 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
486
486
  _ref7[1];
487
487
  return opt.replace('OPT', '');
488
488
  });
489
- if (variantData) {
490
- optFields = ((_variantData$ = variantData[0]) === null || _variantData$ === void 0 || (_variantData$ = _variantData$.configuration) === null || _variantData$ === void 0 ? void 0 : _variantData$.OrderSets[0].OrderLines[0].VariantBasketDatas.filter(function (v) {
491
- return !v.OPT.endsWith('_val');
492
- }).map(function (vd) {
493
- var _catalogData, _vd$OptionOCD, _option$Name;
494
- var option = (_catalogData = catalogData) === null || _catalogData === void 0 ? void 0 : _catalogData[0].options[(_vd$OptionOCD = vd.OptionOCD) !== null && _vd$OptionOCD !== void 0 ? _vd$OptionOCD : 'OPT' + vd.OPT];
489
+ if (variantData || baseData.configuration) {
490
+ sourceConfiguration = (_variantData$0$config = (_variantData$ = variantData[0]) === null || _variantData$ === void 0 ? void 0 : _variantData$.configuration) !== null && _variantData$0$config !== void 0 ? _variantData$0$config : baseData.configuration;
491
+ orderLines = (_sourceConfiguration$ = sourceConfiguration === null || sourceConfiguration === void 0 || (_sourceConfiguration$2 = sourceConfiguration.OrderSets) === null || _sourceConfiguration$2 === void 0 || (_sourceConfiguration$2 = _sourceConfiguration$2[0]) === null || _sourceConfiguration$2 === void 0 ? void 0 : _sourceConfiguration$2.OrderLines) !== null && _sourceConfiguration$ !== void 0 ? _sourceConfiguration$ : [];
492
+ variantBasketDatas = orderLines.flatMap(function (ol) {
493
+ var _ol$VariantBasketData;
494
+ return ((_ol$VariantBasketData = ol === null || ol === void 0 ? void 0 : ol.VariantBasketDatas) !== null && _ol$VariantBasketData !== void 0 ? _ol$VariantBasketData : []).filter(function (v) {
495
+ var _v$OPT;
496
+ return !((_v$OPT = v.OPT) !== null && _v$OPT !== void 0 && _v$OPT.endsWith('_val'));
497
+ });
498
+ });
499
+ optFields = variantBasketDatas.map(function (vd) {
500
+ var _catalogData, _vd$OptionOCD, _ref8, _option$Name;
501
+ var option = (_catalogData = catalogData) === null || _catalogData === void 0 || (_catalogData = _catalogData[0]) === null || _catalogData === void 0 || (_catalogData = _catalogData.options) === null || _catalogData === void 0 ? void 0 : _catalogData[(_vd$OptionOCD = vd.OptionOCD) !== null && _vd$OptionOCD !== void 0 ? _vd$OptionOCD : 'OPT' + vd.OPT];
495
502
  return {
496
- field: option.OptionOCD ? option.OptionOCD.substring(3) : vd.OPT,
503
+ field: option !== null && option !== void 0 && option.OptionOCD ? option.OptionOCD.substring(3) : vd.OPT,
497
504
  type: 'string',
498
- title: (_option$Name = option === null || option === void 0 ? void 0 : option.Name) !== null && _option$Name !== void 0 ? _option$Name : vd.OPT,
505
+ title: (_ref8 = (_option$Name = option === null || option === void 0 ? void 0 : option.Name) !== null && _option$Name !== void 0 ? _option$Name : vd.OPTName) !== null && _ref8 !== void 0 ? _ref8 : vd.OPT,
499
506
  readOnly: true,
500
507
  fieldType: 'OPT'
501
508
  };
502
- })) || [];
509
+ });
503
510
  //remove duplicates
504
511
  opts = {};
505
512
  for (_i = optFields.length - 1; _i >= 0; _i--) {
@@ -608,7 +615,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
608
615
  }
609
616
  }
610
617
  if (fieldConfiguration !== null && fieldConfiguration !== void 0 && fieldConfiguration.delivery) {
611
- var _baseProduct$delivery, _baseProduct$delivery2, _baseProduct$delivery3, _baseProduct$delivery4, _baseProduct$delivery5, _baseProduct$delivery6, _baseProduct$delivery7, _baseProduct$delivery8, _baseProduct$delivery9, _baseProduct$delivery10, _ref8, _baseProduct$delivery11, _baseProduct$delivery12, _fieldConfiguration$d, _ref9, _baseProduct$delivery13, _baseProduct$delivery14, _fieldConfiguration$d2, _ref10, _baseProduct$delivery15, _baseProduct$delivery16, _fieldConfiguration$d3;
618
+ var _baseProduct$delivery, _baseProduct$delivery2, _baseProduct$delivery3, _baseProduct$delivery4, _baseProduct$delivery5, _baseProduct$delivery6, _baseProduct$delivery7, _baseProduct$delivery8, _baseProduct$delivery9, _baseProduct$delivery10, _ref9, _baseProduct$delivery11, _baseProduct$delivery12, _fieldConfiguration$d, _ref10, _baseProduct$delivery13, _baseProduct$delivery14, _fieldConfiguration$d2, _ref11, _baseProduct$delivery15, _baseProduct$delivery16, _fieldConfiguration$d3;
612
619
  var config = {
613
620
  addedPackageWeight: 0,
614
621
  addedPackageHeight: 0,
@@ -655,9 +662,9 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
655
662
  }).filter(function (f) {
656
663
  return f;
657
664
  })))),
658
- deliveryTime: (_ref8 = (_baseProduct$delivery11 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery12 = baseProduct.delivery) === null || _baseProduct$delivery12 === void 0 ? void 0 : _baseProduct$delivery12.deliveryTime) !== null && _baseProduct$delivery11 !== void 0 ? _baseProduct$delivery11 : (_fieldConfiguration$d = fieldConfiguration.delivery) === null || _fieldConfiguration$d === void 0 ? void 0 : _fieldConfiguration$d.defaultDeliveryTime) !== null && _ref8 !== void 0 ? _ref8 : 0,
659
- deliveryPrice: (_ref9 = (_baseProduct$delivery13 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery14 = baseProduct.delivery) === null || _baseProduct$delivery14 === void 0 ? void 0 : _baseProduct$delivery14.deliveryPrice) !== null && _baseProduct$delivery13 !== void 0 ? _baseProduct$delivery13 : (_fieldConfiguration$d2 = fieldConfiguration.delivery) === null || _fieldConfiguration$d2 === void 0 ? void 0 : _fieldConfiguration$d2.defaultDeliveryPrice) !== null && _ref9 !== void 0 ? _ref9 : 0,
660
- installationPrice: (_ref10 = (_baseProduct$delivery15 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery16 = baseProduct.delivery) === null || _baseProduct$delivery16 === void 0 ? void 0 : _baseProduct$delivery16.installationPrice) !== null && _baseProduct$delivery15 !== void 0 ? _baseProduct$delivery15 : (_fieldConfiguration$d3 = fieldConfiguration.delivery) === null || _fieldConfiguration$d3 === void 0 ? void 0 : _fieldConfiguration$d3.defaultInstallationPrice) !== null && _ref10 !== void 0 ? _ref10 : 0
665
+ deliveryTime: (_ref9 = (_baseProduct$delivery11 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery12 = baseProduct.delivery) === null || _baseProduct$delivery12 === void 0 ? void 0 : _baseProduct$delivery12.deliveryTime) !== null && _baseProduct$delivery11 !== void 0 ? _baseProduct$delivery11 : (_fieldConfiguration$d = fieldConfiguration.delivery) === null || _fieldConfiguration$d === void 0 ? void 0 : _fieldConfiguration$d.defaultDeliveryTime) !== null && _ref9 !== void 0 ? _ref9 : 0,
666
+ deliveryPrice: (_ref10 = (_baseProduct$delivery13 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery14 = baseProduct.delivery) === null || _baseProduct$delivery14 === void 0 ? void 0 : _baseProduct$delivery14.deliveryPrice) !== null && _baseProduct$delivery13 !== void 0 ? _baseProduct$delivery13 : (_fieldConfiguration$d2 = fieldConfiguration.delivery) === null || _fieldConfiguration$d2 === void 0 ? void 0 : _fieldConfiguration$d2.defaultDeliveryPrice) !== null && _ref10 !== void 0 ? _ref10 : 0,
667
+ installationPrice: (_ref11 = (_baseProduct$delivery15 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery16 = baseProduct.delivery) === null || _baseProduct$delivery16 === void 0 ? void 0 : _baseProduct$delivery16.installationPrice) !== null && _baseProduct$delivery15 !== void 0 ? _baseProduct$delivery15 : (_fieldConfiguration$d3 = fieldConfiguration.delivery) === null || _fieldConfiguration$d3 === void 0 ? void 0 : _fieldConfiguration$d3.defaultInstallationPrice) !== null && _ref11 !== void 0 ? _ref11 : 0
661
668
  };
662
669
  }
663
670
  var ismanual = (baseProduct === null || baseProduct === void 0 ? void 0 : baseProduct.calculatedPrice) !== (baseProduct === null || baseProduct === void 0 ? void 0 : baseProduct.addedPrice);
@@ -806,11 +813,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
806
813
  key: "mapCategory",
807
814
  value: function mapCategory(value, translations) {
808
815
  var _translations$find2;
809
- var _ref11 = (_translations$find2 = translations === null || translations === void 0 ? void 0 : translations.find(function (t) {
816
+ var _ref12 = (_translations$find2 = translations === null || translations === void 0 ? void 0 : translations.find(function (t) {
810
817
  return t.value == value;
811
818
  })) !== null && _translations$find2 !== void 0 ? _translations$find2 : {};
812
- _ref11.value;
813
- var translation = _objectWithoutProperties__default["default"](_ref11, _excluded);
819
+ _ref12.value;
820
+ var translation = _objectWithoutProperties__default["default"](_ref12, _excluded);
814
821
  if (Object.keys(translation).length) {
815
822
  return translation;
816
823
  }
@@ -839,13 +846,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
839
846
  }, {
840
847
  key: "prepareData",
841
848
  value: function () {
842
- var _prepareData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(_ref12) {
849
+ var _prepareData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(_ref13) {
843
850
  var _this3 = this;
844
- var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref12$oldClassificat, oldClassificationData, originProductId, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$openModal, _this$t, _j, _this$openModal2, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
851
+ var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, _originProduct$custom, _originProduct$custom2, _originProduct$custom3, _originProduct$custom4, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$openModal, _this$t, _j, _this$openModal2, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
845
852
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context5) {
846
853
  while (1) switch (_context5.prev = _context5.next) {
847
854
  case 0:
848
- basket = _ref12.basket, baseData = _ref12.baseData, classificationData = _ref12.classificationData, variantData = _ref12.variantData, removedProducts = _ref12.removedProducts, removedMedia = _ref12.removedMedia, classificationFields = _ref12.classificationFields, fieldConfiguration = _ref12.fieldConfiguration, optMap = _ref12.optMap, _ref12$oldClassificat = _ref12.oldClassificationData, oldClassificationData = _ref12$oldClassificat === void 0 ? {} : _ref12$oldClassificat, originProductId = _ref12.originProductId;
855
+ basket = _ref13.basket, baseData = _ref13.baseData, classificationData = _ref13.classificationData, variantData = _ref13.variantData, removedProducts = _ref13.removedProducts, removedMedia = _ref13.removedMedia, classificationFields = _ref13.classificationFields, fieldConfiguration = _ref13.fieldConfiguration, optMap = _ref13.optMap, _ref13$oldClassificat = _ref13.oldClassificationData, oldClassificationData = _ref13$oldClassificat === void 0 ? {} : _ref13$oldClassificat, originProductId = _ref13.originProductId;
849
856
  products = [];
850
857
  originProduct = undefined;
851
858
  mediasToSave = [];
@@ -868,8 +875,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
868
875
  }
869
876
  throw new Error('Origin Product not found');
870
877
  case 11:
871
- sapEinaLifNr = originProduct.customData.SAP_EINA_LIFNR.value;
872
- sapEineEkgrp = originProduct.customData.SAP_EINE_EKGRP.value;
878
+ sapEinaLifNr = (_originProduct$custom = (_originProduct$custom2 = originProduct.customData.SAP) === null || _originProduct$custom2 === void 0 ? void 0 : _originProduct$custom2.SAP_EINA_LIFNR) !== null && _originProduct$custom !== void 0 ? _originProduct$custom : originProduct.customData.SAP_EINA_LIFNR.value;
879
+ sapEineEkgrp = (_originProduct$custom3 = (_originProduct$custom4 = originProduct.customData.SAP) === null || _originProduct$custom4 === void 0 ? void 0 : _originProduct$custom4.SAP_EINE_EKGRP) !== null && _originProduct$custom3 !== void 0 ? _originProduct$custom3 : originProduct.customData.SAP_EINE_EKGRP.value;
873
880
  if (!(!sapEinaLifNr || !sapEineEkgrp)) {
874
881
  _context5.next = 16;
875
882
  break;
@@ -892,11 +899,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
892
899
  }
893
900
  this.trimStrings(baseData);
894
901
  //the base product is constructed, based on baseData and classification data
895
- baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref13) {
902
+ baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref14) {
896
903
  var _fieldConfiguration$c;
897
- var _ref14 = _slicedToArray__default["default"](_ref13, 2),
898
- key = _ref14[0],
899
- value = _ref14[1];
904
+ var _ref15 = _slicedToArray__default["default"](_ref14, 2),
905
+ key = _ref15[0],
906
+ value = _ref15[1];
900
907
  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);
901
908
  return prev;
902
909
  }, {})), {}, {
@@ -908,11 +915,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
908
915
  });
909
916
  if (!originProduct && baseData.customData) {
910
917
  //convert all customData to objects with value and translations, if they exists
911
- Object.entries(baseData.customData).forEach(function (_ref15) {
918
+ Object.entries(baseData.customData).forEach(function (_ref16) {
912
919
  var _baseProduct$customDa;
913
- var _ref16 = _slicedToArray__default["default"](_ref15, 2),
914
- key = _ref16[0],
915
- value = _ref16[1];
920
+ var _ref17 = _slicedToArray__default["default"](_ref16, 2),
921
+ key = _ref17[0],
922
+ value = _ref17[1];
916
923
  if (!((_baseProduct$customDa = baseProduct.customData[key]) !== null && _baseProduct$customDa !== void 0 && _baseProduct$customDa.value)) {
917
924
  var _fieldConfiguration$a;
918
925
  baseProduct.customData[key] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$a = fieldConfiguration.additional) === null || _fieldConfiguration$a === void 0 || (_fieldConfiguration$a = _fieldConfiguration$a[key]) === null || _fieldConfiguration$a === void 0 ? void 0 : _fieldConfiguration$a.values);
@@ -921,16 +928,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
921
928
  }
922
929
  if (optMap) {
923
930
  //save to class fields the information to which opt it maps
924
- Object.entries(optMap).filter(function (_ref17) {
925
- var _ref18 = _slicedToArray__default["default"](_ref17, 2);
926
- _ref18[0];
927
- var value = _ref18[1];
931
+ Object.entries(optMap).filter(function (_ref18) {
932
+ var _ref19 = _slicedToArray__default["default"](_ref18, 2);
933
+ _ref19[0];
934
+ var value = _ref19[1];
928
935
  return value;
929
- }).forEach(function (_ref19) {
936
+ }).forEach(function (_ref20) {
930
937
  var _baseProduct21;
931
- var _ref20 = _slicedToArray__default["default"](_ref19, 2),
932
- key = _ref20[0],
933
- value = _ref20[1];
938
+ var _ref21 = _slicedToArray__default["default"](_ref20, 2),
939
+ key = _ref21[0],
940
+ value = _ref21[1];
934
941
  return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct21 = baseProduct["dc_".concat(key)]) !== null && _baseProduct21 !== void 0 ? _baseProduct21 : {}), {}, {
935
942
  opt: value.field
936
943
  });
@@ -1005,11 +1012,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1005
1012
  case 3:
1006
1013
  varinatBase = {};
1007
1014
  classData = {};
1008
- Object.entries(vd).forEach(function (_ref21) {
1015
+ Object.entries(vd).forEach(function (_ref22) {
1009
1016
  var _optMap$key;
1010
- var _ref22 = _slicedToArray__default["default"](_ref21, 2),
1011
- key = _ref22[0],
1012
- value = _ref22[1];
1017
+ var _ref23 = _slicedToArray__default["default"](_ref22, 2),
1018
+ key = _ref23[0],
1019
+ value = _ref23[1];
1013
1020
  //save those fields that are specified as class fields
1014
1021
  if (classificationFields !== null && classificationFields !== void 0 && classificationFields.includes(key) && (value || optMap !== null && optMap !== void 0 && (_optMap$key = optMap[key]) !== null && _optMap$key !== void 0 && _optMap$key.field)) {
1015
1022
  classData["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 ? void 0 : fieldConfiguration.classMap[key].values);
@@ -1023,16 +1030,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1023
1030
  });
1024
1031
  if (optMap) {
1025
1032
  //save to class fields the information to which opt it maps
1026
- Object.entries(optMap).filter(function (_ref23) {
1027
- var _ref24 = _slicedToArray__default["default"](_ref23, 2);
1028
- _ref24[0];
1029
- var value = _ref24[1];
1033
+ Object.entries(optMap).filter(function (_ref24) {
1034
+ var _ref25 = _slicedToArray__default["default"](_ref24, 2);
1035
+ _ref25[0];
1036
+ var value = _ref25[1];
1030
1037
  return value;
1031
- }).forEach(function (_ref25) {
1038
+ }).forEach(function (_ref26) {
1032
1039
  var _oldClassificationDat, _oldClassificationDat2, _value$field, _value$field2, _value$field3, _value$field4;
1033
- var _ref26 = _slicedToArray__default["default"](_ref25, 2),
1034
- key = _ref26[0],
1035
- value = _ref26[1];
1040
+ var _ref27 = _slicedToArray__default["default"](_ref26, 2),
1041
+ key = _ref27[0],
1042
+ value = _ref27[1];
1036
1043
  return classData["dc_".concat(key)] = _objectSpread(_objectSpread(_objectSpread({}, (_oldClassificationDat = (_oldClassificationDat2 = oldClassificationData[vd._id]) === null || _oldClassificationDat2 === void 0 ? void 0 : _oldClassificationDat2["dc_".concat(key)]) !== null && _oldClassificationDat !== void 0 ? _oldClassificationDat : {}), classData["dc_".concat(key)]), {}, {
1037
1044
  opt: value.field,
1038
1045
  opv: (_value$field = vd[value.field]) === null || _value$field === void 0 ? void 0 : _value$field.codex,
@@ -1048,11 +1055,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1048
1055
  if (vd.customData) {
1049
1056
  customData = {};
1050
1057
  //convert all customData to objects with value and translations, if they exists
1051
- Object.entries(vd.customData).forEach(function (_ref27) {
1058
+ Object.entries(vd.customData).forEach(function (_ref28) {
1052
1059
  var _vd$customData, _fieldConfiguration$a2;
1053
- var _ref28 = _slicedToArray__default["default"](_ref27, 2),
1054
- key = _ref28[0],
1055
- value = _ref28[1];
1060
+ var _ref29 = _slicedToArray__default["default"](_ref28, 2),
1061
+ key = _ref29[0],
1062
+ value = _ref29[1];
1056
1063
  if (!((_vd$customData = vd.customData) !== null && _vd$customData !== void 0 && (_vd$customData = _vd$customData[key]) !== null && _vd$customData !== void 0 && _vd$customData.value)) customData[key] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$a2 = fieldConfiguration.additional) === null || _fieldConfiguration$a2 === void 0 || (_fieldConfiguration$a2 = _fieldConfiguration$a2[key]) === null || _fieldConfiguration$a2 === void 0 ? void 0 : _fieldConfiguration$a2.values);
1057
1064
  });
1058
1065
  }
@@ -1086,6 +1093,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1086
1093
  },
1087
1094
  SAP_EINE_EKGRP: {
1088
1095
  value: sapEineEkgrp
1096
+ },
1097
+ SAP: {
1098
+ SAP_EINA_LIFNR: sapEinaLifNr,
1099
+ SAP_EINE_EKGRP: sapEineEkgrp
1089
1100
  }
1090
1101
  }) : customData,
1091
1102
  modelInfoPageWeight: baseProduct.modelInfoPageWeight,
@@ -1230,12 +1241,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1230
1241
  }, {
1231
1242
  key: "saveProducts",
1232
1243
  value: function () {
1233
- var _saveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(_ref29) {
1244
+ var _saveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(_ref30) {
1234
1245
  var products, removedProducts, awaitPDF, _this$closeModal2, savedProducts, _this$closeModal3;
1235
1246
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
1236
1247
  while (1) switch (_context6.prev = _context6.next) {
1237
1248
  case 0:
1238
- products = _ref29.products, removedProducts = _ref29.removedProducts, awaitPDF = _ref29.awaitPDF;
1249
+ products = _ref30.products, removedProducts = _ref30.removedProducts, awaitPDF = _ref30.awaitPDF;
1239
1250
  if (this.jwt) {
1240
1251
  _context6.next = 3;
1241
1252
  break;
@@ -1301,24 +1312,24 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1301
1312
  var _basket$OrderSets$0$C3, _variantProduct$confi, _variantProduct$confi2, _variantProduct$order, _classificationFields;
1302
1313
  var _this$parseClassifica = this.parseClassificationFields(variantProduct),
1303
1314
  parsedProduct = _this$parseClassifica.product;
1304
- var _ref30 = (basket === null || basket === void 0 || (_basket$OrderSets$0$C3 = basket.OrderSets[0].ConfigVariants) === null || _basket$OrderSets$0$C3 === void 0 ? void 0 : _basket$OrderSets$0$C3.find(function (vd) {
1315
+ var _ref31 = (basket === null || basket === void 0 || (_basket$OrderSets$0$C3 = basket.OrderSets[0].ConfigVariants) === null || _basket$OrderSets$0$C3 === void 0 ? void 0 : _basket$OrderSets$0$C3.find(function (vd) {
1305
1316
  return vd.VariantID === cv;
1306
1317
  })) || {
1307
1318
  VariantBasketDatas: ProductHandlerAbstract.getVariantBasketDatasByOrderlines((_variantProduct$confi = variantProduct === null || variantProduct === void 0 || (_variantProduct$confi2 = variantProduct.configuration) === null || _variantProduct$confi2 === void 0 ? void 0 : _variantProduct$confi2.OrderSets[0].OrderLines) !== null && _variantProduct$confi !== void 0 ? _variantProduct$confi : [], catalogData)
1308
1319
  },
1309
- VariantID = _ref30.VariantID,
1310
- SetImage = _ref30.SetImage,
1311
- Set2DImage = _ref30.Set2DImage,
1312
- SetPrice = _ref30.SetPrice,
1313
- VariantBasketDatas = _ref30.VariantBasketDatas,
1314
- BBox = _ref30.BBox,
1315
- MetaData = _ref30.MetaData,
1316
- MetaData_locales = _ref30.MetaData_locales,
1317
- Variant = _ref30.Variant,
1318
- SetHash = _ref30.SetHash,
1319
- Diva3DProject = _ref30.Diva3DProject,
1320
- VariantDescription_locales = _ref30.VariantDescription_locales,
1321
- VariantDescription = _ref30.VariantDescription;
1320
+ VariantID = _ref31.VariantID,
1321
+ SetImage = _ref31.SetImage,
1322
+ Set2DImage = _ref31.Set2DImage,
1323
+ SetPrice = _ref31.SetPrice,
1324
+ VariantBasketDatas = _ref31.VariantBasketDatas,
1325
+ BBox = _ref31.BBox,
1326
+ MetaData = _ref31.MetaData,
1327
+ MetaData_locales = _ref31.MetaData_locales,
1328
+ Variant = _ref31.Variant,
1329
+ SetHash = _ref31.SetHash,
1330
+ Diva3DProject = _ref31.Diva3DProject,
1331
+ VariantDescription_locales = _ref31.VariantDescription_locales,
1332
+ VariantDescription = _ref31.VariantDescription;
1322
1333
  //total and summary price are currently not avialable per varinat,
1323
1334
  //most of the time the prices will allways be the same and since we currently not support varinats for multiple sets
1324
1335
  //we use the addedPrice of the baseData as long as the calculatedPrice is the same as the SetPrice of the variant
@@ -1457,10 +1468,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1457
1468
  key: "initOpvMap",
1458
1469
  value: function initOpvMap(optFields, classificationConfig, savedOptMap) {
1459
1470
  var optMap = {};
1460
- Object.entries((classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap) || {}).forEach(function (_ref31) {
1461
- var _ref32 = _slicedToArray__default["default"](_ref31, 2),
1462
- c = _ref32[0],
1463
- optMapping = _ref32[1].optMapping;
1471
+ Object.entries((classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap) || {}).forEach(function (_ref32) {
1472
+ var _ref33 = _slicedToArray__default["default"](_ref32, 2),
1473
+ c = _ref33[0],
1474
+ optMapping = _ref33[1].optMapping;
1464
1475
  var optField;
1465
1476
  if (savedOptMap !== null && savedOptMap !== void 0 && savedOptMap[c]) {
1466
1477
  optField = optFields.find(function (opt) {
@@ -1521,16 +1532,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1521
1532
  var _classificationConfig;
1522
1533
  //add metadata defined as classification to classificationdata
1523
1534
  var metadataAsClassification = {};
1524
- Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref33) {
1525
- var _ref34 = _slicedToArray__default["default"](_ref33, 1),
1526
- key = _ref34[0];
1535
+ Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref34) {
1536
+ var _ref35 = _slicedToArray__default["default"](_ref34, 1),
1537
+ key = _ref35[0];
1527
1538
  return classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap[key];
1528
1539
  })
1529
1540
  //if it is defiend as multi field, use full array otherwise only first element of array
1530
- .forEach(function (_ref35) {
1531
- var _ref36 = _slicedToArray__default["default"](_ref35, 2),
1532
- key = _ref36[0],
1533
- value = _ref36[1];
1541
+ .forEach(function (_ref36) {
1542
+ var _ref37 = _slicedToArray__default["default"](_ref36, 2),
1543
+ key = _ref37[0],
1544
+ value = _ref37[1];
1534
1545
  return metadataAsClassification[key] = classificationConfig.classMap[key].multi ? value : value === null || value === void 0 ? void 0 : value[0];
1535
1546
  });
1536
1547
 
@@ -1540,14 +1551,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1540
1551
  optMap = _this$parseClassifica2.optMap;
1541
1552
  var classificationData = _objectSpread(_objectSpread({}, metadataAsClassification), productClassification);
1542
1553
  var customData = {};
1543
- Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref37) {
1544
- var _ref38 = _slicedToArray__default["default"](_ref37, 1),
1545
- key = _ref38[0];
1554
+ Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref38) {
1555
+ var _ref39 = _slicedToArray__default["default"](_ref38, 1),
1556
+ key = _ref39[0];
1546
1557
  return !(classificationConfig !== null && classificationConfig !== void 0 && classificationConfig.classMap[key]);
1547
- }).forEach(function (_ref39) {
1548
- var _ref40 = _slicedToArray__default["default"](_ref39, 2),
1549
- key = _ref40[0],
1550
- value = _ref40[1];
1558
+ }).forEach(function (_ref40) {
1559
+ var _ref41 = _slicedToArray__default["default"](_ref40, 2),
1560
+ key = _ref41[0],
1561
+ value = _ref41[1];
1551
1562
  var langs = {};
1552
1563
  if (metaData_locales !== null && metaData_locales !== void 0 && metaData_locales[key]) {
1553
1564
  for (var i = 0; i < metaData_locales[key].length; i++) {
@@ -1579,14 +1590,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1579
1590
 
1580
1591
  //repare customData
1581
1592
  //if it is defiend as multi field, use full array otherwise only first element of array
1582
- Object.entries((_classificationConfig = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.additional) !== null && _classificationConfig !== void 0 ? _classificationConfig : []).filter(function (_ref41) {
1583
- var _ref42 = _slicedToArray__default["default"](_ref41, 1),
1584
- key = _ref42[0];
1593
+ Object.entries((_classificationConfig = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.additional) !== null && _classificationConfig !== void 0 ? _classificationConfig : []).filter(function (_ref42) {
1594
+ var _ref43 = _slicedToArray__default["default"](_ref42, 1),
1595
+ key = _ref43[0];
1585
1596
  return customData[key] != undefined;
1586
- }).forEach(function (_ref43) {
1587
- var _ref44 = _slicedToArray__default["default"](_ref43, 2),
1588
- key = _ref44[0],
1589
- value = _ref44[1];
1597
+ }).forEach(function (_ref44) {
1598
+ var _ref45 = _slicedToArray__default["default"](_ref44, 2),
1599
+ key = _ref45[0],
1600
+ value = _ref45[1];
1590
1601
  if (value.multi && !Array.isArray(customData[key])) {
1591
1602
  customData[key] = [customData[key]];
1592
1603
  } else if (!value.multi && Array.isArray(customData[key])) {
@@ -1805,13 +1816,20 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1805
1816
  key: "apiGetCatalogDataIDM",
1806
1817
  value: function () {
1807
1818
  var _apiGetCatalogDataIDM = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(serieNo, language, catalogId) {
1808
- var _cat$Properties, _cat$detailInfos$filt, _cat$detailInfos;
1809
- var fullUrl, response, cat, actCatalogInfoData;
1819
+ var _this$organization, _cat$Properties, _cat$detailInfos$filt, _cat$detailInfos;
1820
+ var organizationId, fullUrl, response, cat, actCatalogInfoData;
1810
1821
  return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context10) {
1811
1822
  while (1) switch (_context10.prev = _context10.next) {
1812
1823
  case 0:
1813
- fullUrl = this.enricherService + '/live/catalogs/' + catalogId + '/series/' + serieNo;
1814
- _context10.next = 3;
1824
+ organizationId = (_this$organization = this.organization) === null || _this$organization === void 0 ? void 0 : _this$organization._id;
1825
+ if (organizationId) {
1826
+ _context10.next = 3;
1827
+ break;
1828
+ }
1829
+ throw new Error('organizationId is required to load IDM catalog data');
1830
+ case 3:
1831
+ fullUrl = this.enricherService + '/live/' + organizationId + '/packages/' + catalogId + '/series/' + serieNo;
1832
+ _context10.next = 6;
1815
1833
  return fetch(fullUrl, {
1816
1834
  headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
1817
1835
  'Content-Type': 'application/json'
@@ -1822,21 +1840,21 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1822
1840
  }
1823
1841
  return res.json();
1824
1842
  });
1825
- case 3:
1843
+ case 6:
1826
1844
  response = _context10.sent;
1827
1845
  if (!response.Error) {
1828
- _context10.next = 6;
1846
+ _context10.next = 9;
1829
1847
  break;
1830
1848
  }
1831
1849
  throw new Error(response.Error);
1832
- case 6:
1850
+ case 9:
1833
1851
  cat = response;
1834
1852
  if (cat) {
1835
- _context10.next = 9;
1853
+ _context10.next = 12;
1836
1854
  break;
1837
1855
  }
1838
1856
  throw new Error('serieNo: ' + serieNo + ' not found');
1839
- case 9:
1857
+ case 12:
1840
1858
  actCatalogInfoData = {
1841
1859
  lang: language,
1842
1860
  guid: cat._id,
@@ -1865,7 +1883,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1865
1883
  documents: []
1866
1884
  };
1867
1885
  return _context10.abrupt("return", actCatalogInfoData);
1868
- case 11:
1886
+ case 14:
1869
1887
  case "end":
1870
1888
  return _context10.stop();
1871
1889
  }
@@ -2236,12 +2254,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
2236
2254
  }, {
2237
2255
  key: "apiLoadProductVariantsGrouped",
2238
2256
  value: function () {
2239
- var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(_ref45) {
2240
- var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
2257
+ var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(_ref46) {
2258
+ var limit, skip, fields, _ref46$search, search, sort, favorites, abortController, fullUrl, headers, promise;
2241
2259
  return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context17) {
2242
2260
  while (1) switch (_context17.prev = _context17.next) {
2243
2261
  case 0:
2244
- 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;
2262
+ limit = _ref46.limit, skip = _ref46.skip, fields = _ref46.fields, _ref46$search = _ref46.search, search = _ref46$search === void 0 ? [] : _ref46$search, sort = _ref46.sort, favorites = _ref46.favorites, abortController = _ref46.abortController;
2245
2263
  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' : '');
2246
2264
  headers = {
2247
2265
  'Content-Type': 'application/json'
@@ -2625,10 +2643,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
2625
2643
  return Object.assign.apply(Object, [target].concat(_toConsumableArray__default["default"](sources.filter(function (s) {
2626
2644
  return s;
2627
2645
  }).map(function (x) {
2628
- return Object.fromEntries(Object.entries(x).filter(function (_ref46) {
2629
- var _ref47 = _slicedToArray__default["default"](_ref46, 2);
2630
- _ref47[0];
2631
- var value = _ref47[1];
2646
+ return Object.fromEntries(Object.entries(x).filter(function (_ref47) {
2647
+ var _ref48 = _slicedToArray__default["default"](_ref47, 2);
2648
+ _ref48[0];
2649
+ var value = _ref48[1];
2632
2650
  return value !== undefined;
2633
2651
  }));
2634
2652
  }))));
@@ -238,7 +238,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
238
238
  _ref3,
239
239
  _baseProduct$configur5,
240
240
  _baseProduct20;
241
- var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, isDifferentHash, _basket$OrderSets$map, _baseProduct$configur, _baseProduct$configur2, basketHashes, productHashes, _baseProduct$configur3, _baseProduct$configur4, _basket$OrderSets$map2, myDivaNr, 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;
241
+ var basket, divaNr, catalogData, productData, classificationFields, fieldConfiguration, customBaseFields, classificationConfig, _ref2$availableLangua, availableLanguages, _ref2$currentLang, currentLang, getUniqueNewDivaNr, products, baseProduct, variantProducts, isDifferentHash, _basket$OrderSets$map, _baseProduct$configur, _baseProduct$configur2, basketHashes, productHashes, _baseProduct$configur3, _baseProduct$configur4, _basket$OrderSets$map2, myDivaNr, 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$0$config, _variantData$, _sourceConfiguration$, _sourceConfiguration$2, sourceConfiguration, orderLines, variantBasketDatas, opts, _i, initializedOptMap;
242
242
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
243
243
  while (1) switch (_context2.prev = _context2.next) {
244
244
  case 0:
@@ -468,20 +468,27 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
468
468
  _ref7[1];
469
469
  return opt.replace('OPT', '');
470
470
  });
471
- if (variantData) {
472
- optFields = ((_variantData$ = variantData[0]) === null || _variantData$ === void 0 || (_variantData$ = _variantData$.configuration) === null || _variantData$ === void 0 ? void 0 : _variantData$.OrderSets[0].OrderLines[0].VariantBasketDatas.filter(function (v) {
473
- return !v.OPT.endsWith('_val');
474
- }).map(function (vd) {
475
- var _catalogData, _vd$OptionOCD, _option$Name;
476
- var option = (_catalogData = catalogData) === null || _catalogData === void 0 ? void 0 : _catalogData[0].options[(_vd$OptionOCD = vd.OptionOCD) !== null && _vd$OptionOCD !== void 0 ? _vd$OptionOCD : 'OPT' + vd.OPT];
471
+ if (variantData || baseData.configuration) {
472
+ sourceConfiguration = (_variantData$0$config = (_variantData$ = variantData[0]) === null || _variantData$ === void 0 ? void 0 : _variantData$.configuration) !== null && _variantData$0$config !== void 0 ? _variantData$0$config : baseData.configuration;
473
+ orderLines = (_sourceConfiguration$ = sourceConfiguration === null || sourceConfiguration === void 0 || (_sourceConfiguration$2 = sourceConfiguration.OrderSets) === null || _sourceConfiguration$2 === void 0 || (_sourceConfiguration$2 = _sourceConfiguration$2[0]) === null || _sourceConfiguration$2 === void 0 ? void 0 : _sourceConfiguration$2.OrderLines) !== null && _sourceConfiguration$ !== void 0 ? _sourceConfiguration$ : [];
474
+ variantBasketDatas = orderLines.flatMap(function (ol) {
475
+ var _ol$VariantBasketData;
476
+ return ((_ol$VariantBasketData = ol === null || ol === void 0 ? void 0 : ol.VariantBasketDatas) !== null && _ol$VariantBasketData !== void 0 ? _ol$VariantBasketData : []).filter(function (v) {
477
+ var _v$OPT;
478
+ return !((_v$OPT = v.OPT) !== null && _v$OPT !== void 0 && _v$OPT.endsWith('_val'));
479
+ });
480
+ });
481
+ optFields = variantBasketDatas.map(function (vd) {
482
+ var _catalogData, _vd$OptionOCD, _ref8, _option$Name;
483
+ var option = (_catalogData = catalogData) === null || _catalogData === void 0 || (_catalogData = _catalogData[0]) === null || _catalogData === void 0 || (_catalogData = _catalogData.options) === null || _catalogData === void 0 ? void 0 : _catalogData[(_vd$OptionOCD = vd.OptionOCD) !== null && _vd$OptionOCD !== void 0 ? _vd$OptionOCD : 'OPT' + vd.OPT];
477
484
  return {
478
- field: option.OptionOCD ? option.OptionOCD.substring(3) : vd.OPT,
485
+ field: option !== null && option !== void 0 && option.OptionOCD ? option.OptionOCD.substring(3) : vd.OPT,
479
486
  type: 'string',
480
- title: (_option$Name = option === null || option === void 0 ? void 0 : option.Name) !== null && _option$Name !== void 0 ? _option$Name : vd.OPT,
487
+ title: (_ref8 = (_option$Name = option === null || option === void 0 ? void 0 : option.Name) !== null && _option$Name !== void 0 ? _option$Name : vd.OPTName) !== null && _ref8 !== void 0 ? _ref8 : vd.OPT,
481
488
  readOnly: true,
482
489
  fieldType: 'OPT'
483
490
  };
484
- })) || [];
491
+ });
485
492
  //remove duplicates
486
493
  opts = {};
487
494
  for (_i = optFields.length - 1; _i >= 0; _i--) {
@@ -590,7 +597,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
590
597
  }
591
598
  }
592
599
  if (fieldConfiguration !== null && fieldConfiguration !== void 0 && fieldConfiguration.delivery) {
593
- var _baseProduct$delivery, _baseProduct$delivery2, _baseProduct$delivery3, _baseProduct$delivery4, _baseProduct$delivery5, _baseProduct$delivery6, _baseProduct$delivery7, _baseProduct$delivery8, _baseProduct$delivery9, _baseProduct$delivery10, _ref8, _baseProduct$delivery11, _baseProduct$delivery12, _fieldConfiguration$d, _ref9, _baseProduct$delivery13, _baseProduct$delivery14, _fieldConfiguration$d2, _ref10, _baseProduct$delivery15, _baseProduct$delivery16, _fieldConfiguration$d3;
600
+ var _baseProduct$delivery, _baseProduct$delivery2, _baseProduct$delivery3, _baseProduct$delivery4, _baseProduct$delivery5, _baseProduct$delivery6, _baseProduct$delivery7, _baseProduct$delivery8, _baseProduct$delivery9, _baseProduct$delivery10, _ref9, _baseProduct$delivery11, _baseProduct$delivery12, _fieldConfiguration$d, _ref10, _baseProduct$delivery13, _baseProduct$delivery14, _fieldConfiguration$d2, _ref11, _baseProduct$delivery15, _baseProduct$delivery16, _fieldConfiguration$d3;
594
601
  var config = {
595
602
  addedPackageWeight: 0,
596
603
  addedPackageHeight: 0,
@@ -637,9 +644,9 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
637
644
  }).filter(function (f) {
638
645
  return f;
639
646
  })))),
640
- deliveryTime: (_ref8 = (_baseProduct$delivery11 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery12 = baseProduct.delivery) === null || _baseProduct$delivery12 === void 0 ? void 0 : _baseProduct$delivery12.deliveryTime) !== null && _baseProduct$delivery11 !== void 0 ? _baseProduct$delivery11 : (_fieldConfiguration$d = fieldConfiguration.delivery) === null || _fieldConfiguration$d === void 0 ? void 0 : _fieldConfiguration$d.defaultDeliveryTime) !== null && _ref8 !== void 0 ? _ref8 : 0,
641
- deliveryPrice: (_ref9 = (_baseProduct$delivery13 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery14 = baseProduct.delivery) === null || _baseProduct$delivery14 === void 0 ? void 0 : _baseProduct$delivery14.deliveryPrice) !== null && _baseProduct$delivery13 !== void 0 ? _baseProduct$delivery13 : (_fieldConfiguration$d2 = fieldConfiguration.delivery) === null || _fieldConfiguration$d2 === void 0 ? void 0 : _fieldConfiguration$d2.defaultDeliveryPrice) !== null && _ref9 !== void 0 ? _ref9 : 0,
642
- installationPrice: (_ref10 = (_baseProduct$delivery15 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery16 = baseProduct.delivery) === null || _baseProduct$delivery16 === void 0 ? void 0 : _baseProduct$delivery16.installationPrice) !== null && _baseProduct$delivery15 !== void 0 ? _baseProduct$delivery15 : (_fieldConfiguration$d3 = fieldConfiguration.delivery) === null || _fieldConfiguration$d3 === void 0 ? void 0 : _fieldConfiguration$d3.defaultInstallationPrice) !== null && _ref10 !== void 0 ? _ref10 : 0
647
+ deliveryTime: (_ref9 = (_baseProduct$delivery11 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery12 = baseProduct.delivery) === null || _baseProduct$delivery12 === void 0 ? void 0 : _baseProduct$delivery12.deliveryTime) !== null && _baseProduct$delivery11 !== void 0 ? _baseProduct$delivery11 : (_fieldConfiguration$d = fieldConfiguration.delivery) === null || _fieldConfiguration$d === void 0 ? void 0 : _fieldConfiguration$d.defaultDeliveryTime) !== null && _ref9 !== void 0 ? _ref9 : 0,
648
+ deliveryPrice: (_ref10 = (_baseProduct$delivery13 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery14 = baseProduct.delivery) === null || _baseProduct$delivery14 === void 0 ? void 0 : _baseProduct$delivery14.deliveryPrice) !== null && _baseProduct$delivery13 !== void 0 ? _baseProduct$delivery13 : (_fieldConfiguration$d2 = fieldConfiguration.delivery) === null || _fieldConfiguration$d2 === void 0 ? void 0 : _fieldConfiguration$d2.defaultDeliveryPrice) !== null && _ref10 !== void 0 ? _ref10 : 0,
649
+ installationPrice: (_ref11 = (_baseProduct$delivery15 = baseProduct === null || baseProduct === void 0 || (_baseProduct$delivery16 = baseProduct.delivery) === null || _baseProduct$delivery16 === void 0 ? void 0 : _baseProduct$delivery16.installationPrice) !== null && _baseProduct$delivery15 !== void 0 ? _baseProduct$delivery15 : (_fieldConfiguration$d3 = fieldConfiguration.delivery) === null || _fieldConfiguration$d3 === void 0 ? void 0 : _fieldConfiguration$d3.defaultInstallationPrice) !== null && _ref11 !== void 0 ? _ref11 : 0
643
650
  };
644
651
  }
645
652
  var ismanual = (baseProduct === null || baseProduct === void 0 ? void 0 : baseProduct.calculatedPrice) !== (baseProduct === null || baseProduct === void 0 ? void 0 : baseProduct.addedPrice);
@@ -788,11 +795,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
788
795
  key: "mapCategory",
789
796
  value: function mapCategory(value, translations) {
790
797
  var _translations$find2;
791
- var _ref11 = (_translations$find2 = translations === null || translations === void 0 ? void 0 : translations.find(function (t) {
798
+ var _ref12 = (_translations$find2 = translations === null || translations === void 0 ? void 0 : translations.find(function (t) {
792
799
  return t.value == value;
793
800
  })) !== null && _translations$find2 !== void 0 ? _translations$find2 : {};
794
- _ref11.value;
795
- var translation = _objectWithoutProperties(_ref11, _excluded);
801
+ _ref12.value;
802
+ var translation = _objectWithoutProperties(_ref12, _excluded);
796
803
  if (Object.keys(translation).length) {
797
804
  return translation;
798
805
  }
@@ -821,13 +828,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
821
828
  }, {
822
829
  key: "prepareData",
823
830
  value: function () {
824
- var _prepareData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref12) {
831
+ var _prepareData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref13) {
825
832
  var _this3 = this;
826
- var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref12$oldClassificat, oldClassificationData, originProductId, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$openModal, _this$t, _j, _this$openModal2, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
833
+ var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, _originProduct$custom, _originProduct$custom2, _originProduct$custom3, _originProduct$custom4, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$openModal, _this$t, _j, _this$openModal2, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
827
834
  return _regeneratorRuntime.wrap(function _callee3$(_context5) {
828
835
  while (1) switch (_context5.prev = _context5.next) {
829
836
  case 0:
830
- basket = _ref12.basket, baseData = _ref12.baseData, classificationData = _ref12.classificationData, variantData = _ref12.variantData, removedProducts = _ref12.removedProducts, removedMedia = _ref12.removedMedia, classificationFields = _ref12.classificationFields, fieldConfiguration = _ref12.fieldConfiguration, optMap = _ref12.optMap, _ref12$oldClassificat = _ref12.oldClassificationData, oldClassificationData = _ref12$oldClassificat === void 0 ? {} : _ref12$oldClassificat, originProductId = _ref12.originProductId;
837
+ basket = _ref13.basket, baseData = _ref13.baseData, classificationData = _ref13.classificationData, variantData = _ref13.variantData, removedProducts = _ref13.removedProducts, removedMedia = _ref13.removedMedia, classificationFields = _ref13.classificationFields, fieldConfiguration = _ref13.fieldConfiguration, optMap = _ref13.optMap, _ref13$oldClassificat = _ref13.oldClassificationData, oldClassificationData = _ref13$oldClassificat === void 0 ? {} : _ref13$oldClassificat, originProductId = _ref13.originProductId;
831
838
  products = [];
832
839
  originProduct = undefined;
833
840
  mediasToSave = [];
@@ -850,8 +857,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
850
857
  }
851
858
  throw new Error('Origin Product not found');
852
859
  case 11:
853
- sapEinaLifNr = originProduct.customData.SAP_EINA_LIFNR.value;
854
- sapEineEkgrp = originProduct.customData.SAP_EINE_EKGRP.value;
860
+ sapEinaLifNr = (_originProduct$custom = (_originProduct$custom2 = originProduct.customData.SAP) === null || _originProduct$custom2 === void 0 ? void 0 : _originProduct$custom2.SAP_EINA_LIFNR) !== null && _originProduct$custom !== void 0 ? _originProduct$custom : originProduct.customData.SAP_EINA_LIFNR.value;
861
+ sapEineEkgrp = (_originProduct$custom3 = (_originProduct$custom4 = originProduct.customData.SAP) === null || _originProduct$custom4 === void 0 ? void 0 : _originProduct$custom4.SAP_EINE_EKGRP) !== null && _originProduct$custom3 !== void 0 ? _originProduct$custom3 : originProduct.customData.SAP_EINE_EKGRP.value;
855
862
  if (!(!sapEinaLifNr || !sapEineEkgrp)) {
856
863
  _context5.next = 16;
857
864
  break;
@@ -874,11 +881,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
874
881
  }
875
882
  this.trimStrings(baseData);
876
883
  //the base product is constructed, based on baseData and classification data
877
- baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref13) {
884
+ baseProduct = _objectSpread(_objectSpread(_objectSpread({}, baseData), Object.entries(classificationData || {}).reduce(function (prev, _ref14) {
878
885
  var _fieldConfiguration$c;
879
- var _ref14 = _slicedToArray(_ref13, 2),
880
- key = _ref14[0],
881
- value = _ref14[1];
886
+ var _ref15 = _slicedToArray(_ref14, 2),
887
+ key = _ref15[0],
888
+ value = _ref15[1];
882
889
  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);
883
890
  return prev;
884
891
  }, {})), {}, {
@@ -890,11 +897,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
890
897
  });
891
898
  if (!originProduct && baseData.customData) {
892
899
  //convert all customData to objects with value and translations, if they exists
893
- Object.entries(baseData.customData).forEach(function (_ref15) {
900
+ Object.entries(baseData.customData).forEach(function (_ref16) {
894
901
  var _baseProduct$customDa;
895
- var _ref16 = _slicedToArray(_ref15, 2),
896
- key = _ref16[0],
897
- value = _ref16[1];
902
+ var _ref17 = _slicedToArray(_ref16, 2),
903
+ key = _ref17[0],
904
+ value = _ref17[1];
898
905
  if (!((_baseProduct$customDa = baseProduct.customData[key]) !== null && _baseProduct$customDa !== void 0 && _baseProduct$customDa.value)) {
899
906
  var _fieldConfiguration$a;
900
907
  baseProduct.customData[key] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$a = fieldConfiguration.additional) === null || _fieldConfiguration$a === void 0 || (_fieldConfiguration$a = _fieldConfiguration$a[key]) === null || _fieldConfiguration$a === void 0 ? void 0 : _fieldConfiguration$a.values);
@@ -903,16 +910,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
903
910
  }
904
911
  if (optMap) {
905
912
  //save to class fields the information to which opt it maps
906
- Object.entries(optMap).filter(function (_ref17) {
907
- var _ref18 = _slicedToArray(_ref17, 2);
908
- _ref18[0];
909
- var value = _ref18[1];
913
+ Object.entries(optMap).filter(function (_ref18) {
914
+ var _ref19 = _slicedToArray(_ref18, 2);
915
+ _ref19[0];
916
+ var value = _ref19[1];
910
917
  return value;
911
- }).forEach(function (_ref19) {
918
+ }).forEach(function (_ref20) {
912
919
  var _baseProduct21;
913
- var _ref20 = _slicedToArray(_ref19, 2),
914
- key = _ref20[0],
915
- value = _ref20[1];
920
+ var _ref21 = _slicedToArray(_ref20, 2),
921
+ key = _ref21[0],
922
+ value = _ref21[1];
916
923
  return baseProduct["dc_".concat(key)] = _objectSpread(_objectSpread({}, (_baseProduct21 = baseProduct["dc_".concat(key)]) !== null && _baseProduct21 !== void 0 ? _baseProduct21 : {}), {}, {
917
924
  opt: value.field
918
925
  });
@@ -987,11 +994,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
987
994
  case 3:
988
995
  varinatBase = {};
989
996
  classData = {};
990
- Object.entries(vd).forEach(function (_ref21) {
997
+ Object.entries(vd).forEach(function (_ref22) {
991
998
  var _optMap$key;
992
- var _ref22 = _slicedToArray(_ref21, 2),
993
- key = _ref22[0],
994
- value = _ref22[1];
999
+ var _ref23 = _slicedToArray(_ref22, 2),
1000
+ key = _ref23[0],
1001
+ value = _ref23[1];
995
1002
  //save those fields that are specified as class fields
996
1003
  if (classificationFields !== null && classificationFields !== void 0 && classificationFields.includes(key) && (value || optMap !== null && optMap !== void 0 && (_optMap$key = optMap[key]) !== null && _optMap$key !== void 0 && _optMap$key.field)) {
997
1004
  classData["dc_".concat(key)] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 ? void 0 : fieldConfiguration.classMap[key].values);
@@ -1005,16 +1012,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1005
1012
  });
1006
1013
  if (optMap) {
1007
1014
  //save to class fields the information to which opt it maps
1008
- Object.entries(optMap).filter(function (_ref23) {
1009
- var _ref24 = _slicedToArray(_ref23, 2);
1010
- _ref24[0];
1011
- var value = _ref24[1];
1015
+ Object.entries(optMap).filter(function (_ref24) {
1016
+ var _ref25 = _slicedToArray(_ref24, 2);
1017
+ _ref25[0];
1018
+ var value = _ref25[1];
1012
1019
  return value;
1013
- }).forEach(function (_ref25) {
1020
+ }).forEach(function (_ref26) {
1014
1021
  var _oldClassificationDat, _oldClassificationDat2, _value$field, _value$field2, _value$field3, _value$field4;
1015
- var _ref26 = _slicedToArray(_ref25, 2),
1016
- key = _ref26[0],
1017
- value = _ref26[1];
1022
+ var _ref27 = _slicedToArray(_ref26, 2),
1023
+ key = _ref27[0],
1024
+ value = _ref27[1];
1018
1025
  return classData["dc_".concat(key)] = _objectSpread(_objectSpread(_objectSpread({}, (_oldClassificationDat = (_oldClassificationDat2 = oldClassificationData[vd._id]) === null || _oldClassificationDat2 === void 0 ? void 0 : _oldClassificationDat2["dc_".concat(key)]) !== null && _oldClassificationDat !== void 0 ? _oldClassificationDat : {}), classData["dc_".concat(key)]), {}, {
1019
1026
  opt: value.field,
1020
1027
  opv: (_value$field = vd[value.field]) === null || _value$field === void 0 ? void 0 : _value$field.codex,
@@ -1030,11 +1037,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1030
1037
  if (vd.customData) {
1031
1038
  customData = {};
1032
1039
  //convert all customData to objects with value and translations, if they exists
1033
- Object.entries(vd.customData).forEach(function (_ref27) {
1040
+ Object.entries(vd.customData).forEach(function (_ref28) {
1034
1041
  var _vd$customData, _fieldConfiguration$a2;
1035
- var _ref28 = _slicedToArray(_ref27, 2),
1036
- key = _ref28[0],
1037
- value = _ref28[1];
1042
+ var _ref29 = _slicedToArray(_ref28, 2),
1043
+ key = _ref29[0],
1044
+ value = _ref29[1];
1038
1045
  if (!((_vd$customData = vd.customData) !== null && _vd$customData !== void 0 && (_vd$customData = _vd$customData[key]) !== null && _vd$customData !== void 0 && _vd$customData.value)) customData[key] = _this3.mapClass(value, fieldConfiguration === null || fieldConfiguration === void 0 || (_fieldConfiguration$a2 = fieldConfiguration.additional) === null || _fieldConfiguration$a2 === void 0 || (_fieldConfiguration$a2 = _fieldConfiguration$a2[key]) === null || _fieldConfiguration$a2 === void 0 ? void 0 : _fieldConfiguration$a2.values);
1039
1046
  });
1040
1047
  }
@@ -1068,6 +1075,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1068
1075
  },
1069
1076
  SAP_EINE_EKGRP: {
1070
1077
  value: sapEineEkgrp
1078
+ },
1079
+ SAP: {
1080
+ SAP_EINA_LIFNR: sapEinaLifNr,
1081
+ SAP_EINE_EKGRP: sapEineEkgrp
1071
1082
  }
1072
1083
  }) : customData,
1073
1084
  modelInfoPageWeight: baseProduct.modelInfoPageWeight,
@@ -1212,12 +1223,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1212
1223
  }, {
1213
1224
  key: "saveProducts",
1214
1225
  value: function () {
1215
- var _saveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref29) {
1226
+ var _saveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref30) {
1216
1227
  var products, removedProducts, awaitPDF, _this$closeModal2, savedProducts, _this$closeModal3;
1217
1228
  return _regeneratorRuntime.wrap(function _callee4$(_context6) {
1218
1229
  while (1) switch (_context6.prev = _context6.next) {
1219
1230
  case 0:
1220
- products = _ref29.products, removedProducts = _ref29.removedProducts, awaitPDF = _ref29.awaitPDF;
1231
+ products = _ref30.products, removedProducts = _ref30.removedProducts, awaitPDF = _ref30.awaitPDF;
1221
1232
  if (this.jwt) {
1222
1233
  _context6.next = 3;
1223
1234
  break;
@@ -1283,24 +1294,24 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1283
1294
  var _basket$OrderSets$0$C3, _variantProduct$confi, _variantProduct$confi2, _variantProduct$order, _classificationFields;
1284
1295
  var _this$parseClassifica = this.parseClassificationFields(variantProduct),
1285
1296
  parsedProduct = _this$parseClassifica.product;
1286
- var _ref30 = (basket === null || basket === void 0 || (_basket$OrderSets$0$C3 = basket.OrderSets[0].ConfigVariants) === null || _basket$OrderSets$0$C3 === void 0 ? void 0 : _basket$OrderSets$0$C3.find(function (vd) {
1297
+ var _ref31 = (basket === null || basket === void 0 || (_basket$OrderSets$0$C3 = basket.OrderSets[0].ConfigVariants) === null || _basket$OrderSets$0$C3 === void 0 ? void 0 : _basket$OrderSets$0$C3.find(function (vd) {
1287
1298
  return vd.VariantID === cv;
1288
1299
  })) || {
1289
1300
  VariantBasketDatas: ProductHandlerAbstract.getVariantBasketDatasByOrderlines((_variantProduct$confi = variantProduct === null || variantProduct === void 0 || (_variantProduct$confi2 = variantProduct.configuration) === null || _variantProduct$confi2 === void 0 ? void 0 : _variantProduct$confi2.OrderSets[0].OrderLines) !== null && _variantProduct$confi !== void 0 ? _variantProduct$confi : [], catalogData)
1290
1301
  },
1291
- VariantID = _ref30.VariantID,
1292
- SetImage = _ref30.SetImage,
1293
- Set2DImage = _ref30.Set2DImage,
1294
- SetPrice = _ref30.SetPrice,
1295
- VariantBasketDatas = _ref30.VariantBasketDatas,
1296
- BBox = _ref30.BBox,
1297
- MetaData = _ref30.MetaData,
1298
- MetaData_locales = _ref30.MetaData_locales,
1299
- Variant = _ref30.Variant,
1300
- SetHash = _ref30.SetHash,
1301
- Diva3DProject = _ref30.Diva3DProject,
1302
- VariantDescription_locales = _ref30.VariantDescription_locales,
1303
- VariantDescription = _ref30.VariantDescription;
1302
+ VariantID = _ref31.VariantID,
1303
+ SetImage = _ref31.SetImage,
1304
+ Set2DImage = _ref31.Set2DImage,
1305
+ SetPrice = _ref31.SetPrice,
1306
+ VariantBasketDatas = _ref31.VariantBasketDatas,
1307
+ BBox = _ref31.BBox,
1308
+ MetaData = _ref31.MetaData,
1309
+ MetaData_locales = _ref31.MetaData_locales,
1310
+ Variant = _ref31.Variant,
1311
+ SetHash = _ref31.SetHash,
1312
+ Diva3DProject = _ref31.Diva3DProject,
1313
+ VariantDescription_locales = _ref31.VariantDescription_locales,
1314
+ VariantDescription = _ref31.VariantDescription;
1304
1315
  //total and summary price are currently not avialable per varinat,
1305
1316
  //most of the time the prices will allways be the same and since we currently not support varinats for multiple sets
1306
1317
  //we use the addedPrice of the baseData as long as the calculatedPrice is the same as the SetPrice of the variant
@@ -1439,10 +1450,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1439
1450
  key: "initOpvMap",
1440
1451
  value: function initOpvMap(optFields, classificationConfig, savedOptMap) {
1441
1452
  var optMap = {};
1442
- Object.entries((classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap) || {}).forEach(function (_ref31) {
1443
- var _ref32 = _slicedToArray(_ref31, 2),
1444
- c = _ref32[0],
1445
- optMapping = _ref32[1].optMapping;
1453
+ Object.entries((classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap) || {}).forEach(function (_ref32) {
1454
+ var _ref33 = _slicedToArray(_ref32, 2),
1455
+ c = _ref33[0],
1456
+ optMapping = _ref33[1].optMapping;
1446
1457
  var optField;
1447
1458
  if (savedOptMap !== null && savedOptMap !== void 0 && savedOptMap[c]) {
1448
1459
  optField = optFields.find(function (opt) {
@@ -1503,16 +1514,16 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1503
1514
  var _classificationConfig;
1504
1515
  //add metadata defined as classification to classificationdata
1505
1516
  var metadataAsClassification = {};
1506
- Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref33) {
1507
- var _ref34 = _slicedToArray(_ref33, 1),
1508
- key = _ref34[0];
1517
+ Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref34) {
1518
+ var _ref35 = _slicedToArray(_ref34, 1),
1519
+ key = _ref35[0];
1509
1520
  return classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.classMap[key];
1510
1521
  })
1511
1522
  //if it is defiend as multi field, use full array otherwise only first element of array
1512
- .forEach(function (_ref35) {
1513
- var _ref36 = _slicedToArray(_ref35, 2),
1514
- key = _ref36[0],
1515
- value = _ref36[1];
1523
+ .forEach(function (_ref36) {
1524
+ var _ref37 = _slicedToArray(_ref36, 2),
1525
+ key = _ref37[0],
1526
+ value = _ref37[1];
1516
1527
  return metadataAsClassification[key] = classificationConfig.classMap[key].multi ? value : value === null || value === void 0 ? void 0 : value[0];
1517
1528
  });
1518
1529
 
@@ -1522,14 +1533,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1522
1533
  optMap = _this$parseClassifica2.optMap;
1523
1534
  var classificationData = _objectSpread(_objectSpread({}, metadataAsClassification), productClassification);
1524
1535
  var customData = {};
1525
- Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref37) {
1526
- var _ref38 = _slicedToArray(_ref37, 1),
1527
- key = _ref38[0];
1536
+ Object.entries(metaData !== null && metaData !== void 0 ? metaData : {}).filter(function (_ref38) {
1537
+ var _ref39 = _slicedToArray(_ref38, 1),
1538
+ key = _ref39[0];
1528
1539
  return !(classificationConfig !== null && classificationConfig !== void 0 && classificationConfig.classMap[key]);
1529
- }).forEach(function (_ref39) {
1530
- var _ref40 = _slicedToArray(_ref39, 2),
1531
- key = _ref40[0],
1532
- value = _ref40[1];
1540
+ }).forEach(function (_ref40) {
1541
+ var _ref41 = _slicedToArray(_ref40, 2),
1542
+ key = _ref41[0],
1543
+ value = _ref41[1];
1533
1544
  var langs = {};
1534
1545
  if (metaData_locales !== null && metaData_locales !== void 0 && metaData_locales[key]) {
1535
1546
  for (var i = 0; i < metaData_locales[key].length; i++) {
@@ -1561,14 +1572,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1561
1572
 
1562
1573
  //repare customData
1563
1574
  //if it is defiend as multi field, use full array otherwise only first element of array
1564
- Object.entries((_classificationConfig = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.additional) !== null && _classificationConfig !== void 0 ? _classificationConfig : []).filter(function (_ref41) {
1565
- var _ref42 = _slicedToArray(_ref41, 1),
1566
- key = _ref42[0];
1575
+ Object.entries((_classificationConfig = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.additional) !== null && _classificationConfig !== void 0 ? _classificationConfig : []).filter(function (_ref42) {
1576
+ var _ref43 = _slicedToArray(_ref42, 1),
1577
+ key = _ref43[0];
1567
1578
  return customData[key] != undefined;
1568
- }).forEach(function (_ref43) {
1569
- var _ref44 = _slicedToArray(_ref43, 2),
1570
- key = _ref44[0],
1571
- value = _ref44[1];
1579
+ }).forEach(function (_ref44) {
1580
+ var _ref45 = _slicedToArray(_ref44, 2),
1581
+ key = _ref45[0],
1582
+ value = _ref45[1];
1572
1583
  if (value.multi && !Array.isArray(customData[key])) {
1573
1584
  customData[key] = [customData[key]];
1574
1585
  } else if (!value.multi && Array.isArray(customData[key])) {
@@ -1787,13 +1798,20 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1787
1798
  key: "apiGetCatalogDataIDM",
1788
1799
  value: function () {
1789
1800
  var _apiGetCatalogDataIDM = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(serieNo, language, catalogId) {
1790
- var _cat$Properties, _cat$detailInfos$filt, _cat$detailInfos;
1791
- var fullUrl, response, cat, actCatalogInfoData;
1801
+ var _this$organization, _cat$Properties, _cat$detailInfos$filt, _cat$detailInfos;
1802
+ var organizationId, fullUrl, response, cat, actCatalogInfoData;
1792
1803
  return _regeneratorRuntime.wrap(function _callee8$(_context10) {
1793
1804
  while (1) switch (_context10.prev = _context10.next) {
1794
1805
  case 0:
1795
- fullUrl = this.enricherService + '/live/catalogs/' + catalogId + '/series/' + serieNo;
1796
- _context10.next = 3;
1806
+ organizationId = (_this$organization = this.organization) === null || _this$organization === void 0 ? void 0 : _this$organization._id;
1807
+ if (organizationId) {
1808
+ _context10.next = 3;
1809
+ break;
1810
+ }
1811
+ throw new Error('organizationId is required to load IDM catalog data');
1812
+ case 3:
1813
+ fullUrl = this.enricherService + '/live/' + organizationId + '/packages/' + catalogId + '/series/' + serieNo;
1814
+ _context10.next = 6;
1797
1815
  return fetch(fullUrl, {
1798
1816
  headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
1799
1817
  'Content-Type': 'application/json'
@@ -1804,21 +1822,21 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1804
1822
  }
1805
1823
  return res.json();
1806
1824
  });
1807
- case 3:
1825
+ case 6:
1808
1826
  response = _context10.sent;
1809
1827
  if (!response.Error) {
1810
- _context10.next = 6;
1828
+ _context10.next = 9;
1811
1829
  break;
1812
1830
  }
1813
1831
  throw new Error(response.Error);
1814
- case 6:
1832
+ case 9:
1815
1833
  cat = response;
1816
1834
  if (cat) {
1817
- _context10.next = 9;
1835
+ _context10.next = 12;
1818
1836
  break;
1819
1837
  }
1820
1838
  throw new Error('serieNo: ' + serieNo + ' not found');
1821
- case 9:
1839
+ case 12:
1822
1840
  actCatalogInfoData = {
1823
1841
  lang: language,
1824
1842
  guid: cat._id,
@@ -1847,7 +1865,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
1847
1865
  documents: []
1848
1866
  };
1849
1867
  return _context10.abrupt("return", actCatalogInfoData);
1850
- case 11:
1868
+ case 14:
1851
1869
  case "end":
1852
1870
  return _context10.stop();
1853
1871
  }
@@ -2218,12 +2236,12 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
2218
2236
  }, {
2219
2237
  key: "apiLoadProductVariantsGrouped",
2220
2238
  value: function () {
2221
- var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref45) {
2222
- var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
2239
+ var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref46) {
2240
+ var limit, skip, fields, _ref46$search, search, sort, favorites, abortController, fullUrl, headers, promise;
2223
2241
  return _regeneratorRuntime.wrap(function _callee15$(_context17) {
2224
2242
  while (1) switch (_context17.prev = _context17.next) {
2225
2243
  case 0:
2226
- 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;
2244
+ limit = _ref46.limit, skip = _ref46.skip, fields = _ref46.fields, _ref46$search = _ref46.search, search = _ref46$search === void 0 ? [] : _ref46$search, sort = _ref46.sort, favorites = _ref46.favorites, abortController = _ref46.abortController;
2227
2245
  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' : '');
2228
2246
  headers = {
2229
2247
  'Content-Type': 'application/json'
@@ -2607,10 +2625,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
2607
2625
  return Object.assign.apply(Object, [target].concat(_toConsumableArray(sources.filter(function (s) {
2608
2626
  return s;
2609
2627
  }).map(function (x) {
2610
- return Object.fromEntries(Object.entries(x).filter(function (_ref46) {
2611
- var _ref47 = _slicedToArray(_ref46, 2);
2612
- _ref47[0];
2613
- var value = _ref47[1];
2628
+ return Object.fromEntries(Object.entries(x).filter(function (_ref47) {
2629
+ var _ref48 = _slicedToArray(_ref47, 2);
2630
+ _ref48[0];
2631
+ var value = _ref48[1];
2614
2632
  return value !== undefined;
2615
2633
  }));
2616
2634
  }))));
@@ -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,EACb,aAAa,EAEb,mBAAmB,EACnB,KAAK,EACL,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,cAAc,SAAS,CAAC;AAExB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,MA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6BnI,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAwBpD,kBAAkB;WAsBlB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,CAAC,EAAE,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;;;;IA2BrH,6BAA6B,CAAC,EACzC,KAAK,EACL,IAAI,EACJ,MAAM,EACN,MAAW,EACX,IAAI,EACJ,SAAS,EACT,eAAe,GAChB,EAAE;QACD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC;YAoCa,eAAe;IA0E7B,OAAO,CAAC,WAAW;IAsBnB,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE;IAOtC,MAAM,CAAC,iCAAiC,CAAC,UAAU,EAAE,6BAA6B,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE;IAyBpH,MAAM,CAAC,qBAAqB,EAAE,cAAc,EAAE,CAa5C;IAEF,MAAM,CAAC,sBAAsB,EAAE,cAAc,EAAE,CAiE7C;IAEF,MAAM,CAAC,cAAc,EAAE,cAAc,EAAE,CAAsG;CAC9I"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/product-handler",
3
- "version": "26.5.0-beta.3",
3
+ "version": "26.5.0-beta.30",
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": "b2154f1f45ffd0627756ad2c6f06a94b178ec0a1"
15
+ "gitHead": "7c4b6dc81c2b51cd3058eabde102177e5065a717"
16
16
  }