@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
|
@@ -1015,7 +1015,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1015
1015
|
value: function getIDMItems(catalogId, serieId, typeNos) {
|
|
1016
1016
|
return '/live/v3.0/catalogs/' + catalogId + '/series/' + serieId + '/items' + (typeNos !== null && typeNos !== void 0 && typeNos.length ? '?filter=' + typeNos.map(function (t) {
|
|
1017
1017
|
return encodeURIComponent('typeNo==' + t);
|
|
1018
|
-
}).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');
|
|
1018
|
+
}).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');
|
|
1019
1019
|
}
|
|
1020
1020
|
}, {
|
|
1021
1021
|
key: "getIDMItem",
|
|
@@ -1619,6 +1619,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
|
|
|
1619
1619
|
get: function get() {
|
|
1620
1620
|
return this.catPlanArt.articleCodex;
|
|
1621
1621
|
}
|
|
1622
|
+
}, {
|
|
1623
|
+
key: "longDescription",
|
|
1624
|
+
get: function get() {
|
|
1625
|
+
return this.catPlanArt.catalogArticle.longDescription;
|
|
1626
|
+
}
|
|
1622
1627
|
}, {
|
|
1623
1628
|
key: "svgs",
|
|
1624
1629
|
get: function get() {
|
|
@@ -16324,7 +16329,10 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16324
16329
|
}, {
|
|
16325
16330
|
key: "pdfUrl",
|
|
16326
16331
|
get: function get() {
|
|
16327
|
-
|
|
16332
|
+
var _this$opv$textbaustei, _this$opv$textbaustei2;
|
|
16333
|
+
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) {
|
|
16334
|
+
return item.Memo.endsWith('.pdf');
|
|
16335
|
+
})) === null || _this$opv$textbaustei2 === void 0 ? void 0 : _this$opv$textbaustei2.Memo) !== null && _this$opv$textbaustei !== void 0 ? _this$opv$textbaustei : this.opv.pdfUrl;
|
|
16328
16336
|
}
|
|
16329
16337
|
}, {
|
|
16330
16338
|
key: "rals",
|
|
@@ -17429,7 +17437,8 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17429
17437
|
showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
|
|
17430
17438
|
priceUnit: jsonOPV.PriceUnit,
|
|
17431
17439
|
value: jsonOPV.Value,
|
|
17432
|
-
property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : []))
|
|
17440
|
+
property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : [])),
|
|
17441
|
+
textbausteine: jsonOPV.Textbausteine
|
|
17433
17442
|
};
|
|
17434
17443
|
if (jsonOPV.MeasureUnit) {
|
|
17435
17444
|
switch (jsonOPV.MeasureUnit) {
|
|
@@ -17587,6 +17596,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
17587
17596
|
articleCodex: catPlanArticle.codex,
|
|
17588
17597
|
catalogCodex: catalogData.catalogCodex,
|
|
17589
17598
|
title: title,
|
|
17599
|
+
longDescription: catPlanArticle.longDescription,
|
|
17590
17600
|
width: catPlanArticle.articleSizeX,
|
|
17591
17601
|
height: catPlanArticle.articleSizeZ,
|
|
17592
17602
|
depth: catPlanArticle.articleSizeY,
|
|
@@ -17647,6 +17657,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
|
|
|
17647
17657
|
articleCodex: catPlanArticle.codex,
|
|
17648
17658
|
catalogCodex: catalogData.catalogCodex,
|
|
17649
17659
|
title: title,
|
|
17660
|
+
longDescription: catPlanArticle.longDescription,
|
|
17650
17661
|
width: catPlanArticle.articleSizeX,
|
|
17651
17662
|
height: catPlanArticle.articleSizeZ,
|
|
17652
17663
|
depth: catPlanArticle.articleSizeY,
|
|
@@ -18550,6 +18561,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
|
|
|
18550
18561
|
price: !catalog.dontShowBasePrice ? (_myAcc$BasePrice = myAcc.BasePrice) !== null && _myAcc$BasePrice !== void 0 ? _myAcc$BasePrice : catalogArticleData.articlePrice : 0,
|
|
18551
18562
|
articleCodex: myAcc.Codex,
|
|
18552
18563
|
catalogCodex: myAcc.CatalogCodex,
|
|
18564
|
+
longDescription: myAcc.longDescription,
|
|
18553
18565
|
positionGroupNr: myAcc.PositionGroupNr,
|
|
18554
18566
|
typeNr: _catalogArticle.typeNr,
|
|
18555
18567
|
image: _catalogArticle.image ? catalog.getCatImageURL(_catalogArticle.image, '') : undefined,
|
|
@@ -19503,7 +19515,7 @@ function initIDMArticles(jsonItems, catalogData) {
|
|
|
19503
19515
|
}
|
|
19504
19516
|
}
|
|
19505
19517
|
function getCatalogArticle(article, catalogData) {
|
|
19506
|
-
var _catalogData$catalogM, _articleMask$name, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2;
|
|
19518
|
+
var _catalogData$catalogM, _ref, _articleMask$name, _article$fullText, _article$fullText2, _article$shortText, _articleMask$properti, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _articleMask$groupnam, _articleMask$groupnam2;
|
|
19507
19519
|
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];
|
|
19508
19520
|
var lang = catalogData.api.getLanguageLowercase();
|
|
19509
19521
|
var featureProperties = convertProperties(article.properties, lang, 'featureNos');
|
|
@@ -19526,11 +19538,11 @@ function getCatalogArticle(article, catalogData) {
|
|
|
19526
19538
|
hasArticleRelations: false,
|
|
19527
19539
|
hasPartlistArticle: !!article.partListRef,
|
|
19528
19540
|
hasType1Dependencies: false,
|
|
19529
|
-
name: DivaUtils.getLocals((_articleMask$name = articleMask === null || articleMask === void 0 ? void 0 : articleMask.name) !== null && _articleMask$name !== void 0 ? _articleMask$name : article.shortText, lang),
|
|
19530
|
-
longDescription: DivaUtils.getLocals(article.fullText, lang),
|
|
19531
|
-
longDescription_locales: article.fullText,
|
|
19541
|
+
name: DivaUtils.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),
|
|
19542
|
+
longDescription: DivaUtils.getLocals((_article$fullText = article.fullText) !== null && _article$fullText !== void 0 ? _article$fullText : article.shortText, lang),
|
|
19543
|
+
longDescription_locales: (_article$fullText2 = article.fullText) !== null && _article$fullText2 !== void 0 ? _article$fullText2 : article.shortText,
|
|
19532
19544
|
isHidden: !!(articleMask !== null && articleMask !== void 0 && articleMask.hidden),
|
|
19533
|
-
origName: DivaUtils.getLocals(article.shortText, lang),
|
|
19545
|
+
origName: DivaUtils.getLocals((_article$shortText = article.shortText) !== null && _article$shortText !== void 0 ? _article$shortText : article.fullText, lang),
|
|
19534
19546
|
properties: [].concat(_toConsumableArray(convertProperties(article.properties, lang)), _toConsumableArray((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
|
|
19535
19547
|
optionProperties: optionProperties,
|
|
19536
19548
|
featureProperties: featureProperties,
|
|
@@ -19562,12 +19574,12 @@ function getCatalogArticle(article, catalogData) {
|
|
|
19562
19574
|
url: d.url,
|
|
19563
19575
|
detailInfoNo: d.detailInfoNo
|
|
19564
19576
|
};
|
|
19565
|
-
})
|
|
19577
|
+
}),
|
|
19578
|
+
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
|
|
19566
19579
|
};
|
|
19567
19580
|
}
|
|
19568
19581
|
|
|
19569
19582
|
/*
|
|
19570
|
-
groupName: articleMask?.groupname?.[catalogData.api.getLanguage()] ?? jsonArticle.GroupName,
|
|
19571
19583
|
mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
|
|
19572
19584
|
price: jsonArticle.VKP1 && isNaN(jsonArticle.VKP1) ? Number(jsonArticle.VKP1.replace(',', '.')) : jsonArticle.VKP1,
|
|
19573
19585
|
priceGroup: jsonArticle.PriceGroup,
|
|
@@ -19646,15 +19658,16 @@ function getCatalogPlanner(article, catalogArticle) {
|
|
|
19646
19658
|
};
|
|
19647
19659
|
}
|
|
19648
19660
|
function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
|
|
19649
|
-
var _catPlanArticle$filte, _catPlanArticle$svgs;
|
|
19661
|
+
var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
|
|
19650
19662
|
plannerPaletteViewInfo.catalogPlannerArticles.push({
|
|
19651
19663
|
articleCodex: catPlanArticle.codex,
|
|
19652
19664
|
avlFilter: catPlanArticle.avlFilter,
|
|
19653
19665
|
avrFilter: catPlanArticle.avrFilter,
|
|
19666
|
+
longDescription: catPlanArticle.longDescription,
|
|
19654
19667
|
catalogCodex: catPlanArticle.catalogCodex,
|
|
19655
19668
|
codex: catPlanArticle.codex,
|
|
19656
19669
|
filterType: (_catPlanArticle$filte = catPlanArticle.filterType) !== null && _catPlanArticle$filte !== void 0 ? _catPlanArticle$filte : 'DockNone',
|
|
19657
|
-
groupName: '',
|
|
19670
|
+
groupName: (_catPlanArticle$group = catPlanArticle.groupName) !== null && _catPlanArticle$group !== void 0 ? _catPlanArticle$group : '',
|
|
19658
19671
|
hasAVC: !!catPlanArticle.topAVC,
|
|
19659
19672
|
hasAVN: !!catPlanArticle.topAVN,
|
|
19660
19673
|
hasAVO: !!catPlanArticle.topAVO,
|
|
@@ -19812,8 +19825,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19812
19825
|
hidePricePreviewOnlyOnOptions: [],
|
|
19813
19826
|
forceConfigSingle: false,
|
|
19814
19827
|
// das einzeln konfigurieren wird in diesem Katalog gezwungen
|
|
19815
|
-
doubleClickOnConfig: false,
|
|
19816
|
-
// Felher bei Ada IDM wird somit ausgebessert
|
|
19817
19828
|
doUseRuleDescForPartListArticles: false,
|
|
19818
19829
|
initOptionTreeTwice: false,
|
|
19819
19830
|
// Felher bei Cotta IDM wird somit ausgebes
|
|
@@ -19873,6 +19884,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19873
19884
|
this.catalogData = initIDMCatalogData(json, orderSet, api);
|
|
19874
19885
|
initIDMArticles(articleJson, this);
|
|
19875
19886
|
}
|
|
19887
|
+
if (this.origProperties) {
|
|
19888
|
+
var _this$catalogMask$cat2, _this$catalogMask2;
|
|
19889
|
+
this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray(json.Properties), _toConsumableArray((_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 : [])));
|
|
19890
|
+
}
|
|
19876
19891
|
}
|
|
19877
19892
|
return _createClass(DivaCatalogData, [{
|
|
19878
19893
|
key: "getCatImageURL",
|
|
@@ -20453,11 +20468,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20453
20468
|
var _this$optionValues2;
|
|
20454
20469
|
return Object.values((_this$optionValues2 = this.optionValues) !== null && _this$optionValues2 !== void 0 ? _this$optionValues2 : {});
|
|
20455
20470
|
}
|
|
20456
|
-
}, {
|
|
20457
|
-
key: "doubleClickOnConfig",
|
|
20458
|
-
get: function get() {
|
|
20459
|
-
return this.catalogProps.doubleClickOnConfig;
|
|
20460
|
-
}
|
|
20461
20471
|
}, {
|
|
20462
20472
|
key: "initOptionTreeTwice",
|
|
20463
20473
|
get: function get() {
|
|
@@ -20797,6 +20807,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20797
20807
|
break;
|
|
20798
20808
|
case 'DEFAULT_DO_SHOW_3DDIMENSIONS':
|
|
20799
20809
|
_this5.catalogProps.defaultDimensionsActive = '1' == item.Value || 'true' == item.Value.toLowerCase();
|
|
20810
|
+
break;
|
|
20800
20811
|
// Planner Topics
|
|
20801
20812
|
case 'IS_IDM3D_CAT':
|
|
20802
20813
|
_this5.catalogProps.isIDM3DCat = item.Value == '1' || item.Value.toLowerCase() == 'true';
|
|
@@ -20970,9 +20981,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20970
20981
|
return 'OPT' + t;
|
|
20971
20982
|
});
|
|
20972
20983
|
break;
|
|
20973
|
-
case 'DOUBLE_CLICK_ON_CONFIG':
|
|
20974
|
-
_this5.catalogProps.doubleClickOnConfig = '1' == item.Value;
|
|
20975
|
-
break;
|
|
20976
20984
|
case 'INIT_OPTIONTREE_TWICE':
|
|
20977
20985
|
_this5.catalogProps.initOptionTreeTwice = '1' == item.Value;
|
|
20978
20986
|
break;
|
|
@@ -21012,17 +21020,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21012
21020
|
case 'ADD_PA_ON_EDO':
|
|
21013
21021
|
_this5.handleEdoArticles(properties, item);
|
|
21014
21022
|
break;
|
|
21015
|
-
default:
|
|
21016
|
-
if (key.startsWith('3D_STATBG_ROOMLIST')) {
|
|
21017
|
-
// item.Value =
|
|
21018
|
-
// "weissraum_LUECK;backgroundimgroom_lueck_modern;backgroundimgroom_lueck_romantic;backgroundimgroom_lueck_loft;backgroundimgroom_lueck_night";
|
|
21019
|
-
_this5.catalogProps.roomList3DStaticBGImage.set(item.Codex, item.Value.split(';'));
|
|
21020
|
-
} else if (key.startsWith('3D_STANDARD_WHITEROOM')) {
|
|
21021
|
-
_this5.catalogProps.diva3dStandardWhiteroom = item.Value;
|
|
21022
|
-
} else if (key.startsWith('DIVA3D_IMAGE')) {
|
|
21023
|
-
_this5.handleDIVA3DMetaTag(item);
|
|
21024
|
-
}
|
|
21025
|
-
break;
|
|
21026
21023
|
}
|
|
21027
21024
|
});
|
|
21028
21025
|
if (!diva3DRenderingIsSet) {
|
|
@@ -21031,6 +21028,25 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21031
21028
|
}
|
|
21032
21029
|
}
|
|
21033
21030
|
}
|
|
21031
|
+
}, {
|
|
21032
|
+
key: "initPropertiesAfterOptionsInit",
|
|
21033
|
+
value: function initPropertiesAfterOptionsInit(catalogCodex, properties) {
|
|
21034
|
+
var _this6 = this;
|
|
21035
|
+
properties.forEach(function (item, index) {
|
|
21036
|
+
//3D Allgemein
|
|
21037
|
+
var key = item.Codex;
|
|
21038
|
+
if (key.startsWith(catalogCodex + '__')) key = key.replace(catalogCodex + '__', '');
|
|
21039
|
+
if (key.startsWith('3D_STATBG_ROOMLIST')) {
|
|
21040
|
+
// item.Value =
|
|
21041
|
+
// "weissraum_LUECK;backgroundimgroom_lueck_modern;backgroundimgroom_lueck_romantic;backgroundimgroom_lueck_loft;backgroundimgroom_lueck_night";
|
|
21042
|
+
_this6.catalogProps.roomList3DStaticBGImage.set(item.Codex, item.Value.split(';'));
|
|
21043
|
+
} else if (key.startsWith('3D_STANDARD_WHITEROOM')) {
|
|
21044
|
+
_this6.catalogProps.diva3dStandardWhiteroom = item.Value;
|
|
21045
|
+
} else if (key.startsWith('DIVA3D_IMAGE')) {
|
|
21046
|
+
_this6.handleDIVA3DMetaTag(item);
|
|
21047
|
+
}
|
|
21048
|
+
});
|
|
21049
|
+
}
|
|
21034
21050
|
}, {
|
|
21035
21051
|
key: "handleDIVA3DMetaTag",
|
|
21036
21052
|
value: function handleDIVA3DMetaTag(item) {
|
|
@@ -21170,10 +21186,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
21170
21186
|
}, {
|
|
21171
21187
|
key: "initMask",
|
|
21172
21188
|
value: function initMask(initProps) {
|
|
21173
|
-
var _this$
|
|
21174
|
-
if ((_this$
|
|
21175
|
-
var _this$catalogMask$
|
|
21176
|
-
if ((_this$catalogMask$
|
|
21189
|
+
var _this$catalogMask3;
|
|
21190
|
+
if ((_this$catalogMask3 = this.catalogMask) !== null && _this$catalogMask3 !== void 0 && _this$catalogMask3.catalog) {
|
|
21191
|
+
var _this$catalogMask$cat3;
|
|
21192
|
+
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()];
|
|
21177
21193
|
if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
|
|
21178
21194
|
if (this.catalogMask.catalog.properties && initProps) this.initProperties(this.catalogCodex, [].concat(_toConsumableArray(this.origProperties), _toConsumableArray(this.catalogMask.catalog.properties)));
|
|
21179
21195
|
}
|
|
@@ -21599,12 +21615,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21599
21615
|
}, {
|
|
21600
21616
|
key: "IsDockingFilterFeature",
|
|
21601
21617
|
get: function get() {
|
|
21602
|
-
return this.option.idmVariantenArt ? [89, 90].includes(this.option.idmVariantenArt) : false;
|
|
21618
|
+
return this.option.idmVariantenArt ? [89, 90, 1089, 1090].includes(this.option.idmVariantenArt) : false;
|
|
21603
21619
|
}
|
|
21604
21620
|
}, {
|
|
21605
21621
|
key: "IsIDMSpecialFeature",
|
|
21606
21622
|
get: function get() {
|
|
21607
|
-
return this.option.idmVariantenArt ? [95, 96, 97, 89, 90].includes(this.option.idmVariantenArt) : false;
|
|
21623
|
+
return this.option.idmVariantenArt ? [95, 96, 97, 89, 90, 1095, 1096, 1097, 1089, 1090].includes(this.option.idmVariantenArt) : false;
|
|
21608
21624
|
}
|
|
21609
21625
|
}, {
|
|
21610
21626
|
key: "visibleOptionValues",
|
|
@@ -22299,8 +22315,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22299
22315
|
}, {
|
|
22300
22316
|
key: "updateIDMSpecificFeature",
|
|
22301
22317
|
value: function updateIDMSpecificFeature(ops) {
|
|
22318
|
+
var _ops$option$idmVarian, _ops$option$idmVarian2, _ops$option$idmVarian3, _ops$option$idmVarian4, _ops$option$idmVarian5;
|
|
22302
22319
|
if (!this.article.parentHasSameOption(ops.optionCodex)) return;
|
|
22303
|
-
if (ops.option.idmVariantenArt
|
|
22320
|
+
if ([90, 1090].includes((_ops$option$idmVarian = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian !== void 0 ? _ops$option$idmVarian : 0)) {
|
|
22304
22321
|
//R (Anschlusstyp R) - AVR
|
|
22305
22322
|
var newAVRFilter = [],
|
|
22306
22323
|
visibleOPVs = ops.visibleOptionValues;
|
|
@@ -22309,7 +22326,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22309
22326
|
}
|
|
22310
22327
|
this.article.newPossibleAVRFilters = newAVRFilter;
|
|
22311
22328
|
}
|
|
22312
|
-
if (ops.option.idmVariantenArt
|
|
22329
|
+
if ([89, 1089].includes((_ops$option$idmVarian2 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian2 !== void 0 ? _ops$option$idmVarian2 : 0)) {
|
|
22313
22330
|
//L (Anschlusstyp L) - AVL
|
|
22314
22331
|
var newAVLFilter = [],
|
|
22315
22332
|
_visibleOPVs = ops.visibleOptionValues;
|
|
@@ -22319,7 +22336,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22319
22336
|
this.article.newPossibleAVLFilters = newAVLFilter;
|
|
22320
22337
|
}
|
|
22321
22338
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22322
|
-
if (ops.option.idmVariantenArt
|
|
22339
|
+
if ([97, 1097].includes((_ops$option$idmVarian3 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian3 !== void 0 ? _ops$option$idmVarian3 : 0)) {
|
|
22323
22340
|
//Planungshöhe
|
|
22324
22341
|
try {
|
|
22325
22342
|
var _ops$freeText;
|
|
@@ -22332,7 +22349,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22332
22349
|
}
|
|
22333
22350
|
}
|
|
22334
22351
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22335
|
-
if (ops.option.idmVariantenArt
|
|
22352
|
+
if ([96, 1096].includes((_ops$option$idmVarian4 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian4 !== void 0 ? _ops$option$idmVarian4 : 0) || ops.option.diameter) {
|
|
22336
22353
|
//Planungstiefe
|
|
22337
22354
|
try {
|
|
22338
22355
|
var _ops$freeText2;
|
|
@@ -22345,7 +22362,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22345
22362
|
}
|
|
22346
22363
|
}
|
|
22347
22364
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
22348
|
-
if (ops.option.idmVariantenArt
|
|
22365
|
+
if ([95, 1095].includes((_ops$option$idmVarian5 = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian5 !== void 0 ? _ops$option$idmVarian5 : 0) || ops.option.diameter) {
|
|
22349
22366
|
//Planungsbreite - ACHTUNG Fehler wenn mm
|
|
22350
22367
|
|
|
22351
22368
|
try {
|
|
@@ -22475,8 +22492,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22475
22492
|
var _this$article$set$Vie;
|
|
22476
22493
|
//die Klasse ArticleOptionState wird einfach neu initialisiert
|
|
22477
22494
|
var oldOPS = this.article.getArticleOptionState(optionCodex);
|
|
22495
|
+
if (!oldOPS) return;
|
|
22478
22496
|
if (keepEnalbed) {
|
|
22479
22497
|
oldOPS.val = undefined;
|
|
22498
|
+
oldOPS.isDoShow = oldOPS.visibleCount > 1;
|
|
22480
22499
|
return;
|
|
22481
22500
|
}
|
|
22482
22501
|
var option = oldOPS.option;
|
|
@@ -22673,7 +22692,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22673
22692
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
22674
22693
|
var ops = _step3.value;
|
|
22675
22694
|
//when an option has no decisions the first visible optionValue has to be selected per default
|
|
22676
|
-
if (ops.val === undefined && ops.visibleCount) {
|
|
22695
|
+
if (ops.val === undefined && ops.visibleCount && !this.article.CatalogData.useDiomexConfigLogic) {
|
|
22677
22696
|
this.assignOptionValue(ops.optionCodex, Object.keys(ops.visibleOptionValues)[0]);
|
|
22678
22697
|
}
|
|
22679
22698
|
if (ops.visibleCount && ops.IsIDMSpecialFeature) {
|
|
@@ -23211,6 +23230,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23211
23230
|
value: function evalPartlist(newConfigValues) {
|
|
23212
23231
|
var partlistArticlesToLoad = [];
|
|
23213
23232
|
var myPartlistArticles = this.article.groupedPartlists;
|
|
23233
|
+
var partlistGroup = [];
|
|
23214
23234
|
for (var iKey in myPartlistArticles) {
|
|
23215
23235
|
var groupDecisionVal;
|
|
23216
23236
|
var key = Number(iKey);
|
|
@@ -23221,6 +23241,9 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23221
23241
|
for (var b = 0; b < myPartlistArticles[key].length; b++) {
|
|
23222
23242
|
var startTime = Date.now();
|
|
23223
23243
|
var myPartListPos = myPartlistArticles[key][b];
|
|
23244
|
+
if (myPartListPos.PartlistGroup && partlistGroup.includes(myPartListPos.PartlistGroup)) {
|
|
23245
|
+
continue;
|
|
23246
|
+
}
|
|
23224
23247
|
if (myPartListPos.ItemRefArticles) {
|
|
23225
23248
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
23226
23249
|
if (decisions) {
|
|
@@ -23233,16 +23256,16 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23233
23256
|
if ((_myDecisionVal = myDecisionVal) !== null && _myDecisionVal !== void 0 && _myDecisionVal.isValidDOC || relationTypeNone) {
|
|
23234
23257
|
// wenn die Decision gültig, gelten die ItemRefArticles
|
|
23235
23258
|
partlistAdded = true;
|
|
23236
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
|
|
23259
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
|
|
23237
23260
|
break;
|
|
23238
23261
|
}
|
|
23239
23262
|
}
|
|
23240
23263
|
if (decisions.length === 0) {
|
|
23241
23264
|
LOG$f.log('partlistarticle loaded for haveing 0 decisions: ', myPartListPos.ItemRefArticles);
|
|
23242
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
23265
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
23243
23266
|
} else if (!partlistAdded && this.article.CatalogData.useDecisionPosCountValue && myPartListPos.PosCountValue > 0) {
|
|
23244
23267
|
LOG$f.log('partlistarticle loaded for having default PosCountValue ', myPartListPos.ItemRefArticles);
|
|
23245
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
23268
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
23246
23269
|
}
|
|
23247
23270
|
}
|
|
23248
23271
|
}
|
|
@@ -23254,7 +23277,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23254
23277
|
}
|
|
23255
23278
|
}, {
|
|
23256
23279
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
23257
|
-
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23280
|
+
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
|
|
23258
23281
|
var _myPartListPos$Option,
|
|
23259
23282
|
_this2 = this;
|
|
23260
23283
|
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
@@ -23311,7 +23334,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23311
23334
|
_loop3(i);
|
|
23312
23335
|
}
|
|
23313
23336
|
if (quanitity >= 1) {
|
|
23314
|
-
var _myDecisionVal$Rule
|
|
23337
|
+
var _myDecisionVal$Rule;
|
|
23315
23338
|
partlistArticlesToLoad.push({
|
|
23316
23339
|
CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this2.article.catalogCodex,
|
|
23317
23340
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -23326,11 +23349,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23326
23349
|
RuleDesc: myRuleDesc,
|
|
23327
23350
|
RuleDesc_locales: myRuleDesc_locales,
|
|
23328
23351
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
23329
|
-
|
|
23352
|
+
ConfigurationMode: myPartListPos.ConfigurationMode,
|
|
23353
|
+
VariantValues: _this2.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
23330
23354
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
23331
23355
|
optionImgForPrint: optionImgForPrint,
|
|
23332
23356
|
optionsForPrint: optionsForPrint
|
|
23333
23357
|
});
|
|
23358
|
+
if (myPartListPos.PartlistGroup) partlistGroup.push(myPartListPos.PartlistGroup);
|
|
23334
23359
|
}
|
|
23335
23360
|
};
|
|
23336
23361
|
for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
|
|
@@ -23458,7 +23483,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23458
23483
|
} else if (calcUnit2Price != 0) {
|
|
23459
23484
|
//for diamter option
|
|
23460
23485
|
if (ops.option.diameter) {
|
|
23461
|
-
ops.usedCalcPrice = calcUnit2Price *
|
|
23486
|
+
ops.usedCalcPrice = calcUnit2Price * freeTextMeasure * freeTextMeasure;
|
|
23462
23487
|
} else {
|
|
23463
23488
|
if (firstUnit2Param == 0) {
|
|
23464
23489
|
firstUnit2Param = freeTextMeasure;
|
|
@@ -23683,6 +23708,35 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23683
23708
|
}
|
|
23684
23709
|
}
|
|
23685
23710
|
}
|
|
23711
|
+
}, {
|
|
23712
|
+
key: "getValuesInfluencingOPT",
|
|
23713
|
+
value: function getValuesInfluencingOPT(featureNo) {
|
|
23714
|
+
var decisions = this.article.catalogArticle.articleDecisions;
|
|
23715
|
+
//add the partlist spesific decisions to the normal decisions
|
|
23716
|
+
if (this.article.initDecisions) decisions = decisions.concat(this.article.initDecisions);
|
|
23717
|
+
var variantValuesArr = [];
|
|
23718
|
+
var relevantDecisions = decisions.filter(function (d) {
|
|
23719
|
+
var _d$Options;
|
|
23720
|
+
return (_d$Options = d.Options) === null || _d$Options === void 0 ? void 0 : _d$Options.includes(featureNo);
|
|
23721
|
+
});
|
|
23722
|
+
for (var i = 0; i < relevantDecisions.length; i++) {
|
|
23723
|
+
var decision = relevantDecisions[i];
|
|
23724
|
+
if (decision.Type == '1' && decision.DOC) {
|
|
23725
|
+
for (var j = 0; j < decision.DOC.length; j++) {
|
|
23726
|
+
var _oc$Row;
|
|
23727
|
+
var oc = decision.DOC[j];
|
|
23728
|
+
var variantValues = {};
|
|
23729
|
+
if (!Object.values((_oc$Row = oc.Row) !== null && _oc$Row !== void 0 ? _oc$Row : {}).length) continue;
|
|
23730
|
+
for (var key in oc.Row) {
|
|
23731
|
+
if (key == featureNo) continue;
|
|
23732
|
+
variantValues[key] = oc.Row[key][0];
|
|
23733
|
+
}
|
|
23734
|
+
variantValuesArr.push(variantValues);
|
|
23735
|
+
}
|
|
23736
|
+
}
|
|
23737
|
+
}
|
|
23738
|
+
return variantValuesArr;
|
|
23739
|
+
}
|
|
23686
23740
|
}, {
|
|
23687
23741
|
key: "getOptionPrice",
|
|
23688
23742
|
value: function getOptionPrice(calculatedPrice, optItem, digits) {
|
|
@@ -23767,17 +23821,23 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23767
23821
|
LOG$e.debug('eval Decisions total time in ' + (endTime - startTime) + ' of ' + count);
|
|
23768
23822
|
}
|
|
23769
23823
|
}, {
|
|
23770
|
-
key: "
|
|
23771
|
-
|
|
23824
|
+
key: "decisions",
|
|
23825
|
+
get: function get() {
|
|
23772
23826
|
var _unsortedDecisons;
|
|
23773
23827
|
var unsortedDecisons = this.article.articleIDMDecisions;
|
|
23774
|
-
if (!((_unsortedDecisons = unsortedDecisons) !== null && _unsortedDecisons !== void 0 && _unsortedDecisons.length)) return;
|
|
23828
|
+
if (!((_unsortedDecisons = unsortedDecisons) !== null && _unsortedDecisons !== void 0 && _unsortedDecisons.length)) return [];
|
|
23775
23829
|
//add the partlist spesific decisions to the normal decisions
|
|
23776
23830
|
|
|
23777
23831
|
if (this.article.initDecisions) unsortedDecisons = unsortedDecisons.concat(this.article.initDecisions);
|
|
23778
|
-
|
|
23832
|
+
return unsortedDecisons.sort(function (a, b) {
|
|
23779
23833
|
return a.prio - b.prio;
|
|
23780
23834
|
});
|
|
23835
|
+
}
|
|
23836
|
+
}, {
|
|
23837
|
+
key: "evalDecisionsfunction",
|
|
23838
|
+
value: function evalDecisionsfunction() {
|
|
23839
|
+
var decisions = this.decisions;
|
|
23840
|
+
if (!decisions.length) return;
|
|
23781
23841
|
for (var i = 0; i < decisions.length; i++) {
|
|
23782
23842
|
decisions[i].enabled = true;
|
|
23783
23843
|
decisions[i].disableHistory = [];
|
|
@@ -24232,6 +24292,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24232
24292
|
var oldOPS = this.article.getArticleOptionState(featureNo);
|
|
24233
24293
|
if (keepEnalbed) {
|
|
24234
24294
|
oldOPS.val = undefined;
|
|
24295
|
+
oldOPS.isDoShow = oldOPS.visibleCount > 1;
|
|
24235
24296
|
return;
|
|
24236
24297
|
}
|
|
24237
24298
|
var option = oldOPS.option;
|
|
@@ -24349,10 +24410,12 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24349
24410
|
var partlistArticlesToLoad = [];
|
|
24350
24411
|
var myPartlistArticles = (_this$article$catalog4 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.partlistPos;
|
|
24351
24412
|
if (!(myPartlistArticles !== null && myPartlistArticles !== void 0 && myPartlistArticles.length)) return [];
|
|
24413
|
+
var partlistGroup = [];
|
|
24352
24414
|
for (var i = 0; i < myPartlistArticles.length; i++) {
|
|
24353
24415
|
var _myPartListPos$decisi;
|
|
24354
24416
|
var myPartListPos = myPartlistArticles[i];
|
|
24355
24417
|
if (!myPartListPos.itemRefTypeNo) continue;
|
|
24418
|
+
if (myPartListPos.partlistGroup && partlistGroup.includes(myPartListPos.partlistGroup)) continue;
|
|
24356
24419
|
var decisions = this.article.CatalogData.getDecisionsByNo([].concat(_toConsumableArray((_myPartListPos$decisi = myPartListPos.decisions) !== null && _myPartListPos$decisi !== void 0 ? _myPartListPos$decisi : []), _toConsumableArray(myPartListPos.decisionPosCount ? [myPartListPos.decisionPosCount] : [])));
|
|
24357
24420
|
var partlistAdded = false;
|
|
24358
24421
|
for (var c = 0; c < decisions.length; c++) {
|
|
@@ -24361,22 +24424,22 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24361
24424
|
var isValidDOC = relationTypeNone ? undefined : this.checkDecisionNumber(decision.decisionNo);
|
|
24362
24425
|
if (!isValidDOC && !relationTypeNone) continue;
|
|
24363
24426
|
partlistAdded = true;
|
|
24364
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, undefined, !relationTypeNone ? decision.decisionNo : undefined);
|
|
24427
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, undefined, !relationTypeNone ? decision.decisionNo : undefined);
|
|
24365
24428
|
break;
|
|
24366
24429
|
}
|
|
24367
24430
|
if (decisions.length === 0 && !partlistAdded) {
|
|
24368
24431
|
LOG$e.log('partlistarticle loaded for haveing 0 decisions: ', myPartListPos.itemRefTypeNo);
|
|
24369
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
24432
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
24370
24433
|
} else if (!partlistAdded && myPartListPos.posCountValue > 0) {
|
|
24371
24434
|
LOG$e.log('partlistarticle loaded for having default PosCountValue ', myPartListPos.itemRefTypeNo);
|
|
24372
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
24435
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues);
|
|
24373
24436
|
}
|
|
24374
24437
|
}
|
|
24375
24438
|
return partlistArticlesToLoad;
|
|
24376
24439
|
}
|
|
24377
24440
|
}, {
|
|
24378
24441
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24379
|
-
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, rule, decisionNo) {
|
|
24442
|
+
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, rule, decisionNo) {
|
|
24380
24443
|
var decisions = this.article.CatalogData.getDecisionsByNo(myPartListPos.decisions);
|
|
24381
24444
|
|
|
24382
24445
|
//const optionsForPrint: string[] = (myPartListPos.OptionsForPrint as string)?.split(';').map((o: string) => 'OPT' + o);
|
|
@@ -24427,7 +24490,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24427
24490
|
_loop2(i);
|
|
24428
24491
|
}
|
|
24429
24492
|
if (quanitity >= 1) {
|
|
24430
|
-
var _catalogCodex$toStrin
|
|
24493
|
+
var _catalogCodex$toStrin;
|
|
24431
24494
|
partlistArticlesToLoad.push({
|
|
24432
24495
|
CatalogCodex: (_catalogCodex$toStrin = catalogCodex.toString()) !== null && _catalogCodex$toStrin !== void 0 ? _catalogCodex$toStrin : this.article.catalogCodex,
|
|
24433
24496
|
BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
|
|
@@ -24444,11 +24507,13 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24444
24507
|
RuleDesc: myRuleDesc,
|
|
24445
24508
|
RuleDesc_locales: myRuleDesc_locales,
|
|
24446
24509
|
PosInvisibility: myPartListPos.posInvisibility,
|
|
24447
|
-
|
|
24510
|
+
ConfigurationMode: myPartListPos.configurationMode,
|
|
24511
|
+
VariantValues: this.article.variantValuesForPla(myPartListPos.configurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
|
|
24448
24512
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData
|
|
24449
24513
|
//optionImgForPrint,
|
|
24450
24514
|
//optionsForPrint,
|
|
24451
24515
|
});
|
|
24516
|
+
if (myPartListPos.partlistGroup) partlistGroup.push(myPartListPos.partlistGroup);
|
|
24452
24517
|
}
|
|
24453
24518
|
return partlistArticlesToLoad;
|
|
24454
24519
|
}
|
|
@@ -24534,16 +24599,17 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24534
24599
|
}, {
|
|
24535
24600
|
key: "updateIDMSpecificFeature",
|
|
24536
24601
|
value: function updateIDMSpecificFeature(myArtOPS) {
|
|
24602
|
+
var _myArtOPS$option$idmV, _myArtOPS$option$idmV2, _myArtOPS$option$idmV3, _myArtOPS$option$idmV4, _myArtOPS$option$idmV5;
|
|
24537
24603
|
if (!this.article.parentHasSameOption(myArtOPS.optionCodex)) return;
|
|
24538
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24604
|
+
if ([90, 1090].includes((_myArtOPS$option$idmV = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV !== void 0 ? _myArtOPS$option$idmV : 0)) {
|
|
24539
24605
|
//R (Anschlusstyp R) - AVR
|
|
24540
24606
|
this.article.newPossibleAVRFilters = Object.keys(myArtOPS.visibleOptionValues);
|
|
24541
24607
|
}
|
|
24542
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24608
|
+
if ([89, 1089].includes((_myArtOPS$option$idmV2 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV2 !== void 0 ? _myArtOPS$option$idmV2 : 0)) {
|
|
24543
24609
|
//L (Anschlusstyp L) - AVL
|
|
24544
24610
|
this.article.newPossibleAVLFilters = Object.keys(myArtOPS.visibleOptionValues);
|
|
24545
24611
|
}
|
|
24546
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24612
|
+
if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
|
|
24547
24613
|
try {
|
|
24548
24614
|
var _myArtOPS$measureValu;
|
|
24549
24615
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24552,7 +24618,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24552
24618
|
LOG$e.warn('Invalid Planungdepth - IDMVariantenArt 97: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
24553
24619
|
}
|
|
24554
24620
|
}
|
|
24555
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24621
|
+
if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
|
|
24556
24622
|
try {
|
|
24557
24623
|
var _myArtOPS$measureValu2;
|
|
24558
24624
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24561,7 +24627,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24561
24627
|
LOG$e.warn('Invalid Planungdepth - IDMVariantenArt 96: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
24562
24628
|
}
|
|
24563
24629
|
}
|
|
24564
|
-
if (myArtOPS.option.idmVariantenArt
|
|
24630
|
+
if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
|
|
24565
24631
|
try {
|
|
24566
24632
|
var _myArtOPS$measureValu3;
|
|
24567
24633
|
this.article.doUpdatePlannerSize = true;
|
|
@@ -24571,6 +24637,30 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24571
24637
|
}
|
|
24572
24638
|
}
|
|
24573
24639
|
}
|
|
24640
|
+
}, {
|
|
24641
|
+
key: "getValuesInfluencingOPT",
|
|
24642
|
+
value: function getValuesInfluencingOPT(featureNo) {
|
|
24643
|
+
var variantValuesArr = [];
|
|
24644
|
+
var decisions = this.decisions;
|
|
24645
|
+
var relevantDecisions = decisions.filter(function (d) {
|
|
24646
|
+
return d.featureRefs.includes(featureNo);
|
|
24647
|
+
});
|
|
24648
|
+
for (var i = 0; i < relevantDecisions.length; i++) {
|
|
24649
|
+
var decision = relevantDecisions[i];
|
|
24650
|
+
if (decision.decisionType == 1) {
|
|
24651
|
+
for (var j = 0; j < decision.optionCombinations.length; j++) {
|
|
24652
|
+
var oc = decision.optionCombinations[j];
|
|
24653
|
+
var variantValues = {};
|
|
24654
|
+
for (var key in oc.parsedOptionSetRefs) {
|
|
24655
|
+
if (key == featureNo) continue;
|
|
24656
|
+
variantValues[key] = oc.parsedOptionSetRefs[key].value[0];
|
|
24657
|
+
}
|
|
24658
|
+
variantValuesArr.push(variantValues);
|
|
24659
|
+
}
|
|
24660
|
+
}
|
|
24661
|
+
}
|
|
24662
|
+
return variantValuesArr;
|
|
24663
|
+
}
|
|
24574
24664
|
}, {
|
|
24575
24665
|
key: "evalMeasureFormula",
|
|
24576
24666
|
value: function evalMeasureFormula(formula) {
|
|
@@ -24670,6 +24760,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24670
24760
|
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
24671
24761
|
partListParentArticle: initParams.parentArticle,
|
|
24672
24762
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
24763
|
+
partlistArticleStandalone: initParams.partlistArticleStandalone,
|
|
24673
24764
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
24674
24765
|
noPrice: (_initParams$noPrice = initParams.noPrice) !== null && _initParams$noPrice !== void 0 ? _initParams$noPrice : false,
|
|
24675
24766
|
retailArticleNr: initParams.RetailArticleNr ? initParams.RetailArticleNr : initParams.retailArticleNr,
|
|
@@ -24739,7 +24830,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24739
24830
|
currentAccessorires: [],
|
|
24740
24831
|
parentElementId: isNotDockedAccessoire ? this.set.getDivaArticles()[this.relatedToBasketId].elementId : undefined,
|
|
24741
24832
|
isNotDockedAccessoire: isNotDockedAccessoire,
|
|
24742
|
-
svgsWithFormula: []
|
|
24833
|
+
svgsWithFormula: [],
|
|
24834
|
+
varaintValuesInfluencingAVLAVRFilter: []
|
|
24743
24835
|
};
|
|
24744
24836
|
var plannerElement = this.article.catalogArticle.catalogPlannerArticle;
|
|
24745
24837
|
if (plannerElement) {
|
|
@@ -24810,6 +24902,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24810
24902
|
get: function get() {
|
|
24811
24903
|
return this.article.partlistArticleVisibleInTree && this.hasOptionsThatParentDoesNotHave;
|
|
24812
24904
|
}
|
|
24905
|
+
}, {
|
|
24906
|
+
key: "partlistArticleStandalone",
|
|
24907
|
+
get: function get() {
|
|
24908
|
+
return this.article.partlistArticleStandalone;
|
|
24909
|
+
}
|
|
24813
24910
|
}, {
|
|
24814
24911
|
key: "partlistArticlesReqursive",
|
|
24815
24912
|
get: function get() {
|
|
@@ -24824,6 +24921,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24824
24921
|
get: function get() {
|
|
24825
24922
|
var _this$partListParentA;
|
|
24826
24923
|
if (!this.partListParentArticle) return false;
|
|
24924
|
+
if (this.partlistArticleStandalone) return true;
|
|
24827
24925
|
//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
|
|
24828
24926
|
// first usecase https://app.asana.com/0/1204193128085691/1204389027061737
|
|
24829
24927
|
var myOptions = this.articleOptionStatesKeys;
|
|
@@ -24834,17 +24932,24 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24834
24932
|
}
|
|
24835
24933
|
}, {
|
|
24836
24934
|
key: "getRecursivePartlistArticles",
|
|
24837
|
-
value: function getRecursivePartlistArticles(onlyVisible) {
|
|
24935
|
+
value: function getRecursivePartlistArticles(onlyVisible, excludeStandalonePla) {
|
|
24838
24936
|
var partlistArticles = {};
|
|
24839
24937
|
for (var basketId in this.partlistArticles) {
|
|
24840
24938
|
var partlistArticle = this.partlistArticles[basketId];
|
|
24841
|
-
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
24939
|
+
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree || !excludeStandalonePla && partlistArticle.partlistArticleStandalone) partlistArticles[basketId] = partlistArticle;
|
|
24842
24940
|
if (partlistArticle.hasPartlistArticle) {
|
|
24843
|
-
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
24941
|
+
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible, excludeStandalonePla));
|
|
24844
24942
|
}
|
|
24845
24943
|
}
|
|
24846
24944
|
return partlistArticles;
|
|
24847
24945
|
}
|
|
24946
|
+
}, {
|
|
24947
|
+
key: "variantValuesForPla",
|
|
24948
|
+
value: function variantValuesForPla(configurationMode, previousPartlistArticleVariantValues, newConfigValues) {
|
|
24949
|
+
//if configurationMode is true its previous values are more important than the values of the parentelement because its standalone configurable
|
|
24950
|
+
if (configurationMode) return _objectSpread$e(_objectSpread$e({}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {});
|
|
24951
|
+
return _objectSpread$e(_objectSpread$e({}, previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {});
|
|
24952
|
+
}
|
|
24848
24953
|
}, {
|
|
24849
24954
|
key: "partlistArticlesAsArray",
|
|
24850
24955
|
get: function get() {
|
|
@@ -25488,31 +25593,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25488
25593
|
});
|
|
25489
25594
|
if (firstMatch) return firstMatch;
|
|
25490
25595
|
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)) {
|
|
25491
|
-
|
|
25596
|
+
var ops = this.partListParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25597
|
+
if (ops) return ops;
|
|
25492
25598
|
}
|
|
25493
25599
|
if (Object.keys((_this$partlistArticle3 = this.partlistArticles) !== null && _this$partlistArticle3 !== void 0 ? _this$partlistArticle3 : {}).length > 0) {
|
|
25494
25600
|
for (var key in this.partlistArticles) {
|
|
25495
25601
|
if (from === key) continue;
|
|
25496
25602
|
var partlistArticle = this.partlistArticles[key];
|
|
25497
|
-
var
|
|
25498
|
-
if (
|
|
25603
|
+
var _ops = partlistArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25604
|
+
if (_ops) return _ops;
|
|
25499
25605
|
}
|
|
25500
25606
|
}
|
|
25501
25607
|
var _iterator5 = _createForOfIteratorHelper$6(this.articleOptionStatesData),
|
|
25502
25608
|
_step5;
|
|
25503
25609
|
try {
|
|
25504
25610
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
25505
|
-
var
|
|
25611
|
+
var _ops3 = _step5.value;
|
|
25506
25612
|
if (!codex.includes('.')) {
|
|
25507
|
-
if (
|
|
25508
|
-
return
|
|
25613
|
+
if (_ops3.option.ocd == codex && _ops3.isDoShow && !_ops3.isDisabled) {
|
|
25614
|
+
return _ops3;
|
|
25509
25615
|
}
|
|
25510
25616
|
} else {
|
|
25511
25617
|
var _this$parentOptionCod = this.parentOptionCodex(codex),
|
|
25512
25618
|
optionCodex = _this$parentOptionCod.optionCodex,
|
|
25513
25619
|
partenOptionCodex = _this$parentOptionCod.partenOptionCodex;
|
|
25514
|
-
if ((
|
|
25515
|
-
return
|
|
25620
|
+
if ((_ops3.option.ocd == optionCodex || _ops3.option.codex == optionCodex) && _ops3.option.parentOptionCodex == partenOptionCodex) {
|
|
25621
|
+
return _ops3;
|
|
25516
25622
|
}
|
|
25517
25623
|
}
|
|
25518
25624
|
}
|
|
@@ -25522,8 +25628,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25522
25628
|
_iterator5.f();
|
|
25523
25629
|
}
|
|
25524
25630
|
if (checkOnAccessoireParent && this.accessoireParentArticle) {
|
|
25525
|
-
var
|
|
25526
|
-
if (
|
|
25631
|
+
var _ops2 = this.accessoireParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
|
|
25632
|
+
if (_ops2) return _ops2;
|
|
25527
25633
|
}
|
|
25528
25634
|
return undefined;
|
|
25529
25635
|
}
|
|
@@ -25717,9 +25823,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25717
25823
|
get: function get() {
|
|
25718
25824
|
var _this$partlistArticle4;
|
|
25719
25825
|
if (Object.values((_this$partlistArticle4 = this.partlistArticles) !== null && _this$partlistArticle4 !== void 0 ? _this$partlistArticle4 : {}).find(function (p) {
|
|
25720
|
-
return p.partlistArticleVisibleInTree;
|
|
25826
|
+
return p.partlistArticleVisibleInTree || p.partlistArticleStandalone;
|
|
25721
25827
|
})) return true;
|
|
25722
|
-
return this.partlistArticleVisibleInTree;
|
|
25828
|
+
return this.partlistArticleVisibleInTree || this.partlistArticleStandalone;
|
|
25723
25829
|
}
|
|
25724
25830
|
}, {
|
|
25725
25831
|
key: "partListParentArticle",
|
|
@@ -26180,13 +26286,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26180
26286
|
invisible: ops.isInvisible,
|
|
26181
26287
|
visibleOPVs: Object.values(ops.visibleOptionValues).map(function (v) {
|
|
26182
26288
|
return v.codex;
|
|
26183
|
-
})
|
|
26289
|
+
}),
|
|
26290
|
+
optName: ops.optionName
|
|
26184
26291
|
};
|
|
26185
26292
|
if (ops.freeText) {
|
|
26186
26293
|
ret[ops.optionCodex + '_val'] = {
|
|
26187
26294
|
selOPV: ops.freeText,
|
|
26188
26295
|
visibleOPVs: [],
|
|
26189
|
-
invisible: true
|
|
26296
|
+
invisible: true,
|
|
26297
|
+
optName: ''
|
|
26190
26298
|
};
|
|
26191
26299
|
}
|
|
26192
26300
|
}
|
|
@@ -26318,8 +26426,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26318
26426
|
_step14;
|
|
26319
26427
|
try {
|
|
26320
26428
|
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
26429
|
+
var _ops$idmVariantenArt;
|
|
26321
26430
|
var ops = _step14.value;
|
|
26322
|
-
if (ops.isDoShow && (!(ops.idmVariantenArt
|
|
26431
|
+
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) {
|
|
26323
26432
|
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 : ''));
|
|
26324
26433
|
}
|
|
26325
26434
|
}
|
|
@@ -26472,6 +26581,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26472
26581
|
}, {
|
|
26473
26582
|
key: "deletePartlistArticles",
|
|
26474
26583
|
value: function deletePartlistArticles() {
|
|
26584
|
+
for (var pl in this.article.partlistArticles) {
|
|
26585
|
+
this.article.partlistArticles[pl].deleted = true;
|
|
26586
|
+
}
|
|
26475
26587
|
if (Object.keys(this.article.partlistArticles).length) this.article.previousPartlistArticles = this.article.partlistArticles;
|
|
26476
26588
|
this.article.partlistArticles = {};
|
|
26477
26589
|
}
|
|
@@ -26762,9 +26874,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26762
26874
|
_step21;
|
|
26763
26875
|
try {
|
|
26764
26876
|
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
26765
|
-
var
|
|
26766
|
-
if (
|
|
26767
|
-
ret = this.checkOptionSearchOPV(
|
|
26877
|
+
var _ops4 = _step21.value;
|
|
26878
|
+
if (_ops4.option.ocd == optionCodex && _ops4.isDoShow && (parentOptionCodex == '' || parentOptionCodex == _ops4.option.parentOptionCodex)) {
|
|
26879
|
+
ret = this.checkOptionSearchOPV(_ops4.option, optionValueCodex, ret);
|
|
26768
26880
|
}
|
|
26769
26881
|
}
|
|
26770
26882
|
//fallback for pfister classification usecase
|
|
@@ -26777,9 +26889,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26777
26889
|
_step22;
|
|
26778
26890
|
try {
|
|
26779
26891
|
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
26780
|
-
var
|
|
26781
|
-
if (
|
|
26782
|
-
return this.checkOptionSearchOPV(
|
|
26892
|
+
var _ops5 = _step22.value;
|
|
26893
|
+
if (_ops5.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops5.option.parentOptionCodex)) {
|
|
26894
|
+
return this.checkOptionSearchOPV(_ops5.option, optionValueCodex, ret);
|
|
26783
26895
|
}
|
|
26784
26896
|
}
|
|
26785
26897
|
} catch (err) {
|
|
@@ -27002,6 +27114,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27002
27114
|
}
|
|
27003
27115
|
return visibleOptionValues[Object.keys(visibleOptionValues)[0]];
|
|
27004
27116
|
}
|
|
27117
|
+
}, {
|
|
27118
|
+
key: "getVariantValuesInfluencingAVLAVRFilter",
|
|
27119
|
+
value: function getVariantValuesInfluencingAVLAVRFilter() {
|
|
27120
|
+
var filterOptions = [(!this.CatalogData.isIDMFormat ? 'OPT' : '') + '89', (!this.CatalogData.isIDMFormat ? 'OPT' : '') + '90'];
|
|
27121
|
+
var variantValues = [];
|
|
27122
|
+
for (var i = 0; i < filterOptions.length; i++) {
|
|
27123
|
+
if (this.getArticleOptionState(filterOptions[i])) {
|
|
27124
|
+
variantValues = [].concat(_toConsumableArray(this.engine.getValuesInfluencingOPT(filterOptions[i])), _toConsumableArray(variantValues));
|
|
27125
|
+
}
|
|
27126
|
+
}
|
|
27127
|
+
return variantValues;
|
|
27128
|
+
}
|
|
27005
27129
|
}, {
|
|
27006
27130
|
key: "updateOptionsWithAddToMeasure",
|
|
27007
27131
|
value: function updateOptionsWithAddToMeasure(optionCodex) {
|
|
@@ -27072,7 +27196,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27072
27196
|
break;
|
|
27073
27197
|
}
|
|
27074
27198
|
_context.next = 4;
|
|
27075
|
-
return import('./ShelfPlanner-
|
|
27199
|
+
return import('./ShelfPlanner-750e93d3.js');
|
|
27076
27200
|
case 4:
|
|
27077
27201
|
_yield$import = _context.sent;
|
|
27078
27202
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -27135,6 +27259,39 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27135
27259
|
if (!this.partListParentArticle) return true;
|
|
27136
27260
|
return !!this.partListParentArticle.getArticleOptionStateFlat(opt) || this.partlistArticleVisibleInTree;
|
|
27137
27261
|
}
|
|
27262
|
+
}, {
|
|
27263
|
+
key: "afterInit",
|
|
27264
|
+
value: function () {
|
|
27265
|
+
var _afterInit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
27266
|
+
var variantValues, i, _ops$visibleOptionVal, ops, _ops$visibleOptionVal2;
|
|
27267
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
27268
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
27269
|
+
case 0:
|
|
27270
|
+
if (this.CatalogData.useDiomexConfigLogic) {
|
|
27271
|
+
_context2.next = 2;
|
|
27272
|
+
break;
|
|
27273
|
+
}
|
|
27274
|
+
return _context2.abrupt("return", {});
|
|
27275
|
+
case 2:
|
|
27276
|
+
variantValues = {};
|
|
27277
|
+
for (i = 0; i < this.articleOptionStates.length; i++) {
|
|
27278
|
+
ops = this.articleOptionStates[i];
|
|
27279
|
+
if (ops.val === undefined && Object.values((_ops$visibleOptionVal = ops.visibleOptionValues) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : {}).length && !ops.isInvisible) {
|
|
27280
|
+
variantValues[ops.optionCodex] = Object.values((_ops$visibleOptionVal2 = ops.visibleOptionValues) !== null && _ops$visibleOptionVal2 !== void 0 ? _ops$visibleOptionVal2 : {})[0].codex;
|
|
27281
|
+
}
|
|
27282
|
+
}
|
|
27283
|
+
return _context2.abrupt("return", variantValues);
|
|
27284
|
+
case 5:
|
|
27285
|
+
case "end":
|
|
27286
|
+
return _context2.stop();
|
|
27287
|
+
}
|
|
27288
|
+
}, _callee2, this);
|
|
27289
|
+
}));
|
|
27290
|
+
function afterInit() {
|
|
27291
|
+
return _afterInit.apply(this, arguments);
|
|
27292
|
+
}
|
|
27293
|
+
return afterInit;
|
|
27294
|
+
}()
|
|
27138
27295
|
}, {
|
|
27139
27296
|
key: "getValidValues",
|
|
27140
27297
|
value: function getValidValues(myValues, mergeOptionToSameOption, setConfigDoesOverWrite) {
|
|
@@ -27183,8 +27340,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27183
27340
|
}
|
|
27184
27341
|
}
|
|
27185
27342
|
for (var _key2 in myValues) {
|
|
27186
|
-
var
|
|
27187
|
-
if (
|
|
27343
|
+
var _ops6 = this.getArticleOptionState(_key2);
|
|
27344
|
+
if (_ops6) {
|
|
27188
27345
|
validValues[_key2] = myValues[_key2];
|
|
27189
27346
|
} else if (_key2.endsWith('_val') && this.getArticleOptionState(_key2.replace(/_val/g, ''))) {
|
|
27190
27347
|
validValues[_key2] = myValues[_key2];
|
|
@@ -27193,10 +27350,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27193
27350
|
_step24;
|
|
27194
27351
|
try {
|
|
27195
27352
|
for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
|
|
27196
|
-
var
|
|
27197
|
-
if (
|
|
27198
|
-
var values = this.checkOptionSearchOPV(
|
|
27199
|
-
if (values !== null && values !== void 0 && values.opv) validValues[
|
|
27353
|
+
var _ops7 = _step24.value;
|
|
27354
|
+
if (_ops7.optionOcd == _key2) {
|
|
27355
|
+
var values = this.checkOptionSearchOPV(_ops7.option, myValues[_key2], {});
|
|
27356
|
+
if (values !== null && values !== void 0 && values.opv) validValues[_ops7.optionCodex] = values.opv.codex;
|
|
27200
27357
|
}
|
|
27201
27358
|
}
|
|
27202
27359
|
} catch (err) {
|
|
@@ -27206,9 +27363,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27206
27363
|
}
|
|
27207
27364
|
}
|
|
27208
27365
|
//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
|
|
27209
|
-
if (
|
|
27210
|
-
var
|
|
27211
|
-
if ((
|
|
27366
|
+
if (_ops6) {
|
|
27367
|
+
var _ops6$valCodex;
|
|
27368
|
+
if ((_ops6$valCodex = _ops6.valCodex) !== null && _ops6$valCodex !== void 0 && _ops6$valCodex.startsWith('OPVSUB_') && !validValues[_key2 + '.' + _key2] && this.getArticleOptionState(_key2 + '.' + _key2)) {
|
|
27212
27369
|
validValues[_key2 + '.' + _key2] = myValues[_key2];
|
|
27213
27370
|
}
|
|
27214
27371
|
}
|
|
@@ -27548,7 +27705,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27548
27705
|
var ops = _step28.value;
|
|
27549
27706
|
var OP = ops.optionCodex;
|
|
27550
27707
|
if (ops) {
|
|
27551
|
-
var
|
|
27708
|
+
var _ops$idmVariantenArt2;
|
|
27709
|
+
var doHideSizeOption = [95, 96, 97, 1095, 1096, 1097].includes((_ops$idmVariantenArt2 = ops.idmVariantenArt) !== null && _ops$idmVariantenArt2 !== void 0 ? _ops$idmVariantenArt2 : 0);
|
|
27552
27710
|
if (ops.isVisibleFreeText == true) {
|
|
27553
27711
|
doHideSizeOption = false;
|
|
27554
27712
|
}
|
|
@@ -27719,15 +27877,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27719
27877
|
value: function validateAndSetNewConfigValues(newConfigValues) {
|
|
27720
27878
|
var freeTextValues = {};
|
|
27721
27879
|
for (var key in newConfigValues) {
|
|
27722
|
-
var
|
|
27880
|
+
var _ops8, _ops9, _newConfigValues$key;
|
|
27723
27881
|
var ops = this.getArticleOptionState(key);
|
|
27724
27882
|
var _this$parentOptionCod5 = this.parentOptionCodex(key),
|
|
27725
27883
|
optionCodex = _this$parentOptionCod5.optionCodex,
|
|
27726
27884
|
partenOptionCodex = _this$parentOptionCod5.partenOptionCodex;
|
|
27727
|
-
if ((
|
|
27885
|
+
if ((_ops8 = ops) !== null && _ops8 !== void 0 && _ops8.isMultiselect) {
|
|
27728
27886
|
ops = this.handleMultiselect(ops, newConfigValues, key);
|
|
27729
27887
|
}
|
|
27730
|
-
if ((
|
|
27888
|
+
if ((_ops9 = ops) !== null && _ops9 !== void 0 && _ops9.isFreeText) {
|
|
27731
27889
|
this.handleFreeText(ops, newConfigValues, key, freeTextValues);
|
|
27732
27890
|
}
|
|
27733
27891
|
var opvCodex = (_newConfigValues$key = newConfigValues[key]) === null || _newConfigValues$key === void 0 ? void 0 : _newConfigValues$key.split(';')[0];
|
|
@@ -27738,8 +27896,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27738
27896
|
var myFreeText = foundItem.opv.isFreeText ? newConfigValues[optionCodex + '_val'] : undefined;
|
|
27739
27897
|
this.engine.updateArtOPV(foundItem.opv, foundItem.opt.codex, this.getArticleOptionState(foundItem.opt.codex), myFreeText);
|
|
27740
27898
|
} else {
|
|
27741
|
-
var
|
|
27742
|
-
if (ops && !((
|
|
27899
|
+
var _ops10;
|
|
27900
|
+
if (ops && !((_ops10 = ops) !== null && _ops10 !== void 0 && _ops10.isFreeText)) {
|
|
27743
27901
|
// to initialize freetexts where the freetext is not the only selectable opv in the options
|
|
27744
27902
|
this.checkIfSelectableOpvIsFreetext(ops, opvCodex, newConfigValues);
|
|
27745
27903
|
}
|
|
@@ -27996,7 +28154,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
27996
28154
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27997
28155
|
case 0:
|
|
27998
28156
|
if (!(article.articleType == 'OPTION' || article.articleType == 'OPTIONTREE')) {
|
|
27999
|
-
_context5.next =
|
|
28157
|
+
_context5.next = 11;
|
|
28000
28158
|
break;
|
|
28001
28159
|
}
|
|
28002
28160
|
_context5.next = 3;
|
|
@@ -28005,13 +28163,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28005
28163
|
_context5.next = 5;
|
|
28006
28164
|
return this.updateCfgValues(article, defaultValues, variantValues);
|
|
28007
28165
|
case 5:
|
|
28008
|
-
if (!(
|
|
28166
|
+
if (!(from === 'initializingPartlist')) {
|
|
28009
28167
|
_context5.next = 8;
|
|
28010
28168
|
break;
|
|
28011
28169
|
}
|
|
28012
28170
|
_context5.next = 8;
|
|
28013
|
-
return
|
|
28171
|
+
return this.updateEmptyOption(article);
|
|
28014
28172
|
case 8:
|
|
28173
|
+
if (!(article.set.PlannerMode !== 'BoxPlanner')) {
|
|
28174
|
+
_context5.next = 11;
|
|
28175
|
+
break;
|
|
28176
|
+
}
|
|
28177
|
+
_context5.next = 11;
|
|
28178
|
+
return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, defaultValues, [article.basketId], ignorePlanner, from);
|
|
28179
|
+
case 11:
|
|
28015
28180
|
case "end":
|
|
28016
28181
|
return _context5.stop();
|
|
28017
28182
|
}
|
|
@@ -28037,7 +28202,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28037
28202
|
key: "updateArticlesOptionStates",
|
|
28038
28203
|
value: function () {
|
|
28039
28204
|
var _updateArticlesOptionStates = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(myValues, targetArticlesWithNewValues, targetArticlesToUpdate, articles, from) {
|
|
28040
|
-
var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, actArticle,
|
|
28205
|
+
var newEDOExtraArticles, partlistArticlesToLoad, valuesArray, i, _actArticle, actArticle, newPLATL, _actArticle$checkDefa, variantValues, triggerUpdate, pla;
|
|
28041
28206
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
28042
28207
|
while (1) switch (_context6.prev = _context6.next) {
|
|
28043
28208
|
case 0:
|
|
@@ -28047,74 +28212,79 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28047
28212
|
i = 0;
|
|
28048
28213
|
case 4:
|
|
28049
28214
|
if (!(i < targetArticlesToUpdate.length)) {
|
|
28050
|
-
_context6.next =
|
|
28215
|
+
_context6.next = 40;
|
|
28051
28216
|
break;
|
|
28052
28217
|
}
|
|
28053
28218
|
valuesArray[i] = {};
|
|
28054
28219
|
actArticle = articles[targetArticlesToUpdate[i]];
|
|
28220
|
+
if ((_actArticle = actArticle) !== null && _actArticle !== void 0 && _actArticle.deleted && actArticle.isPartListArticle && actArticle.partListParentArticle) {
|
|
28221
|
+
actArticle = actArticle.partListParentArticle.partlistArticles[actArticle.basketId];
|
|
28222
|
+
}
|
|
28055
28223
|
if (!(!actArticle || actArticle.deleted)) {
|
|
28056
|
-
_context6.next =
|
|
28224
|
+
_context6.next = 12;
|
|
28057
28225
|
break;
|
|
28058
28226
|
}
|
|
28059
28227
|
targetArticlesToUpdate.splice(i, 1);
|
|
28060
28228
|
i--;
|
|
28061
|
-
return _context6.abrupt("continue",
|
|
28062
|
-
case
|
|
28229
|
+
return _context6.abrupt("continue", 37);
|
|
28230
|
+
case 12:
|
|
28063
28231
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
28064
28232
|
valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
28065
28233
|
}
|
|
28066
28234
|
|
|
28067
28235
|
//only set config if valuesArray are not empty or the article is initializing
|
|
28236
|
+
newPLATL = void 0; // partlistarticle to load
|
|
28068
28237
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
28069
|
-
_context6.next =
|
|
28238
|
+
_context6.next = 29;
|
|
28070
28239
|
break;
|
|
28071
28240
|
}
|
|
28072
|
-
_context6.next =
|
|
28241
|
+
_context6.next = 17;
|
|
28073
28242
|
return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
|
|
28074
|
-
case
|
|
28075
|
-
|
|
28243
|
+
case 17:
|
|
28244
|
+
newPLATL = _context6.sent;
|
|
28076
28245
|
_actArticle$checkDefa = actArticle.checkDefaultGlobalOpt(valuesArray[i]), variantValues = _actArticle$checkDefa.variantValues, triggerUpdate = _actArticle$checkDefa.triggerUpdate;
|
|
28077
28246
|
valuesArray[i] = variantValues;
|
|
28078
|
-
_context6.next =
|
|
28247
|
+
_context6.next = 22;
|
|
28079
28248
|
return this.updateAccessoriesFromGlobalOption(valuesArray[i], actArticle);
|
|
28080
|
-
case
|
|
28249
|
+
case 22:
|
|
28081
28250
|
if (!triggerUpdate) {
|
|
28082
|
-
_context6.next =
|
|
28251
|
+
_context6.next = 26;
|
|
28083
28252
|
break;
|
|
28084
28253
|
}
|
|
28085
|
-
_context6.next =
|
|
28254
|
+
_context6.next = 25;
|
|
28086
28255
|
return this.updateCfgValues(actArticle, valuesArray[i], {}, undefined, undefined, from == 'calcVariant');
|
|
28087
|
-
case
|
|
28088
|
-
|
|
28089
|
-
case
|
|
28090
|
-
partlistArticlesToLoad = partlistArticlesToLoad.concat(newPartlistArticlesToLoad);
|
|
28256
|
+
case 25:
|
|
28257
|
+
newPLATL = _context6.sent;
|
|
28258
|
+
case 26:
|
|
28091
28259
|
newEDOExtraArticles = this.checkEDOArticles(articles);
|
|
28092
|
-
_context6.next =
|
|
28260
|
+
_context6.next = 32;
|
|
28093
28261
|
break;
|
|
28094
|
-
case
|
|
28095
|
-
_context6.t0 = partlistArticlesToLoad;
|
|
28262
|
+
case 29:
|
|
28096
28263
|
_context6.next = 31;
|
|
28097
28264
|
return this.updateCfgValues(actArticle, {}, {}, undefined, undefined, from == 'calcVariant');
|
|
28098
28265
|
case 31:
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
|
|
28266
|
+
newPLATL = _context6.sent;
|
|
28267
|
+
case 32:
|
|
28268
|
+
_context6.next = 34;
|
|
28269
|
+
return this.updateEmptyOption(actArticle);
|
|
28270
|
+
case 34:
|
|
28271
|
+
pla = _context6.sent;
|
|
28272
|
+
if (pla !== undefined) newPLATL = pla;
|
|
28273
|
+
partlistArticlesToLoad = partlistArticlesToLoad.concat(newPLATL);
|
|
28274
|
+
case 37:
|
|
28102
28275
|
i++;
|
|
28103
28276
|
_context6.next = 4;
|
|
28104
28277
|
break;
|
|
28105
|
-
case 36:
|
|
28106
|
-
_context6.next = 38;
|
|
28107
|
-
return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
|
|
28108
|
-
case 38:
|
|
28109
|
-
_context6.next = 40;
|
|
28110
|
-
return this.triggerMoreUpdates(targetArticlesToUpdate, valuesArray, articles, from);
|
|
28111
28278
|
case 40:
|
|
28279
|
+
_context6.next = 42;
|
|
28280
|
+
return this.triggerUpdateOnVisiblePartilstArticles(targetArticlesToUpdate, articles);
|
|
28281
|
+
case 42:
|
|
28112
28282
|
return _context6.abrupt("return", {
|
|
28113
28283
|
newEDOExtraArticles: newEDOExtraArticles,
|
|
28114
28284
|
targetArticlesToUpdate: targetArticlesToUpdate,
|
|
28115
28285
|
partlistArticlesToLoad: partlistArticlesToLoad
|
|
28116
28286
|
});
|
|
28117
|
-
case
|
|
28287
|
+
case 43:
|
|
28118
28288
|
case "end":
|
|
28119
28289
|
return _context6.stop();
|
|
28120
28290
|
}
|
|
@@ -28126,38 +28296,38 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28126
28296
|
return updateArticlesOptionStates;
|
|
28127
28297
|
}()
|
|
28128
28298
|
}, {
|
|
28129
|
-
key: "
|
|
28299
|
+
key: "triggerUpdateOnVisiblePartilstArticles",
|
|
28130
28300
|
value: function () {
|
|
28131
|
-
var
|
|
28132
|
-
var
|
|
28301
|
+
var _triggerUpdateOnVisiblePartilstArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(targetArticlesToUpdate, articles) {
|
|
28302
|
+
var _articles$targetArtic;
|
|
28303
|
+
var key, configuredArticle, toIgnore, actArticle;
|
|
28133
28304
|
return _regeneratorRuntime.wrap(function _callee6$(_context7) {
|
|
28134
28305
|
while (1) switch (_context7.prev = _context7.next) {
|
|
28135
28306
|
case 0:
|
|
28136
|
-
if (!(
|
|
28137
|
-
_context7.next =
|
|
28307
|
+
if (!((_articles$targetArtic = articles[targetArticlesToUpdate[0]]) !== null && _articles$targetArtic !== void 0 && _articles$targetArtic.hasPartlistArticleVisibleInTree)) {
|
|
28308
|
+
_context7.next = 13;
|
|
28138
28309
|
break;
|
|
28139
28310
|
}
|
|
28140
|
-
|
|
28311
|
+
_context7.t0 = _regeneratorRuntime.keys(articles);
|
|
28141
28312
|
case 2:
|
|
28142
|
-
|
|
28143
|
-
case 3:
|
|
28144
|
-
if (!(i < targetArticlesToUpdate.length)) {
|
|
28313
|
+
if ((_context7.t1 = _context7.t0()).done) {
|
|
28145
28314
|
_context7.next = 13;
|
|
28146
28315
|
break;
|
|
28147
28316
|
}
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28317
|
+
key = _context7.t1.value;
|
|
28318
|
+
configuredArticle = articles[targetArticlesToUpdate[0]];
|
|
28319
|
+
toIgnore = configuredArticle.pushParentId();
|
|
28320
|
+
if (![configuredArticle.basketId].concat(_toConsumableArray(toIgnore)).includes(key)) {
|
|
28321
|
+
_context7.next = 8;
|
|
28151
28322
|
break;
|
|
28152
28323
|
}
|
|
28153
|
-
_context7.
|
|
28154
|
-
return this.updateCfgValues(article, valuesArray[i], {});
|
|
28324
|
+
return _context7.abrupt("continue", 2);
|
|
28155
28325
|
case 8:
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
_context7.next =
|
|
28326
|
+
actArticle = articles[key];
|
|
28327
|
+
_context7.next = 11;
|
|
28328
|
+
return this.updateCfgValues(actArticle, {}, {});
|
|
28329
|
+
case 11:
|
|
28330
|
+
_context7.next = 2;
|
|
28161
28331
|
break;
|
|
28162
28332
|
case 13:
|
|
28163
28333
|
case "end":
|
|
@@ -28165,55 +28335,43 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28165
28335
|
}
|
|
28166
28336
|
}, _callee6, this);
|
|
28167
28337
|
}));
|
|
28168
|
-
function
|
|
28169
|
-
return
|
|
28338
|
+
function triggerUpdateOnVisiblePartilstArticles(_x19, _x20) {
|
|
28339
|
+
return _triggerUpdateOnVisiblePartilstArticles.apply(this, arguments);
|
|
28170
28340
|
}
|
|
28171
|
-
return
|
|
28341
|
+
return triggerUpdateOnVisiblePartilstArticles;
|
|
28172
28342
|
}()
|
|
28173
28343
|
}, {
|
|
28174
|
-
key: "
|
|
28344
|
+
key: "updateEmptyOption",
|
|
28175
28345
|
value: function () {
|
|
28176
|
-
var
|
|
28177
|
-
var
|
|
28178
|
-
var key, configuredArticle, toIgnore, actArticle;
|
|
28346
|
+
var _updateEmptyOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(article) {
|
|
28347
|
+
var emyptsOptionsToSet;
|
|
28179
28348
|
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
28180
28349
|
while (1) switch (_context8.prev = _context8.next) {
|
|
28181
28350
|
case 0:
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
break;
|
|
28185
|
-
}
|
|
28186
|
-
_context8.t0 = _regeneratorRuntime.keys(articles);
|
|
28351
|
+
_context8.next = 2;
|
|
28352
|
+
return article.afterInit();
|
|
28187
28353
|
case 2:
|
|
28188
|
-
|
|
28189
|
-
|
|
28354
|
+
emyptsOptionsToSet = _context8.sent;
|
|
28355
|
+
if (!Object.keys(emyptsOptionsToSet).length) {
|
|
28356
|
+
_context8.next = 7;
|
|
28190
28357
|
break;
|
|
28191
28358
|
}
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
|
|
28198
|
-
}
|
|
28199
|
-
return _context8.abrupt("continue", 2);
|
|
28359
|
+
_context8.next = 6;
|
|
28360
|
+
return this.updateCfgValues(article, emyptsOptionsToSet, {});
|
|
28361
|
+
case 6:
|
|
28362
|
+
return _context8.abrupt("return", _context8.sent);
|
|
28363
|
+
case 7:
|
|
28364
|
+
return _context8.abrupt("return", undefined);
|
|
28200
28365
|
case 8:
|
|
28201
|
-
actArticle = articles[key];
|
|
28202
|
-
_context8.next = 11;
|
|
28203
|
-
return this.updateCfgValues(actArticle, {}, {});
|
|
28204
|
-
case 11:
|
|
28205
|
-
_context8.next = 2;
|
|
28206
|
-
break;
|
|
28207
|
-
case 13:
|
|
28208
28366
|
case "end":
|
|
28209
28367
|
return _context8.stop();
|
|
28210
28368
|
}
|
|
28211
28369
|
}, _callee7, this);
|
|
28212
28370
|
}));
|
|
28213
|
-
function
|
|
28214
|
-
return
|
|
28371
|
+
function updateEmptyOption(_x21) {
|
|
28372
|
+
return _updateEmptyOption.apply(this, arguments);
|
|
28215
28373
|
}
|
|
28216
|
-
return
|
|
28374
|
+
return updateEmptyOption;
|
|
28217
28375
|
}()
|
|
28218
28376
|
}, {
|
|
28219
28377
|
key: "updateAccessoriesFromGlobalOption",
|
|
@@ -28242,7 +28400,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28242
28400
|
}
|
|
28243
28401
|
}, _callee8, this);
|
|
28244
28402
|
}));
|
|
28245
|
-
function updateAccessoriesFromGlobalOption(
|
|
28403
|
+
function updateAccessoriesFromGlobalOption(_x22, _x23) {
|
|
28246
28404
|
return _updateAccessoriesFromGlobalOption.apply(this, arguments);
|
|
28247
28405
|
}
|
|
28248
28406
|
return updateAccessoriesFromGlobalOption;
|
|
@@ -28480,12 +28638,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28480
28638
|
_iterator3.f();
|
|
28481
28639
|
return _context11.finish(30);
|
|
28482
28640
|
case 33:
|
|
28641
|
+
if (article.plannerData) article.plannerData.varaintValuesInfluencingAVLAVRFilter = article.getVariantValuesInfluencingAVLAVRFilter();
|
|
28642
|
+
case 34:
|
|
28483
28643
|
case "end":
|
|
28484
28644
|
return _context11.stop();
|
|
28485
28645
|
}
|
|
28486
28646
|
}, _callee9, null, [[12, 27, 30, 33]]);
|
|
28487
28647
|
}));
|
|
28488
|
-
function initCfgValues(
|
|
28648
|
+
function initCfgValues(_x24, _x25, _x26) {
|
|
28489
28649
|
return _initCfgValues.apply(this, arguments);
|
|
28490
28650
|
}
|
|
28491
28651
|
return initCfgValues;
|
|
@@ -28505,7 +28665,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28505
28665
|
}
|
|
28506
28666
|
}, _callee10, this);
|
|
28507
28667
|
}));
|
|
28508
|
-
function setValidVariantValues(
|
|
28668
|
+
function setValidVariantValues(_x27) {
|
|
28509
28669
|
return _setValidVariantValues.apply(this, arguments);
|
|
28510
28670
|
}
|
|
28511
28671
|
return setValidVariantValues;
|
|
@@ -28591,7 +28751,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28591
28751
|
}
|
|
28592
28752
|
}, _callee11, this);
|
|
28593
28753
|
}));
|
|
28594
|
-
function updateCfgValues(
|
|
28754
|
+
function updateCfgValues(_x28, _x29, _x30, _x31, _x32, _x33) {
|
|
28595
28755
|
return _updateCfgValues.apply(this, arguments);
|
|
28596
28756
|
}
|
|
28597
28757
|
return updateCfgValues;
|
|
@@ -28648,7 +28808,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28648
28808
|
}
|
|
28649
28809
|
}, _callee12, this);
|
|
28650
28810
|
}));
|
|
28651
|
-
function updateLastElement(
|
|
28811
|
+
function updateLastElement(_x34) {
|
|
28652
28812
|
return _updateLastElement.apply(this, arguments);
|
|
28653
28813
|
}
|
|
28654
28814
|
return updateLastElement;
|
|
@@ -28690,7 +28850,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28690
28850
|
}
|
|
28691
28851
|
}, _callee13);
|
|
28692
28852
|
}));
|
|
28693
|
-
function updateOption(
|
|
28853
|
+
function updateOption(_x35, _x36, _x37, _x38) {
|
|
28694
28854
|
return _updateOption.apply(this, arguments);
|
|
28695
28855
|
}
|
|
28696
28856
|
return updateOption;
|
|
@@ -28732,7 +28892,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28732
28892
|
}
|
|
28733
28893
|
}, _callee14, this);
|
|
28734
28894
|
}));
|
|
28735
|
-
function evalAndLoadPartlistArticles(
|
|
28895
|
+
function evalAndLoadPartlistArticles(_x39, _x40, _x41) {
|
|
28736
28896
|
return _evalAndLoadPartlistArticles.apply(this, arguments);
|
|
28737
28897
|
}
|
|
28738
28898
|
return evalAndLoadPartlistArticles;
|
|
@@ -28771,7 +28931,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28771
28931
|
}
|
|
28772
28932
|
}, _callee15, this);
|
|
28773
28933
|
}));
|
|
28774
|
-
function loadPartlistArticles(
|
|
28934
|
+
function loadPartlistArticles(_x42, _x43, _x44) {
|
|
28775
28935
|
return _loadPartlistArticles.apply(this, arguments);
|
|
28776
28936
|
}
|
|
28777
28937
|
return loadPartlistArticles;
|
|
@@ -28781,7 +28941,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28781
28941
|
key: "loadPartlistArticle",
|
|
28782
28942
|
value: function () {
|
|
28783
28943
|
var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doLoadItem, article, newConfigValues) {
|
|
28784
|
-
var nArticle;
|
|
28944
|
+
var nArticle, _doLoadItem$VariantVa;
|
|
28785
28945
|
return _regeneratorRuntime.wrap(function _callee16$(_context18) {
|
|
28786
28946
|
while (1) switch (_context18.prev = _context18.next) {
|
|
28787
28947
|
case 0:
|
|
@@ -28795,7 +28955,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28795
28955
|
}
|
|
28796
28956
|
doLoadItem.BasketID = nArticle.basketId;
|
|
28797
28957
|
_context18.next = 7;
|
|
28798
|
-
return this.toDoAfterArticleLoaded(nArticle, {},
|
|
28958
|
+
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);
|
|
28799
28959
|
case 7:
|
|
28800
28960
|
article.addPartlistArticle(nArticle);
|
|
28801
28961
|
case 8:
|
|
@@ -28804,7 +28964,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28804
28964
|
}
|
|
28805
28965
|
}, _callee16, this);
|
|
28806
28966
|
}));
|
|
28807
|
-
function loadPartlistArticle(
|
|
28967
|
+
function loadPartlistArticle(_x45, _x46, _x47) {
|
|
28808
28968
|
return _loadPartlistArticle.apply(this, arguments);
|
|
28809
28969
|
}
|
|
28810
28970
|
return loadPartlistArticle;
|
|
@@ -28834,6 +28994,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28834
28994
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
28835
28995
|
initDecisions: doLoadItem.initDecisions,
|
|
28836
28996
|
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
28997
|
+
partlistArticleStandalone: doLoadItem.ConfigurationMode,
|
|
28837
28998
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
28838
28999
|
optionImgForPrint: doLoadItem.optionImgForPrint,
|
|
28839
29000
|
catalogCodex: doLoadItem.CatalogCodex
|
|
@@ -28965,7 +29126,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28965
29126
|
}
|
|
28966
29127
|
}, _callee17, this);
|
|
28967
29128
|
}));
|
|
28968
|
-
function evalOpvsOnOpvsConstructionRules(
|
|
29129
|
+
function evalOpvsOnOpvsConstructionRules(_x48) {
|
|
28969
29130
|
return _evalOpvsOnOpvsConstructionRules.apply(this, arguments);
|
|
28970
29131
|
}
|
|
28971
29132
|
return evalOpvsOnOpvsConstructionRules;
|
|
@@ -29168,7 +29329,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29168
29329
|
}
|
|
29169
29330
|
}, _callee18);
|
|
29170
29331
|
}));
|
|
29171
|
-
function triggerShelfplannerVisibility(
|
|
29332
|
+
function triggerShelfplannerVisibility(_x49, _x50) {
|
|
29172
29333
|
return _triggerShelfplannerVisibility.apply(this, arguments);
|
|
29173
29334
|
}
|
|
29174
29335
|
return triggerShelfplannerVisibility;
|
|
@@ -29245,7 +29406,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29245
29406
|
IsPartlistArticle: article.isPartListArticle,
|
|
29246
29407
|
IsPlannerElement: article.hasCatalogPlannerArticle,
|
|
29247
29408
|
HasPartlistArticle: article.hasPartlistArticle,
|
|
29248
|
-
PartlistArticleInvisibility: !article.partlistArticleVisibleInTree && !article.optionsForPrint,
|
|
29409
|
+
PartlistArticleInvisibility: !article.partlistArticleVisibleInTree && !article.optionsForPrint && !article.partlistArticleStandalone,
|
|
29249
29410
|
SendToSAP: article.sendToSap,
|
|
29250
29411
|
ShelfPlandata: article.shelfPlanner ? DivaUtils.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,
|
|
29251
29412
|
MetaData: !hasFavorites ? article.MetaData : undefined,
|
|
@@ -29492,7 +29653,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29492
29653
|
}
|
|
29493
29654
|
}, _callee19, this);
|
|
29494
29655
|
}));
|
|
29495
|
-
function correctPartlistArticlesByGlobalRules(
|
|
29656
|
+
function correctPartlistArticlesByGlobalRules(_x51, _x52, _x53, _x54) {
|
|
29496
29657
|
return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
|
|
29497
29658
|
}
|
|
29498
29659
|
return correctPartlistArticlesByGlobalRules;
|
|
@@ -30155,7 +30316,7 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
30155
30316
|
var myOption = myTabGroup.options[lKey];
|
|
30156
30317
|
if (myOption.idmVariantType) {
|
|
30157
30318
|
var _catalog$getOption;
|
|
30158
|
-
var opgPairs = [[2, 3], [4, 5], [6, 7], [11, 12]
|
|
30319
|
+
var opgPairs = [[2, 3], [4, 5], [6, 7], [11, 12]];
|
|
30159
30320
|
for (var i = 0; i < opgPairs.length; i++) {
|
|
30160
30321
|
var optionStep = this.getOptionWhereIDMVariantIs(iKey, opgPairs[i][1]);
|
|
30161
30322
|
if (myOption.idmVariantType == opgPairs[i][0] && optionStep && !optionStep.mergesToOPG) {
|
|
@@ -30410,6 +30571,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
30410
30571
|
_defineProperty(this, "matchingOrigProduct", void 0);
|
|
30411
30572
|
_defineProperty(this, "_supplierColors", void 0);
|
|
30412
30573
|
_defineProperty(this, "_logDecisions", false);
|
|
30574
|
+
_defineProperty(this, "_logTotalStateForVariants", false);
|
|
30413
30575
|
/**Favorits state */
|
|
30414
30576
|
_defineProperty(this, "_handlelingCurrentFavorites", false);
|
|
30415
30577
|
_defineProperty(this, "_favorites", {
|
|
@@ -31683,7 +31845,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31683
31845
|
break;
|
|
31684
31846
|
}
|
|
31685
31847
|
_context5.next = 3;
|
|
31686
|
-
return import('./DoorPlanner-
|
|
31848
|
+
return import('./DoorPlanner-be8b2d1d.js');
|
|
31687
31849
|
case 3:
|
|
31688
31850
|
_yield$import = _context5.sent;
|
|
31689
31851
|
DoorPlanner = _yield$import["default"];
|
|
@@ -31850,6 +32012,14 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31850
32012
|
set: function set(val) {
|
|
31851
32013
|
this._logDecisions = val;
|
|
31852
32014
|
}
|
|
32015
|
+
}, {
|
|
32016
|
+
key: "logTotalStateForVariants",
|
|
32017
|
+
get: function get() {
|
|
32018
|
+
return this._logTotalStateForVariants;
|
|
32019
|
+
},
|
|
32020
|
+
set: function set(val) {
|
|
32021
|
+
this._logTotalStateForVariants = val;
|
|
32022
|
+
}
|
|
31853
32023
|
}, {
|
|
31854
32024
|
key: "showAccessioreOnLastTab",
|
|
31855
32025
|
get: function get() {
|
|
@@ -31867,6 +32037,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31867
32037
|
var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
|
|
31868
32038
|
clonedSet.setData = _objectSpread$c({}, this.setData);
|
|
31869
32039
|
clonedSet.configSingle = this.configSingle;
|
|
32040
|
+
clonedSet.logTotalStateForVariants = this.logTotalStateForVariants;
|
|
31870
32041
|
var articles = this.getDivaArticles();
|
|
31871
32042
|
//if boxplanner needs to be working, the planner needs to be cloned too
|
|
31872
32043
|
//this.setState.plannerHandler = this.setState.plannerHandler.clonePlannerHandler(clonedSet, this);
|
|
@@ -33648,7 +33819,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
33648
33819
|
}
|
|
33649
33820
|
configStepKey = configStepKey + '_' + 'acc' + (set.CatalogData.forceConfigAllAccessoires ? article.articleCodex : basketId);
|
|
33650
33821
|
}
|
|
33651
|
-
var plaBasketIds = Object.keys(articles[basketId].getRecursivePartlistArticles(true));
|
|
33822
|
+
var plaBasketIds = Object.keys(articles[basketId].getRecursivePartlistArticles(true, true));
|
|
33652
33823
|
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);
|
|
33653
33824
|
var isAccessoire = !!article.relatedToBasketId ? article.articleCodex : false;
|
|
33654
33825
|
if (!configTree.getTabGroupByCodex(tabGroupCodex)) {
|
|
@@ -34074,7 +34245,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34074
34245
|
notTotallyMatichingOPVs = false,
|
|
34075
34246
|
myOptionState = undefined;
|
|
34076
34247
|
for (var i = 0; i < configStep.targetArticles.length; i++) {
|
|
34077
|
-
var _myOptionState;
|
|
34248
|
+
var _myOptionState, _myOptionState$idmVar;
|
|
34078
34249
|
var article = articles[configStep.targetArticles[i]];
|
|
34079
34250
|
myOptionState = article.getArticleOptionState(configStep.option);
|
|
34080
34251
|
if (!myOptionState) throw new Error('myOptionState ' + configStep.option + ' is undefined');
|
|
@@ -34086,7 +34257,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
34086
34257
|
if (myOptionState.isFreeText && myOptionState.freeTextLang) {
|
|
34087
34258
|
freeTextLang = myOptionState.freeTextLang;
|
|
34088
34259
|
}
|
|
34089
|
-
if (myOptionState.headerPosVariationType == 'V' || myOptionState.idmVariantenArt
|
|
34260
|
+
if (myOptionState.headerPosVariationType == 'V' || [35, 1035].includes((_myOptionState$idmVar = myOptionState.idmVariantenArt) !== null && _myOptionState$idmVar !== void 0 ? _myOptionState$idmVar : 0)) {
|
|
34090
34261
|
// 35 is the seatingheight. Articles should not be albe to have different seatheight
|
|
34091
34262
|
//get schnittmenge of all the articles
|
|
34092
34263
|
if (i === 0) {
|
|
@@ -36163,7 +36334,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36163
36334
|
var _article$partListPare, _article$partListPare2;
|
|
36164
36335
|
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 : '');
|
|
36165
36336
|
});
|
|
36166
|
-
if (group) {
|
|
36337
|
+
if (group && !article.partlistArticleStandalone) {
|
|
36167
36338
|
group.push(article.basketId);
|
|
36168
36339
|
} else {
|
|
36169
36340
|
groupedArticles.push([article.basketId]);
|
|
@@ -36280,16 +36451,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36280
36451
|
case 2:
|
|
36281
36452
|
opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
|
|
36282
36453
|
previewType = set.api.pricePreview;
|
|
36283
|
-
if (!(!opt ||
|
|
36454
|
+
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'))) {
|
|
36284
36455
|
_context26.next = 6;
|
|
36285
36456
|
break;
|
|
36286
36457
|
}
|
|
36287
36458
|
return _context26.abrupt("return", configItems);
|
|
36288
36459
|
case 6:
|
|
36460
|
+
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)))) {
|
|
36461
|
+
_context26.next = 9;
|
|
36462
|
+
break;
|
|
36463
|
+
}
|
|
36464
|
+
if (set.logTotalStateForVariants) {
|
|
36465
|
+
_context26.next = 9;
|
|
36466
|
+
break;
|
|
36467
|
+
}
|
|
36468
|
+
return _context26.abrupt("return", configItems);
|
|
36469
|
+
case 9:
|
|
36289
36470
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
36290
|
-
_context26.next =
|
|
36471
|
+
_context26.next = 12;
|
|
36291
36472
|
return this.calcVariants(set, configItems, targetArticles, opt.codex);
|
|
36292
|
-
case
|
|
36473
|
+
case 12:
|
|
36293
36474
|
variants = _context26.sent;
|
|
36294
36475
|
if (previewType) {
|
|
36295
36476
|
configItems.map(function (c, index) {
|
|
@@ -36300,7 +36481,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36300
36481
|
});
|
|
36301
36482
|
}
|
|
36302
36483
|
return _context26.abrupt("return", configItems);
|
|
36303
|
-
case
|
|
36484
|
+
case 15:
|
|
36304
36485
|
case "end":
|
|
36305
36486
|
return _context26.stop();
|
|
36306
36487
|
}
|
|
@@ -36321,7 +36502,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36321
36502
|
case 0:
|
|
36322
36503
|
variantInfo = [];
|
|
36323
36504
|
set = realSet.cloneSet();
|
|
36324
|
-
articles = set.getDivaArticles();
|
|
36505
|
+
articles = set.getDivaArticles(true);
|
|
36325
36506
|
origPrice = set.getSetPrice();
|
|
36326
36507
|
articleConfigs = {};
|
|
36327
36508
|
for (i = 0; i < targetArticles.length; i++) {
|
|
@@ -36428,7 +36609,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36428
36609
|
}
|
|
36429
36610
|
hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
|
|
36430
36611
|
dataHash = set.CatalogData.getVariantsPriceByHash(hash);
|
|
36431
|
-
if (!dataHash) {
|
|
36612
|
+
if (!(dataHash && (!set.logTotalStateForVariants || dataHash.articleSnapshot))) {
|
|
36432
36613
|
_context28.next = 21;
|
|
36433
36614
|
break;
|
|
36434
36615
|
}
|
|
@@ -36463,7 +36644,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
36463
36644
|
calcTime: calcTime,
|
|
36464
36645
|
firstPrice: firstPrice,
|
|
36465
36646
|
variantValues: hashVariantValues,
|
|
36466
|
-
hashObj: [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))
|
|
36647
|
+
hashObj: [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))),
|
|
36648
|
+
articleSnapshot: set.logTotalStateForVariants ? set.cloneSet().getDivaArticles() : undefined
|
|
36467
36649
|
};
|
|
36468
36650
|
set.CatalogData.setVariantsPriceByHash(hash, priceObj);
|
|
36469
36651
|
return _context28.abrupt("return", priceObj);
|
|
@@ -37532,7 +37714,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37532
37714
|
this.plannerConfig = plannerConfig;
|
|
37533
37715
|
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
37534
37716
|
this._handler = plannerConfig.handler;
|
|
37535
|
-
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex
|
|
37717
|
+
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'))) {
|
|
37536
37718
|
LOG$8.error(new DivaError('Keine Öffnungsparameter', {
|
|
37537
37719
|
code: 'WC_0003'
|
|
37538
37720
|
}));
|
|
@@ -37659,7 +37841,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37659
37841
|
case 22:
|
|
37660
37842
|
this.baskets[this.divaNr] = this.plannerConfig.basketData;
|
|
37661
37843
|
if (!this.baskets[this.divaNr].CustomerJourneyId) this.baskets[this.divaNr].CustomerJourneyId = nanoid();
|
|
37662
|
-
if (this.actBasket.OrigCatalogCodex) {
|
|
37844
|
+
if (this.actBasket.OrigCatalogCodex !== undefined) {
|
|
37663
37845
|
this.origConfiguration.originCatalogCodex = this.actBasket.OrigCatalogCodex;
|
|
37664
37846
|
this.origConfiguration.originArticleCodexes = this.actBasket.OrigArticleCodexes;
|
|
37665
37847
|
} else if (this.actBasket.OrigDivaNr) {
|
|
@@ -37670,7 +37852,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37670
37852
|
this.hasConfiguratorSessionId = true;
|
|
37671
37853
|
returnSuccessfully = true;
|
|
37672
37854
|
case 29:
|
|
37673
|
-
if (!this.plannerConfig.catalogCodex) {
|
|
37855
|
+
if (!(this.plannerConfig.catalogCodex !== undefined)) {
|
|
37674
37856
|
_context.next = 33;
|
|
37675
37857
|
break;
|
|
37676
37858
|
}
|
|
@@ -37965,7 +38147,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
37965
38147
|
LOG$8.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
37966
38148
|
if (basketFromAPI.OrigDivaNr) {
|
|
37967
38149
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
37968
|
-
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
38150
|
+
} else if (basketFromAPI.OrigCatalogCodex !== undefined) {
|
|
37969
38151
|
this.origConfiguration.originCatalogCodex = basketFromAPI.OrigCatalogCodex;
|
|
37970
38152
|
this.origConfiguration.originArticleCodexes = basketFromAPI.OrigArticleCodexes;
|
|
37971
38153
|
} else {
|
|
@@ -38335,7 +38517,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38335
38517
|
}, {
|
|
38336
38518
|
key: "fillOrigConfigurations",
|
|
38337
38519
|
value: function fillOrigConfigurations() {
|
|
38338
|
-
if (this.origConfiguration.originCatalogCodex) {
|
|
38520
|
+
if (this.origConfiguration.originCatalogCodex !== undefined) {
|
|
38339
38521
|
this.actBasket.OrigCatalogCodex = this.origConfiguration.originCatalogCodex;
|
|
38340
38522
|
this.actBasket.OrigArticleCodexes = this.origConfiguration.originArticleCodexes;
|
|
38341
38523
|
this.actBasket.OrigDivaNr = undefined;
|
|
@@ -38381,7 +38563,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38381
38563
|
_context11.next = 19;
|
|
38382
38564
|
break;
|
|
38383
38565
|
case 17:
|
|
38384
|
-
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
38566
|
+
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE' || response === 'ERROR_NO_BASKET_SAVED_ENTITY_EXISTS')) {
|
|
38385
38567
|
_context11.next = 19;
|
|
38386
38568
|
break;
|
|
38387
38569
|
}
|
|
@@ -38538,7 +38720,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38538
38720
|
break;
|
|
38539
38721
|
case 3:
|
|
38540
38722
|
_context12.next = 5;
|
|
38541
|
-
return import('./PfisterWWSHandler-
|
|
38723
|
+
return import('./PfisterWWSHandler-a08c74f9.js');
|
|
38542
38724
|
case 5:
|
|
38543
38725
|
_yield$import = _context12.sent;
|
|
38544
38726
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -38546,7 +38728,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38546
38728
|
return _context12.abrupt("break", 27);
|
|
38547
38729
|
case 9:
|
|
38548
38730
|
_context12.next = 11;
|
|
38549
|
-
return import('./LiviqueWWSHandler-
|
|
38731
|
+
return import('./LiviqueWWSHandler-0cae8969.js');
|
|
38550
38732
|
case 11:
|
|
38551
38733
|
_yield$import2 = _context12.sent;
|
|
38552
38734
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -38554,7 +38736,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38554
38736
|
return _context12.abrupt("break", 27);
|
|
38555
38737
|
case 15:
|
|
38556
38738
|
_context12.next = 17;
|
|
38557
|
-
return import('./SeriousBasketHandler-
|
|
38739
|
+
return import('./SeriousBasketHandler-55877df4.js');
|
|
38558
38740
|
case 17:
|
|
38559
38741
|
_yield$import3 = _context12.sent;
|
|
38560
38742
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -38562,7 +38744,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38562
38744
|
return _context12.abrupt("break", 27);
|
|
38563
38745
|
case 21:
|
|
38564
38746
|
_context12.next = 23;
|
|
38565
|
-
return import('./StandardWWSHandler-
|
|
38747
|
+
return import('./StandardWWSHandler-34d7a2c7.js');
|
|
38566
38748
|
case 23:
|
|
38567
38749
|
_yield$import4 = _context12.sent;
|
|
38568
38750
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -39990,7 +40172,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
39990
40172
|
while (1) switch (_context3.prev = _context3.next) {
|
|
39991
40173
|
case 0:
|
|
39992
40174
|
_context3.next = 2;
|
|
39993
|
-
return import('./Host3DSignalR-
|
|
40175
|
+
return import('./Host3DSignalR-f7d149a0.js');
|
|
39994
40176
|
case 2:
|
|
39995
40177
|
_yield$import = _context3.sent;
|
|
39996
40178
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -41547,7 +41729,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41547
41729
|
break;
|
|
41548
41730
|
case 8:
|
|
41549
41731
|
_context4.next = 10;
|
|
41550
|
-
return import('./DivaStandardPlanner-
|
|
41732
|
+
return import('./DivaStandardPlanner-280e1526.js');
|
|
41551
41733
|
case 10:
|
|
41552
41734
|
_yield$import = _context4.sent;
|
|
41553
41735
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -41558,7 +41740,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41558
41740
|
return _context4.abrupt("break", 21);
|
|
41559
41741
|
case 15:
|
|
41560
41742
|
_context4.next = 17;
|
|
41561
|
-
return import('./DivaBoxPlanner-
|
|
41743
|
+
return import('./DivaBoxPlanner-a981fb02.js');
|
|
41562
41744
|
case 17:
|
|
41563
41745
|
_yield$import2 = _context4.sent;
|
|
41564
41746
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -43605,9 +43787,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
43605
43787
|
}
|
|
43606
43788
|
}, {
|
|
43607
43789
|
key: "getDivaArticles",
|
|
43608
|
-
value: function getDivaArticles() {
|
|
43790
|
+
value: function getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso) {
|
|
43609
43791
|
var _this$actSet3;
|
|
43610
|
-
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
43792
|
+
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso);
|
|
43611
43793
|
}
|
|
43612
43794
|
|
|
43613
43795
|
//for debugging
|
|
@@ -44538,11 +44720,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44538
44720
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
44539
44721
|
actBasket.Updated = Date.now();
|
|
44540
44722
|
if (!returnTo) {
|
|
44541
|
-
_context27.next =
|
|
44723
|
+
_context27.next = 52;
|
|
44542
44724
|
break;
|
|
44543
44725
|
}
|
|
44544
44726
|
_context27.t3 = returnTo;
|
|
44545
|
-
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 30 : _context27.t3 === 'OPEN_PDF' ?
|
|
44727
|
+
_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;
|
|
44546
44728
|
break;
|
|
44547
44729
|
case 27:
|
|
44548
44730
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.toggleLoading('buildScene', false, false);
|
|
@@ -44556,8 +44738,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44556
44738
|
basketData: actBasket
|
|
44557
44739
|
}
|
|
44558
44740
|
});
|
|
44559
|
-
return _context27.abrupt("break",
|
|
44741
|
+
return _context27.abrupt("break", 52);
|
|
44560
44742
|
case 30:
|
|
44743
|
+
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
44744
|
+
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
44745
|
+
}
|
|
44561
44746
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
|
|
44562
44747
|
type: 'SELLER',
|
|
44563
44748
|
parameters: {
|
|
@@ -44568,51 +44753,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44568
44753
|
basketData: actBasket
|
|
44569
44754
|
}
|
|
44570
44755
|
});
|
|
44571
|
-
return _context27.abrupt("break",
|
|
44572
|
-
case
|
|
44756
|
+
return _context27.abrupt("break", 52);
|
|
44757
|
+
case 33:
|
|
44573
44758
|
if (!(event == 'onSaveProduct')) {
|
|
44574
|
-
_context27.next =
|
|
44759
|
+
_context27.next = 43;
|
|
44575
44760
|
break;
|
|
44576
44761
|
}
|
|
44577
44762
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
44578
44763
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
44579
|
-
_context27.next =
|
|
44764
|
+
_context27.next = 37;
|
|
44580
44765
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
44581
|
-
case
|
|
44582
|
-
_context27.next =
|
|
44766
|
+
case 37:
|
|
44767
|
+
_context27.next = 39;
|
|
44583
44768
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
44584
|
-
case
|
|
44769
|
+
case 39:
|
|
44585
44770
|
newDivaNr = _context27.sent;
|
|
44586
44771
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
44587
|
-
_context27.next =
|
|
44772
|
+
_context27.next = 51;
|
|
44588
44773
|
break;
|
|
44589
|
-
case
|
|
44774
|
+
case 43:
|
|
44590
44775
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
44591
44776
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = undefined;
|
|
44592
44777
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
44593
44778
|
}
|
|
44594
44779
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
44595
44780
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
44596
|
-
_context27.next =
|
|
44781
|
+
_context27.next = 48;
|
|
44597
44782
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
44598
|
-
case
|
|
44783
|
+
case 48:
|
|
44599
44784
|
_result2 = _context27.sent;
|
|
44600
44785
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
44601
|
-
_context27.next =
|
|
44786
|
+
_context27.next = 51;
|
|
44602
44787
|
break;
|
|
44603
44788
|
}
|
|
44604
44789
|
return _context27.abrupt("return", 'canceled');
|
|
44605
|
-
case 50:
|
|
44606
|
-
return _context27.abrupt("break", 51);
|
|
44607
44790
|
case 51:
|
|
44791
|
+
return _context27.abrupt("break", 52);
|
|
44792
|
+
case 52:
|
|
44608
44793
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
44609
44794
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
44610
|
-
_context27.next =
|
|
44795
|
+
_context27.next = 56;
|
|
44611
44796
|
return this.addToBasket(actBasket, event);
|
|
44612
|
-
case
|
|
44797
|
+
case 56:
|
|
44613
44798
|
product = _context27.sent;
|
|
44614
44799
|
return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
44615
|
-
case
|
|
44800
|
+
case 58:
|
|
44616
44801
|
case "end":
|
|
44617
44802
|
return _context27.stop();
|
|
44618
44803
|
}
|
|
@@ -44662,7 +44847,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44662
44847
|
//if planner is hidden by config but nothing is planned initially
|
|
44663
44848
|
if (plannerType === 'NONE') {
|
|
44664
44849
|
var _this$plannerConfig$a8, _this$actSet11;
|
|
44665
|
-
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)) {
|
|
44850
|
+
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)) {
|
|
44666
44851
|
plannerType = 'PLANNER';
|
|
44667
44852
|
}
|
|
44668
44853
|
}
|
|
@@ -44937,39 +45122,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
44937
45122
|
case 0:
|
|
44938
45123
|
event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
|
|
44939
45124
|
_context29.t0 = event;
|
|
44940
|
-
_context29.next = _context29.t0 === 'onWebPlanerPrint' ?
|
|
45125
|
+
_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;
|
|
44941
45126
|
break;
|
|
44942
|
-
case
|
|
45127
|
+
case 4:
|
|
44943
45128
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
44944
45129
|
type: 'onWebPlanerPrint',
|
|
44945
45130
|
data: actBasket.getAsJson()
|
|
44946
45131
|
});
|
|
44947
|
-
return _context29.abrupt("break",
|
|
44948
|
-
case
|
|
45132
|
+
return _context29.abrupt("break", 33);
|
|
45133
|
+
case 6:
|
|
44949
45134
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
44950
45135
|
type: 'onWebPlanerSave',
|
|
44951
45136
|
data: actBasket.getAsJson()
|
|
44952
45137
|
});
|
|
44953
|
-
return _context29.abrupt("break",
|
|
44954
|
-
case
|
|
45138
|
+
return _context29.abrupt("break", 33);
|
|
45139
|
+
case 8:
|
|
44955
45140
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
44956
45141
|
type: 'onWebPlanerShare',
|
|
44957
45142
|
data: actBasket.getAsJson()
|
|
44958
45143
|
});
|
|
44959
|
-
return _context29.abrupt("break",
|
|
44960
|
-
case
|
|
45144
|
+
return _context29.abrupt("break", 33);
|
|
45145
|
+
case 10:
|
|
44961
45146
|
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
44962
45147
|
type: 'onRequestConsulation',
|
|
44963
45148
|
data: actBasket.getAsJson()
|
|
44964
45149
|
});
|
|
44965
|
-
return _context29.abrupt("break",
|
|
44966
|
-
case
|
|
45150
|
+
return _context29.abrupt("break", 33);
|
|
45151
|
+
case 12:
|
|
44967
45152
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
44968
45153
|
type: 'onSave',
|
|
44969
45154
|
data: actBasket.getAsJson()
|
|
44970
45155
|
});
|
|
44971
|
-
return _context29.abrupt("break",
|
|
44972
|
-
case
|
|
45156
|
+
return _context29.abrupt("break", 33);
|
|
45157
|
+
case 14:
|
|
44973
45158
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
44974
45159
|
this.divaBasketHandler.emailConfig = undefined;
|
|
44975
45160
|
if (emailConfig) {
|
|
@@ -45003,45 +45188,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45003
45188
|
type: 'onAddToBasket',
|
|
45004
45189
|
data: actBasket.getAsJson()
|
|
45005
45190
|
});
|
|
45006
|
-
return _context29.abrupt("break",
|
|
45007
|
-
case
|
|
45191
|
+
return _context29.abrupt("break", 33);
|
|
45192
|
+
case 19:
|
|
45008
45193
|
this.actSet().CatalogData;
|
|
45009
|
-
_context29.next =
|
|
45194
|
+
_context29.next = 22;
|
|
45010
45195
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
45011
|
-
case
|
|
45196
|
+
case 22:
|
|
45012
45197
|
products = _context29.sent;
|
|
45013
45198
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
45014
45199
|
type: 'onAddToBasket',
|
|
45015
45200
|
data: actBasket.getAsJson()
|
|
45016
45201
|
});
|
|
45017
45202
|
if (!products) {
|
|
45018
|
-
_context29.next =
|
|
45203
|
+
_context29.next = 26;
|
|
45019
45204
|
break;
|
|
45020
45205
|
}
|
|
45021
45206
|
return _context29.abrupt("return", products[0]);
|
|
45022
|
-
case
|
|
45023
|
-
case 28:
|
|
45207
|
+
case 26:
|
|
45024
45208
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
45025
45209
|
type: 'onAddToBasket',
|
|
45026
45210
|
data: actBasket.getAsJson()
|
|
45027
45211
|
});
|
|
45028
|
-
return _context29.abrupt("break",
|
|
45029
|
-
case
|
|
45212
|
+
return _context29.abrupt("break", 33);
|
|
45213
|
+
case 28:
|
|
45030
45214
|
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
|
|
45031
45215
|
type: 'onAddToBasket',
|
|
45032
45216
|
data: actBasket.getAsJson()
|
|
45033
45217
|
});
|
|
45034
45218
|
this.openContactForm(this.divaBasketHandler);
|
|
45035
|
-
return _context29.abrupt("break",
|
|
45036
|
-
case
|
|
45219
|
+
return _context29.abrupt("break", 33);
|
|
45220
|
+
case 31:
|
|
45037
45221
|
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
|
|
45038
45222
|
type: event,
|
|
45039
45223
|
data: actBasket.getAsJson()
|
|
45040
45224
|
});
|
|
45041
|
-
return _context29.abrupt("break",
|
|
45042
|
-
case
|
|
45225
|
+
return _context29.abrupt("break", 33);
|
|
45226
|
+
case 33:
|
|
45043
45227
|
return _context29.abrupt("return");
|
|
45044
|
-
case
|
|
45228
|
+
case 34:
|
|
45045
45229
|
case "end":
|
|
45046
45230
|
return _context29.stop();
|
|
45047
45231
|
}
|
|
@@ -45099,7 +45283,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45099
45283
|
(_this$api = this.api) === null || _this$api === void 0 || _this$api.clearCache();
|
|
45100
45284
|
this.divaCatalogs = {};
|
|
45101
45285
|
}
|
|
45102
|
-
|
|
45286
|
+
}, {
|
|
45287
|
+
key: "getCurrentBasket",
|
|
45288
|
+
value: function () {
|
|
45289
|
+
var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(event, force, returnTo, dontGoToSummary) {
|
|
45290
|
+
var _this$actSet33, _this$divaBasketHandl5, _this$onClickAddToBas3;
|
|
45291
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
45292
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
45293
|
+
case 0:
|
|
45294
|
+
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))) {
|
|
45295
|
+
_context30.next = 2;
|
|
45296
|
+
break;
|
|
45297
|
+
}
|
|
45298
|
+
return _context30.abrupt("return", true);
|
|
45299
|
+
case 2:
|
|
45300
|
+
_context30.next = 4;
|
|
45301
|
+
return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, event, force, returnTo, dontGoToSummary);
|
|
45302
|
+
case 4:
|
|
45303
|
+
return _context30.abrupt("return", !!_context30.sent);
|
|
45304
|
+
case 5:
|
|
45305
|
+
case "end":
|
|
45306
|
+
return _context30.stop();
|
|
45307
|
+
}
|
|
45308
|
+
}, _callee30, this);
|
|
45309
|
+
}));
|
|
45310
|
+
function getCurrentBasket(_x80, _x81, _x82, _x83) {
|
|
45311
|
+
return _getCurrentBasket.apply(this, arguments);
|
|
45312
|
+
}
|
|
45313
|
+
return getCurrentBasket;
|
|
45314
|
+
}()
|
|
45103
45315
|
/*********************************END Functions in Logik called From View END *************************************/
|
|
45104
45316
|
/*********************************** Register Funictions from Logik to View ***************************************/
|
|
45105
45317
|
}, {
|
|
@@ -45322,9 +45534,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45322
45534
|
key: "initApiForLogicOnly",
|
|
45323
45535
|
value: //just for testing purposes
|
|
45324
45536
|
function () {
|
|
45325
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45326
|
-
return _regeneratorRuntime.wrap(function
|
|
45327
|
-
while (1) switch (
|
|
45537
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
45538
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
45539
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
45328
45540
|
case 0:
|
|
45329
45541
|
//empty services
|
|
45330
45542
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -45337,17 +45549,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45337
45549
|
jwt: jwt,
|
|
45338
45550
|
apiKey: apiKey
|
|
45339
45551
|
}), handler);
|
|
45340
|
-
|
|
45552
|
+
_context31.next = 3;
|
|
45341
45553
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
45342
45554
|
case 3:
|
|
45343
45555
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
45344
45556
|
case 4:
|
|
45345
45557
|
case "end":
|
|
45346
|
-
return
|
|
45558
|
+
return _context31.stop();
|
|
45347
45559
|
}
|
|
45348
|
-
},
|
|
45560
|
+
}, _callee31, this);
|
|
45349
45561
|
}));
|
|
45350
|
-
function initApiForLogicOnly(
|
|
45562
|
+
function initApiForLogicOnly(_x84, _x85, _x86, _x87, _x88, _x89, _x90) {
|
|
45351
45563
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
45352
45564
|
}
|
|
45353
45565
|
return initApiForLogicOnly;
|
|
@@ -45360,16 +45572,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45360
45572
|
}, {
|
|
45361
45573
|
key: "loadBasket",
|
|
45362
45574
|
value: function () {
|
|
45363
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45364
|
-
return _regeneratorRuntime.wrap(function
|
|
45365
|
-
while (1) switch (
|
|
45575
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
|
|
45576
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
45577
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
45366
45578
|
case 0:
|
|
45367
|
-
return
|
|
45579
|
+
return _context32.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
45368
45580
|
case 1:
|
|
45369
45581
|
case "end":
|
|
45370
|
-
return
|
|
45582
|
+
return _context32.stop();
|
|
45371
45583
|
}
|
|
45372
|
-
},
|
|
45584
|
+
}, _callee32, this);
|
|
45373
45585
|
}));
|
|
45374
45586
|
function loadBasket() {
|
|
45375
45587
|
return _loadBasket.apply(this, arguments);
|
|
@@ -45384,39 +45596,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45384
45596
|
}, {
|
|
45385
45597
|
key: "initBasket",
|
|
45386
45598
|
value: function () {
|
|
45387
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45599
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(init3D, ignoreFavorites) {
|
|
45388
45600
|
var initSetState, set, basket;
|
|
45389
|
-
return _regeneratorRuntime.wrap(function
|
|
45390
|
-
while (1) switch (
|
|
45601
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
45602
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
45391
45603
|
case 0:
|
|
45392
45604
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
45393
45605
|
initSetState = this.getInitStateForSet(!init3D);
|
|
45394
45606
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
45395
|
-
|
|
45607
|
+
_context33.next = 5;
|
|
45396
45608
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
45397
45609
|
case 5:
|
|
45398
45610
|
//TODO check if when basket gets repaired the product match gets called
|
|
45399
45611
|
set = this.actSet();
|
|
45400
45612
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
45401
45613
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
45402
|
-
|
|
45614
|
+
_context33.next = 10;
|
|
45403
45615
|
break;
|
|
45404
45616
|
}
|
|
45405
|
-
|
|
45617
|
+
_context33.next = 10;
|
|
45406
45618
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
45407
45619
|
case 10:
|
|
45408
|
-
|
|
45620
|
+
_context33.next = 12;
|
|
45409
45621
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
45410
45622
|
case 12:
|
|
45411
|
-
basket =
|
|
45412
|
-
return
|
|
45623
|
+
basket = _context33.sent;
|
|
45624
|
+
return _context33.abrupt("return", basket);
|
|
45413
45625
|
case 14:
|
|
45414
45626
|
case "end":
|
|
45415
|
-
return
|
|
45627
|
+
return _context33.stop();
|
|
45416
45628
|
}
|
|
45417
|
-
},
|
|
45629
|
+
}, _callee33, this);
|
|
45418
45630
|
}));
|
|
45419
|
-
function initBasket(
|
|
45631
|
+
function initBasket(_x91, _x92) {
|
|
45420
45632
|
return _initBasket.apply(this, arguments);
|
|
45421
45633
|
}
|
|
45422
45634
|
return initBasket;
|
|
@@ -45430,21 +45642,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45430
45642
|
}, {
|
|
45431
45643
|
key: "getValidVariantsLength",
|
|
45432
45644
|
value: function () {
|
|
45433
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45645
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
|
|
45434
45646
|
var set;
|
|
45435
|
-
return _regeneratorRuntime.wrap(function
|
|
45436
|
-
while (1) switch (
|
|
45647
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
45648
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
45437
45649
|
case 0:
|
|
45438
45650
|
set = this.actSet();
|
|
45439
|
-
|
|
45651
|
+
_context34.next = 3;
|
|
45440
45652
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
45441
45653
|
case 3:
|
|
45442
|
-
return
|
|
45654
|
+
return _context34.abrupt("return", _context34.sent.length);
|
|
45443
45655
|
case 4:
|
|
45444
45656
|
case "end":
|
|
45445
|
-
return
|
|
45657
|
+
return _context34.stop();
|
|
45446
45658
|
}
|
|
45447
|
-
},
|
|
45659
|
+
}, _callee34, this);
|
|
45448
45660
|
}));
|
|
45449
45661
|
function getValidVariantsLength() {
|
|
45450
45662
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -45454,46 +45666,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45454
45666
|
}, {
|
|
45455
45667
|
key: "handleFavorites",
|
|
45456
45668
|
value: function () {
|
|
45457
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45669
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(mode) {
|
|
45458
45670
|
var _this5 = this;
|
|
45459
45671
|
var set, i;
|
|
45460
|
-
return _regeneratorRuntime.wrap(function
|
|
45461
|
-
while (1) switch (
|
|
45672
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
45673
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
45462
45674
|
case 0:
|
|
45463
45675
|
set = this.actSet();
|
|
45464
45676
|
i = 0;
|
|
45465
45677
|
case 2:
|
|
45466
45678
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
45467
|
-
|
|
45679
|
+
_context35.next = 11;
|
|
45468
45680
|
break;
|
|
45469
45681
|
}
|
|
45470
|
-
|
|
45682
|
+
_context35.next = 5;
|
|
45471
45683
|
return DivaUtils.Sleep(200);
|
|
45472
45684
|
case 5:
|
|
45473
45685
|
i++;
|
|
45474
45686
|
if (!(i > 1000)) {
|
|
45475
|
-
|
|
45687
|
+
_context35.next = 9;
|
|
45476
45688
|
break;
|
|
45477
45689
|
}
|
|
45478
45690
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
45479
|
-
return
|
|
45691
|
+
return _context35.abrupt("break", 11);
|
|
45480
45692
|
case 9:
|
|
45481
|
-
|
|
45693
|
+
_context35.next = 2;
|
|
45482
45694
|
break;
|
|
45483
45695
|
case 11:
|
|
45484
|
-
|
|
45696
|
+
_context35.next = 13;
|
|
45485
45697
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
45486
45698
|
return _this5.update2DGrid(set);
|
|
45487
45699
|
}, this.actions);
|
|
45488
45700
|
case 13:
|
|
45489
|
-
return
|
|
45701
|
+
return _context35.abrupt("return", _context35.sent);
|
|
45490
45702
|
case 14:
|
|
45491
45703
|
case "end":
|
|
45492
|
-
return
|
|
45704
|
+
return _context35.stop();
|
|
45493
45705
|
}
|
|
45494
|
-
},
|
|
45706
|
+
}, _callee35, this);
|
|
45495
45707
|
}));
|
|
45496
|
-
function handleFavorites(
|
|
45708
|
+
function handleFavorites(_x93) {
|
|
45497
45709
|
return _handleFavorites.apply(this, arguments);
|
|
45498
45710
|
}
|
|
45499
45711
|
return handleFavorites;
|
|
@@ -45506,48 +45718,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
45506
45718
|
}, {
|
|
45507
45719
|
key: "initSapOrderLinesFromBasket",
|
|
45508
45720
|
value: function () {
|
|
45509
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
45721
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(divaNr, init3D, onlyLoadOldBakset) {
|
|
45510
45722
|
var result, oldBasket, basket;
|
|
45511
|
-
return _regeneratorRuntime.wrap(function
|
|
45512
|
-
while (1) switch (
|
|
45723
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
45724
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
45513
45725
|
case 0:
|
|
45514
45726
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
45515
|
-
|
|
45727
|
+
_context36.next = 3;
|
|
45516
45728
|
return this.loadBasket();
|
|
45517
45729
|
case 3:
|
|
45518
|
-
result =
|
|
45730
|
+
result = _context36.sent;
|
|
45519
45731
|
if (!onlyLoadOldBakset) {
|
|
45520
|
-
|
|
45732
|
+
_context36.next = 6;
|
|
45521
45733
|
break;
|
|
45522
45734
|
}
|
|
45523
|
-
return
|
|
45735
|
+
return _context36.abrupt("return", {
|
|
45524
45736
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
45525
45737
|
cache: {}
|
|
45526
45738
|
});
|
|
45527
45739
|
case 6:
|
|
45528
45740
|
if (!(result === false)) {
|
|
45529
|
-
|
|
45741
|
+
_context36.next = 8;
|
|
45530
45742
|
break;
|
|
45531
45743
|
}
|
|
45532
45744
|
throw new Error('Could not load basket! ' + divaNr);
|
|
45533
45745
|
case 8:
|
|
45534
45746
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
45535
|
-
|
|
45747
|
+
_context36.next = 11;
|
|
45536
45748
|
return this.initBasket(init3D);
|
|
45537
45749
|
case 11:
|
|
45538
|
-
basket =
|
|
45539
|
-
return
|
|
45750
|
+
basket = _context36.sent;
|
|
45751
|
+
return _context36.abrupt("return", {
|
|
45540
45752
|
basket: basket,
|
|
45541
45753
|
oldBasket: oldBasket,
|
|
45542
45754
|
cache: this.api.getJsonDataCache()
|
|
45543
45755
|
});
|
|
45544
45756
|
case 13:
|
|
45545
45757
|
case "end":
|
|
45546
|
-
return
|
|
45758
|
+
return _context36.stop();
|
|
45547
45759
|
}
|
|
45548
|
-
},
|
|
45760
|
+
}, _callee36, this);
|
|
45549
45761
|
}));
|
|
45550
|
-
function initSapOrderLinesFromBasket(
|
|
45762
|
+
function initSapOrderLinesFromBasket(_x94, _x95, _x96) {
|
|
45551
45763
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
45552
45764
|
}
|
|
45553
45765
|
return initSapOrderLinesFromBasket;
|