@crystaldesign/web-planner-logic 24.12.0-beta.1 → 24.12.0-beta.10
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-a5e169ca.js → DivaBoxPlanner-815fbf90.js} +3 -3
- package/build/cjs/{DivaStandardPlanner-d833dda6.js → DivaStandardPlanner-ae253974.js} +17 -81
- package/build/cjs/{DoorPlanner-4ad0b55d.js → DoorPlanner-5fc29017.js} +1 -1
- package/build/cjs/{Host3DSignalR-18d5959b.js → Host3DSignalR-dec9a0b8.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-2df9ce37.js → LiviqueWWSHandler-fbcd6772.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-04557c0d.js → PfisterWWSHandler-e607705c.js} +1 -1
- package/build/cjs/{PlannerHandler2D-ba17ec51.js → PlannerHandler2D-8acbb06c.js} +27 -37
- package/build/cjs/{ProductBasketHandler-a74547b4.js → ProductBasketHandler-67c19e6d.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-d7eeeb38.js → SeriousBasketHandler-e665dd62.js} +1 -1
- package/build/cjs/{ShelfPlanner-546bdbd7.js → ShelfPlanner-1c1708c2.js} +1 -1
- package/build/cjs/{StandardWWSHandler-33b00bda.js → StandardWWSHandler-26b802ca.js} +1 -1
- package/build/cjs/{index-079a47df.js → index-6f5de64a.js} +532 -401
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-a95c530a.js → DivaBoxPlanner-0880d2b3.js} +3 -3
- package/build/esm/{DivaStandardPlanner-660cec0e.js → DivaStandardPlanner-562b5379.js} +17 -81
- package/build/esm/{DoorPlanner-9e3b1dff.js → DoorPlanner-9508f0e4.js} +1 -1
- package/build/esm/{Host3DSignalR-514ab7ea.js → Host3DSignalR-912df5a5.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-5bbc4f4c.js → LiviqueWWSHandler-19bb2392.js} +1 -1
- package/build/esm/{PfisterWWSHandler-fea10934.js → PfisterWWSHandler-a3b013b1.js} +1 -1
- package/build/esm/{PlannerHandler2D-e204acd1.js → PlannerHandler2D-7f7d2ddf.js} +27 -37
- package/build/esm/{ProductBasketHandler-ce45363b.js → ProductBasketHandler-b53ee156.js} +1 -1
- package/build/esm/{SeriousBasketHandler-41c875f2.js → SeriousBasketHandler-1cb21861.js} +1 -1
- package/build/esm/{ShelfPlanner-88da02c7.js → ShelfPlanner-a813161d.js} +1 -1
- package/build/esm/{StandardWWSHandler-26c6ecb8.js → StandardWWSHandler-c05fd7ed.js} +1 -1
- package/build/esm/{index-ae50d2a1.js → index-67fdef39.js} +532 -401
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/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/DivaCatalogDataType.d.ts +3 -2
- 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 +2 -2
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -2
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts +15 -7
- package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -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 +7 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +5 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -2
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.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/Planner/Rendering/PlannerHandler3D.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
- 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 +27 -6
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -16667,6 +16667,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16667
16667
|
get: function get() {
|
|
16668
16668
|
return this.catalogArticle.hasPartlistArticle;
|
|
16669
16669
|
}
|
|
16670
|
+
}, {
|
|
16671
|
+
key: "possiblePartlistCodexes",
|
|
16672
|
+
get: function get() {
|
|
16673
|
+
var _this$catalogArticle$2;
|
|
16674
|
+
return (_this$catalogArticle$2 = this.catalogArticle.partListArticles) === null || _this$catalogArticle$2 === void 0 ? void 0 : _this$catalogArticle$2.join(';');
|
|
16675
|
+
}
|
|
16670
16676
|
}, {
|
|
16671
16677
|
key: "articleDecisions",
|
|
16672
16678
|
get: function get() {
|
|
@@ -16933,8 +16939,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16933
16939
|
}, {
|
|
16934
16940
|
key: "metaDataView",
|
|
16935
16941
|
get: function get() {
|
|
16936
|
-
var _this$catalogArticle$
|
|
16937
|
-
return (_this$catalogArticle$
|
|
16942
|
+
var _this$catalogArticle$3;
|
|
16943
|
+
return (_this$catalogArticle$3 = this.catalogArticle.metaData) !== null && _this$catalogArticle$3 !== void 0 ? _this$catalogArticle$3 : [];
|
|
16938
16944
|
}
|
|
16939
16945
|
}, {
|
|
16940
16946
|
key: "getMergesToOPG",
|
|
@@ -18304,7 +18310,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18304
18310
|
DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
|
|
18305
18311
|
}
|
|
18306
18312
|
}],
|
|
18307
|
-
|
|
18313
|
+
warningRules: [],
|
|
18314
|
+
bannerRules: [],
|
|
18308
18315
|
summaryTabGroupPosition: undefined,
|
|
18309
18316
|
onConfigSingleDontGeneralize: false,
|
|
18310
18317
|
ignoreMaxPriceAsBP: false,
|
|
@@ -18609,7 +18616,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18609
18616
|
} else if (item.Codex == 'NOTIFICATIONS') {
|
|
18610
18617
|
_this.catalogData.notificationsRules = JSON.parse(item.Value);
|
|
18611
18618
|
} else if (item.Codex == 'WARNINGS') {
|
|
18612
|
-
_this.catalogData.
|
|
18619
|
+
_this.catalogData.warningRules = JSON.parse(item.Value);
|
|
18620
|
+
} else if (item.Codex == 'BANNER') {
|
|
18621
|
+
_this.catalogData.bannerRules = JSON.parse(item.Value);
|
|
18613
18622
|
} else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
|
|
18614
18623
|
_this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
|
|
18615
18624
|
} else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
|
|
@@ -18810,7 +18819,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18810
18819
|
is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
|
|
18811
18820
|
groupName: groupTitle,
|
|
18812
18821
|
metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
|
|
18813
|
-
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
|
|
18822
|
+
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
|
|
18823
|
+
partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
|
|
18814
18824
|
};
|
|
18815
18825
|
this.plannerPaletteViewInfo.catalogPlannerArticles.push(catPlanArtView);
|
|
18816
18826
|
}
|
|
@@ -18867,7 +18877,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18867
18877
|
is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
|
|
18868
18878
|
groupName: groupTitle,
|
|
18869
18879
|
metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
|
|
18870
|
-
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
|
|
18880
|
+
contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
|
|
18881
|
+
partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
|
|
18871
18882
|
};
|
|
18872
18883
|
//nicht ausmultiplizierte Elemente
|
|
18873
18884
|
this.plannerPaletteViewInfo.catalogPlannerArticles.push(_catPlanArtView);
|
|
@@ -19475,9 +19486,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19475
19486
|
return this.catalogData.notificationsRules;
|
|
19476
19487
|
}
|
|
19477
19488
|
}, {
|
|
19478
|
-
key: "
|
|
19489
|
+
key: "warningRules",
|
|
19490
|
+
get: function get() {
|
|
19491
|
+
return this.catalogData.warningRules;
|
|
19492
|
+
}
|
|
19493
|
+
}, {
|
|
19494
|
+
key: "bannerRules",
|
|
19479
19495
|
get: function get() {
|
|
19480
|
-
return this.catalogData.
|
|
19496
|
+
return this.catalogData.bannerRules;
|
|
19481
19497
|
}
|
|
19482
19498
|
}, {
|
|
19483
19499
|
key: "dontSaveAlternativeRenderings",
|
|
@@ -22574,6 +22590,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22574
22590
|
}, {
|
|
22575
22591
|
key: "updateIDMSpecificFeature",
|
|
22576
22592
|
value: function updateIDMSpecificFeature(myArtOPS) {
|
|
22593
|
+
if (!this.parentHasSameOption(myArtOPS.optionCodex)) return;
|
|
22577
22594
|
if (myArtOPS.option.idmVariantenArt == 90) {
|
|
22578
22595
|
//R (Anschlusstyp R) - AVR
|
|
22579
22596
|
var newAVRFilter = [],
|
|
@@ -23559,7 +23576,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23559
23576
|
break;
|
|
23560
23577
|
}
|
|
23561
23578
|
_context.next = 4;
|
|
23562
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
23579
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-1c1708c2.js'); });
|
|
23563
23580
|
case 4:
|
|
23564
23581
|
_yield$import = _context.sent;
|
|
23565
23582
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -23623,7 +23640,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23623
23640
|
calcUnitPrice = 0,
|
|
23624
23641
|
calcUnit2Price = 0,
|
|
23625
23642
|
firstUnit2Param = 0,
|
|
23626
|
-
secondUnit2Param = 0,
|
|
23627
23643
|
idmPriceMeasureFactor = 1;
|
|
23628
23644
|
//CalcPreise berechnen
|
|
23629
23645
|
for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
|
|
@@ -23657,75 +23673,70 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23657
23673
|
if (!tmpOPT.useMaxPriceOfGroup) {
|
|
23658
23674
|
myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
|
|
23659
23675
|
}
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
|
|
23674
|
-
|
|
23675
|
-
|
|
23676
|
-
|
|
23677
|
-
|
|
23678
|
-
|
|
23679
|
-
|
|
23680
|
-
|
|
23681
|
-
|
|
23682
|
-
|
|
23676
|
+
switch (pUnit) {
|
|
23677
|
+
case 'm':
|
|
23678
|
+
calcUnitPrice += myArtOPS.calcPrice / 100;
|
|
23679
|
+
break;
|
|
23680
|
+
case 'cm':
|
|
23681
|
+
calcUnitPrice += myArtOPS.calcPrice;
|
|
23682
|
+
break;
|
|
23683
|
+
case 'm2':
|
|
23684
|
+
calcUnit2Price += myArtOPS.calcPrice / 10000;
|
|
23685
|
+
break;
|
|
23686
|
+
case 'cm2':
|
|
23687
|
+
calcUnit2Price += myArtOPS.calcPrice;
|
|
23688
|
+
break;
|
|
23689
|
+
default:
|
|
23690
|
+
if (myArtOPS.isPercentage) {
|
|
23691
|
+
//hier myArtOPS.TargetOption auswerten
|
|
23692
|
+
if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
|
|
23693
|
+
myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
|
|
23694
|
+
}
|
|
23695
|
+
} else {
|
|
23696
|
+
myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
|
|
23697
|
+
}
|
|
23698
|
+
break;
|
|
23699
|
+
}
|
|
23700
|
+
if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
|
|
23701
|
+
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23702
|
+
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23703
|
+
if (calcUnitPrice != 0) {
|
|
23704
|
+
var quantity = 0;
|
|
23705
|
+
if (OP == 'OPTUMFANG') {
|
|
23706
|
+
mUnit = 'cm';
|
|
23707
|
+
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23708
|
+
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23709
|
+
mUnit = 'cm';
|
|
23710
|
+
quantity = this.calcWidth * Math.PI;
|
|
23683
23711
|
} else {
|
|
23684
|
-
|
|
23712
|
+
quantity = freeTextMeasure;
|
|
23685
23713
|
}
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
|
|
23694
|
-
mUnit
|
|
23695
|
-
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23696
|
-
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23697
|
-
mUnit = 'cm';
|
|
23698
|
-
quantity = this.calcWidth * Math.PI;
|
|
23699
|
-
} else {
|
|
23700
|
-
quantity = freeTextMeasure;
|
|
23701
|
-
}
|
|
23702
|
-
if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
|
|
23703
|
-
} else if (calcUnit2Price != 0) {
|
|
23704
|
-
//for diamter option
|
|
23705
|
-
if (myArtOPS.option.diameter) {
|
|
23706
|
-
myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
|
|
23714
|
+
if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
|
|
23715
|
+
} else if (calcUnit2Price != 0) {
|
|
23716
|
+
//for diamter option
|
|
23717
|
+
if (myArtOPS.option.diameter) {
|
|
23718
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
|
|
23719
|
+
} else {
|
|
23720
|
+
if (firstUnit2Param == 0) {
|
|
23721
|
+
firstUnit2Param = freeTextMeasure;
|
|
23722
|
+
if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
|
|
23707
23723
|
} else {
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23711
|
-
} else {
|
|
23712
|
-
secondUnit2Param = freeTextMeasure;
|
|
23713
|
-
if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
|
|
23714
|
-
myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
|
|
23715
|
-
}
|
|
23724
|
+
var secondUnit2Param = freeTextMeasure;
|
|
23725
|
+
if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
|
|
23726
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
|
|
23716
23727
|
}
|
|
23717
23728
|
}
|
|
23718
23729
|
}
|
|
23719
23730
|
}
|
|
23720
|
-
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
|
|
23728
|
-
|
|
23731
|
+
}
|
|
23732
|
+
if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
|
|
23733
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
|
|
23734
|
+
}
|
|
23735
|
+
if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
|
|
23736
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
|
|
23737
|
+
}
|
|
23738
|
+
if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
|
|
23739
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
|
|
23729
23740
|
}
|
|
23730
23741
|
}
|
|
23731
23742
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
@@ -23824,19 +23835,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23824
23835
|
this.article.price = articleUsedCalcPrice;
|
|
23825
23836
|
}
|
|
23826
23837
|
}, {
|
|
23827
|
-
key: "
|
|
23828
|
-
value: function
|
|
23829
|
-
|
|
23830
|
-
|
|
23831
|
-
return calcPrice / 100;
|
|
23832
|
-
case 'cm':
|
|
23833
|
-
return calcPrice;
|
|
23834
|
-
case 'm2':
|
|
23835
|
-
return calcPrice / 10000;
|
|
23836
|
-
case 'cm2':
|
|
23837
|
-
return calcPrice;
|
|
23838
|
-
}
|
|
23839
|
-
return 0;
|
|
23838
|
+
key: "parentHasSameOption",
|
|
23839
|
+
value: function parentHasSameOption(opt) {
|
|
23840
|
+
if (!this.partListParentArticle) return true;
|
|
23841
|
+
return !!this.partListParentArticle.articleOptionStates[opt] || this.partlistArticleVisibleInTree;
|
|
23840
23842
|
}
|
|
23841
23843
|
}, {
|
|
23842
23844
|
key: "getOptionPrice",
|
|
@@ -24988,72 +24990,89 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24988
24990
|
}
|
|
24989
24991
|
}
|
|
24990
24992
|
}
|
|
24991
|
-
if (
|
|
24992
|
-
|
|
24993
|
-
|
|
24994
|
-
|
|
24995
|
-
|
|
24996
|
-
|
|
24997
|
-
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
|
|
25004
|
-
|
|
24993
|
+
if (Object.keys(article.articleOptionStates).length === 0) {
|
|
24994
|
+
_context8.next = 19;
|
|
24995
|
+
break;
|
|
24996
|
+
}
|
|
24997
|
+
//infos eines Basisconfigurats initialisieren
|
|
24998
|
+
if (!(Object.keys(variantValues).length === 0)) {
|
|
24999
|
+
//Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
|
|
25000
|
+
for (attr in variantValues) {
|
|
25001
|
+
foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
|
|
25002
|
+
if (foundItem.opt) {
|
|
25003
|
+
if (foundItem.opv instanceof ArticleOptionValueData) {
|
|
25004
|
+
freeText = variantValues[attr + '_val'];
|
|
25005
|
+
article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
|
|
25006
|
+
if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
|
|
25007
|
+
//falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
|
|
25008
|
+
article.checkDefaultGlobalOpt(_defineProperty__default["default"]({}, foundItem.opt.codex, foundItem.opv.codex), true);
|
|
25005
25009
|
}
|
|
25006
25010
|
}
|
|
25007
25011
|
}
|
|
25008
25012
|
}
|
|
25013
|
+
}
|
|
25009
25014
|
|
|
25010
|
-
|
|
25011
|
-
|
|
25012
|
-
|
|
25013
|
-
|
|
25014
|
-
|
|
25015
|
-
|
|
25016
|
-
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
|
|
25025
|
-
|
|
25026
|
-
|
|
25027
|
-
|
|
25028
|
-
|
|
25029
|
-
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
|
|
25033
|
-
|
|
25034
|
-
|
|
25035
|
-
|
|
25036
|
-
|
|
25037
|
-
|
|
25038
|
-
|
|
25039
|
-
|
|
25040
|
-
|
|
25041
|
-
|
|
25015
|
+
//defaultValues for FreeText
|
|
25016
|
+
if (!article.articleOptionStates) {
|
|
25017
|
+
_context8.next = 19;
|
|
25018
|
+
break;
|
|
25019
|
+
}
|
|
25020
|
+
_context8.t0 = _regeneratorRuntime__default["default"].keys(article.articleOptionStates);
|
|
25021
|
+
case 7:
|
|
25022
|
+
if ((_context8.t1 = _context8.t0()).done) {
|
|
25023
|
+
_context8.next = 19;
|
|
25024
|
+
break;
|
|
25025
|
+
}
|
|
25026
|
+
_key = _context8.t1.value;
|
|
25027
|
+
myArtOPS = article.articleOptionStates[_key];
|
|
25028
|
+
if (!variantValues[_key + '_val']) {
|
|
25029
|
+
_context8.next = 12;
|
|
25030
|
+
break;
|
|
25031
|
+
}
|
|
25032
|
+
return _context8.abrupt("continue", 7);
|
|
25033
|
+
case 12:
|
|
25034
|
+
value = undefined;
|
|
25035
|
+
optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
|
|
25036
|
+
if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
|
|
25037
|
+
for (i = 0; i < variantItems.length && value == undefined; i++) {
|
|
25038
|
+
variantItem = variantItems[i];
|
|
25039
|
+
if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
|
|
25040
|
+
if (variantItem.MeasureValue) {
|
|
25041
|
+
//measureValue from new Bakset
|
|
25042
|
+
value = variantItem.MeasureValue;
|
|
25043
|
+
optionValueCodex = 'OPV' + variantItem.OPV;
|
|
25044
|
+
} else {
|
|
25045
|
+
//measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
|
|
25046
|
+
possibleValues = variantItem.OPVName.split(': ');
|
|
25047
|
+
for (j = 0; j < possibleValues.length && value == undefined; j++) {
|
|
25048
|
+
possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
|
|
25049
|
+
if (!isNaN(Number(possibleValue))) {
|
|
25050
|
+
value = possibleValue;
|
|
25042
25051
|
}
|
|
25043
25052
|
}
|
|
25044
25053
|
}
|
|
25045
|
-
|
|
25046
|
-
|
|
25047
|
-
|
|
25048
|
-
|
|
25049
|
-
|
|
25050
|
-
|
|
25051
|
-
|
|
25052
|
-
|
|
25054
|
+
}
|
|
25055
|
+
}
|
|
25056
|
+
} else if (variantItems && myArtOPS.isFreeText) {
|
|
25057
|
+
for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
|
|
25058
|
+
_variantItem = variantItems[_i2];
|
|
25059
|
+
if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
|
|
25060
|
+
value = _variantItem.FreeText;
|
|
25061
|
+
optionValueCodex = 'OPV' + _variantItem.OPV;
|
|
25053
25062
|
}
|
|
25054
25063
|
}
|
|
25055
25064
|
}
|
|
25056
|
-
|
|
25065
|
+
if (value == undefined) {
|
|
25066
|
+
val = myArtOPS.option.freetextDefaultValue;
|
|
25067
|
+
if (val) {
|
|
25068
|
+
value = val;
|
|
25069
|
+
myArtOPS.freeText = val;
|
|
25070
|
+
}
|
|
25071
|
+
}
|
|
25072
|
+
if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
|
|
25073
|
+
_context8.next = 7;
|
|
25074
|
+
break;
|
|
25075
|
+
case 19:
|
|
25057
25076
|
case "end":
|
|
25058
25077
|
return _context8.stop();
|
|
25059
25078
|
}
|
|
@@ -25421,6 +25440,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25421
25440
|
}, {
|
|
25422
25441
|
key: "evalOpvsOnOpvsConstructionRules",
|
|
25423
25442
|
value: function evalOpvsOnOpvsConstructionRules(article) {
|
|
25443
|
+
var _article$CatalogData$;
|
|
25424
25444
|
var somethingChanged = false;
|
|
25425
25445
|
var previousRules = {};
|
|
25426
25446
|
if (article.updatedOPVbyOPVConstructionRules) {
|
|
@@ -25484,19 +25504,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25484
25504
|
}
|
|
25485
25505
|
}
|
|
25486
25506
|
}
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
var
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25507
|
+
if ((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length) {
|
|
25508
|
+
var notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty__default["default"]({}, article.basketId, article), {});
|
|
25509
|
+
if (notifications !== null && notifications !== void 0 && notifications.length) {
|
|
25510
|
+
for (var _i3 = 0; _i3 < notifications.length; _i3++) {
|
|
25511
|
+
var _item = notifications[_i3];
|
|
25512
|
+
if (!_item.showAsWarning) continue;
|
|
25513
|
+
article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
|
|
25514
|
+
message: _item.message,
|
|
25515
|
+
type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
|
|
25516
|
+
}));
|
|
25517
|
+
}
|
|
25518
|
+
somethingChanged = true;
|
|
25496
25519
|
}
|
|
25497
|
-
somethingChanged = true;
|
|
25498
25520
|
}
|
|
25499
|
-
|
|
25500
25521
|
//falls die vorherigen reglen anders sind wie die neuen, artiklekonfiguration neu laden
|
|
25501
25522
|
if (somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules)) {
|
|
25502
25523
|
this.updateCfgValues(article, {}, {});
|
|
@@ -25512,7 +25533,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25512
25533
|
}, {
|
|
25513
25534
|
key: "checkNotificationRules",
|
|
25514
25535
|
value: function checkNotificationRules(toCheckRules, articles, visitedOptions, event) {
|
|
25515
|
-
if (!(toCheckRules !== null && toCheckRules !== void 0 && toCheckRules.length)) return;
|
|
25516
25536
|
var returnValue = [];
|
|
25517
25537
|
for (var i = 0; i < toCheckRules.length; i++) {
|
|
25518
25538
|
var entry = toCheckRules[i];
|
|
@@ -25520,27 +25540,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25520
25540
|
var ruleValid = false;
|
|
25521
25541
|
for (var j = 0; j < rules.length; j++) {
|
|
25522
25542
|
for (var basketId in articles) {
|
|
25523
|
-
var _rule$articles;
|
|
25524
25543
|
ruleValid = false;
|
|
25525
25544
|
var rule = rules[j];
|
|
25526
25545
|
var article = articles[basketId];
|
|
25527
|
-
if ((
|
|
25528
|
-
if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) continue;
|
|
25529
|
-
if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[basketId])) continue;
|
|
25530
|
-
if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) continue;
|
|
25531
|
-
if (rule.sizes) console.error('size logic not jet implemented');
|
|
25546
|
+
if (!this.checkRule(rule, article, visitedOptions)) continue;
|
|
25532
25547
|
if ((event === null || event === void 0 ? void 0 : event.type) == 'config' && entry.type == 'notification') {
|
|
25533
|
-
|
|
25534
|
-
var checkOPT = (_entry$checkOnEvents = entry.checkOnEvents) !== null && _entry$checkOnEvents !== void 0 && _entry$checkOnEvents.option ? 'OPT' + ((_entry$checkOnEvents2 = entry.checkOnEvents) === null || _entry$checkOnEvents2 === void 0 ? void 0 : _entry$checkOnEvents2.option) : undefined;
|
|
25535
|
-
var checkOPV = (_entry$checkOnEvents3 = entry.checkOnEvents) !== null && _entry$checkOnEvents3 !== void 0 && _entry$checkOnEvents3.optionValue ? 'OPV' + ((_entry$checkOnEvents4 = entry.checkOnEvents) === null || _entry$checkOnEvents4 === void 0 ? void 0 : _entry$checkOnEvents4.optionValue) : undefined;
|
|
25536
|
-
if (checkOPT) {
|
|
25537
|
-
if (Array.isArray(checkOPT) && !checkOPT.includes(event.data.optionCodex)) continue;
|
|
25538
|
-
if (!Array.isArray(checkOPT) && checkOPT !== event.data.optionCodex) continue;
|
|
25539
|
-
}
|
|
25540
|
-
if (checkOPV) {
|
|
25541
|
-
if (Array.isArray(checkOPV) && !checkOPV.includes(event.data.optionValueCodex)) continue;
|
|
25542
|
-
if (!Array.isArray(checkOPV) && checkOPV !== event.data.optionValueCodex) continue;
|
|
25543
|
-
}
|
|
25548
|
+
if (!this.checkOnEvent(event.checkOnEvents, event.data)) continue;
|
|
25544
25549
|
}
|
|
25545
25550
|
ruleValid = true;
|
|
25546
25551
|
break;
|
|
@@ -25556,6 +25561,35 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25556
25561
|
}
|
|
25557
25562
|
return returnValue;
|
|
25558
25563
|
}
|
|
25564
|
+
}, {
|
|
25565
|
+
key: "checkRule",
|
|
25566
|
+
value: function checkRule(rule, article, visitedOptions) {
|
|
25567
|
+
var _rule$articles;
|
|
25568
|
+
if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
|
|
25569
|
+
if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
|
|
25570
|
+
if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
|
|
25571
|
+
if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) return false;
|
|
25572
|
+
if (rule.sizes) {
|
|
25573
|
+
console.error('size logic not jet implemented');
|
|
25574
|
+
return false;
|
|
25575
|
+
}
|
|
25576
|
+
return true;
|
|
25577
|
+
}
|
|
25578
|
+
}, {
|
|
25579
|
+
key: "checkOnEvent",
|
|
25580
|
+
value: function checkOnEvent(event, data) {
|
|
25581
|
+
var checkOPT = event !== null && event !== void 0 && event.option ? 'OPT' + (event === null || event === void 0 ? void 0 : event.option) : undefined;
|
|
25582
|
+
var checkOPV = event !== null && event !== void 0 && event.optionValue ? 'OPV' + (event === null || event === void 0 ? void 0 : event.optionValue) : undefined;
|
|
25583
|
+
if (checkOPT) {
|
|
25584
|
+
if (Array.isArray(checkOPT) && !checkOPT.includes(data.optionCodex)) return false;
|
|
25585
|
+
if (!Array.isArray(checkOPT) && checkOPT !== data.optionCodex) return false;
|
|
25586
|
+
}
|
|
25587
|
+
if (checkOPV) {
|
|
25588
|
+
if (Array.isArray(checkOPV) && !checkOPV.includes(data.optionValueCodex)) return false;
|
|
25589
|
+
if (!Array.isArray(checkOPV) && checkOPV !== data.optionValueCodex) return false;
|
|
25590
|
+
}
|
|
25591
|
+
return true;
|
|
25592
|
+
}
|
|
25559
25593
|
}, {
|
|
25560
25594
|
key: "objectIncudesObject",
|
|
25561
25595
|
value: function objectIncudesObject(smallerObject, biggerObject) {
|
|
@@ -26876,6 +26910,7 @@ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
26876
26910
|
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26877
26911
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26878
26912
|
var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26913
|
+
//plz delete me
|
|
26879
26914
|
var DivaSet = /*#__PURE__*/function () {
|
|
26880
26915
|
function DivaSet(catalog, _setId, orderSet, initSetState) {
|
|
26881
26916
|
var _this = this,
|
|
@@ -27017,14 +27052,9 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27017
27052
|
return _ref.apply(this, arguments);
|
|
27018
27053
|
};
|
|
27019
27054
|
}());
|
|
27020
|
-
_defineProperty__default["default"](this, "setPosNr", function (elementId, posNr
|
|
27055
|
+
_defineProperty__default["default"](this, "setPosNr", function (elementId, posNr) {
|
|
27021
27056
|
var article = _this.getArticleByElementId(elementId);
|
|
27022
|
-
if (article)
|
|
27023
|
-
article.posNr = posNr;
|
|
27024
|
-
if (accNr != undefined) {
|
|
27025
|
-
article.posNr = Number(posNr + '.' + (accNr < 10 ? '0' : '') + accNr.toString());
|
|
27026
|
-
}
|
|
27027
|
-
}
|
|
27057
|
+
if (article) article.posNr = posNr;
|
|
27028
27058
|
_this.sortDivaArticlesByArticlePosNr();
|
|
27029
27059
|
});
|
|
27030
27060
|
_defineProperty__default["default"](this, "setElementId", function (basketID, elementId) {
|
|
@@ -27275,54 +27305,56 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27275
27305
|
}, {
|
|
27276
27306
|
key: "giveAccNewPosNrByBasketId",
|
|
27277
27307
|
value: function giveAccNewPosNrByBasketId(BasketIdParent) {
|
|
27278
|
-
var curNum = this.
|
|
27308
|
+
var curNum = this.giveAccPosNrByBasketId(BasketIdParent);
|
|
27279
27309
|
this.givePartlistAccPosNrByBasketId(BasketIdParent, curNum);
|
|
27280
27310
|
this.sortDivaArticlesByArticlePosNr();
|
|
27281
27311
|
}
|
|
27282
27312
|
}, {
|
|
27283
|
-
key: "
|
|
27284
|
-
value: function
|
|
27313
|
+
key: "giveAccPosNrByBasketId",
|
|
27314
|
+
value: function giveAccPosNrByBasketId(basketId) {
|
|
27315
|
+
var curNum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
27285
27316
|
var allAccs = [];
|
|
27286
27317
|
var articles = this.getDivaArticles();
|
|
27287
|
-
|
|
27288
|
-
|
|
27289
|
-
var
|
|
27318
|
+
var article = articles[basketId];
|
|
27319
|
+
if (!article) throw new Error('article ' + basketId + ' does not exist');
|
|
27320
|
+
var myParentArticle = article.getBaseParent();
|
|
27321
|
+
var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(basketId),
|
|
27290
27322
|
notPlannedAcc = _this$getSplitPlanned.notPlannedAcc,
|
|
27291
27323
|
plannedAcc = _this$getSplitPlanned.plannedAcc;
|
|
27292
|
-
|
|
27293
|
-
|
|
27294
|
-
|
|
27324
|
+
for (var key in plannedAcc) {
|
|
27325
|
+
allAccs.push(plannedAcc[key]);
|
|
27326
|
+
}
|
|
27327
|
+
for (var _key3 in notPlannedAcc) {
|
|
27328
|
+
allAccs.push(notPlannedAcc[_key3]);
|
|
27295
27329
|
}
|
|
27296
27330
|
for (var i = 0; i < allAccs.length; i++) {
|
|
27331
|
+
var accessoire = allAccs[i];
|
|
27297
27332
|
curNum++;
|
|
27298
|
-
|
|
27299
|
-
if (
|
|
27300
|
-
curNum = this.
|
|
27333
|
+
accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
|
|
27334
|
+
if (accessoire.shelfAccessoires || Object.keys(accessoire.accessoires).length !== 0) {
|
|
27335
|
+
curNum = this.giveAccPosNrByBasketId(accessoire.basketId, curNum);
|
|
27336
|
+
}
|
|
27337
|
+
if (accessoire.hasPartlistArticle) {
|
|
27338
|
+
curNum = this.givePartlistAccPosNrByBasketId(accessoire.basketId, curNum);
|
|
27301
27339
|
}
|
|
27302
|
-
}
|
|
27303
|
-
for (var _key3 in plannedAcc) {
|
|
27304
|
-
curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, _key3, curNum);
|
|
27305
27340
|
}
|
|
27306
27341
|
return curNum;
|
|
27307
27342
|
}
|
|
27308
27343
|
}, {
|
|
27309
27344
|
key: "givePartlistAccPosNrByBasketId",
|
|
27310
|
-
value: function givePartlistAccPosNrByBasketId(
|
|
27311
|
-
var
|
|
27312
|
-
if (!
|
|
27313
|
-
var
|
|
27314
|
-
var
|
|
27315
|
-
|
|
27316
|
-
|
|
27317
|
-
var
|
|
27318
|
-
if (
|
|
27319
|
-
|
|
27320
|
-
|
|
27321
|
-
if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
|
|
27322
|
-
curNum++;
|
|
27323
|
-
accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
|
|
27324
|
-
}
|
|
27345
|
+
value: function givePartlistAccPosNrByBasketId(basketId, curNum) {
|
|
27346
|
+
var article = this.getArticleByBasketId(basketId);
|
|
27347
|
+
if (!article) return curNum;
|
|
27348
|
+
var baseParent = article.getBaseParent();
|
|
27349
|
+
var partlistArticles = this.getPartlistArticlesOfArticle(article);
|
|
27350
|
+
for (var j = 0; j < ((_partlistArticles$len = partlistArticles === null || partlistArticles === void 0 ? void 0 : partlistArticles.length) !== null && _partlistArticles$len !== void 0 ? _partlistArticles$len : 0); j++) {
|
|
27351
|
+
var _partlistArticles$len;
|
|
27352
|
+
var accessoire = partlistArticles[j];
|
|
27353
|
+
if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
|
|
27354
|
+
curNum++;
|
|
27355
|
+
accessoire.posNr = Number(parseFloat((baseParent.posNr + curNum / 100).toString()).toFixed(2));
|
|
27325
27356
|
}
|
|
27357
|
+
return curNum;
|
|
27326
27358
|
}
|
|
27327
27359
|
}, {
|
|
27328
27360
|
key: "getAccessoiresOfBasketId",
|
|
@@ -27354,11 +27386,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27354
27386
|
notPlannedAcc: notPlannedAcc
|
|
27355
27387
|
};
|
|
27356
27388
|
}
|
|
27357
|
-
}, {
|
|
27358
|
-
key: "getStartingPosNr",
|
|
27359
|
-
value: function getStartingPosNr(basketid) {
|
|
27360
|
-
return this.getAccessoiresOfArticleRecursive(basketid, 'onlyPlanner').length;
|
|
27361
|
-
}
|
|
27362
27389
|
}, {
|
|
27363
27390
|
key: "getAccessoiresOfBasketIdAsArray",
|
|
27364
27391
|
value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
|
|
@@ -27679,7 +27706,9 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27679
27706
|
value: function getArticleByBasketId(basketId) {
|
|
27680
27707
|
if (this.divaArticles[basketId]) return this.divaArticles[basketId];
|
|
27681
27708
|
for (var key in this.divaArticles) {
|
|
27682
|
-
|
|
27709
|
+
var article = this.divaArticles[key];
|
|
27710
|
+
var plArticles = article.getRecursivePartlistArticles();
|
|
27711
|
+
if (plArticles[basketId]) return plArticles[basketId];
|
|
27683
27712
|
}
|
|
27684
27713
|
return undefined;
|
|
27685
27714
|
}
|
|
@@ -28077,7 +28106,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28077
28106
|
break;
|
|
28078
28107
|
}
|
|
28079
28108
|
_context4.next = 3;
|
|
28080
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
28109
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-5fc29017.js'); });
|
|
28081
28110
|
case 3:
|
|
28082
28111
|
_yield$import = _context4.sent;
|
|
28083
28112
|
DoorPlanner = _yield$import["default"];
|
|
@@ -30341,46 +30370,49 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30341
30370
|
value: function () {
|
|
30342
30371
|
var _saveConfigVariantsInBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(set, basket, variant, repairOnly) {
|
|
30343
30372
|
var _hQRenderScript, _basket$OrderSets$set, _basket$OrderSets$set2;
|
|
30344
|
-
var setindex, setImage, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
|
|
30373
|
+
var setindex, setImage, dimensions, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
|
|
30345
30374
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context6) {
|
|
30346
30375
|
while (1) switch (_context6.prev = _context6.next) {
|
|
30347
30376
|
case 0:
|
|
30348
30377
|
setindex = -1;
|
|
30349
30378
|
setImage = undefined;
|
|
30379
|
+
dimensions = {};
|
|
30350
30380
|
urlToPlanning2D = undefined;
|
|
30351
30381
|
hQRenderScript = undefined;
|
|
30352
30382
|
plannerData = set.plannerHandler.savePlanner(set.getSetId());
|
|
30353
30383
|
if (repairOnly) {
|
|
30354
|
-
_context6.next =
|
|
30384
|
+
_context6.next = 17;
|
|
30355
30385
|
break;
|
|
30356
30386
|
}
|
|
30357
30387
|
promises = [setHandlerInstance.getSetImage(set, true), setHandlerInstance.get2DSetImage(set), setHandlerInstance.getHQRenderScript(set, basket.DivaNr)];
|
|
30358
|
-
_context6.next =
|
|
30388
|
+
_context6.next = 10;
|
|
30359
30389
|
return Promise.all(promises);
|
|
30360
|
-
case
|
|
30390
|
+
case 10:
|
|
30361
30391
|
_yield$Promise$all = _context6.sent;
|
|
30362
30392
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
|
|
30363
|
-
|
|
30393
|
+
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
30394
|
+
setImage = _yield$Promise$all2$.url;
|
|
30395
|
+
dimensions = _yield$Promise$all2$.dimensions;
|
|
30364
30396
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
30365
30397
|
hQRenderScript = _yield$Promise$all2[2];
|
|
30366
|
-
case
|
|
30398
|
+
case 17:
|
|
30367
30399
|
i = 0;
|
|
30368
|
-
case
|
|
30400
|
+
case 18:
|
|
30369
30401
|
if (!(i < basket.OrderSets.length)) {
|
|
30370
|
-
_context6.next =
|
|
30402
|
+
_context6.next = 25;
|
|
30371
30403
|
break;
|
|
30372
30404
|
}
|
|
30373
30405
|
if (!(set.getSetId() == basket.OrderSets[i].SetID)) {
|
|
30374
|
-
_context6.next =
|
|
30406
|
+
_context6.next = 22;
|
|
30375
30407
|
break;
|
|
30376
30408
|
}
|
|
30377
30409
|
setindex = i;
|
|
30378
|
-
return _context6.abrupt("break",
|
|
30379
|
-
case
|
|
30410
|
+
return _context6.abrupt("break", 25);
|
|
30411
|
+
case 22:
|
|
30380
30412
|
i++;
|
|
30381
|
-
_context6.next =
|
|
30413
|
+
_context6.next = 18;
|
|
30382
30414
|
break;
|
|
30383
|
-
case
|
|
30415
|
+
case 25:
|
|
30384
30416
|
if (!basket.OrderSets[setindex].ConfigVariants) basket.OrderSets[setindex].ConfigVariants = [];
|
|
30385
30417
|
optionsSorted = set.CatalogData.getOptionsPosition();
|
|
30386
30418
|
variantValues = {};
|
|
@@ -30391,9 +30423,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30391
30423
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
30392
30424
|
}
|
|
30393
30425
|
}
|
|
30394
|
-
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
30426
|
+
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
30395
30427
|
set.basketConfigVariants.push(configVariant);
|
|
30396
|
-
case
|
|
30428
|
+
case 31:
|
|
30397
30429
|
case "end":
|
|
30398
30430
|
return _context6.stop();
|
|
30399
30431
|
}
|
|
@@ -32795,7 +32827,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32795
32827
|
*/
|
|
32796
32828
|
}, {
|
|
32797
32829
|
key: "update3DPlannerView",
|
|
32798
|
-
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint) {
|
|
32830
|
+
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint, useLatestViewpoint) {
|
|
32799
32831
|
var _set$plannerHandler, _set$getAlternateRend2;
|
|
32800
32832
|
var width = renderSize.imgWidth;
|
|
32801
32833
|
var height = renderSize.imgHeight;
|
|
@@ -32806,7 +32838,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32806
32838
|
planner3DGridEnabled: planner3DGridEnabled,
|
|
32807
32839
|
mediaServiceSaveMode: mediaServiceSaveMode,
|
|
32808
32840
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
32809
|
-
}, viewpoint);
|
|
32841
|
+
}, viewpoint, useLatestViewpoint);
|
|
32810
32842
|
}
|
|
32811
32843
|
}, {
|
|
32812
32844
|
key: "getPlannerPaletteViewInfo",
|
|
@@ -33098,33 +33130,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33098
33130
|
key: "variantsEvaluator",
|
|
33099
33131
|
value: (function () {
|
|
33100
33132
|
var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
33101
|
-
var _set$WebConfig, _set$
|
|
33102
|
-
var
|
|
33133
|
+
var _set$WebConfig, _set$ViewConfig, _configItems$;
|
|
33134
|
+
var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
33103
33135
|
return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
|
|
33104
33136
|
while (1) switch (_context25.prev = _context25.next) {
|
|
33105
33137
|
case 0:
|
|
33138
|
+
opt = set.CatalogData.getOption(configItems[0].op);
|
|
33139
|
+
if (opt) {
|
|
33140
|
+
_context25.next = 3;
|
|
33141
|
+
break;
|
|
33142
|
+
}
|
|
33143
|
+
return _context25.abrupt("return", configItems);
|
|
33144
|
+
case 3:
|
|
33145
|
+
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
|
|
33106
33146
|
calcVariantsForPricePreview = false;
|
|
33107
|
-
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !((_set$CatalogData$getO = set.CatalogData.getOption(configItems[0].op)) !== null && _set$CatalogData$getO !== void 0 && _set$CatalogData$getO.isDescribingState);
|
|
33108
33147
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
33109
33148
|
if (previewType) {
|
|
33110
|
-
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
|
|
33111
|
-
if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
|
|
33112
|
-
calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
|
|
33113
|
-
}
|
|
33149
|
+
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
|
|
33114
33150
|
}
|
|
33115
33151
|
if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
|
|
33116
33152
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
33117
33153
|
calcVariantsForPricePreview = false;
|
|
33118
33154
|
}
|
|
33119
33155
|
if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
|
|
33120
|
-
_context25.next =
|
|
33156
|
+
_context25.next = 19;
|
|
33121
33157
|
break;
|
|
33122
33158
|
}
|
|
33123
33159
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
33124
33160
|
startTime = new Date();
|
|
33125
|
-
_context25.next =
|
|
33161
|
+
_context25.next = 14;
|
|
33126
33162
|
return this.calcVariants(set, configItems, targetArticles);
|
|
33127
|
-
case
|
|
33163
|
+
case 14:
|
|
33128
33164
|
variants = _context25.sent;
|
|
33129
33165
|
endTime = new Date();
|
|
33130
33166
|
if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
|
|
@@ -33134,9 +33170,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33134
33170
|
if (checkForProductsInStock) {
|
|
33135
33171
|
configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
|
|
33136
33172
|
}
|
|
33137
|
-
case
|
|
33173
|
+
case 19:
|
|
33138
33174
|
return _context25.abrupt("return", configItems);
|
|
33139
|
-
case
|
|
33175
|
+
case 20:
|
|
33140
33176
|
case "end":
|
|
33141
33177
|
return _context25.stop();
|
|
33142
33178
|
}
|
|
@@ -33151,21 +33187,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33151
33187
|
key: "calcVariants",
|
|
33152
33188
|
value: function () {
|
|
33153
33189
|
var _calcVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(set, configItems, targetArticles) {
|
|
33154
|
-
var variantInfo,
|
|
33190
|
+
var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
|
|
33155
33191
|
return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context26) {
|
|
33156
33192
|
while (1) switch (_context26.prev = _context26.next) {
|
|
33157
33193
|
case 0:
|
|
33158
33194
|
variantInfo = [];
|
|
33159
|
-
|
|
33195
|
+
articles = set.getDivaArticles();
|
|
33196
|
+
origConfigs = targetArticles.map(function (basketId) {
|
|
33197
|
+
return articles[basketId].VariantValues;
|
|
33198
|
+
});
|
|
33160
33199
|
i = 0;
|
|
33161
|
-
case
|
|
33200
|
+
case 4:
|
|
33162
33201
|
if (!(i < configItems.length)) {
|
|
33163
|
-
_context26.next =
|
|
33202
|
+
_context26.next = 23;
|
|
33164
33203
|
break;
|
|
33165
33204
|
}
|
|
33166
33205
|
item = configItems[i];
|
|
33167
33206
|
variantValues = {};
|
|
33168
33207
|
doUseConfigs = false;
|
|
33208
|
+
targetIndex = 0;
|
|
33209
|
+
case 9:
|
|
33210
|
+
if (!(targetIndex < origConfigs.length)) {
|
|
33211
|
+
_context26.next = 19;
|
|
33212
|
+
break;
|
|
33213
|
+
}
|
|
33214
|
+
origConfig = origConfigs[targetIndex];
|
|
33169
33215
|
for (key in origConfig) {
|
|
33170
33216
|
if (key == item.op || key == item.idmOpgOptionCodex) {
|
|
33171
33217
|
doUseConfigs = true;
|
|
@@ -33173,24 +33219,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33173
33219
|
}
|
|
33174
33220
|
variantValues[item.op] = item.codex;
|
|
33175
33221
|
if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
|
|
33176
|
-
_context26.next =
|
|
33177
|
-
return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
|
|
33178
|
-
case
|
|
33222
|
+
_context26.next = 16;
|
|
33223
|
+
return this.updateArticlesOptionStatesOfActSet(set, variantValues, [targetArticles[targetIndex]], true, 'calcVariant');
|
|
33224
|
+
case 16:
|
|
33225
|
+
targetIndex++;
|
|
33226
|
+
_context26.next = 9;
|
|
33227
|
+
break;
|
|
33228
|
+
case 19:
|
|
33179
33229
|
variantInfo.push({
|
|
33180
33230
|
price: set.getSetPrice(),
|
|
33181
33231
|
variants: set.getGeneralVariantValues(targetArticles),
|
|
33182
33232
|
opt: item.op
|
|
33183
33233
|
});
|
|
33184
|
-
case
|
|
33234
|
+
case 20:
|
|
33185
33235
|
i++;
|
|
33186
|
-
_context26.next =
|
|
33236
|
+
_context26.next = 4;
|
|
33187
33237
|
break;
|
|
33188
|
-
case
|
|
33189
|
-
|
|
33190
|
-
|
|
33191
|
-
|
|
33238
|
+
case 23:
|
|
33239
|
+
_targetIndex = 0;
|
|
33240
|
+
case 24:
|
|
33241
|
+
if (!(_targetIndex < origConfigs.length)) {
|
|
33242
|
+
_context26.next = 30;
|
|
33243
|
+
break;
|
|
33244
|
+
}
|
|
33245
|
+
_context26.next = 27;
|
|
33246
|
+
return this.updateArticlesOptionStatesOfActSet(set, origConfigs[_targetIndex], [targetArticles[_targetIndex]], true);
|
|
33247
|
+
case 27:
|
|
33248
|
+
_targetIndex++;
|
|
33249
|
+
_context26.next = 24;
|
|
33250
|
+
break;
|
|
33251
|
+
case 30:
|
|
33192
33252
|
return _context26.abrupt("return", variantInfo);
|
|
33193
|
-
case
|
|
33253
|
+
case 31:
|
|
33194
33254
|
case "end":
|
|
33195
33255
|
return _context26.stop();
|
|
33196
33256
|
}
|
|
@@ -33399,12 +33459,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33399
33459
|
_loop3();
|
|
33400
33460
|
}
|
|
33401
33461
|
}
|
|
33462
|
+
}, {
|
|
33463
|
+
key: "checkBannerRules",
|
|
33464
|
+
value: function checkBannerRules(set, visitedOptions, event) {
|
|
33465
|
+
var bannerRules = set.CatalogData.bannerRules;
|
|
33466
|
+
if (!bannerRules) return;
|
|
33467
|
+
var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
|
|
33468
|
+
return rules === null || rules === void 0 ? void 0 : rules[0];
|
|
33469
|
+
}
|
|
33402
33470
|
}, {
|
|
33403
33471
|
key: "checkNotificationRules",
|
|
33404
33472
|
value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
|
|
33405
33473
|
var _set$CatalogData$noti;
|
|
33406
33474
|
if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
|
|
33407
|
-
console.log('checking');
|
|
33408
33475
|
var allArticles = set.getDivaArticles(true);
|
|
33409
33476
|
var articles = {};
|
|
33410
33477
|
for (var i = 0; i < targetArticles.length; i++) {
|
|
@@ -33888,7 +33955,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33888
33955
|
value: function () {
|
|
33889
33956
|
var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
|
|
33890
33957
|
var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
33891
|
-
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33958
|
+
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33892
33959
|
return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context31) {
|
|
33893
33960
|
while (1) switch (_context31.prev = _context31.next) {
|
|
33894
33961
|
case 0:
|
|
@@ -33900,8 +33967,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33900
33967
|
urlToPlanning2D = undefined;
|
|
33901
33968
|
alternateSetImages = undefined;
|
|
33902
33969
|
hqRenderScript = undefined;
|
|
33970
|
+
dimensions = {};
|
|
33903
33971
|
if (dontGenerateImages) {
|
|
33904
|
-
_context31.next =
|
|
33972
|
+
_context31.next = 28;
|
|
33905
33973
|
break;
|
|
33906
33974
|
}
|
|
33907
33975
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33909,22 +33977,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33909
33977
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33910
33978
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33911
33979
|
}
|
|
33912
|
-
_context31.next =
|
|
33980
|
+
_context31.next = 15;
|
|
33913
33981
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33914
|
-
case
|
|
33982
|
+
case 15:
|
|
33915
33983
|
_yield$Promise$all = _context31.sent;
|
|
33916
33984
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
|
|
33917
|
-
|
|
33985
|
+
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
33986
|
+
setImage = _yield$Promise$all2$.url;
|
|
33987
|
+
dimensions = _yield$Promise$all2$.dimensions;
|
|
33918
33988
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33919
33989
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33920
33990
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33921
|
-
_context31.next =
|
|
33991
|
+
_context31.next = 25;
|
|
33922
33992
|
return Promise.all([promiseHQRenderScript]);
|
|
33923
|
-
case
|
|
33993
|
+
case 25:
|
|
33924
33994
|
_yield$Promise$all3 = _context31.sent;
|
|
33925
33995
|
_yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
|
|
33926
33996
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33927
|
-
case
|
|
33997
|
+
case 28:
|
|
33928
33998
|
LOG$8.startTransaction({
|
|
33929
33999
|
event: 'FillBakset',
|
|
33930
34000
|
eventId: 'FILL_BASKET',
|
|
@@ -33956,7 +34026,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33956
34026
|
OfflineData: catalogData.offlineData,
|
|
33957
34027
|
SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
|
|
33958
34028
|
SetArticleNrPrefix: set.SetArticleNrPrefix,
|
|
33959
|
-
BBox: this.getBBoxObject(set),
|
|
34029
|
+
BBox: this.getBBoxObject(set, dimensions),
|
|
33960
34030
|
SetVariantBasketDatas: set.getVariantBasketData(),
|
|
33961
34031
|
SetImage: setImage,
|
|
33962
34032
|
//Add url string of current rendering.
|
|
@@ -33990,7 +34060,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33990
34060
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33991
34061
|
});
|
|
33992
34062
|
return _context31.abrupt("return", orderSet);
|
|
33993
|
-
case
|
|
34063
|
+
case 35:
|
|
33994
34064
|
case "end":
|
|
33995
34065
|
return _context31.stop();
|
|
33996
34066
|
}
|
|
@@ -34010,14 +34080,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34010
34080
|
key: "getSetImage",
|
|
34011
34081
|
value: (function () {
|
|
34012
34082
|
var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, overwriteLastSavedRendering) {
|
|
34013
|
-
var
|
|
34083
|
+
var is3D, _yield$set$plannerHan, dimensions, url;
|
|
34014
34084
|
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
|
|
34015
34085
|
while (1) switch (_context32.prev = _context32.next) {
|
|
34016
34086
|
case 0:
|
|
34017
|
-
|
|
34018
|
-
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34087
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34019
34088
|
if (!is3D) {
|
|
34020
|
-
_context32.next =
|
|
34089
|
+
_context32.next = 12;
|
|
34021
34090
|
break;
|
|
34022
34091
|
}
|
|
34023
34092
|
LOG$8.startTransaction({
|
|
@@ -34025,17 +34094,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34025
34094
|
message: 'render 3D Image',
|
|
34026
34095
|
eventId: 'RENDER_3D_IMAGE'
|
|
34027
34096
|
});
|
|
34028
|
-
_context32.next =
|
|
34097
|
+
_context32.next = 5;
|
|
34029
34098
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
34030
|
-
case
|
|
34031
|
-
_context32.next =
|
|
34099
|
+
case 5:
|
|
34100
|
+
_context32.next = 7;
|
|
34032
34101
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
34033
|
-
case
|
|
34034
|
-
|
|
34102
|
+
case 7:
|
|
34103
|
+
_yield$set$plannerHan = _context32.sent;
|
|
34104
|
+
dimensions = _yield$set$plannerHan.dimensions;
|
|
34105
|
+
url = _yield$set$plannerHan.url;
|
|
34035
34106
|
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
34036
|
-
|
|
34037
|
-
|
|
34038
|
-
|
|
34107
|
+
return _context32.abrupt("return", {
|
|
34108
|
+
dimensions: dimensions,
|
|
34109
|
+
url: url
|
|
34110
|
+
});
|
|
34111
|
+
case 12:
|
|
34112
|
+
return _context32.abrupt("return", {
|
|
34113
|
+
dimensions: {
|
|
34114
|
+
w: undefined,
|
|
34115
|
+
h: undefined,
|
|
34116
|
+
d: undefined
|
|
34117
|
+
}
|
|
34118
|
+
});
|
|
34119
|
+
case 13:
|
|
34039
34120
|
case "end":
|
|
34040
34121
|
return _context32.stop();
|
|
34041
34122
|
}
|
|
@@ -34055,7 +34136,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34055
34136
|
while (1) switch (_context33.prev = _context33.next) {
|
|
34056
34137
|
case 0:
|
|
34057
34138
|
//if not 3d
|
|
34058
|
-
is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34139
|
+
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34059
34140
|
if (is3D) {
|
|
34060
34141
|
_context33.next = 3;
|
|
34061
34142
|
break;
|
|
@@ -34111,7 +34192,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34111
34192
|
message: 'render 3D alternative Image',
|
|
34112
34193
|
eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
|
|
34113
34194
|
});
|
|
34114
|
-
is2D = !['3DImage', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
34195
|
+
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
34115
34196
|
if (!(is2D || set.onlyRunLogic)) {
|
|
34116
34197
|
_context34.next = 4;
|
|
34117
34198
|
break;
|
|
@@ -34178,14 +34259,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34178
34259
|
}()
|
|
34179
34260
|
}, {
|
|
34180
34261
|
key: "getBBoxObject",
|
|
34181
|
-
value: function getBBoxObject(set) {
|
|
34262
|
+
value: function getBBoxObject(set, dimensions) {
|
|
34263
|
+
var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n$t, _set$api$getI18n, _set$api$getI18n$t2, _set$api$getI18n$t3, _set$api$getI18n2, _set$api$getI18n2$t, _set$api$getI18n$t4, _set$api$getI18n3, _set$api$getI18n3$t;
|
|
34182
34264
|
var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
|
|
34183
|
-
|
|
34184
|
-
X: bbox.width,
|
|
34185
|
-
Y: bbox.depth,
|
|
34186
|
-
Z: bbox.height
|
|
34187
|
-
Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
|
|
34265
|
+
var dim = {
|
|
34266
|
+
X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
|
|
34267
|
+
Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
|
|
34268
|
+
Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
|
|
34188
34269
|
};
|
|
34270
|
+
return _objectSpread$8(_objectSpread$8({}, dim), {}, {
|
|
34271
|
+
Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
|
|
34272
|
+
});
|
|
34189
34273
|
}
|
|
34190
34274
|
}, {
|
|
34191
34275
|
key: "loadProductsOfSets",
|
|
@@ -34912,7 +34996,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34912
34996
|
case 9:
|
|
34913
34997
|
_context7.prev = 9;
|
|
34914
34998
|
_context7.t0 = _context7["catch"](0);
|
|
34915
|
-
LOG$7.error(new DivaUtils.DivaError('
|
|
34999
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId cannot be found in Database', {
|
|
34916
35000
|
code: 'WC_0004',
|
|
34917
35001
|
custom: {
|
|
34918
35002
|
divaNr: divaNr
|
|
@@ -34938,30 +35022,44 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34938
35022
|
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
|
|
34939
35023
|
while (1) switch (_context8.prev = _context8.next) {
|
|
34940
35024
|
case 0:
|
|
34941
|
-
_context8.
|
|
35025
|
+
_context8.prev = 0;
|
|
35026
|
+
_context8.next = 3;
|
|
34942
35027
|
return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
|
|
34943
35028
|
fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
|
|
34944
35029
|
});
|
|
34945
|
-
case
|
|
35030
|
+
case 3:
|
|
34946
35031
|
variantData = _context8.sent;
|
|
34947
35032
|
if (!(variantData.Error || !variantData.basket)) {
|
|
34948
|
-
_context8.next =
|
|
35033
|
+
_context8.next = 9;
|
|
34949
35034
|
break;
|
|
34950
35035
|
}
|
|
34951
|
-
LOG$7.error(new DivaUtils.DivaError('ProductId
|
|
35036
|
+
LOG$7.error(new DivaUtils.DivaError('ProductId cannot be found in Database', {
|
|
34952
35037
|
code: 'WC_0005',
|
|
34953
35038
|
custom: {
|
|
34954
35039
|
productId: productId
|
|
34955
35040
|
}
|
|
34956
35041
|
}));
|
|
34957
35042
|
return _context8.abrupt("return", false);
|
|
34958
|
-
case 8:
|
|
34959
|
-
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
|
|
34960
35043
|
case 9:
|
|
35044
|
+
return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
|
|
35045
|
+
case 10:
|
|
35046
|
+
_context8.next = 16;
|
|
35047
|
+
break;
|
|
35048
|
+
case 12:
|
|
35049
|
+
_context8.prev = 12;
|
|
35050
|
+
_context8.t0 = _context8["catch"](0);
|
|
35051
|
+
LOG$7.error(new DivaUtils.DivaError('Error while fetching product data', {
|
|
35052
|
+
code: 'WC_0005',
|
|
35053
|
+
custom: {
|
|
35054
|
+
productId: productId
|
|
35055
|
+
}
|
|
35056
|
+
}));
|
|
35057
|
+
return _context8.abrupt("return", false);
|
|
35058
|
+
case 16:
|
|
34961
35059
|
case "end":
|
|
34962
35060
|
return _context8.stop();
|
|
34963
35061
|
}
|
|
34964
|
-
}, _callee8, this);
|
|
35062
|
+
}, _callee8, this, [[0, 12]]);
|
|
34965
35063
|
}));
|
|
34966
35064
|
function loadBasketByCustomProductId(_x17, _x18, _x19, _x20) {
|
|
34967
35065
|
return _loadBasketByCustomProductId.apply(this, arguments);
|
|
@@ -35294,7 +35392,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35294
35392
|
break;
|
|
35295
35393
|
case 3:
|
|
35296
35394
|
_context13.next = 5;
|
|
35297
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
35395
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-e607705c.js'); });
|
|
35298
35396
|
case 5:
|
|
35299
35397
|
_yield$import = _context13.sent;
|
|
35300
35398
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35302,7 +35400,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35302
35400
|
return _context13.abrupt("break", 33);
|
|
35303
35401
|
case 9:
|
|
35304
35402
|
_context13.next = 11;
|
|
35305
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
35403
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-fbcd6772.js'); });
|
|
35306
35404
|
case 11:
|
|
35307
35405
|
_yield$import2 = _context13.sent;
|
|
35308
35406
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35310,7 +35408,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35310
35408
|
return _context13.abrupt("break", 33);
|
|
35311
35409
|
case 15:
|
|
35312
35410
|
_context13.next = 17;
|
|
35313
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
35411
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-e665dd62.js'); });
|
|
35314
35412
|
case 17:
|
|
35315
35413
|
_yield$import3 = _context13.sent;
|
|
35316
35414
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35318,7 +35416,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35318
35416
|
return _context13.abrupt("break", 33);
|
|
35319
35417
|
case 21:
|
|
35320
35418
|
_context13.next = 23;
|
|
35321
|
-
return Promise.resolve().then(function () { return require('./ProductBasketHandler-
|
|
35419
|
+
return Promise.resolve().then(function () { return require('./ProductBasketHandler-67c19e6d.js'); });
|
|
35322
35420
|
case 23:
|
|
35323
35421
|
_yield$import4 = _context13.sent;
|
|
35324
35422
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35326,7 +35424,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35326
35424
|
return _context13.abrupt("break", 33);
|
|
35327
35425
|
case 27:
|
|
35328
35426
|
_context13.next = 29;
|
|
35329
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
35427
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-26b802ca.js'); });
|
|
35330
35428
|
case 29:
|
|
35331
35429
|
_yield$import5 = _context13.sent;
|
|
35332
35430
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -36711,7 +36809,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36711
36809
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36712
36810
|
case 0:
|
|
36713
36811
|
_context3.next = 2;
|
|
36714
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
36812
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-dec9a0b8.js'); });
|
|
36715
36813
|
case 2:
|
|
36716
36814
|
_yield$import = _context3.sent;
|
|
36717
36815
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37156,13 +37254,15 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37156
37254
|
* @param catalogCodex The CatalogCodex in the planning
|
|
37157
37255
|
* @param catalogGUID The CatalogGUID in the planning
|
|
37158
37256
|
* @param forceReloadPlanning Force reload whole planning even if only viewPoint has changed. This is used when for example no 3D Render Client has loaded the current planning
|
|
37257
|
+
* @param camera The RTV Camera Information for Unity/RTV KOMBI
|
|
37258
|
+
* @param useLatestCamera should the latest camera be used ? default yes when requesting the start viewpoint via the configurator button not
|
|
37159
37259
|
*/
|
|
37160
37260
|
}, {
|
|
37161
37261
|
key: "request3D",
|
|
37162
37262
|
value: (function () {
|
|
37163
37263
|
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
|
|
37164
37264
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
37165
|
-
var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType,
|
|
37265
|
+
var room, newRenderSize, doReloadWholePlanning, camera, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, returnRequest;
|
|
37166
37266
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
37167
37267
|
while (1) switch (_context7.prev = _context7.next) {
|
|
37168
37268
|
case 0:
|
|
@@ -37188,7 +37288,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37188
37288
|
//Check if viewPoint is changed based on alternateRendering
|
|
37189
37289
|
//Do check if viewpoint has to be changed
|
|
37190
37290
|
if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
|
|
37191
|
-
|
|
37291
|
+
camera = params.camera ? params.camera : params.useLatestCamera ? this.latestCamera : undefined;
|
|
37292
|
+
planningHash = DivaUtils.md5(JSON.stringify(params.planningData) + JSON.stringify(camera));
|
|
37192
37293
|
if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
|
|
37193
37294
|
if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
|
|
37194
37295
|
this.lastFramePlanningHash = planningHash;
|
|
@@ -37196,7 +37297,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37196
37297
|
requestHqRenderScriptFrom3DHost = false;
|
|
37197
37298
|
if (params.doRequestHqRenderScript) {
|
|
37198
37299
|
rendering = this.hqRenderScriptCache.get(planningHash);
|
|
37199
|
-
if (rendering) {
|
|
37300
|
+
if (rendering && !params.useLatestCamera) {
|
|
37200
37301
|
LOG$4.debug('Get HQRenderScript from cache');
|
|
37201
37302
|
this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
|
|
37202
37303
|
this.updatePlannerHqRenderScriptInView(rendering);
|
|
@@ -37217,7 +37318,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37217
37318
|
if (params.doRequestRendering) {
|
|
37218
37319
|
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
37219
37320
|
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
37220
|
-
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(
|
|
37321
|
+
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(camera));
|
|
37221
37322
|
this.lastRequestedRenderHash = renderHash;
|
|
37222
37323
|
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
37223
37324
|
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
@@ -37250,7 +37351,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37250
37351
|
}
|
|
37251
37352
|
}
|
|
37252
37353
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
37253
|
-
_context7.next =
|
|
37354
|
+
_context7.next = 32;
|
|
37254
37355
|
break;
|
|
37255
37356
|
}
|
|
37256
37357
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -37277,20 +37378,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37277
37378
|
viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
|
|
37278
37379
|
alternateRenderingsExist: params.alternateRenderingsExist,
|
|
37279
37380
|
alternateRenderInfo: params.alternateRenderInfo,
|
|
37280
|
-
camera:
|
|
37281
|
-
forceUseCam: !!
|
|
37381
|
+
camera: camera,
|
|
37382
|
+
forceUseCam: !!camera
|
|
37282
37383
|
} : undefined
|
|
37283
37384
|
});
|
|
37284
37385
|
if (params.camera) this.latestCamera = params.camera;
|
|
37285
37386
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37286
|
-
_context7.next =
|
|
37387
|
+
_context7.next = 30;
|
|
37287
37388
|
break;
|
|
37288
37389
|
}
|
|
37289
37390
|
LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
37290
37391
|
code: 'WC_0013'
|
|
37291
37392
|
}));
|
|
37292
37393
|
return _context7.abrupt("return");
|
|
37293
|
-
case
|
|
37394
|
+
case 30:
|
|
37294
37395
|
if (requestHqRenderScriptFrom3DHost) {
|
|
37295
37396
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
37296
37397
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -37302,12 +37403,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37302
37403
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
37303
37404
|
}
|
|
37304
37405
|
}
|
|
37305
|
-
case
|
|
37406
|
+
case 32:
|
|
37306
37407
|
return _context7.abrupt("return", {
|
|
37307
37408
|
planningHash: planningHash,
|
|
37308
37409
|
renderHash: renderHash
|
|
37309
37410
|
});
|
|
37310
|
-
case
|
|
37411
|
+
case 33:
|
|
37311
37412
|
case "end":
|
|
37312
37413
|
return _context7.stop();
|
|
37313
37414
|
}
|
|
@@ -38260,7 +38361,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38260
38361
|
break;
|
|
38261
38362
|
case 8:
|
|
38262
38363
|
_context4.next = 10;
|
|
38263
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
38364
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-ae253974.js'); });
|
|
38264
38365
|
case 10:
|
|
38265
38366
|
_yield$import = _context4.sent;
|
|
38266
38367
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38271,7 +38372,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38271
38372
|
return _context4.abrupt("break", 21);
|
|
38272
38373
|
case 15:
|
|
38273
38374
|
_context4.next = 17;
|
|
38274
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
38375
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-815fbf90.js'); });
|
|
38275
38376
|
case 17:
|
|
38276
38377
|
_yield$import2 = _context4.sent;
|
|
38277
38378
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38414,7 +38515,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38414
38515
|
case 2:
|
|
38415
38516
|
rendering = _context6.sent;
|
|
38416
38517
|
LOG$2.debug('SAVE SET IMAGE DIM3D width: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w) + ', height: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h) + ', depth: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d));
|
|
38417
|
-
return _context6.abrupt("return",
|
|
38518
|
+
return _context6.abrupt("return", {
|
|
38519
|
+
url: rendering === null || rendering === void 0 ? void 0 : rendering.UrlToSavedRendering,
|
|
38520
|
+
dimensions: {
|
|
38521
|
+
w: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w,
|
|
38522
|
+
h: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h,
|
|
38523
|
+
d: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d
|
|
38524
|
+
}
|
|
38525
|
+
});
|
|
38418
38526
|
case 5:
|
|
38419
38527
|
case "end":
|
|
38420
38528
|
return _context6.stop();
|
|
@@ -38530,7 +38638,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38530
38638
|
key: "saveSetHQRenderScript",
|
|
38531
38639
|
value: function () {
|
|
38532
38640
|
var _saveSetHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
|
|
38533
|
-
var hashes, planningHash, checkingTimes, i;
|
|
38641
|
+
var hashes, planningHash, checkingTimes, i, sumWaitingMS;
|
|
38534
38642
|
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
|
|
38535
38643
|
while (1) switch (_context9.prev = _context9.next) {
|
|
38536
38644
|
case 0:
|
|
@@ -38546,25 +38654,27 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38546
38654
|
return _context9.abrupt("return");
|
|
38547
38655
|
case 6:
|
|
38548
38656
|
planningHash = hashes.planningHash;
|
|
38549
|
-
checkingTimes =
|
|
38657
|
+
checkingTimes = 200;
|
|
38550
38658
|
i = 0;
|
|
38551
|
-
|
|
38659
|
+
sumWaitingMS = 0;
|
|
38660
|
+
case 10:
|
|
38552
38661
|
if (!(this.handler3D.getWaitForHqRenderScript(planningHash) && checkingTimes > i)) {
|
|
38553
|
-
_context9.next =
|
|
38662
|
+
_context9.next = 17;
|
|
38554
38663
|
break;
|
|
38555
38664
|
}
|
|
38556
|
-
|
|
38665
|
+
sumWaitingMS += 50;
|
|
38666
|
+
_context9.next = 14;
|
|
38557
38667
|
return DivaUtils__default["default"].Sleep(50);
|
|
38558
|
-
case
|
|
38668
|
+
case 14:
|
|
38559
38669
|
i++;
|
|
38560
|
-
_context9.next =
|
|
38670
|
+
_context9.next = 10;
|
|
38561
38671
|
break;
|
|
38562
|
-
case
|
|
38563
|
-
LOG$2.debug('saving performance: HQ Renderscript recieved after ' +
|
|
38672
|
+
case 17:
|
|
38673
|
+
LOG$2.debug('saving performance: HQ Renderscript recieved after ' + sumWaitingMS + ' ms');
|
|
38564
38674
|
if (this.handler3D.checkIsWaitingForHQRenderScript() && checkingTimes == i) {
|
|
38565
38675
|
LOG$2.error(new DivaUtils.DivaError('could not saveSetHQRenderScript'));
|
|
38566
38676
|
}
|
|
38567
|
-
case
|
|
38677
|
+
case 19:
|
|
38568
38678
|
case "end":
|
|
38569
38679
|
return _context9.stop();
|
|
38570
38680
|
}
|
|
@@ -38997,7 +39107,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38997
39107
|
planner3DGridEnabled: false,
|
|
38998
39108
|
mediaServiceSaveMode: 'STREAM',
|
|
38999
39109
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
39000
|
-
});
|
|
39110
|
+
}, undefined, true);
|
|
39001
39111
|
} else {
|
|
39002
39112
|
this.handler3D.handle3DVisualizationChanged(mode, params);
|
|
39003
39113
|
}
|
|
@@ -39030,7 +39140,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39030
39140
|
}, {
|
|
39031
39141
|
key: "request3D",
|
|
39032
39142
|
value: function () {
|
|
39033
|
-
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint) {
|
|
39143
|
+
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint, useLatestCamera) {
|
|
39034
39144
|
var _this3 = this;
|
|
39035
39145
|
var plannerData, loadedCatData, plannerExists, savedSetId;
|
|
39036
39146
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
@@ -39101,7 +39211,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39101
39211
|
forceReloadPlanning: forceReloadPlanning,
|
|
39102
39212
|
alternateRenderInfo: alternateRenderInfo,
|
|
39103
39213
|
alternateRenderingsExist: alternateRenderingsExist,
|
|
39104
|
-
camera: viewpoint
|
|
39214
|
+
camera: viewpoint,
|
|
39215
|
+
useLatestCamera: useLatestCamera
|
|
39105
39216
|
});
|
|
39106
39217
|
case 18:
|
|
39107
39218
|
return _context16.abrupt("return", _context16.sent);
|
|
@@ -39113,7 +39224,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39113
39224
|
}
|
|
39114
39225
|
}, _callee16, this);
|
|
39115
39226
|
}));
|
|
39116
|
-
function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39) {
|
|
39227
|
+
function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
|
|
39117
39228
|
return _request3D.apply(this, arguments);
|
|
39118
39229
|
}
|
|
39119
39230
|
return request3D;
|
|
@@ -39792,19 +39903,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39792
39903
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
39793
39904
|
_defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
|
|
39794
39905
|
var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
|
|
39906
|
+
var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
|
|
39795
39907
|
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
|
|
39796
39908
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
|
|
39797
39909
|
while (1) switch (_context11.prev = _context11.next) {
|
|
39798
39910
|
case 0:
|
|
39799
39911
|
set = _this.actSet();
|
|
39800
|
-
|
|
39912
|
+
(_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
|
|
39913
|
+
_context11.next = 4;
|
|
39801
39914
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
39802
|
-
case
|
|
39915
|
+
case 4:
|
|
39803
39916
|
returnValues = _context11.sent;
|
|
39917
|
+
(_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
|
|
39804
39918
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
39805
39919
|
_this.checkVariantData();
|
|
39806
39920
|
if (dontUpdatePlannerView) {
|
|
39807
|
-
_context11.next =
|
|
39921
|
+
_context11.next = 18;
|
|
39808
39922
|
break;
|
|
39809
39923
|
}
|
|
39810
39924
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -39818,16 +39932,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39818
39932
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39819
39933
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
39820
39934
|
_this.updateWebConfiguratorTitle();
|
|
39821
|
-
_context11.next =
|
|
39935
|
+
_context11.next = 18;
|
|
39822
39936
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
39823
|
-
case
|
|
39937
|
+
case 18:
|
|
39824
39938
|
if (dontCallEvents) {
|
|
39825
|
-
_context11.next =
|
|
39939
|
+
_context11.next = 21;
|
|
39826
39940
|
break;
|
|
39827
39941
|
}
|
|
39828
|
-
_context11.next =
|
|
39942
|
+
_context11.next = 21;
|
|
39829
39943
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39830
|
-
case
|
|
39944
|
+
case 21:
|
|
39831
39945
|
case "end":
|
|
39832
39946
|
return _context11.stop();
|
|
39833
39947
|
}
|
|
@@ -39891,6 +40005,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39891
40005
|
return _ref12.apply(this, arguments);
|
|
39892
40006
|
};
|
|
39893
40007
|
}());
|
|
40008
|
+
_defineProperty__default["default"](this, "getPosNr", function (basketId) {
|
|
40009
|
+
var _set$getArticleByBask;
|
|
40010
|
+
var set = _this.actSet();
|
|
40011
|
+
if (!set) throw new Error('set undefined');
|
|
40012
|
+
return (_set$getArticleByBask = set.getArticleByBasketId(basketId)) === null || _set$getArticleByBask === void 0 ? void 0 : _set$getArticleByBask.posNr;
|
|
40013
|
+
});
|
|
39894
40014
|
_defineProperty__default["default"](this, "getReturnTo", function (event) {
|
|
39895
40015
|
var returnTo = _this.ReturnTo;
|
|
39896
40016
|
if (returnTo == undefined) {
|
|
@@ -39921,7 +40041,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39921
40041
|
key: "initialize",
|
|
39922
40042
|
value: function () {
|
|
39923
40043
|
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
|
|
39924
|
-
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$
|
|
40044
|
+
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions16, _set$getDivaArticles, _set$getSetPrice, _this$actions15, _this$actions15$toggl, initSetState, set, products, result, _this$actions17, basket, catalogData;
|
|
39925
40045
|
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
|
|
39926
40046
|
while (1) switch (_context13.prev = _context13.next) {
|
|
39927
40047
|
case 0:
|
|
@@ -39965,7 +40085,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39965
40085
|
return this.initView();
|
|
39966
40086
|
case 20:
|
|
39967
40087
|
this.subscribeToWebPlannerEvents();
|
|
39968
|
-
(_this$
|
|
40088
|
+
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
39969
40089
|
return _context13.abrupt("return", true);
|
|
39970
40090
|
case 23:
|
|
39971
40091
|
//TODO: get prices of matching product with more than one element
|
|
@@ -40015,11 +40135,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40015
40135
|
_context13.next = 44;
|
|
40016
40136
|
return this.initView();
|
|
40017
40137
|
case 44:
|
|
40018
|
-
(_this$
|
|
40138
|
+
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40019
40139
|
type: 'onConfiguratorReady'
|
|
40020
40140
|
});
|
|
40021
40141
|
if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
|
|
40022
|
-
(_this$
|
|
40142
|
+
(_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
|
|
40023
40143
|
type: 'onArticleInitialized'
|
|
40024
40144
|
});
|
|
40025
40145
|
}
|
|
@@ -40114,11 +40234,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40114
40234
|
}, {
|
|
40115
40235
|
key: "onInitializationError",
|
|
40116
40236
|
value: function onInitializationError() {
|
|
40117
|
-
var _this$state2, _this$
|
|
40237
|
+
var _this$state2, _this$actions19, _this$actions19$toggl;
|
|
40118
40238
|
var onErrorHandling = this.api.onErrorHandling();
|
|
40119
40239
|
if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
|
|
40120
|
-
var _this$
|
|
40121
|
-
(_this$
|
|
40240
|
+
var _this$actions18;
|
|
40241
|
+
(_this$actions18 = this.actions) === null || _this$actions18 === void 0 || _this$actions18.closeComponentInFullscreen();
|
|
40122
40242
|
return;
|
|
40123
40243
|
}
|
|
40124
40244
|
if (onErrorHandling) {
|
|
@@ -40159,7 +40279,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40159
40279
|
});
|
|
40160
40280
|
}
|
|
40161
40281
|
}
|
|
40162
|
-
(_this$
|
|
40282
|
+
(_this$actions19 = this.actions) === null || _this$actions19 === void 0 || (_this$actions19$toggl = _this$actions19.toggleLoading) === null || _this$actions19$toggl === void 0 || _this$actions19$toggl.call(_this$actions19, 'Planner_Loading', false, false);
|
|
40163
40283
|
}
|
|
40164
40284
|
}, {
|
|
40165
40285
|
key: "getDivaArticles",
|
|
@@ -40492,7 +40612,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40492
40612
|
}, {
|
|
40493
40613
|
key: "updatePlannerView",
|
|
40494
40614
|
value: function updatePlannerView(callingFrom, onDoConfigureValues, viewpoint) {
|
|
40495
|
-
var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3;
|
|
40615
|
+
var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
|
|
40496
40616
|
var set = this.actSet();
|
|
40497
40617
|
if (!set) return;
|
|
40498
40618
|
var alternateRenderInfo = (_this$getCurrentAlter = this.getCurrentAlternativRendering) === null || _this$getCurrentAlter === void 0 || (_this$getCurrentAlter = _this$getCurrentAlter.call(this)) === null || _this$getCurrentAlter === void 0 ? void 0 : _this$getCurrentAlter[0];
|
|
@@ -40527,24 +40647,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40527
40647
|
//delete me if you see this
|
|
40528
40648
|
LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
|
|
40529
40649
|
switch (this.getCurPlannerViewMode()) {
|
|
40650
|
+
case '3DCOMB':
|
|
40651
|
+
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint, callingFrom != 'HANDLE_3D_VIS_CHANGED');
|
|
40652
|
+
break;
|
|
40530
40653
|
case 'RTViewer':
|
|
40531
40654
|
//Request HQRenderscript + rendering
|
|
40532
40655
|
//Request new Rendering
|
|
40533
|
-
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40656
|
+
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo, viewpoint);
|
|
40534
40657
|
break;
|
|
40535
40658
|
case '3DImage':
|
|
40536
40659
|
//Request new Rendering
|
|
40537
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40660
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime4 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime4 === void 0 ? void 0 : _this$getDoShow3DDime4.call(this), alternateRenderInfo);
|
|
40538
40661
|
break;
|
|
40539
40662
|
case '2DGrid':
|
|
40540
40663
|
var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
|
|
40541
40664
|
if (boundingBox) {
|
|
40542
40665
|
this.updatePlanner2DGrid(boundingBox);
|
|
40543
40666
|
}
|
|
40544
|
-
if (['3DImage'].includes(this.getInitPlannerViewMode())) {
|
|
40545
|
-
var _this$
|
|
40667
|
+
if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
|
|
40668
|
+
var _this$getDoShow3DDime5;
|
|
40546
40669
|
//update 3D image always even if you are in the 2DGrid mode
|
|
40547
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$
|
|
40670
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime5 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime5 === void 0 ? void 0 : _this$getDoShow3DDime5.call(this), alternateRenderInfo);
|
|
40548
40671
|
}
|
|
40549
40672
|
break;
|
|
40550
40673
|
}
|
|
@@ -40562,18 +40685,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40562
40685
|
value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
|
|
40563
40686
|
var set = this.actSet();
|
|
40564
40687
|
this.update2DGrid(set);
|
|
40565
|
-
if (['3DImage', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
|
|
40566
|
-
var _this$
|
|
40688
|
+
if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
|
|
40689
|
+
var _this$getDoShow3DDime7;
|
|
40567
40690
|
if (doLoadAllAlternateRenderings) {
|
|
40568
40691
|
var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
|
|
40569
40692
|
for (var i = 0; i < alternateRenderings.length; i++) {
|
|
40570
40693
|
if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
|
|
40571
|
-
var _this$
|
|
40572
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$
|
|
40694
|
+
var _this$getDoShow3DDime6;
|
|
40695
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$getDoShow3DDime6 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime6 === void 0 ? void 0 : _this$getDoShow3DDime6.call(this), alternateRenderings[i]);
|
|
40573
40696
|
}
|
|
40574
40697
|
}
|
|
40575
40698
|
}
|
|
40576
|
-
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$
|
|
40699
|
+
setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$getDoShow3DDime7 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime7 === void 0 ? void 0 : _this$getDoShow3DDime7.call(this));
|
|
40577
40700
|
}
|
|
40578
40701
|
}
|
|
40579
40702
|
}, {
|
|
@@ -40870,8 +40993,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40870
40993
|
}, {
|
|
40871
40994
|
key: "changeOnFavorites",
|
|
40872
40995
|
value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
|
|
40873
|
-
var _this$
|
|
40874
|
-
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$
|
|
40996
|
+
var _this$actions20;
|
|
40997
|
+
favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions20 = this.actions) === null || _this$actions20 === void 0 ? void 0 : _this$actions20.openModal);
|
|
40875
40998
|
}
|
|
40876
40999
|
}, {
|
|
40877
41000
|
key: "setDifferentOptions",
|
|
@@ -40918,25 +41041,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40918
41041
|
}, {
|
|
40919
41042
|
key: "callEvent",
|
|
40920
41043
|
value: function callEvent(event, param) {
|
|
40921
|
-
var _this$
|
|
41044
|
+
var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
|
|
40922
41045
|
switch (event) {
|
|
40923
41046
|
case 'onFullscreenClose':
|
|
40924
|
-
(_this$
|
|
41047
|
+
(_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
|
|
40925
41048
|
type: 'onFullscreenClose'
|
|
40926
41049
|
});
|
|
40927
41050
|
break;
|
|
40928
41051
|
case 'onWebPlanerClose':
|
|
40929
|
-
(_this$
|
|
41052
|
+
(_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
|
|
40930
41053
|
type: 'onWebPlanerClose'
|
|
40931
41054
|
});
|
|
40932
41055
|
break;
|
|
40933
41056
|
case 'onWebPlanerHelp':
|
|
40934
|
-
(_this$
|
|
41057
|
+
(_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
|
|
40935
41058
|
type: 'onWebPlanerHelp'
|
|
40936
41059
|
});
|
|
40937
41060
|
break;
|
|
40938
41061
|
case 'onWebPlanerZoomClick':
|
|
40939
|
-
(_this$
|
|
41062
|
+
(_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
|
|
40940
41063
|
type: 'onWebPlanerZoomClick',
|
|
40941
41064
|
data: param
|
|
40942
41065
|
});
|
|
@@ -40947,14 +41070,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40947
41070
|
key: "saveToBasketWrapper",
|
|
40948
41071
|
value: function () {
|
|
40949
41072
|
var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
|
|
40950
|
-
var _this$
|
|
40951
|
-
_this$
|
|
40952
|
-
_this$
|
|
40953
|
-
_this$
|
|
41073
|
+
var _this$actions25,
|
|
41074
|
+
_this$actions25$toggl,
|
|
41075
|
+
_this$actions26,
|
|
41076
|
+
_this$actions26$toggl,
|
|
40954
41077
|
_this2 = this,
|
|
40955
|
-
_this$
|
|
41078
|
+
_this$actions30,
|
|
40956
41079
|
_this$i18n14;
|
|
40957
|
-
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$
|
|
41080
|
+
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions31, _this$i18n15;
|
|
40958
41081
|
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
40959
41082
|
while (1) switch (_context26.prev = _context26.next) {
|
|
40960
41083
|
case 0:
|
|
@@ -40988,18 +41111,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40988
41111
|
case 15:
|
|
40989
41112
|
returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40990
41113
|
case 16:
|
|
40991
|
-
(_this$
|
|
41114
|
+
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || (_this$actions25$toggl = _this$actions25.toggleLoading) === null || _this$actions25$toggl === void 0 || _this$actions25$toggl.call(_this$actions25, 'Planner_Saving', false, true);
|
|
40992
41115
|
_context26.next = 19;
|
|
40993
41116
|
return this.saveToBasket(finalEvent, repairOnly, force);
|
|
40994
41117
|
case 19:
|
|
40995
41118
|
result = _context26.sent;
|
|
40996
|
-
(_this$
|
|
41119
|
+
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || (_this$actions26$toggl = _this$actions26.toggleLoading) === null || _this$actions26$toggl === void 0 || _this$actions26$toggl.call(_this$actions26, 'Planner_Saving', false, false);
|
|
40997
41120
|
if (!(result === 'canceled')) {
|
|
40998
41121
|
_context26.next = 25;
|
|
40999
41122
|
break;
|
|
41000
41123
|
}
|
|
41001
41124
|
LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
|
|
41002
|
-
(_this$
|
|
41125
|
+
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
|
|
41003
41126
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
41004
41127
|
accept: true
|
|
41005
41128
|
});
|
|
@@ -41013,12 +41136,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41013
41136
|
LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
|
|
41014
41137
|
code: 'WC_0010'
|
|
41015
41138
|
}));
|
|
41016
|
-
(_this$
|
|
41139
|
+
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
|
|
41017
41140
|
text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
|
|
41018
41141
|
accept: true
|
|
41019
41142
|
});
|
|
41020
41143
|
} else {
|
|
41021
|
-
(_this$
|
|
41144
|
+
(_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
|
|
41022
41145
|
text: (_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t(this.divaBasketHandler.actBasket.Status === 'ORDER' ? 'modal.open_order_pdf_now' : 'modal.open_leaflet_pdf_now'),
|
|
41023
41146
|
accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
|
|
41024
41147
|
callback: function callback() {
|
|
@@ -41028,7 +41151,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41028
41151
|
}
|
|
41029
41152
|
return _context26.abrupt("break", 31);
|
|
41030
41153
|
case 30:
|
|
41031
|
-
(_this$
|
|
41154
|
+
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
|
|
41032
41155
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
41033
41156
|
accept: true
|
|
41034
41157
|
});
|
|
@@ -41044,7 +41167,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41044
41167
|
_context26.next = 37;
|
|
41045
41168
|
break;
|
|
41046
41169
|
}
|
|
41047
|
-
(_this$
|
|
41170
|
+
(_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
|
|
41048
41171
|
accept: true,
|
|
41049
41172
|
text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
|
|
41050
41173
|
title: 'modals.error_saving'
|
|
@@ -41067,7 +41190,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41067
41190
|
key: "saveToBasket",
|
|
41068
41191
|
value: function () {
|
|
41069
41192
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, force) {
|
|
41070
|
-
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$
|
|
41193
|
+
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
|
|
41071
41194
|
var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
|
|
41072
41195
|
return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
|
|
41073
41196
|
while (1) switch (_context27.prev = _context27.next) {
|
|
@@ -41154,7 +41277,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41154
41277
|
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 39 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 41 : _context27.t3 === 'OPEN_PDF' ? 43 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 43 : _context27.t3 === 'SAVE_BASKET' ? 43 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 43 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 43 : 63;
|
|
41155
41278
|
break;
|
|
41156
41279
|
case 39:
|
|
41157
|
-
(_this$
|
|
41280
|
+
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
|
|
41158
41281
|
type: 'SELLER',
|
|
41159
41282
|
parameters: {
|
|
41160
41283
|
module: 'PCreator',
|
|
@@ -41167,7 +41290,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41167
41290
|
});
|
|
41168
41291
|
return _context27.abrupt("break", 63);
|
|
41169
41292
|
case 41:
|
|
41170
|
-
(_this$
|
|
41293
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
41171
41294
|
type: 'SELLER',
|
|
41172
41295
|
parameters: {
|
|
41173
41296
|
module: 'Basket',
|
|
@@ -41249,6 +41372,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41249
41372
|
if (!set) return;
|
|
41250
41373
|
return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
|
|
41251
41374
|
}
|
|
41375
|
+
}, {
|
|
41376
|
+
key: "checkBannerRules",
|
|
41377
|
+
value: function checkBannerRules(visitedOptions, event) {
|
|
41378
|
+
var set = this.actSet();
|
|
41379
|
+
if (!set) return;
|
|
41380
|
+
return setHandlerInstance.checkBannerRules(set, visitedOptions, event);
|
|
41381
|
+
}
|
|
41252
41382
|
|
|
41253
41383
|
/**
|
|
41254
41384
|
* This function returns true if the Planner Mode should be visible and the planner Step should be shown.
|
|
@@ -41410,6 +41540,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41410
41540
|
key: "getAllowRTV",
|
|
41411
41541
|
value: function getAllowRTV() {
|
|
41412
41542
|
var _this$actSet21, _this$actSet22;
|
|
41543
|
+
if (this.getEnableUnityRtvKombi()) return false;
|
|
41413
41544
|
if (this.api.forceShowRTV()) return true;
|
|
41414
41545
|
if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
|
|
41415
41546
|
if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
|
|
@@ -41492,16 +41623,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41492
41623
|
key: "addToBasket",
|
|
41493
41624
|
value: function () {
|
|
41494
41625
|
var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
|
|
41495
|
-
var _this$
|
|
41496
|
-
_this$actions33,
|
|
41497
|
-
_this$actions34,
|
|
41626
|
+
var _this$actions34,
|
|
41498
41627
|
_this$actions35,
|
|
41499
41628
|
_this$actions36,
|
|
41500
|
-
_this$divaBasketHandl3,
|
|
41501
|
-
_this3 = this,
|
|
41502
41629
|
_this$actions37,
|
|
41503
41630
|
_this$actions38,
|
|
41504
|
-
_this$
|
|
41631
|
+
_this$divaBasketHandl3,
|
|
41632
|
+
_this3 = this,
|
|
41633
|
+
_this$actions39,
|
|
41634
|
+
_this$actions40,
|
|
41635
|
+
_this$actions41;
|
|
41505
41636
|
var event,
|
|
41506
41637
|
addToBasketLog,
|
|
41507
41638
|
emailConfig,
|
|
@@ -41521,35 +41652,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41521
41652
|
break;
|
|
41522
41653
|
case 5:
|
|
41523
41654
|
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
41524
|
-
(_this$
|
|
41655
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
|
|
41525
41656
|
type: 'onWebPlanerPrint',
|
|
41526
41657
|
data: actBasket.getAsJson()
|
|
41527
41658
|
});
|
|
41528
41659
|
return _context29.abrupt("break", 38);
|
|
41529
41660
|
case 8:
|
|
41530
41661
|
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
41531
|
-
(_this$
|
|
41662
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
41532
41663
|
type: 'onWebPlanerSave',
|
|
41533
41664
|
data: actBasket.getAsJson()
|
|
41534
41665
|
});
|
|
41535
41666
|
return _context29.abrupt("break", 38);
|
|
41536
41667
|
case 11:
|
|
41537
41668
|
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
41538
|
-
(_this$
|
|
41669
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41539
41670
|
type: 'onWebPlanerShare',
|
|
41540
41671
|
data: actBasket.getAsJson()
|
|
41541
41672
|
});
|
|
41542
41673
|
return _context29.abrupt("break", 38);
|
|
41543
41674
|
case 14:
|
|
41544
41675
|
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
41545
|
-
(_this$
|
|
41676
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41546
41677
|
type: 'onRequestConsulation',
|
|
41547
41678
|
data: actBasket.getAsJson()
|
|
41548
41679
|
});
|
|
41549
41680
|
return _context29.abrupt("break", 38);
|
|
41550
41681
|
case 17:
|
|
41551
41682
|
this.handleSuccessTransaction('onSave', actBasket);
|
|
41552
|
-
(_this$
|
|
41683
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41553
41684
|
type: 'onSave',
|
|
41554
41685
|
data: actBasket.getAsJson()
|
|
41555
41686
|
});
|
|
@@ -41585,7 +41716,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41585
41716
|
});
|
|
41586
41717
|
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41587
41718
|
}
|
|
41588
|
-
(_this$
|
|
41719
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41589
41720
|
type: 'onAddToBasket',
|
|
41590
41721
|
data: actBasket.getAsJson()
|
|
41591
41722
|
});
|
|
@@ -41597,7 +41728,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41597
41728
|
case 28:
|
|
41598
41729
|
products = _context29.sent;
|
|
41599
41730
|
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41600
|
-
(_this$
|
|
41731
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41601
41732
|
type: 'onAddToBasket',
|
|
41602
41733
|
data: actBasket.getAsJson()
|
|
41603
41734
|
});
|
|
@@ -41611,7 +41742,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41611
41742
|
addToBasketLog = false;
|
|
41612
41743
|
case 35:
|
|
41613
41744
|
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41614
|
-
(_this$
|
|
41745
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41615
41746
|
type: 'onAddToBasket',
|
|
41616
41747
|
data: actBasket.getAsJson()
|
|
41617
41748
|
});
|
|
@@ -41643,8 +41774,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41643
41774
|
}, {
|
|
41644
41775
|
key: "openPDFpostAsEvent",
|
|
41645
41776
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
41646
|
-
var _this$
|
|
41647
|
-
(_this$
|
|
41777
|
+
var _this$actions42, _this$actions43, _this$actions44;
|
|
41778
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
|
|
41648
41779
|
type: 'update',
|
|
41649
41780
|
param: {
|
|
41650
41781
|
groupId: 'SHOWROOM',
|
|
@@ -41658,7 +41789,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41658
41789
|
}
|
|
41659
41790
|
}
|
|
41660
41791
|
});
|
|
41661
|
-
(_this$
|
|
41792
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
|
|
41662
41793
|
type: 'update',
|
|
41663
41794
|
param: {
|
|
41664
41795
|
groupId: 'SHOWROOM',
|
|
@@ -41672,7 +41803,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41672
41803
|
}
|
|
41673
41804
|
}
|
|
41674
41805
|
});
|
|
41675
|
-
(_this$
|
|
41806
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
|
|
41676
41807
|
type: 'REPORT',
|
|
41677
41808
|
parameters: {
|
|
41678
41809
|
id: mongoDBId
|
|
@@ -41892,14 +42023,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41892
42023
|
}, {
|
|
41893
42024
|
key: "subscribeToWebPlannerEvents",
|
|
41894
42025
|
value: function subscribeToWebPlannerEvents() {
|
|
41895
|
-
var _this$
|
|
41896
|
-
(_this$
|
|
42026
|
+
var _this$actions45;
|
|
42027
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
|
|
41897
42028
|
}
|
|
41898
42029
|
}, {
|
|
41899
42030
|
key: "unsubscribeFromWebPlannerEvents",
|
|
41900
42031
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
41901
|
-
var _this$
|
|
41902
|
-
(_this$
|
|
42032
|
+
var _this$actions46;
|
|
42033
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
|
|
41903
42034
|
}
|
|
41904
42035
|
}, {
|
|
41905
42036
|
key: "initApiForLogicOnly",
|