@crystaldesign/web-planner-logic 24.12.0-beta.1 → 24.12.0-beta.16

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.
Files changed (67) hide show
  1. package/build/cjs/{DivaBoxPlanner-a5e169ca.js → DivaBoxPlanner-dd5c69fd.js} +3 -3
  2. package/build/cjs/{DivaStandardPlanner-d833dda6.js → DivaStandardPlanner-2efb3d58.js} +17 -81
  3. package/build/cjs/{DoorPlanner-4ad0b55d.js → DoorPlanner-dd6d3521.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-18d5959b.js → Host3DSignalR-3e4165d6.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-2df9ce37.js → LiviqueWWSHandler-ec226414.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-04557c0d.js → PfisterWWSHandler-bd3fca2a.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-ba17ec51.js → PlannerHandler2D-23dee569.js} +62 -67
  8. package/build/cjs/{ProductBasketHandler-a74547b4.js → ProductBasketHandler-bb03366e.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-d7eeeb38.js → SeriousBasketHandler-02d681ef.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-546bdbd7.js → ShelfPlanner-eb3ba49a.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-33b00bda.js → StandardWWSHandler-1c8180d6.js} +1 -1
  12. package/build/cjs/{index-079a47df.js → index-4ef55e73.js} +533 -401
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-a95c530a.js → DivaBoxPlanner-9854695f.js} +3 -3
  15. package/build/esm/{DivaStandardPlanner-660cec0e.js → DivaStandardPlanner-23117cf0.js} +17 -81
  16. package/build/esm/{DoorPlanner-9e3b1dff.js → DoorPlanner-5a3aa0e3.js} +1 -1
  17. package/build/esm/{Host3DSignalR-514ab7ea.js → Host3DSignalR-a9efc712.js} +1 -1
  18. package/build/esm/{LiviqueWWSHandler-5bbc4f4c.js → LiviqueWWSHandler-45311234.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-fea10934.js → PfisterWWSHandler-65456493.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-e204acd1.js → PlannerHandler2D-8d500b19.js} +62 -67
  21. package/build/esm/{ProductBasketHandler-ce45363b.js → ProductBasketHandler-2b076219.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-41c875f2.js → SeriousBasketHandler-03666454.js} +1 -1
  23. package/build/esm/{ShelfPlanner-88da02c7.js → ShelfPlanner-91bba80f.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-26c6ecb8.js → StandardWWSHandler-0d1aa5e9.js} +1 -1
  25. package/build/esm/{index-ae50d2a1.js → index-925c563b.js} +533 -401
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/index.d.ts +1 -1
  28. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -0
  30. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +3 -2
  34. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +2 -2
  36. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -1
  38. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -2
  40. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts +15 -7
  42. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -1
  44. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +7 -3
  46. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +5 -1
  49. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -2
  51. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +2 -0
  54. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +1 -0
  56. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  58. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  59. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +27 -6
  60. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
  62. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
  64. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
  66. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  67. package/package.json +2 -2
@@ -16650,6 +16650,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
16650
16650
  get: function get() {
16651
16651
  return this.catalogArticle.hasPartlistArticle;
16652
16652
  }
16653
+ }, {
16654
+ key: "possiblePartlistCodexes",
16655
+ get: function get() {
16656
+ var _this$catalogArticle$2;
16657
+ return (_this$catalogArticle$2 = this.catalogArticle.partListArticles) === null || _this$catalogArticle$2 === void 0 ? void 0 : _this$catalogArticle$2.join(';');
16658
+ }
16653
16659
  }, {
16654
16660
  key: "articleDecisions",
16655
16661
  get: function get() {
@@ -16916,8 +16922,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
16916
16922
  }, {
16917
16923
  key: "metaDataView",
16918
16924
  get: function get() {
16919
- var _this$catalogArticle$2;
16920
- return (_this$catalogArticle$2 = this.catalogArticle.metaData) !== null && _this$catalogArticle$2 !== void 0 ? _this$catalogArticle$2 : [];
16925
+ var _this$catalogArticle$3;
16926
+ return (_this$catalogArticle$3 = this.catalogArticle.metaData) !== null && _this$catalogArticle$3 !== void 0 ? _this$catalogArticle$3 : [];
16921
16927
  }
16922
16928
  }, {
16923
16929
  key: "getMergesToOPG",
@@ -18287,7 +18293,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18287
18293
  DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
18288
18294
  }
18289
18295
  }],
18290
- warningRule: [],
18296
+ warningRules: [],
18297
+ bannerRules: [],
18291
18298
  summaryTabGroupPosition: undefined,
18292
18299
  onConfigSingleDontGeneralize: false,
18293
18300
  ignoreMaxPriceAsBP: false,
@@ -18592,7 +18599,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
18592
18599
  } else if (item.Codex == 'NOTIFICATIONS') {
18593
18600
  _this.catalogData.notificationsRules = JSON.parse(item.Value);
18594
18601
  } else if (item.Codex == 'WARNINGS') {
18595
- _this.catalogData.warningRule = JSON.parse(item.Value);
18602
+ _this.catalogData.warningRules = JSON.parse(item.Value);
18603
+ } else if (item.Codex == 'BANNER') {
18604
+ _this.catalogData.bannerRules = JSON.parse(item.Value);
18596
18605
  } else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
18597
18606
  _this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
18598
18607
  } else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
@@ -18793,7 +18802,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18793
18802
  is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
18794
18803
  groupName: groupTitle,
18795
18804
  metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
18796
- contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
18805
+ contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
18806
+ partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
18797
18807
  };
18798
18808
  this.plannerPaletteViewInfo.catalogPlannerArticles.push(catPlanArtView);
18799
18809
  }
@@ -18850,7 +18860,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18850
18860
  is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
18851
18861
  groupName: groupTitle,
18852
18862
  metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
18853
- contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
18863
+ contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
18864
+ partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
18854
18865
  };
18855
18866
  //nicht ausmultiplizierte Elemente
18856
18867
  this.plannerPaletteViewInfo.catalogPlannerArticles.push(_catPlanArtView);
@@ -19458,9 +19469,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
19458
19469
  return this.catalogData.notificationsRules;
19459
19470
  }
19460
19471
  }, {
19461
- key: "warningRule",
19472
+ key: "warningRules",
19473
+ get: function get() {
19474
+ return this.catalogData.warningRules;
19475
+ }
19476
+ }, {
19477
+ key: "bannerRules",
19462
19478
  get: function get() {
19463
- return this.catalogData.warningRule;
19479
+ return this.catalogData.bannerRules;
19464
19480
  }
19465
19481
  }, {
19466
19482
  key: "dontSaveAlternativeRenderings",
@@ -22557,6 +22573,7 @@ var DivaArticle = /*#__PURE__*/function () {
22557
22573
  }, {
22558
22574
  key: "updateIDMSpecificFeature",
22559
22575
  value: function updateIDMSpecificFeature(myArtOPS) {
22576
+ if (!this.parentHasSameOption(myArtOPS.optionCodex)) return;
22560
22577
  if (myArtOPS.option.idmVariantenArt == 90) {
22561
22578
  //R (Anschlusstyp R) - AVR
22562
22579
  var newAVRFilter = [],
@@ -23542,7 +23559,7 @@ var DivaArticle = /*#__PURE__*/function () {
23542
23559
  break;
23543
23560
  }
23544
23561
  _context.next = 4;
23545
- return import('./ShelfPlanner-88da02c7.js');
23562
+ return import('./ShelfPlanner-91bba80f.js');
23546
23563
  case 4:
23547
23564
  _yield$import = _context.sent;
23548
23565
  ShelfPlanner = _yield$import["default"];
@@ -23606,7 +23623,6 @@ var DivaArticle = /*#__PURE__*/function () {
23606
23623
  calcUnitPrice = 0,
23607
23624
  calcUnit2Price = 0,
23608
23625
  firstUnit2Param = 0,
23609
- secondUnit2Param = 0,
23610
23626
  idmPriceMeasureFactor = 1;
23611
23627
  //CalcPreise berechnen
23612
23628
  for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
@@ -23640,75 +23656,70 @@ var DivaArticle = /*#__PURE__*/function () {
23640
23656
  if (!tmpOPT.useMaxPriceOfGroup) {
23641
23657
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23642
23658
  }
23643
- if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
23644
- var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
23645
- myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
23646
- } else {
23647
- switch (pUnit) {
23648
- case 'm':
23649
- calcUnitPrice += myArtOPS.calcPrice / 100;
23650
- break;
23651
- case 'cm':
23652
- calcUnitPrice += myArtOPS.calcPrice;
23653
- break;
23654
- case 'm2':
23655
- calcUnit2Price += myArtOPS.calcPrice / 10000;
23656
- break;
23657
- case 'cm2':
23658
- calcUnit2Price += myArtOPS.calcPrice;
23659
- break;
23660
- default:
23661
- if (myArtOPS.isPercentage) {
23662
- //hier myArtOPS.TargetOption auswerten
23663
- if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23664
- myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23665
- }
23659
+ switch (pUnit) {
23660
+ case 'm':
23661
+ calcUnitPrice += myArtOPS.calcPrice / 100;
23662
+ break;
23663
+ case 'cm':
23664
+ calcUnitPrice += myArtOPS.calcPrice;
23665
+ break;
23666
+ case 'm2':
23667
+ calcUnit2Price += myArtOPS.calcPrice / 10000;
23668
+ break;
23669
+ case 'cm2':
23670
+ calcUnit2Price += myArtOPS.calcPrice;
23671
+ break;
23672
+ default:
23673
+ if (myArtOPS.isPercentage) {
23674
+ //hier myArtOPS.TargetOption auswerten
23675
+ if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23676
+ myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23677
+ }
23678
+ } else {
23679
+ myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
23680
+ }
23681
+ break;
23682
+ }
23683
+ if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
23684
+ var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23685
+ if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23686
+ if (calcUnitPrice != 0) {
23687
+ var quantity = 0;
23688
+ if (OP == 'OPTUMFANG') {
23689
+ mUnit = 'cm';
23690
+ quantity = this.calcWidth * 2 + this.calcDepth * 2;
23691
+ } else if (OP == 'OPTUMFANG_KREIS') {
23692
+ mUnit = 'cm';
23693
+ quantity = this.calcWidth * Math.PI;
23666
23694
  } else {
23667
- myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
23695
+ quantity = freeTextMeasure;
23668
23696
  }
23669
- break;
23670
- }
23671
- if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23672
- var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23673
- if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
23674
- if (calcUnitPrice != 0) {
23675
- var quantity = 0;
23676
- if (OP == 'OPTUMFANG') {
23677
- mUnit = 'cm';
23678
- quantity = this.calcWidth * 2 + this.calcDepth * 2;
23679
- } else if (OP == 'OPTUMFANG_KREIS') {
23680
- mUnit = 'cm';
23681
- quantity = this.calcWidth * Math.PI;
23682
- } else {
23683
- quantity = freeTextMeasure;
23684
- }
23685
- if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23686
- } else if (calcUnit2Price != 0) {
23687
- //for diamter option
23688
- if (myArtOPS.option.diameter) {
23689
- myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23697
+ if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23698
+ } else if (calcUnit2Price != 0) {
23699
+ //for diamter option
23700
+ if (myArtOPS.option.diameter) {
23701
+ myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23702
+ } else {
23703
+ if (firstUnit2Param == 0) {
23704
+ firstUnit2Param = freeTextMeasure;
23705
+ if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23690
23706
  } else {
23691
- if (firstUnit2Param == 0) {
23692
- firstUnit2Param = freeTextMeasure;
23693
- if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23694
- } else {
23695
- secondUnit2Param = freeTextMeasure;
23696
- if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23697
- myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23698
- }
23707
+ var secondUnit2Param = freeTextMeasure;
23708
+ if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23709
+ myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23699
23710
  }
23700
23711
  }
23701
23712
  }
23702
23713
  }
23703
- if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23704
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23705
- }
23706
- if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23707
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23708
- }
23709
- if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23710
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23711
- }
23714
+ }
23715
+ if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23716
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23717
+ }
23718
+ if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23719
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23720
+ }
23721
+ if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23722
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23712
23723
  }
23713
23724
  }
23714
23725
  //jetzt nochmal prozentuelle Preise mit TargetOption berechnen
@@ -23807,19 +23818,10 @@ var DivaArticle = /*#__PURE__*/function () {
23807
23818
  this.article.price = articleUsedCalcPrice;
23808
23819
  }
23809
23820
  }, {
23810
- key: "getCalcPerUnit",
23811
- value: function getCalcPerUnit(unit, calcPrice) {
23812
- switch (unit) {
23813
- case 'm':
23814
- return calcPrice / 100;
23815
- case 'cm':
23816
- return calcPrice;
23817
- case 'm2':
23818
- return calcPrice / 10000;
23819
- case 'cm2':
23820
- return calcPrice;
23821
- }
23822
- return 0;
23821
+ key: "parentHasSameOption",
23822
+ value: function parentHasSameOption(opt) {
23823
+ if (!this.partListParentArticle) return true;
23824
+ return !!this.partListParentArticle.articleOptionStates[opt] || this.partlistArticleVisibleInTree;
23823
23825
  }
23824
23826
  }, {
23825
23827
  key: "getOptionPrice",
@@ -24971,72 +24973,89 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24971
24973
  }
24972
24974
  }
24973
24975
  }
24974
- if (!(Object.keys(article.articleOptionStates).length === 0)) {
24975
- //infos eines Basisconfigurats initialisieren
24976
- if (!(Object.keys(variantValues).length === 0)) {
24977
- //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
24978
- for (attr in variantValues) {
24979
- foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
24980
- if (foundItem.opt) {
24981
- if (foundItem.opv instanceof ArticleOptionValueData) {
24982
- freeText = variantValues[attr + '_val'];
24983
- article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
24984
- if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
24985
- //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
24986
- article.checkDefaultGlobalOpt(_defineProperty({}, foundItem.opt.codex, foundItem.opv.codex), true);
24987
- }
24976
+ if (Object.keys(article.articleOptionStates).length === 0) {
24977
+ _context8.next = 19;
24978
+ break;
24979
+ }
24980
+ //infos eines Basisconfigurats initialisieren
24981
+ if (!(Object.keys(variantValues).length === 0)) {
24982
+ //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
24983
+ for (attr in variantValues) {
24984
+ foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
24985
+ if (foundItem.opt) {
24986
+ if (foundItem.opv instanceof ArticleOptionValueData) {
24987
+ freeText = variantValues[attr + '_val'];
24988
+ article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
24989
+ if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
24990
+ //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
24991
+ article.checkDefaultGlobalOpt(_defineProperty({}, foundItem.opt.codex, foundItem.opv.codex), true);
24988
24992
  }
24989
24993
  }
24990
24994
  }
24991
24995
  }
24996
+ }
24992
24997
 
24993
- //defaultValues for FreeText
24994
- if (article.articleOptionStates) {
24995
- for (_key in article.articleOptionStates) {
24996
- myArtOPS = article.articleOptionStates[_key];
24997
- value = undefined;
24998
- optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
24999
- if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25000
- for (i = 0; i < variantItems.length && value == undefined; i++) {
25001
- variantItem = variantItems[i];
25002
- if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25003
- if (variantItem.MeasureValue) {
25004
- //measureValue from new Bakset
25005
- value = variantItem.MeasureValue;
25006
- optionValueCodex = 'OPV' + variantItem.OPV;
25007
- } else {
25008
- //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25009
- possibleValues = variantItem.OPVName.split(': ');
25010
- for (j = 0; j < possibleValues.length && value == undefined; j++) {
25011
- possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25012
- if (!isNaN(Number(possibleValue))) {
25013
- value = possibleValue;
25014
- }
25015
- }
25016
- }
25017
- }
25018
- }
25019
- } else if (variantItems && myArtOPS.isFreeText) {
25020
- for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25021
- _variantItem = variantItems[_i2];
25022
- if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25023
- value = _variantItem.FreeText;
25024
- optionValueCodex = 'OPV' + _variantItem.OPV;
24998
+ //defaultValues for FreeText
24999
+ if (!article.articleOptionStates) {
25000
+ _context8.next = 19;
25001
+ break;
25002
+ }
25003
+ _context8.t0 = _regeneratorRuntime.keys(article.articleOptionStates);
25004
+ case 7:
25005
+ if ((_context8.t1 = _context8.t0()).done) {
25006
+ _context8.next = 19;
25007
+ break;
25008
+ }
25009
+ _key = _context8.t1.value;
25010
+ myArtOPS = article.articleOptionStates[_key];
25011
+ if (!variantValues[_key + '_val']) {
25012
+ _context8.next = 12;
25013
+ break;
25014
+ }
25015
+ return _context8.abrupt("continue", 7);
25016
+ case 12:
25017
+ value = undefined;
25018
+ optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
25019
+ if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25020
+ for (i = 0; i < variantItems.length && value == undefined; i++) {
25021
+ variantItem = variantItems[i];
25022
+ if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25023
+ if (variantItem.MeasureValue) {
25024
+ //measureValue from new Bakset
25025
+ value = variantItem.MeasureValue;
25026
+ optionValueCodex = 'OPV' + variantItem.OPV;
25027
+ } else {
25028
+ //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25029
+ possibleValues = variantItem.OPVName.split(': ');
25030
+ for (j = 0; j < possibleValues.length && value == undefined; j++) {
25031
+ possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25032
+ if (!isNaN(Number(possibleValue))) {
25033
+ value = possibleValue;
25025
25034
  }
25026
25035
  }
25027
25036
  }
25028
- if (value == undefined) {
25029
- val = myArtOPS.option.freetextDefaultValue;
25030
- if (val) {
25031
- value = val;
25032
- myArtOPS.freeText = val;
25033
- }
25034
- }
25035
- if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25037
+ }
25038
+ }
25039
+ } else if (variantItems && myArtOPS.isFreeText) {
25040
+ for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25041
+ _variantItem = variantItems[_i2];
25042
+ if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25043
+ value = _variantItem.FreeText;
25044
+ optionValueCodex = 'OPV' + _variantItem.OPV;
25036
25045
  }
25037
25046
  }
25038
25047
  }
25039
- case 4:
25048
+ if (value == undefined) {
25049
+ val = myArtOPS.option.freetextDefaultValue;
25050
+ if (val) {
25051
+ value = val;
25052
+ myArtOPS.freeText = val;
25053
+ }
25054
+ }
25055
+ if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25056
+ _context8.next = 7;
25057
+ break;
25058
+ case 19:
25040
25059
  case "end":
25041
25060
  return _context8.stop();
25042
25061
  }
@@ -25404,6 +25423,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25404
25423
  }, {
25405
25424
  key: "evalOpvsOnOpvsConstructionRules",
25406
25425
  value: function evalOpvsOnOpvsConstructionRules(article) {
25426
+ var _article$CatalogData$;
25407
25427
  var somethingChanged = false;
25408
25428
  var previousRules = {};
25409
25429
  if (article.updatedOPVbyOPVConstructionRules) {
@@ -25467,19 +25487,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25467
25487
  }
25468
25488
  }
25469
25489
  }
25470
- var notifications = this.checkNotificationRules(article.CatalogData.warningRule, _defineProperty({}, article.basketId, article), {});
25471
- if (notifications !== null && notifications !== void 0 && notifications.length) {
25472
- for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25473
- var _item = notifications[_i3];
25474
- if (!_item.showAsWarning) continue;
25475
- article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25476
- message: _item.message,
25477
- type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25478
- }));
25490
+ if ((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length) {
25491
+ var notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty({}, article.basketId, article), {});
25492
+ if (notifications !== null && notifications !== void 0 && notifications.length) {
25493
+ for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25494
+ var _item = notifications[_i3];
25495
+ if (!_item.showAsWarning) continue;
25496
+ article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25497
+ message: _item.message,
25498
+ type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25499
+ }));
25500
+ }
25501
+ somethingChanged = true;
25479
25502
  }
25480
- somethingChanged = true;
25481
25503
  }
25482
-
25483
25504
  //falls die vorherigen reglen anders sind wie die neuen, artiklekonfiguration neu laden
25484
25505
  if (somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules)) {
25485
25506
  this.updateCfgValues(article, {}, {});
@@ -25495,7 +25516,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25495
25516
  }, {
25496
25517
  key: "checkNotificationRules",
25497
25518
  value: function checkNotificationRules(toCheckRules, articles, visitedOptions, event) {
25498
- if (!(toCheckRules !== null && toCheckRules !== void 0 && toCheckRules.length)) return;
25499
25519
  var returnValue = [];
25500
25520
  for (var i = 0; i < toCheckRules.length; i++) {
25501
25521
  var entry = toCheckRules[i];
@@ -25503,27 +25523,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25503
25523
  var ruleValid = false;
25504
25524
  for (var j = 0; j < rules.length; j++) {
25505
25525
  for (var basketId in articles) {
25506
- var _rule$articles;
25507
25526
  ruleValid = false;
25508
25527
  var rule = rules[j];
25509
25528
  var article = articles[basketId];
25510
- if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) continue;
25511
- if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) continue;
25512
- if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[basketId])) continue;
25513
- if (rule.jsFormula && !article.evalRule(DivaUtils.getRuleByFormula(rule.jsFormula))) continue;
25514
- if (rule.sizes) console.error('size logic not jet implemented');
25529
+ if (!this.checkRule(rule, article, visitedOptions)) continue;
25515
25530
  if ((event === null || event === void 0 ? void 0 : event.type) == 'config' && entry.type == 'notification') {
25516
- var _entry$checkOnEvents, _entry$checkOnEvents2, _entry$checkOnEvents3, _entry$checkOnEvents4;
25517
- 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;
25518
- 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;
25519
- if (checkOPT) {
25520
- if (Array.isArray(checkOPT) && !checkOPT.includes(event.data.optionCodex)) continue;
25521
- if (!Array.isArray(checkOPT) && checkOPT !== event.data.optionCodex) continue;
25522
- }
25523
- if (checkOPV) {
25524
- if (Array.isArray(checkOPV) && !checkOPV.includes(event.data.optionValueCodex)) continue;
25525
- if (!Array.isArray(checkOPV) && checkOPV !== event.data.optionValueCodex) continue;
25526
- }
25531
+ if (!this.checkOnEvent(event.checkOnEvents, event.data)) continue;
25527
25532
  }
25528
25533
  ruleValid = true;
25529
25534
  break;
@@ -25539,6 +25544,35 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25539
25544
  }
25540
25545
  return returnValue;
25541
25546
  }
25547
+ }, {
25548
+ key: "checkRule",
25549
+ value: function checkRule(rule, article, visitedOptions) {
25550
+ var _rule$articles;
25551
+ if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
25552
+ if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
25553
+ if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
25554
+ if (rule.jsFormula && !article.evalRule(DivaUtils.getRuleByFormula(rule.jsFormula))) return false;
25555
+ if (rule.sizes) {
25556
+ console.error('size logic not jet implemented');
25557
+ return false;
25558
+ }
25559
+ return true;
25560
+ }
25561
+ }, {
25562
+ key: "checkOnEvent",
25563
+ value: function checkOnEvent(event, data) {
25564
+ var checkOPT = event !== null && event !== void 0 && event.option ? 'OPT' + (event === null || event === void 0 ? void 0 : event.option) : undefined;
25565
+ var checkOPV = event !== null && event !== void 0 && event.optionValue ? 'OPV' + (event === null || event === void 0 ? void 0 : event.optionValue) : undefined;
25566
+ if (checkOPT) {
25567
+ if (Array.isArray(checkOPT) && !checkOPT.includes(data.optionCodex)) return false;
25568
+ if (!Array.isArray(checkOPT) && checkOPT !== data.optionCodex) return false;
25569
+ }
25570
+ if (checkOPV) {
25571
+ if (Array.isArray(checkOPV) && !checkOPV.includes(data.optionValueCodex)) return false;
25572
+ if (!Array.isArray(checkOPV) && checkOPV !== data.optionValueCodex) return false;
25573
+ }
25574
+ return true;
25575
+ }
25542
25576
  }, {
25543
25577
  key: "objectIncudesObject",
25544
25578
  value: function objectIncudesObject(smallerObject, biggerObject) {
@@ -26859,6 +26893,7 @@ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.lengt
26859
26893
  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; }
26860
26894
  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(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; }
26861
26895
  var LOG$9 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
26896
+ //plz delete me
26862
26897
  var DivaSet = /*#__PURE__*/function () {
26863
26898
  function DivaSet(catalog, _setId, orderSet, initSetState) {
26864
26899
  var _this = this,
@@ -27000,14 +27035,9 @@ var DivaSet = /*#__PURE__*/function () {
27000
27035
  return _ref.apply(this, arguments);
27001
27036
  };
27002
27037
  }());
27003
- _defineProperty(this, "setPosNr", function (elementId, posNr, accNr) {
27038
+ _defineProperty(this, "setPosNr", function (elementId, posNr) {
27004
27039
  var article = _this.getArticleByElementId(elementId);
27005
- if (article) {
27006
- article.posNr = posNr;
27007
- if (accNr != undefined) {
27008
- article.posNr = Number(posNr + '.' + (accNr < 10 ? '0' : '') + accNr.toString());
27009
- }
27010
- }
27040
+ if (article) article.posNr = posNr;
27011
27041
  _this.sortDivaArticlesByArticlePosNr();
27012
27042
  });
27013
27043
  _defineProperty(this, "setElementId", function (basketID, elementId) {
@@ -27258,54 +27288,56 @@ var DivaSet = /*#__PURE__*/function () {
27258
27288
  }, {
27259
27289
  key: "giveAccNewPosNrByBasketId",
27260
27290
  value: function giveAccNewPosNrByBasketId(BasketIdParent) {
27261
- var curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent);
27291
+ var curNum = this.giveAccPosNrByBasketId(BasketIdParent);
27262
27292
  this.givePartlistAccPosNrByBasketId(BasketIdParent, curNum);
27263
27293
  this.sortDivaArticlesByArticlePosNr();
27264
27294
  }
27265
27295
  }, {
27266
- key: "giveNotPlannedAccPosNrByBasketId",
27267
- value: function giveNotPlannedAccPosNrByBasketId(BasketIdParent, BasketId, curNum) {
27296
+ key: "giveAccPosNrByBasketId",
27297
+ value: function giveAccPosNrByBasketId(basketId) {
27298
+ var curNum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
27268
27299
  var allAccs = [];
27269
27300
  var articles = this.getDivaArticles();
27270
- if (!BasketId) BasketId = BasketIdParent;
27271
- var myParentArticle = articles[BasketIdParent];
27272
- var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(BasketId),
27301
+ var article = articles[basketId];
27302
+ if (!article) throw new Error('article ' + basketId + ' does not exist');
27303
+ var myParentArticle = article.getBaseParent();
27304
+ var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(basketId),
27273
27305
  notPlannedAcc = _this$getSplitPlanned.notPlannedAcc,
27274
27306
  plannedAcc = _this$getSplitPlanned.plannedAcc;
27275
- if (curNum === undefined) curNum = this.getStartingPosNr(BasketIdParent);
27276
- for (var key in notPlannedAcc) {
27277
- allAccs.push(notPlannedAcc[key]);
27307
+ for (var key in plannedAcc) {
27308
+ allAccs.push(plannedAcc[key]);
27309
+ }
27310
+ for (var _key3 in notPlannedAcc) {
27311
+ allAccs.push(notPlannedAcc[_key3]);
27278
27312
  }
27279
27313
  for (var i = 0; i < allAccs.length; i++) {
27314
+ var accessoire = allAccs[i];
27280
27315
  curNum++;
27281
- allAccs[i].posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27282
- if (allAccs[i].shelfAccessoires || Object.keys(allAccs[i].accessoires).length !== 0) {
27283
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, allAccs[i].basketId, curNum);
27316
+ accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27317
+ if (accessoire.shelfAccessoires || Object.keys(accessoire.accessoires).length !== 0) {
27318
+ curNum = this.giveAccPosNrByBasketId(accessoire.basketId, curNum);
27319
+ }
27320
+ if (accessoire.hasPartlistArticle) {
27321
+ curNum = this.givePartlistAccPosNrByBasketId(accessoire.basketId, curNum);
27284
27322
  }
27285
- }
27286
- for (var _key3 in plannedAcc) {
27287
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, _key3, curNum);
27288
27323
  }
27289
27324
  return curNum;
27290
27325
  }
27291
27326
  }, {
27292
27327
  key: "givePartlistAccPosNrByBasketId",
27293
- value: function givePartlistAccPosNrByBasketId(BasketIdParent, curNum) {
27294
- var articles = this.getDivaArticles();
27295
- if (!Object.entries(articles).length) return;
27296
- var myParentArticle = articles[BasketIdParent];
27297
- var allAcc = [myParentArticle];
27298
- allAcc = allAcc.concat(this.getAccessoiresOfArticleRecursive(BasketIdParent));
27299
- for (var i = 0; i < allAcc.length; i++) {
27300
- var partlistArticles = this.getPartlistArticlesOfArticle(allAcc[i]);
27301
- if (!(partlistArticles !== null && partlistArticles !== void 0 && partlistArticles.length)) continue;
27302
- for (var j = 0; j < partlistArticles.length; j++) {
27303
- var accessoire = partlistArticles[j];
27304
- if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27305
- curNum++;
27306
- accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27307
- }
27328
+ value: function givePartlistAccPosNrByBasketId(basketId, curNum) {
27329
+ var article = this.getArticleByBasketId(basketId);
27330
+ if (!article) return curNum;
27331
+ var baseParent = article.getBaseParent();
27332
+ var partlistArticles = this.getPartlistArticlesOfArticle(article);
27333
+ 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++) {
27334
+ var _partlistArticles$len;
27335
+ var accessoire = partlistArticles[j];
27336
+ if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27337
+ curNum++;
27338
+ accessoire.posNr = Number(parseFloat((baseParent.posNr + curNum / 100).toString()).toFixed(2));
27308
27339
  }
27340
+ return curNum;
27309
27341
  }
27310
27342
  }, {
27311
27343
  key: "getAccessoiresOfBasketId",
@@ -27337,11 +27369,6 @@ var DivaSet = /*#__PURE__*/function () {
27337
27369
  notPlannedAcc: notPlannedAcc
27338
27370
  };
27339
27371
  }
27340
- }, {
27341
- key: "getStartingPosNr",
27342
- value: function getStartingPosNr(basketid) {
27343
- return this.getAccessoiresOfArticleRecursive(basketid, 'onlyPlanner').length;
27344
- }
27345
27372
  }, {
27346
27373
  key: "getAccessoiresOfBasketIdAsArray",
27347
27374
  value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
@@ -27662,7 +27689,9 @@ var DivaSet = /*#__PURE__*/function () {
27662
27689
  value: function getArticleByBasketId(basketId) {
27663
27690
  if (this.divaArticles[basketId]) return this.divaArticles[basketId];
27664
27691
  for (var key in this.divaArticles) {
27665
- if (this.divaArticles[key].partlistArticles[basketId]) return this.divaArticles[key].partlistArticles[basketId];
27692
+ var article = this.divaArticles[key];
27693
+ var plArticles = article.getRecursivePartlistArticles();
27694
+ if (plArticles[basketId]) return plArticles[basketId];
27666
27695
  }
27667
27696
  return undefined;
27668
27697
  }
@@ -28060,7 +28089,7 @@ var DivaSet = /*#__PURE__*/function () {
28060
28089
  break;
28061
28090
  }
28062
28091
  _context4.next = 3;
28063
- return import('./DoorPlanner-9e3b1dff.js');
28092
+ return import('./DoorPlanner-5a3aa0e3.js');
28064
28093
  case 3:
28065
28094
  _yield$import = _context4.sent;
28066
28095
  DoorPlanner = _yield$import["default"];
@@ -30324,46 +30353,49 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30324
30353
  value: function () {
30325
30354
  var _saveConfigVariantsInBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(set, basket, variant, repairOnly) {
30326
30355
  var _hQRenderScript, _basket$OrderSets$set, _basket$OrderSets$set2;
30327
- var setindex, setImage, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
30356
+ 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;
30328
30357
  return _regeneratorRuntime.wrap(function _callee5$(_context6) {
30329
30358
  while (1) switch (_context6.prev = _context6.next) {
30330
30359
  case 0:
30331
30360
  setindex = -1;
30332
30361
  setImage = undefined;
30362
+ dimensions = {};
30333
30363
  urlToPlanning2D = undefined;
30334
30364
  hQRenderScript = undefined;
30335
30365
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
30336
30366
  if (repairOnly) {
30337
- _context6.next = 14;
30367
+ _context6.next = 17;
30338
30368
  break;
30339
30369
  }
30340
30370
  promises = [setHandlerInstance.getSetImage(set, true), setHandlerInstance.get2DSetImage(set), setHandlerInstance.getHQRenderScript(set, basket.DivaNr)];
30341
- _context6.next = 9;
30371
+ _context6.next = 10;
30342
30372
  return Promise.all(promises);
30343
- case 9:
30373
+ case 10:
30344
30374
  _yield$Promise$all = _context6.sent;
30345
30375
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
30346
- setImage = _yield$Promise$all2[0];
30376
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
30377
+ setImage = _yield$Promise$all2$.url;
30378
+ dimensions = _yield$Promise$all2$.dimensions;
30347
30379
  urlToPlanning2D = _yield$Promise$all2[1];
30348
30380
  hQRenderScript = _yield$Promise$all2[2];
30349
- case 14:
30381
+ case 17:
30350
30382
  i = 0;
30351
- case 15:
30383
+ case 18:
30352
30384
  if (!(i < basket.OrderSets.length)) {
30353
- _context6.next = 22;
30385
+ _context6.next = 25;
30354
30386
  break;
30355
30387
  }
30356
30388
  if (!(set.getSetId() == basket.OrderSets[i].SetID)) {
30357
- _context6.next = 19;
30389
+ _context6.next = 22;
30358
30390
  break;
30359
30391
  }
30360
30392
  setindex = i;
30361
- return _context6.abrupt("break", 22);
30362
- case 19:
30393
+ return _context6.abrupt("break", 25);
30394
+ case 22:
30363
30395
  i++;
30364
- _context6.next = 15;
30396
+ _context6.next = 18;
30365
30397
  break;
30366
- case 22:
30398
+ case 25:
30367
30399
  if (!basket.OrderSets[setindex].ConfigVariants) basket.OrderSets[setindex].ConfigVariants = [];
30368
30400
  optionsSorted = set.CatalogData.getOptionsPosition();
30369
30401
  variantValues = {};
@@ -30374,9 +30406,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30374
30406
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30375
30407
  }
30376
30408
  }
30377
- configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.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.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.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);
30409
+ configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.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.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.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);
30378
30410
  set.basketConfigVariants.push(configVariant);
30379
- case 28:
30411
+ case 31:
30380
30412
  case "end":
30381
30413
  return _context6.stop();
30382
30414
  }
@@ -32778,7 +32810,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32778
32810
  */
32779
32811
  }, {
32780
32812
  key: "update3DPlannerView",
32781
- value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint) {
32813
+ value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint, useLatestViewpoint) {
32782
32814
  var _set$plannerHandler, _set$getAlternateRend2;
32783
32815
  var width = renderSize.imgWidth;
32784
32816
  var height = renderSize.imgHeight;
@@ -32789,7 +32821,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32789
32821
  planner3DGridEnabled: planner3DGridEnabled,
32790
32822
  mediaServiceSaveMode: mediaServiceSaveMode,
32791
32823
  doShow3DDimensionLines: !!doShow3DDimensionLines
32792
- }, viewpoint);
32824
+ }, viewpoint, useLatestViewpoint);
32793
32825
  }
32794
32826
  }, {
32795
32827
  key: "getPlannerPaletteViewInfo",
@@ -33081,33 +33113,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
33081
33113
  key: "variantsEvaluator",
33082
33114
  value: (function () {
33083
33115
  var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
33084
- var _set$WebConfig, _set$CatalogData$getO, _set$ViewConfig, _configItems$;
33085
- var calcVariantsForPricePreview, checkForProductsInStock, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33116
+ var _set$WebConfig, _set$ViewConfig, _configItems$;
33117
+ var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33086
33118
  return _regeneratorRuntime.wrap(function _callee23$(_context25) {
33087
33119
  while (1) switch (_context25.prev = _context25.next) {
33088
33120
  case 0:
33121
+ opt = set.CatalogData.getOption(configItems[0].op);
33122
+ if (opt) {
33123
+ _context25.next = 3;
33124
+ break;
33125
+ }
33126
+ return _context25.abrupt("return", configItems);
33127
+ case 3:
33128
+ checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
33089
33129
  calcVariantsForPricePreview = false;
33090
- 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);
33091
33130
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
33092
33131
  if (previewType) {
33093
- calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
33094
- if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
33095
- calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
33096
- }
33132
+ 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));
33097
33133
  }
33098
33134
  if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
33099
33135
  if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
33100
33136
  calcVariantsForPricePreview = false;
33101
33137
  }
33102
33138
  if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
33103
- _context25.next = 16;
33139
+ _context25.next = 19;
33104
33140
  break;
33105
33141
  }
33106
33142
  targetArticles = set.configTree.getTargetArticles(configStepKey);
33107
33143
  startTime = new Date();
33108
- _context25.next = 11;
33144
+ _context25.next = 14;
33109
33145
  return this.calcVariants(set, configItems, targetArticles);
33110
- case 11:
33146
+ case 14:
33111
33147
  variants = _context25.sent;
33112
33148
  endTime = new Date();
33113
33149
  if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
@@ -33117,9 +33153,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33117
33153
  if (checkForProductsInStock) {
33118
33154
  configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
33119
33155
  }
33120
- case 16:
33156
+ case 19:
33121
33157
  return _context25.abrupt("return", configItems);
33122
- case 17:
33158
+ case 20:
33123
33159
  case "end":
33124
33160
  return _context25.stop();
33125
33161
  }
@@ -33134,21 +33170,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
33134
33170
  key: "calcVariants",
33135
33171
  value: function () {
33136
33172
  var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, targetArticles) {
33137
- var variantInfo, origConfig, i, item, variantValues, doUseConfigs, key;
33173
+ var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
33138
33174
  return _regeneratorRuntime.wrap(function _callee24$(_context26) {
33139
33175
  while (1) switch (_context26.prev = _context26.next) {
33140
33176
  case 0:
33141
33177
  variantInfo = [];
33142
- origConfig = set.getDivaArticles()[targetArticles[0]].VariantValues;
33178
+ articles = set.getDivaArticles();
33179
+ origConfigs = targetArticles.map(function (basketId) {
33180
+ return articles[basketId].VariantValues;
33181
+ });
33143
33182
  i = 0;
33144
- case 3:
33183
+ case 4:
33145
33184
  if (!(i < configItems.length)) {
33146
- _context26.next = 16;
33185
+ _context26.next = 23;
33147
33186
  break;
33148
33187
  }
33149
33188
  item = configItems[i];
33150
33189
  variantValues = {};
33151
33190
  doUseConfigs = false;
33191
+ targetIndex = 0;
33192
+ case 9:
33193
+ if (!(targetIndex < origConfigs.length)) {
33194
+ _context26.next = 19;
33195
+ break;
33196
+ }
33197
+ origConfig = origConfigs[targetIndex];
33152
33198
  for (key in origConfig) {
33153
33199
  if (key == item.op || key == item.idmOpgOptionCodex) {
33154
33200
  doUseConfigs = true;
@@ -33156,24 +33202,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
33156
33202
  }
33157
33203
  variantValues[item.op] = item.codex;
33158
33204
  if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
33159
- _context26.next = 12;
33160
- return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
33161
- case 12:
33205
+ _context26.next = 16;
33206
+ return this.updateArticlesOptionStatesOfActSet(set, variantValues, [targetArticles[targetIndex]], true, 'calcVariant');
33207
+ case 16:
33208
+ targetIndex++;
33209
+ _context26.next = 9;
33210
+ break;
33211
+ case 19:
33162
33212
  variantInfo.push({
33163
33213
  price: set.getSetPrice(),
33164
33214
  variants: set.getGeneralVariantValues(targetArticles),
33165
33215
  opt: item.op
33166
33216
  });
33167
- case 13:
33217
+ case 20:
33168
33218
  i++;
33169
- _context26.next = 3;
33219
+ _context26.next = 4;
33170
33220
  break;
33171
- case 16:
33172
- _context26.next = 18;
33173
- return this.updateArticlesOptionStatesOfActSet(set, origConfig, targetArticles, true);
33174
- case 18:
33221
+ case 23:
33222
+ _targetIndex = 0;
33223
+ case 24:
33224
+ if (!(_targetIndex < origConfigs.length)) {
33225
+ _context26.next = 30;
33226
+ break;
33227
+ }
33228
+ _context26.next = 27;
33229
+ return this.updateArticlesOptionStatesOfActSet(set, origConfigs[_targetIndex], [targetArticles[_targetIndex]], true);
33230
+ case 27:
33231
+ _targetIndex++;
33232
+ _context26.next = 24;
33233
+ break;
33234
+ case 30:
33175
33235
  return _context26.abrupt("return", variantInfo);
33176
- case 19:
33236
+ case 31:
33177
33237
  case "end":
33178
33238
  return _context26.stop();
33179
33239
  }
@@ -33382,12 +33442,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
33382
33442
  _loop3();
33383
33443
  }
33384
33444
  }
33445
+ }, {
33446
+ key: "checkBannerRules",
33447
+ value: function checkBannerRules(set, visitedOptions, event) {
33448
+ var bannerRules = set.CatalogData.bannerRules;
33449
+ if (!bannerRules) return;
33450
+ var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
33451
+ return rules === null || rules === void 0 ? void 0 : rules[0];
33452
+ }
33385
33453
  }, {
33386
33454
  key: "checkNotificationRules",
33387
33455
  value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
33388
33456
  var _set$CatalogData$noti;
33389
33457
  if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
33390
- console.log('checking');
33391
33458
  var allArticles = set.getDivaArticles(true);
33392
33459
  var articles = {};
33393
33460
  for (var i = 0; i < targetArticles.length; i++) {
@@ -33871,7 +33938,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33871
33938
  value: function () {
33872
33939
  var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
33873
33940
  var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
33874
- 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;
33941
+ 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;
33875
33942
  return _regeneratorRuntime.wrap(function _callee29$(_context31) {
33876
33943
  while (1) switch (_context31.prev = _context31.next) {
33877
33944
  case 0:
@@ -33883,8 +33950,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33883
33950
  urlToPlanning2D = undefined;
33884
33951
  alternateSetImages = undefined;
33885
33952
  hqRenderScript = undefined;
33953
+ dimensions = {};
33886
33954
  if (dontGenerateImages) {
33887
- _context31.next = 25;
33955
+ _context31.next = 28;
33888
33956
  break;
33889
33957
  }
33890
33958
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33892,22 +33960,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
33892
33960
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33893
33961
  promise3DAlternate = this.getAlternateSetImages(set);
33894
33962
  }
33895
- _context31.next = 14;
33963
+ _context31.next = 15;
33896
33964
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33897
- case 14:
33965
+ case 15:
33898
33966
  _yield$Promise$all = _context31.sent;
33899
33967
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
33900
- setImage = _yield$Promise$all2[0];
33968
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
33969
+ setImage = _yield$Promise$all2$.url;
33970
+ dimensions = _yield$Promise$all2$.dimensions;
33901
33971
  urlToPlanning2D = _yield$Promise$all2[1];
33902
33972
  alternateSetImages = _yield$Promise$all2[2];
33903
33973
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33904
- _context31.next = 22;
33974
+ _context31.next = 25;
33905
33975
  return Promise.all([promiseHQRenderScript]);
33906
- case 22:
33976
+ case 25:
33907
33977
  _yield$Promise$all3 = _context31.sent;
33908
33978
  _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
33909
33979
  hqRenderScript = _yield$Promise$all4[0];
33910
- case 25:
33980
+ case 28:
33911
33981
  LOG$8.startTransaction({
33912
33982
  event: 'FillBakset',
33913
33983
  eventId: 'FILL_BASKET',
@@ -33939,7 +34009,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33939
34009
  OfflineData: catalogData.offlineData,
33940
34010
  SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
33941
34011
  SetArticleNrPrefix: set.SetArticleNrPrefix,
33942
- BBox: this.getBBoxObject(set),
34012
+ BBox: this.getBBoxObject(set, dimensions),
33943
34013
  SetVariantBasketDatas: set.getVariantBasketData(),
33944
34014
  SetImage: setImage,
33945
34015
  //Add url string of current rendering.
@@ -33973,7 +34043,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33973
34043
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33974
34044
  });
33975
34045
  return _context31.abrupt("return", orderSet);
33976
- case 32:
34046
+ case 35:
33977
34047
  case "end":
33978
34048
  return _context31.stop();
33979
34049
  }
@@ -33993,14 +34063,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
33993
34063
  key: "getSetImage",
33994
34064
  value: (function () {
33995
34065
  var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, overwriteLastSavedRendering) {
33996
- var setImage, is3D;
34066
+ var is3D, _yield$set$plannerHan, dimensions, url;
33997
34067
  return _regeneratorRuntime.wrap(function _callee30$(_context32) {
33998
34068
  while (1) switch (_context32.prev = _context32.next) {
33999
34069
  case 0:
34000
- setImage = undefined;
34001
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34070
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34002
34071
  if (!is3D) {
34003
- _context32.next = 10;
34072
+ _context32.next = 12;
34004
34073
  break;
34005
34074
  }
34006
34075
  LOG$8.startTransaction({
@@ -34008,17 +34077,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
34008
34077
  message: 'render 3D Image',
34009
34078
  eventId: 'RENDER_3D_IMAGE'
34010
34079
  });
34011
- _context32.next = 6;
34080
+ _context32.next = 5;
34012
34081
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
34013
- case 6:
34014
- _context32.next = 8;
34082
+ case 5:
34083
+ _context32.next = 7;
34015
34084
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34016
- case 8:
34017
- setImage = _context32.sent;
34085
+ case 7:
34086
+ _yield$set$plannerHan = _context32.sent;
34087
+ dimensions = _yield$set$plannerHan.dimensions;
34088
+ url = _yield$set$plannerHan.url;
34018
34089
  LOG$8.successTransaction('RENDER_3D_IMAGE');
34019
- case 10:
34020
- return _context32.abrupt("return", setImage);
34021
- case 11:
34090
+ return _context32.abrupt("return", {
34091
+ dimensions: dimensions,
34092
+ url: url
34093
+ });
34094
+ case 12:
34095
+ return _context32.abrupt("return", {
34096
+ dimensions: {
34097
+ w: undefined,
34098
+ h: undefined,
34099
+ d: undefined
34100
+ }
34101
+ });
34102
+ case 13:
34022
34103
  case "end":
34023
34104
  return _context32.stop();
34024
34105
  }
@@ -34038,7 +34119,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34038
34119
  while (1) switch (_context33.prev = _context33.next) {
34039
34120
  case 0:
34040
34121
  //if not 3d
34041
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34122
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34042
34123
  if (is3D) {
34043
34124
  _context33.next = 3;
34044
34125
  break;
@@ -34094,7 +34175,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34094
34175
  message: 'render 3D alternative Image',
34095
34176
  eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
34096
34177
  });
34097
- is2D = !['3DImage', 'BoxPlanner'].includes(set.getPlannerMode());
34178
+ is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
34098
34179
  if (!(is2D || set.onlyRunLogic)) {
34099
34180
  _context34.next = 4;
34100
34181
  break;
@@ -34161,14 +34242,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
34161
34242
  }()
34162
34243
  }, {
34163
34244
  key: "getBBoxObject",
34164
- value: function getBBoxObject(set) {
34245
+ value: function getBBoxObject(set, dimensions) {
34246
+ 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;
34165
34247
  var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
34166
- return {
34167
- X: bbox.width,
34168
- Y: bbox.depth,
34169
- Z: bbox.height,
34170
- Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34248
+ var dim = {
34249
+ X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
34250
+ Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
34251
+ Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
34171
34252
  };
34253
+ return _objectSpread$8(_objectSpread$8({}, dim), {}, {
34254
+ 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' : '')
34255
+ });
34172
34256
  }
34173
34257
  }, {
34174
34258
  key: "loadProductsOfSets",
@@ -34895,7 +34979,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34895
34979
  case 9:
34896
34980
  _context7.prev = 9;
34897
34981
  _context7.t0 = _context7["catch"](0);
34898
- LOG$7.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34982
+ LOG$7.error(new DivaError('ProductId cannot be found in Database', {
34899
34983
  code: 'WC_0004',
34900
34984
  custom: {
34901
34985
  divaNr: divaNr
@@ -34921,30 +35005,44 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34921
35005
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
34922
35006
  while (1) switch (_context8.prev = _context8.next) {
34923
35007
  case 0:
34924
- _context8.next = 2;
35008
+ _context8.prev = 0;
35009
+ _context8.next = 3;
34925
35010
  return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34926
35011
  fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
34927
35012
  });
34928
- case 2:
35013
+ case 3:
34929
35014
  variantData = _context8.sent;
34930
35015
  if (!(variantData.Error || !variantData.basket)) {
34931
- _context8.next = 8;
35016
+ _context8.next = 9;
34932
35017
  break;
34933
35018
  }
34934
- LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35019
+ LOG$7.error(new DivaError('ProductId cannot be found in Database', {
34935
35020
  code: 'WC_0005',
34936
35021
  custom: {
34937
35022
  productId: productId
34938
35023
  }
34939
35024
  }));
34940
35025
  return _context8.abrupt("return", false);
34941
- case 8:
34942
- return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
34943
35026
  case 9:
35027
+ return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
35028
+ case 10:
35029
+ _context8.next = 16;
35030
+ break;
35031
+ case 12:
35032
+ _context8.prev = 12;
35033
+ _context8.t0 = _context8["catch"](0);
35034
+ LOG$7.error(new DivaError('Error while fetching product data', {
35035
+ code: 'WC_0005',
35036
+ custom: {
35037
+ productId: productId
35038
+ }
35039
+ }));
35040
+ return _context8.abrupt("return", false);
35041
+ case 16:
34944
35042
  case "end":
34945
35043
  return _context8.stop();
34946
35044
  }
34947
- }, _callee8, this);
35045
+ }, _callee8, this, [[0, 12]]);
34948
35046
  }));
34949
35047
  function loadBasketByCustomProductId(_x17, _x18, _x19, _x20) {
34950
35048
  return _loadBasketByCustomProductId.apply(this, arguments);
@@ -35277,7 +35375,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35277
35375
  break;
35278
35376
  case 3:
35279
35377
  _context13.next = 5;
35280
- return import('./PfisterWWSHandler-fea10934.js');
35378
+ return import('./PfisterWWSHandler-65456493.js');
35281
35379
  case 5:
35282
35380
  _yield$import = _context13.sent;
35283
35381
  PfisterWWSHandler = _yield$import["default"];
@@ -35285,7 +35383,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35285
35383
  return _context13.abrupt("break", 33);
35286
35384
  case 9:
35287
35385
  _context13.next = 11;
35288
- return import('./LiviqueWWSHandler-5bbc4f4c.js');
35386
+ return import('./LiviqueWWSHandler-45311234.js');
35289
35387
  case 11:
35290
35388
  _yield$import2 = _context13.sent;
35291
35389
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35293,7 +35391,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35293
35391
  return _context13.abrupt("break", 33);
35294
35392
  case 15:
35295
35393
  _context13.next = 17;
35296
- return import('./SeriousBasketHandler-41c875f2.js');
35394
+ return import('./SeriousBasketHandler-03666454.js');
35297
35395
  case 17:
35298
35396
  _yield$import3 = _context13.sent;
35299
35397
  SeriousWWSHandler = _yield$import3["default"];
@@ -35301,7 +35399,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35301
35399
  return _context13.abrupt("break", 33);
35302
35400
  case 21:
35303
35401
  _context13.next = 23;
35304
- return import('./ProductBasketHandler-ce45363b.js');
35402
+ return import('./ProductBasketHandler-2b076219.js');
35305
35403
  case 23:
35306
35404
  _yield$import4 = _context13.sent;
35307
35405
  ProductWWSHandler = _yield$import4["default"];
@@ -35309,7 +35407,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35309
35407
  return _context13.abrupt("break", 33);
35310
35408
  case 27:
35311
35409
  _context13.next = 29;
35312
- return import('./StandardWWSHandler-26c6ecb8.js');
35410
+ return import('./StandardWWSHandler-0d1aa5e9.js');
35313
35411
  case 29:
35314
35412
  _yield$import5 = _context13.sent;
35315
35413
  StandardWWSHandler = _yield$import5["default"];
@@ -36694,7 +36792,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36694
36792
  while (1) switch (_context3.prev = _context3.next) {
36695
36793
  case 0:
36696
36794
  _context3.next = 2;
36697
- return import('./Host3DSignalR-514ab7ea.js');
36795
+ return import('./Host3DSignalR-a9efc712.js');
36698
36796
  case 2:
36699
36797
  _yield$import = _context3.sent;
36700
36798
  Host3DSignalR = _yield$import["default"];
@@ -37139,13 +37237,15 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37139
37237
  * @param catalogCodex The CatalogCodex in the planning
37140
37238
  * @param catalogGUID The CatalogGUID in the planning
37141
37239
  * @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
37240
+ * @param camera The RTV Camera Information for Unity/RTV KOMBI
37241
+ * @param useLatestCamera should the latest camera be used ? default yes when requesting the start viewpoint via the configurator button not
37142
37242
  */
37143
37243
  }, {
37144
37244
  key: "request3D",
37145
37245
  value: (function () {
37146
37246
  var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
37147
37247
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37148
- var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, _params$camera2, _params$camera3, returnRequest;
37248
+ var room, newRenderSize, doReloadWholePlanning, camera, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, returnRequest;
37149
37249
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
37150
37250
  while (1) switch (_context7.prev = _context7.next) {
37151
37251
  case 0:
@@ -37171,7 +37271,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37171
37271
  //Check if viewPoint is changed based on alternateRendering
37172
37272
  //Do check if viewpoint has to be changed
37173
37273
  if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
37174
- planningHash = md5(JSON.stringify(params.planningData));
37274
+ camera = params.camera ? params.camera : params.useLatestCamera ? this.latestCamera : undefined;
37275
+ planningHash = md5(JSON.stringify(params.planningData) + JSON.stringify(camera));
37175
37276
  if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
37176
37277
  if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
37177
37278
  this.lastFramePlanningHash = planningHash;
@@ -37179,7 +37280,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37179
37280
  requestHqRenderScriptFrom3DHost = false;
37180
37281
  if (params.doRequestHqRenderScript) {
37181
37282
  rendering = this.hqRenderScriptCache.get(planningHash);
37182
- if (rendering) {
37283
+ if (rendering && !params.useLatestCamera) {
37183
37284
  LOG$4.debug('Get HQRenderScript from cache');
37184
37285
  this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37185
37286
  this.updatePlannerHqRenderScriptInView(rendering);
@@ -37200,7 +37301,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37200
37301
  if (params.doRequestRendering) {
37201
37302
  viewPointName = this.viewPointHandler.getCurViewPointToRender();
37202
37303
  sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37203
- renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37304
+ renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(camera));
37204
37305
  this.lastRequestedRenderHash = renderHash;
37205
37306
  LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37206
37307
  if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
@@ -37233,7 +37334,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37233
37334
  }
37234
37335
  }
37235
37336
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37236
- _context7.next = 31;
37337
+ _context7.next = 32;
37237
37338
  break;
37238
37339
  }
37239
37340
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37260,20 +37361,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37260
37361
  viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
37261
37362
  alternateRenderingsExist: params.alternateRenderingsExist,
37262
37363
  alternateRenderInfo: params.alternateRenderInfo,
37263
- camera: (_params$camera2 = params.camera) !== null && _params$camera2 !== void 0 ? _params$camera2 : this.latestCamera,
37264
- forceUseCam: !!((_params$camera3 = params.camera) !== null && _params$camera3 !== void 0 ? _params$camera3 : this.latestCamera)
37364
+ camera: camera,
37365
+ forceUseCam: !!camera
37265
37366
  } : undefined
37266
37367
  });
37267
37368
  if (params.camera) this.latestCamera = params.camera;
37268
37369
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37269
- _context7.next = 29;
37370
+ _context7.next = 30;
37270
37371
  break;
37271
37372
  }
37272
37373
  LOG$4.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37273
37374
  code: 'WC_0013'
37274
37375
  }));
37275
37376
  return _context7.abrupt("return");
37276
- case 29:
37377
+ case 30:
37277
37378
  if (requestHqRenderScriptFrom3DHost) {
37278
37379
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37279
37380
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37285,12 +37386,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37285
37386
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37286
37387
  }
37287
37388
  }
37288
- case 31:
37389
+ case 32:
37289
37390
  return _context7.abrupt("return", {
37290
37391
  planningHash: planningHash,
37291
37392
  renderHash: renderHash
37292
37393
  });
37293
- case 32:
37394
+ case 33:
37294
37395
  case "end":
37295
37396
  return _context7.stop();
37296
37397
  }
@@ -38243,7 +38344,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38243
38344
  break;
38244
38345
  case 8:
38245
38346
  _context4.next = 10;
38246
- return import('./DivaStandardPlanner-660cec0e.js');
38347
+ return import('./DivaStandardPlanner-23117cf0.js');
38247
38348
  case 10:
38248
38349
  _yield$import = _context4.sent;
38249
38350
  DivaStandardPlanner = _yield$import["default"];
@@ -38254,7 +38355,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38254
38355
  return _context4.abrupt("break", 21);
38255
38356
  case 15:
38256
38357
  _context4.next = 17;
38257
- return import('./DivaBoxPlanner-a95c530a.js');
38358
+ return import('./DivaBoxPlanner-9854695f.js');
38258
38359
  case 17:
38259
38360
  _yield$import2 = _context4.sent;
38260
38361
  DivaBoxPlanner = _yield$import2["default"];
@@ -38388,6 +38489,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38388
38489
  key: "getSetImageAsUrl",
38389
38490
  value: (function () {
38390
38491
  var _getSetImageAsUrl = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(setId) {
38492
+ var _rendering$get3DDimIn, _rendering$get3DDimIn2, _rendering$get3DDimIn3;
38391
38493
  var rendering;
38392
38494
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
38393
38495
  while (1) switch (_context6.prev = _context6.next) {
@@ -38397,7 +38499,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38397
38499
  case 2:
38398
38500
  rendering = _context6.sent;
38399
38501
  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));
38400
- return _context6.abrupt("return", rendering != undefined ? rendering.UrlToSavedRendering : '');
38502
+ return _context6.abrupt("return", {
38503
+ url: rendering === null || rendering === void 0 ? void 0 : rendering.UrlToSavedRendering,
38504
+ dimensions: {
38505
+ w: ((_rendering$get3DDimIn = rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w) !== null && _rendering$get3DDimIn !== void 0 ? _rendering$get3DDimIn : 0) > 0 ? rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w : undefined,
38506
+ h: ((_rendering$get3DDimIn2 = rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h) !== null && _rendering$get3DDimIn2 !== void 0 ? _rendering$get3DDimIn2 : 0) > 0 ? rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h : undefined,
38507
+ d: ((_rendering$get3DDimIn3 = rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d) !== null && _rendering$get3DDimIn3 !== void 0 ? _rendering$get3DDimIn3 : 0) > 0 ? rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d : undefined
38508
+ }
38509
+ });
38401
38510
  case 5:
38402
38511
  case "end":
38403
38512
  return _context6.stop();
@@ -38513,7 +38622,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38513
38622
  key: "saveSetHQRenderScript",
38514
38623
  value: function () {
38515
38624
  var _saveSetHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
38516
- var hashes, planningHash, checkingTimes, i;
38625
+ var hashes, planningHash, checkingTimes, i, sumWaitingMS;
38517
38626
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
38518
38627
  while (1) switch (_context9.prev = _context9.next) {
38519
38628
  case 0:
@@ -38529,25 +38638,27 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38529
38638
  return _context9.abrupt("return");
38530
38639
  case 6:
38531
38640
  planningHash = hashes.planningHash;
38532
- checkingTimes = 50;
38641
+ checkingTimes = 200;
38533
38642
  i = 0;
38534
- case 9:
38643
+ sumWaitingMS = 0;
38644
+ case 10:
38535
38645
  if (!(this.handler3D.getWaitForHqRenderScript(planningHash) && checkingTimes > i)) {
38536
- _context9.next = 15;
38646
+ _context9.next = 17;
38537
38647
  break;
38538
38648
  }
38539
- _context9.next = 12;
38649
+ sumWaitingMS += 50;
38650
+ _context9.next = 14;
38540
38651
  return DivaUtils.Sleep(50);
38541
- case 12:
38652
+ case 14:
38542
38653
  i++;
38543
- _context9.next = 9;
38654
+ _context9.next = 10;
38544
38655
  break;
38545
- case 15:
38546
- LOG$2.debug('saving performance: HQ Renderscript recieved after ' + i * checkingTimes + ' ms');
38656
+ case 17:
38657
+ LOG$2.debug('saving performance: HQ Renderscript recieved after ' + sumWaitingMS + ' ms');
38547
38658
  if (this.handler3D.checkIsWaitingForHQRenderScript() && checkingTimes == i) {
38548
38659
  LOG$2.error(new DivaError('could not saveSetHQRenderScript'));
38549
38660
  }
38550
- case 17:
38661
+ case 19:
38551
38662
  case "end":
38552
38663
  return _context9.stop();
38553
38664
  }
@@ -38980,7 +39091,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38980
39091
  planner3DGridEnabled: false,
38981
39092
  mediaServiceSaveMode: 'STREAM',
38982
39093
  doShow3DDimensionLines: !!doShow3DDimensionLines
38983
- });
39094
+ }, undefined, true);
38984
39095
  } else {
38985
39096
  this.handler3D.handle3DVisualizationChanged(mode, params);
38986
39097
  }
@@ -39013,7 +39124,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39013
39124
  }, {
39014
39125
  key: "request3D",
39015
39126
  value: function () {
39016
- var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint) {
39127
+ var _request3D = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint, useLatestCamera) {
39017
39128
  var _this3 = this;
39018
39129
  var plannerData, loadedCatData, plannerExists, savedSetId;
39019
39130
  return _regeneratorRuntime.wrap(function _callee16$(_context16) {
@@ -39084,7 +39195,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39084
39195
  forceReloadPlanning: forceReloadPlanning,
39085
39196
  alternateRenderInfo: alternateRenderInfo,
39086
39197
  alternateRenderingsExist: alternateRenderingsExist,
39087
- camera: viewpoint
39198
+ camera: viewpoint,
39199
+ useLatestCamera: useLatestCamera
39088
39200
  });
39089
39201
  case 18:
39090
39202
  return _context16.abrupt("return", _context16.sent);
@@ -39096,7 +39208,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39096
39208
  }
39097
39209
  }, _callee16, this);
39098
39210
  }));
39099
- function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39) {
39211
+ function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
39100
39212
  return _request3D.apply(this, arguments);
39101
39213
  }
39102
39214
  return request3D;
@@ -39775,19 +39887,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39775
39887
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
39776
39888
  _defineProperty(this, "doConfigure", /*#__PURE__*/function () {
39777
39889
  var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
39890
+ var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
39778
39891
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
39779
39892
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
39780
39893
  while (1) switch (_context11.prev = _context11.next) {
39781
39894
  case 0:
39782
39895
  set = _this.actSet();
39783
- _context11.next = 3;
39896
+ (_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);
39897
+ _context11.next = 4;
39784
39898
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
39785
- case 3:
39899
+ case 4:
39786
39900
  returnValues = _context11.sent;
39901
+ (_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);
39787
39902
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
39788
39903
  _this.checkVariantData();
39789
39904
  if (dontUpdatePlannerView) {
39790
- _context11.next = 16;
39905
+ _context11.next = 18;
39791
39906
  break;
39792
39907
  }
39793
39908
  _this.updateConfiguratorStructure(structure);
@@ -39801,16 +39916,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39801
39916
  _this.updateViewButtonsDependigOnConfigStructure();
39802
39917
  _this.updatePlannerView('DO_CONFIGURE', myValues);
39803
39918
  _this.updateWebConfiguratorTitle();
39804
- _context11.next = 16;
39919
+ _context11.next = 18;
39805
39920
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
39806
- case 16:
39921
+ case 18:
39807
39922
  if (dontCallEvents) {
39808
- _context11.next = 19;
39923
+ _context11.next = 21;
39809
39924
  break;
39810
39925
  }
39811
- _context11.next = 19;
39926
+ _context11.next = 21;
39812
39927
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
39813
- case 19:
39928
+ case 21:
39814
39929
  case "end":
39815
39930
  return _context11.stop();
39816
39931
  }
@@ -39874,6 +39989,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39874
39989
  return _ref12.apply(this, arguments);
39875
39990
  };
39876
39991
  }());
39992
+ _defineProperty(this, "getPosNr", function (basketId) {
39993
+ var _set$getArticleByBask;
39994
+ var set = _this.actSet();
39995
+ if (!set) throw new Error('set undefined');
39996
+ return (_set$getArticleByBask = set.getArticleByBasketId(basketId)) === null || _set$getArticleByBask === void 0 ? void 0 : _set$getArticleByBask.posNr;
39997
+ });
39877
39998
  _defineProperty(this, "getReturnTo", function (event) {
39878
39999
  var returnTo = _this.ReturnTo;
39879
40000
  if (returnTo == undefined) {
@@ -39904,7 +40025,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39904
40025
  key: "initialize",
39905
40026
  value: function () {
39906
40027
  var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
39907
- var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions14, _set$getDivaArticles, _set$getSetPrice, _this$actions13, _this$actions13$toggl, initSetState, set, products, result, _this$actions15, basket, catalogData;
40028
+ 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;
39908
40029
  return _regeneratorRuntime.wrap(function _callee13$(_context13) {
39909
40030
  while (1) switch (_context13.prev = _context13.next) {
39910
40031
  case 0:
@@ -39948,7 +40069,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39948
40069
  return this.initView();
39949
40070
  case 20:
39950
40071
  this.subscribeToWebPlannerEvents();
39951
- (_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, 'Planner_Loading', false, false);
40072
+ (_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);
39952
40073
  return _context13.abrupt("return", true);
39953
40074
  case 23:
39954
40075
  //TODO: get prices of matching product with more than one element
@@ -39998,11 +40119,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39998
40119
  _context13.next = 44;
39999
40120
  return this.initView();
40000
40121
  case 44:
40001
- (_this$actions14 = this.actions) === null || _this$actions14 === void 0 || _this$actions14.onEvent({
40122
+ (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
40002
40123
  type: 'onConfiguratorReady'
40003
40124
  });
40004
40125
  if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
40005
- (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.onEvent({
40126
+ (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
40006
40127
  type: 'onArticleInitialized'
40007
40128
  });
40008
40129
  }
@@ -40097,11 +40218,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40097
40218
  }, {
40098
40219
  key: "onInitializationError",
40099
40220
  value: function onInitializationError() {
40100
- var _this$state2, _this$actions17, _this$actions17$toggl;
40221
+ var _this$state2, _this$actions19, _this$actions19$toggl;
40101
40222
  var onErrorHandling = this.api.onErrorHandling();
40102
40223
  if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
40103
- var _this$actions16;
40104
- (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.closeComponentInFullscreen();
40224
+ var _this$actions18;
40225
+ (_this$actions18 = this.actions) === null || _this$actions18 === void 0 || _this$actions18.closeComponentInFullscreen();
40105
40226
  return;
40106
40227
  }
40107
40228
  if (onErrorHandling) {
@@ -40142,7 +40263,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40142
40263
  });
40143
40264
  }
40144
40265
  }
40145
- (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || (_this$actions17$toggl = _this$actions17.toggleLoading) === null || _this$actions17$toggl === void 0 || _this$actions17$toggl.call(_this$actions17, 'Planner_Loading', false, false);
40266
+ (_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);
40146
40267
  }
40147
40268
  }, {
40148
40269
  key: "getDivaArticles",
@@ -40475,7 +40596,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40475
40596
  }, {
40476
40597
  key: "updatePlannerView",
40477
40598
  value: function updatePlannerView(callingFrom, onDoConfigureValues, viewpoint) {
40478
- var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3;
40599
+ var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
40479
40600
  var set = this.actSet();
40480
40601
  if (!set) return;
40481
40602
  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];
@@ -40510,24 +40631,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40510
40631
  //delete me if you see this
40511
40632
  LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
40512
40633
  switch (this.getCurPlannerViewMode()) {
40634
+ case '3DCOMB':
40635
+ 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');
40636
+ break;
40513
40637
  case 'RTViewer':
40514
40638
  //Request HQRenderscript + rendering
40515
40639
  //Request new Rendering
40516
- 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);
40640
+ 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);
40517
40641
  break;
40518
40642
  case '3DImage':
40519
40643
  //Request new Rendering
40520
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo);
40644
+ 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);
40521
40645
  break;
40522
40646
  case '2DGrid':
40523
40647
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
40524
40648
  if (boundingBox) {
40525
40649
  this.updatePlanner2DGrid(boundingBox);
40526
40650
  }
40527
- if (['3DImage'].includes(this.getInitPlannerViewMode())) {
40528
- var _this$getDoShow3DDime4;
40651
+ if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
40652
+ var _this$getDoShow3DDime5;
40529
40653
  //update 3D image always even if you are in the 2DGrid mode
40530
- 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);
40654
+ 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);
40531
40655
  }
40532
40656
  break;
40533
40657
  }
@@ -40545,18 +40669,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40545
40669
  value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
40546
40670
  var set = this.actSet();
40547
40671
  this.update2DGrid(set);
40548
- if (['3DImage', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40549
- var _this$getDoShow3DDime6;
40672
+ if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40673
+ var _this$getDoShow3DDime7;
40550
40674
  if (doLoadAllAlternateRenderings) {
40551
40675
  var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
40552
40676
  for (var i = 0; i < alternateRenderings.length; i++) {
40553
40677
  if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
40554
- var _this$getDoShow3DDime5;
40555
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), false, renderSavingMode, (_this$getDoShow3DDime5 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime5 === void 0 ? void 0 : _this$getDoShow3DDime5.call(this), alternateRenderings[i]);
40678
+ var _this$getDoShow3DDime6;
40679
+ 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]);
40556
40680
  }
40557
40681
  }
40558
40682
  }
40559
- 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));
40683
+ 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));
40560
40684
  }
40561
40685
  }
40562
40686
  }, {
@@ -40853,8 +40977,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40853
40977
  }, {
40854
40978
  key: "changeOnFavorites",
40855
40979
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
40856
- var _this$actions18;
40857
- favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions18 = this.actions) === null || _this$actions18 === void 0 ? void 0 : _this$actions18.openModal);
40980
+ var _this$actions20;
40981
+ favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions20 = this.actions) === null || _this$actions20 === void 0 ? void 0 : _this$actions20.openModal);
40858
40982
  }
40859
40983
  }, {
40860
40984
  key: "setDifferentOptions",
@@ -40901,25 +41025,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40901
41025
  }, {
40902
41026
  key: "callEvent",
40903
41027
  value: function callEvent(event, param) {
40904
- var _this$actions19, _this$actions20, _this$actions21, _this$actions22;
41028
+ var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
40905
41029
  switch (event) {
40906
41030
  case 'onFullscreenClose':
40907
- (_this$actions19 = this.actions) === null || _this$actions19 === void 0 || _this$actions19.onEvent({
41031
+ (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
40908
41032
  type: 'onFullscreenClose'
40909
41033
  });
40910
41034
  break;
40911
41035
  case 'onWebPlanerClose':
40912
- (_this$actions20 = this.actions) === null || _this$actions20 === void 0 || _this$actions20.onEvent({
41036
+ (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
40913
41037
  type: 'onWebPlanerClose'
40914
41038
  });
40915
41039
  break;
40916
41040
  case 'onWebPlanerHelp':
40917
- (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
41041
+ (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
40918
41042
  type: 'onWebPlanerHelp'
40919
41043
  });
40920
41044
  break;
40921
41045
  case 'onWebPlanerZoomClick':
40922
- (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
41046
+ (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
40923
41047
  type: 'onWebPlanerZoomClick',
40924
41048
  data: param
40925
41049
  });
@@ -40930,14 +41054,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40930
41054
  key: "saveToBasketWrapper",
40931
41055
  value: function () {
40932
41056
  var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
40933
- var _this$actions23,
40934
- _this$actions23$toggl,
40935
- _this$actions24,
40936
- _this$actions24$toggl,
41057
+ var _this$actions25,
41058
+ _this$actions25$toggl,
41059
+ _this$actions26,
41060
+ _this$actions26$toggl,
40937
41061
  _this2 = this,
40938
- _this$actions28,
41062
+ _this$actions30,
40939
41063
  _this$i18n14;
40940
- var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$actions25, _this$i18n8, _this$i18n9, _this$actions26, _this$i18n10, _this$i18n11, _this$actions27, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions29, _this$i18n15;
41064
+ 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;
40941
41065
  return _regeneratorRuntime.wrap(function _callee26$(_context26) {
40942
41066
  while (1) switch (_context26.prev = _context26.next) {
40943
41067
  case 0:
@@ -40971,18 +41095,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40971
41095
  case 15:
40972
41096
  returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40973
41097
  case 16:
40974
- (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || (_this$actions23$toggl = _this$actions23.toggleLoading) === null || _this$actions23$toggl === void 0 || _this$actions23$toggl.call(_this$actions23, 'Planner_Saving', false, true);
41098
+ (_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);
40975
41099
  _context26.next = 19;
40976
41100
  return this.saveToBasket(finalEvent, repairOnly, force);
40977
41101
  case 19:
40978
41102
  result = _context26.sent;
40979
- (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || (_this$actions24$toggl = _this$actions24.toggleLoading) === null || _this$actions24$toggl === void 0 || _this$actions24$toggl.call(_this$actions24, 'Planner_Saving', false, false);
41103
+ (_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);
40980
41104
  if (!(result === 'canceled')) {
40981
41105
  _context26.next = 25;
40982
41106
  break;
40983
41107
  }
40984
41108
  LOG$1.error(new DivaError('failed to save Basket'));
40985
- (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.openModal({
41109
+ (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
40986
41110
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
40987
41111
  accept: true
40988
41112
  });
@@ -40996,12 +41120,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40996
41120
  LOG$1.error(new DivaError('PDF url is missing in basket', {
40997
41121
  code: 'WC_0010'
40998
41122
  }));
40999
- (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.openModal({
41123
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41000
41124
  text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
41001
41125
  accept: true
41002
41126
  });
41003
41127
  } else {
41004
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
41128
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41005
41129
  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'),
41006
41130
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
41007
41131
  callback: function callback() {
@@ -41011,7 +41135,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41011
41135
  }
41012
41136
  return _context26.abrupt("break", 31);
41013
41137
  case 30:
41014
- (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41138
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
41015
41139
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
41016
41140
  accept: true
41017
41141
  });
@@ -41027,7 +41151,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41027
41151
  _context26.next = 37;
41028
41152
  break;
41029
41153
  }
41030
- (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41154
+ (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
41031
41155
  accept: true,
41032
41156
  text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
41033
41157
  title: 'modals.error_saving'
@@ -41050,7 +41174,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41050
41174
  key: "saveToBasket",
41051
41175
  value: function () {
41052
41176
  var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
41053
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions30, _this$actions31;
41177
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
41054
41178
  var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
41055
41179
  return _regeneratorRuntime.wrap(function _callee27$(_context27) {
41056
41180
  while (1) switch (_context27.prev = _context27.next) {
@@ -41137,7 +41261,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41137
41261
  _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;
41138
41262
  break;
41139
41263
  case 39:
41140
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openComponent({
41264
+ (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
41141
41265
  type: 'SELLER',
41142
41266
  parameters: {
41143
41267
  module: 'PCreator',
@@ -41150,7 +41274,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41150
41274
  });
41151
41275
  return _context27.abrupt("break", 63);
41152
41276
  case 41:
41153
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openComponent({
41277
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
41154
41278
  type: 'SELLER',
41155
41279
  parameters: {
41156
41280
  module: 'Basket',
@@ -41232,6 +41356,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41232
41356
  if (!set) return;
41233
41357
  return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
41234
41358
  }
41359
+ }, {
41360
+ key: "checkBannerRules",
41361
+ value: function checkBannerRules(visitedOptions, event) {
41362
+ var set = this.actSet();
41363
+ if (!set) return;
41364
+ return setHandlerInstance.checkBannerRules(set, visitedOptions, event);
41365
+ }
41235
41366
 
41236
41367
  /**
41237
41368
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
@@ -41393,6 +41524,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41393
41524
  key: "getAllowRTV",
41394
41525
  value: function getAllowRTV() {
41395
41526
  var _this$actSet21, _this$actSet22;
41527
+ if (this.getEnableUnityRtvKombi()) return false;
41396
41528
  if (this.api.forceShowRTV()) return true;
41397
41529
  if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41398
41530
  if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
@@ -41475,16 +41607,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41475
41607
  key: "addToBasket",
41476
41608
  value: function () {
41477
41609
  var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
41478
- var _this$actions32,
41479
- _this$actions33,
41480
- _this$actions34,
41610
+ var _this$actions34,
41481
41611
  _this$actions35,
41482
41612
  _this$actions36,
41483
- _this$divaBasketHandl3,
41484
- _this3 = this,
41485
41613
  _this$actions37,
41486
41614
  _this$actions38,
41487
- _this$actions39;
41615
+ _this$divaBasketHandl3,
41616
+ _this3 = this,
41617
+ _this$actions39,
41618
+ _this$actions40,
41619
+ _this$actions41;
41488
41620
  var event,
41489
41621
  addToBasketLog,
41490
41622
  emailConfig,
@@ -41504,35 +41636,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41504
41636
  break;
41505
41637
  case 5:
41506
41638
  this.handleSuccessTransaction('onPrintBasket', actBasket);
41507
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.onEvent({
41639
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41508
41640
  type: 'onWebPlanerPrint',
41509
41641
  data: actBasket.getAsJson()
41510
41642
  });
41511
41643
  return _context29.abrupt("break", 38);
41512
41644
  case 8:
41513
41645
  this.handleSuccessTransaction('onSaveBasket', actBasket);
41514
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.onEvent({
41646
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41515
41647
  type: 'onWebPlanerSave',
41516
41648
  data: actBasket.getAsJson()
41517
41649
  });
41518
41650
  return _context29.abrupt("break", 38);
41519
41651
  case 11:
41520
41652
  this.handleSuccessTransaction('onShareBasket', actBasket);
41521
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41653
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41522
41654
  type: 'onWebPlanerShare',
41523
41655
  data: actBasket.getAsJson()
41524
41656
  });
41525
41657
  return _context29.abrupt("break", 38);
41526
41658
  case 14:
41527
41659
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
41528
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41660
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41529
41661
  type: 'onRequestConsulation',
41530
41662
  data: actBasket.getAsJson()
41531
41663
  });
41532
41664
  return _context29.abrupt("break", 38);
41533
41665
  case 17:
41534
41666
  this.handleSuccessTransaction('onSave', actBasket);
41535
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41667
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41536
41668
  type: 'onSave',
41537
41669
  data: actBasket.getAsJson()
41538
41670
  });
@@ -41568,7 +41700,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41568
41700
  });
41569
41701
  this.handleSuccessTransaction('onSendEmail', actBasket);
41570
41702
  }
41571
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41703
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41572
41704
  type: 'onAddToBasket',
41573
41705
  data: actBasket.getAsJson()
41574
41706
  });
@@ -41580,7 +41712,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41580
41712
  case 28:
41581
41713
  products = _context29.sent;
41582
41714
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41583
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41715
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41584
41716
  type: 'onAddToBasket',
41585
41717
  data: actBasket.getAsJson()
41586
41718
  });
@@ -41594,7 +41726,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41594
41726
  addToBasketLog = false;
41595
41727
  case 35:
41596
41728
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41597
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41729
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41598
41730
  type: 'onAddToBasket',
41599
41731
  data: actBasket.getAsJson()
41600
41732
  });
@@ -41626,8 +41758,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41626
41758
  }, {
41627
41759
  key: "openPDFpostAsEvent",
41628
41760
  value: function openPDFpostAsEvent(mongoDBId) {
41629
- var _this$actions40, _this$actions41, _this$actions42;
41630
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.updateBreadcrumbs({
41761
+ var _this$actions42, _this$actions43, _this$actions44;
41762
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
41631
41763
  type: 'update',
41632
41764
  param: {
41633
41765
  groupId: 'SHOWROOM',
@@ -41641,7 +41773,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41641
41773
  }
41642
41774
  }
41643
41775
  });
41644
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.updateBreadcrumbs({
41776
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
41645
41777
  type: 'update',
41646
41778
  param: {
41647
41779
  groupId: 'SHOWROOM',
@@ -41655,7 +41787,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41655
41787
  }
41656
41788
  }
41657
41789
  });
41658
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.openComponent({
41790
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
41659
41791
  type: 'REPORT',
41660
41792
  parameters: {
41661
41793
  id: mongoDBId
@@ -41875,14 +42007,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41875
42007
  }, {
41876
42008
  key: "subscribeToWebPlannerEvents",
41877
42009
  value: function subscribeToWebPlannerEvents() {
41878
- var _this$actions43;
41879
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.subscribeEvents(this.addToBasketEventFunction);
42010
+ var _this$actions45;
42011
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
41880
42012
  }
41881
42013
  }, {
41882
42014
  key: "unsubscribeFromWebPlannerEvents",
41883
42015
  value: function unsubscribeFromWebPlannerEvents() {
41884
- var _this$actions44;
41885
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.unSubscribeEvents(this.addToBasketEventFunction);
42016
+ var _this$actions46;
42017
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
41886
42018
  }
41887
42019
  }, {
41888
42020
  key: "initApiForLogicOnly",