@crystaldesign/web-planner-logic 26.5.0-beta.9 → 26.5.0-rc.0
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/{DivaBoxPlanner-e2dbe63b.js → DivaBoxPlanner-a83ddf2d.js} +100 -50
- package/build/cjs/{DivaStandardPlanner-c8db1953.js → DivaStandardPlanner-6839d35f.js} +2 -2
- package/build/cjs/{DoorPlanner-0c81fc94.js → DoorPlanner-d9d820b2.js} +1 -1
- package/build/cjs/{Host3DSignalR-03429166.js → Host3DSignalR-7a424c6f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-3473cc94.js → LiviqueWWSHandler-1b4c240f.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-ff71ae8a.js → PfisterWWSHandler-bf4b2af0.js} +1 -1
- package/build/cjs/{PlannerHandler2D-35d34604.js → PlannerHandler2D-4ef7a85f.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-2f8f2cee.js → SeriousBasketHandler-e4e0835e.js} +1 -1
- package/build/cjs/{ShelfPlanner-5edbc539.js → ShelfPlanner-c4449795.js} +1 -1
- package/build/cjs/{StandardWWSHandler-f36b0cc6.js → StandardWWSHandler-7d3feb60.js} +1 -1
- package/build/cjs/{index-58f8da48.js → index-9145fe80.js} +264 -259
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-9ab0ab73.js → DivaBoxPlanner-34141af8.js} +100 -50
- package/build/esm/{DivaStandardPlanner-efe9b5b8.js → DivaStandardPlanner-9e6ffa11.js} +2 -2
- package/build/esm/{DoorPlanner-72677e88.js → DoorPlanner-ad6344a7.js} +1 -1
- package/build/esm/{Host3DSignalR-ff67a961.js → Host3DSignalR-baf9963c.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-df266f48.js → LiviqueWWSHandler-56c4d1d2.js} +1 -1
- package/build/esm/{PfisterWWSHandler-75f387e2.js → PfisterWWSHandler-d0109020.js} +1 -1
- package/build/esm/{PlannerHandler2D-d30f9a90.js → PlannerHandler2D-ebe62b9b.js} +1 -1
- package/build/esm/{SeriousBasketHandler-9aeb5caa.js → SeriousBasketHandler-29af6f6d.js} +1 -1
- package/build/esm/{ShelfPlanner-691b695a.js → ShelfPlanner-7f73ac20.js} +1 -1
- package/build/esm/{StandardWWSHandler-79f876e8.js → StandardWWSHandler-553bf27b.js} +1 -1
- package/build/esm/{index-b242abc0.js → index-66df82ca.js} +264 -259
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts +28 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +16 -0
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +7 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +8 -7
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -43,8 +43,8 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
|
43
43
|
})();
|
|
44
44
|
|
|
45
45
|
var _excluded = ["type"];
|
|
46
|
-
function ownKeys$
|
|
47
|
-
function _objectSpread$
|
|
46
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
47
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
48
48
|
// Import types from AI service
|
|
49
49
|
|
|
50
50
|
var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
@@ -285,8 +285,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
285
285
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
286
286
|
api2Url = this.apiConfig.api2.web;
|
|
287
287
|
}
|
|
288
|
-
_context2.t0 = _objectSpread$
|
|
289
|
-
_context2.t1 = _objectSpread$
|
|
288
|
+
_context2.t0 = _objectSpread$m;
|
|
289
|
+
_context2.t1 = _objectSpread$m({}, init.config.headers);
|
|
290
290
|
_context2.t2 = {};
|
|
291
291
|
_context2.next = 21;
|
|
292
292
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -1104,57 +1104,63 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
1106
|
/******************IDM Service CALLs */
|
|
1107
|
+
}, {
|
|
1108
|
+
key: "isSeller",
|
|
1109
|
+
get: function get() {
|
|
1110
|
+
return !this.useEnricherService && !this.useIDMService;
|
|
1111
|
+
}
|
|
1107
1112
|
}, {
|
|
1108
1113
|
key: "idmPrefix",
|
|
1109
1114
|
get: function get() {
|
|
1110
1115
|
if (this.useEnricherService && !this.packageId) throw new Error('packageId as parameter not missing');
|
|
1111
|
-
return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live';
|
|
1116
|
+
return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live/' + this.organization._id;
|
|
1112
1117
|
}
|
|
1113
1118
|
}, {
|
|
1114
1119
|
key: "getIDMCatalog",
|
|
1115
1120
|
value: function getIDMCatalog(catalogId) {
|
|
1121
|
+
if (this.isSeller) return this.idmPrefix + '/packages' + (!this.useEnricherService ? '/' + catalogId + '/catalog' : '');
|
|
1116
1122
|
return this.idmPrefix + '/catalogs' + (!this.useEnricherService ? '/' + catalogId : '');
|
|
1117
1123
|
}
|
|
1118
1124
|
}, {
|
|
1119
1125
|
key: "getIDMSerieByNo",
|
|
1120
|
-
value: function getIDMSerieByNo(
|
|
1121
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1126
|
+
value: function getIDMSerieByNo(packageId, serieId, serieNo) {
|
|
1127
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/series/' + (this.useIDMService ? serieId : serieNo);
|
|
1122
1128
|
}
|
|
1123
1129
|
}, {
|
|
1124
1130
|
key: "getIDMItems",
|
|
1125
|
-
value: function getIDMItems(
|
|
1126
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1131
|
+
value: function getIDMItems(packageId, serieId, serieNo, typeNos) {
|
|
1132
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/series/' + (this.useIDMService ? serieId : serieNo) + '/items' + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
|
|
1127
1133
|
return encodeURIComponent('typeNo==' + t);
|
|
1128
|
-
}).join(' || ') : '?fields=properties;serieNo;featureClassRefNo;priceTypeRef;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;detailInfos;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber;avrFilter;avlFilter');
|
|
1134
|
+
}).join(' || ') : '?fields=properties;serieNo;featureClassRefNo;priceTypeRef;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;detailInfos;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber;avrFilter;avlFilter;images;svgs');
|
|
1129
1135
|
}
|
|
1130
1136
|
}, {
|
|
1131
1137
|
key: "getIDMFeatures",
|
|
1132
|
-
value: function getIDMFeatures(
|
|
1133
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1138
|
+
value: function getIDMFeatures(packageId, features) {
|
|
1139
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/features' + '?featureNos=' + features.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
|
|
1134
1140
|
}
|
|
1135
1141
|
}, {
|
|
1136
1142
|
key: "getIDMDecisions",
|
|
1137
|
-
value: function getIDMDecisions(
|
|
1138
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1143
|
+
value: function getIDMDecisions(packageId, decisions) {
|
|
1144
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/decisions' + '?decisionNos=' + decisions.join(';') + (this.smSupplierNr ? '&supplierNo=' + this.smSupplierNr : '');
|
|
1139
1145
|
}
|
|
1140
1146
|
}, {
|
|
1141
1147
|
key: "getIDMDetailInfos",
|
|
1142
|
-
value: function getIDMDetailInfos(
|
|
1143
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1148
|
+
value: function getIDMDetailInfos(packageId, detailinfos) {
|
|
1149
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/detailinfos' + '?filter=' + detailinfos.map(function (d) {
|
|
1144
1150
|
return encodeURIComponent('featureClassNo==' + d);
|
|
1145
1151
|
}).join(' || ');
|
|
1146
1152
|
}
|
|
1147
1153
|
}, {
|
|
1148
1154
|
key: "getIDMFeatureClass",
|
|
1149
|
-
value: function getIDMFeatureClass(
|
|
1150
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1155
|
+
value: function getIDMFeatureClass(packageId, featureclasses) {
|
|
1156
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/featureclasses' + '?filter=' + featureclasses.map(function (f) {
|
|
1151
1157
|
return encodeURIComponent('featureClassNo==' + f);
|
|
1152
1158
|
}).join(' || ');
|
|
1153
1159
|
}
|
|
1154
1160
|
}, {
|
|
1155
1161
|
key: "getIDMPriceFeatureGroups",
|
|
1156
|
-
value: function getIDMPriceFeatureGroups(
|
|
1157
|
-
return this.idmPrefix + '/catalogs/' +
|
|
1162
|
+
value: function getIDMPriceFeatureGroups(packageId, pricefeaturegroups) {
|
|
1163
|
+
return this.idmPrefix + (this.isSeller ? '/packages/' : '/catalogs/') + packageId + '/pricefeaturegroups' + '?filter=' + pricefeaturegroups.map(function (p) {
|
|
1158
1164
|
return encodeURIComponent('priceFeatureGroupNo==' + p);
|
|
1159
1165
|
}).join(' || ');
|
|
1160
1166
|
}
|
|
@@ -1242,11 +1248,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1242
1248
|
headers = this.getAiServiceAuthHeaders(leadKey);
|
|
1243
1249
|
_context9.next = 4;
|
|
1244
1250
|
return this.fetchData(url, {
|
|
1245
|
-
data: _objectSpread$
|
|
1251
|
+
data: _objectSpread$m(_objectSpread$m({}, data), {}, {
|
|
1246
1252
|
organizationId: this.OrganizationId
|
|
1247
1253
|
}),
|
|
1248
1254
|
config: {
|
|
1249
|
-
headers: _objectSpread$
|
|
1255
|
+
headers: _objectSpread$m(_objectSpread$m({}, headers), {}, {
|
|
1250
1256
|
'X-Session-Id': DivaUtils__default["default"].SessionId,
|
|
1251
1257
|
'X-Configurator-Id': (_DivaUtils$Configurat = DivaUtils__default["default"].ConfigurationId) !== null && _DivaUtils$Configurat !== void 0 ? _DivaUtils$Configurat : ''
|
|
1252
1258
|
})
|
|
@@ -16392,7 +16398,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16392
16398
|
return undefined;
|
|
16393
16399
|
});
|
|
16394
16400
|
this.opv = opv;
|
|
16395
|
-
opv.
|
|
16401
|
+
if (opv.imagePaletteColor) {
|
|
16402
|
+
this.opv.colorGroups = [opv.imagePaletteColor];
|
|
16403
|
+
} else {
|
|
16404
|
+
opv.colorGroups = this.mapRALColorToGroup();
|
|
16405
|
+
}
|
|
16396
16406
|
var metaDatas = setOptionValueProperties(catalogData, this.opv.propertyObj, (_this$opv$property = this.opv.property) !== null && _this$opv$property !== void 0 ? _this$opv$property : []);
|
|
16397
16407
|
this.opv.metaData = metaDatas;
|
|
16398
16408
|
}
|
|
@@ -16493,27 +16503,32 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16493
16503
|
}, {
|
|
16494
16504
|
key: "isFreeText",
|
|
16495
16505
|
get: function get() {
|
|
16496
|
-
|
|
16506
|
+
var _this$opv$propertyObj;
|
|
16507
|
+
return (_this$opv$propertyObj = this.opv.propertyObj.optionFreeText) !== null && _this$opv$propertyObj !== void 0 ? _this$opv$propertyObj : this.opv.isFreeText;
|
|
16497
16508
|
}
|
|
16498
16509
|
}, {
|
|
16499
16510
|
key: "measureUnit",
|
|
16500
16511
|
get: function get() {
|
|
16501
|
-
|
|
16512
|
+
var _this$opv$propertyObj2;
|
|
16513
|
+
return (_this$opv$propertyObj2 = this.opv.propertyObj.measureUnit) !== null && _this$opv$propertyObj2 !== void 0 ? _this$opv$propertyObj2 : this.opv.measureUnit;
|
|
16502
16514
|
}
|
|
16503
16515
|
}, {
|
|
16504
16516
|
key: "measureMinimum",
|
|
16505
16517
|
get: function get() {
|
|
16506
|
-
|
|
16518
|
+
var _this$opv$propertyObj3;
|
|
16519
|
+
return (_this$opv$propertyObj3 = this.opv.propertyObj.measureMinimum) !== null && _this$opv$propertyObj3 !== void 0 ? _this$opv$propertyObj3 : this.opv.measureMinimum;
|
|
16507
16520
|
}
|
|
16508
16521
|
}, {
|
|
16509
16522
|
key: "measureMaximum",
|
|
16510
16523
|
get: function get() {
|
|
16511
|
-
|
|
16524
|
+
var _this$opv$propertyObj4;
|
|
16525
|
+
return (_this$opv$propertyObj4 = this.opv.propertyObj.measureMaximum) !== null && _this$opv$propertyObj4 !== void 0 ? _this$opv$propertyObj4 : this.opv.measureMaximum;
|
|
16512
16526
|
}
|
|
16513
16527
|
}, {
|
|
16514
16528
|
key: "measureStep",
|
|
16515
16529
|
get: function get() {
|
|
16516
|
-
|
|
16530
|
+
var _this$opv$propertyObj5;
|
|
16531
|
+
return (_this$opv$propertyObj5 = this.opv.propertyObj.measureStep) !== null && _this$opv$propertyObj5 !== void 0 ? _this$opv$propertyObj5 : this.opv.measureStep;
|
|
16517
16532
|
}
|
|
16518
16533
|
}, {
|
|
16519
16534
|
key: "hideSubarticleDescription",
|
|
@@ -16528,7 +16543,8 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16528
16543
|
}, {
|
|
16529
16544
|
key: "priceUnit",
|
|
16530
16545
|
get: function get() {
|
|
16531
|
-
|
|
16546
|
+
var _this$opv$propertyObj6;
|
|
16547
|
+
return (_this$opv$propertyObj6 = this.opv.propertyObj.priceUnit) !== null && _this$opv$propertyObj6 !== void 0 ? _this$opv$propertyObj6 : this.opv.priceUnit;
|
|
16532
16548
|
}
|
|
16533
16549
|
}, {
|
|
16534
16550
|
key: "value",
|
|
@@ -16760,6 +16776,24 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
16760
16776
|
case 'IsVariantAttribute':
|
|
16761
16777
|
opv.isVariantAttribute = prop.Value == '1';
|
|
16762
16778
|
break;
|
|
16779
|
+
case 'OPTION_FREE_TEXT':
|
|
16780
|
+
opv.optionFreeText = !!prop.Value;
|
|
16781
|
+
break;
|
|
16782
|
+
case 'MEASURE_UNIT':
|
|
16783
|
+
opv.measureUnit = prop.Value;
|
|
16784
|
+
break;
|
|
16785
|
+
case 'MEASURE_MINIMUM':
|
|
16786
|
+
opv.measureMinimum = prop.Value;
|
|
16787
|
+
break;
|
|
16788
|
+
case 'MEASURE_MAXIMUM':
|
|
16789
|
+
opv.measureMaximum = prop.Value;
|
|
16790
|
+
break;
|
|
16791
|
+
case 'MEASURE_STEP':
|
|
16792
|
+
opv.measureStep = prop.Value;
|
|
16793
|
+
break;
|
|
16794
|
+
case 'PRICE_UNIT':
|
|
16795
|
+
opv.priceUnit = prop.Value;
|
|
16796
|
+
break;
|
|
16763
16797
|
case 'ION_COMMENT_TEXT':
|
|
16764
16798
|
case 'EshopCategoryMapping':
|
|
16765
16799
|
case 'TopFilterAttribute':
|
|
@@ -17897,6 +17931,7 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17897
17931
|
isOPVG: jsonOPV.IsOPVG && jsonOPV.IsOPVG == '1' ? true : false,
|
|
17898
17932
|
isFreeText: jsonOPV.FreeText && jsonOPV.FreeText == 'True' ? true : false,
|
|
17899
17933
|
rals: jsonOPV.RALs,
|
|
17934
|
+
imagePaletteColor: jsonOPV.ImagePaletteColor,
|
|
17900
17935
|
isCustomAttribute: jsonOPV.IsCustomAttribute,
|
|
17901
17936
|
measureMinimum: jsonOPV.MeasureMinimum,
|
|
17902
17937
|
measureMaximum: jsonOPV.MeasureMaximum,
|
|
@@ -19443,11 +19478,9 @@ function initDecisions(catalog, catalogArticleData, decisionRefs) {
|
|
|
19443
19478
|
catalogArticle.decisions.splice(i, 1);
|
|
19444
19479
|
i--;
|
|
19445
19480
|
}
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
});
|
|
19450
|
-
}
|
|
19481
|
+
myDecision.Options.sort(function (a, b) {
|
|
19482
|
+
return myOptOrder.indexOf(a) < myOptOrder.indexOf(b) ? -1 : 1;
|
|
19483
|
+
});
|
|
19451
19484
|
}
|
|
19452
19485
|
}
|
|
19453
19486
|
if (myDecision.Type == '3') {
|
|
@@ -19590,20 +19623,20 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
|
|
|
19590
19623
|
return opv;
|
|
19591
19624
|
}
|
|
19592
19625
|
|
|
19593
|
-
function ownKeys$
|
|
19594
|
-
function _objectSpread$
|
|
19626
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19627
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19595
19628
|
var LOG$k = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
19596
19629
|
function loadMoreFromIDMArticles(_x, _x2) {
|
|
19597
19630
|
return _loadMoreFromIDMArticles.apply(this, arguments);
|
|
19598
19631
|
}
|
|
19599
19632
|
function _loadMoreFromIDMArticles() {
|
|
19600
19633
|
_loadMoreFromIDMArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticleDatas, set) {
|
|
19601
|
-
var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions, _i4, _i5, _i6, _catalogArticleData$d2, catalogArticleData, toLoadFeatures, features, _loop4, _i7, _loop6, _i8;
|
|
19634
|
+
var items, _loop3, i, toLoadDecisionIds, toLoadPFGroups, toLoadFeatureClassRefNo, promises, _yield$Promise$all, _yield$Promise$all2, featureClasses, priceFeatureGroups, decisions, _i4, _decisions$map, loadedIds, missingIds, _i5, _i6, _catalogArticleData$d2, catalogArticleData, toLoadFeatures, features, _loop4, _i7, _loop6, _i8;
|
|
19602
19635
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context5) {
|
|
19603
19636
|
while (1) switch (_context5.prev = _context5.next) {
|
|
19604
19637
|
case 0:
|
|
19605
19638
|
_context5.next = 2;
|
|
19606
|
-
return set.api.getDataCache(set.api.getIDMItems(set.CatalogData.
|
|
19639
|
+
return set.api.getDataCache(set.api.getIDMItems(set.CatalogData.accountGuid, set.CatalogData.serieId, set.CatalogData.catalogCodex, catalogArticleDatas.map(function (a) {
|
|
19607
19640
|
return a.articleCodex;
|
|
19608
19641
|
})), undefined, undefined, 'enricher');
|
|
19609
19642
|
case 2:
|
|
@@ -19653,7 +19686,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
19653
19686
|
}).map(function (a) {
|
|
19654
19687
|
return a.featureClassRefNo;
|
|
19655
19688
|
})));
|
|
19656
|
-
promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.
|
|
19689
|
+
promises = [set.api.getDataCache(set.api.getIDMFeatureClass(set.CatalogData.accountGuid, toLoadFeatureClassRefNo), undefined, undefined, 'enricher'), toLoadPFGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(set.CatalogData.accountGuid, toLoadPFGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ? set.api.getDataCache(set.api.getIDMDecisions(set.CatalogData.accountGuid, toLoadDecisionIds), undefined, undefined, 'enricher') : undefined];
|
|
19657
19690
|
_context5.next = 16;
|
|
19658
19691
|
return Promise.all(promises);
|
|
19659
19692
|
case 16:
|
|
@@ -19668,11 +19701,17 @@ function _loadMoreFromIDMArticles() {
|
|
|
19668
19701
|
}
|
|
19669
19702
|
}
|
|
19670
19703
|
if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
|
|
19671
|
-
_context5.next =
|
|
19704
|
+
_context5.next = 26;
|
|
19672
19705
|
break;
|
|
19673
19706
|
}
|
|
19674
|
-
|
|
19675
|
-
|
|
19707
|
+
loadedIds = new Set((_decisions$map = decisions === null || decisions === void 0 ? void 0 : decisions.map(function (d) {
|
|
19708
|
+
return d.decisionNo;
|
|
19709
|
+
})) !== null && _decisions$map !== void 0 ? _decisions$map : []);
|
|
19710
|
+
missingIds = toLoadDecisionIds.filter(function (id) {
|
|
19711
|
+
return !loadedIds.has(id);
|
|
19712
|
+
});
|
|
19713
|
+
throw new Error("loading decisions failed \u2013 missing: [".concat(missingIds.join(', '), "]"));
|
|
19714
|
+
case 26:
|
|
19676
19715
|
if (priceFeatureGroups) {
|
|
19677
19716
|
for (_i5 = 0; _i5 < priceFeatureGroups.length; _i5++) {
|
|
19678
19717
|
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i5], set.CatalogData.idmOptionGroups));
|
|
@@ -19689,12 +19728,12 @@ function _loadMoreFromIDMArticles() {
|
|
|
19689
19728
|
});
|
|
19690
19729
|
toLoadFeatures = getFeatures(set, featureClasses);
|
|
19691
19730
|
if (!toLoadFeatures.length) {
|
|
19692
|
-
_context5.next =
|
|
19731
|
+
_context5.next = 41;
|
|
19693
19732
|
break;
|
|
19694
19733
|
}
|
|
19695
|
-
_context5.next =
|
|
19696
|
-
return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.
|
|
19697
|
-
case
|
|
19734
|
+
_context5.next = 33;
|
|
19735
|
+
return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.accountGuid, toLoadFeatures), undefined, undefined, 'enricher');
|
|
19736
|
+
case 33:
|
|
19698
19737
|
features = _context5.sent;
|
|
19699
19738
|
_loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4() {
|
|
19700
19739
|
var feature, insertIndex, k, _loop5, j;
|
|
@@ -19776,17 +19815,17 @@ function _loadMoreFromIDMArticles() {
|
|
|
19776
19815
|
}, _loop4);
|
|
19777
19816
|
});
|
|
19778
19817
|
_i7 = 0;
|
|
19779
|
-
case
|
|
19818
|
+
case 36:
|
|
19780
19819
|
if (!(_i7 < features.length)) {
|
|
19781
|
-
_context5.next =
|
|
19820
|
+
_context5.next = 41;
|
|
19782
19821
|
break;
|
|
19783
19822
|
}
|
|
19784
|
-
return _context5.delegateYield(_loop4(), "t1",
|
|
19785
|
-
case
|
|
19823
|
+
return _context5.delegateYield(_loop4(), "t1", 38);
|
|
19824
|
+
case 38:
|
|
19786
19825
|
_i7++;
|
|
19787
|
-
_context5.next =
|
|
19826
|
+
_context5.next = 36;
|
|
19788
19827
|
break;
|
|
19789
|
-
case
|
|
19828
|
+
case 41:
|
|
19790
19829
|
_loop6 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop6() {
|
|
19791
19830
|
var catalogArticleData, featureClass, features, j;
|
|
19792
19831
|
return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context4) {
|
|
@@ -19813,21 +19852,21 @@ function _loadMoreFromIDMArticles() {
|
|
|
19813
19852
|
}, _loop6);
|
|
19814
19853
|
});
|
|
19815
19854
|
_i8 = 0;
|
|
19816
|
-
case
|
|
19855
|
+
case 43:
|
|
19817
19856
|
if (!(_i8 < catalogArticleDatas.length)) {
|
|
19818
|
-
_context5.next =
|
|
19857
|
+
_context5.next = 48;
|
|
19819
19858
|
break;
|
|
19820
19859
|
}
|
|
19821
|
-
return _context5.delegateYield(_loop6(), "t2",
|
|
19822
|
-
case
|
|
19860
|
+
return _context5.delegateYield(_loop6(), "t2", 45);
|
|
19861
|
+
case 45:
|
|
19823
19862
|
_i8++;
|
|
19824
|
-
_context5.next =
|
|
19863
|
+
_context5.next = 43;
|
|
19825
19864
|
break;
|
|
19826
|
-
case
|
|
19865
|
+
case 48:
|
|
19827
19866
|
catalogArticleDatas.map(function (c) {
|
|
19828
19867
|
return c.areOptionsLoaded = true;
|
|
19829
19868
|
});
|
|
19830
|
-
case
|
|
19869
|
+
case 49:
|
|
19831
19870
|
case "end":
|
|
19832
19871
|
return _context5.stop();
|
|
19833
19872
|
}
|
|
@@ -19915,11 +19954,11 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
19915
19954
|
var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
|
|
19916
19955
|
var _decision$optionCombi;
|
|
19917
19956
|
var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
|
|
19918
|
-
return _objectSpread$
|
|
19957
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19919
19958
|
projectOptionsSetRefs: parseOptionSetRef(c.projectOptionsSetRefs, idmOptionGroups)
|
|
19920
19959
|
});
|
|
19921
19960
|
});
|
|
19922
|
-
return _objectSpread$
|
|
19961
|
+
return _objectSpread$l(_objectSpread$l({}, decision), {}, {
|
|
19923
19962
|
optionCombinations: optionCombinations === null || optionCombinations === void 0 ? void 0 : optionCombinations.sort(function (a, b) {
|
|
19924
19963
|
return a.sequence - b.sequence;
|
|
19925
19964
|
})
|
|
@@ -19928,16 +19967,16 @@ var initializeDecision = function initializeDecision(decision, idmOptionGroups)
|
|
|
19928
19967
|
var initializePriceFeatureGroups = function initializePriceFeatureGroups(priceFeatureGroup, idmOptionGroups) {
|
|
19929
19968
|
var _priceFeatureGroup$pr, _priceFeatureGroup$pr2;
|
|
19930
19969
|
var finishes = (_priceFeatureGroup$pr = priceFeatureGroup.projectFinishes) === null || _priceFeatureGroup$pr === void 0 ? void 0 : _priceFeatureGroup$pr.map(function (c) {
|
|
19931
|
-
return _objectSpread$
|
|
19970
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19932
19971
|
projectOptionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
|
|
19933
19972
|
});
|
|
19934
19973
|
});
|
|
19935
19974
|
var percentageSurcharges = (_priceFeatureGroup$pr2 = priceFeatureGroup.projectPercentageSurcharges) === null || _priceFeatureGroup$pr2 === void 0 ? void 0 : _priceFeatureGroup$pr2.map(function (c) {
|
|
19936
|
-
return _objectSpread$
|
|
19975
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19937
19976
|
optionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
|
|
19938
19977
|
});
|
|
19939
19978
|
});
|
|
19940
|
-
return _objectSpread$
|
|
19979
|
+
return _objectSpread$l(_objectSpread$l({}, priceFeatureGroup), {}, {
|
|
19941
19980
|
projectFinishes: finishes === null || finishes === void 0 ? void 0 : finishes.sort(function (a, b) {
|
|
19942
19981
|
return a.sequence - b.sequence;
|
|
19943
19982
|
}),
|
|
@@ -20207,19 +20246,18 @@ function rgbToHex(r, g, b) {
|
|
|
20207
20246
|
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
|
20208
20247
|
}
|
|
20209
20248
|
|
|
20210
|
-
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20211
|
-
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20212
20249
|
var LOG$j = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20213
20250
|
function initIDMCatalogData(serie, orderSet, api) {
|
|
20214
|
-
var _serie$
|
|
20251
|
+
var _serie$decisions, _serie$decisions2;
|
|
20215
20252
|
var catalog = serie.catalogData;
|
|
20216
20253
|
var catalogData = {
|
|
20217
|
-
accountGuid:
|
|
20254
|
+
accountGuid: orderSet.AccountGUID,
|
|
20218
20255
|
serieId: serie._id,
|
|
20219
20256
|
accountName: '',
|
|
20220
20257
|
accountLogo: '',
|
|
20221
20258
|
collectionGuid: serie.catalogId,
|
|
20222
|
-
catalogGuid:
|
|
20259
|
+
catalogGuid: '',
|
|
20260
|
+
//serie.enricherPackageId,
|
|
20223
20261
|
catalogCodex: serie.serieNo.toString(),
|
|
20224
20262
|
catalogName: DivaUtils__default["default"].getLocals(serie.seriesName, api.getLanguageLowercase()),
|
|
20225
20263
|
// name des Kataloges
|
|
@@ -20276,18 +20314,19 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
20276
20314
|
}
|
|
20277
20315
|
}
|
|
20278
20316
|
function getCatalogArticle(article, catalogData) {
|
|
20279
|
-
var _catalogData$catalogM, _ref, _articleMask$name, _article$fullText, _article$fullText2, _article$fullText3, _articleMask$properti, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto,
|
|
20317
|
+
var _catalogData$catalogM, _article$images, _article$typeKey, _ref, _articleMask$name, _article$fullText, _article$fullText2, _article$fullText3, _articleMask$properti, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _images$, _article$svgs, _articleMask$groupnam, _articleMask$groupnam2;
|
|
20280
20318
|
var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
|
|
20281
20319
|
var lang = catalogData.api.getLanguageLowercase();
|
|
20282
20320
|
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
20283
20321
|
var optionProperties = convertProperties(article.properties, lang, 'optionKeys');
|
|
20322
|
+
var images = (_article$images = article.images) === null || _article$images === void 0 ? void 0 : _article$images.map(mapIDMMediaItem);
|
|
20284
20323
|
return {
|
|
20285
20324
|
areOptionsLoaded: false,
|
|
20286
20325
|
arePricesLoaded: false,
|
|
20287
20326
|
articleCodex: article.typeNo,
|
|
20288
20327
|
articleOptions: {},
|
|
20289
20328
|
partListExclusive: article.partListExclusive,
|
|
20290
|
-
guid: article.typeKey,
|
|
20329
|
+
guid: (_article$typeKey = article.typeKey) === null || _article$typeKey === void 0 ? void 0 : _article$typeKey.toString(),
|
|
20291
20330
|
articleEAN: article.eanNumber,
|
|
20292
20331
|
typeNr: article.eanNumber,
|
|
20293
20332
|
retailArticleNr: article.salesNumber,
|
|
@@ -20327,34 +20366,12 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20327
20366
|
heightTo: article.heightBasicShapeTo !== undefined ? Math.floor(((_article$heightBasicS3 = article.heightBasicShapeTo) !== null && _article$heightBasicS3 !== void 0 ? _article$heightBasicS3 : 0) / 10) : undefined,
|
|
20328
20367
|
volume: article.volume,
|
|
20329
20368
|
weight: (_article$weightNetto = article.weightNetto) !== null && _article$weightNetto !== void 0 ? _article$weightNetto : article.weightBrutto,
|
|
20330
|
-
image:
|
|
20331
|
-
|
|
20332
|
-
})) === null || _article$detailInfos === void 0 ? void 0 : _article$detailInfos.url),
|
|
20333
|
-
images: (_article$detailInfos2 = article.detailInfos) === null || _article$detailInfos2 === void 0 || (_article$detailInfos2 = _article$detailInfos2.filter(function (d) {
|
|
20334
|
-
return d.functionType == 'CAT_ART';
|
|
20335
|
-
})) === null || _article$detailInfos2 === void 0 ? void 0 : _article$detailInfos2.map(function (d) {
|
|
20336
|
-
var _getLowResUrl, _article$detailInfoRe, _article$detailInfoRe2;
|
|
20337
|
-
return {
|
|
20338
|
-
url: (_getLowResUrl = getLowResUrl(d.url)) !== null && _getLowResUrl !== void 0 ? _getLowResUrl : '',
|
|
20339
|
-
detailInfoNo: d.detailInfoNo,
|
|
20340
|
-
decisionNos: (_article$detailInfoRe = (_article$detailInfoRe2 = article.detailInfoRefs) === null || _article$detailInfoRe2 === void 0 || (_article$detailInfoRe2 = _article$detailInfoRe2[d.detailInfoNo]) === null || _article$detailInfoRe2 === void 0 ? void 0 : _article$detailInfoRe2.filter(function (n) {
|
|
20341
|
-
return n !== null;
|
|
20342
|
-
})) !== null && _article$detailInfoRe !== void 0 ? _article$detailInfoRe : []
|
|
20343
|
-
};
|
|
20344
|
-
}),
|
|
20369
|
+
image: images === null || images === void 0 || (_images$ = images[0]) === null || _images$ === void 0 ? void 0 : _images$.url,
|
|
20370
|
+
images: images,
|
|
20345
20371
|
idmPrices: article.prices,
|
|
20346
20372
|
idmPartlist: article.partlist,
|
|
20347
20373
|
articleRelations: [],
|
|
20348
|
-
svgs: (_article$
|
|
20349
|
-
return d.classification == 'SVG';
|
|
20350
|
-
}).map(function (d) {
|
|
20351
|
-
var _article$detailInfoRe3, _article$detailInfoRe4;
|
|
20352
|
-
return _objectSpread$l(_objectSpread$l({}, d), {}, {
|
|
20353
|
-
decisionNos: (_article$detailInfoRe3 = (_article$detailInfoRe4 = article.detailInfoRefs) === null || _article$detailInfoRe4 === void 0 || (_article$detailInfoRe4 = _article$detailInfoRe4[d.detailInfoNo]) === null || _article$detailInfoRe4 === void 0 ? void 0 : _article$detailInfoRe4.filter(function (n) {
|
|
20354
|
-
return n !== null;
|
|
20355
|
-
})) !== null && _article$detailInfoRe3 !== void 0 ? _article$detailInfoRe3 : []
|
|
20356
|
-
});
|
|
20357
|
-
}),
|
|
20374
|
+
svgs: (_article$svgs = article.svgs) === null || _article$svgs === void 0 ? void 0 : _article$svgs.map(mapIDMMediaItem),
|
|
20358
20375
|
groupName: (_articleMask$groupnam = articleMask === null || articleMask === void 0 || (_articleMask$groupnam2 = articleMask.groupname) === null || _articleMask$groupnam2 === void 0 ? void 0 : _articleMask$groupnam2[catalogData.api.getLanguage()]) !== null && _articleMask$groupnam !== void 0 ? _articleMask$groupnam : article.typeKey
|
|
20359
20376
|
};
|
|
20360
20377
|
}
|
|
@@ -20371,6 +20388,14 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20371
20388
|
function getLowResUrl(url) {
|
|
20372
20389
|
return url === null || url === void 0 ? void 0 : url.replace('.jpg', '_low.jpg').replace('.jpeg', '_low.jpeg').replace('.png', '_low.png');
|
|
20373
20390
|
}
|
|
20391
|
+
function mapIDMMediaItem(mediaItem) {
|
|
20392
|
+
var _getLowResUrl;
|
|
20393
|
+
return {
|
|
20394
|
+
url: (_getLowResUrl = getLowResUrl(mediaItem.url)) !== null && _getLowResUrl !== void 0 ? _getLowResUrl : '',
|
|
20395
|
+
detailInfoNo: mediaItem.detailInfoNo,
|
|
20396
|
+
decisionNos: mediaItem.decisionNo ? [mediaItem.decisionNo] : []
|
|
20397
|
+
};
|
|
20398
|
+
}
|
|
20374
20399
|
function convertProperties() {
|
|
20375
20400
|
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
20376
20401
|
var lang = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -20404,8 +20429,8 @@ function mapProp() {
|
|
|
20404
20429
|
});
|
|
20405
20430
|
}
|
|
20406
20431
|
function getCatalogPlanner(article, catalogArticle, catalogData) {
|
|
20407
|
-
var _article$
|
|
20408
|
-
var svg = (_article$
|
|
20432
|
+
var _article$detailInfos, _article$avlFilter, _article$avrFilter, _article$depthBasicSh4, _article$depthBasicSh5, _article$depthBasicSh6, _article$widthBasicSh4, _article$widthBasicSh5, _article$widthBasicSh6, _article$heightBasicS4, _article$heightBasicS5, _article$heightBasicS6, _svg$avc, _svg$avn, _svg$avo, _svg$avs, _svg$avu, _svg$hasAVL, _svg$hasAVR, _catalogArticle$svgs;
|
|
20433
|
+
var svg = (_article$detailInfos = article.detailInfos) === null || _article$detailInfos === void 0 ? void 0 : _article$detailInfos.find(function (d) {
|
|
20409
20434
|
return d.classification == 'SVG';
|
|
20410
20435
|
});
|
|
20411
20436
|
|
|
@@ -23218,6 +23243,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23218
23243
|
_classCallCheck__default["default"](this, DivaEngine);
|
|
23219
23244
|
_defineProperty__default["default"](this, "article", void 0);
|
|
23220
23245
|
_defineProperty__default["default"](this, "decisionDebugStack", []);
|
|
23246
|
+
_defineProperty__default["default"](this, "catalogDecisionsByNumber", void 0);
|
|
23221
23247
|
this.article = article;
|
|
23222
23248
|
}
|
|
23223
23249
|
return _createClass__default["default"](DivaEngine, [{
|
|
@@ -23701,13 +23727,20 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23701
23727
|
key: "evalAllDecisions",
|
|
23702
23728
|
value: function evalAllDecisions() {
|
|
23703
23729
|
var myDecisions = this.article.catalogArticle.articleReferencedDecisions;
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23730
|
+
var writeIdx = 0;
|
|
23731
|
+
for (var i = 0; i < myDecisions.length; i++) {
|
|
23732
|
+
if (!myDecisions[i].addedViaDisableEnableRef) {
|
|
23733
|
+
myDecisions[writeIdx++] = myDecisions[i];
|
|
23707
23734
|
}
|
|
23708
23735
|
}
|
|
23736
|
+
myDecisions.length = writeIdx;
|
|
23709
23737
|
//add the partlist spesific decisions to the normal decisions
|
|
23710
|
-
if (this.article.initDecisions)
|
|
23738
|
+
if (this.article.initDecisions) {
|
|
23739
|
+
var sortedInitDecisions = _toConsumableArray__default["default"](this.article.initDecisions).sort(function (a, b) {
|
|
23740
|
+
return Number(a.Prio) - Number(b.Prio);
|
|
23741
|
+
});
|
|
23742
|
+
myDecisions = myDecisions.concat(sortedInitDecisions);
|
|
23743
|
+
}
|
|
23711
23744
|
for (var _i = 0; _i < myDecisions.length; _i++) {
|
|
23712
23745
|
var _this$article$catalog;
|
|
23713
23746
|
if ((_this$article$catalog = this.article.catalogArticle.decisionsUsedForPartlist) !== null && _this$article$catalog !== void 0 && _this$article$catalog.includes(Number(myDecisions[_i].Number))) continue;
|
|
@@ -23728,6 +23761,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23728
23761
|
} finally {
|
|
23729
23762
|
_iterator7.f();
|
|
23730
23763
|
}
|
|
23764
|
+
this.catalogDecisionsByNumber = new Map(this.article.catalogArticle.articleDecisions.map(function (d) {
|
|
23765
|
+
return [d.Number, d];
|
|
23766
|
+
}));
|
|
23731
23767
|
this.decisionDebugStack = [];
|
|
23732
23768
|
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
23733
23769
|
for (var m = 0; m < myDecisions.length; m++) {
|
|
@@ -23940,10 +23976,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23940
23976
|
case 'SET_FEATURE_DEFAULT_NULL':
|
|
23941
23977
|
break;
|
|
23942
23978
|
case 'DISABLE_DECISION':
|
|
23943
|
-
this.disableDecision(myDecision,
|
|
23979
|
+
this.disableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23944
23980
|
break;
|
|
23945
23981
|
case 'ENABLE_DECISION':
|
|
23946
|
-
this.enableDecision(myDecision,
|
|
23982
|
+
this.enableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23947
23983
|
break;
|
|
23948
23984
|
default:
|
|
23949
23985
|
LOG$g.error(new DivaUtils.DivaError('Action type not supported in DecisionOptionCombination', {
|
|
@@ -24003,114 +24039,63 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24003
24039
|
}
|
|
24004
24040
|
}, {
|
|
24005
24041
|
key: "disableDecision",
|
|
24006
|
-
value: function disableDecision(myDecision,
|
|
24007
|
-
|
|
24008
|
-
if (myDecision.activeCombination == -1) return;
|
|
24009
|
-
var SearchDecNumber = [];
|
|
24010
|
-
if (myDoc.DA) for (var m = 0; m < myDoc.DA.length; m++) {
|
|
24011
|
-
var decisionAction = myDoc.DA[m];
|
|
24012
|
-
if (decisionAction.Type == 'DISABLE_DECISION') {
|
|
24013
|
-
SearchDecNumber.push(Number(decisionAction.DecisionNr));
|
|
24014
|
-
}
|
|
24015
|
-
}
|
|
24016
|
-
SearchDecNumber.map(function (d) {
|
|
24017
|
-
return myDecisions.find(function (de) {
|
|
24018
|
-
return de.Number == d.toString();
|
|
24019
|
-
});
|
|
24020
|
-
}).map(function (d, index) {
|
|
24021
|
-
var _d$disableHistory;
|
|
24022
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24023
|
-
if (!d) {
|
|
24024
|
-
var decision = _this2.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24025
|
-
return d.Number == decisionNumber.toString();
|
|
24026
|
-
});
|
|
24027
|
-
if (!decision) {
|
|
24028
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in disable decision ' + myDecision.Number + ' not found.');
|
|
24029
|
-
return;
|
|
24030
|
-
}
|
|
24031
|
-
var insertIndex = 0;
|
|
24032
|
-
var prios = myDecisions.map(function (d) {
|
|
24033
|
-
return d.Prio;
|
|
24034
|
-
});
|
|
24035
|
-
if (decision.Prio <= myDecision.Prio) LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' has a lower prio than the enable decision.');
|
|
24036
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24037
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24038
|
-
insertIndex = i;
|
|
24039
|
-
break;
|
|
24040
|
-
}
|
|
24041
|
-
}
|
|
24042
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24043
|
-
enabled: false,
|
|
24044
|
-
disableHistory: ['referenced and disabled By ' + myDecision.Number],
|
|
24045
|
-
addedViaDisableEnableRef: true
|
|
24046
|
-
}));
|
|
24047
|
-
return;
|
|
24048
|
-
}
|
|
24049
|
-
d.enabled = false;
|
|
24050
|
-
(_d$disableHistory = d.disableHistory) === null || _d$disableHistory === void 0 || _d$disableHistory.push('disabled By ' + myDecision.Number);
|
|
24051
|
-
});
|
|
24042
|
+
value: function disableDecision(myDecision, targetDecisionNr, myDecisions) {
|
|
24043
|
+
this.toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, false);
|
|
24052
24044
|
}
|
|
24053
24045
|
}, {
|
|
24054
24046
|
key: "enableDecision",
|
|
24055
|
-
value: function enableDecision(myDecision,
|
|
24056
|
-
|
|
24047
|
+
value: function enableDecision(myDecision, targetDecisionNr, myDecisions) {
|
|
24048
|
+
this.toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, true);
|
|
24049
|
+
}
|
|
24050
|
+
}, {
|
|
24051
|
+
key: "toggleDecisionEnabled",
|
|
24052
|
+
value: function toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, enabled) {
|
|
24053
|
+
var _this$catalogDecision, _this$catalogDecision2;
|
|
24057
24054
|
if (myDecision.activeCombination == -1) return;
|
|
24058
|
-
var
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24055
|
+
var verb = enabled ? 'enabled' : 'disabled';
|
|
24056
|
+
var existing = myDecisions.find(function (d) {
|
|
24057
|
+
return d.Number == targetDecisionNr;
|
|
24058
|
+
});
|
|
24059
|
+
if (existing) {
|
|
24060
|
+
var _existing$disableHist;
|
|
24061
|
+
existing.enabled = enabled;
|
|
24062
|
+
(_existing$disableHist = existing.disableHistory) === null || _existing$disableHist === void 0 || _existing$disableHist.push("".concat(verb, " By ").concat(myDecision.Number));
|
|
24063
|
+
return;
|
|
24066
24064
|
}
|
|
24067
|
-
|
|
24068
|
-
return
|
|
24069
|
-
return de.Number == d.toString();
|
|
24070
|
-
});
|
|
24071
|
-
}).map(function (d, index) {
|
|
24072
|
-
var _d$disableHistory2;
|
|
24073
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24074
|
-
if (!d) {
|
|
24075
|
-
var decision = _this3.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24076
|
-
return d.Number == decisionNumber.toString();
|
|
24077
|
-
});
|
|
24078
|
-
if (!decision) {
|
|
24079
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' not found.');
|
|
24080
|
-
return;
|
|
24081
|
-
}
|
|
24082
|
-
var insertIndex = 0;
|
|
24083
|
-
var prios = myDecisions.map(function (d) {
|
|
24084
|
-
return d.Prio;
|
|
24085
|
-
});
|
|
24086
|
-
if (decision.Prio <= myDecision.Prio) LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' has a lower prio than the enable decision.');
|
|
24087
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24088
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24089
|
-
insertIndex = i;
|
|
24090
|
-
break;
|
|
24091
|
-
}
|
|
24092
|
-
}
|
|
24093
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24094
|
-
enabled: true,
|
|
24095
|
-
disableHistory: ['referenced and enabled By ' + myDecision.Number],
|
|
24096
|
-
addedViaDisableEnableRef: true
|
|
24097
|
-
}));
|
|
24098
|
-
return;
|
|
24099
|
-
}
|
|
24100
|
-
d.enabled = true;
|
|
24101
|
-
(_d$disableHistory2 = d.disableHistory) === null || _d$disableHistory2 === void 0 || _d$disableHistory2.push('enabled By ' + myDecision.Number);
|
|
24065
|
+
var decision = (_this$catalogDecision = (_this$catalogDecision2 = this.catalogDecisionsByNumber) === null || _this$catalogDecision2 === void 0 ? void 0 : _this$catalogDecision2.get(targetDecisionNr)) !== null && _this$catalogDecision !== void 0 ? _this$catalogDecision : this.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24066
|
+
return d.Number == targetDecisionNr;
|
|
24102
24067
|
});
|
|
24068
|
+
if (!decision) {
|
|
24069
|
+
LOG$g.warn("Decision ".concat(targetDecisionNr, " that is referenced in ").concat(verb.replace('d', ''), " decision ").concat(myDecision.Number, " not found."));
|
|
24070
|
+
return;
|
|
24071
|
+
}
|
|
24072
|
+
var decisionPrio = Number(decision.Prio);
|
|
24073
|
+
if (decisionPrio <= Number(myDecision.Prio)) {
|
|
24074
|
+
LOG$g.warn("Decision ".concat(targetDecisionNr, " that is referenced in enable decision ").concat(myDecision.Number, " has a lower prio than the enable decision."));
|
|
24075
|
+
}
|
|
24076
|
+
var insertIndex = 0;
|
|
24077
|
+
for (var i = 0; i < myDecisions.length; i++) {
|
|
24078
|
+
if (Number(myDecisions[i].Prio) >= decisionPrio) {
|
|
24079
|
+
insertIndex = i;
|
|
24080
|
+
break;
|
|
24081
|
+
}
|
|
24082
|
+
}
|
|
24083
|
+
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24084
|
+
enabled: enabled,
|
|
24085
|
+
disableHistory: ["referenced and ".concat(verb, " By ").concat(myDecision.Number)],
|
|
24086
|
+
addedViaDisableEnableRef: true
|
|
24087
|
+
}));
|
|
24103
24088
|
}
|
|
24104
24089
|
}, {
|
|
24105
24090
|
key: "evalType1Decision",
|
|
24106
24091
|
value: function evalType1Decision(myDecision) {
|
|
24107
|
-
var
|
|
24092
|
+
var _this2 = this;
|
|
24108
24093
|
var validOPVs = {};
|
|
24109
24094
|
var doAlsoCheckOPTs = [];
|
|
24110
24095
|
if (myDecision.Options && myDecision.DOC) {
|
|
24111
24096
|
var _loop2 = function _loop2() {
|
|
24112
24097
|
var OPT = myDecision.Options[p];
|
|
24113
|
-
var ops =
|
|
24098
|
+
var ops = _this2.article.getArticleOptionStateFlat(OPT);
|
|
24114
24099
|
if (!ops) return 1; // break
|
|
24115
24100
|
if (!validOPVs[OPT]) validOPVs[OPT] = new Map();
|
|
24116
24101
|
var possibleOPVs = new Map(ops.visibleOptionValues);
|
|
@@ -24121,7 +24106,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24121
24106
|
//wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
|
|
24122
24107
|
|
|
24123
24108
|
var myDoc = myDecision.DOC[j];
|
|
24124
|
-
var doUseDoc =
|
|
24109
|
+
var doUseDoc = _this2.checkIfDocIsValid(myDoc, doAlsoCheckOPTs);
|
|
24125
24110
|
if (doUseDoc) {
|
|
24126
24111
|
var _myDoc$Row;
|
|
24127
24112
|
myDecision.activeCombination = j;
|
|
@@ -24199,10 +24184,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24199
24184
|
ops.updateVisibleOptionValues(new Map(schnittmenge));
|
|
24200
24185
|
var valCodex = ops.valCodex;
|
|
24201
24186
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24202
|
-
if (
|
|
24203
|
-
|
|
24187
|
+
if (_this2.article.CatalogData.useDiomexConfigLogic) {
|
|
24188
|
+
_this2.clearOP(OPT, true);
|
|
24204
24189
|
} else {
|
|
24205
|
-
|
|
24190
|
+
_this2.updateArtOPV(_this2.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24206
24191
|
}
|
|
24207
24192
|
}
|
|
24208
24193
|
doAlsoCheckOPTs.push(OPT);
|
|
@@ -24239,13 +24224,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24239
24224
|
}, {
|
|
24240
24225
|
key: "evalType0Decision",
|
|
24241
24226
|
value: function evalType0Decision(myDecision) {
|
|
24242
|
-
var
|
|
24227
|
+
var _this3 = this;
|
|
24243
24228
|
var invalidOPVs = {},
|
|
24244
24229
|
doAlsoCheckOPTs = [];
|
|
24245
24230
|
if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) {
|
|
24246
24231
|
var _loop3 = function _loop3() {
|
|
24247
24232
|
var OPT = myDecision.Options[p];
|
|
24248
|
-
var ops =
|
|
24233
|
+
var ops = _this3.article.getArticleOptionStateFlat(OPT);
|
|
24249
24234
|
if (!ops) return 1; // break
|
|
24250
24235
|
if (!invalidOPVs[OPT]) invalidOPVs[OPT] = new Map();
|
|
24251
24236
|
var possibleOPVs = ops.visibleOptionValues;
|
|
@@ -24262,7 +24247,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24262
24247
|
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
24263
24248
|
var _myDoc$Row3;
|
|
24264
24249
|
var checkOptX = doAlsoCheckOPTs[f];
|
|
24265
|
-
var _ops3 =
|
|
24250
|
+
var _ops3 = _this3.article.getArticleOptionState(checkOptX);
|
|
24266
24251
|
if (_ops3 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
|
|
24267
24252
|
doUseDoc = false;
|
|
24268
24253
|
break;
|
|
@@ -24290,10 +24275,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24290
24275
|
ops.updateVisibleOptionValues(schnittmenge);
|
|
24291
24276
|
var valCodex = ops.valCodex;
|
|
24292
24277
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24293
|
-
if (
|
|
24294
|
-
|
|
24278
|
+
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
24279
|
+
_this3.clearOP(OPT, true);
|
|
24295
24280
|
} else {
|
|
24296
|
-
|
|
24281
|
+
_this3.updateArtOPV(_this3.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24297
24282
|
}
|
|
24298
24283
|
}
|
|
24299
24284
|
} else if (p < myDecision.Options.length - 1) {
|
|
@@ -24621,7 +24606,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24621
24606
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24622
24607
|
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber, partlistGroupPrefix, loadReason) {
|
|
24623
24608
|
var _myPartListPos$Option,
|
|
24624
|
-
|
|
24609
|
+
_this4 = this;
|
|
24625
24610
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
24626
24611
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
24627
24612
|
var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
|
|
@@ -24632,9 +24617,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24632
24617
|
var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
|
|
24633
24618
|
var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
|
|
24634
24619
|
var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
|
|
24635
|
-
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' &&
|
|
24636
|
-
myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule,
|
|
24637
|
-
myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule,
|
|
24620
|
+
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this4.article.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
|
|
24621
|
+
myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
|
|
24622
|
+
myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
|
|
24638
24623
|
}
|
|
24639
24624
|
var initDecisions = decisions.filter(function (decision) {
|
|
24640
24625
|
return decision.RelationType !== 'PosCount';
|
|
@@ -24644,7 +24629,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24644
24629
|
});
|
|
24645
24630
|
});
|
|
24646
24631
|
var quanitity = 1;
|
|
24647
|
-
if (
|
|
24632
|
+
if (_this4.article.CatalogData.useDecisionPosCountValue) {
|
|
24648
24633
|
var _decision$DOC;
|
|
24649
24634
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
24650
24635
|
var decision = decisionNumber ? allDecisions.find(function (d) {
|
|
@@ -24659,12 +24644,12 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24659
24644
|
return a.SetPosCountValue !== undefined;
|
|
24660
24645
|
})) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
|
|
24661
24646
|
quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
|
|
24662
|
-
} else if (
|
|
24647
|
+
} else if (_this4.article.CatalogData.usePosCountValue) {
|
|
24663
24648
|
quanitity = myPartListPos.PosCountValue;
|
|
24664
24649
|
}
|
|
24665
|
-
quanitity = quanitity *
|
|
24666
|
-
var previousPartlistArticle =
|
|
24667
|
-
if (
|
|
24650
|
+
quanitity = quanitity * _this4.article.quantity;
|
|
24651
|
+
var previousPartlistArticle = _this4.article.getPreviousPartlistArticle(articleCodex);
|
|
24652
|
+
if (_this4.article.set.logDecisions) {
|
|
24668
24653
|
var base = {
|
|
24669
24654
|
articleCodex: articleCodex,
|
|
24670
24655
|
catalogCodex: catalogCodex,
|
|
@@ -24672,7 +24657,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24672
24657
|
sequenceNo: myPartListPos.SequenceNo
|
|
24673
24658
|
};
|
|
24674
24659
|
if (quanitity < 1) {
|
|
24675
|
-
|
|
24660
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24676
24661
|
loaded: false,
|
|
24677
24662
|
reason: 'Quantity < 1',
|
|
24678
24663
|
quantity: quanitity,
|
|
@@ -24680,7 +24665,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24680
24665
|
});
|
|
24681
24666
|
return 1; // continue
|
|
24682
24667
|
}
|
|
24683
|
-
|
|
24668
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24684
24669
|
loaded: true,
|
|
24685
24670
|
reason: loadReason !== null && loadReason !== void 0 ? loadReason : 'Loaded',
|
|
24686
24671
|
decisionNo: decisionNumber,
|
|
@@ -24703,13 +24688,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24703
24688
|
if (quanitity >= 1) {
|
|
24704
24689
|
var _myDecisionVal$Rule;
|
|
24705
24690
|
partlistArticlesToLoad.push({
|
|
24706
|
-
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex :
|
|
24691
|
+
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this4.article.catalogCodex,
|
|
24707
24692
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
24708
24693
|
ArticleCodex: articleCodex,
|
|
24709
24694
|
RetailArticleNr: retailArticleNr,
|
|
24710
24695
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
24711
24696
|
Quantity: quanitity,
|
|
24712
|
-
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils__default["default"].getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '',
|
|
24697
|
+
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils__default["default"].getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this4.article.VariantValues) : undefined,
|
|
24713
24698
|
partlistDecisionNo: decisionNumber,
|
|
24714
24699
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
24715
24700
|
initDecisions: initDecisionsFiltered,
|
|
@@ -24718,7 +24703,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24718
24703
|
RuleDesc_locales: myRuleDesc_locales,
|
|
24719
24704
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
24720
24705
|
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
24721
|
-
VariantValues:
|
|
24706
|
+
VariantValues: _this4.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
24722
24707
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
24723
24708
|
optionImgForPrint: optionImgForPrint,
|
|
24724
24709
|
optionsForPrint: optionsForPrint,
|
|
@@ -24767,7 +24752,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24767
24752
|
}, {
|
|
24768
24753
|
key: "calcConfigPrice",
|
|
24769
24754
|
value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
|
|
24770
|
-
var
|
|
24755
|
+
var _this5 = this,
|
|
24771
24756
|
_this$article$catalog5;
|
|
24772
24757
|
//Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
|
|
24773
24758
|
//wenn ja, hier neues shape übergeben
|
|
@@ -24901,7 +24886,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24901
24886
|
if (!targetPPGPrefixes) continue;
|
|
24902
24887
|
var _loop7 = function _loop7() {
|
|
24903
24888
|
var targetPrefix = targetPPGPrefixes[_i8];
|
|
24904
|
-
var priceRef =
|
|
24889
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24905
24890
|
var _item$PPG;
|
|
24906
24891
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
24907
24892
|
});
|
|
@@ -24926,11 +24911,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24926
24911
|
var _loop6 = function _loop6() {
|
|
24927
24912
|
var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
|
|
24928
24913
|
var myArtOpv;
|
|
24929
|
-
var priceRef =
|
|
24914
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24930
24915
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
24931
24916
|
});
|
|
24932
24917
|
if (!priceRef) {
|
|
24933
|
-
var _iterator13 = _createForOfIteratorHelper$a(
|
|
24918
|
+
var _iterator13 = _createForOfIteratorHelper$a(_this5.article.articleOptionStates.values()),
|
|
24934
24919
|
_step13;
|
|
24935
24920
|
try {
|
|
24936
24921
|
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
@@ -25174,7 +25159,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25174
25159
|
value: function updateConfigDependentMedia() {
|
|
25175
25160
|
var _this$article$catalog6,
|
|
25176
25161
|
_this$article$catalog7,
|
|
25177
|
-
|
|
25162
|
+
_this6 = this;
|
|
25178
25163
|
var catalogData = this.article.CatalogData;
|
|
25179
25164
|
//articlebild berechnung
|
|
25180
25165
|
|
|
@@ -25301,7 +25286,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25301
25286
|
var _plannerCatArt$topSvg;
|
|
25302
25287
|
var custom = {
|
|
25303
25288
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
25304
|
-
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula,
|
|
25289
|
+
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this6.article.catalogCodex, catalogData.multiselectOptions);
|
|
25305
25290
|
}),
|
|
25306
25291
|
catalogName: catalogData.catalogName,
|
|
25307
25292
|
catalogCodex: this.article.catalogCodex,
|
|
@@ -25647,7 +25632,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25647
25632
|
});
|
|
25648
25633
|
var ref = optionSetRef === null || optionSetRef === void 0 ? void 0 : optionSetRef.optionList;
|
|
25649
25634
|
if (optionSetRef && !optionSetRef.optionList) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
|
|
25650
|
-
var doUseDoc =
|
|
25635
|
+
var doUseDoc = true;
|
|
25651
25636
|
if (doAlsoCheckFeature.length > 0) {
|
|
25652
25637
|
var _loop4 = function _loop4() {
|
|
25653
25638
|
var _combination$projectO2;
|
|
@@ -26816,6 +26801,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26816
26801
|
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
26817
26802
|
partListParentArticle: initParams.parentArticle,
|
|
26818
26803
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
26804
|
+
dontAddToFinalOrderLine: initParams.dontAddToFinalOrderLine,
|
|
26819
26805
|
partlistArticleStandalone: initParams.partlistArticleStandalone,
|
|
26820
26806
|
partlistGroupPrefix: initParams.partlistGroupPrefix,
|
|
26821
26807
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
@@ -28646,6 +28632,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28646
28632
|
}
|
|
28647
28633
|
return ret;
|
|
28648
28634
|
}
|
|
28635
|
+
}, {
|
|
28636
|
+
key: "dontAddToFinalOrderLine",
|
|
28637
|
+
get: function get() {
|
|
28638
|
+
return this.article.dontAddToFinalOrderLine;
|
|
28639
|
+
}
|
|
28649
28640
|
}, {
|
|
28650
28641
|
key: "areAllOptionsDefined",
|
|
28651
28642
|
get: function get() {
|
|
@@ -29487,7 +29478,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29487
29478
|
break;
|
|
29488
29479
|
}
|
|
29489
29480
|
_context.next = 4;
|
|
29490
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
29481
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-c4449795.js'); });
|
|
29491
29482
|
case 4:
|
|
29492
29483
|
_yield$import = _context.sent;
|
|
29493
29484
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -31220,6 +31211,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31220
31211
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
31221
31212
|
initDecisions: doLoadItem.initDecisions,
|
|
31222
31213
|
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
31214
|
+
dontAddToFinalOrderLine: doLoadItem.PosInvisibility === 1,
|
|
31223
31215
|
partlistArticleStandalone: doLoadItem.ConfigurationMode,
|
|
31224
31216
|
partlistGroupPrefix: doLoadItem.partlistGroupPrefix,
|
|
31225
31217
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
@@ -31612,6 +31604,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31612
31604
|
Width: article.width,
|
|
31613
31605
|
Depth: article.depth,
|
|
31614
31606
|
Height: article.height,
|
|
31607
|
+
dontAddToFinalOrderLine: article.dontAddToFinalOrderLine,
|
|
31615
31608
|
CatalogCodex: catalogData.catalogCodex,
|
|
31616
31609
|
CatalogName: catalogData.catalogName,
|
|
31617
31610
|
VKPrice: article.getVkPrice,
|
|
@@ -33118,10 +33111,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
33118
33111
|
value: function getNewConfigStepKeyByBasketId(curConfigStepKey, basketId) {
|
|
33119
33112
|
var steps = this.getAllByKey(curConfigStepKey);
|
|
33120
33113
|
if (steps) {
|
|
33121
|
-
var
|
|
33122
|
-
return (
|
|
33114
|
+
var _Array$from$find;
|
|
33115
|
+
return (_Array$from$find = Array.from(steps.optionStep.configSteps.values()).find(function (step) {
|
|
33123
33116
|
return step.targetArticles.includes(basketId);
|
|
33124
|
-
})) === null ||
|
|
33117
|
+
})) === null || _Array$from$find === void 0 ? void 0 : _Array$from$find.key;
|
|
33125
33118
|
}
|
|
33126
33119
|
return undefined;
|
|
33127
33120
|
}
|
|
@@ -34868,6 +34861,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34868
34861
|
if (Object.values(articles).find(function (article) {
|
|
34869
34862
|
return article.shelfPlanner;
|
|
34870
34863
|
})) return;
|
|
34864
|
+
if (Object.values(articles).find(function (article) {
|
|
34865
|
+
return article.set.CatalogData.useBoxPlanner;
|
|
34866
|
+
})) return;
|
|
34871
34867
|
var _iterator3 = _createForOfIteratorHelper$4(configTree.tabGroups),
|
|
34872
34868
|
_step3;
|
|
34873
34869
|
try {
|
|
@@ -37421,7 +37417,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
37421
37417
|
break;
|
|
37422
37418
|
}
|
|
37423
37419
|
_context5.next = 3;
|
|
37424
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
37420
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-d9d820b2.js'); });
|
|
37425
37421
|
case 3:
|
|
37426
37422
|
_yield$import = _context5.sent;
|
|
37427
37423
|
DoorPlanner = _yield$import["default"];
|
|
@@ -41453,6 +41449,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41453
41449
|
key: "initProductId",
|
|
41454
41450
|
value: function () {
|
|
41455
41451
|
var _initProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(api, productId) {
|
|
41452
|
+
var _this$plannerConfig$c4;
|
|
41456
41453
|
var result, successful;
|
|
41457
41454
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
41458
41455
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -41464,7 +41461,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41464
41461
|
this.assignNewDivaNr = true;
|
|
41465
41462
|
_context2.next = 6;
|
|
41466
41463
|
return this.initBasket(api, result.divaNr, {
|
|
41467
|
-
basket: result.configuration
|
|
41464
|
+
basket: _objectSpread$9(_objectSpread$9({}, result.configuration), {}, {
|
|
41465
|
+
OrganizationId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
|
|
41466
|
+
})
|
|
41468
41467
|
}, false, productId);
|
|
41469
41468
|
case 6:
|
|
41470
41469
|
successful = _context2.sent;
|
|
@@ -41682,7 +41681,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41682
41681
|
_context5.next = 36;
|
|
41683
41682
|
break;
|
|
41684
41683
|
case 44:
|
|
41685
|
-
this.baskets[newDivaNr] = new basketModel.BasketData(basket);
|
|
41684
|
+
this.baskets[newDivaNr] = new basketModel.BasketData(_objectSpread$9({}, basket));
|
|
41686
41685
|
this.baskets[newDivaNr].clearRenderData();
|
|
41687
41686
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
41688
41687
|
if (this.assignNewDivaNr) {
|
|
@@ -41825,7 +41824,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41825
41824
|
key: "loadBasketByCustomProductId",
|
|
41826
41825
|
value: function () {
|
|
41827
41826
|
var _loadBasketByCustomProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(api, key, productId, fields) {
|
|
41828
|
-
var variantData;
|
|
41827
|
+
var variantData, _this$plannerConfig$c5;
|
|
41829
41828
|
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
41830
41829
|
while (1) switch (_context8.prev = _context8.next) {
|
|
41831
41830
|
case 0:
|
|
@@ -41855,7 +41854,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41855
41854
|
if (variantData.productGroup) {
|
|
41856
41855
|
this.analyticsRelevantData.productGroup = variantData.productGroup;
|
|
41857
41856
|
}
|
|
41858
|
-
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr,
|
|
41857
|
+
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, {
|
|
41858
|
+
basket: _objectSpread$9(_objectSpread$9({}, variantData.basket), {}, {
|
|
41859
|
+
OrganizationId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
41860
|
+
})
|
|
41861
|
+
}, undefined, productId));
|
|
41859
41862
|
case 12:
|
|
41860
41863
|
_context8.next = 18;
|
|
41861
41864
|
break;
|
|
@@ -41982,7 +41985,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41982
41985
|
key: "saveToBasket",
|
|
41983
41986
|
value: function () {
|
|
41984
41987
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(api, actBasket, returnTo, arReady) {
|
|
41985
|
-
var _this$plannerConfig$s10, _this$plannerConfig$
|
|
41988
|
+
var _this$plannerConfig$s10, _this$plannerConfig$c6, _this$_basketHandler, _api$getJwt, _URLSearchParams$get;
|
|
41986
41989
|
var response;
|
|
41987
41990
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
41988
41991
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -41997,12 +42000,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41997
42000
|
return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, (_this$plannerConfig$s10 = this.plannerConfig.settings) === null || _this$plannerConfig$s10 === void 0 ? void 0 : _this$plannerConfig$s10.keepSalesPersonDataInBasket);
|
|
41998
42001
|
case 8:
|
|
41999
42002
|
actBasket.UserLanguage = api.getLanguage();
|
|
42000
|
-
actBasket.PrintRetailLogo = (_this$plannerConfig$
|
|
42003
|
+
actBasket.PrintRetailLogo = (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6.logoUrl;
|
|
42001
42004
|
_context11.next = 12;
|
|
42002
42005
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
42003
42006
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
42004
42007
|
basket: actBasket,
|
|
42005
|
-
awaitPDF: true,
|
|
42008
|
+
awaitPDF: returnTo == 'SAVE_BASKET_ASYNC' ? false : true,
|
|
42006
42009
|
utmCampaign: (_URLSearchParams$get = new URLSearchParams(window.location.search).get('utm_campaign')) !== null && _URLSearchParams$get !== void 0 ? _URLSearchParams$get : undefined,
|
|
42007
42010
|
saveToApi2: false,
|
|
42008
42011
|
apiKey: api.getApiKey()
|
|
@@ -42185,7 +42188,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42185
42188
|
break;
|
|
42186
42189
|
case 3:
|
|
42187
42190
|
_context12.next = 5;
|
|
42188
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
42191
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-bf4b2af0.js'); });
|
|
42189
42192
|
case 5:
|
|
42190
42193
|
_yield$import = _context12.sent;
|
|
42191
42194
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -42193,7 +42196,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42193
42196
|
return _context12.abrupt("break", 27);
|
|
42194
42197
|
case 9:
|
|
42195
42198
|
_context12.next = 11;
|
|
42196
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
42199
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-1b4c240f.js'); });
|
|
42197
42200
|
case 11:
|
|
42198
42201
|
_yield$import2 = _context12.sent;
|
|
42199
42202
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -42201,7 +42204,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42201
42204
|
return _context12.abrupt("break", 27);
|
|
42202
42205
|
case 15:
|
|
42203
42206
|
_context12.next = 17;
|
|
42204
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
42207
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-e4e0835e.js'); });
|
|
42205
42208
|
case 17:
|
|
42206
42209
|
_yield$import3 = _context12.sent;
|
|
42207
42210
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -42209,7 +42212,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42209
42212
|
return _context12.abrupt("break", 27);
|
|
42210
42213
|
case 21:
|
|
42211
42214
|
_context12.next = 23;
|
|
42212
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
42215
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-7d3feb60.js'); });
|
|
42213
42216
|
case 23:
|
|
42214
42217
|
_yield$import4 = _context12.sent;
|
|
42215
42218
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -43633,7 +43636,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
43633
43636
|
while (1) switch (_context3.prev = _context3.next) {
|
|
43634
43637
|
case 0:
|
|
43635
43638
|
_context3.next = 2;
|
|
43636
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
43639
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-7a424c6f.js'); });
|
|
43637
43640
|
case 2:
|
|
43638
43641
|
_yield$import = _context3.sent;
|
|
43639
43642
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -45386,7 +45389,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45386
45389
|
break;
|
|
45387
45390
|
case 8:
|
|
45388
45391
|
_context4.next = 10;
|
|
45389
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
45392
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-6839d35f.js'); });
|
|
45390
45393
|
case 10:
|
|
45391
45394
|
_yield$import = _context4.sent;
|
|
45392
45395
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -45397,7 +45400,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45397
45400
|
return _context4.abrupt("break", 21);
|
|
45398
45401
|
case 15:
|
|
45399
45402
|
_context4.next = 17;
|
|
45400
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
45403
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-a83ddf2d.js'); });
|
|
45401
45404
|
case 17:
|
|
45402
45405
|
_yield$import2 = _context4.sent;
|
|
45403
45406
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47247,7 +47250,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47247
47250
|
this.api.setState(this.state);
|
|
47248
47251
|
this.ReturnTo = this.plannerConfig.returnTo;
|
|
47249
47252
|
LOG$1.startTransaction({
|
|
47250
|
-
event: 'onInitializeConfigurator',
|
|
47253
|
+
event: cache !== undefined ? 'onReinitializeConfigurator' : 'onInitializeConfigurator',
|
|
47251
47254
|
message: 'Loading Basket',
|
|
47252
47255
|
eventId: 'LOADING_BASKET',
|
|
47253
47256
|
warningTime: 2000,
|
|
@@ -47262,11 +47265,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47262
47265
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
47263
47266
|
case 12:
|
|
47264
47267
|
loadSuccessful = _context14.sent;
|
|
47265
|
-
if (this.plannerConfig.configuratorSessionId
|
|
47266
|
-
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
47267
|
-
} else if (this.plannerConfig.configuratorSessionId) {
|
|
47268
|
+
if (this.plannerConfig.configuratorSessionId) {
|
|
47268
47269
|
//force new configurator session id - Landingpage case
|
|
47269
47270
|
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
|
|
47271
|
+
} else {
|
|
47272
|
+
// Only create a new configurator session if we don't already have one. This keeps the analytics
|
|
47273
|
+
// session stable across re-inits (e.g. switching products inside the same catalog).
|
|
47274
|
+
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(undefined, true);
|
|
47270
47275
|
}
|
|
47271
47276
|
if (!loadSuccessful) {
|
|
47272
47277
|
_context14.next = 31;
|
|
@@ -47316,7 +47321,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47316
47321
|
value: function () {
|
|
47317
47322
|
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
47318
47323
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
47319
|
-
var _this$actions16, _this$actions16$toggl, initSetState, set, oldProductId, _result$customData, _result$customData2, result, _this$actions18, catalogData, initializationId, _this$plannerConfig$a, initializationType;
|
|
47324
|
+
var _this$actions16, _this$actions16$toggl, initSetState, set, oldProductId, _result$customData$SA, _result$customData, _result$customData2, _result$customData$SA2, _result$customData3, _result$customData4, result, _this$actions18, catalogData, initializationId, _this$plannerConfig$a, initializationType;
|
|
47320
47325
|
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
47321
47326
|
while (1) switch (_context15.prev = _context15.next) {
|
|
47322
47327
|
case 0:
|
|
@@ -47355,8 +47360,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47355
47360
|
case 21:
|
|
47356
47361
|
result = _context15.sent;
|
|
47357
47362
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
47358
|
-
result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL;
|
|
47359
|
-
result === null || result === void 0 || (_result$
|
|
47363
|
+
(_result$customData$SA = result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 || (_result$customData = _result$customData.SAP) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL) !== null && _result$customData$SA !== void 0 ? _result$customData$SA : result === null || result === void 0 || (_result$customData2 = result.customData) === null || _result$customData2 === void 0 || (_result$customData2 = _result$customData2.SAP_MARA_MATKL) === null || _result$customData2 === void 0 ? void 0 : _result$customData2.value;
|
|
47364
|
+
(_result$customData$SA2 = result === null || result === void 0 || (_result$customData3 = result.customData) === null || _result$customData3 === void 0 || (_result$customData3 = _result$customData3.SAP) === null || _result$customData3 === void 0 ? void 0 : _result$customData3.SAP_MARA_PRDHA) !== null && _result$customData$SA2 !== void 0 ? _result$customData$SA2 : result === null || result === void 0 || (_result$customData4 = result.customData) === null || _result$customData4 === void 0 || (_result$customData4 = _result$customData4.SAP_MARA_PRDHA) === null || _result$customData4 === void 0 ? void 0 : _result$customData4.value;
|
|
47360
47365
|
_context15.next = 28;
|
|
47361
47366
|
break;
|
|
47362
47367
|
case 27:
|
|
@@ -48509,7 +48514,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48509
48514
|
break;
|
|
48510
48515
|
}
|
|
48511
48516
|
_context28.t3 = returnTo;
|
|
48512
|
-
_context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : 52;
|
|
48517
|
+
_context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context28.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 52;
|
|
48513
48518
|
break;
|
|
48514
48519
|
case 27:
|
|
48515
48520
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
@@ -48868,8 +48873,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48868
48873
|
}, {
|
|
48869
48874
|
key: "doAllowSetPlanner",
|
|
48870
48875
|
value: function doAllowSetPlanner() {
|
|
48871
|
-
var _this$returnTo, _this$divaBasketHandl3;
|
|
48872
|
-
return this.api.doAllowSetPlanner() || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$divaBasketHandl3 = this.divaBasketHandler) !== null && _this$divaBasketHandl3 !== void 0 && (_this$divaBasketHandl3 = _this$divaBasketHandl3.actBasket) !== null && _this$divaBasketHandl3 !== void 0 && _this$divaBasketHandl3.SetPlannerInfos);
|
|
48876
|
+
var _this$api, _this$returnTo, _this$divaBasketHandl3;
|
|
48877
|
+
return ((_this$api = this.api) === null || _this$api === void 0 ? void 0 : _this$api.doAllowSetPlanner()) || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$divaBasketHandl3 = this.divaBasketHandler) !== null && _this$divaBasketHandl3 !== void 0 && (_this$divaBasketHandl3 = _this$divaBasketHandl3.actBasket) !== null && _this$divaBasketHandl3 !== void 0 && _this$divaBasketHandl3.SetPlannerInfos);
|
|
48873
48878
|
}
|
|
48874
48879
|
}, {
|
|
48875
48880
|
key: "doShow3DDimensionLines",
|
|
@@ -49211,8 +49216,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49211
49216
|
}, {
|
|
49212
49217
|
key: "clearCache",
|
|
49213
49218
|
value: function clearCache() {
|
|
49214
|
-
var _this$
|
|
49215
|
-
(_this$
|
|
49219
|
+
var _this$api2;
|
|
49220
|
+
(_this$api2 = this.api) === null || _this$api2 === void 0 || _this$api2.clearCache();
|
|
49216
49221
|
this.divaCatalogs = {};
|
|
49217
49222
|
}
|
|
49218
49223
|
}, {
|