@crystaldesign/web-planner-logic 26.5.0-beta.8 → 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-d378bbb7.js → DivaBoxPlanner-a83ddf2d.js} +100 -50
- package/build/cjs/{DivaStandardPlanner-4bab9fb6.js → DivaStandardPlanner-6839d35f.js} +2 -2
- package/build/cjs/{DoorPlanner-d492a9d9.js → DoorPlanner-d9d820b2.js} +1 -1
- package/build/cjs/{Host3DSignalR-e8e59f7a.js → Host3DSignalR-7a424c6f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-9b3939c8.js → LiviqueWWSHandler-1b4c240f.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-7eb044db.js → PfisterWWSHandler-bf4b2af0.js} +1 -1
- package/build/cjs/{PlannerHandler2D-89255bdd.js → PlannerHandler2D-4ef7a85f.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-bbe6859a.js → SeriousBasketHandler-e4e0835e.js} +1 -1
- package/build/cjs/{ShelfPlanner-2a0fb19d.js → ShelfPlanner-c4449795.js} +1 -1
- package/build/cjs/{StandardWWSHandler-3391c7ed.js → StandardWWSHandler-7d3feb60.js} +1 -1
- package/build/cjs/{index-a8cd3c1d.js → index-9145fe80.js} +274 -262
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-21211eeb.js → DivaBoxPlanner-34141af8.js} +100 -50
- package/build/esm/{DivaStandardPlanner-95dd670c.js → DivaStandardPlanner-9e6ffa11.js} +2 -2
- package/build/esm/{DoorPlanner-56b674bf.js → DoorPlanner-ad6344a7.js} +1 -1
- package/build/esm/{Host3DSignalR-0c56c943.js → Host3DSignalR-baf9963c.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-0f7a4bcb.js → LiviqueWWSHandler-56c4d1d2.js} +1 -1
- package/build/esm/{PfisterWWSHandler-7a25803c.js → PfisterWWSHandler-d0109020.js} +1 -1
- package/build/esm/{PlannerHandler2D-2df72989.js → PlannerHandler2D-ebe62b9b.js} +1 -1
- package/build/esm/{SeriousBasketHandler-6c14c04e.js → SeriousBasketHandler-29af6f6d.js} +1 -1
- package/build/esm/{ShelfPlanner-9c7ffe88.js → ShelfPlanner-7f73ac20.js} +1 -1
- package/build/esm/{StandardWWSHandler-3a3026aa.js → StandardWWSHandler-553bf27b.js} +1 -1
- package/build/esm/{index-79dd365f.js → index-66df82ca.js} +274 -262
- 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 +9 -8
- 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);
|
|
@@ -598,10 +598,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
598
598
|
value: function getPrintOptions() {
|
|
599
599
|
var _this$divaWebConfigDa11;
|
|
600
600
|
var reportConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.reportConfig;
|
|
601
|
-
var
|
|
601
|
+
var has3D = arguments.length > 1 ? arguments[1] : undefined;
|
|
602
|
+
var arReady = arguments.length > 2 ? arguments[2] : undefined;
|
|
602
603
|
return {
|
|
603
604
|
Gdpr: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithGDPR),
|
|
604
|
-
PlanningSketch: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithPlanningSketch),
|
|
605
|
+
PlanningSketch: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithPlanningSketch) && has3D,
|
|
605
606
|
Remark: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithRemark),
|
|
606
607
|
Prices: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithPrices),
|
|
607
608
|
AllPrices: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithAllPrices),
|
|
@@ -1103,57 +1104,63 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1103
1104
|
}
|
|
1104
1105
|
|
|
1105
1106
|
/******************IDM Service CALLs */
|
|
1107
|
+
}, {
|
|
1108
|
+
key: "isSeller",
|
|
1109
|
+
get: function get() {
|
|
1110
|
+
return !this.useEnricherService && !this.useIDMService;
|
|
1111
|
+
}
|
|
1106
1112
|
}, {
|
|
1107
1113
|
key: "idmPrefix",
|
|
1108
1114
|
get: function get() {
|
|
1109
1115
|
if (this.useEnricherService && !this.packageId) throw new Error('packageId as parameter not missing');
|
|
1110
|
-
return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live';
|
|
1116
|
+
return this.useEnricherService ? '/wysiwyg/' + this.packageId : this.useIDMService ? '' : '/live/' + this.organization._id;
|
|
1111
1117
|
}
|
|
1112
1118
|
}, {
|
|
1113
1119
|
key: "getIDMCatalog",
|
|
1114
1120
|
value: function getIDMCatalog(catalogId) {
|
|
1121
|
+
if (this.isSeller) return this.idmPrefix + '/packages' + (!this.useEnricherService ? '/' + catalogId + '/catalog' : '');
|
|
1115
1122
|
return this.idmPrefix + '/catalogs' + (!this.useEnricherService ? '/' + catalogId : '');
|
|
1116
1123
|
}
|
|
1117
1124
|
}, {
|
|
1118
1125
|
key: "getIDMSerieByNo",
|
|
1119
|
-
value: function getIDMSerieByNo(
|
|
1120
|
-
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);
|
|
1121
1128
|
}
|
|
1122
1129
|
}, {
|
|
1123
1130
|
key: "getIDMItems",
|
|
1124
|
-
value: function getIDMItems(
|
|
1125
|
-
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) {
|
|
1126
1133
|
return encodeURIComponent('typeNo==' + t);
|
|
1127
|
-
}).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');
|
|
1128
1135
|
}
|
|
1129
1136
|
}, {
|
|
1130
1137
|
key: "getIDMFeatures",
|
|
1131
|
-
value: function getIDMFeatures(
|
|
1132
|
-
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 : '');
|
|
1133
1140
|
}
|
|
1134
1141
|
}, {
|
|
1135
1142
|
key: "getIDMDecisions",
|
|
1136
|
-
value: function getIDMDecisions(
|
|
1137
|
-
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 : '');
|
|
1138
1145
|
}
|
|
1139
1146
|
}, {
|
|
1140
1147
|
key: "getIDMDetailInfos",
|
|
1141
|
-
value: function getIDMDetailInfos(
|
|
1142
|
-
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) {
|
|
1143
1150
|
return encodeURIComponent('featureClassNo==' + d);
|
|
1144
1151
|
}).join(' || ');
|
|
1145
1152
|
}
|
|
1146
1153
|
}, {
|
|
1147
1154
|
key: "getIDMFeatureClass",
|
|
1148
|
-
value: function getIDMFeatureClass(
|
|
1149
|
-
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) {
|
|
1150
1157
|
return encodeURIComponent('featureClassNo==' + f);
|
|
1151
1158
|
}).join(' || ');
|
|
1152
1159
|
}
|
|
1153
1160
|
}, {
|
|
1154
1161
|
key: "getIDMPriceFeatureGroups",
|
|
1155
|
-
value: function getIDMPriceFeatureGroups(
|
|
1156
|
-
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) {
|
|
1157
1164
|
return encodeURIComponent('priceFeatureGroupNo==' + p);
|
|
1158
1165
|
}).join(' || ');
|
|
1159
1166
|
}
|
|
@@ -1241,11 +1248,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1241
1248
|
headers = this.getAiServiceAuthHeaders(leadKey);
|
|
1242
1249
|
_context9.next = 4;
|
|
1243
1250
|
return this.fetchData(url, {
|
|
1244
|
-
data: _objectSpread$
|
|
1251
|
+
data: _objectSpread$m(_objectSpread$m({}, data), {}, {
|
|
1245
1252
|
organizationId: this.OrganizationId
|
|
1246
1253
|
}),
|
|
1247
1254
|
config: {
|
|
1248
|
-
headers: _objectSpread$
|
|
1255
|
+
headers: _objectSpread$m(_objectSpread$m({}, headers), {}, {
|
|
1249
1256
|
'X-Session-Id': DivaUtils__default["default"].SessionId,
|
|
1250
1257
|
'X-Configurator-Id': (_DivaUtils$Configurat = DivaUtils__default["default"].ConfigurationId) !== null && _DivaUtils$Configurat !== void 0 ? _DivaUtils$Configurat : ''
|
|
1251
1258
|
})
|
|
@@ -16391,7 +16398,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16391
16398
|
return undefined;
|
|
16392
16399
|
});
|
|
16393
16400
|
this.opv = opv;
|
|
16394
|
-
opv.
|
|
16401
|
+
if (opv.imagePaletteColor) {
|
|
16402
|
+
this.opv.colorGroups = [opv.imagePaletteColor];
|
|
16403
|
+
} else {
|
|
16404
|
+
opv.colorGroups = this.mapRALColorToGroup();
|
|
16405
|
+
}
|
|
16395
16406
|
var metaDatas = setOptionValueProperties(catalogData, this.opv.propertyObj, (_this$opv$property = this.opv.property) !== null && _this$opv$property !== void 0 ? _this$opv$property : []);
|
|
16396
16407
|
this.opv.metaData = metaDatas;
|
|
16397
16408
|
}
|
|
@@ -16492,27 +16503,32 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16492
16503
|
}, {
|
|
16493
16504
|
key: "isFreeText",
|
|
16494
16505
|
get: function get() {
|
|
16495
|
-
|
|
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;
|
|
16496
16508
|
}
|
|
16497
16509
|
}, {
|
|
16498
16510
|
key: "measureUnit",
|
|
16499
16511
|
get: function get() {
|
|
16500
|
-
|
|
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;
|
|
16501
16514
|
}
|
|
16502
16515
|
}, {
|
|
16503
16516
|
key: "measureMinimum",
|
|
16504
16517
|
get: function get() {
|
|
16505
|
-
|
|
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;
|
|
16506
16520
|
}
|
|
16507
16521
|
}, {
|
|
16508
16522
|
key: "measureMaximum",
|
|
16509
16523
|
get: function get() {
|
|
16510
|
-
|
|
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;
|
|
16511
16526
|
}
|
|
16512
16527
|
}, {
|
|
16513
16528
|
key: "measureStep",
|
|
16514
16529
|
get: function get() {
|
|
16515
|
-
|
|
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;
|
|
16516
16532
|
}
|
|
16517
16533
|
}, {
|
|
16518
16534
|
key: "hideSubarticleDescription",
|
|
@@ -16527,7 +16543,8 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16527
16543
|
}, {
|
|
16528
16544
|
key: "priceUnit",
|
|
16529
16545
|
get: function get() {
|
|
16530
|
-
|
|
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;
|
|
16531
16548
|
}
|
|
16532
16549
|
}, {
|
|
16533
16550
|
key: "value",
|
|
@@ -16759,6 +16776,24 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
|
|
|
16759
16776
|
case 'IsVariantAttribute':
|
|
16760
16777
|
opv.isVariantAttribute = prop.Value == '1';
|
|
16761
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;
|
|
16762
16797
|
case 'ION_COMMENT_TEXT':
|
|
16763
16798
|
case 'EshopCategoryMapping':
|
|
16764
16799
|
case 'TopFilterAttribute':
|
|
@@ -17896,6 +17931,7 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17896
17931
|
isOPVG: jsonOPV.IsOPVG && jsonOPV.IsOPVG == '1' ? true : false,
|
|
17897
17932
|
isFreeText: jsonOPV.FreeText && jsonOPV.FreeText == 'True' ? true : false,
|
|
17898
17933
|
rals: jsonOPV.RALs,
|
|
17934
|
+
imagePaletteColor: jsonOPV.ImagePaletteColor,
|
|
17899
17935
|
isCustomAttribute: jsonOPV.IsCustomAttribute,
|
|
17900
17936
|
measureMinimum: jsonOPV.MeasureMinimum,
|
|
17901
17937
|
measureMaximum: jsonOPV.MeasureMaximum,
|
|
@@ -19442,11 +19478,9 @@ function initDecisions(catalog, catalogArticleData, decisionRefs) {
|
|
|
19442
19478
|
catalogArticle.decisions.splice(i, 1);
|
|
19443
19479
|
i--;
|
|
19444
19480
|
}
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
});
|
|
19449
|
-
}
|
|
19481
|
+
myDecision.Options.sort(function (a, b) {
|
|
19482
|
+
return myOptOrder.indexOf(a) < myOptOrder.indexOf(b) ? -1 : 1;
|
|
19483
|
+
});
|
|
19450
19484
|
}
|
|
19451
19485
|
}
|
|
19452
19486
|
if (myDecision.Type == '3') {
|
|
@@ -19589,20 +19623,20 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
|
|
|
19589
19623
|
return opv;
|
|
19590
19624
|
}
|
|
19591
19625
|
|
|
19592
|
-
function ownKeys$
|
|
19593
|
-
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; }
|
|
19594
19628
|
var LOG$k = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
19595
19629
|
function loadMoreFromIDMArticles(_x, _x2) {
|
|
19596
19630
|
return _loadMoreFromIDMArticles.apply(this, arguments);
|
|
19597
19631
|
}
|
|
19598
19632
|
function _loadMoreFromIDMArticles() {
|
|
19599
19633
|
_loadMoreFromIDMArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(catalogArticleDatas, set) {
|
|
19600
|
-
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;
|
|
19601
19635
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context5) {
|
|
19602
19636
|
while (1) switch (_context5.prev = _context5.next) {
|
|
19603
19637
|
case 0:
|
|
19604
19638
|
_context5.next = 2;
|
|
19605
|
-
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) {
|
|
19606
19640
|
return a.articleCodex;
|
|
19607
19641
|
})), undefined, undefined, 'enricher');
|
|
19608
19642
|
case 2:
|
|
@@ -19652,7 +19686,7 @@ function _loadMoreFromIDMArticles() {
|
|
|
19652
19686
|
}).map(function (a) {
|
|
19653
19687
|
return a.featureClassRefNo;
|
|
19654
19688
|
})));
|
|
19655
|
-
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];
|
|
19656
19690
|
_context5.next = 16;
|
|
19657
19691
|
return Promise.all(promises);
|
|
19658
19692
|
case 16:
|
|
@@ -19667,11 +19701,17 @@ function _loadMoreFromIDMArticles() {
|
|
|
19667
19701
|
}
|
|
19668
19702
|
}
|
|
19669
19703
|
if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
|
|
19670
|
-
_context5.next =
|
|
19704
|
+
_context5.next = 26;
|
|
19671
19705
|
break;
|
|
19672
19706
|
}
|
|
19673
|
-
|
|
19674
|
-
|
|
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:
|
|
19675
19715
|
if (priceFeatureGroups) {
|
|
19676
19716
|
for (_i5 = 0; _i5 < priceFeatureGroups.length; _i5++) {
|
|
19677
19717
|
set.CatalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i5], set.CatalogData.idmOptionGroups));
|
|
@@ -19688,12 +19728,12 @@ function _loadMoreFromIDMArticles() {
|
|
|
19688
19728
|
});
|
|
19689
19729
|
toLoadFeatures = getFeatures(set, featureClasses);
|
|
19690
19730
|
if (!toLoadFeatures.length) {
|
|
19691
|
-
_context5.next =
|
|
19731
|
+
_context5.next = 41;
|
|
19692
19732
|
break;
|
|
19693
19733
|
}
|
|
19694
|
-
_context5.next =
|
|
19695
|
-
return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.
|
|
19696
|
-
case
|
|
19734
|
+
_context5.next = 33;
|
|
19735
|
+
return set.api.getDataCache(set.api.getIDMFeatures(set.CatalogData.accountGuid, toLoadFeatures), undefined, undefined, 'enricher');
|
|
19736
|
+
case 33:
|
|
19697
19737
|
features = _context5.sent;
|
|
19698
19738
|
_loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4() {
|
|
19699
19739
|
var feature, insertIndex, k, _loop5, j;
|
|
@@ -19775,17 +19815,17 @@ function _loadMoreFromIDMArticles() {
|
|
|
19775
19815
|
}, _loop4);
|
|
19776
19816
|
});
|
|
19777
19817
|
_i7 = 0;
|
|
19778
|
-
case
|
|
19818
|
+
case 36:
|
|
19779
19819
|
if (!(_i7 < features.length)) {
|
|
19780
|
-
_context5.next =
|
|
19820
|
+
_context5.next = 41;
|
|
19781
19821
|
break;
|
|
19782
19822
|
}
|
|
19783
|
-
return _context5.delegateYield(_loop4(), "t1",
|
|
19784
|
-
case
|
|
19823
|
+
return _context5.delegateYield(_loop4(), "t1", 38);
|
|
19824
|
+
case 38:
|
|
19785
19825
|
_i7++;
|
|
19786
|
-
_context5.next =
|
|
19826
|
+
_context5.next = 36;
|
|
19787
19827
|
break;
|
|
19788
|
-
case
|
|
19828
|
+
case 41:
|
|
19789
19829
|
_loop6 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop6() {
|
|
19790
19830
|
var catalogArticleData, featureClass, features, j;
|
|
19791
19831
|
return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context4) {
|
|
@@ -19812,21 +19852,21 @@ function _loadMoreFromIDMArticles() {
|
|
|
19812
19852
|
}, _loop6);
|
|
19813
19853
|
});
|
|
19814
19854
|
_i8 = 0;
|
|
19815
|
-
case
|
|
19855
|
+
case 43:
|
|
19816
19856
|
if (!(_i8 < catalogArticleDatas.length)) {
|
|
19817
|
-
_context5.next =
|
|
19857
|
+
_context5.next = 48;
|
|
19818
19858
|
break;
|
|
19819
19859
|
}
|
|
19820
|
-
return _context5.delegateYield(_loop6(), "t2",
|
|
19821
|
-
case
|
|
19860
|
+
return _context5.delegateYield(_loop6(), "t2", 45);
|
|
19861
|
+
case 45:
|
|
19822
19862
|
_i8++;
|
|
19823
|
-
_context5.next =
|
|
19863
|
+
_context5.next = 43;
|
|
19824
19864
|
break;
|
|
19825
|
-
case
|
|
19865
|
+
case 48:
|
|
19826
19866
|
catalogArticleDatas.map(function (c) {
|
|
19827
19867
|
return c.areOptionsLoaded = true;
|
|
19828
19868
|
});
|
|
19829
|
-
case
|
|
19869
|
+
case 49:
|
|
19830
19870
|
case "end":
|
|
19831
19871
|
return _context5.stop();
|
|
19832
19872
|
}
|
|
@@ -19914,11 +19954,11 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
|
|
|
19914
19954
|
var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
|
|
19915
19955
|
var _decision$optionCombi;
|
|
19916
19956
|
var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
|
|
19917
|
-
return _objectSpread$
|
|
19957
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19918
19958
|
projectOptionsSetRefs: parseOptionSetRef(c.projectOptionsSetRefs, idmOptionGroups)
|
|
19919
19959
|
});
|
|
19920
19960
|
});
|
|
19921
|
-
return _objectSpread$
|
|
19961
|
+
return _objectSpread$l(_objectSpread$l({}, decision), {}, {
|
|
19922
19962
|
optionCombinations: optionCombinations === null || optionCombinations === void 0 ? void 0 : optionCombinations.sort(function (a, b) {
|
|
19923
19963
|
return a.sequence - b.sequence;
|
|
19924
19964
|
})
|
|
@@ -19927,16 +19967,16 @@ var initializeDecision = function initializeDecision(decision, idmOptionGroups)
|
|
|
19927
19967
|
var initializePriceFeatureGroups = function initializePriceFeatureGroups(priceFeatureGroup, idmOptionGroups) {
|
|
19928
19968
|
var _priceFeatureGroup$pr, _priceFeatureGroup$pr2;
|
|
19929
19969
|
var finishes = (_priceFeatureGroup$pr = priceFeatureGroup.projectFinishes) === null || _priceFeatureGroup$pr === void 0 ? void 0 : _priceFeatureGroup$pr.map(function (c) {
|
|
19930
|
-
return _objectSpread$
|
|
19970
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19931
19971
|
projectOptionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
|
|
19932
19972
|
});
|
|
19933
19973
|
});
|
|
19934
19974
|
var percentageSurcharges = (_priceFeatureGroup$pr2 = priceFeatureGroup.projectPercentageSurcharges) === null || _priceFeatureGroup$pr2 === void 0 ? void 0 : _priceFeatureGroup$pr2.map(function (c) {
|
|
19935
|
-
return _objectSpread$
|
|
19975
|
+
return _objectSpread$l(_objectSpread$l({}, c), {}, {
|
|
19936
19976
|
optionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
|
|
19937
19977
|
});
|
|
19938
19978
|
});
|
|
19939
|
-
return _objectSpread$
|
|
19979
|
+
return _objectSpread$l(_objectSpread$l({}, priceFeatureGroup), {}, {
|
|
19940
19980
|
projectFinishes: finishes === null || finishes === void 0 ? void 0 : finishes.sort(function (a, b) {
|
|
19941
19981
|
return a.sequence - b.sequence;
|
|
19942
19982
|
}),
|
|
@@ -20206,19 +20246,18 @@ function rgbToHex(r, g, b) {
|
|
|
20206
20246
|
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
|
20207
20247
|
}
|
|
20208
20248
|
|
|
20209
|
-
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; }
|
|
20210
|
-
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; }
|
|
20211
20249
|
var LOG$j = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20212
20250
|
function initIDMCatalogData(serie, orderSet, api) {
|
|
20213
|
-
var _serie$
|
|
20251
|
+
var _serie$decisions, _serie$decisions2;
|
|
20214
20252
|
var catalog = serie.catalogData;
|
|
20215
20253
|
var catalogData = {
|
|
20216
|
-
accountGuid:
|
|
20254
|
+
accountGuid: orderSet.AccountGUID,
|
|
20217
20255
|
serieId: serie._id,
|
|
20218
20256
|
accountName: '',
|
|
20219
20257
|
accountLogo: '',
|
|
20220
20258
|
collectionGuid: serie.catalogId,
|
|
20221
|
-
catalogGuid:
|
|
20259
|
+
catalogGuid: '',
|
|
20260
|
+
//serie.enricherPackageId,
|
|
20222
20261
|
catalogCodex: serie.serieNo.toString(),
|
|
20223
20262
|
catalogName: DivaUtils__default["default"].getLocals(serie.seriesName, api.getLanguageLowercase()),
|
|
20224
20263
|
// name des Kataloges
|
|
@@ -20275,18 +20314,19 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
20275
20314
|
}
|
|
20276
20315
|
}
|
|
20277
20316
|
function getCatalogArticle(article, catalogData) {
|
|
20278
|
-
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;
|
|
20279
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];
|
|
20280
20319
|
var lang = catalogData.api.getLanguageLowercase();
|
|
20281
20320
|
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
20282
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);
|
|
20283
20323
|
return {
|
|
20284
20324
|
areOptionsLoaded: false,
|
|
20285
20325
|
arePricesLoaded: false,
|
|
20286
20326
|
articleCodex: article.typeNo,
|
|
20287
20327
|
articleOptions: {},
|
|
20288
20328
|
partListExclusive: article.partListExclusive,
|
|
20289
|
-
guid: article.typeKey,
|
|
20329
|
+
guid: (_article$typeKey = article.typeKey) === null || _article$typeKey === void 0 ? void 0 : _article$typeKey.toString(),
|
|
20290
20330
|
articleEAN: article.eanNumber,
|
|
20291
20331
|
typeNr: article.eanNumber,
|
|
20292
20332
|
retailArticleNr: article.salesNumber,
|
|
@@ -20326,34 +20366,12 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20326
20366
|
heightTo: article.heightBasicShapeTo !== undefined ? Math.floor(((_article$heightBasicS3 = article.heightBasicShapeTo) !== null && _article$heightBasicS3 !== void 0 ? _article$heightBasicS3 : 0) / 10) : undefined,
|
|
20327
20367
|
volume: article.volume,
|
|
20328
20368
|
weight: (_article$weightNetto = article.weightNetto) !== null && _article$weightNetto !== void 0 ? _article$weightNetto : article.weightBrutto,
|
|
20329
|
-
image:
|
|
20330
|
-
|
|
20331
|
-
})) === null || _article$detailInfos === void 0 ? void 0 : _article$detailInfos.url),
|
|
20332
|
-
images: (_article$detailInfos2 = article.detailInfos) === null || _article$detailInfos2 === void 0 || (_article$detailInfos2 = _article$detailInfos2.filter(function (d) {
|
|
20333
|
-
return d.functionType == 'CAT_ART';
|
|
20334
|
-
})) === null || _article$detailInfos2 === void 0 ? void 0 : _article$detailInfos2.map(function (d) {
|
|
20335
|
-
var _getLowResUrl, _article$detailInfoRe, _article$detailInfoRe2;
|
|
20336
|
-
return {
|
|
20337
|
-
url: (_getLowResUrl = getLowResUrl(d.url)) !== null && _getLowResUrl !== void 0 ? _getLowResUrl : '',
|
|
20338
|
-
detailInfoNo: d.detailInfoNo,
|
|
20339
|
-
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) {
|
|
20340
|
-
return n !== null;
|
|
20341
|
-
})) !== null && _article$detailInfoRe !== void 0 ? _article$detailInfoRe : []
|
|
20342
|
-
};
|
|
20343
|
-
}),
|
|
20369
|
+
image: images === null || images === void 0 || (_images$ = images[0]) === null || _images$ === void 0 ? void 0 : _images$.url,
|
|
20370
|
+
images: images,
|
|
20344
20371
|
idmPrices: article.prices,
|
|
20345
20372
|
idmPartlist: article.partlist,
|
|
20346
20373
|
articleRelations: [],
|
|
20347
|
-
svgs: (_article$
|
|
20348
|
-
return d.classification == 'SVG';
|
|
20349
|
-
}).map(function (d) {
|
|
20350
|
-
var _article$detailInfoRe3, _article$detailInfoRe4;
|
|
20351
|
-
return _objectSpread$l(_objectSpread$l({}, d), {}, {
|
|
20352
|
-
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) {
|
|
20353
|
-
return n !== null;
|
|
20354
|
-
})) !== null && _article$detailInfoRe3 !== void 0 ? _article$detailInfoRe3 : []
|
|
20355
|
-
});
|
|
20356
|
-
}),
|
|
20374
|
+
svgs: (_article$svgs = article.svgs) === null || _article$svgs === void 0 ? void 0 : _article$svgs.map(mapIDMMediaItem),
|
|
20357
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
|
|
20358
20376
|
};
|
|
20359
20377
|
}
|
|
@@ -20370,6 +20388,14 @@ function getCatalogArticle(article, catalogData) {
|
|
|
20370
20388
|
function getLowResUrl(url) {
|
|
20371
20389
|
return url === null || url === void 0 ? void 0 : url.replace('.jpg', '_low.jpg').replace('.jpeg', '_low.jpeg').replace('.png', '_low.png');
|
|
20372
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
|
+
}
|
|
20373
20399
|
function convertProperties() {
|
|
20374
20400
|
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
20375
20401
|
var lang = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -20403,8 +20429,8 @@ function mapProp() {
|
|
|
20403
20429
|
});
|
|
20404
20430
|
}
|
|
20405
20431
|
function getCatalogPlanner(article, catalogArticle, catalogData) {
|
|
20406
|
-
var _article$
|
|
20407
|
-
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) {
|
|
20408
20434
|
return d.classification == 'SVG';
|
|
20409
20435
|
});
|
|
20410
20436
|
|
|
@@ -23217,6 +23243,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23217
23243
|
_classCallCheck__default["default"](this, DivaEngine);
|
|
23218
23244
|
_defineProperty__default["default"](this, "article", void 0);
|
|
23219
23245
|
_defineProperty__default["default"](this, "decisionDebugStack", []);
|
|
23246
|
+
_defineProperty__default["default"](this, "catalogDecisionsByNumber", void 0);
|
|
23220
23247
|
this.article = article;
|
|
23221
23248
|
}
|
|
23222
23249
|
return _createClass__default["default"](DivaEngine, [{
|
|
@@ -23700,13 +23727,20 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23700
23727
|
key: "evalAllDecisions",
|
|
23701
23728
|
value: function evalAllDecisions() {
|
|
23702
23729
|
var myDecisions = this.article.catalogArticle.articleReferencedDecisions;
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23730
|
+
var writeIdx = 0;
|
|
23731
|
+
for (var i = 0; i < myDecisions.length; i++) {
|
|
23732
|
+
if (!myDecisions[i].addedViaDisableEnableRef) {
|
|
23733
|
+
myDecisions[writeIdx++] = myDecisions[i];
|
|
23706
23734
|
}
|
|
23707
23735
|
}
|
|
23736
|
+
myDecisions.length = writeIdx;
|
|
23708
23737
|
//add the partlist spesific decisions to the normal decisions
|
|
23709
|
-
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
|
+
}
|
|
23710
23744
|
for (var _i = 0; _i < myDecisions.length; _i++) {
|
|
23711
23745
|
var _this$article$catalog;
|
|
23712
23746
|
if ((_this$article$catalog = this.article.catalogArticle.decisionsUsedForPartlist) !== null && _this$article$catalog !== void 0 && _this$article$catalog.includes(Number(myDecisions[_i].Number))) continue;
|
|
@@ -23727,6 +23761,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23727
23761
|
} finally {
|
|
23728
23762
|
_iterator7.f();
|
|
23729
23763
|
}
|
|
23764
|
+
this.catalogDecisionsByNumber = new Map(this.article.catalogArticle.articleDecisions.map(function (d) {
|
|
23765
|
+
return [d.Number, d];
|
|
23766
|
+
}));
|
|
23730
23767
|
this.decisionDebugStack = [];
|
|
23731
23768
|
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
23732
23769
|
for (var m = 0; m < myDecisions.length; m++) {
|
|
@@ -23939,10 +23976,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23939
23976
|
case 'SET_FEATURE_DEFAULT_NULL':
|
|
23940
23977
|
break;
|
|
23941
23978
|
case 'DISABLE_DECISION':
|
|
23942
|
-
this.disableDecision(myDecision,
|
|
23979
|
+
this.disableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23943
23980
|
break;
|
|
23944
23981
|
case 'ENABLE_DECISION':
|
|
23945
|
-
this.enableDecision(myDecision,
|
|
23982
|
+
this.enableDecision(myDecision, myDA.DecisionNr, myDecisions);
|
|
23946
23983
|
break;
|
|
23947
23984
|
default:
|
|
23948
23985
|
LOG$g.error(new DivaUtils.DivaError('Action type not supported in DecisionOptionCombination', {
|
|
@@ -24002,114 +24039,63 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24002
24039
|
}
|
|
24003
24040
|
}, {
|
|
24004
24041
|
key: "disableDecision",
|
|
24005
|
-
value: function disableDecision(myDecision,
|
|
24006
|
-
|
|
24007
|
-
if (myDecision.activeCombination == -1) return;
|
|
24008
|
-
var SearchDecNumber = [];
|
|
24009
|
-
if (myDoc.DA) for (var m = 0; m < myDoc.DA.length; m++) {
|
|
24010
|
-
var decisionAction = myDoc.DA[m];
|
|
24011
|
-
if (decisionAction.Type == 'DISABLE_DECISION') {
|
|
24012
|
-
SearchDecNumber.push(Number(decisionAction.DecisionNr));
|
|
24013
|
-
}
|
|
24014
|
-
}
|
|
24015
|
-
SearchDecNumber.map(function (d) {
|
|
24016
|
-
return myDecisions.find(function (de) {
|
|
24017
|
-
return de.Number == d.toString();
|
|
24018
|
-
});
|
|
24019
|
-
}).map(function (d, index) {
|
|
24020
|
-
var _d$disableHistory;
|
|
24021
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24022
|
-
if (!d) {
|
|
24023
|
-
var decision = _this2.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24024
|
-
return d.Number == decisionNumber.toString();
|
|
24025
|
-
});
|
|
24026
|
-
if (!decision) {
|
|
24027
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in disable decision ' + myDecision.Number + ' not found.');
|
|
24028
|
-
return;
|
|
24029
|
-
}
|
|
24030
|
-
var insertIndex = 0;
|
|
24031
|
-
var prios = myDecisions.map(function (d) {
|
|
24032
|
-
return d.Prio;
|
|
24033
|
-
});
|
|
24034
|
-
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.');
|
|
24035
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24036
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24037
|
-
insertIndex = i;
|
|
24038
|
-
break;
|
|
24039
|
-
}
|
|
24040
|
-
}
|
|
24041
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24042
|
-
enabled: false,
|
|
24043
|
-
disableHistory: ['referenced and disabled By ' + myDecision.Number],
|
|
24044
|
-
addedViaDisableEnableRef: true
|
|
24045
|
-
}));
|
|
24046
|
-
return;
|
|
24047
|
-
}
|
|
24048
|
-
d.enabled = false;
|
|
24049
|
-
(_d$disableHistory = d.disableHistory) === null || _d$disableHistory === void 0 || _d$disableHistory.push('disabled By ' + myDecision.Number);
|
|
24050
|
-
});
|
|
24042
|
+
value: function disableDecision(myDecision, targetDecisionNr, myDecisions) {
|
|
24043
|
+
this.toggleDecisionEnabled(myDecision, targetDecisionNr, myDecisions, false);
|
|
24051
24044
|
}
|
|
24052
24045
|
}, {
|
|
24053
24046
|
key: "enableDecision",
|
|
24054
|
-
value: function enableDecision(myDecision,
|
|
24055
|
-
|
|
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;
|
|
24056
24054
|
if (myDecision.activeCombination == -1) return;
|
|
24057
|
-
var
|
|
24058
|
-
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
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;
|
|
24065
24064
|
}
|
|
24066
|
-
|
|
24067
|
-
return
|
|
24068
|
-
return de.Number == d.toString();
|
|
24069
|
-
});
|
|
24070
|
-
}).map(function (d, index) {
|
|
24071
|
-
var _d$disableHistory2;
|
|
24072
|
-
var decisionNumber = SearchDecNumber[index];
|
|
24073
|
-
if (!d) {
|
|
24074
|
-
var decision = _this3.article.catalogArticle.articleDecisions.find(function (d) {
|
|
24075
|
-
return d.Number == decisionNumber.toString();
|
|
24076
|
-
});
|
|
24077
|
-
if (!decision) {
|
|
24078
|
-
LOG$g.warn('Decision ' + decisionNumber + ' that is referenced in enable decision ' + myDecision.Number + ' not found.');
|
|
24079
|
-
return;
|
|
24080
|
-
}
|
|
24081
|
-
var insertIndex = 0;
|
|
24082
|
-
var prios = myDecisions.map(function (d) {
|
|
24083
|
-
return d.Prio;
|
|
24084
|
-
});
|
|
24085
|
-
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.');
|
|
24086
|
-
for (var i = 0; i < prios.length; i++) {
|
|
24087
|
-
if (Number(prios[i]) >= Number(decision.Prio)) {
|
|
24088
|
-
insertIndex = i;
|
|
24089
|
-
break;
|
|
24090
|
-
}
|
|
24091
|
-
}
|
|
24092
|
-
myDecisions.splice(insertIndex, 0, _objectSpread$h(_objectSpread$h({}, decision), {}, {
|
|
24093
|
-
enabled: true,
|
|
24094
|
-
disableHistory: ['referenced and enabled By ' + myDecision.Number],
|
|
24095
|
-
addedViaDisableEnableRef: true
|
|
24096
|
-
}));
|
|
24097
|
-
return;
|
|
24098
|
-
}
|
|
24099
|
-
d.enabled = true;
|
|
24100
|
-
(_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;
|
|
24101
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
|
+
}));
|
|
24102
24088
|
}
|
|
24103
24089
|
}, {
|
|
24104
24090
|
key: "evalType1Decision",
|
|
24105
24091
|
value: function evalType1Decision(myDecision) {
|
|
24106
|
-
var
|
|
24092
|
+
var _this2 = this;
|
|
24107
24093
|
var validOPVs = {};
|
|
24108
24094
|
var doAlsoCheckOPTs = [];
|
|
24109
24095
|
if (myDecision.Options && myDecision.DOC) {
|
|
24110
24096
|
var _loop2 = function _loop2() {
|
|
24111
24097
|
var OPT = myDecision.Options[p];
|
|
24112
|
-
var ops =
|
|
24098
|
+
var ops = _this2.article.getArticleOptionStateFlat(OPT);
|
|
24113
24099
|
if (!ops) return 1; // break
|
|
24114
24100
|
if (!validOPVs[OPT]) validOPVs[OPT] = new Map();
|
|
24115
24101
|
var possibleOPVs = new Map(ops.visibleOptionValues);
|
|
@@ -24120,7 +24106,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24120
24106
|
//wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
|
|
24121
24107
|
|
|
24122
24108
|
var myDoc = myDecision.DOC[j];
|
|
24123
|
-
var doUseDoc =
|
|
24109
|
+
var doUseDoc = _this2.checkIfDocIsValid(myDoc, doAlsoCheckOPTs);
|
|
24124
24110
|
if (doUseDoc) {
|
|
24125
24111
|
var _myDoc$Row;
|
|
24126
24112
|
myDecision.activeCombination = j;
|
|
@@ -24198,10 +24184,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24198
24184
|
ops.updateVisibleOptionValues(new Map(schnittmenge));
|
|
24199
24185
|
var valCodex = ops.valCodex;
|
|
24200
24186
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24201
|
-
if (
|
|
24202
|
-
|
|
24187
|
+
if (_this2.article.CatalogData.useDiomexConfigLogic) {
|
|
24188
|
+
_this2.clearOP(OPT, true);
|
|
24203
24189
|
} else {
|
|
24204
|
-
|
|
24190
|
+
_this2.updateArtOPV(_this2.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24205
24191
|
}
|
|
24206
24192
|
}
|
|
24207
24193
|
doAlsoCheckOPTs.push(OPT);
|
|
@@ -24238,13 +24224,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24238
24224
|
}, {
|
|
24239
24225
|
key: "evalType0Decision",
|
|
24240
24226
|
value: function evalType0Decision(myDecision) {
|
|
24241
|
-
var
|
|
24227
|
+
var _this3 = this;
|
|
24242
24228
|
var invalidOPVs = {},
|
|
24243
24229
|
doAlsoCheckOPTs = [];
|
|
24244
24230
|
if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) {
|
|
24245
24231
|
var _loop3 = function _loop3() {
|
|
24246
24232
|
var OPT = myDecision.Options[p];
|
|
24247
|
-
var ops =
|
|
24233
|
+
var ops = _this3.article.getArticleOptionStateFlat(OPT);
|
|
24248
24234
|
if (!ops) return 1; // break
|
|
24249
24235
|
if (!invalidOPVs[OPT]) invalidOPVs[OPT] = new Map();
|
|
24250
24236
|
var possibleOPVs = ops.visibleOptionValues;
|
|
@@ -24261,7 +24247,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24261
24247
|
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
24262
24248
|
var _myDoc$Row3;
|
|
24263
24249
|
var checkOptX = doAlsoCheckOPTs[f];
|
|
24264
|
-
var _ops3 =
|
|
24250
|
+
var _ops3 = _this3.article.getArticleOptionState(checkOptX);
|
|
24265
24251
|
if (_ops3 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
|
|
24266
24252
|
doUseDoc = false;
|
|
24267
24253
|
break;
|
|
@@ -24289,10 +24275,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24289
24275
|
ops.updateVisibleOptionValues(schnittmenge);
|
|
24290
24276
|
var valCodex = ops.valCodex;
|
|
24291
24277
|
if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
|
|
24292
|
-
if (
|
|
24293
|
-
|
|
24278
|
+
if (_this3.article.CatalogData.useDiomexConfigLogic) {
|
|
24279
|
+
_this3.clearOP(OPT, true);
|
|
24294
24280
|
} else {
|
|
24295
|
-
|
|
24281
|
+
_this3.updateArtOPV(_this3.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
|
|
24296
24282
|
}
|
|
24297
24283
|
}
|
|
24298
24284
|
} else if (p < myDecision.Options.length - 1) {
|
|
@@ -24620,7 +24606,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24620
24606
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24621
24607
|
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber, partlistGroupPrefix, loadReason) {
|
|
24622
24608
|
var _myPartListPos$Option,
|
|
24623
|
-
|
|
24609
|
+
_this4 = this;
|
|
24624
24610
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
24625
24611
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
24626
24612
|
var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
|
|
@@ -24631,9 +24617,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24631
24617
|
var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
|
|
24632
24618
|
var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
|
|
24633
24619
|
var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
|
|
24634
|
-
if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' &&
|
|
24635
|
-
myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule,
|
|
24636
|
-
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());
|
|
24637
24623
|
}
|
|
24638
24624
|
var initDecisions = decisions.filter(function (decision) {
|
|
24639
24625
|
return decision.RelationType !== 'PosCount';
|
|
@@ -24643,7 +24629,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24643
24629
|
});
|
|
24644
24630
|
});
|
|
24645
24631
|
var quanitity = 1;
|
|
24646
|
-
if (
|
|
24632
|
+
if (_this4.article.CatalogData.useDecisionPosCountValue) {
|
|
24647
24633
|
var _decision$DOC;
|
|
24648
24634
|
// get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
|
|
24649
24635
|
var decision = decisionNumber ? allDecisions.find(function (d) {
|
|
@@ -24658,12 +24644,12 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24658
24644
|
return a.SetPosCountValue !== undefined;
|
|
24659
24645
|
})) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
|
|
24660
24646
|
quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
|
|
24661
|
-
} else if (
|
|
24647
|
+
} else if (_this4.article.CatalogData.usePosCountValue) {
|
|
24662
24648
|
quanitity = myPartListPos.PosCountValue;
|
|
24663
24649
|
}
|
|
24664
|
-
quanitity = quanitity *
|
|
24665
|
-
var previousPartlistArticle =
|
|
24666
|
-
if (
|
|
24650
|
+
quanitity = quanitity * _this4.article.quantity;
|
|
24651
|
+
var previousPartlistArticle = _this4.article.getPreviousPartlistArticle(articleCodex);
|
|
24652
|
+
if (_this4.article.set.logDecisions) {
|
|
24667
24653
|
var base = {
|
|
24668
24654
|
articleCodex: articleCodex,
|
|
24669
24655
|
catalogCodex: catalogCodex,
|
|
@@ -24671,7 +24657,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24671
24657
|
sequenceNo: myPartListPos.SequenceNo
|
|
24672
24658
|
};
|
|
24673
24659
|
if (quanitity < 1) {
|
|
24674
|
-
|
|
24660
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24675
24661
|
loaded: false,
|
|
24676
24662
|
reason: 'Quantity < 1',
|
|
24677
24663
|
quantity: quanitity,
|
|
@@ -24679,7 +24665,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24679
24665
|
});
|
|
24680
24666
|
return 1; // continue
|
|
24681
24667
|
}
|
|
24682
|
-
|
|
24668
|
+
_this4.pushPartlistDebugEntry(base, {
|
|
24683
24669
|
loaded: true,
|
|
24684
24670
|
reason: loadReason !== null && loadReason !== void 0 ? loadReason : 'Loaded',
|
|
24685
24671
|
decisionNo: decisionNumber,
|
|
@@ -24702,13 +24688,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24702
24688
|
if (quanitity >= 1) {
|
|
24703
24689
|
var _myDecisionVal$Rule;
|
|
24704
24690
|
partlistArticlesToLoad.push({
|
|
24705
|
-
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex :
|
|
24691
|
+
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this4.article.catalogCodex,
|
|
24706
24692
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
24707
24693
|
ArticleCodex: articleCodex,
|
|
24708
24694
|
RetailArticleNr: retailArticleNr,
|
|
24709
24695
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
24710
24696
|
Quantity: quanitity,
|
|
24711
|
-
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,
|
|
24712
24698
|
partlistDecisionNo: decisionNumber,
|
|
24713
24699
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
24714
24700
|
initDecisions: initDecisionsFiltered,
|
|
@@ -24717,7 +24703,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24717
24703
|
RuleDesc_locales: myRuleDesc_locales,
|
|
24718
24704
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
24719
24705
|
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
24720
|
-
VariantValues:
|
|
24706
|
+
VariantValues: _this4.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
24721
24707
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
24722
24708
|
optionImgForPrint: optionImgForPrint,
|
|
24723
24709
|
optionsForPrint: optionsForPrint,
|
|
@@ -24766,7 +24752,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24766
24752
|
}, {
|
|
24767
24753
|
key: "calcConfigPrice",
|
|
24768
24754
|
value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
|
|
24769
|
-
var
|
|
24755
|
+
var _this5 = this,
|
|
24770
24756
|
_this$article$catalog5;
|
|
24771
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.
|
|
24772
24758
|
//wenn ja, hier neues shape übergeben
|
|
@@ -24900,7 +24886,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24900
24886
|
if (!targetPPGPrefixes) continue;
|
|
24901
24887
|
var _loop7 = function _loop7() {
|
|
24902
24888
|
var targetPrefix = targetPPGPrefixes[_i8];
|
|
24903
|
-
var priceRef =
|
|
24889
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24904
24890
|
var _item$PPG;
|
|
24905
24891
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
24906
24892
|
});
|
|
@@ -24925,11 +24911,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
24925
24911
|
var _loop6 = function _loop6() {
|
|
24926
24912
|
var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
|
|
24927
24913
|
var myArtOpv;
|
|
24928
|
-
var priceRef =
|
|
24914
|
+
var priceRef = _this5.article.priceRefs.find(function (item) {
|
|
24929
24915
|
return item.PPG && item.PPG.split('_')[0] == targetPrefix;
|
|
24930
24916
|
});
|
|
24931
24917
|
if (!priceRef) {
|
|
24932
|
-
var _iterator13 = _createForOfIteratorHelper$a(
|
|
24918
|
+
var _iterator13 = _createForOfIteratorHelper$a(_this5.article.articleOptionStates.values()),
|
|
24933
24919
|
_step13;
|
|
24934
24920
|
try {
|
|
24935
24921
|
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
@@ -25173,7 +25159,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25173
25159
|
value: function updateConfigDependentMedia() {
|
|
25174
25160
|
var _this$article$catalog6,
|
|
25175
25161
|
_this$article$catalog7,
|
|
25176
|
-
|
|
25162
|
+
_this6 = this;
|
|
25177
25163
|
var catalogData = this.article.CatalogData;
|
|
25178
25164
|
//articlebild berechnung
|
|
25179
25165
|
|
|
@@ -25300,7 +25286,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
25300
25286
|
var _plannerCatArt$topSvg;
|
|
25301
25287
|
var custom = {
|
|
25302
25288
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
25303
|
-
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula,
|
|
25289
|
+
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this6.article.catalogCodex, catalogData.multiselectOptions);
|
|
25304
25290
|
}),
|
|
25305
25291
|
catalogName: catalogData.catalogName,
|
|
25306
25292
|
catalogCodex: this.article.catalogCodex,
|
|
@@ -25646,7 +25632,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
25646
25632
|
});
|
|
25647
25633
|
var ref = optionSetRef === null || optionSetRef === void 0 ? void 0 : optionSetRef.optionList;
|
|
25648
25634
|
if (optionSetRef && !optionSetRef.optionList) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
|
|
25649
|
-
var doUseDoc =
|
|
25635
|
+
var doUseDoc = true;
|
|
25650
25636
|
if (doAlsoCheckFeature.length > 0) {
|
|
25651
25637
|
var _loop4 = function _loop4() {
|
|
25652
25638
|
var _combination$projectO2;
|
|
@@ -26815,6 +26801,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26815
26801
|
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
26816
26802
|
partListParentArticle: initParams.parentArticle,
|
|
26817
26803
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
26804
|
+
dontAddToFinalOrderLine: initParams.dontAddToFinalOrderLine,
|
|
26818
26805
|
partlistArticleStandalone: initParams.partlistArticleStandalone,
|
|
26819
26806
|
partlistGroupPrefix: initParams.partlistGroupPrefix,
|
|
26820
26807
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
@@ -28645,6 +28632,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
28645
28632
|
}
|
|
28646
28633
|
return ret;
|
|
28647
28634
|
}
|
|
28635
|
+
}, {
|
|
28636
|
+
key: "dontAddToFinalOrderLine",
|
|
28637
|
+
get: function get() {
|
|
28638
|
+
return this.article.dontAddToFinalOrderLine;
|
|
28639
|
+
}
|
|
28648
28640
|
}, {
|
|
28649
28641
|
key: "areAllOptionsDefined",
|
|
28650
28642
|
get: function get() {
|
|
@@ -29486,7 +29478,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
29486
29478
|
break;
|
|
29487
29479
|
}
|
|
29488
29480
|
_context.next = 4;
|
|
29489
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
29481
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-c4449795.js'); });
|
|
29490
29482
|
case 4:
|
|
29491
29483
|
_yield$import = _context.sent;
|
|
29492
29484
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -31219,6 +31211,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31219
31211
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
31220
31212
|
initDecisions: doLoadItem.initDecisions,
|
|
31221
31213
|
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
31214
|
+
dontAddToFinalOrderLine: doLoadItem.PosInvisibility === 1,
|
|
31222
31215
|
partlistArticleStandalone: doLoadItem.ConfigurationMode,
|
|
31223
31216
|
partlistGroupPrefix: doLoadItem.partlistGroupPrefix,
|
|
31224
31217
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
@@ -31611,6 +31604,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
31611
31604
|
Width: article.width,
|
|
31612
31605
|
Depth: article.depth,
|
|
31613
31606
|
Height: article.height,
|
|
31607
|
+
dontAddToFinalOrderLine: article.dontAddToFinalOrderLine,
|
|
31614
31608
|
CatalogCodex: catalogData.catalogCodex,
|
|
31615
31609
|
CatalogName: catalogData.catalogName,
|
|
31616
31610
|
VKPrice: article.getVkPrice,
|
|
@@ -33117,10 +33111,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
33117
33111
|
value: function getNewConfigStepKeyByBasketId(curConfigStepKey, basketId) {
|
|
33118
33112
|
var steps = this.getAllByKey(curConfigStepKey);
|
|
33119
33113
|
if (steps) {
|
|
33120
|
-
var
|
|
33121
|
-
return (
|
|
33114
|
+
var _Array$from$find;
|
|
33115
|
+
return (_Array$from$find = Array.from(steps.optionStep.configSteps.values()).find(function (step) {
|
|
33122
33116
|
return step.targetArticles.includes(basketId);
|
|
33123
|
-
})) === null ||
|
|
33117
|
+
})) === null || _Array$from$find === void 0 ? void 0 : _Array$from$find.key;
|
|
33124
33118
|
}
|
|
33125
33119
|
return undefined;
|
|
33126
33120
|
}
|
|
@@ -34867,6 +34861,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34867
34861
|
if (Object.values(articles).find(function (article) {
|
|
34868
34862
|
return article.shelfPlanner;
|
|
34869
34863
|
})) return;
|
|
34864
|
+
if (Object.values(articles).find(function (article) {
|
|
34865
|
+
return article.set.CatalogData.useBoxPlanner;
|
|
34866
|
+
})) return;
|
|
34870
34867
|
var _iterator3 = _createForOfIteratorHelper$4(configTree.tabGroups),
|
|
34871
34868
|
_step3;
|
|
34872
34869
|
try {
|
|
@@ -34879,6 +34876,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34879
34876
|
var hasSelectionMode2 = [];
|
|
34880
34877
|
var hasSelectionMode3 = [];
|
|
34881
34878
|
var basketIds = [];
|
|
34879
|
+
var breakTabgroup = false;
|
|
34882
34880
|
var _iterator4 = _createForOfIteratorHelper$4(tabGroup.options),
|
|
34883
34881
|
_step4;
|
|
34884
34882
|
try {
|
|
@@ -34886,6 +34884,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34886
34884
|
var _step4$value = _slicedToArray__default["default"](_step4.value, 2),
|
|
34887
34885
|
_optionCodex2 = _step4$value[0],
|
|
34888
34886
|
_option2 = _step4$value[1];
|
|
34887
|
+
var configSteps = Array.from(_option2.configSteps.values());
|
|
34888
|
+
if (configSteps.find(function (configStep) {
|
|
34889
|
+
return configStep.notDisplayedInMainConfigTree;
|
|
34890
|
+
})) breakTabgroup = true;
|
|
34889
34891
|
switch (_option2.selectionmode) {
|
|
34890
34892
|
case 1:
|
|
34891
34893
|
hasSelectionMode1.push(_optionCodex2);
|
|
@@ -34928,6 +34930,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34928
34930
|
} finally {
|
|
34929
34931
|
_iterator4.f();
|
|
34930
34932
|
}
|
|
34933
|
+
if (breakTabgroup) continue;
|
|
34931
34934
|
if (hasSelectionMode2.length > 0 && hasSelectionMode3.length > 0 && hasSelectionMode1.length == 0) {
|
|
34932
34935
|
//make the selectionmode 2 options -> selectionmode 3
|
|
34933
34936
|
var _iterator5 = _createForOfIteratorHelper$4(hasSelectionMode2),
|
|
@@ -37414,7 +37417,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
37414
37417
|
break;
|
|
37415
37418
|
}
|
|
37416
37419
|
_context5.next = 3;
|
|
37417
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
37420
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-d9d820b2.js'); });
|
|
37418
37421
|
case 3:
|
|
37419
37422
|
_yield$import = _context5.sent;
|
|
37420
37423
|
DoorPlanner = _yield$import["default"];
|
|
@@ -41446,6 +41449,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41446
41449
|
key: "initProductId",
|
|
41447
41450
|
value: function () {
|
|
41448
41451
|
var _initProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(api, productId) {
|
|
41452
|
+
var _this$plannerConfig$c4;
|
|
41449
41453
|
var result, successful;
|
|
41450
41454
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
41451
41455
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -41457,7 +41461,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41457
41461
|
this.assignNewDivaNr = true;
|
|
41458
41462
|
_context2.next = 6;
|
|
41459
41463
|
return this.initBasket(api, result.divaNr, {
|
|
41460
|
-
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
|
+
})
|
|
41461
41467
|
}, false, productId);
|
|
41462
41468
|
case 6:
|
|
41463
41469
|
successful = _context2.sent;
|
|
@@ -41675,7 +41681,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41675
41681
|
_context5.next = 36;
|
|
41676
41682
|
break;
|
|
41677
41683
|
case 44:
|
|
41678
|
-
this.baskets[newDivaNr] = new basketModel.BasketData(basket);
|
|
41684
|
+
this.baskets[newDivaNr] = new basketModel.BasketData(_objectSpread$9({}, basket));
|
|
41679
41685
|
this.baskets[newDivaNr].clearRenderData();
|
|
41680
41686
|
if (!keepOldDivaNr) this.divaNr = newDivaNr;
|
|
41681
41687
|
if (this.assignNewDivaNr) {
|
|
@@ -41818,7 +41824,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41818
41824
|
key: "loadBasketByCustomProductId",
|
|
41819
41825
|
value: function () {
|
|
41820
41826
|
var _loadBasketByCustomProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(api, key, productId, fields) {
|
|
41821
|
-
var variantData;
|
|
41827
|
+
var variantData, _this$plannerConfig$c5;
|
|
41822
41828
|
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
41823
41829
|
while (1) switch (_context8.prev = _context8.next) {
|
|
41824
41830
|
case 0:
|
|
@@ -41848,7 +41854,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41848
41854
|
if (variantData.productGroup) {
|
|
41849
41855
|
this.analyticsRelevantData.productGroup = variantData.productGroup;
|
|
41850
41856
|
}
|
|
41851
|
-
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));
|
|
41852
41862
|
case 12:
|
|
41853
41863
|
_context8.next = 18;
|
|
41854
41864
|
break;
|
|
@@ -41975,7 +41985,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41975
41985
|
key: "saveToBasket",
|
|
41976
41986
|
value: function () {
|
|
41977
41987
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(api, actBasket, returnTo, arReady) {
|
|
41978
|
-
var _this$plannerConfig$s10, _this$plannerConfig$
|
|
41988
|
+
var _this$plannerConfig$s10, _this$plannerConfig$c6, _this$_basketHandler, _api$getJwt, _URLSearchParams$get;
|
|
41979
41989
|
var response;
|
|
41980
41990
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
41981
41991
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -41984,18 +41994,18 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
41984
41994
|
actBasket.ReturnTo = returnTo;
|
|
41985
41995
|
actBasket.PDFDocumentURL = '';
|
|
41986
41996
|
actBasket.ReportConfigIdentifier = api.getReportConfigIdentifier();
|
|
41987
|
-
actBasket.PrintOptions = api.getPrintOptions(this.reportConfig, !!arReady);
|
|
41997
|
+
actBasket.PrintOptions = api.getPrintOptions(this.reportConfig, !!actBasket.OrderSets[0].SetImage, !!arReady);
|
|
41988
41998
|
actBasket.ClientLanguage = api.getLanguage();
|
|
41989
41999
|
_context11.next = 8;
|
|
41990
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);
|
|
41991
42001
|
case 8:
|
|
41992
42002
|
actBasket.UserLanguage = api.getLanguage();
|
|
41993
|
-
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;
|
|
41994
42004
|
_context11.next = 12;
|
|
41995
42005
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
41996
42006
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
41997
42007
|
basket: actBasket,
|
|
41998
|
-
awaitPDF: true,
|
|
42008
|
+
awaitPDF: returnTo == 'SAVE_BASKET_ASYNC' ? false : true,
|
|
41999
42009
|
utmCampaign: (_URLSearchParams$get = new URLSearchParams(window.location.search).get('utm_campaign')) !== null && _URLSearchParams$get !== void 0 ? _URLSearchParams$get : undefined,
|
|
42000
42010
|
saveToApi2: false,
|
|
42001
42011
|
apiKey: api.getApiKey()
|
|
@@ -42178,7 +42188,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42178
42188
|
break;
|
|
42179
42189
|
case 3:
|
|
42180
42190
|
_context12.next = 5;
|
|
42181
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
42191
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-bf4b2af0.js'); });
|
|
42182
42192
|
case 5:
|
|
42183
42193
|
_yield$import = _context12.sent;
|
|
42184
42194
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -42186,7 +42196,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42186
42196
|
return _context12.abrupt("break", 27);
|
|
42187
42197
|
case 9:
|
|
42188
42198
|
_context12.next = 11;
|
|
42189
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
42199
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-1b4c240f.js'); });
|
|
42190
42200
|
case 11:
|
|
42191
42201
|
_yield$import2 = _context12.sent;
|
|
42192
42202
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -42194,7 +42204,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42194
42204
|
return _context12.abrupt("break", 27);
|
|
42195
42205
|
case 15:
|
|
42196
42206
|
_context12.next = 17;
|
|
42197
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
42207
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-e4e0835e.js'); });
|
|
42198
42208
|
case 17:
|
|
42199
42209
|
_yield$import3 = _context12.sent;
|
|
42200
42210
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -42202,7 +42212,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
42202
42212
|
return _context12.abrupt("break", 27);
|
|
42203
42213
|
case 21:
|
|
42204
42214
|
_context12.next = 23;
|
|
42205
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
42215
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-7d3feb60.js'); });
|
|
42206
42216
|
case 23:
|
|
42207
42217
|
_yield$import4 = _context12.sent;
|
|
42208
42218
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -43626,7 +43636,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
43626
43636
|
while (1) switch (_context3.prev = _context3.next) {
|
|
43627
43637
|
case 0:
|
|
43628
43638
|
_context3.next = 2;
|
|
43629
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
43639
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-7a424c6f.js'); });
|
|
43630
43640
|
case 2:
|
|
43631
43641
|
_yield$import = _context3.sent;
|
|
43632
43642
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -45379,7 +45389,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45379
45389
|
break;
|
|
45380
45390
|
case 8:
|
|
45381
45391
|
_context4.next = 10;
|
|
45382
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
45392
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-6839d35f.js'); });
|
|
45383
45393
|
case 10:
|
|
45384
45394
|
_yield$import = _context4.sent;
|
|
45385
45395
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -45390,7 +45400,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
45390
45400
|
return _context4.abrupt("break", 21);
|
|
45391
45401
|
case 15:
|
|
45392
45402
|
_context4.next = 17;
|
|
45393
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
45403
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-a83ddf2d.js'); });
|
|
45394
45404
|
case 17:
|
|
45395
45405
|
_yield$import2 = _context4.sent;
|
|
45396
45406
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -47240,7 +47250,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47240
47250
|
this.api.setState(this.state);
|
|
47241
47251
|
this.ReturnTo = this.plannerConfig.returnTo;
|
|
47242
47252
|
LOG$1.startTransaction({
|
|
47243
|
-
event: 'onInitializeConfigurator',
|
|
47253
|
+
event: cache !== undefined ? 'onReinitializeConfigurator' : 'onInitializeConfigurator',
|
|
47244
47254
|
message: 'Loading Basket',
|
|
47245
47255
|
eventId: 'LOADING_BASKET',
|
|
47246
47256
|
warningTime: 2000,
|
|
@@ -47255,11 +47265,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47255
47265
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
47256
47266
|
case 12:
|
|
47257
47267
|
loadSuccessful = _context14.sent;
|
|
47258
|
-
if (this.plannerConfig.configuratorSessionId
|
|
47259
|
-
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
47260
|
-
} else if (this.plannerConfig.configuratorSessionId) {
|
|
47268
|
+
if (this.plannerConfig.configuratorSessionId) {
|
|
47261
47269
|
//force new configurator session id - Landingpage case
|
|
47262
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);
|
|
47263
47275
|
}
|
|
47264
47276
|
if (!loadSuccessful) {
|
|
47265
47277
|
_context14.next = 31;
|
|
@@ -47309,7 +47321,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47309
47321
|
value: function () {
|
|
47310
47322
|
var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
47311
47323
|
var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
|
|
47312
|
-
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;
|
|
47313
47325
|
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
|
|
47314
47326
|
while (1) switch (_context15.prev = _context15.next) {
|
|
47315
47327
|
case 0:
|
|
@@ -47348,8 +47360,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
47348
47360
|
case 21:
|
|
47349
47361
|
result = _context15.sent;
|
|
47350
47362
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
47351
|
-
result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL;
|
|
47352
|
-
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;
|
|
47353
47365
|
_context15.next = 28;
|
|
47354
47366
|
break;
|
|
47355
47367
|
case 27:
|
|
@@ -48502,7 +48514,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48502
48514
|
break;
|
|
48503
48515
|
}
|
|
48504
48516
|
_context28.t3 = returnTo;
|
|
48505
|
-
_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;
|
|
48506
48518
|
break;
|
|
48507
48519
|
case 27:
|
|
48508
48520
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
@@ -48861,8 +48873,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
48861
48873
|
}, {
|
|
48862
48874
|
key: "doAllowSetPlanner",
|
|
48863
48875
|
value: function doAllowSetPlanner() {
|
|
48864
|
-
var _this$returnTo, _this$divaBasketHandl3;
|
|
48865
|
-
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);
|
|
48866
48878
|
}
|
|
48867
48879
|
}, {
|
|
48868
48880
|
key: "doShow3DDimensionLines",
|
|
@@ -49204,8 +49216,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
49204
49216
|
}, {
|
|
49205
49217
|
key: "clearCache",
|
|
49206
49218
|
value: function clearCache() {
|
|
49207
|
-
var _this$
|
|
49208
|
-
(_this$
|
|
49219
|
+
var _this$api2;
|
|
49220
|
+
(_this$api2 = this.api) === null || _this$api2 === void 0 || _this$api2.clearCache();
|
|
49209
49221
|
this.divaCatalogs = {};
|
|
49210
49222
|
}
|
|
49211
49223
|
}, {
|