@crystaldesign/web-planner-logic 25.5.0-beta.2 → 25.5.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/{DivaBoxPlanner-10481078.js → DivaBoxPlanner-34742921.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-d13cca7a.js → DivaStandardPlanner-32079554.js} +66 -27
- package/build/cjs/{DoorPlanner-4ebcc53d.js → DoorPlanner-17cec7e7.js} +1 -1
- package/build/cjs/{Host3DSignalR-1c1b8c1a.js → Host3DSignalR-77d09d15.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-11ecd966.js → LiviqueWWSHandler-e1f87ae3.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-85b20c41.js → PfisterWWSHandler-6f5672b9.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b0c0eae8.js → PlannerHandler2D-b1354a71.js} +9 -3
- package/build/cjs/{SeriousBasketHandler-5ebc3e01.js → SeriousBasketHandler-d3864f70.js} +2 -2
- package/build/cjs/{ShelfPlanner-c89976b9.js → ShelfPlanner-2db3c4a8.js} +2 -1
- package/build/cjs/{StandardWWSHandler-63132754.js → StandardWWSHandler-db6b5fca.js} +1 -1
- package/build/cjs/{index-e9136eb2.js → index-4977414c.js} +554 -342
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-960dd248.js → DivaBoxPlanner-a981fb02.js} +2 -2
- package/build/esm/{DivaStandardPlanner-8be567e2.js → DivaStandardPlanner-280e1526.js} +66 -27
- package/build/esm/{DoorPlanner-9116e0cc.js → DoorPlanner-be8b2d1d.js} +1 -1
- package/build/esm/{Host3DSignalR-2ff79baa.js → Host3DSignalR-f7d149a0.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-152cbf3e.js → LiviqueWWSHandler-0cae8969.js} +1 -1
- package/build/esm/{PfisterWWSHandler-1041d9f9.js → PfisterWWSHandler-a08c74f9.js} +1 -1
- package/build/esm/{PlannerHandler2D-4656f6ab.js → PlannerHandler2D-3c00ee4d.js} +9 -3
- package/build/esm/{SeriousBasketHandler-447744dd.js → SeriousBasketHandler-55877df4.js} +2 -2
- package/build/esm/{ShelfPlanner-f2022d16.js → ShelfPlanner-750e93d3.js} +2 -1
- package/build/esm/{StandardWWSHandler-aac0d68a.js → StandardWWSHandler-34d7a2c7.js} +1 -1
- package/build/esm/{index-7ca7b229.js → index-3a8d263d.js} +554 -342
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts +4 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +0 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +3 -1
- 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 +1 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +16 -1
- 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 +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/ArticleEngine.d.ts +3 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +3 -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/Article/Engine/IDMArticleEngine.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +3 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.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/CatalogPlannerArticleData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +4 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.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/Planner/PlannerElementData.d.ts +3 -0
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1032,7 +1032,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1032
1032
|
value: function getIDMItems(catalogId, serieId, typeNos) {
|
|
1033
1033
|
return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items' + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
|
|
1034
1034
|
return encodeURIComponent('typeNo==' + t);
|
|
1035
|
-
}).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;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber');
|
|
1035
|
+
}).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');
|
|
1036
1036
|
}
|
|
1037
1037
|
}, {
|
|
1038
1038
|
key: "getIDMItem",
|
|
@@ -1636,6 +1636,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
|
|
|
1636
1636
|
get: function get() {
|
|
1637
1637
|
return this.catPlanArt.articleCodex;
|
|
1638
1638
|
}
|
|
1639
|
+
}, {
|
|
1640
|
+
key: "longDescription",
|
|
1641
|
+
get: function get() {
|
|
1642
|
+
return this.catPlanArt.catalogArticle.longDescription;
|
|
1643
|
+
}
|
|
1639
1644
|
}, {
|
|
1640
1645
|
key: "svgs",
|
|
1641
1646
|
get: function get() {
|
|
@@ -16341,7 +16346,10 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16341
16346
|
}, {
|
|
16342
16347
|
key: "pdfUrl",
|
|
16343
16348
|
get: function get() {
|
|
16344
|
-
|
|
16349
|
+
var _this$opv$textbaustei, _this$opv$textbaustei2;
|
|
16350
|
+
return (_this$opv$textbaustei = (_this$opv$textbaustei2 = this.opv.textbausteine) === null || _this$opv$textbaustei2 === void 0 || (_this$opv$textbaustei2 = _this$opv$textbaustei2.find(function (item) {
|
|
16351
|
+
return item.Memo.endsWith('.pdf');
|
|
16352
|
+
})) === null || _this$opv$textbaustei2 === void 0 ? void 0 : _this$opv$textbaustei2.Memo) !== null && _this$opv$textbaustei !== void 0 ? _this$opv$textbaustei : this.opv.pdfUrl;
|
|
16345
16353
|
}
|
|
16346
16354
|
}, {
|
|
16347
16355
|
key: "rals",
|
|
@@ -17446,7 +17454,8 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17446
17454
|
showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
|
|
17447
17455
|
priceUnit: jsonOPV.PriceUnit,
|
|
17448
17456
|
value: jsonOPV.Value,
|
|
17449
|
-
property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"]((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : []))
|
|
17457
|
+
property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"]((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : [])),
|
|
17458
|
+
textbausteine: jsonOPV.Textbausteine
|
|
17450
17459
|
};
|
|
17451
17460
|
if (jsonOPV.MeasureUnit) {
|
|
17452
17461
|
switch (jsonOPV.MeasureUnit) {
|
|
@@ -17604,6 +17613,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
17604
17613
|
articleCodex: catPlanArticle.codex,
|
|
17605
17614
|
catalogCodex: catalogData.catalogCodex,
|
|
17606
17615
|
title: title,
|
|
17616
|
+
longDescription: catPlanArticle.longDescription,
|
|
17607
17617
|
width: catPlanArticle.articleSizeX,
|
|
17608
17618
|
height: catPlanArticle.articleSizeZ,
|
|
17609
17619
|
depth: catPlanArticle.articleSizeY,
|
|
@@ -17664,6 +17674,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
17664
17674
|
articleCodex: catPlanArticle.codex,
|
|
17665
17675
|
catalogCodex: catalogData.catalogCodex,
|
|
17666
17676
|
title: title,
|
|
17677
|
+
longDescription: catPlanArticle.longDescription,
|
|
17667
17678
|
width: catPlanArticle.articleSizeX,
|
|
17668
17679
|
height: catPlanArticle.articleSizeZ,
|
|
17669
17680
|
depth: catPlanArticle.articleSizeY,
|
|
@@ -18567,6 +18578,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
|
|
|
18567
18578
|
price: !catalog.dontShowBasePrice ? (_myAcc$BasePrice = myAcc.BasePrice) !== null && _myAcc$BasePrice !== void 0 ? _myAcc$BasePrice : catalogArticleData.articlePrice : 0,
|
|
18568
18579
|
articleCodex: myAcc.Codex,
|
|
18569
18580
|
catalogCodex: myAcc.CatalogCodex,
|
|
18581
|
+
longDescription: myAcc.longDescription,
|
|
18570
18582
|
positionGroupNr: myAcc.PositionGroupNr,
|
|
18571
18583
|
typeNr: _catalogArticle.typeNr,
|
|
18572
18584
|
image: _catalogArticle.image ? catalog.getCatImageURL(_catalogArticle.image, '') : undefined,
|
|
@@ -19520,7 +19532,7 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
19520
19532
|
}
|
|
19521
19533
|
}
|
|
19522
19534
|
function getCatalogArticle(article, catalogData) {
|
|
19523
|
-
var _catalogData$catalogM, _articleMask$name, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2;
|
|
19535
|
+
var _catalogData$catalogM, _ref, _articleMask$name, _article$fullText, _article$fullText2, _article$shortText, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _articleMask$groupnam, _articleMask$groupnam2;
|
|
19524
19536
|
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];
|
|
19525
19537
|
var lang = catalogData.api.getLanguageLowercase();
|
|
19526
19538
|
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
@@ -19543,11 +19555,11 @@ function getCatalogArticle(article, catalogData) {
|
|
|
19543
19555
|
hasArticleRelations: false,
|
|
19544
19556
|
hasPartlistArticle: !!article.partListRef,
|
|
19545
19557
|
hasType1Dependencies: false,
|
|
19546
|
-
name: DivaUtils__default["default"].getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, lang),
|
|
19547
|
-
longDescription: DivaUtils__default["default"].getLocals(article.fullText, lang),
|
|
19548
|
-
longDescription_locales: article.fullText,
|
|
19558
|
+
name: DivaUtils__default["default"].getLocals((_ref = (_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText) !== null && _ref !== void 0 ? _ref : article.fullText, lang),
|
|
19559
|
+
longDescription: DivaUtils__default["default"].getLocals((_article$fullText = article.fullText) !== null && _article$fullText !== void 0 ? _article$fullText : article.shortText, lang),
|
|
19560
|
+
longDescription_locales: (_article$fullText2 = article.fullText) !== null && _article$fullText2 !== void 0 ? _article$fullText2 : article.shortText,
|
|
19549
19561
|
isHidden: !!(articleMask !== null && articleMask !== void 0 && articleMask.hidden),
|
|
19550
|
-
origName: DivaUtils__default["default"].getLocals(article.shortText, lang),
|
|
19562
|
+
origName: DivaUtils__default["default"].getLocals((_article$shortText = article.shortText) !== null && _article$shortText !== void 0 ? _article$shortText : article.fullText, lang),
|
|
19551
19563
|
properties: [].concat(_toConsumableArray__default["default"](convertProperties(article.properties, lang)), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
|
|
19552
19564
|
optionProperties: optionProperties,
|
|
19553
19565
|
featureProperties: featureProperties,
|
|
@@ -19579,12 +19591,12 @@ function getCatalogArticle(article, catalogData) {
|
|
|
19579
19591
|
url: d.url,
|
|
19580
19592
|
detailInfoNo: d.detailInfoNo
|
|
19581
19593
|
};
|
|
19582
|
-
})
|
|
19594
|
+
}),
|
|
19595
|
+
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
|
|
19583
19596
|
};
|
|
19584
19597
|
}
|
|
19585
19598
|
|
|
19586
19599
|
/*
|
|
19587
|
-
groupName: articleMask?.groupname?.[catalogData.api.getLanguage()] ?? jsonArticle.GroupName,
|
|
19588
19600
|
mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
|
|
19589
19601
|
price: jsonArticle.VKP1 && isNaN(jsonArticle.VKP1) ? Number(jsonArticle.VKP1.replace(',', '.')) : jsonArticle.VKP1,
|
|
19590
19602
|
priceGroup: jsonArticle.PriceGroup,
|
|
@@ -19663,15 +19675,16 @@ function getCatalogPlanner(article, catalogArticle) {
|
|
|
19663
19675
|
};
|
|
19664
19676
|
}
|
|
19665
19677
|
function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
|
|
19666
|
-
var _catPlanArticle$filte, _catPlanArticle$svgs;
|
|
19678
|
+
var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
|
|
19667
19679
|
plannerPaletteViewInfo.catalogPlannerArticles.push({
|
|
19668
19680
|
articleCodex: catPlanArticle.codex,
|
|
19669
19681
|
avlFilter: catPlanArticle.avlFilter,
|
|
19670
19682
|
avrFilter: catPlanArticle.avrFilter,
|
|
19683
|
+
longDescription: catPlanArticle.longDescription,
|
|
19671
19684
|
catalogCodex: catPlanArticle.catalogCodex,
|
|
19672
19685
|
codex: catPlanArticle.codex,
|
|
19673
19686
|
filterType: (_catPlanArticle$filte = catPlanArticle.filterType) !== null && _catPlanArticle$filte !== void 0 ? _catPlanArticle$filte : 'DockNone',
|
|
19674
|
-
groupName: '',
|
|
19687
|
+
groupName: (_catPlanArticle$group = catPlanArticle.groupName) !== null && _catPlanArticle$group !== void 0 ? _catPlanArticle$group : '',
|
|
19675
19688
|
hasAVC: !!catPlanArticle.topAVC,
|
|
19676
19689
|
hasAVN: !!catPlanArticle.topAVN,
|
|
19677
19690
|
hasAVO: !!catPlanArticle.topAVO,
|
|
@@ -19829,8 +19842,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19829
19842
|
hidePricePreviewOnlyOnOptions: [],
|
|
19830
19843
|
forceConfigSingle: false,
|
|
19831
19844
|
// das einzeln konfigurieren wird in diesem Katalog gezwungen
|
|
19832
|
-
doubleClickOnConfig: false,
|
|
19833
|
-
// Felher bei Ada IDM wird somit ausgebessert
|
|
19834
19845
|
doUseRuleDescForPartListArticles: false,
|
|
19835
19846
|
initOptionTreeTwice: false,
|
|
19836
19847
|
// Felher bei Cotta IDM wird somit ausgebes
|
|
@@ -19890,6 +19901,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19890
19901
|
this.catalogData = initIDMCatalogData(json, orderSet, api);
|
|
19891
19902
|
initIDMArticles(articleJson, this);
|
|
19892
19903
|
}
|
|
19904
|
+
if (this.origProperties) {
|
|
19905
|
+
var _this$catalogMask$cat2, _this$catalogMask2;
|
|
19906
|
+
this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray__default["default"](json.Properties), _toConsumableArray__default["default"]((_this$catalogMask$cat2 = (_this$catalogMask2 = this.catalogMask) === null || _this$catalogMask2 === void 0 || (_this$catalogMask2 = _this$catalogMask2.catalog) === null || _this$catalogMask2 === void 0 ? void 0 : _this$catalogMask2.properties) !== null && _this$catalogMask$cat2 !== void 0 ? _this$catalogMask$cat2 : [])));
|
|
19907
|
+
}
|
|
19893
19908
|
}
|
|
19894
19909
|
return _createClass__default["default"](DivaCatalogData, [{
|
|
19895
19910
|
key: "getCatImageURL",
|
|
@@ -20470,11 +20485,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20470
20485
|
var _this$optionValues2;
|
|
20471
20486
|
return Object.values((_this$optionValues2 = this.optionValues) !== null && _this$optionValues2 !== void 0 ? _this$optionValues2 : {});
|
|
20472
20487
|
}
|
|
20473
|
-
}, {
|
|
20474
|
-
key: "doubleClickOnConfig",
|
|
20475
|
-
get: function get() {
|
|
20476
|
-
return this.catalogProps.doubleClickOnConfig;
|
|
20477
|
-
}
|
|
20478
20488
|
}, {
|
|
20479
20489
|
key: "initOptionTreeTwice",
|
|
20480
20490
|
get: function get() {
|
|
@@ -20814,6 +20824,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20814
20824
|
break;
|
|
20815
20825
|
case 'DEFAULT_DO_SHOW_3DDIMENSIONS':
|
|
20816
20826
|
_this5.catalogProps.defaultDimensionsActive = '1' == item.Value || 'true' == item.Value.toLowerCase();
|
|
20827
|
+
break;
|
|
20817
20828
|
// Planner Topics
|
|
20818
20829
|
case 'IS_IDM3D_CAT':
|
|
20819
20830
|
_this5.catalogProps.isIDM3DCat = item.Value == '1' || item.Value.toLowerCase() == 'true';
|
|
@@ -20987,9 +20998,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20987
20998
|
return 'OPT' + t;
|
|
20988
20999
|
});
|
|
20989
21000
|
break;
|
|
20990
|
-
case 'DOUBLE_CLICK_ON_CONFIG':
|
|
20991
|
-
_this5.catalogProps.doubleClickOnConfig = '1' == item.Value;
|
|
20992
|
-
break;
|
|
20993
21001
|
case 'INIT_OPTIONTREE_TWICE':
|
|
20994
21002
|
_this5.catalogProps.initOptionTreeTwice = '1' == item.Value;
|
|
20995
21003
|
break;
|
|
@@ -21029,17 +21037,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21029
21037
|
case 'ADD_PA_ON_EDO':
|
|
21030
21038
|
_this5.handleEdoArticles(properties, item);
|
|
21031
21039
|
break;
|
|
21032
|
-
default:
|
|
21033
|
-
if (key.startsWith('3D_STATBG_ROOMLIST')) {
|
|
21034
|
-
// item.Value =
|
|
21035
|
-
// "weissraum_LUECK;backgroundimgroom_lueck_modern;backgroundimgroom_lueck_romantic;backgroundimgroom_lueck_loft;backgroundimgroom_lueck_night";
|
|
21036
|
-
_this5.catalogProps.roomList3DStaticBGImage.set(item.Codex, item.Value.split(';'));
|
|
21037
|
-
} else if (key.startsWith('3D_STANDARD_WHITEROOM')) {
|
|
21038
|
-
_this5.catalogProps.diva3dStandardWhiteroom = item.Value;
|
|
21039
|
-
} else if (key.startsWith('DIVA3D_IMAGE')) {
|
|
21040
|
-
_this5.handleDIVA3DMetaTag(item);
|
|
21041
|
-
}
|
|
21042
|
-
break;
|
|
21043
21040
|
}
|
|
21044
21041
|
});
|
|
21045
21042
|
if (!diva3DRenderingIsSet) {
|
|
@@ -21048,6 +21045,25 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21048
21045
|
}
|
|
21049
21046
|
}
|
|
21050
21047
|
}
|
|
21048
|
+
}, {
|
|
21049
|
+
key: "initPropertiesAfterOptionsInit",
|
|
21050
|
+
value: function initPropertiesAfterOptionsInit(catalogCodex, properties) {
|
|
21051
|
+
var _this6 = this;
|
|
21052
|
+
properties.forEach(function (item, index) {
|
|
21053
|
+
//3D Allgemein
|
|
21054
|
+
var key = item.Codex;
|
|
21055
|
+
if (key.startsWith(catalogCodex + '__')) key = key.replace(catalogCodex + '__', '');
|
|
21056
|
+
if (key.startsWith('3D_STATBG_ROOMLIST')) {
|
|
21057
|
+
// item.Value =
|
|
21058
|
+
// "weissraum_LUECK;backgroundimgroom_lueck_modern;backgroundimgroom_lueck_romantic;backgroundimgroom_lueck_loft;backgroundimgroom_lueck_night";
|
|
21059
|
+
_this6.catalogProps.roomList3DStaticBGImage.set(item.Codex, item.Value.split(';'));
|
|
21060
|
+
} else if (key.startsWith('3D_STANDARD_WHITEROOM')) {
|
|
21061
|
+
_this6.catalogProps.diva3dStandardWhiteroom = item.Value;
|
|
21062
|
+
} else if (key.startsWith('DIVA3D_IMAGE')) {
|
|
21063
|
+
_this6.handleDIVA3DMetaTag(item);
|
|
21064
|
+
}
|
|
21065
|
+
});
|
|
21066
|
+
}
|
|
21051
21067
|
}, {
|
|
21052
21068
|
key: "handleDIVA3DMetaTag",
|
|
21053
21069
|
value: function handleDIVA3DMetaTag(item) {
|
|
@@ -21187,10 +21203,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21187
21203
|
}, {
|
|
21188
21204
|
key: "initMask",
|
|
21189
21205
|
value: function initMask(initProps) {
|
|
21190
|
-
var _this$
|
|
21191
|
-
if ((_this$
|
|
21192
|
-
var _this$catalogMask$
|
|
21193
|
-
if ((_this$catalogMask$
|
|
21206
|
+
var _this$catalogMask3;
|
|
21207
|
+
if ((_this$catalogMask3 = this.catalogMask) !== null && _this$catalogMask3 !== void 0 && _this$catalogMask3.catalog) {
|
|
21208
|
+
var _this$catalogMask$cat3;
|
|
21209
|
+
if ((_this$catalogMask$cat3 = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat3 !== void 0 && _this$catalogMask$cat3[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
|
|
21194
21210
|
if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
|
|
21195
21211
|
if (this.catalogMask.catalog.properties && initProps) this.initProperties(this.catalogCodex, [].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](this.catalogMask.catalog.properties)));
|
|
21196
21212
|
}
|
|
@@ -21616,12 +21632,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21616
21632
|
}, {
|
|
21617
21633
|
key: "IsDockingFilterFeature",
|
|
21618
21634
|
get: function get() {
|
|
21619
|
-
return this.option.idmVariantenArt ? [89, 90].includes(this.option.idmVariantenArt) : false;
|
|
21635
|
+
return this.option.idmVariantenArt ? [89, 90, 1089, 1090].includes(this.option.idmVariantenArt) : false;
|
|
21620
21636
|
}
|
|
21621
21637
|
}, {
|
|
21622
21638
|
key: "IsIDMSpecialFeature",
|
|
21623
21639
|
get: function get() {
|
|
21624
|
-
return this.option.idmVariantenArt ? [95, 96, 97, 89, 90].includes(this.option.idmVariantenArt) : false;
|
|
21640
|
+
return this.option.idmVariantenArt ? [95, 96, 97, 89, 90, 1095, 1096, 1097, 1089, 1090].includes(this.option.idmVariantenArt) : false;
|
|
21625
21641
|
}
|
|
21626
21642
|
}, {
|
|
21627
21643
|
key: "visibleOptionValues",
|
|
@@ -22316,8 +22332,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22316
22332
|
}, {
|
|
22317
22333
|
key: "updateIDMSpecificFeature",
|
|
22318
22334
|
value: function updateIDMSpecificFeature(ops) {
|
|
22335
|
+
var _ops$option$idmVarian, _ops$option$idmVarian2, _ops$option$idmVarian3, _ops$option$idmVarian4, _ops$option$idmVarian5;
|
|
22319
22336
|
if (!this.article.parentHasSameOption(ops.optionCodex)) return;
|
|
22320
|
-
if (ops.option.idmVariantenArt
|
|
22337
|
+
if ([90, 1090].includes((_ops$option$idmVarian = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian !== void 0 ? _ops$option$idmVarian : 0)) {
|
|
22321
22338
|
//R (Anschlusstyp R) - AVR
|
|
22322
22339
|
var newAVRFilter = [],
|
|
22323
22340
|
visibleOPVs = ops.visibleOptionValues;
|
|
@@ -22326,7 +22343,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22326
22343
|
}
|
|
22327
22344
|
this.article.newPossibleAVRFilters = newAVRFilter;
|
|
22328
22345
|
}
|
|
22329
|
-
if (ops.option.idmVariantenArt
|
|
22346
|
+
if ([89, 1089].includes((_ops$option$idmVarian2 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian2 !== void 0 ? _ops$option$idmVarian2 : 0)) {
|
|
22330
22347
|
//L (Anschlusstyp L) - AVL
|
|
22331
22348
|
var newAVLFilter = [],
|
|
22332
22349
|
_visibleOPVs = ops.visibleOptionValues;
|
|
@@ -22336,7 +22353,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22336
22353
|
this.article.newPossibleAVLFilters = newAVLFilter;
|
|
22337
22354
|
}
|
|
22338
22355
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22339
|
-
if (ops.option.idmVariantenArt
|
|
22356
|
+
if ([97, 1097].includes((_ops$option$idmVarian3 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian3 !== void 0 ? _ops$option$idmVarian3 : 0)) {
|
|
22340
22357
|
//Planungshöhe
|
|
22341
22358
|
try {
|
|
22342
22359
|
var _ops$freeText;
|
|
@@ -22349,7 +22366,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22349
22366
|
}
|
|
22350
22367
|
}
|
|
22351
22368
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22352
|
-
if (ops.option.idmVariantenArt
|
|
22369
|
+
if ([96, 1096].includes((_ops$option$idmVarian4 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian4 !== void 0 ? _ops$option$idmVarian4 : 0) || ops.option.diameter) {
|
|
22353
22370
|
//Planungstiefe
|
|
22354
22371
|
try {
|
|
22355
22372
|
var _ops$freeText2;
|
|
@@ -22362,7 +22379,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22362
22379
|
}
|
|
22363
22380
|
}
|
|
22364
22381
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22365
|
-
if (ops.option.idmVariantenArt
|
|
22382
|
+
if ([95, 1095].includes((_ops$option$idmVarian5 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian5 !== void 0 ? _ops$option$idmVarian5 : 0) || ops.option.diameter) {
|
|
22366
22383
|
//Planungsbreite - ACHTUNG Fehler wenn mm
|
|
22367
22384
|
|
|
22368
22385
|
try {
|
|
@@ -22492,8 +22509,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22492
22509
|
var _this$article$set$Vie;
|
|
22493
22510
|
//die Klasse ArticleOptionState wird einfach neu initialisiert
|
|
22494
22511
|
var oldOPS = this.article.getArticleOptionState(optionCodex);
|
|
22512
|
+
if (!oldOPS) return;
|
|
22495
22513
|
if (keepEnalbed) {
|
|
22496
22514
|
oldOPS.val = undefined;
|
|
22515
|
+
oldOPS.isDoShow = oldOPS.visibleCount > 1;
|
|
22497
22516
|
return;
|
|
22498
22517
|
}
|
|
22499
22518
|
var option = oldOPS.option;
|
|
@@ -22690,7 +22709,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22690
22709
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
22691
22710
|
var ops = _step3.value;
|
|
22692
22711
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
22693
|
-
if (ops.val === undefined && ops.visibleCount) {
|
|
22712
|
+
if (ops.val === undefined && ops.visibleCount && !this.article.CatalogData.useDiomexConfigLogic) {
|
|
22694
22713
|
this.assignOptionValue(ops.optionCodex, Object.keys(ops.visibleOptionValues)[0]);
|
|
22695
22714
|
}
|
|
22696
22715
|
if (ops.visibleCount && ops.IsIDMSpecialFeature) {
|
|
@@ -23228,6 +23247,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23228
23247
|
value: function evalPartlist(newConfigValues) {
|
|
23229
23248
|
var partlistArticlesToLoad = [];
|
|
23230
23249
|
var myPartlistArticles = this.article.groupedPartlists;
|
|
23250
|
+
var partlistGroup = [];
|
|
23231
23251
|
for (var iKey in myPartlistArticles) {
|
|
23232
23252
|
var groupDecisionVal;
|
|
23233
23253
|
var key = Number(iKey);
|
|
@@ -23238,6 +23258,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23238
23258
|
for (var b = 0; b < myPartlistArticles[key].length; b++) {
|
|
23239
23259
|
var startTime = Date.now();
|
|
23240
23260
|
var myPartListPos = myPartlistArticles[key][b];
|
|
23261
|
+
if (myPartListPos.PartlistGroup && partlistGroup.includes(myPartListPos.PartlistGroup)) {
|
|
23262
|
+
continue;
|
|
23263
|
+
}
|
|
23241
23264
|
if (myPartListPos.ItemRefArticles) {
|
|
23242
23265
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
23243
23266
|
if (decisions) {
|
|
@@ -23250,16 +23273,16 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23250
23273
|
if ((_myDecisionVal = myDecisionVal) !== null && _myDecisionVal !== void 0 && _myDecisionVal.isValidDOC || relationTypeNone) {
|
|
23251
23274
|
// wenn die Decision gültig, gelten die ItemRefArticles
|
|
23252
23275
|
partlistAdded = true;
|
|
23253
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
|
|
23276
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
|
|
23254
23277
|
break;
|
|
23255
23278
|
}
|
|
23256
23279
|
}
|
|
23257
23280
|
if (decisions.length === 0) {
|
|
23258
23281
|
LOG$f.log('partlistarticle loaded for haveing 0 decisions: ', myPartListPos.ItemRefArticles);
|
|
23259
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
23282
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
23260
23283
|
} else if (!partlistAdded && this.article.CatalogData.useDecisionPosCountValue && myPartListPos.PosCountValue > 0) {
|
|
23261
23284
|
LOG$f.log('partlistarticle loaded for having default PosCountValue ', myPartListPos.ItemRefArticles);
|
|
23262
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
23285
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
23263
23286
|
}
|
|
23264
23287
|
}
|
|
23265
23288
|
}
|
|
@@ -23271,7 +23294,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23271
23294
|
}
|
|
23272
23295
|
}, {
|
|
23273
23296
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
23274
|
-
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23297
|
+
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23275
23298
|
var _myPartListPos$Option,
|
|
23276
23299
|
_this2 = this;
|
|
23277
23300
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
@@ -23328,7 +23351,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23328
23351
|
_loop3(i);
|
|
23329
23352
|
}
|
|
23330
23353
|
if (quanitity >= 1) {
|
|
23331
|
-
var _myDecisionVal$Rule
|
|
23354
|
+
var _myDecisionVal$Rule;
|
|
23332
23355
|
partlistArticlesToLoad.push({
|
|
23333
23356
|
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this2.article.catalogCodex,
|
|
23334
23357
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -23343,11 +23366,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23343
23366
|
RuleDesc: myRuleDesc,
|
|
23344
23367
|
RuleDesc_locales: myRuleDesc_locales,
|
|
23345
23368
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
23346
|
-
|
|
23369
|
+
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
23370
|
+
VariantValues: _this2.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
23347
23371
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
23348
23372
|
optionImgForPrint: optionImgForPrint,
|
|
23349
23373
|
optionsForPrint: optionsForPrint
|
|
23350
23374
|
});
|
|
23375
|
+
if (myPartListPos.PartlistGroup) partlistGroup.push(myPartListPos.PartlistGroup);
|
|
23351
23376
|
}
|
|
23352
23377
|
};
|
|
23353
23378
|
for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
|
|
@@ -23475,7 +23500,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23475
23500
|
} else if (calcUnit2Price != 0) {
|
|
23476
23501
|
//for diamter option
|
|
23477
23502
|
if (ops.option.diameter) {
|
|
23478
|
-
ops.usedCalcPrice = calcUnit2Price *
|
|
23503
|
+
ops.usedCalcPrice = calcUnit2Price * freeTextMeasure * freeTextMeasure;
|
|
23479
23504
|
} else {
|
|
23480
23505
|
if (firstUnit2Param == 0) {
|
|
23481
23506
|
firstUnit2Param = freeTextMeasure;
|
|
@@ -23700,6 +23725,35 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23700
23725
|
}
|
|
23701
23726
|
}
|
|
23702
23727
|
}
|
|
23728
|
+
}, {
|
|
23729
|
+
key: "getValuesInfluencingOPT",
|
|
23730
|
+
value: function getValuesInfluencingOPT(featureNo) {
|
|
23731
|
+
var decisions = this.article.catalogArticle.articleDecisions;
|
|
23732
|
+
//add the partlist spesific decisions to the normal decisions
|
|
23733
|
+
if (this.article.initDecisions) decisions = decisions.concat(this.article.initDecisions);
|
|
23734
|
+
var variantValuesArr = [];
|
|
23735
|
+
var relevantDecisions = decisions.filter(function (d) {
|
|
23736
|
+
var _d$Options;
|
|
23737
|
+
return (_d$Options = d.Options) === null || _d$Options === void 0 ? void 0 : _d$Options.includes(featureNo);
|
|
23738
|
+
});
|
|
23739
|
+
for (var i = 0; i < relevantDecisions.length; i++) {
|
|
23740
|
+
var decision = relevantDecisions[i];
|
|
23741
|
+
if (decision.Type == '1' && decision.DOC) {
|
|
23742
|
+
for (var j = 0; j < decision.DOC.length; j++) {
|
|
23743
|
+
var _oc$Row;
|
|
23744
|
+
var oc = decision.DOC[j];
|
|
23745
|
+
var variantValues = {};
|
|
23746
|
+
if (!Object.values((_oc$Row = oc.Row) !== null && _oc$Row !== void 0 ? _oc$Row : {}).length) continue;
|
|
23747
|
+
for (var key in oc.Row) {
|
|
23748
|
+
if (key == featureNo) continue;
|
|
23749
|
+
variantValues[key] = oc.Row[key][0];
|
|
23750
|
+
}
|
|
23751
|
+
variantValuesArr.push(variantValues);
|
|
23752
|
+
}
|
|
23753
|
+
}
|
|
23754
|
+
}
|
|
23755
|
+
return variantValuesArr;
|
|
23756
|
+
}
|
|
23703
23757
|
}, {
|
|
23704
23758
|
key: "getOptionPrice",
|
|
23705
23759
|
value: function getOptionPrice(calculatedPrice, optItem, digits) {
|
|
@@ -23784,17 +23838,23 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23784
23838
|
LOG$e.debug('eval Decisions total time in ' + (endTime - startTime) + ' of ' + count);
|
|
23785
23839
|
}
|
|
23786
23840
|
}, {
|
|
23787
|
-
key: "
|
|
23788
|
-
|
|
23841
|
+
key: "decisions",
|
|
23842
|
+
get: function get() {
|
|
23789
23843
|
var _unsortedDecisons;
|
|
23790
23844
|
var unsortedDecisons = this.article.articleIDMDecisions;
|
|
23791
|
-
if (!((_unsortedDecisons = unsortedDecisons) !== null && _unsortedDecisons !== void 0 && _unsortedDecisons.length)) return;
|
|
23845
|
+
if (!((_unsortedDecisons = unsortedDecisons) !== null && _unsortedDecisons !== void 0 && _unsortedDecisons.length)) return [];
|
|
23792
23846
|
//add the partlist spesific decisions to the normal decisions
|
|
23793
23847
|
|
|
23794
23848
|
if (this.article.initDecisions) unsortedDecisons = unsortedDecisons.concat(this.article.initDecisions);
|
|
23795
|
-
|
|
23849
|
+
return unsortedDecisons.sort(function (a, b) {
|
|
23796
23850
|
return a.prio - b.prio;
|
|
23797
23851
|
});
|
|
23852
|
+
}
|
|
23853
|
+
}, {
|
|
23854
|
+
key: "evalDecisionsfunction",
|
|
23855
|
+
value: function evalDecisionsfunction() {
|
|
23856
|
+
var decisions = this.decisions;
|
|
23857
|
+
if (!decisions.length) return;
|
|
23798
23858
|
for (var i = 0; i < decisions.length; i++) {
|
|
23799
23859
|
decisions[i].enabled = true;
|
|
23800
23860
|
decisions[i].disableHistory = [];
|
|
@@ -24249,6 +24309,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24249
24309
|
var oldOPS = this.article.getArticleOptionState(featureNo);
|
|
24250
24310
|
if (keepEnalbed) {
|
|
24251
24311
|
oldOPS.val = undefined;
|
|
24312
|
+
oldOPS.isDoShow = oldOPS.visibleCount > 1;
|
|
24252
24313
|
return;
|
|
24253
24314
|
}
|
|
24254
24315
|
var option = oldOPS.option;
|
|
@@ -24366,10 +24427,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24366
24427
|
var partlistArticlesToLoad = [];
|
|
24367
24428
|
var myPartlistArticles = (_this$article$catalog4 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.partlistPos;
|
|
24368
24429
|
if (!(myPartlistArticles !== null && myPartlistArticles !== void 0 && myPartlistArticles.length)) return [];
|
|
24430
|
+
var partlistGroup = [];
|
|
24369
24431
|
for (var i = 0; i < myPartlistArticles.length; i++) {
|
|
24370
24432
|
var _myPartListPos$decisi;
|
|
24371
24433
|
var myPartListPos = myPartlistArticles[i];
|
|
24372
24434
|
if (!myPartListPos.itemRefTypeNo) continue;
|
|
24435
|
+
if (myPartListPos.partlistGroup && partlistGroup.includes(myPartListPos.partlistGroup)) continue;
|
|
24373
24436
|
var decisions = this.article.CatalogData.getDecisionsByNo([].concat(_toConsumableArray__default["default"]((_myPartListPos$decisi = myPartListPos.decisions) !== null && _myPartListPos$decisi !== void 0 ? _myPartListPos$decisi : []), _toConsumableArray__default["default"](myPartListPos.decisionPosCount ? [myPartListPos.decisionPosCount] : [])));
|
|
24374
24437
|
var partlistAdded = false;
|
|
24375
24438
|
for (var c = 0; c < decisions.length; c++) {
|
|
@@ -24378,22 +24441,22 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24378
24441
|
var isValidDOC = relationTypeNone ? undefined : this.checkDecisionNumber(decision.decisionNo);
|
|
24379
24442
|
if (!isValidDOC && !relationTypeNone) continue;
|
|
24380
24443
|
partlistAdded = true;
|
|
24381
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, undefined, !relationTypeNone ? decision.decisionNo : undefined);
|
|
24444
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, undefined, !relationTypeNone ? decision.decisionNo : undefined);
|
|
24382
24445
|
break;
|
|
24383
24446
|
}
|
|
24384
24447
|
if (decisions.length === 0 && !partlistAdded) {
|
|
24385
24448
|
LOG$e.log('partlistarticle loaded for haveing 0 decisions: ', myPartListPos.itemRefTypeNo);
|
|
24386
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
24449
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
24387
24450
|
} else if (!partlistAdded && myPartListPos.posCountValue > 0) {
|
|
24388
24451
|
LOG$e.log('partlistarticle loaded for having default PosCountValue ', myPartListPos.itemRefTypeNo);
|
|
24389
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
24452
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
24390
24453
|
}
|
|
24391
24454
|
}
|
|
24392
24455
|
return partlistArticlesToLoad;
|
|
24393
24456
|
}
|
|
24394
24457
|
}, {
|
|
24395
24458
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24396
|
-
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, rule, decisionNo) {
|
|
24459
|
+
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, rule, decisionNo) {
|
|
24397
24460
|
var decisions = this.article.CatalogData.getDecisionsByNo(myPartListPos.decisions);
|
|
24398
24461
|
|
|
24399
24462
|
//const optionsForPrint: string[] = (myPartListPos.OptionsForPrint as string)?.split(';').map((o: string) => 'OPT' + o);
|
|
@@ -24444,7 +24507,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24444
24507
|
_loop2(i);
|
|
24445
24508
|
}
|
|
24446
24509
|
if (quanitity >= 1) {
|
|
24447
|
-
var _catalogCodex$toStrin
|
|
24510
|
+
var _catalogCodex$toStrin;
|
|
24448
24511
|
partlistArticlesToLoad.push({
|
|
24449
24512
|
CatalogCodex: (_catalogCodex$toStrin = catalogCodex.toString()) !== null && _catalogCodex$toStrin !== void 0 ? _catalogCodex$toStrin : this.article.catalogCodex,
|
|
24450
24513
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -24461,11 +24524,13 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24461
24524
|
RuleDesc: myRuleDesc,
|
|
24462
24525
|
RuleDesc_locales: myRuleDesc_locales,
|
|
24463
24526
|
PosInvisibility: myPartListPos.posInvisibility,
|
|
24464
|
-
|
|
24527
|
+
ConfigurationMode: myPartListPos.configurationMode,
|
|
24528
|
+
VariantValues: this.article.variantValuesForPla(myPartListPos.configurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
24465
24529
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData
|
|
24466
24530
|
//optionImgForPrint,
|
|
24467
24531
|
//optionsForPrint,
|
|
24468
24532
|
});
|
|
24533
|
+
if (myPartListPos.partlistGroup) partlistGroup.push(myPartListPos.partlistGroup);
|
|
24469
24534
|
}
|
|
24470
24535
|
return partlistArticlesToLoad;
|
|
24471
24536
|
}
|
|
@@ -24551,16 +24616,17 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24551
24616
|
}, {
|
|
24552
24617
|
key: "updateIDMSpecificFeature",
|
|
24553
24618
|
value: function updateIDMSpecificFeature(myArtOPS) {
|
|
24619
|
+
var _myArtOPS$option$idmV, _myArtOPS$option$idmV2, _myArtOPS$option$idmV3, _myArtOPS$option$idmV4, _myArtOPS$option$idmV5;
|
|
24554
24620
|
if (!this.article.parentHasSameOption(myArtOPS.optionCodex)) return;
|
|
24555
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24621
|
+
if ([90, 1090].includes((_myArtOPS$option$idmV = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV !== void 0 ? _myArtOPS$option$idmV : 0)) {
|
|
24556
24622
|
//R (Anschlusstyp R) - AVR
|
|
24557
24623
|
this.article.newPossibleAVRFilters = Object.keys(myArtOPS.visibleOptionValues);
|
|
24558
24624
|
}
|
|
24559
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24625
|
+
if ([89, 1089].includes((_myArtOPS$option$idmV2 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV2 !== void 0 ? _myArtOPS$option$idmV2 : 0)) {
|
|
24560
24626
|
//L (Anschlusstyp L) - AVL
|
|
24561
24627
|
this.article.newPossibleAVLFilters = Object.keys(myArtOPS.visibleOptionValues);
|
|
24562
24628
|
}
|
|
24563
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24629
|
+
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
24564
24630
|
try {
|
|
24565
24631
|
var _myArtOPS$measureValu;
|
|
24566
24632
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24569,7 +24635,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24569
24635
|
LOG$e.warn('Invalid Planungdepth - IDMVariantenArt 97: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
24570
24636
|
}
|
|
24571
24637
|
}
|
|
24572
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24638
|
+
if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
|
|
24573
24639
|
try {
|
|
24574
24640
|
var _myArtOPS$measureValu2;
|
|
24575
24641
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24578,7 +24644,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24578
24644
|
LOG$e.warn('Invalid Planungdepth - IDMVariantenArt 96: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
24579
24645
|
}
|
|
24580
24646
|
}
|
|
24581
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24647
|
+
if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
|
|
24582
24648
|
try {
|
|
24583
24649
|
var _myArtOPS$measureValu3;
|
|
24584
24650
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24588,6 +24654,30 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24588
24654
|
}
|
|
24589
24655
|
}
|
|
24590
24656
|
}
|
|
24657
|
+
}, {
|
|
24658
|
+
key: "getValuesInfluencingOPT",
|
|
24659
|
+
value: function getValuesInfluencingOPT(featureNo) {
|
|
24660
|
+
var variantValuesArr = [];
|
|
24661
|
+
var decisions = this.decisions;
|
|
24662
|
+
var relevantDecisions = decisions.filter(function (d) {
|
|
24663
|
+
return d.featureRefs.includes(featureNo);
|
|
24664
|
+
});
|
|
24665
|
+
for (var i = 0; i < relevantDecisions.length; i++) {
|
|
24666
|
+
var decision = relevantDecisions[i];
|
|
24667
|
+
if (decision.decisionType == 1) {
|
|
24668
|
+
for (var j = 0; j < decision.optionCombinations.length; j++) {
|
|
24669
|
+
var oc = decision.optionCombinations[j];
|
|
24670
|
+
var variantValues = {};
|
|
24671
|
+
for (var key in oc.parsedOptionSetRefs) {
|
|
24672
|
+
if (key == featureNo) continue;
|
|
24673
|
+
variantValues[key] = oc.parsedOptionSetRefs[key].value[0];
|
|
24674
|
+
}
|
|
24675
|
+
variantValuesArr.push(variantValues);
|
|
24676
|
+
}
|
|
24677
|
+
}
|
|
24678
|
+
}
|
|
24679
|
+
return variantValuesArr;
|
|
24680
|
+
}
|
|
24591
24681
|
}, {
|
|
24592
24682
|
key: "evalMeasureFormula",
|
|
24593
24683
|
value: function evalMeasureFormula(formula) {
|
|
@@ -24687,6 +24777,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24687
24777
|
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
24688
24778
|
partListParentArticle: initParams.parentArticle,
|
|
24689
24779
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
24780
|
+
partlistArticleStandalone: initParams.partlistArticleStandalone,
|
|
24690
24781
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
24691
24782
|
noPrice: (_initParams$noPrice = initParams.noPrice) !== null && _initParams$noPrice !== void 0 ? _initParams$noPrice : false,
|
|
24692
24783
|
retailArticleNr: initParams.RetailArticleNr ? initParams.RetailArticleNr : initParams.retailArticleNr,
|
|
@@ -24756,7 +24847,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24756
24847
|
currentAccessorires: [],
|
|
24757
24848
|
parentElementId: isNotDockedAccessoire ? this.set.getDivaArticles()[this.relatedToBasketId].elementId : undefined,
|
|
24758
24849
|
isNotDockedAccessoire: isNotDockedAccessoire,
|
|
24759
|
-
svgsWithFormula: []
|
|
24850
|
+
svgsWithFormula: [],
|
|
24851
|
+
varaintValuesInfluencingAVLAVRFilter: []
|
|
24760
24852
|
};
|
|
24761
24853
|
var plannerElement = this.article.catalogArticle.catalogPlannerArticle;
|
|
24762
24854
|
if (plannerElement) {
|
|
@@ -24827,6 +24919,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24827
24919
|
get: function get() {
|
|
24828
24920
|
return this.article.partlistArticleVisibleInTree && this.hasOptionsThatParentDoesNotHave;
|
|
24829
24921
|
}
|
|
24922
|
+
}, {
|
|
24923
|
+
key: "partlistArticleStandalone",
|
|
24924
|
+
get: function get() {
|
|
24925
|
+
return this.article.partlistArticleStandalone;
|
|
24926
|
+
}
|
|
24830
24927
|
}, {
|
|
24831
24928
|
key: "partlistArticlesReqursive",
|
|
24832
24929
|
get: function get() {
|
|
@@ -24841,6 +24938,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24841
24938
|
get: function get() {
|
|
24842
24939
|
var _this$partListParentA;
|
|
24843
24940
|
if (!this.partListParentArticle) return false;
|
|
24941
|
+
if (this.partlistArticleStandalone) return true;
|
|
24844
24942
|
//a partlistartilce should really only be visible in the configtree when the parent does not have a option in his Optiontree that the partlistarticle has
|
|
24845
24943
|
// first usecase https://app.asana.com/0/1204193128085691/1204389027061737
|
|
24846
24944
|
var myOptions = this.articleOptionStatesKeys;
|
|
@@ -24851,17 +24949,24 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24851
24949
|
}
|
|
24852
24950
|
}, {
|
|
24853
24951
|
key: "getRecursivePartlistArticles",
|
|
24854
|
-
value: function getRecursivePartlistArticles(onlyVisible) {
|
|
24952
|
+
value: function getRecursivePartlistArticles(onlyVisible, excludeStandalonePla) {
|
|
24855
24953
|
var partlistArticles = {};
|
|
24856
24954
|
for (var basketId in this.partlistArticles) {
|
|
24857
24955
|
var partlistArticle = this.partlistArticles[basketId];
|
|
24858
|
-
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
24956
|
+
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree || !excludeStandalonePla && partlistArticle.partlistArticleStandalone) partlistArticles[basketId] = partlistArticle;
|
|
24859
24957
|
if (partlistArticle.hasPartlistArticle) {
|
|
24860
|
-
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
24958
|
+
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible, excludeStandalonePla));
|
|
24861
24959
|
}
|
|
24862
24960
|
}
|
|
24863
24961
|
return partlistArticles;
|
|
24864
24962
|
}
|
|
24963
|
+
}, {
|
|
24964
|
+
key: "variantValuesForPla",
|
|
24965
|
+
value: function variantValuesForPla(configurationMode, previousPartlistArticleVariantValues, newConfigValues) {
|
|
24966
|
+
//if configurationMode is true its previous values are more important than the values of the parentelement because its standalone configurable
|
|
24967
|
+
if (configurationMode) return _objectSpread$e(_objectSpread$e({}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {});
|
|
24968
|
+
return _objectSpread$e(_objectSpread$e({}, previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {});
|
|
24969
|
+
}
|
|
24865
24970
|
}, {
|
|
24866
24971
|
key: "partlistArticlesAsArray",
|
|
24867
24972
|
get: function get() {
|
|
@@ -25505,31 +25610,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25505
25610
|
});
|
|
25506
25611
|
if (firstMatch) return firstMatch;
|
|
25507
25612
|
if (from !== ((_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.basketId) && (_this$partListParentA10 = this.partListParentArticle) !== null && _this$partListParentA10 !== void 0 && _this$partListParentA10.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
|
|
25508
|
-
|
|
25613
|
+
var ops = this.partListParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25614
|
+
if (ops) return ops;
|
|
25509
25615
|
}
|
|
25510
25616
|
if (Object.keys((_this$partlistArticle3 = this.partlistArticles) !== null && _this$partlistArticle3 !== void 0 ? _this$partlistArticle3 : {}).length > 0) {
|
|
25511
25617
|
for (var key in this.partlistArticles) {
|
|
25512
25618
|
if (from === key) continue;
|
|
25513
25619
|
var partlistArticle = this.partlistArticles[key];
|
|
25514
|
-
var
|
|
25515
|
-
if (
|
|
25620
|
+
var _ops = partlistArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25621
|
+
if (_ops) return _ops;
|
|
25516
25622
|
}
|
|
25517
25623
|
}
|
|
25518
25624
|
var _iterator5 = _createForOfIteratorHelper$6(this.articleOptionStatesData),
|
|
25519
25625
|
_step5;
|
|
25520
25626
|
try {
|
|
25521
25627
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
25522
|
-
var
|
|
25628
|
+
var _ops3 = _step5.value;
|
|
25523
25629
|
if (!codex.includes('.')) {
|
|
25524
|
-
if (
|
|
25525
|
-
return
|
|
25630
|
+
if (_ops3.option.ocd == codex && _ops3.isDoShow && !_ops3.isDisabled) {
|
|
25631
|
+
return _ops3;
|
|
25526
25632
|
}
|
|
25527
25633
|
} else {
|
|
25528
25634
|
var _this$parentOptionCod = this.parentOptionCodex(codex),
|
|
25529
25635
|
optionCodex = _this$parentOptionCod.optionCodex,
|
|
25530
25636
|
partenOptionCodex = _this$parentOptionCod.partenOptionCodex;
|
|
25531
|
-
if ((
|
|
25532
|
-
return
|
|
25637
|
+
if ((_ops3.option.ocd == optionCodex || _ops3.option.codex == optionCodex) && _ops3.option.parentOptionCodex == partenOptionCodex) {
|
|
25638
|
+
return _ops3;
|
|
25533
25639
|
}
|
|
25534
25640
|
}
|
|
25535
25641
|
}
|
|
@@ -25539,8 +25645,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25539
25645
|
_iterator5.f();
|
|
25540
25646
|
}
|
|
25541
25647
|
if (checkOnAccessoireParent && this.accessoireParentArticle) {
|
|
25542
|
-
var
|
|
25543
|
-
if (
|
|
25648
|
+
var _ops2 = this.accessoireParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25649
|
+
if (_ops2) return _ops2;
|
|
25544
25650
|
}
|
|
25545
25651
|
return undefined;
|
|
25546
25652
|
}
|
|
@@ -25734,9 +25840,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25734
25840
|
get: function get() {
|
|
25735
25841
|
var _this$partlistArticle4;
|
|
25736
25842
|
if (Object.values((_this$partlistArticle4 = this.partlistArticles) !== null && _this$partlistArticle4 !== void 0 ? _this$partlistArticle4 : {}).find(function (p) {
|
|
25737
|
-
return p.partlistArticleVisibleInTree;
|
|
25843
|
+
return p.partlistArticleVisibleInTree || p.partlistArticleStandalone;
|
|
25738
25844
|
})) return true;
|
|
25739
|
-
return this.partlistArticleVisibleInTree;
|
|
25845
|
+
return this.partlistArticleVisibleInTree || this.partlistArticleStandalone;
|
|
25740
25846
|
}
|
|
25741
25847
|
}, {
|
|
25742
25848
|
key: "partListParentArticle",
|
|
@@ -26197,13 +26303,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26197
26303
|
invisible: ops.isInvisible,
|
|
26198
26304
|
visibleOPVs: Object.values(ops.visibleOptionValues).map(function (v) {
|
|
26199
26305
|
return v.codex;
|
|
26200
|
-
})
|
|
26306
|
+
}),
|
|
26307
|
+
optName: ops.optionName
|
|
26201
26308
|
};
|
|
26202
26309
|
if (ops.freeText) {
|
|
26203
26310
|
ret[ops.optionCodex + '_val'] = {
|
|
26204
26311
|
selOPV: ops.freeText,
|
|
26205
26312
|
visibleOPVs: [],
|
|
26206
|
-
invisible: true
|
|
26313
|
+
invisible: true,
|
|
26314
|
+
optName: ''
|
|
26207
26315
|
};
|
|
26208
26316
|
}
|
|
26209
26317
|
}
|
|
@@ -26335,8 +26443,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26335
26443
|
_step14;
|
|
26336
26444
|
try {
|
|
26337
26445
|
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
26446
|
+
var _ops$idmVariantenArt;
|
|
26338
26447
|
var ops = _step14.value;
|
|
26339
|
-
if (ops.isDoShow && (!(ops.idmVariantenArt
|
|
26448
|
+
if (ops.isDoShow && (![95, 96, 97, 1095, 1096, 1097].includes((_ops$idmVariantenArt = ops.idmVariantenArt) !== null && _ops$idmVariantenArt !== void 0 ? _ops$idmVariantenArt : 0) || ops.isVisibleFreeText) && ops.val && ops.visibleCount > 0 && !ops.isDescribingState) {
|
|
26340
26449
|
variantValues.push((this.CatalogData.isIDMFormat ? ops.optionCodex : ops.optionCodex.substring(3)) + '_' + (this.CatalogData.isIDMFormat ? ops.val.codex : ops.val.codex.substring(3)) + (ops.freeText ? '_' + ops.freeText : ops.value ? '_' + ops.value : ''));
|
|
26341
26450
|
}
|
|
26342
26451
|
}
|
|
@@ -26489,6 +26598,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26489
26598
|
}, {
|
|
26490
26599
|
key: "deletePartlistArticles",
|
|
26491
26600
|
value: function deletePartlistArticles() {
|
|
26601
|
+
for (var pl in this.article.partlistArticles) {
|
|
26602
|
+
this.article.partlistArticles[pl].deleted = true;
|
|
26603
|
+
}
|
|
26492
26604
|
if (Object.keys(this.article.partlistArticles).length) this.article.previousPartlistArticles = this.article.partlistArticles;
|
|
26493
26605
|
this.article.partlistArticles = {};
|
|
26494
26606
|
}
|
|
@@ -26779,9 +26891,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26779
26891
|
_step21;
|
|
26780
26892
|
try {
|
|
26781
26893
|
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
26782
|
-
var
|
|
26783
|
-
if (
|
|
26784
|
-
ret = this.checkOptionSearchOPV(
|
|
26894
|
+
var _ops4 = _step21.value;
|
|
26895
|
+
if (_ops4.option.ocd == optionCodex && _ops4.isDoShow && (parentOptionCodex == '' || parentOptionCodex == _ops4.option.parentOptionCodex)) {
|
|
26896
|
+
ret = this.checkOptionSearchOPV(_ops4.option, optionValueCodex, ret);
|
|
26785
26897
|
}
|
|
26786
26898
|
}
|
|
26787
26899
|
//fallback for pfister classification usecase
|
|
@@ -26794,9 +26906,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26794
26906
|
_step22;
|
|
26795
26907
|
try {
|
|
26796
26908
|
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
26797
|
-
var
|
|
26798
|
-
if (
|
|
26799
|
-
return this.checkOptionSearchOPV(
|
|
26909
|
+
var _ops5 = _step22.value;
|
|
26910
|
+
if (_ops5.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops5.option.parentOptionCodex)) {
|
|
26911
|
+
return this.checkOptionSearchOPV(_ops5.option, optionValueCodex, ret);
|
|
26800
26912
|
}
|
|
26801
26913
|
}
|
|
26802
26914
|
} catch (err) {
|
|
@@ -27019,6 +27131,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27019
27131
|
}
|
|
27020
27132
|
return visibleOptionValues[Object.keys(visibleOptionValues)[0]];
|
|
27021
27133
|
}
|
|
27134
|
+
}, {
|
|
27135
|
+
key: "getVariantValuesInfluencingAVLAVRFilter",
|
|
27136
|
+
value: function getVariantValuesInfluencingAVLAVRFilter() {
|
|
27137
|
+
var filterOptions = [(!this.CatalogData.isIDMFormat ? 'OPT' : '') + '89', (!this.CatalogData.isIDMFormat ? 'OPT' : '') + '90'];
|
|
27138
|
+
var variantValues = [];
|
|
27139
|
+
for (var i = 0; i < filterOptions.length; i++) {
|
|
27140
|
+
if (this.getArticleOptionState(filterOptions[i])) {
|
|
27141
|
+
variantValues = [].concat(_toConsumableArray__default["default"](this.engine.getValuesInfluencingOPT(filterOptions[i])), _toConsumableArray__default["default"](variantValues));
|
|
27142
|
+
}
|
|
27143
|
+
}
|
|
27144
|
+
return variantValues;
|
|
27145
|
+
}
|
|
27022
27146
|
}, {
|
|
27023
27147
|
key: "updateOptionsWithAddToMeasure",
|
|
27024
27148
|
value: function updateOptionsWithAddToMeasure(optionCodex) {
|
|
@@ -27089,7 +27213,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27089
27213
|
break;
|
|
27090
27214
|
}
|
|
27091
27215
|
_context.next = 4;
|
|
27092
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
27216
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-2db3c4a8.js'); });
|
|
27093
27217
|
case 4:
|
|
27094
27218
|
_yield$import = _context.sent;
|
|
27095
27219
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -27152,6 +27276,39 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27152
27276
|
if (!this.partListParentArticle) return true;
|
|
27153
27277
|
return !!this.partListParentArticle.getArticleOptionStateFlat(opt) || this.partlistArticleVisibleInTree;
|
|
27154
27278
|
}
|
|
27279
|
+
}, {
|
|
27280
|
+
key: "afterInit",
|
|
27281
|
+
value: function () {
|
|
27282
|
+
var _afterInit = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2() {
|
|
27283
|
+
var variantValues, i, _ops$visibleOptionVal, ops, _ops$visibleOptionVal2;
|
|
27284
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
27285
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
27286
|
+
case 0:
|
|
27287
|
+
if (this.CatalogData.useDiomexConfigLogic) {
|
|
27288
|
+
_context2.next = 2;
|
|
27289
|
+
break;
|
|
27290
|
+
}
|
|
27291
|
+
return _context2.abrupt("return", {});
|
|
27292
|
+
case 2:
|
|
27293
|
+
variantValues = {};
|
|
27294
|
+
for (i = 0; i < this.articleOptionStates.length; i++) {
|
|
27295
|
+
ops = this.articleOptionStates[i];
|
|
27296
|
+
if (ops.val === undefined && Object.values((_ops$visibleOptionVal = ops.visibleOptionValues) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : {}).length && !ops.isInvisible) {
|
|
27297
|
+
variantValues[ops.optionCodex] = Object.values((_ops$visibleOptionVal2 = ops.visibleOptionValues) !== null && _ops$visibleOptionVal2 !== void 0 ? _ops$visibleOptionVal2 : {})[0].codex;
|
|
27298
|
+
}
|
|
27299
|
+
}
|
|
27300
|
+
return _context2.abrupt("return", variantValues);
|
|
27301
|
+
case 5:
|
|
27302
|
+
case "end":
|
|
27303
|
+
return _context2.stop();
|
|
27304
|
+
}
|
|
27305
|
+
}, _callee2, this);
|
|
27306
|
+
}));
|
|
27307
|
+
function afterInit() {
|
|
27308
|
+
return _afterInit.apply(this, arguments);
|
|
27309
|
+
}
|
|
27310
|
+
return afterInit;
|
|
27311
|
+
}()
|
|
27155
27312
|
}, {
|
|
27156
27313
|
key: "getValidValues",
|
|
27157
27314
|
value: function getValidValues(myValues, mergeOptionToSameOption, setConfigDoesOverWrite) {
|
|
@@ -27200,8 +27357,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27200
27357
|
}
|
|
27201
27358
|
}
|
|
27202
27359
|
for (var _key2 in myValues) {
|
|
27203
|
-
var
|
|
27204
|
-
if (
|
|
27360
|
+
var _ops6 = this.getArticleOptionState(_key2);
|
|
27361
|
+
if (_ops6) {
|
|
27205
27362
|
validValues[_key2] = myValues[_key2];
|
|
27206
27363
|
} else if (_key2.endsWith('_val') && this.getArticleOptionState(_key2.replace(/_val/g, ''))) {
|
|
27207
27364
|
validValues[_key2] = myValues[_key2];
|
|
@@ -27210,10 +27367,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27210
27367
|
_step24;
|
|
27211
27368
|
try {
|
|
27212
27369
|
for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
|
|
27213
|
-
var
|
|
27214
|
-
if (
|
|
27215
|
-
var values = this.checkOptionSearchOPV(
|
|
27216
|
-
if (values !== null && values !== void 0 && values.opv) validValues[
|
|
27370
|
+
var _ops7 = _step24.value;
|
|
27371
|
+
if (_ops7.optionOcd == _key2) {
|
|
27372
|
+
var values = this.checkOptionSearchOPV(_ops7.option, myValues[_key2], {});
|
|
27373
|
+
if (values !== null && values !== void 0 && values.opv) validValues[_ops7.optionCodex] = values.opv.codex;
|
|
27217
27374
|
}
|
|
27218
27375
|
}
|
|
27219
27376
|
} catch (err) {
|
|
@@ -27223,9 +27380,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27223
27380
|
}
|
|
27224
27381
|
}
|
|
27225
27382
|
//for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
|
|
27226
|
-
if (
|
|
27227
|
-
var
|
|
27228
|
-
if ((
|
|
27383
|
+
if (_ops6) {
|
|
27384
|
+
var _ops6$valCodex;
|
|
27385
|
+
if ((_ops6$valCodex = _ops6.valCodex) !== null && _ops6$valCodex !== void 0 && _ops6$valCodex.startsWith('OPVSUB_') && !validValues[_key2 + '.' + _key2] && this.getArticleOptionState(_key2 + '.' + _key2)) {
|
|
27229
27386
|
validValues[_key2 + '.' + _key2] = myValues[_key2];
|
|
27230
27387
|
}
|
|
27231
27388
|
}
|
|
@@ -27565,7 +27722,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27565
27722
|
var ops = _step28.value;
|
|
27566
27723
|
var OP = ops.optionCodex;
|
|
27567
27724
|
if (ops) {
|
|
27568
|
-
var
|
|
27725
|
+
var _ops$idmVariantenArt2;
|
|
27726
|
+
var doHideSizeOption = [95, 96, 97, 1095, 1096, 1097].includes((_ops$idmVariantenArt2 = ops.idmVariantenArt) !== null && _ops$idmVariantenArt2 !== void 0 ? _ops$idmVariantenArt2 : 0);
|
|
27569
27727
|
if (ops.isVisibleFreeText == true) {
|
|
27570
27728
|
doHideSizeOption = false;
|
|
27571
27729
|
}
|
|
@@ -27736,15 +27894,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27736
27894
|
value: function validateAndSetNewConfigValues(newConfigValues) {
|
|
27737
27895
|
var freeTextValues = {};
|
|
27738
27896
|
for (var key in newConfigValues) {
|
|
27739
|
-
var
|
|
27897
|
+
var _ops8, _ops9, _newConfigValues$key;
|
|
27740
27898
|
var ops = this.getArticleOptionState(key);
|
|
27741
27899
|
var _this$parentOptionCod5 = this.parentOptionCodex(key),
|
|
27742
27900
|
optionCodex = _this$parentOptionCod5.optionCodex,
|
|
27743
27901
|
partenOptionCodex = _this$parentOptionCod5.partenOptionCodex;
|
|
27744
|
-
if ((
|
|
27902
|
+
if ((_ops8 = ops) !== null && _ops8 !== void 0 && _ops8.isMultiselect) {
|
|
27745
27903
|
ops = this.handleMultiselect(ops, newConfigValues, key);
|
|
27746
27904
|
}
|
|
27747
|
-
if ((
|
|
27905
|
+
if ((_ops9 = ops) !== null && _ops9 !== void 0 && _ops9.isFreeText) {
|
|
27748
27906
|
this.handleFreeText(ops, newConfigValues, key, freeTextValues);
|
|
27749
27907
|
}
|
|
27750
27908
|
var opvCodex = (_newConfigValues$key = newConfigValues[key]) === null || _newConfigValues$key === void 0 ? void 0 : _newConfigValues$key.split(';')[0];
|
|
@@ -27755,8 +27913,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27755
27913
|
var myFreeText = foundItem.opv.isFreeText ? newConfigValues[optionCodex + '_val'] : undefined;
|
|
27756
27914
|
this.engine.updateArtOPV(foundItem.opv, foundItem.opt.codex, this.getArticleOptionState(foundItem.opt.codex), myFreeText);
|
|
27757
27915
|
} else {
|
|
27758
|
-
var
|
|
27759
|
-
if (ops && !((
|
|
27916
|
+
var _ops10;
|
|
27917
|
+
if (ops && !((_ops10 = ops) !== null && _ops10 !== void 0 && _ops10.isFreeText)) {
|
|
27760
27918
|
// to initialize freetexts where the freetext is not the only selectable opv in the options
|
|
27761
27919
|
this.checkIfSelectableOpvIsFreetext(ops, opvCodex, newConfigValues);
|
|
27762
27920
|
}
|
|
@@ -28013,7 +28171,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28013
28171
|
while (1) switch (_context5.prev = _context5.next) {
|
|
28014
28172
|
case 0:
|
|
28015
28173
|
if (!(article.articleType == 'OPTION' || article.articleType == 'OPTIONTREE')) {
|
|
28016
|
-
_context5.next =
|
|
28174
|
+
_context5.next = 11;
|
|
28017
28175
|
break;
|
|
28018
28176
|
}
|
|
28019
28177
|
_context5.next = 3;
|
|
@@ -28022,13 +28180,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28022
28180
|
_context5.next = 5;
|
|
28023
28181
|
return this.updateCfgValues(article, defaultValues, variantValues);
|
|
28024
28182
|
case 5:
|
|
28025
|
-
if (!(
|
|
28183
|
+
if (!(from === 'initializingPartlist')) {
|
|
28026
28184
|
_context5.next = 8;
|
|
28027
28185
|
break;
|
|
28028
28186
|
}
|
|
28029
28187
|
_context5.next = 8;
|
|
28030
|
-
return
|
|
28188
|
+
return this.updateEmptyOption(article);
|
|
28031
28189
|
case 8:
|
|
28190
|
+
if (!(article.set.PlannerMode !== 'BoxPlanner')) {
|
|
28191
|
+
_context5.next = 11;
|
|
28192
|
+
break;
|
|
28193
|
+
}
|
|
28194
|
+
_context5.next = 11;
|
|
28195
|
+
return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, defaultValues, [article.basketId], ignorePlanner, from);
|
|
28196
|
+
case 11:
|
|
28032
28197
|
case "end":
|
|
28033
28198
|
return _context5.stop();
|
|
28034
28199
|
}
|
|
@@ -28054,7 +28219,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28054
28219
|
key: "updateArticlesOptionStates",
|
|
28055
28220
|
value: function () {
|
|
28056
28221
|
var _updateArticlesOptionStates = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
|
|
28057
|
-
var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, actArticle,
|
|
28222
|
+
var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, _actArticle, actArticle, newPLATL, _actArticle$checkDefa, variantValues, triggerUpdate, pla;
|
|
28058
28223
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context6) {
|
|
28059
28224
|
while (1) switch (_context6.prev = _context6.next) {
|
|
28060
28225
|
case 0:
|
|
@@ -28064,74 +28229,79 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28064
28229
|
i = 0;
|
|
28065
28230
|
case 4:
|
|
28066
28231
|
if (!(i < targetArticlesToUpdate.length)) {
|
|
28067
|
-
_context6.next =
|
|
28232
|
+
_context6.next = 40;
|
|
28068
28233
|
break;
|
|
28069
28234
|
}
|
|
28070
28235
|
valuesArray[i] = {};
|
|
28071
28236
|
actArticle = articles[targetArticlesToUpdate[i]];
|
|
28237
|
+
if ((_actArticle = actArticle) !== null && _actArticle !== void 0 && _actArticle.deleted && actArticle.isPartListArticle && actArticle.partListParentArticle) {
|
|
28238
|
+
actArticle = actArticle.partListParentArticle.partlistArticles[actArticle.basketId];
|
|
28239
|
+
}
|
|
28072
28240
|
if (!(!actArticle || actArticle.deleted)) {
|
|
28073
|
-
_context6.next =
|
|
28241
|
+
_context6.next = 12;
|
|
28074
28242
|
break;
|
|
28075
28243
|
}
|
|
28076
28244
|
targetArticlesToUpdate.splice(i, 1);
|
|
28077
28245
|
i--;
|
|
28078
|
-
return _context6.abrupt("continue",
|
|
28079
|
-
case
|
|
28246
|
+
return _context6.abrupt("continue", 37);
|
|
28247
|
+
case 12:
|
|
28080
28248
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
28081
28249
|
valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
28082
28250
|
}
|
|
28083
28251
|
|
|
28084
28252
|
//only set config if valuesArray are not empty or the article is initializing
|
|
28253
|
+
newPLATL = void 0; // partlistarticle to load
|
|
28085
28254
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
28086
|
-
_context6.next =
|
|
28255
|
+
_context6.next = 29;
|
|
28087
28256
|
break;
|
|
28088
28257
|
}
|
|
28089
|
-
_context6.next =
|
|
28258
|
+
_context6.next = 17;
|
|
28090
28259
|
return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
|
|
28091
|
-
case
|
|
28092
|
-
|
|
28260
|
+
case 17:
|
|
28261
|
+
newPLATL = _context6.sent;
|
|
28093
28262
|
_actArticle$checkDefa = actArticle.checkDefaultGlobalOpt(valuesArray[i]), variantValues = _actArticle$checkDefa.variantValues, triggerUpdate = _actArticle$checkDefa.triggerUpdate;
|
|
28094
28263
|
valuesArray[i] = variantValues;
|
|
28095
|
-
_context6.next =
|
|
28264
|
+
_context6.next = 22;
|
|
28096
28265
|
return this.updateAccessoriesFromGlobalOption(valuesArray[i], actArticle);
|
|
28097
|
-
case
|
|
28266
|
+
case 22:
|
|
28098
28267
|
if (!triggerUpdate) {
|
|
28099
|
-
_context6.next =
|
|
28268
|
+
_context6.next = 26;
|
|
28100
28269
|
break;
|
|
28101
28270
|
}
|
|
28102
|
-
_context6.next =
|
|
28271
|
+
_context6.next = 25;
|
|
28103
28272
|
return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
|
|
28104
|
-
case
|
|
28105
|
-
|
|
28106
|
-
case
|
|
28107
|
-
partlistArticlesToLoad = partlistArticlesToLoad.concat(newPartlistArticlesToLoad);
|
|
28273
|
+
case 25:
|
|
28274
|
+
newPLATL = _context6.sent;
|
|
28275
|
+
case 26:
|
|
28108
28276
|
newEDOExtraArticles = this.checkEDOArticles(articles);
|
|
28109
|
-
_context6.next =
|
|
28277
|
+
_context6.next = 32;
|
|
28110
28278
|
break;
|
|
28111
|
-
case
|
|
28112
|
-
_context6.t0 = partlistArticlesToLoad;
|
|
28279
|
+
case 29:
|
|
28113
28280
|
_context6.next = 31;
|
|
28114
28281
|
return this.updateCfgValues(actArticle, {}, {}, undefined, undefined, from == 'calcVariant');
|
|
28115
28282
|
case 31:
|
|
28116
|
-
|
|
28117
|
-
|
|
28118
|
-
|
|
28283
|
+
newPLATL = _context6.sent;
|
|
28284
|
+
case 32:
|
|
28285
|
+
_context6.next = 34;
|
|
28286
|
+
return this.updateEmptyOption(actArticle);
|
|
28287
|
+
case 34:
|
|
28288
|
+
pla = _context6.sent;
|
|
28289
|
+
if (pla !== undefined) newPLATL = pla;
|
|
28290
|
+
partlistArticlesToLoad = partlistArticlesToLoad.concat(newPLATL);
|
|
28291
|
+
case 37:
|
|
28119
28292
|
i++;
|
|
28120
28293
|
_context6.next = 4;
|
|
28121
28294
|
break;
|
|
28122
|
-
case 36:
|
|
28123
|
-
_context6.next = 38;
|
|
28124
|
-
return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
|
|
28125
|
-
case 38:
|
|
28126
|
-
_context6.next = 40;
|
|
28127
|
-
return this.triggerMoreUpdates(targetArticlesToUpdate, valuesArray, articles, from);
|
|
28128
28295
|
case 40:
|
|
28296
|
+
_context6.next = 42;
|
|
28297
|
+
return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
|
|
28298
|
+
case 42:
|
|
28129
28299
|
return _context6.abrupt("return", {
|
|
28130
28300
|
newEDOExtraArticles: newEDOExtraArticles,
|
|
28131
28301
|
targetArticlesToUpdate: targetArticlesToUpdate,
|
|
28132
28302
|
partlistArticlesToLoad: partlistArticlesToLoad
|
|
28133
28303
|
});
|
|
28134
|
-
case
|
|
28304
|
+
case 43:
|
|
28135
28305
|
case "end":
|
|
28136
28306
|
return _context6.stop();
|
|
28137
28307
|
}
|
|
@@ -28143,38 +28313,38 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28143
28313
|
return updateArticlesOptionStates;
|
|
28144
28314
|
}()
|
|
28145
28315
|
}, {
|
|
28146
|
-
key: "
|
|
28316
|
+
key: "triggerUpdateOnVisiblePartilstArticles",
|
|
28147
28317
|
value: function () {
|
|
28148
|
-
var
|
|
28149
|
-
var
|
|
28318
|
+
var _triggerUpdateOnVisiblePartilstArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(targetArticlesToUpdate, articles) {
|
|
28319
|
+
var _articles$targetArtic;
|
|
28320
|
+
var key, configuredArticle, toIgnore, actArticle;
|
|
28150
28321
|
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context7) {
|
|
28151
28322
|
while (1) switch (_context7.prev = _context7.next) {
|
|
28152
28323
|
case 0:
|
|
28153
|
-
if (!(
|
|
28154
|
-
_context7.next =
|
|
28324
|
+
if (!((_articles$targetArtic = articles[targetArticlesToUpdate[0]]) !== null && _articles$targetArtic !== void 0 && _articles$targetArtic.hasPartlistArticleVisibleInTree)) {
|
|
28325
|
+
_context7.next = 13;
|
|
28155
28326
|
break;
|
|
28156
28327
|
}
|
|
28157
|
-
|
|
28328
|
+
_context7.t0 = _regeneratorRuntime__default["default"].keys(articles);
|
|
28158
28329
|
case 2:
|
|
28159
|
-
|
|
28160
|
-
case 3:
|
|
28161
|
-
if (!(i < targetArticlesToUpdate.length)) {
|
|
28330
|
+
if ((_context7.t1 = _context7.t0()).done) {
|
|
28162
28331
|
_context7.next = 13;
|
|
28163
28332
|
break;
|
|
28164
28333
|
}
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28334
|
+
key = _context7.t1.value;
|
|
28335
|
+
configuredArticle = articles[targetArticlesToUpdate[0]];
|
|
28336
|
+
toIgnore = configuredArticle.pushParentId();
|
|
28337
|
+
if (![configuredArticle.basketId].concat(_toConsumableArray__default["default"](toIgnore)).includes(key)) {
|
|
28338
|
+
_context7.next = 8;
|
|
28168
28339
|
break;
|
|
28169
28340
|
}
|
|
28170
|
-
_context7.
|
|
28171
|
-
return this.updateCfgValues(article, valuesArray[i], {});
|
|
28341
|
+
return _context7.abrupt("continue", 2);
|
|
28172
28342
|
case 8:
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
_context7.next =
|
|
28343
|
+
actArticle = articles[key];
|
|
28344
|
+
_context7.next = 11;
|
|
28345
|
+
return this.updateCfgValues(actArticle, {}, {});
|
|
28346
|
+
case 11:
|
|
28347
|
+
_context7.next = 2;
|
|
28178
28348
|
break;
|
|
28179
28349
|
case 13:
|
|
28180
28350
|
case "end":
|
|
@@ -28182,55 +28352,43 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28182
28352
|
}
|
|
28183
28353
|
}, _callee6, this);
|
|
28184
28354
|
}));
|
|
28185
|
-
function
|
|
28186
|
-
return
|
|
28355
|
+
function triggerUpdateOnVisiblePartilstArticles(_x19, _x20) {
|
|
28356
|
+
return _triggerUpdateOnVisiblePartilstArticles.apply(this, arguments);
|
|
28187
28357
|
}
|
|
28188
|
-
return
|
|
28358
|
+
return triggerUpdateOnVisiblePartilstArticles;
|
|
28189
28359
|
}()
|
|
28190
28360
|
}, {
|
|
28191
|
-
key: "
|
|
28361
|
+
key: "updateEmptyOption",
|
|
28192
28362
|
value: function () {
|
|
28193
|
-
var
|
|
28194
|
-
var
|
|
28195
|
-
var key, configuredArticle, toIgnore, actArticle;
|
|
28363
|
+
var _updateEmptyOption = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(article) {
|
|
28364
|
+
var emyptsOptionsToSet;
|
|
28196
28365
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context8) {
|
|
28197
28366
|
while (1) switch (_context8.prev = _context8.next) {
|
|
28198
28367
|
case 0:
|
|
28199
|
-
|
|
28200
|
-
|
|
28201
|
-
break;
|
|
28202
|
-
}
|
|
28203
|
-
_context8.t0 = _regeneratorRuntime__default["default"].keys(articles);
|
|
28368
|
+
_context8.next = 2;
|
|
28369
|
+
return article.afterInit();
|
|
28204
28370
|
case 2:
|
|
28205
|
-
|
|
28206
|
-
|
|
28371
|
+
emyptsOptionsToSet = _context8.sent;
|
|
28372
|
+
if (!Object.keys(emyptsOptionsToSet).length) {
|
|
28373
|
+
_context8.next = 7;
|
|
28207
28374
|
break;
|
|
28208
28375
|
}
|
|
28209
|
-
|
|
28210
|
-
|
|
28211
|
-
|
|
28212
|
-
|
|
28213
|
-
|
|
28214
|
-
|
|
28215
|
-
}
|
|
28216
|
-
return _context8.abrupt("continue", 2);
|
|
28376
|
+
_context8.next = 6;
|
|
28377
|
+
return this.updateCfgValues(article, emyptsOptionsToSet, {});
|
|
28378
|
+
case 6:
|
|
28379
|
+
return _context8.abrupt("return", _context8.sent);
|
|
28380
|
+
case 7:
|
|
28381
|
+
return _context8.abrupt("return", undefined);
|
|
28217
28382
|
case 8:
|
|
28218
|
-
actArticle = articles[key];
|
|
28219
|
-
_context8.next = 11;
|
|
28220
|
-
return this.updateCfgValues(actArticle, {}, {});
|
|
28221
|
-
case 11:
|
|
28222
|
-
_context8.next = 2;
|
|
28223
|
-
break;
|
|
28224
|
-
case 13:
|
|
28225
28383
|
case "end":
|
|
28226
28384
|
return _context8.stop();
|
|
28227
28385
|
}
|
|
28228
28386
|
}, _callee7, this);
|
|
28229
28387
|
}));
|
|
28230
|
-
function
|
|
28231
|
-
return
|
|
28388
|
+
function updateEmptyOption(_x21) {
|
|
28389
|
+
return _updateEmptyOption.apply(this, arguments);
|
|
28232
28390
|
}
|
|
28233
|
-
return
|
|
28391
|
+
return updateEmptyOption;
|
|
28234
28392
|
}()
|
|
28235
28393
|
}, {
|
|
28236
28394
|
key: "updateAccessoriesFromGlobalOption",
|
|
@@ -28259,7 +28417,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28259
28417
|
}
|
|
28260
28418
|
}, _callee8, this);
|
|
28261
28419
|
}));
|
|
28262
|
-
function updateAccessoriesFromGlobalOption(
|
|
28420
|
+
function updateAccessoriesFromGlobalOption(_x22, _x23) {
|
|
28263
28421
|
return _updateAccessoriesFromGlobalOption.apply(this, arguments);
|
|
28264
28422
|
}
|
|
28265
28423
|
return updateAccessoriesFromGlobalOption;
|
|
@@ -28497,12 +28655,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28497
28655
|
_iterator3.f();
|
|
28498
28656
|
return _context11.finish(30);
|
|
28499
28657
|
case 33:
|
|
28658
|
+
if (article.plannerData) article.plannerData.varaintValuesInfluencingAVLAVRFilter = article.getVariantValuesInfluencingAVLAVRFilter();
|
|
28659
|
+
case 34:
|
|
28500
28660
|
case "end":
|
|
28501
28661
|
return _context11.stop();
|
|
28502
28662
|
}
|
|
28503
28663
|
}, _callee9, null, [[12, 27, 30, 33]]);
|
|
28504
28664
|
}));
|
|
28505
|
-
function initCfgValues(
|
|
28665
|
+
function initCfgValues(_x24, _x25, _x26) {
|
|
28506
28666
|
return _initCfgValues.apply(this, arguments);
|
|
28507
28667
|
}
|
|
28508
28668
|
return initCfgValues;
|
|
@@ -28522,7 +28682,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28522
28682
|
}
|
|
28523
28683
|
}, _callee10, this);
|
|
28524
28684
|
}));
|
|
28525
|
-
function setValidVariantValues(
|
|
28685
|
+
function setValidVariantValues(_x27) {
|
|
28526
28686
|
return _setValidVariantValues.apply(this, arguments);
|
|
28527
28687
|
}
|
|
28528
28688
|
return setValidVariantValues;
|
|
@@ -28608,7 +28768,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28608
28768
|
}
|
|
28609
28769
|
}, _callee11, this);
|
|
28610
28770
|
}));
|
|
28611
|
-
function updateCfgValues(
|
|
28771
|
+
function updateCfgValues(_x28, _x29, _x30, _x31, _x32, _x33) {
|
|
28612
28772
|
return _updateCfgValues.apply(this, arguments);
|
|
28613
28773
|
}
|
|
28614
28774
|
return updateCfgValues;
|
|
@@ -28665,7 +28825,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28665
28825
|
}
|
|
28666
28826
|
}, _callee12, this);
|
|
28667
28827
|
}));
|
|
28668
|
-
function updateLastElement(
|
|
28828
|
+
function updateLastElement(_x34) {
|
|
28669
28829
|
return _updateLastElement.apply(this, arguments);
|
|
28670
28830
|
}
|
|
28671
28831
|
return updateLastElement;
|
|
@@ -28707,7 +28867,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28707
28867
|
}
|
|
28708
28868
|
}, _callee13);
|
|
28709
28869
|
}));
|
|
28710
|
-
function updateOption(
|
|
28870
|
+
function updateOption(_x35, _x36, _x37, _x38) {
|
|
28711
28871
|
return _updateOption.apply(this, arguments);
|
|
28712
28872
|
}
|
|
28713
28873
|
return updateOption;
|
|
@@ -28749,7 +28909,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28749
28909
|
}
|
|
28750
28910
|
}, _callee14, this);
|
|
28751
28911
|
}));
|
|
28752
|
-
function evalAndLoadPartlistArticles(
|
|
28912
|
+
function evalAndLoadPartlistArticles(_x39, _x40, _x41) {
|
|
28753
28913
|
return _evalAndLoadPartlistArticles.apply(this, arguments);
|
|
28754
28914
|
}
|
|
28755
28915
|
return evalAndLoadPartlistArticles;
|
|
@@ -28788,7 +28948,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28788
28948
|
}
|
|
28789
28949
|
}, _callee15, this);
|
|
28790
28950
|
}));
|
|
28791
|
-
function loadPartlistArticles(
|
|
28951
|
+
function loadPartlistArticles(_x42, _x43, _x44) {
|
|
28792
28952
|
return _loadPartlistArticles.apply(this, arguments);
|
|
28793
28953
|
}
|
|
28794
28954
|
return loadPartlistArticles;
|
|
@@ -28798,7 +28958,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28798
28958
|
key: "loadPartlistArticle",
|
|
28799
28959
|
value: function () {
|
|
28800
28960
|
var _loadPartlistArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doLoadItem, article, newConfigValues) {
|
|
28801
|
-
var nArticle;
|
|
28961
|
+
var nArticle, _doLoadItem$VariantVa;
|
|
28802
28962
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context18) {
|
|
28803
28963
|
while (1) switch (_context18.prev = _context18.next) {
|
|
28804
28964
|
case 0:
|
|
@@ -28812,7 +28972,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28812
28972
|
}
|
|
28813
28973
|
doLoadItem.BasketID = nArticle.basketId;
|
|
28814
28974
|
_context18.next = 7;
|
|
28815
|
-
return this.toDoAfterArticleLoaded(nArticle, {},
|
|
28975
|
+
return this.toDoAfterArticleLoaded(nArticle, {}, nArticle.variantValuesForPla(nArticle.partlistArticleStandalone, (_doLoadItem$VariantVa = doLoadItem.VariantValues) !== null && _doLoadItem$VariantVa !== void 0 ? _doLoadItem$VariantVa : {}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
28816
28976
|
case 7:
|
|
28817
28977
|
article.addPartlistArticle(nArticle);
|
|
28818
28978
|
case 8:
|
|
@@ -28821,7 +28981,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28821
28981
|
}
|
|
28822
28982
|
}, _callee16, this);
|
|
28823
28983
|
}));
|
|
28824
|
-
function loadPartlistArticle(
|
|
28984
|
+
function loadPartlistArticle(_x45, _x46, _x47) {
|
|
28825
28985
|
return _loadPartlistArticle.apply(this, arguments);
|
|
28826
28986
|
}
|
|
28827
28987
|
return loadPartlistArticle;
|
|
@@ -28851,6 +29011,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28851
29011
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
28852
29012
|
initDecisions: doLoadItem.initDecisions,
|
|
28853
29013
|
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
29014
|
+
partlistArticleStandalone: doLoadItem.ConfigurationMode,
|
|
28854
29015
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
28855
29016
|
optionImgForPrint: doLoadItem.optionImgForPrint,
|
|
28856
29017
|
catalogCodex: doLoadItem.CatalogCodex
|
|
@@ -28982,7 +29143,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28982
29143
|
}
|
|
28983
29144
|
}, _callee17, this);
|
|
28984
29145
|
}));
|
|
28985
|
-
function evalOpvsOnOpvsConstructionRules(
|
|
29146
|
+
function evalOpvsOnOpvsConstructionRules(_x48) {
|
|
28986
29147
|
return _evalOpvsOnOpvsConstructionRules.apply(this, arguments);
|
|
28987
29148
|
}
|
|
28988
29149
|
return evalOpvsOnOpvsConstructionRules;
|
|
@@ -29185,7 +29346,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29185
29346
|
}
|
|
29186
29347
|
}, _callee18);
|
|
29187
29348
|
}));
|
|
29188
|
-
function triggerShelfplannerVisibility(
|
|
29349
|
+
function triggerShelfplannerVisibility(_x49, _x50) {
|
|
29189
29350
|
return _triggerShelfplannerVisibility.apply(this, arguments);
|
|
29190
29351
|
}
|
|
29191
29352
|
return triggerShelfplannerVisibility;
|
|
@@ -29262,7 +29423,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29262
29423
|
IsPartlistArticle: article.isPartListArticle,
|
|
29263
29424
|
IsPlannerElement: article.hasCatalogPlannerArticle,
|
|
29264
29425
|
HasPartlistArticle: article.hasPartlistArticle,
|
|
29265
|
-
PartlistArticleInvisibility: !article.partlistArticleVisibleInTree && !article.optionsForPrint,
|
|
29426
|
+
PartlistArticleInvisibility: !article.partlistArticleVisibleInTree && !article.optionsForPrint && !article.partlistArticleStandalone,
|
|
29266
29427
|
SendToSAP: article.sendToSap,
|
|
29267
29428
|
ShelfPlandata: article.shelfPlanner ? DivaUtils__default["default"].encodeBasketJson((_article$shelfPlanner3 = (_article$shelfPlanner4 = article.shelfPlanner) === null || _article$shelfPlanner4 === void 0 ? void 0 : _article$shelfPlanner4.generateShelfPlandata()) !== null && _article$shelfPlanner3 !== void 0 ? _article$shelfPlanner3 : (_article$doorPlanner = article.doorPlanner) === null || _article$doorPlanner === void 0 ? void 0 : _article$doorPlanner.getMovedData(article.basketId)) : undefined,
|
|
29268
29429
|
MetaData: !hasFavorites ? article.MetaData : undefined,
|
|
@@ -29509,7 +29670,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29509
29670
|
}
|
|
29510
29671
|
}, _callee19, this);
|
|
29511
29672
|
}));
|
|
29512
|
-
function correctPartlistArticlesByGlobalRules(
|
|
29673
|
+
function correctPartlistArticlesByGlobalRules(_x51, _x52, _x53, _x54) {
|
|
29513
29674
|
return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
|
|
29514
29675
|
}
|
|
29515
29676
|
return correctPartlistArticlesByGlobalRules;
|
|
@@ -30172,7 +30333,7 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
30172
30333
|
var myOption = myTabGroup.options[lKey];
|
|
30173
30334
|
if (myOption.idmVariantType) {
|
|
30174
30335
|
var _catalog$getOption;
|
|
30175
|
-
var opgPairs = [[2, 3], [4, 5], [6, 7], [11, 12]
|
|
30336
|
+
var opgPairs = [[2, 3], [4, 5], [6, 7], [11, 12]];
|
|
30176
30337
|
for (var i = 0; i < opgPairs.length; i++) {
|
|
30177
30338
|
var optionStep = this.getOptionWhereIDMVariantIs(iKey, opgPairs[i][1]);
|
|
30178
30339
|
if (myOption.idmVariantType == opgPairs[i][0] && optionStep && !optionStep.mergesToOPG) {
|
|
@@ -30427,6 +30588,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
30427
30588
|
_defineProperty__default["default"](this, "matchingOrigProduct", void 0);
|
|
30428
30589
|
_defineProperty__default["default"](this, "_supplierColors", void 0);
|
|
30429
30590
|
_defineProperty__default["default"](this, "_logDecisions", false);
|
|
30591
|
+
_defineProperty__default["default"](this, "_logTotalStateForVariants", false);
|
|
30430
30592
|
/**Favorits state */
|
|
30431
30593
|
_defineProperty__default["default"](this, "_handlelingCurrentFavorites", false);
|
|
30432
30594
|
_defineProperty__default["default"](this, "_favorites", {
|
|
@@ -31700,7 +31862,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31700
31862
|
break;
|
|
31701
31863
|
}
|
|
31702
31864
|
_context5.next = 3;
|
|
31703
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
31865
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-17cec7e7.js'); });
|
|
31704
31866
|
case 3:
|
|
31705
31867
|
_yield$import = _context5.sent;
|
|
31706
31868
|
DoorPlanner = _yield$import["default"];
|
|
@@ -31867,6 +32029,14 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31867
32029
|
set: function set(val) {
|
|
31868
32030
|
this._logDecisions = val;
|
|
31869
32031
|
}
|
|
32032
|
+
}, {
|
|
32033
|
+
key: "logTotalStateForVariants",
|
|
32034
|
+
get: function get() {
|
|
32035
|
+
return this._logTotalStateForVariants;
|
|
32036
|
+
},
|
|
32037
|
+
set: function set(val) {
|
|
32038
|
+
this._logTotalStateForVariants = val;
|
|
32039
|
+
}
|
|
31870
32040
|
}, {
|
|
31871
32041
|
key: "showAccessioreOnLastTab",
|
|
31872
32042
|
get: function get() {
|
|
@@ -31884,6 +32054,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31884
32054
|
var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
|
|
31885
32055
|
clonedSet.setData = _objectSpread$c({}, this.setData);
|
|
31886
32056
|
clonedSet.configSingle = this.configSingle;
|
|
32057
|
+
clonedSet.logTotalStateForVariants = this.logTotalStateForVariants;
|
|
31887
32058
|
var articles = this.getDivaArticles();
|
|
31888
32059
|
//if boxplanner needs to be working, the planner needs to be cloned too
|
|
31889
32060
|
//this.setState.plannerHandler = this.setState.plannerHandler.clonePlannerHandler(clonedSet, this);
|
|
@@ -33665,7 +33836,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
33665
33836
|
}
|
|
33666
33837
|
configStepKey = configStepKey + '_' + 'acc' + (set.CatalogData.forceConfigAllAccessoires ? article.articleCodex : basketId);
|
|
33667
33838
|
}
|
|
33668
|
-
var plaBasketIds = Object.keys(articles[basketId].getRecursivePartlistArticles(true));
|
|
33839
|
+
var plaBasketIds = Object.keys(articles[basketId].getRecursivePartlistArticles(true, true));
|
|
33669
33840
|
var singleOPVOnly = ops.visibleCount == 1 && !ops.isFreeText && !set.CatalogData.dontHideOption.includes(ops.option.codex) && !((_set$ViewConfig3 = set.ViewConfig) !== null && _set$ViewConfig3 !== void 0 && _set$ViewConfig3.showSingleOPVOnly);
|
|
33670
33841
|
var isAccessoire = !!article.relatedToBasketId ? article.articleCodex : false;
|
|
33671
33842
|
if (!configTree.getTabGroupByCodex(tabGroupCodex)) {
|
|
@@ -34091,7 +34262,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34091
34262
|
notTotallyMatichingOPVs = false,
|
|
34092
34263
|
myOptionState = undefined;
|
|
34093
34264
|
for (var i = 0; i < configStep.targetArticles.length; i++) {
|
|
34094
|
-
var _myOptionState;
|
|
34265
|
+
var _myOptionState, _myOptionState$idmVar;
|
|
34095
34266
|
var article = articles[configStep.targetArticles[i]];
|
|
34096
34267
|
myOptionState = article.getArticleOptionState(configStep.option);
|
|
34097
34268
|
if (!myOptionState) throw new Error('myOptionState ' + configStep.option + ' is undefined');
|
|
@@ -34103,7 +34274,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34103
34274
|
if (myOptionState.isFreeText && myOptionState.freeTextLang) {
|
|
34104
34275
|
freeTextLang = myOptionState.freeTextLang;
|
|
34105
34276
|
}
|
|
34106
|
-
if (myOptionState.headerPosVariationType == 'V' || myOptionState.idmVariantenArt
|
|
34277
|
+
if (myOptionState.headerPosVariationType == 'V' || [35, 1035].includes((_myOptionState$idmVar = myOptionState.idmVariantenArt) !== null && _myOptionState$idmVar !== void 0 ? _myOptionState$idmVar : 0)) {
|
|
34107
34278
|
// 35 is the seatingheight. Articles should not be albe to have different seatheight
|
|
34108
34279
|
//get schnittmenge of all the articles
|
|
34109
34280
|
if (i === 0) {
|
|
@@ -36180,7 +36351,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36180
36351
|
var _article$partListPare, _article$partListPare2;
|
|
36181
36352
|
return group.includes((_article$partListPare = (_article$partListPare2 = article.partListParentArticle) === null || _article$partListPare2 === void 0 ? void 0 : _article$partListPare2.basketId) !== null && _article$partListPare !== void 0 ? _article$partListPare : '');
|
|
36182
36353
|
});
|
|
36183
|
-
if (group) {
|
|
36354
|
+
if (group && !article.partlistArticleStandalone) {
|
|
36184
36355
|
group.push(article.basketId);
|
|
36185
36356
|
} else {
|
|
36186
36357
|
groupedArticles.push([article.basketId]);
|
|
@@ -36297,16 +36468,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36297
36468
|
case 2:
|
|
36298
36469
|
opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
|
|
36299
36470
|
previewType = set.api.pricePreview;
|
|
36300
|
-
if (!(!opt ||
|
|
36471
|
+
if (!(!opt || opt.mergeIDMToOPG || configItems[0].isOPVG || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR'))) {
|
|
36301
36472
|
_context26.next = 6;
|
|
36302
36473
|
break;
|
|
36303
36474
|
}
|
|
36304
36475
|
return _context26.abrupt("return", configItems);
|
|
36305
36476
|
case 6:
|
|
36477
|
+
if (!(!previewType || previewType == 'off' || configItems.length == 1 || opt.isDescribingState || configItems.length > 300 && !configItems[0].groupName || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)))) {
|
|
36478
|
+
_context26.next = 9;
|
|
36479
|
+
break;
|
|
36480
|
+
}
|
|
36481
|
+
if (set.logTotalStateForVariants) {
|
|
36482
|
+
_context26.next = 9;
|
|
36483
|
+
break;
|
|
36484
|
+
}
|
|
36485
|
+
return _context26.abrupt("return", configItems);
|
|
36486
|
+
case 9:
|
|
36306
36487
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
36307
|
-
_context26.next =
|
|
36488
|
+
_context26.next = 12;
|
|
36308
36489
|
return this.calcVariants(set, configItems, targetArticles, opt.codex);
|
|
36309
|
-
case
|
|
36490
|
+
case 12:
|
|
36310
36491
|
variants = _context26.sent;
|
|
36311
36492
|
if (previewType) {
|
|
36312
36493
|
configItems.map(function (c, index) {
|
|
@@ -36317,7 +36498,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36317
36498
|
});
|
|
36318
36499
|
}
|
|
36319
36500
|
return _context26.abrupt("return", configItems);
|
|
36320
|
-
case
|
|
36501
|
+
case 15:
|
|
36321
36502
|
case "end":
|
|
36322
36503
|
return _context26.stop();
|
|
36323
36504
|
}
|
|
@@ -36338,7 +36519,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36338
36519
|
case 0:
|
|
36339
36520
|
variantInfo = [];
|
|
36340
36521
|
set = realSet.cloneSet();
|
|
36341
|
-
articles = set.getDivaArticles();
|
|
36522
|
+
articles = set.getDivaArticles(true);
|
|
36342
36523
|
origPrice = set.getSetPrice();
|
|
36343
36524
|
articleConfigs = {};
|
|
36344
36525
|
for (i = 0; i < targetArticles.length; i++) {
|
|
@@ -36445,7 +36626,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36445
36626
|
}
|
|
36446
36627
|
hash = DivaUtils.md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray__default["default"](Object.values(totalConfig)))));
|
|
36447
36628
|
dataHash = set.CatalogData.getVariantsPriceByHash(hash);
|
|
36448
|
-
if (!dataHash) {
|
|
36629
|
+
if (!(dataHash && (!set.logTotalStateForVariants || dataHash.articleSnapshot))) {
|
|
36449
36630
|
_context28.next = 21;
|
|
36450
36631
|
break;
|
|
36451
36632
|
}
|
|
@@ -36480,7 +36661,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36480
36661
|
calcTime: calcTime,
|
|
36481
36662
|
firstPrice: firstPrice,
|
|
36482
36663
|
variantValues: hashVariantValues,
|
|
36483
|
-
hashObj: [].concat(hashVariantValues, _toConsumableArray__default["default"](Object.values(totalConfig)))
|
|
36664
|
+
hashObj: [].concat(hashVariantValues, _toConsumableArray__default["default"](Object.values(totalConfig))),
|
|
36665
|
+
articleSnapshot: set.logTotalStateForVariants ? set.cloneSet().getDivaArticles() : undefined
|
|
36484
36666
|
};
|
|
36485
36667
|
set.CatalogData.setVariantsPriceByHash(hash, priceObj);
|
|
36486
36668
|
return _context28.abrupt("return", priceObj);
|
|
@@ -37549,7 +37731,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37549
37731
|
this.plannerConfig = plannerConfig;
|
|
37550
37732
|
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
37551
37733
|
this._handler = plannerConfig.handler;
|
|
37552
|
-
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex
|
|
37734
|
+
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex === undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.viewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.viewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
|
|
37553
37735
|
LOG$8.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
|
|
37554
37736
|
code: 'WC_0003'
|
|
37555
37737
|
}));
|
|
@@ -37676,7 +37858,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37676
37858
|
case 22:
|
|
37677
37859
|
this.baskets[this.divaNr] = this.plannerConfig.basketData;
|
|
37678
37860
|
if (!this.baskets[this.divaNr].CustomerJourneyId) this.baskets[this.divaNr].CustomerJourneyId = DivaUtils.nanoid();
|
|
37679
|
-
if (this.actBasket.OrigCatalogCodex) {
|
|
37861
|
+
if (this.actBasket.OrigCatalogCodex !== undefined) {
|
|
37680
37862
|
this.origConfiguration.originCatalogCodex = this.actBasket.OrigCatalogCodex;
|
|
37681
37863
|
this.origConfiguration.originArticleCodexes = this.actBasket.OrigArticleCodexes;
|
|
37682
37864
|
} else if (this.actBasket.OrigDivaNr) {
|
|
@@ -37687,7 +37869,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37687
37869
|
this.hasConfiguratorSessionId = true;
|
|
37688
37870
|
returnSuccessfully = true;
|
|
37689
37871
|
case 29:
|
|
37690
|
-
if (!this.plannerConfig.catalogCodex) {
|
|
37872
|
+
if (!(this.plannerConfig.catalogCodex !== undefined)) {
|
|
37691
37873
|
_context.next = 33;
|
|
37692
37874
|
break;
|
|
37693
37875
|
}
|
|
@@ -37982,7 +38164,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37982
38164
|
LOG$8.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
37983
38165
|
if (basketFromAPI.OrigDivaNr) {
|
|
37984
38166
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
37985
|
-
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
38167
|
+
} else if (basketFromAPI.OrigCatalogCodex !== undefined) {
|
|
37986
38168
|
this.origConfiguration.originCatalogCodex = basketFromAPI.OrigCatalogCodex;
|
|
37987
38169
|
this.origConfiguration.originArticleCodexes = basketFromAPI.OrigArticleCodexes;
|
|
37988
38170
|
} else {
|
|
@@ -38352,7 +38534,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38352
38534
|
}, {
|
|
38353
38535
|
key: "fillOrigConfigurations",
|
|
38354
38536
|
value: function fillOrigConfigurations() {
|
|
38355
|
-
if (this.origConfiguration.originCatalogCodex) {
|
|
38537
|
+
if (this.origConfiguration.originCatalogCodex !== undefined) {
|
|
38356
38538
|
this.actBasket.OrigCatalogCodex = this.origConfiguration.originCatalogCodex;
|
|
38357
38539
|
this.actBasket.OrigArticleCodexes = this.origConfiguration.originArticleCodexes;
|
|
38358
38540
|
this.actBasket.OrigDivaNr = undefined;
|
|
@@ -38398,7 +38580,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38398
38580
|
_context11.next = 19;
|
|
38399
38581
|
break;
|
|
38400
38582
|
case 17:
|
|
38401
|
-
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
38583
|
+
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE' || response === 'ERROR_NO_BASKET_SAVED_ENTITY_EXISTS')) {
|
|
38402
38584
|
_context11.next = 19;
|
|
38403
38585
|
break;
|
|
38404
38586
|
}
|
|
@@ -38555,7 +38737,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38555
38737
|
break;
|
|
38556
38738
|
case 3:
|
|
38557
38739
|
_context12.next = 5;
|
|
38558
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
38740
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-6f5672b9.js'); });
|
|
38559
38741
|
case 5:
|
|
38560
38742
|
_yield$import = _context12.sent;
|
|
38561
38743
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -38563,7 +38745,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38563
38745
|
return _context12.abrupt("break", 27);
|
|
38564
38746
|
case 9:
|
|
38565
38747
|
_context12.next = 11;
|
|
38566
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
38748
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-e1f87ae3.js'); });
|
|
38567
38749
|
case 11:
|
|
38568
38750
|
_yield$import2 = _context12.sent;
|
|
38569
38751
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -38571,7 +38753,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38571
38753
|
return _context12.abrupt("break", 27);
|
|
38572
38754
|
case 15:
|
|
38573
38755
|
_context12.next = 17;
|
|
38574
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
38756
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d3864f70.js'); });
|
|
38575
38757
|
case 17:
|
|
38576
38758
|
_yield$import3 = _context12.sent;
|
|
38577
38759
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -38579,7 +38761,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38579
38761
|
return _context12.abrupt("break", 27);
|
|
38580
38762
|
case 21:
|
|
38581
38763
|
_context12.next = 23;
|
|
38582
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
38764
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-db6b5fca.js'); });
|
|
38583
38765
|
case 23:
|
|
38584
38766
|
_yield$import4 = _context12.sent;
|
|
38585
38767
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -40007,7 +40189,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
40007
40189
|
while (1) switch (_context3.prev = _context3.next) {
|
|
40008
40190
|
case 0:
|
|
40009
40191
|
_context3.next = 2;
|
|
40010
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
40192
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-77d09d15.js'); });
|
|
40011
40193
|
case 2:
|
|
40012
40194
|
_yield$import = _context3.sent;
|
|
40013
40195
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -41564,7 +41746,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41564
41746
|
break;
|
|
41565
41747
|
case 8:
|
|
41566
41748
|
_context4.next = 10;
|
|
41567
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
41749
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-32079554.js'); });
|
|
41568
41750
|
case 10:
|
|
41569
41751
|
_yield$import = _context4.sent;
|
|
41570
41752
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -41575,7 +41757,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41575
41757
|
return _context4.abrupt("break", 21);
|
|
41576
41758
|
case 15:
|
|
41577
41759
|
_context4.next = 17;
|
|
41578
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
41760
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-34742921.js'); });
|
|
41579
41761
|
case 17:
|
|
41580
41762
|
_yield$import2 = _context4.sent;
|
|
41581
41763
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -43622,9 +43804,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
43622
43804
|
}
|
|
43623
43805
|
}, {
|
|
43624
43806
|
key: "getDivaArticles",
|
|
43625
|
-
value: function getDivaArticles() {
|
|
43807
|
+
value: function getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso) {
|
|
43626
43808
|
var _this$actSet3;
|
|
43627
|
-
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
43809
|
+
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso);
|
|
43628
43810
|
}
|
|
43629
43811
|
|
|
43630
43812
|
//for debugging
|
|
@@ -44555,11 +44737,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44555
44737
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
44556
44738
|
actBasket.Updated = Date.now();
|
|
44557
44739
|
if (!returnTo) {
|
|
44558
|
-
_context27.next =
|
|
44740
|
+
_context27.next = 52;
|
|
44559
44741
|
break;
|
|
44560
44742
|
}
|
|
44561
44743
|
_context27.t3 = returnTo;
|
|
44562
|
-
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 30 : _context27.t3 === 'OPEN_PDF' ?
|
|
44744
|
+
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 30 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
44563
44745
|
break;
|
|
44564
44746
|
case 27:
|
|
44565
44747
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.toggleLoading('buildScene', false, false);
|
|
@@ -44573,8 +44755,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44573
44755
|
basketData: actBasket
|
|
44574
44756
|
}
|
|
44575
44757
|
});
|
|
44576
|
-
return _context27.abrupt("break",
|
|
44758
|
+
return _context27.abrupt("break", 52);
|
|
44577
44759
|
case 30:
|
|
44760
|
+
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
44761
|
+
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
44762
|
+
}
|
|
44578
44763
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
|
|
44579
44764
|
type: 'SELLER',
|
|
44580
44765
|
parameters: {
|
|
@@ -44585,51 +44770,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44585
44770
|
basketData: actBasket
|
|
44586
44771
|
}
|
|
44587
44772
|
});
|
|
44588
|
-
return _context27.abrupt("break",
|
|
44589
|
-
case
|
|
44773
|
+
return _context27.abrupt("break", 52);
|
|
44774
|
+
case 33:
|
|
44590
44775
|
if (!(event == 'onSaveProduct')) {
|
|
44591
|
-
_context27.next =
|
|
44776
|
+
_context27.next = 43;
|
|
44592
44777
|
break;
|
|
44593
44778
|
}
|
|
44594
44779
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
44595
44780
|
actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
44596
|
-
_context27.next =
|
|
44781
|
+
_context27.next = 37;
|
|
44597
44782
|
return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
44598
|
-
case
|
|
44599
|
-
_context27.next =
|
|
44783
|
+
case 37:
|
|
44784
|
+
_context27.next = 39;
|
|
44600
44785
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
44601
|
-
case
|
|
44786
|
+
case 39:
|
|
44602
44787
|
newDivaNr = _context27.sent;
|
|
44603
44788
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
44604
|
-
_context27.next =
|
|
44789
|
+
_context27.next = 51;
|
|
44605
44790
|
break;
|
|
44606
|
-
case
|
|
44791
|
+
case 43:
|
|
44607
44792
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
44608
44793
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = undefined;
|
|
44609
44794
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
44610
44795
|
}
|
|
44611
44796
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
44612
44797
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
44613
|
-
_context27.next =
|
|
44798
|
+
_context27.next = 48;
|
|
44614
44799
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
44615
|
-
case
|
|
44800
|
+
case 48:
|
|
44616
44801
|
_result2 = _context27.sent;
|
|
44617
44802
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
44618
|
-
_context27.next =
|
|
44803
|
+
_context27.next = 51;
|
|
44619
44804
|
break;
|
|
44620
44805
|
}
|
|
44621
44806
|
return _context27.abrupt("return", 'canceled');
|
|
44622
|
-
case 50:
|
|
44623
|
-
return _context27.abrupt("break", 51);
|
|
44624
44807
|
case 51:
|
|
44808
|
+
return _context27.abrupt("break", 52);
|
|
44809
|
+
case 52:
|
|
44625
44810
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
44626
44811
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
44627
|
-
_context27.next =
|
|
44812
|
+
_context27.next = 56;
|
|
44628
44813
|
return this.addToBasket(actBasket, event);
|
|
44629
|
-
case
|
|
44814
|
+
case 56:
|
|
44630
44815
|
product = _context27.sent;
|
|
44631
44816
|
return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
44632
|
-
case
|
|
44817
|
+
case 58:
|
|
44633
44818
|
case "end":
|
|
44634
44819
|
return _context27.stop();
|
|
44635
44820
|
}
|
|
@@ -44679,7 +44864,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44679
44864
|
//if planner is hidden by config but nothing is planned initially
|
|
44680
44865
|
if (plannerType === 'NONE') {
|
|
44681
44866
|
var _this$plannerConfig$a8, _this$actSet11;
|
|
44682
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a8 !== void 0 && _this$plannerConfig$a8.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet11 = this.actSet()) !== null && _this$actSet11 !== void 0 && (_this$actSet11 = _this$actSet11.CatalogData.startPlannerArticle) !== null && _this$actSet11 !== void 0 && _this$actSet11.length)) {
|
|
44867
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex !== undefined && !((_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a8 !== void 0 && _this$plannerConfig$a8.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet11 = this.actSet()) !== null && _this$actSet11 !== void 0 && (_this$actSet11 = _this$actSet11.CatalogData.startPlannerArticle) !== null && _this$actSet11 !== void 0 && _this$actSet11.length)) {
|
|
44683
44868
|
plannerType = 'PLANNER';
|
|
44684
44869
|
}
|
|
44685
44870
|
}
|
|
@@ -44954,39 +45139,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44954
45139
|
case 0:
|
|
44955
45140
|
event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
|
|
44956
45141
|
_context29.t0 = event;
|
|
44957
|
-
_context29.next = _context29.t0 === 'onWebPlanerPrint' ?
|
|
45142
|
+
_context29.next = _context29.t0 === 'onWebPlanerPrint' ? 4 : _context29.t0 === 'onWebPlanerSave' ? 6 : _context29.t0 === 'onWebPlanerShare' ? 8 : _context29.t0 === 'onRequestConsulation' ? 10 : _context29.t0 === 'onSave' ? 12 : _context29.t0 === 'onSendEmail' ? 14 : _context29.t0 === 'onSaveProduct' ? 19 : _context29.t0 === 'dontSaveBasket' ? 26 : _context29.t0 === 'onAddToBasket' ? 26 : _context29.t0 === 'onSendContactForm' ? 28 : 31;
|
|
44958
45143
|
break;
|
|
44959
|
-
case
|
|
45144
|
+
case 4:
|
|
44960
45145
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
44961
45146
|
type: 'onWebPlanerPrint',
|
|
44962
45147
|
data: actBasket.getAsJson()
|
|
44963
45148
|
});
|
|
44964
|
-
return _context29.abrupt("break",
|
|
44965
|
-
case
|
|
45149
|
+
return _context29.abrupt("break", 33);
|
|
45150
|
+
case 6:
|
|
44966
45151
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
44967
45152
|
type: 'onWebPlanerSave',
|
|
44968
45153
|
data: actBasket.getAsJson()
|
|
44969
45154
|
});
|
|
44970
|
-
return _context29.abrupt("break",
|
|
44971
|
-
case
|
|
45155
|
+
return _context29.abrupt("break", 33);
|
|
45156
|
+
case 8:
|
|
44972
45157
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
44973
45158
|
type: 'onWebPlanerShare',
|
|
44974
45159
|
data: actBasket.getAsJson()
|
|
44975
45160
|
});
|
|
44976
|
-
return _context29.abrupt("break",
|
|
44977
|
-
case
|
|
45161
|
+
return _context29.abrupt("break", 33);
|
|
45162
|
+
case 10:
|
|
44978
45163
|
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
44979
45164
|
type: 'onRequestConsulation',
|
|
44980
45165
|
data: actBasket.getAsJson()
|
|
44981
45166
|
});
|
|
44982
|
-
return _context29.abrupt("break",
|
|
44983
|
-
case
|
|
45167
|
+
return _context29.abrupt("break", 33);
|
|
45168
|
+
case 12:
|
|
44984
45169
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
44985
45170
|
type: 'onSave',
|
|
44986
45171
|
data: actBasket.getAsJson()
|
|
44987
45172
|
});
|
|
44988
|
-
return _context29.abrupt("break",
|
|
44989
|
-
case
|
|
45173
|
+
return _context29.abrupt("break", 33);
|
|
45174
|
+
case 14:
|
|
44990
45175
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
44991
45176
|
this.divaBasketHandler.emailConfig = undefined;
|
|
44992
45177
|
if (emailConfig) {
|
|
@@ -45020,45 +45205,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45020
45205
|
type: 'onAddToBasket',
|
|
45021
45206
|
data: actBasket.getAsJson()
|
|
45022
45207
|
});
|
|
45023
|
-
return _context29.abrupt("break",
|
|
45024
|
-
case
|
|
45208
|
+
return _context29.abrupt("break", 33);
|
|
45209
|
+
case 19:
|
|
45025
45210
|
this.actSet().CatalogData;
|
|
45026
|
-
_context29.next =
|
|
45211
|
+
_context29.next = 22;
|
|
45027
45212
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
45028
|
-
case
|
|
45213
|
+
case 22:
|
|
45029
45214
|
products = _context29.sent;
|
|
45030
45215
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
45031
45216
|
type: 'onAddToBasket',
|
|
45032
45217
|
data: actBasket.getAsJson()
|
|
45033
45218
|
});
|
|
45034
45219
|
if (!products) {
|
|
45035
|
-
_context29.next =
|
|
45220
|
+
_context29.next = 26;
|
|
45036
45221
|
break;
|
|
45037
45222
|
}
|
|
45038
45223
|
return _context29.abrupt("return", products[0]);
|
|
45039
|
-
case
|
|
45040
|
-
case 28:
|
|
45224
|
+
case 26:
|
|
45041
45225
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
45042
45226
|
type: 'onAddToBasket',
|
|
45043
45227
|
data: actBasket.getAsJson()
|
|
45044
45228
|
});
|
|
45045
|
-
return _context29.abrupt("break",
|
|
45046
|
-
case
|
|
45229
|
+
return _context29.abrupt("break", 33);
|
|
45230
|
+
case 28:
|
|
45047
45231
|
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
|
|
45048
45232
|
type: 'onAddToBasket',
|
|
45049
45233
|
data: actBasket.getAsJson()
|
|
45050
45234
|
});
|
|
45051
45235
|
this.openContactForm(this.divaBasketHandler);
|
|
45052
|
-
return _context29.abrupt("break",
|
|
45053
|
-
case
|
|
45236
|
+
return _context29.abrupt("break", 33);
|
|
45237
|
+
case 31:
|
|
45054
45238
|
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
|
|
45055
45239
|
type: event,
|
|
45056
45240
|
data: actBasket.getAsJson()
|
|
45057
45241
|
});
|
|
45058
|
-
return _context29.abrupt("break",
|
|
45059
|
-
case
|
|
45242
|
+
return _context29.abrupt("break", 33);
|
|
45243
|
+
case 33:
|
|
45060
45244
|
return _context29.abrupt("return");
|
|
45061
|
-
case
|
|
45245
|
+
case 34:
|
|
45062
45246
|
case "end":
|
|
45063
45247
|
return _context29.stop();
|
|
45064
45248
|
}
|
|
@@ -45116,7 +45300,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45116
45300
|
(_this$api = this.api) === null || _this$api === void 0 || _this$api.clearCache();
|
|
45117
45301
|
this.divaCatalogs = {};
|
|
45118
45302
|
}
|
|
45119
|
-
|
|
45303
|
+
}, {
|
|
45304
|
+
key: "getCurrentBasket",
|
|
45305
|
+
value: function () {
|
|
45306
|
+
var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(event, force, returnTo, dontGoToSummary) {
|
|
45307
|
+
var _this$actSet33, _this$divaBasketHandl5, _this$onClickAddToBas3;
|
|
45308
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
|
|
45309
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
45310
|
+
case 0:
|
|
45311
|
+
if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet33 = this.actSet()) === null || _this$actSet33 === void 0 ? void 0 : _this$actSet33.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash))) {
|
|
45312
|
+
_context30.next = 2;
|
|
45313
|
+
break;
|
|
45314
|
+
}
|
|
45315
|
+
return _context30.abrupt("return", true);
|
|
45316
|
+
case 2:
|
|
45317
|
+
_context30.next = 4;
|
|
45318
|
+
return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, event, force, returnTo, dontGoToSummary);
|
|
45319
|
+
case 4:
|
|
45320
|
+
return _context30.abrupt("return", !!_context30.sent);
|
|
45321
|
+
case 5:
|
|
45322
|
+
case "end":
|
|
45323
|
+
return _context30.stop();
|
|
45324
|
+
}
|
|
45325
|
+
}, _callee30, this);
|
|
45326
|
+
}));
|
|
45327
|
+
function getCurrentBasket(_x80, _x81, _x82, _x83) {
|
|
45328
|
+
return _getCurrentBasket.apply(this, arguments);
|
|
45329
|
+
}
|
|
45330
|
+
return getCurrentBasket;
|
|
45331
|
+
}()
|
|
45120
45332
|
/*********************************END Functions in Logik called From View END *************************************/
|
|
45121
45333
|
/*********************************** Register Funictions from Logik to View ***************************************/
|
|
45122
45334
|
}, {
|
|
@@ -45339,9 +45551,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45339
45551
|
key: "initApiForLogicOnly",
|
|
45340
45552
|
value: //just for testing purposes
|
|
45341
45553
|
function () {
|
|
45342
|
-
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45343
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45344
|
-
while (1) switch (
|
|
45554
|
+
var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
45555
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
45556
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
45345
45557
|
case 0:
|
|
45346
45558
|
//empty services
|
|
45347
45559
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -45354,17 +45566,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45354
45566
|
jwt: jwt,
|
|
45355
45567
|
apiKey: apiKey
|
|
45356
45568
|
}), handler);
|
|
45357
|
-
|
|
45569
|
+
_context31.next = 3;
|
|
45358
45570
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
45359
45571
|
case 3:
|
|
45360
45572
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
45361
45573
|
case 4:
|
|
45362
45574
|
case "end":
|
|
45363
|
-
return
|
|
45575
|
+
return _context31.stop();
|
|
45364
45576
|
}
|
|
45365
|
-
},
|
|
45577
|
+
}, _callee31, this);
|
|
45366
45578
|
}));
|
|
45367
|
-
function initApiForLogicOnly(
|
|
45579
|
+
function initApiForLogicOnly(_x84, _x85, _x86, _x87, _x88, _x89, _x90) {
|
|
45368
45580
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
45369
45581
|
}
|
|
45370
45582
|
return initApiForLogicOnly;
|
|
@@ -45377,16 +45589,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45377
45589
|
}, {
|
|
45378
45590
|
key: "loadBasket",
|
|
45379
45591
|
value: function () {
|
|
45380
|
-
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45381
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45382
|
-
while (1) switch (
|
|
45592
|
+
var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
|
|
45593
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
|
|
45594
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
45383
45595
|
case 0:
|
|
45384
|
-
return
|
|
45596
|
+
return _context32.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
45385
45597
|
case 1:
|
|
45386
45598
|
case "end":
|
|
45387
|
-
return
|
|
45599
|
+
return _context32.stop();
|
|
45388
45600
|
}
|
|
45389
|
-
},
|
|
45601
|
+
}, _callee32, this);
|
|
45390
45602
|
}));
|
|
45391
45603
|
function loadBasket() {
|
|
45392
45604
|
return _loadBasket.apply(this, arguments);
|
|
@@ -45401,39 +45613,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45401
45613
|
}, {
|
|
45402
45614
|
key: "initBasket",
|
|
45403
45615
|
value: function () {
|
|
45404
|
-
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45616
|
+
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(init3D, ignoreFavorites) {
|
|
45405
45617
|
var initSetState, set, basket;
|
|
45406
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45407
|
-
while (1) switch (
|
|
45618
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
|
|
45619
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
45408
45620
|
case 0:
|
|
45409
45621
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
45410
45622
|
initSetState = this.getInitStateForSet(!init3D);
|
|
45411
45623
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
45412
|
-
|
|
45624
|
+
_context33.next = 5;
|
|
45413
45625
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
45414
45626
|
case 5:
|
|
45415
45627
|
//TODO check if when basket gets repaired the product match gets called
|
|
45416
45628
|
set = this.actSet();
|
|
45417
45629
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
45418
45630
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
45419
|
-
|
|
45631
|
+
_context33.next = 10;
|
|
45420
45632
|
break;
|
|
45421
45633
|
}
|
|
45422
|
-
|
|
45634
|
+
_context33.next = 10;
|
|
45423
45635
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
45424
45636
|
case 10:
|
|
45425
|
-
|
|
45637
|
+
_context33.next = 12;
|
|
45426
45638
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
45427
45639
|
case 12:
|
|
45428
|
-
basket =
|
|
45429
|
-
return
|
|
45640
|
+
basket = _context33.sent;
|
|
45641
|
+
return _context33.abrupt("return", basket);
|
|
45430
45642
|
case 14:
|
|
45431
45643
|
case "end":
|
|
45432
|
-
return
|
|
45644
|
+
return _context33.stop();
|
|
45433
45645
|
}
|
|
45434
|
-
},
|
|
45646
|
+
}, _callee33, this);
|
|
45435
45647
|
}));
|
|
45436
|
-
function initBasket(
|
|
45648
|
+
function initBasket(_x91, _x92) {
|
|
45437
45649
|
return _initBasket.apply(this, arguments);
|
|
45438
45650
|
}
|
|
45439
45651
|
return initBasket;
|
|
@@ -45447,21 +45659,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45447
45659
|
}, {
|
|
45448
45660
|
key: "getValidVariantsLength",
|
|
45449
45661
|
value: function () {
|
|
45450
|
-
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45662
|
+
var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
|
|
45451
45663
|
var set;
|
|
45452
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45453
|
-
while (1) switch (
|
|
45664
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
|
|
45665
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
45454
45666
|
case 0:
|
|
45455
45667
|
set = this.actSet();
|
|
45456
|
-
|
|
45668
|
+
_context34.next = 3;
|
|
45457
45669
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
45458
45670
|
case 3:
|
|
45459
|
-
return
|
|
45671
|
+
return _context34.abrupt("return", _context34.sent.length);
|
|
45460
45672
|
case 4:
|
|
45461
45673
|
case "end":
|
|
45462
|
-
return
|
|
45674
|
+
return _context34.stop();
|
|
45463
45675
|
}
|
|
45464
|
-
},
|
|
45676
|
+
}, _callee34, this);
|
|
45465
45677
|
}));
|
|
45466
45678
|
function getValidVariantsLength() {
|
|
45467
45679
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -45471,46 +45683,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45471
45683
|
}, {
|
|
45472
45684
|
key: "handleFavorites",
|
|
45473
45685
|
value: function () {
|
|
45474
|
-
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45686
|
+
var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(mode) {
|
|
45475
45687
|
var _this5 = this;
|
|
45476
45688
|
var set, i;
|
|
45477
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45478
|
-
while (1) switch (
|
|
45689
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
|
|
45690
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
45479
45691
|
case 0:
|
|
45480
45692
|
set = this.actSet();
|
|
45481
45693
|
i = 0;
|
|
45482
45694
|
case 2:
|
|
45483
45695
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
45484
|
-
|
|
45696
|
+
_context35.next = 11;
|
|
45485
45697
|
break;
|
|
45486
45698
|
}
|
|
45487
|
-
|
|
45699
|
+
_context35.next = 5;
|
|
45488
45700
|
return DivaUtils__default["default"].Sleep(200);
|
|
45489
45701
|
case 5:
|
|
45490
45702
|
i++;
|
|
45491
45703
|
if (!(i > 1000)) {
|
|
45492
|
-
|
|
45704
|
+
_context35.next = 9;
|
|
45493
45705
|
break;
|
|
45494
45706
|
}
|
|
45495
45707
|
LOG$1.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
|
|
45496
|
-
return
|
|
45708
|
+
return _context35.abrupt("break", 11);
|
|
45497
45709
|
case 9:
|
|
45498
|
-
|
|
45710
|
+
_context35.next = 2;
|
|
45499
45711
|
break;
|
|
45500
45712
|
case 11:
|
|
45501
|
-
|
|
45713
|
+
_context35.next = 13;
|
|
45502
45714
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
45503
45715
|
return _this5.update2DGrid(set);
|
|
45504
45716
|
}, this.actions);
|
|
45505
45717
|
case 13:
|
|
45506
|
-
return
|
|
45718
|
+
return _context35.abrupt("return", _context35.sent);
|
|
45507
45719
|
case 14:
|
|
45508
45720
|
case "end":
|
|
45509
|
-
return
|
|
45721
|
+
return _context35.stop();
|
|
45510
45722
|
}
|
|
45511
|
-
},
|
|
45723
|
+
}, _callee35, this);
|
|
45512
45724
|
}));
|
|
45513
|
-
function handleFavorites(
|
|
45725
|
+
function handleFavorites(_x93) {
|
|
45514
45726
|
return _handleFavorites.apply(this, arguments);
|
|
45515
45727
|
}
|
|
45516
45728
|
return handleFavorites;
|
|
@@ -45523,48 +45735,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45523
45735
|
}, {
|
|
45524
45736
|
key: "initSapOrderLinesFromBasket",
|
|
45525
45737
|
value: function () {
|
|
45526
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
45738
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(divaNr, init3D, onlyLoadOldBakset) {
|
|
45527
45739
|
var result, oldBasket, basket;
|
|
45528
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
45529
|
-
while (1) switch (
|
|
45740
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
|
|
45741
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
45530
45742
|
case 0:
|
|
45531
45743
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
45532
|
-
|
|
45744
|
+
_context36.next = 3;
|
|
45533
45745
|
return this.loadBasket();
|
|
45534
45746
|
case 3:
|
|
45535
|
-
result =
|
|
45747
|
+
result = _context36.sent;
|
|
45536
45748
|
if (!onlyLoadOldBakset) {
|
|
45537
|
-
|
|
45749
|
+
_context36.next = 6;
|
|
45538
45750
|
break;
|
|
45539
45751
|
}
|
|
45540
|
-
return
|
|
45752
|
+
return _context36.abrupt("return", {
|
|
45541
45753
|
oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
45542
45754
|
cache: {}
|
|
45543
45755
|
});
|
|
45544
45756
|
case 6:
|
|
45545
45757
|
if (!(result === false)) {
|
|
45546
|
-
|
|
45758
|
+
_context36.next = 8;
|
|
45547
45759
|
break;
|
|
45548
45760
|
}
|
|
45549
45761
|
throw new Error('Could not load basket! ' + divaNr);
|
|
45550
45762
|
case 8:
|
|
45551
45763
|
oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
45552
|
-
|
|
45764
|
+
_context36.next = 11;
|
|
45553
45765
|
return this.initBasket(init3D);
|
|
45554
45766
|
case 11:
|
|
45555
|
-
basket =
|
|
45556
|
-
return
|
|
45767
|
+
basket = _context36.sent;
|
|
45768
|
+
return _context36.abrupt("return", {
|
|
45557
45769
|
basket: basket,
|
|
45558
45770
|
oldBasket: oldBasket,
|
|
45559
45771
|
cache: this.api.getJsonDataCache()
|
|
45560
45772
|
});
|
|
45561
45773
|
case 13:
|
|
45562
45774
|
case "end":
|
|
45563
|
-
return
|
|
45775
|
+
return _context36.stop();
|
|
45564
45776
|
}
|
|
45565
|
-
},
|
|
45777
|
+
}, _callee36, this);
|
|
45566
45778
|
}));
|
|
45567
|
-
function initSapOrderLinesFromBasket(
|
|
45779
|
+
function initSapOrderLinesFromBasket(_x94, _x95, _x96) {
|
|
45568
45780
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
45569
45781
|
}
|
|
45570
45782
|
return initSapOrderLinesFromBasket;
|