@crystaldesign/product-handler 26.14.0-beta.2 → 26.14.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +48 -47
- package/build/esm/index.js +48 -47
- package/build/types/product-handler/src/index.d.ts +8 -1
- package/build/types/product-handler/src/index.d.ts.map +1 -1
- package/build/types/product-handler/src/prepareDataOrigin.test.d.ts +2 -0
- package/build/types/product-handler/src/prepareDataOrigin.test.d.ts.map +1 -0
- package/build/types/product-handler/src/prepareDataProgress.test.d.ts +2 -0
- package/build/types/product-handler/src/prepareDataProgress.test.d.ts.map +1 -0
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -968,42 +968,43 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
968
968
|
value: function () {
|
|
969
969
|
var _prepareData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(_ref13) {
|
|
970
970
|
var _this3 = this;
|
|
971
|
-
var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, _ref13$flatCustomData, flatCustomData, 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$
|
|
971
|
+
var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, _ref13$flatCustomData, flatCustomData, _ref13$withoutProgres, withoutProgress, _ref13$supplierKeysOp, supplierKeysOptional, openModal, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, _originProduct$custom, _originProduct$custom2, _originProduct$custom3, _originProduct$custom4, _originProduct$custom5, _originProduct$custom6, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$t, _j, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
|
|
972
972
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context5) {
|
|
973
973
|
while (1) switch (_context5.prev = _context5.next) {
|
|
974
974
|
case 0:
|
|
975
|
-
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, _ref13$flatCustomData = _ref13.flatCustomData, flatCustomData = _ref13$flatCustomData === void 0 ? false : _ref13$flatCustomData;
|
|
975
|
+
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, _ref13$flatCustomData = _ref13.flatCustomData, flatCustomData = _ref13$flatCustomData === void 0 ? false : _ref13$flatCustomData, _ref13$withoutProgres = _ref13.withoutProgress, withoutProgress = _ref13$withoutProgres === void 0 ? false : _ref13$withoutProgres, _ref13$supplierKeysOp = _ref13.supplierKeysOptional, supplierKeysOptional = _ref13$supplierKeysOp === void 0 ? false : _ref13$supplierKeysOp;
|
|
976
|
+
openModal = withoutProgress ? undefined : this.openModal;
|
|
976
977
|
products = [];
|
|
977
978
|
originProduct = undefined;
|
|
978
979
|
mediasToSave = [];
|
|
979
980
|
if (!originProductId) {
|
|
980
|
-
_context5.next =
|
|
981
|
+
_context5.next = 17;
|
|
981
982
|
break;
|
|
982
983
|
}
|
|
983
|
-
_context5.next =
|
|
984
|
+
_context5.next = 8;
|
|
984
985
|
return this.apiGetProductByFilter([{
|
|
985
986
|
id: '_id',
|
|
986
987
|
op: 'eq',
|
|
987
988
|
value: originProductId
|
|
988
989
|
}], undefined, true);
|
|
989
|
-
case
|
|
990
|
+
case 8:
|
|
990
991
|
result = _context5.sent;
|
|
991
992
|
originProduct = result.data[0];
|
|
992
993
|
if (originProduct) {
|
|
993
|
-
_context5.next =
|
|
994
|
+
_context5.next = 12;
|
|
994
995
|
break;
|
|
995
996
|
}
|
|
996
997
|
throw new Error('Origin Product not found');
|
|
997
|
-
case
|
|
998
|
-
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;
|
|
999
|
-
sapEineEkgrp = (_originProduct$
|
|
1000
|
-
if (!(!sapEinaLifNr || !sapEineEkgrp)) {
|
|
1001
|
-
_context5.next =
|
|
998
|
+
case 12:
|
|
999
|
+
sapEinaLifNr = (_originProduct$custom = (_originProduct$custom2 = originProduct.customData) === null || _originProduct$custom2 === void 0 || (_originProduct$custom2 = _originProduct$custom2.SAP) === null || _originProduct$custom2 === void 0 ? void 0 : _originProduct$custom2.SAP_EINA_LIFNR) !== null && _originProduct$custom !== void 0 ? _originProduct$custom : (_originProduct$custom3 = originProduct.customData) === null || _originProduct$custom3 === void 0 || (_originProduct$custom3 = _originProduct$custom3.SAP_EINA_LIFNR) === null || _originProduct$custom3 === void 0 ? void 0 : _originProduct$custom3.value;
|
|
1000
|
+
sapEineEkgrp = (_originProduct$custom4 = (_originProduct$custom5 = originProduct.customData) === null || _originProduct$custom5 === void 0 || (_originProduct$custom5 = _originProduct$custom5.SAP) === null || _originProduct$custom5 === void 0 ? void 0 : _originProduct$custom5.SAP_EINE_EKGRP) !== null && _originProduct$custom4 !== void 0 ? _originProduct$custom4 : (_originProduct$custom6 = originProduct.customData) === null || _originProduct$custom6 === void 0 || (_originProduct$custom6 = _originProduct$custom6.SAP_EINE_EKGRP) === null || _originProduct$custom6 === void 0 ? void 0 : _originProduct$custom6.value;
|
|
1001
|
+
if (!((!sapEinaLifNr || !sapEineEkgrp) && !supplierKeysOptional)) {
|
|
1002
|
+
_context5.next = 17;
|
|
1002
1003
|
break;
|
|
1003
1004
|
}
|
|
1004
1005
|
(_this$closeModal = this.closeModal) === null || _this$closeModal === void 0 || _this$closeModal.call(this);
|
|
1005
1006
|
throw new Error('LiefNr or EkGrp not found');
|
|
1006
|
-
case
|
|
1007
|
+
case 17:
|
|
1007
1008
|
if (originProduct) {
|
|
1008
1009
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, originProduct), baseData), {}, {
|
|
1009
1010
|
_id: originProduct._id,
|
|
@@ -1066,33 +1067,33 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1066
1067
|
|
|
1067
1068
|
//media removed from the products is deleted from the server
|
|
1068
1069
|
j = 0;
|
|
1069
|
-
case
|
|
1070
|
+
case 23:
|
|
1070
1071
|
if (!(removedMedia && j < removedMedia.length)) {
|
|
1071
|
-
_context5.next =
|
|
1072
|
+
_context5.next = 32;
|
|
1072
1073
|
break;
|
|
1073
1074
|
}
|
|
1074
1075
|
mediaRef = removedMedia[j];
|
|
1075
1076
|
if (!mediaRef.ref) {
|
|
1076
|
-
_context5.next =
|
|
1077
|
+
_context5.next = 29;
|
|
1077
1078
|
break;
|
|
1078
1079
|
}
|
|
1079
|
-
|
|
1080
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1080
1081
|
progress: j / removedMedia.length / 6 + 1 / 6,
|
|
1081
1082
|
title: (_this$t = this.t) === null || _this$t === void 0 ? void 0 : _this$t.call(this, 'productcreator.remove_old_media_refs'),
|
|
1082
1083
|
dontRenderForm: true
|
|
1083
1084
|
});
|
|
1084
|
-
_context5.next =
|
|
1085
|
+
_context5.next = 29;
|
|
1085
1086
|
return this.apiRemoveMedia(this.mediaService, mediaRef.ref, this.jwt);
|
|
1086
|
-
case
|
|
1087
|
+
case 29:
|
|
1087
1088
|
j++;
|
|
1088
|
-
_context5.next =
|
|
1089
|
+
_context5.next = 23;
|
|
1089
1090
|
break;
|
|
1090
|
-
case
|
|
1091
|
+
case 32:
|
|
1091
1092
|
if (baseData.media) {
|
|
1092
1093
|
baseProduct.media = [];
|
|
1093
1094
|
for (_j = 0; _j < baseData.media.length; _j++) {
|
|
1094
1095
|
//if a new media is added, the file is present in media object and needs to be saved to the server
|
|
1095
|
-
|
|
1096
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1096
1097
|
progress: _j / baseData.media.length / 6 + 2 / 6,
|
|
1097
1098
|
title: (_this$t2 = this.t) === null || _this$t2 === void 0 ? void 0 : _this$t2.call(this, 'productcreator.save_media'),
|
|
1098
1099
|
dontRenderForm: true
|
|
@@ -1119,7 +1120,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1119
1120
|
}
|
|
1120
1121
|
_loop = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop() {
|
|
1121
1122
|
var _basket$getProductCon2, _originProduct;
|
|
1122
|
-
var vd, varinatBase, classData, customData, variantPos, productId, preparedProduct, configuration, product, _this3$
|
|
1123
|
+
var vd, varinatBase, classData, customData, variantPos, productId, preparedProduct, configuration, product, _this3$t, k;
|
|
1123
1124
|
return _regeneratorRuntime__default["default"].wrap(function _loop$(_context3) {
|
|
1124
1125
|
while (1) switch (_context3.prev = _context3.next) {
|
|
1125
1126
|
case 0:
|
|
@@ -1207,7 +1208,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1207
1208
|
}
|
|
1208
1209
|
configuration = (_basket$getProductCon2 = basket === null || basket === void 0 ? void 0 : basket.getProductConfiguration(typeof vd.variantId == 'string' ? Number(vd.variantId) : vd.variantId)) !== null && _basket$getProductCon2 !== void 0 ? _basket$getProductCon2 : vd.configuration;
|
|
1209
1210
|
product = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, preparedProduct), varinatBase), classData), {}, {
|
|
1210
|
-
customData: originProduct ? _objectSpread(_objectSpread({}, (_originProduct = originProduct) === null || _originProduct === void 0 ? void 0 : _originProduct.customData),
|
|
1211
|
+
customData: originProduct ? _objectSpread(_objectSpread({}, (_originProduct = originProduct) === null || _originProduct === void 0 ? void 0 : _originProduct.customData), sapEinaLifNr && sapEineEkgrp ? {
|
|
1211
1212
|
SAP_EINA_LIFNR: {
|
|
1212
1213
|
value: sapEinaLifNr
|
|
1213
1214
|
},
|
|
@@ -1218,7 +1219,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1218
1219
|
SAP_EINA_LIFNR: sapEinaLifNr,
|
|
1219
1220
|
SAP_EINE_EKGRP: sapEineEkgrp
|
|
1220
1221
|
}
|
|
1221
|
-
}) : customData,
|
|
1222
|
+
} : {}) : customData,
|
|
1222
1223
|
modelInfoPageWeight: baseProduct.modelInfoPageWeight,
|
|
1223
1224
|
livingArea: baseProduct.livingArea,
|
|
1224
1225
|
mainCategory: baseProduct.mainCategory,
|
|
@@ -1258,7 +1259,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1258
1259
|
});
|
|
1259
1260
|
if (vd.media) {
|
|
1260
1261
|
product.media = [];
|
|
1261
|
-
|
|
1262
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1262
1263
|
progress: _j2 / variantData.length / 6 + 3 / 6,
|
|
1263
1264
|
title: (_this3$t = _this3.t) === null || _this3$t === void 0 ? void 0 : _this3$t.call(_this3, 'productcreator.save_media_variants'),
|
|
1264
1265
|
dontRenderForm: true
|
|
@@ -1279,26 +1280,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1279
1280
|
}, _loop);
|
|
1280
1281
|
});
|
|
1281
1282
|
_j2 = 0;
|
|
1282
|
-
case
|
|
1283
|
+
case 38:
|
|
1283
1284
|
if (!(variantData && _j2 < variantData.length)) {
|
|
1284
|
-
_context5.next =
|
|
1285
|
+
_context5.next = 45;
|
|
1285
1286
|
break;
|
|
1286
1287
|
}
|
|
1287
|
-
return _context5.delegateYield(_loop(), "t0",
|
|
1288
|
-
case
|
|
1288
|
+
return _context5.delegateYield(_loop(), "t0", 40);
|
|
1289
|
+
case 40:
|
|
1289
1290
|
if (!_context5.t0) {
|
|
1290
|
-
_context5.next =
|
|
1291
|
+
_context5.next = 42;
|
|
1291
1292
|
break;
|
|
1292
1293
|
}
|
|
1293
|
-
return _context5.abrupt("continue",
|
|
1294
|
-
case
|
|
1294
|
+
return _context5.abrupt("continue", 42);
|
|
1295
|
+
case 42:
|
|
1295
1296
|
_j2++;
|
|
1296
|
-
_context5.next =
|
|
1297
|
+
_context5.next = 38;
|
|
1297
1298
|
break;
|
|
1298
|
-
case
|
|
1299
|
-
_context5.next =
|
|
1299
|
+
case 45:
|
|
1300
|
+
_context5.next = 47;
|
|
1300
1301
|
return this.saveMedias(mediasToSave, baseData.organizationId);
|
|
1301
|
-
case
|
|
1302
|
+
case 47:
|
|
1302
1303
|
mediasForProducts = _context5.sent;
|
|
1303
1304
|
_loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(productId) {
|
|
1304
1305
|
var p;
|
|
@@ -1323,22 +1324,22 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1323
1324
|
}, _loop2);
|
|
1324
1325
|
});
|
|
1325
1326
|
_context5.t1 = _regeneratorRuntime__default["default"].keys(mediasForProducts);
|
|
1326
|
-
case
|
|
1327
|
+
case 50:
|
|
1327
1328
|
if ((_context5.t2 = _context5.t1()).done) {
|
|
1328
|
-
_context5.next =
|
|
1329
|
+
_context5.next = 55;
|
|
1329
1330
|
break;
|
|
1330
1331
|
}
|
|
1331
1332
|
productId = _context5.t2.value;
|
|
1332
|
-
return _context5.delegateYield(_loop2(productId), "t3",
|
|
1333
|
-
case
|
|
1334
|
-
_context5.next =
|
|
1333
|
+
return _context5.delegateYield(_loop2(productId), "t3", 53);
|
|
1334
|
+
case 53:
|
|
1335
|
+
_context5.next = 50;
|
|
1335
1336
|
break;
|
|
1336
|
-
case
|
|
1337
|
+
case 55:
|
|
1337
1338
|
return _context5.abrupt("return", {
|
|
1338
1339
|
products: products,
|
|
1339
1340
|
removedProducts: removedProducts
|
|
1340
1341
|
});
|
|
1341
|
-
case
|
|
1342
|
+
case 56:
|
|
1342
1343
|
case "end":
|
|
1343
1344
|
return _context5.stop();
|
|
1344
1345
|
}
|
|
@@ -2482,8 +2483,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2482
2483
|
key: "apiSaveProducts",
|
|
2483
2484
|
value: function () {
|
|
2484
2485
|
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2485
|
-
var _this$
|
|
2486
|
-
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$
|
|
2486
|
+
var _this$openModal, _this$t3;
|
|
2487
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal2, _this$t4, startTime, endTime, estTime, _loop3, j;
|
|
2487
2488
|
return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context20) {
|
|
2488
2489
|
while (1) switch (_context20.prev = _context20.next) {
|
|
2489
2490
|
case 0:
|
|
@@ -2513,7 +2514,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2513
2514
|
break;
|
|
2514
2515
|
case 15:
|
|
2515
2516
|
responseProducts = [];
|
|
2516
|
-
(_this$
|
|
2517
|
+
(_this$openModal = this.openModal) === null || _this$openModal === void 0 || _this$openModal.call(this, {
|
|
2517
2518
|
progress: 4 / 6,
|
|
2518
2519
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.saving_no_est'),
|
|
2519
2520
|
dontRenderForm: true
|
|
@@ -2565,7 +2566,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2565
2566
|
endTime = Date.now();
|
|
2566
2567
|
timeItTook.push(Math.round((startTime - endTime) / 1000));
|
|
2567
2568
|
estTime = Math.round(DivaUtils__default["default"].getAverage(timeItTook)) * (_i2 - productsPackages.length);
|
|
2568
|
-
(_this$
|
|
2569
|
+
(_this$openModal2 = this.openModal) === null || _this$openModal2 === void 0 || _this$openModal2.call(this, {
|
|
2569
2570
|
progress: _i2 / productsPackages.length / 3 + 4 / 6,
|
|
2570
2571
|
title: (_this$t4 = this.t) === null || _this$t4 === void 0 ? void 0 : _this$t4.call(this, 'productcreator.est_saving_time', {
|
|
2571
2572
|
totalEstimatedTime: Math.round(estTime / 60) + 'm ' + estTime % 60 + 's'
|
package/build/esm/index.js
CHANGED
|
@@ -950,42 +950,43 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
950
950
|
value: function () {
|
|
951
951
|
var _prepareData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref13) {
|
|
952
952
|
var _this3 = this;
|
|
953
|
-
var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, _ref13$flatCustomData, flatCustomData, 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$
|
|
953
|
+
var basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, _ref13$oldClassificat, oldClassificationData, originProductId, _ref13$flatCustomData, flatCustomData, _ref13$withoutProgres, withoutProgress, _ref13$supplierKeysOp, supplierKeysOptional, openModal, products, originProduct, mediasToSave, sapEinaLifNr, sapEineEkgrp, _originProduct$custom, _originProduct$custom2, _originProduct$custom3, _originProduct$custom4, _originProduct$custom5, _originProduct$custom6, result, _this$closeModal, _originProduct$percen, _originProduct$discou, _baseData$variantId, _originProduct$create, _originProduct$create2, _originProduct$create3, baseProduct, j, mediaRef, _this$t, _j, _this$t2, _loop, _j2, mediasForProducts, _loop2, productId;
|
|
954
954
|
return _regeneratorRuntime.wrap(function _callee3$(_context5) {
|
|
955
955
|
while (1) switch (_context5.prev = _context5.next) {
|
|
956
956
|
case 0:
|
|
957
|
-
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, _ref13$flatCustomData = _ref13.flatCustomData, flatCustomData = _ref13$flatCustomData === void 0 ? false : _ref13$flatCustomData;
|
|
957
|
+
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, _ref13$flatCustomData = _ref13.flatCustomData, flatCustomData = _ref13$flatCustomData === void 0 ? false : _ref13$flatCustomData, _ref13$withoutProgres = _ref13.withoutProgress, withoutProgress = _ref13$withoutProgres === void 0 ? false : _ref13$withoutProgres, _ref13$supplierKeysOp = _ref13.supplierKeysOptional, supplierKeysOptional = _ref13$supplierKeysOp === void 0 ? false : _ref13$supplierKeysOp;
|
|
958
|
+
openModal = withoutProgress ? undefined : this.openModal;
|
|
958
959
|
products = [];
|
|
959
960
|
originProduct = undefined;
|
|
960
961
|
mediasToSave = [];
|
|
961
962
|
if (!originProductId) {
|
|
962
|
-
_context5.next =
|
|
963
|
+
_context5.next = 17;
|
|
963
964
|
break;
|
|
964
965
|
}
|
|
965
|
-
_context5.next =
|
|
966
|
+
_context5.next = 8;
|
|
966
967
|
return this.apiGetProductByFilter([{
|
|
967
968
|
id: '_id',
|
|
968
969
|
op: 'eq',
|
|
969
970
|
value: originProductId
|
|
970
971
|
}], undefined, true);
|
|
971
|
-
case
|
|
972
|
+
case 8:
|
|
972
973
|
result = _context5.sent;
|
|
973
974
|
originProduct = result.data[0];
|
|
974
975
|
if (originProduct) {
|
|
975
|
-
_context5.next =
|
|
976
|
+
_context5.next = 12;
|
|
976
977
|
break;
|
|
977
978
|
}
|
|
978
979
|
throw new Error('Origin Product not found');
|
|
979
|
-
case
|
|
980
|
-
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;
|
|
981
|
-
sapEineEkgrp = (_originProduct$
|
|
982
|
-
if (!(!sapEinaLifNr || !sapEineEkgrp)) {
|
|
983
|
-
_context5.next =
|
|
980
|
+
case 12:
|
|
981
|
+
sapEinaLifNr = (_originProduct$custom = (_originProduct$custom2 = originProduct.customData) === null || _originProduct$custom2 === void 0 || (_originProduct$custom2 = _originProduct$custom2.SAP) === null || _originProduct$custom2 === void 0 ? void 0 : _originProduct$custom2.SAP_EINA_LIFNR) !== null && _originProduct$custom !== void 0 ? _originProduct$custom : (_originProduct$custom3 = originProduct.customData) === null || _originProduct$custom3 === void 0 || (_originProduct$custom3 = _originProduct$custom3.SAP_EINA_LIFNR) === null || _originProduct$custom3 === void 0 ? void 0 : _originProduct$custom3.value;
|
|
982
|
+
sapEineEkgrp = (_originProduct$custom4 = (_originProduct$custom5 = originProduct.customData) === null || _originProduct$custom5 === void 0 || (_originProduct$custom5 = _originProduct$custom5.SAP) === null || _originProduct$custom5 === void 0 ? void 0 : _originProduct$custom5.SAP_EINE_EKGRP) !== null && _originProduct$custom4 !== void 0 ? _originProduct$custom4 : (_originProduct$custom6 = originProduct.customData) === null || _originProduct$custom6 === void 0 || (_originProduct$custom6 = _originProduct$custom6.SAP_EINE_EKGRP) === null || _originProduct$custom6 === void 0 ? void 0 : _originProduct$custom6.value;
|
|
983
|
+
if (!((!sapEinaLifNr || !sapEineEkgrp) && !supplierKeysOptional)) {
|
|
984
|
+
_context5.next = 17;
|
|
984
985
|
break;
|
|
985
986
|
}
|
|
986
987
|
(_this$closeModal = this.closeModal) === null || _this$closeModal === void 0 || _this$closeModal.call(this);
|
|
987
988
|
throw new Error('LiefNr or EkGrp not found');
|
|
988
|
-
case
|
|
989
|
+
case 17:
|
|
989
990
|
if (originProduct) {
|
|
990
991
|
baseData = _objectSpread(_objectSpread(_objectSpread({}, originProduct), baseData), {}, {
|
|
991
992
|
_id: originProduct._id,
|
|
@@ -1048,33 +1049,33 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1048
1049
|
|
|
1049
1050
|
//media removed from the products is deleted from the server
|
|
1050
1051
|
j = 0;
|
|
1051
|
-
case
|
|
1052
|
+
case 23:
|
|
1052
1053
|
if (!(removedMedia && j < removedMedia.length)) {
|
|
1053
|
-
_context5.next =
|
|
1054
|
+
_context5.next = 32;
|
|
1054
1055
|
break;
|
|
1055
1056
|
}
|
|
1056
1057
|
mediaRef = removedMedia[j];
|
|
1057
1058
|
if (!mediaRef.ref) {
|
|
1058
|
-
_context5.next =
|
|
1059
|
+
_context5.next = 29;
|
|
1059
1060
|
break;
|
|
1060
1061
|
}
|
|
1061
|
-
|
|
1062
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1062
1063
|
progress: j / removedMedia.length / 6 + 1 / 6,
|
|
1063
1064
|
title: (_this$t = this.t) === null || _this$t === void 0 ? void 0 : _this$t.call(this, 'productcreator.remove_old_media_refs'),
|
|
1064
1065
|
dontRenderForm: true
|
|
1065
1066
|
});
|
|
1066
|
-
_context5.next =
|
|
1067
|
+
_context5.next = 29;
|
|
1067
1068
|
return this.apiRemoveMedia(this.mediaService, mediaRef.ref, this.jwt);
|
|
1068
|
-
case
|
|
1069
|
+
case 29:
|
|
1069
1070
|
j++;
|
|
1070
|
-
_context5.next =
|
|
1071
|
+
_context5.next = 23;
|
|
1071
1072
|
break;
|
|
1072
|
-
case
|
|
1073
|
+
case 32:
|
|
1073
1074
|
if (baseData.media) {
|
|
1074
1075
|
baseProduct.media = [];
|
|
1075
1076
|
for (_j = 0; _j < baseData.media.length; _j++) {
|
|
1076
1077
|
//if a new media is added, the file is present in media object and needs to be saved to the server
|
|
1077
|
-
|
|
1078
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1078
1079
|
progress: _j / baseData.media.length / 6 + 2 / 6,
|
|
1079
1080
|
title: (_this$t2 = this.t) === null || _this$t2 === void 0 ? void 0 : _this$t2.call(this, 'productcreator.save_media'),
|
|
1080
1081
|
dontRenderForm: true
|
|
@@ -1101,7 +1102,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1101
1102
|
}
|
|
1102
1103
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
1103
1104
|
var _basket$getProductCon2, _originProduct;
|
|
1104
|
-
var vd, varinatBase, classData, customData, variantPos, productId, preparedProduct, configuration, product, _this3$
|
|
1105
|
+
var vd, varinatBase, classData, customData, variantPos, productId, preparedProduct, configuration, product, _this3$t, k;
|
|
1105
1106
|
return _regeneratorRuntime.wrap(function _loop$(_context3) {
|
|
1106
1107
|
while (1) switch (_context3.prev = _context3.next) {
|
|
1107
1108
|
case 0:
|
|
@@ -1189,7 +1190,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1189
1190
|
}
|
|
1190
1191
|
configuration = (_basket$getProductCon2 = basket === null || basket === void 0 ? void 0 : basket.getProductConfiguration(typeof vd.variantId == 'string' ? Number(vd.variantId) : vd.variantId)) !== null && _basket$getProductCon2 !== void 0 ? _basket$getProductCon2 : vd.configuration;
|
|
1191
1192
|
product = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, preparedProduct), varinatBase), classData), {}, {
|
|
1192
|
-
customData: originProduct ? _objectSpread(_objectSpread({}, (_originProduct = originProduct) === null || _originProduct === void 0 ? void 0 : _originProduct.customData),
|
|
1193
|
+
customData: originProduct ? _objectSpread(_objectSpread({}, (_originProduct = originProduct) === null || _originProduct === void 0 ? void 0 : _originProduct.customData), sapEinaLifNr && sapEineEkgrp ? {
|
|
1193
1194
|
SAP_EINA_LIFNR: {
|
|
1194
1195
|
value: sapEinaLifNr
|
|
1195
1196
|
},
|
|
@@ -1200,7 +1201,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1200
1201
|
SAP_EINA_LIFNR: sapEinaLifNr,
|
|
1201
1202
|
SAP_EINE_EKGRP: sapEineEkgrp
|
|
1202
1203
|
}
|
|
1203
|
-
}) : customData,
|
|
1204
|
+
} : {}) : customData,
|
|
1204
1205
|
modelInfoPageWeight: baseProduct.modelInfoPageWeight,
|
|
1205
1206
|
livingArea: baseProduct.livingArea,
|
|
1206
1207
|
mainCategory: baseProduct.mainCategory,
|
|
@@ -1240,7 +1241,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1240
1241
|
});
|
|
1241
1242
|
if (vd.media) {
|
|
1242
1243
|
product.media = [];
|
|
1243
|
-
|
|
1244
|
+
openModal === null || openModal === void 0 || openModal({
|
|
1244
1245
|
progress: _j2 / variantData.length / 6 + 3 / 6,
|
|
1245
1246
|
title: (_this3$t = _this3.t) === null || _this3$t === void 0 ? void 0 : _this3$t.call(_this3, 'productcreator.save_media_variants'),
|
|
1246
1247
|
dontRenderForm: true
|
|
@@ -1261,26 +1262,26 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1261
1262
|
}, _loop);
|
|
1262
1263
|
});
|
|
1263
1264
|
_j2 = 0;
|
|
1264
|
-
case
|
|
1265
|
+
case 38:
|
|
1265
1266
|
if (!(variantData && _j2 < variantData.length)) {
|
|
1266
|
-
_context5.next =
|
|
1267
|
+
_context5.next = 45;
|
|
1267
1268
|
break;
|
|
1268
1269
|
}
|
|
1269
|
-
return _context5.delegateYield(_loop(), "t0",
|
|
1270
|
-
case
|
|
1270
|
+
return _context5.delegateYield(_loop(), "t0", 40);
|
|
1271
|
+
case 40:
|
|
1271
1272
|
if (!_context5.t0) {
|
|
1272
|
-
_context5.next =
|
|
1273
|
+
_context5.next = 42;
|
|
1273
1274
|
break;
|
|
1274
1275
|
}
|
|
1275
|
-
return _context5.abrupt("continue",
|
|
1276
|
-
case
|
|
1276
|
+
return _context5.abrupt("continue", 42);
|
|
1277
|
+
case 42:
|
|
1277
1278
|
_j2++;
|
|
1278
|
-
_context5.next =
|
|
1279
|
+
_context5.next = 38;
|
|
1279
1280
|
break;
|
|
1280
|
-
case
|
|
1281
|
-
_context5.next =
|
|
1281
|
+
case 45:
|
|
1282
|
+
_context5.next = 47;
|
|
1282
1283
|
return this.saveMedias(mediasToSave, baseData.organizationId);
|
|
1283
|
-
case
|
|
1284
|
+
case 47:
|
|
1284
1285
|
mediasForProducts = _context5.sent;
|
|
1285
1286
|
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(productId) {
|
|
1286
1287
|
var p;
|
|
@@ -1305,22 +1306,22 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1305
1306
|
}, _loop2);
|
|
1306
1307
|
});
|
|
1307
1308
|
_context5.t1 = _regeneratorRuntime.keys(mediasForProducts);
|
|
1308
|
-
case
|
|
1309
|
+
case 50:
|
|
1309
1310
|
if ((_context5.t2 = _context5.t1()).done) {
|
|
1310
|
-
_context5.next =
|
|
1311
|
+
_context5.next = 55;
|
|
1311
1312
|
break;
|
|
1312
1313
|
}
|
|
1313
1314
|
productId = _context5.t2.value;
|
|
1314
|
-
return _context5.delegateYield(_loop2(productId), "t3",
|
|
1315
|
-
case
|
|
1316
|
-
_context5.next =
|
|
1315
|
+
return _context5.delegateYield(_loop2(productId), "t3", 53);
|
|
1316
|
+
case 53:
|
|
1317
|
+
_context5.next = 50;
|
|
1317
1318
|
break;
|
|
1318
|
-
case
|
|
1319
|
+
case 55:
|
|
1319
1320
|
return _context5.abrupt("return", {
|
|
1320
1321
|
products: products,
|
|
1321
1322
|
removedProducts: removedProducts
|
|
1322
1323
|
});
|
|
1323
|
-
case
|
|
1324
|
+
case 56:
|
|
1324
1325
|
case "end":
|
|
1325
1326
|
return _context5.stop();
|
|
1326
1327
|
}
|
|
@@ -2464,8 +2465,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2464
2465
|
key: "apiSaveProducts",
|
|
2465
2466
|
value: function () {
|
|
2466
2467
|
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2467
|
-
var _this$
|
|
2468
|
-
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$
|
|
2468
|
+
var _this$openModal, _this$t3;
|
|
2469
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal2, _this$t4, startTime, endTime, estTime, _loop3, j;
|
|
2469
2470
|
return _regeneratorRuntime.wrap(function _callee17$(_context20) {
|
|
2470
2471
|
while (1) switch (_context20.prev = _context20.next) {
|
|
2471
2472
|
case 0:
|
|
@@ -2495,7 +2496,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2495
2496
|
break;
|
|
2496
2497
|
case 15:
|
|
2497
2498
|
responseProducts = [];
|
|
2498
|
-
(_this$
|
|
2499
|
+
(_this$openModal = this.openModal) === null || _this$openModal === void 0 || _this$openModal.call(this, {
|
|
2499
2500
|
progress: 4 / 6,
|
|
2500
2501
|
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.saving_no_est'),
|
|
2501
2502
|
dontRenderForm: true
|
|
@@ -2547,7 +2548,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2547
2548
|
endTime = Date.now();
|
|
2548
2549
|
timeItTook.push(Math.round((startTime - endTime) / 1000));
|
|
2549
2550
|
estTime = Math.round(DivaUtils.getAverage(timeItTook)) * (_i2 - productsPackages.length);
|
|
2550
|
-
(_this$
|
|
2551
|
+
(_this$openModal2 = this.openModal) === null || _this$openModal2 === void 0 || _this$openModal2.call(this, {
|
|
2551
2552
|
progress: _i2 / productsPackages.length / 3 + 4 / 6,
|
|
2552
2553
|
title: (_this$t4 = this.t) === null || _this$t4 === void 0 ? void 0 : _this$t4.call(this, 'productcreator.est_saving_time', {
|
|
2553
2554
|
totalEstimatedTime: Math.round(estTime / 60) + 'm ' + estTime % 60 + 's'
|
|
@@ -58,6 +58,13 @@ export interface PrepareDataParams {
|
|
|
58
58
|
updateFuction?: (percentage: number, title: string) => void;
|
|
59
59
|
originProductId?: string;
|
|
60
60
|
flatCustomData?: boolean;
|
|
61
|
+
/** The caller shows its own progress: no progress dialog (`openModal`) while the products are prepared. */
|
|
62
|
+
withoutProgress?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The origin product need not carry a supplier and purchasing group (`SAP_EINA_LIFNR`, `SAP_EINE_EKGRP`): a product
|
|
65
|
+
* that is no flat article is prepared too instead of refused, and its variants get none.
|
|
66
|
+
*/
|
|
67
|
+
supplierKeysOptional?: boolean;
|
|
61
68
|
}
|
|
62
69
|
export declare const TRANSLATED_FILEDS: string[];
|
|
63
70
|
export declare class ProductHandlerAbstract {
|
|
@@ -160,7 +167,7 @@ export declare class ProductHandlerAbstract {
|
|
|
160
167
|
medias: MediaAbstract[];
|
|
161
168
|
};
|
|
162
169
|
}>;
|
|
163
|
-
prepareData({ basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, oldClassificationData, originProductId, flatCustomData, }: PrepareDataParams): Promise<{
|
|
170
|
+
prepareData({ basket, baseData, classificationData, variantData, removedProducts, removedMedia, classificationFields, fieldConfiguration, optMap, oldClassificationData, originProductId, flatCustomData, withoutProgress, supplierKeysOptional, }: PrepareDataParams): Promise<{
|
|
164
171
|
products: ProductDataAbstract[];
|
|
165
172
|
removedProducts: string[] | undefined;
|
|
166
173
|
}>;
|
|
@@ -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,gBAAgB,EAChB,wBAAwB,EACxB,KAAK,EACL,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,cAAc,SAAS,CAAC;AACxB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,M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E,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAqCxC;;;;;;OAMG;IACU,gBAAgB,CAAC,CAAC,SAAS;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,mBAAmB,EAAE,EAC7E,KAAK,EACL,KAAK,EACL,MAAW,EACX,IAAI,EACJ,cAAc,GACf,EAAE;QACD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,iFAAiF;QACjF,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,8EAA8E;QAC9E,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAmBlB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareDataOrigin.test.d.ts","sourceRoot":"","sources":["../../../../src/prepareDataOrigin.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareDataProgress.test.d.ts","sourceRoot":"","sources":["../../../../src/prepareDataProgress.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/product-handler",
|
|
3
|
-
"version": "26.14.0-beta.
|
|
3
|
+
"version": "26.14.0-beta.21",
|
|
4
4
|
"description": "Product loading, merging and header-override logic shared by the product UIs.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@crystaldesign/basket-model": "*",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"suiteName": "product-handler",
|
|
19
19
|
"outputDirectory": "./test-reports"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "64c09f5d1eb7f28365509fe8a262a0e261b75f53"
|
|
22
22
|
}
|