@crystaldesign/web-planner-logic 24.12.0-beta.2 → 24.12.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/build/cjs/{DivaBoxPlanner-c59ee416.js → DivaBoxPlanner-13d3daa2.js} +3 -3
  2. package/build/cjs/{DivaStandardPlanner-e0c04f0c.js → DivaStandardPlanner-4f6be897.js} +18 -81
  3. package/build/cjs/{DoorPlanner-2b3e1289.js → DoorPlanner-40c989b0.js} +3 -3
  4. package/build/cjs/{Host3DSignalR-22e2b075.js → Host3DSignalR-f9b0c4f0.js} +5 -24
  5. package/build/cjs/{LiviqueWWSHandler-22b25127.js → LiviqueWWSHandler-84f677cc.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-cb1313d4.js → PfisterWWSHandler-c542faae.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-b8f77cca.js → PlannerHandler2D-cf6f5b31.js} +63 -68
  8. package/build/cjs/{ProductBasketHandler-2e320139.js → ProductBasketHandler-8cfcadcd.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-0c288b72.js → SeriousBasketHandler-cf892a55.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-e68dfee7.js → ShelfPlanner-7177a33a.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-ac69df0a.js → StandardWWSHandler-c4d2c718.js} +1 -1
  12. package/build/cjs/{index-696ee323.js → index-c9a480dc.js} +523 -395
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-de566659.js → DivaBoxPlanner-cc074c2d.js} +3 -3
  15. package/build/esm/{DivaStandardPlanner-2154eb2b.js → DivaStandardPlanner-8eef31dd.js} +18 -81
  16. package/build/esm/{DoorPlanner-d1ab5366.js → DoorPlanner-08904ad6.js} +3 -3
  17. package/build/esm/{Host3DSignalR-0538553d.js → Host3DSignalR-3a1b12e0.js} +5 -5
  18. package/build/esm/{LiviqueWWSHandler-89e77291.js → LiviqueWWSHandler-50bd57bb.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-8ca6de55.js → PfisterWWSHandler-4a918d83.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-66c2e087.js → PlannerHandler2D-2e7fe819.js} +63 -68
  21. package/build/esm/{ProductBasketHandler-68a38a6d.js → ProductBasketHandler-92131aa4.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-3edc7e16.js → SeriousBasketHandler-4d4fd122.js} +1 -1
  23. package/build/esm/{ShelfPlanner-e1e803b9.js → ShelfPlanner-26990450.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-b84368c1.js → StandardWWSHandler-572f394d.js} +1 -1
  25. package/build/esm/{index-2bc7b211.js → index-0d565477.js} +523 -395
  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 +46 -46
  48. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -2
  51. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +55 -51
  52. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -2
  54. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +2 -0
  57. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -1
  59. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +1 -0
  61. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Product/Product.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +4 -5
  64. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +29 -8
  66. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
  68. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
  70. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  71. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
  73. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  74. package/build/types/web-planner-logic/src/test/mocFunctions/index.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/test/scripts/create_renderorder.d.ts.map +1 -1
  76. package/build/types/web-planner-logic/src/test/scripts/getOrigProductId.d.ts.map +1 -1
  77. package/package.json +16 -17
@@ -16667,6 +16667,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
16667
16667
  get: function get() {
16668
16668
  return this.catalogArticle.hasPartlistArticle;
16669
16669
  }
16670
+ }, {
16671
+ key: "possiblePartlistCodexes",
16672
+ get: function get() {
16673
+ var _this$catalogArticle$2;
16674
+ return (_this$catalogArticle$2 = this.catalogArticle.partListArticles) === null || _this$catalogArticle$2 === void 0 ? void 0 : _this$catalogArticle$2.join(';');
16675
+ }
16670
16676
  }, {
16671
16677
  key: "articleDecisions",
16672
16678
  get: function get() {
@@ -16933,8 +16939,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
16933
16939
  }, {
16934
16940
  key: "metaDataView",
16935
16941
  get: function get() {
16936
- var _this$catalogArticle$2;
16937
- return (_this$catalogArticle$2 = this.catalogArticle.metaData) !== null && _this$catalogArticle$2 !== void 0 ? _this$catalogArticle$2 : [];
16942
+ var _this$catalogArticle$3;
16943
+ return (_this$catalogArticle$3 = this.catalogArticle.metaData) !== null && _this$catalogArticle$3 !== void 0 ? _this$catalogArticle$3 : [];
16938
16944
  }
16939
16945
  }, {
16940
16946
  key: "getMergesToOPG",
@@ -18304,7 +18310,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18304
18310
  DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
18305
18311
  }
18306
18312
  }],
18307
- warningRule: [],
18313
+ warningRules: [],
18314
+ bannerRules: [],
18308
18315
  summaryTabGroupPosition: undefined,
18309
18316
  onConfigSingleDontGeneralize: false,
18310
18317
  ignoreMaxPriceAsBP: false,
@@ -18609,7 +18616,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
18609
18616
  } else if (item.Codex == 'NOTIFICATIONS') {
18610
18617
  _this.catalogData.notificationsRules = JSON.parse(item.Value);
18611
18618
  } else if (item.Codex == 'WARNINGS') {
18612
- _this.catalogData.warningRule = JSON.parse(item.Value);
18619
+ _this.catalogData.warningRules = JSON.parse(item.Value);
18620
+ } else if (item.Codex == 'BANNER') {
18621
+ _this.catalogData.bannerRules = JSON.parse(item.Value);
18613
18622
  } else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
18614
18623
  _this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
18615
18624
  } else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
@@ -18810,7 +18819,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18810
18819
  is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
18811
18820
  groupName: groupTitle,
18812
18821
  metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
18813
- contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
18822
+ contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
18823
+ partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
18814
18824
  };
18815
18825
  this.plannerPaletteViewInfo.catalogPlannerArticles.push(catPlanArtView);
18816
18826
  }
@@ -18867,7 +18877,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18867
18877
  is3DModell: catPlanArticle.modelName3D && catPlanArticle.modelName3D != '' ? true : false,
18868
18878
  groupName: groupTitle,
18869
18879
  metaData: this.catalogArticles[catPlanArticle.codex].metaDataView,
18870
- contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId
18880
+ contentItemId: this.catalogArticles[catPlanArticle.codex].contentItemId,
18881
+ partlistcodexes: this.catalogArticles[catPlanArticle.codex].possiblePartlistCodexes
18871
18882
  };
18872
18883
  //nicht ausmultiplizierte Elemente
18873
18884
  this.plannerPaletteViewInfo.catalogPlannerArticles.push(_catPlanArtView);
@@ -19475,9 +19486,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
19475
19486
  return this.catalogData.notificationsRules;
19476
19487
  }
19477
19488
  }, {
19478
- key: "warningRule",
19489
+ key: "warningRules",
19490
+ get: function get() {
19491
+ return this.catalogData.warningRules;
19492
+ }
19493
+ }, {
19494
+ key: "bannerRules",
19479
19495
  get: function get() {
19480
- return this.catalogData.warningRule;
19496
+ return this.catalogData.bannerRules;
19481
19497
  }
19482
19498
  }, {
19483
19499
  key: "dontSaveAlternativeRenderings",
@@ -22574,6 +22590,7 @@ var DivaArticle = /*#__PURE__*/function () {
22574
22590
  }, {
22575
22591
  key: "updateIDMSpecificFeature",
22576
22592
  value: function updateIDMSpecificFeature(myArtOPS) {
22593
+ if (!this.parentHasSameOption(myArtOPS.optionCodex)) return;
22577
22594
  if (myArtOPS.option.idmVariantenArt == 90) {
22578
22595
  //R (Anschlusstyp R) - AVR
22579
22596
  var newAVRFilter = [],
@@ -23559,7 +23576,7 @@ var DivaArticle = /*#__PURE__*/function () {
23559
23576
  break;
23560
23577
  }
23561
23578
  _context.next = 4;
23562
- return Promise.resolve().then(function () { return require('./ShelfPlanner-e68dfee7.js'); });
23579
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-7177a33a.js'); });
23563
23580
  case 4:
23564
23581
  _yield$import = _context.sent;
23565
23582
  ShelfPlanner = _yield$import["default"];
@@ -23623,7 +23640,6 @@ var DivaArticle = /*#__PURE__*/function () {
23623
23640
  calcUnitPrice = 0,
23624
23641
  calcUnit2Price = 0,
23625
23642
  firstUnit2Param = 0,
23626
- secondUnit2Param = 0,
23627
23643
  idmPriceMeasureFactor = 1;
23628
23644
  //CalcPreise berechnen
23629
23645
  for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
@@ -23657,75 +23673,70 @@ var DivaArticle = /*#__PURE__*/function () {
23657
23673
  if (!tmpOPT.useMaxPriceOfGroup) {
23658
23674
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23659
23675
  }
23660
- if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
23661
- var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
23662
- myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
23663
- } else {
23664
- switch (pUnit) {
23665
- case 'm':
23666
- calcUnitPrice += myArtOPS.calcPrice / 100;
23667
- break;
23668
- case 'cm':
23669
- calcUnitPrice += myArtOPS.calcPrice;
23670
- break;
23671
- case 'm2':
23672
- calcUnit2Price += myArtOPS.calcPrice / 10000;
23673
- break;
23674
- case 'cm2':
23675
- calcUnit2Price += myArtOPS.calcPrice;
23676
- break;
23677
- default:
23678
- if (myArtOPS.isPercentage) {
23679
- //hier myArtOPS.TargetOption auswerten
23680
- if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23681
- myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23682
- }
23676
+ switch (pUnit) {
23677
+ case 'm':
23678
+ calcUnitPrice += myArtOPS.calcPrice / 100;
23679
+ break;
23680
+ case 'cm':
23681
+ calcUnitPrice += myArtOPS.calcPrice;
23682
+ break;
23683
+ case 'm2':
23684
+ calcUnit2Price += myArtOPS.calcPrice / 10000;
23685
+ break;
23686
+ case 'cm2':
23687
+ calcUnit2Price += myArtOPS.calcPrice;
23688
+ break;
23689
+ default:
23690
+ if (myArtOPS.isPercentage) {
23691
+ //hier myArtOPS.TargetOption auswerten
23692
+ if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23693
+ myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23694
+ }
23695
+ } else {
23696
+ myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
23697
+ }
23698
+ break;
23699
+ }
23700
+ if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
23701
+ var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23702
+ if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23703
+ if (calcUnitPrice != 0) {
23704
+ var quantity = 0;
23705
+ if (OP == 'OPTUMFANG') {
23706
+ mUnit = 'cm';
23707
+ quantity = this.calcWidth * 2 + this.calcDepth * 2;
23708
+ } else if (OP == 'OPTUMFANG_KREIS') {
23709
+ mUnit = 'cm';
23710
+ quantity = this.calcWidth * Math.PI;
23683
23711
  } else {
23684
- myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
23712
+ quantity = freeTextMeasure;
23685
23713
  }
23686
- break;
23687
- }
23688
- if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23689
- var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23690
- if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
23691
- if (calcUnitPrice != 0) {
23692
- var quantity = 0;
23693
- if (OP == 'OPTUMFANG') {
23694
- mUnit = 'cm';
23695
- quantity = this.calcWidth * 2 + this.calcDepth * 2;
23696
- } else if (OP == 'OPTUMFANG_KREIS') {
23697
- mUnit = 'cm';
23698
- quantity = this.calcWidth * Math.PI;
23714
+ if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23715
+ } else if (calcUnit2Price != 0) {
23716
+ //for diamter option
23717
+ if (myArtOPS.option.diameter) {
23718
+ myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23719
+ } else {
23720
+ if (firstUnit2Param == 0) {
23721
+ firstUnit2Param = freeTextMeasure;
23722
+ if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23699
23723
  } else {
23700
- quantity = freeTextMeasure;
23701
- }
23702
- if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23703
- } else if (calcUnit2Price != 0) {
23704
- //for diamter option
23705
- if (myArtOPS.option.diameter) {
23706
- myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23707
- } else {
23708
- if (firstUnit2Param == 0) {
23709
- firstUnit2Param = freeTextMeasure;
23710
- if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23711
- } else {
23712
- secondUnit2Param = freeTextMeasure;
23713
- if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23714
- myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23715
- }
23724
+ var secondUnit2Param = freeTextMeasure;
23725
+ if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23726
+ myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23716
23727
  }
23717
23728
  }
23718
23729
  }
23719
23730
  }
23720
- if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23721
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23722
- }
23723
- if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23724
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23725
- }
23726
- if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23727
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23728
- }
23731
+ }
23732
+ if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23733
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23734
+ }
23735
+ if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23736
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23737
+ }
23738
+ if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23739
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23729
23740
  }
23730
23741
  }
23731
23742
  //jetzt nochmal prozentuelle Preise mit TargetOption berechnen
@@ -23824,19 +23835,10 @@ var DivaArticle = /*#__PURE__*/function () {
23824
23835
  this.article.price = articleUsedCalcPrice;
23825
23836
  }
23826
23837
  }, {
23827
- key: "getCalcPerUnit",
23828
- value: function getCalcPerUnit(unit, calcPrice) {
23829
- switch (unit) {
23830
- case 'm':
23831
- return calcPrice / 100;
23832
- case 'cm':
23833
- return calcPrice;
23834
- case 'm2':
23835
- return calcPrice / 10000;
23836
- case 'cm2':
23837
- return calcPrice;
23838
- }
23839
- return 0;
23838
+ key: "parentHasSameOption",
23839
+ value: function parentHasSameOption(opt) {
23840
+ if (!this.partListParentArticle) return true;
23841
+ return !!this.partListParentArticle.articleOptionStates[opt] || this.partlistArticleVisibleInTree;
23840
23842
  }
23841
23843
  }, {
23842
23844
  key: "getOptionPrice",
@@ -24988,72 +24990,89 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24988
24990
  }
24989
24991
  }
24990
24992
  }
24991
- if (!(Object.keys(article.articleOptionStates).length === 0)) {
24992
- //infos eines Basisconfigurats initialisieren
24993
- if (!(Object.keys(variantValues).length === 0)) {
24994
- //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
24995
- for (attr in variantValues) {
24996
- foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
24997
- if (foundItem.opt) {
24998
- if (foundItem.opv instanceof ArticleOptionValueData) {
24999
- freeText = variantValues[attr + '_val'];
25000
- article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
25001
- if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
25002
- //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
25003
- article.checkDefaultGlobalOpt(_defineProperty__default["default"]({}, foundItem.opt.codex, foundItem.opv.codex), true);
25004
- }
24993
+ if (Object.keys(article.articleOptionStates).length === 0) {
24994
+ _context8.next = 19;
24995
+ break;
24996
+ }
24997
+ //infos eines Basisconfigurats initialisieren
24998
+ if (!(Object.keys(variantValues).length === 0)) {
24999
+ //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
25000
+ for (attr in variantValues) {
25001
+ foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
25002
+ if (foundItem.opt) {
25003
+ if (foundItem.opv instanceof ArticleOptionValueData) {
25004
+ freeText = variantValues[attr + '_val'];
25005
+ article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
25006
+ if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
25007
+ //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
25008
+ article.checkDefaultGlobalOpt(_defineProperty__default["default"]({}, foundItem.opt.codex, foundItem.opv.codex), true);
25005
25009
  }
25006
25010
  }
25007
25011
  }
25008
25012
  }
25013
+ }
25009
25014
 
25010
- //defaultValues for FreeText
25011
- if (article.articleOptionStates) {
25012
- for (_key in article.articleOptionStates) {
25013
- myArtOPS = article.articleOptionStates[_key];
25014
- value = undefined;
25015
- optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
25016
- if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25017
- for (i = 0; i < variantItems.length && value == undefined; i++) {
25018
- variantItem = variantItems[i];
25019
- if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25020
- if (variantItem.MeasureValue) {
25021
- //measureValue from new Bakset
25022
- value = variantItem.MeasureValue;
25023
- optionValueCodex = 'OPV' + variantItem.OPV;
25024
- } else {
25025
- //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25026
- possibleValues = variantItem.OPVName.split(': ');
25027
- for (j = 0; j < possibleValues.length && value == undefined; j++) {
25028
- possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25029
- if (!isNaN(Number(possibleValue))) {
25030
- value = possibleValue;
25031
- }
25032
- }
25033
- }
25034
- }
25035
- }
25036
- } else if (variantItems && myArtOPS.isFreeText) {
25037
- for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25038
- _variantItem = variantItems[_i2];
25039
- if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25040
- value = _variantItem.FreeText;
25041
- optionValueCodex = 'OPV' + _variantItem.OPV;
25015
+ //defaultValues for FreeText
25016
+ if (!article.articleOptionStates) {
25017
+ _context8.next = 19;
25018
+ break;
25019
+ }
25020
+ _context8.t0 = _regeneratorRuntime__default["default"].keys(article.articleOptionStates);
25021
+ case 7:
25022
+ if ((_context8.t1 = _context8.t0()).done) {
25023
+ _context8.next = 19;
25024
+ break;
25025
+ }
25026
+ _key = _context8.t1.value;
25027
+ myArtOPS = article.articleOptionStates[_key];
25028
+ if (!variantValues[_key + '_val']) {
25029
+ _context8.next = 12;
25030
+ break;
25031
+ }
25032
+ return _context8.abrupt("continue", 7);
25033
+ case 12:
25034
+ value = undefined;
25035
+ optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
25036
+ if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25037
+ for (i = 0; i < variantItems.length && value == undefined; i++) {
25038
+ variantItem = variantItems[i];
25039
+ if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25040
+ if (variantItem.MeasureValue) {
25041
+ //measureValue from new Bakset
25042
+ value = variantItem.MeasureValue;
25043
+ optionValueCodex = 'OPV' + variantItem.OPV;
25044
+ } else {
25045
+ //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25046
+ possibleValues = variantItem.OPVName.split(': ');
25047
+ for (j = 0; j < possibleValues.length && value == undefined; j++) {
25048
+ possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25049
+ if (!isNaN(Number(possibleValue))) {
25050
+ value = possibleValue;
25042
25051
  }
25043
25052
  }
25044
25053
  }
25045
- if (value == undefined) {
25046
- val = myArtOPS.option.freetextDefaultValue;
25047
- if (val) {
25048
- value = val;
25049
- myArtOPS.freeText = val;
25050
- }
25051
- }
25052
- if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25054
+ }
25055
+ }
25056
+ } else if (variantItems && myArtOPS.isFreeText) {
25057
+ for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25058
+ _variantItem = variantItems[_i2];
25059
+ if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25060
+ value = _variantItem.FreeText;
25061
+ optionValueCodex = 'OPV' + _variantItem.OPV;
25053
25062
  }
25054
25063
  }
25055
25064
  }
25056
- case 4:
25065
+ if (value == undefined) {
25066
+ val = myArtOPS.option.freetextDefaultValue;
25067
+ if (val) {
25068
+ value = val;
25069
+ myArtOPS.freeText = val;
25070
+ }
25071
+ }
25072
+ if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25073
+ _context8.next = 7;
25074
+ break;
25075
+ case 19:
25057
25076
  case "end":
25058
25077
  return _context8.stop();
25059
25078
  }
@@ -25421,6 +25440,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25421
25440
  }, {
25422
25441
  key: "evalOpvsOnOpvsConstructionRules",
25423
25442
  value: function evalOpvsOnOpvsConstructionRules(article) {
25443
+ var _article$CatalogData$;
25424
25444
  var somethingChanged = false;
25425
25445
  var previousRules = {};
25426
25446
  if (article.updatedOPVbyOPVConstructionRules) {
@@ -25484,19 +25504,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25484
25504
  }
25485
25505
  }
25486
25506
  }
25487
- var notifications = this.checkNotificationRules(article.CatalogData.warningRule, _defineProperty__default["default"]({}, article.basketId, article), {});
25488
- if (notifications !== null && notifications !== void 0 && notifications.length) {
25489
- for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25490
- var _item = notifications[_i3];
25491
- if (!_item.showAsWarning) continue;
25492
- article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25493
- message: _item.message,
25494
- type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25495
- }));
25507
+ if ((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length) {
25508
+ var notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty__default["default"]({}, article.basketId, article), {});
25509
+ if (notifications !== null && notifications !== void 0 && notifications.length) {
25510
+ for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25511
+ var _item = notifications[_i3];
25512
+ if (!_item.showAsWarning) continue;
25513
+ article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25514
+ message: _item.message,
25515
+ type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25516
+ }));
25517
+ }
25518
+ somethingChanged = true;
25496
25519
  }
25497
- somethingChanged = true;
25498
25520
  }
25499
-
25500
25521
  //falls die vorherigen reglen anders sind wie die neuen, artiklekonfiguration neu laden
25501
25522
  if (somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules)) {
25502
25523
  this.updateCfgValues(article, {}, {});
@@ -25512,7 +25533,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25512
25533
  }, {
25513
25534
  key: "checkNotificationRules",
25514
25535
  value: function checkNotificationRules(toCheckRules, articles, visitedOptions, event) {
25515
- if (!(toCheckRules !== null && toCheckRules !== void 0 && toCheckRules.length)) return;
25516
25536
  var returnValue = [];
25517
25537
  for (var i = 0; i < toCheckRules.length; i++) {
25518
25538
  var entry = toCheckRules[i];
@@ -25520,27 +25540,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25520
25540
  var ruleValid = false;
25521
25541
  for (var j = 0; j < rules.length; j++) {
25522
25542
  for (var basketId in articles) {
25523
- var _rule$articles;
25524
25543
  ruleValid = false;
25525
25544
  var rule = rules[j];
25526
25545
  var article = articles[basketId];
25527
- if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) continue;
25528
- if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) continue;
25529
- if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[basketId])) continue;
25530
- if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) continue;
25531
- if (rule.sizes) console.error('size logic not jet implemented');
25546
+ if (!this.checkRule(rule, article, visitedOptions)) continue;
25532
25547
  if ((event === null || event === void 0 ? void 0 : event.type) == 'config' && entry.type == 'notification') {
25533
- var _entry$checkOnEvents, _entry$checkOnEvents2, _entry$checkOnEvents3, _entry$checkOnEvents4;
25534
- var checkOPT = (_entry$checkOnEvents = entry.checkOnEvents) !== null && _entry$checkOnEvents !== void 0 && _entry$checkOnEvents.option ? 'OPT' + ((_entry$checkOnEvents2 = entry.checkOnEvents) === null || _entry$checkOnEvents2 === void 0 ? void 0 : _entry$checkOnEvents2.option) : undefined;
25535
- var checkOPV = (_entry$checkOnEvents3 = entry.checkOnEvents) !== null && _entry$checkOnEvents3 !== void 0 && _entry$checkOnEvents3.optionValue ? 'OPV' + ((_entry$checkOnEvents4 = entry.checkOnEvents) === null || _entry$checkOnEvents4 === void 0 ? void 0 : _entry$checkOnEvents4.optionValue) : undefined;
25536
- if (checkOPT) {
25537
- if (Array.isArray(checkOPT) && !checkOPT.includes(event.data.optionCodex)) continue;
25538
- if (!Array.isArray(checkOPT) && checkOPT !== event.data.optionCodex) continue;
25539
- }
25540
- if (checkOPV) {
25541
- if (Array.isArray(checkOPV) && !checkOPV.includes(event.data.optionValueCodex)) continue;
25542
- if (!Array.isArray(checkOPV) && checkOPV !== event.data.optionValueCodex) continue;
25543
- }
25548
+ if (!this.checkOnEvent(event.checkOnEvents, event.data)) continue;
25544
25549
  }
25545
25550
  ruleValid = true;
25546
25551
  break;
@@ -25556,6 +25561,35 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25556
25561
  }
25557
25562
  return returnValue;
25558
25563
  }
25564
+ }, {
25565
+ key: "checkRule",
25566
+ value: function checkRule(rule, article, visitedOptions) {
25567
+ var _rule$articles;
25568
+ if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
25569
+ if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
25570
+ if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
25571
+ if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) return false;
25572
+ if (rule.sizes) {
25573
+ console.error('size logic not jet implemented');
25574
+ return false;
25575
+ }
25576
+ return true;
25577
+ }
25578
+ }, {
25579
+ key: "checkOnEvent",
25580
+ value: function checkOnEvent(event, data) {
25581
+ var checkOPT = event !== null && event !== void 0 && event.option ? 'OPT' + (event === null || event === void 0 ? void 0 : event.option) : undefined;
25582
+ var checkOPV = event !== null && event !== void 0 && event.optionValue ? 'OPV' + (event === null || event === void 0 ? void 0 : event.optionValue) : undefined;
25583
+ if (checkOPT) {
25584
+ if (Array.isArray(checkOPT) && !checkOPT.includes(data.optionCodex)) return false;
25585
+ if (!Array.isArray(checkOPT) && checkOPT !== data.optionCodex) return false;
25586
+ }
25587
+ if (checkOPV) {
25588
+ if (Array.isArray(checkOPV) && !checkOPV.includes(data.optionValueCodex)) return false;
25589
+ if (!Array.isArray(checkOPV) && checkOPV !== data.optionValueCodex) return false;
25590
+ }
25591
+ return true;
25592
+ }
25559
25593
  }, {
25560
25594
  key: "objectIncudesObject",
25561
25595
  value: function objectIncudesObject(smallerObject, biggerObject) {
@@ -26876,6 +26910,7 @@ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.lengt
26876
26910
  function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26877
26911
  function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26878
26912
  var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
26913
+ //plz delete me
26879
26914
  var DivaSet = /*#__PURE__*/function () {
26880
26915
  function DivaSet(catalog, _setId, orderSet, initSetState) {
26881
26916
  var _this = this,
@@ -27017,14 +27052,9 @@ var DivaSet = /*#__PURE__*/function () {
27017
27052
  return _ref.apply(this, arguments);
27018
27053
  };
27019
27054
  }());
27020
- _defineProperty__default["default"](this, "setPosNr", function (elementId, posNr, accNr) {
27055
+ _defineProperty__default["default"](this, "setPosNr", function (elementId, posNr) {
27021
27056
  var article = _this.getArticleByElementId(elementId);
27022
- if (article) {
27023
- article.posNr = posNr;
27024
- if (accNr != undefined) {
27025
- article.posNr = Number(posNr + '.' + (accNr < 10 ? '0' : '') + accNr.toString());
27026
- }
27027
- }
27057
+ if (article) article.posNr = posNr;
27028
27058
  _this.sortDivaArticlesByArticlePosNr();
27029
27059
  });
27030
27060
  _defineProperty__default["default"](this, "setElementId", function (basketID, elementId) {
@@ -27275,54 +27305,56 @@ var DivaSet = /*#__PURE__*/function () {
27275
27305
  }, {
27276
27306
  key: "giveAccNewPosNrByBasketId",
27277
27307
  value: function giveAccNewPosNrByBasketId(BasketIdParent) {
27278
- var curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent);
27308
+ var curNum = this.giveAccPosNrByBasketId(BasketIdParent);
27279
27309
  this.givePartlistAccPosNrByBasketId(BasketIdParent, curNum);
27280
27310
  this.sortDivaArticlesByArticlePosNr();
27281
27311
  }
27282
27312
  }, {
27283
- key: "giveNotPlannedAccPosNrByBasketId",
27284
- value: function giveNotPlannedAccPosNrByBasketId(BasketIdParent, BasketId, curNum) {
27313
+ key: "giveAccPosNrByBasketId",
27314
+ value: function giveAccPosNrByBasketId(basketId) {
27315
+ var curNum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
27285
27316
  var allAccs = [];
27286
27317
  var articles = this.getDivaArticles();
27287
- if (!BasketId) BasketId = BasketIdParent;
27288
- var myParentArticle = articles[BasketIdParent];
27289
- var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(BasketId),
27318
+ var article = articles[basketId];
27319
+ if (!article) throw new Error('article ' + basketId + ' does not exist');
27320
+ var myParentArticle = article.getBaseParent();
27321
+ var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(basketId),
27290
27322
  notPlannedAcc = _this$getSplitPlanned.notPlannedAcc,
27291
27323
  plannedAcc = _this$getSplitPlanned.plannedAcc;
27292
- if (curNum === undefined) curNum = this.getStartingPosNr(BasketIdParent);
27293
- for (var key in notPlannedAcc) {
27294
- allAccs.push(notPlannedAcc[key]);
27324
+ for (var key in plannedAcc) {
27325
+ allAccs.push(plannedAcc[key]);
27326
+ }
27327
+ for (var _key3 in notPlannedAcc) {
27328
+ allAccs.push(notPlannedAcc[_key3]);
27295
27329
  }
27296
27330
  for (var i = 0; i < allAccs.length; i++) {
27331
+ var accessoire = allAccs[i];
27297
27332
  curNum++;
27298
- allAccs[i].posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27299
- if (allAccs[i].shelfAccessoires || Object.keys(allAccs[i].accessoires).length !== 0) {
27300
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, allAccs[i].basketId, curNum);
27333
+ accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27334
+ if (accessoire.shelfAccessoires || Object.keys(accessoire.accessoires).length !== 0) {
27335
+ curNum = this.giveAccPosNrByBasketId(accessoire.basketId, curNum);
27336
+ }
27337
+ if (accessoire.hasPartlistArticle) {
27338
+ curNum = this.givePartlistAccPosNrByBasketId(accessoire.basketId, curNum);
27301
27339
  }
27302
- }
27303
- for (var _key3 in plannedAcc) {
27304
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, _key3, curNum);
27305
27340
  }
27306
27341
  return curNum;
27307
27342
  }
27308
27343
  }, {
27309
27344
  key: "givePartlistAccPosNrByBasketId",
27310
- value: function givePartlistAccPosNrByBasketId(BasketIdParent, curNum) {
27311
- var articles = this.getDivaArticles();
27312
- if (!Object.entries(articles).length) return;
27313
- var myParentArticle = articles[BasketIdParent];
27314
- var allAcc = [myParentArticle];
27315
- allAcc = allAcc.concat(this.getAccessoiresOfArticleRecursive(BasketIdParent));
27316
- for (var i = 0; i < allAcc.length; i++) {
27317
- var partlistArticles = this.getPartlistArticlesOfArticle(allAcc[i]);
27318
- if (!(partlistArticles !== null && partlistArticles !== void 0 && partlistArticles.length)) continue;
27319
- for (var j = 0; j < partlistArticles.length; j++) {
27320
- var accessoire = partlistArticles[j];
27321
- if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27322
- curNum++;
27323
- accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27324
- }
27345
+ value: function givePartlistAccPosNrByBasketId(basketId, curNum) {
27346
+ var article = this.getArticleByBasketId(basketId);
27347
+ if (!article) return curNum;
27348
+ var baseParent = article.getBaseParent();
27349
+ var partlistArticles = this.getPartlistArticlesOfArticle(article);
27350
+ for (var j = 0; j < ((_partlistArticles$len = partlistArticles === null || partlistArticles === void 0 ? void 0 : partlistArticles.length) !== null && _partlistArticles$len !== void 0 ? _partlistArticles$len : 0); j++) {
27351
+ var _partlistArticles$len;
27352
+ var accessoire = partlistArticles[j];
27353
+ if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27354
+ curNum++;
27355
+ accessoire.posNr = Number(parseFloat((baseParent.posNr + curNum / 100).toString()).toFixed(2));
27325
27356
  }
27357
+ return curNum;
27326
27358
  }
27327
27359
  }, {
27328
27360
  key: "getAccessoiresOfBasketId",
@@ -27354,11 +27386,6 @@ var DivaSet = /*#__PURE__*/function () {
27354
27386
  notPlannedAcc: notPlannedAcc
27355
27387
  };
27356
27388
  }
27357
- }, {
27358
- key: "getStartingPosNr",
27359
- value: function getStartingPosNr(basketid) {
27360
- return this.getAccessoiresOfArticleRecursive(basketid, 'onlyPlanner').length;
27361
- }
27362
27389
  }, {
27363
27390
  key: "getAccessoiresOfBasketIdAsArray",
27364
27391
  value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
@@ -27679,7 +27706,9 @@ var DivaSet = /*#__PURE__*/function () {
27679
27706
  value: function getArticleByBasketId(basketId) {
27680
27707
  if (this.divaArticles[basketId]) return this.divaArticles[basketId];
27681
27708
  for (var key in this.divaArticles) {
27682
- if (this.divaArticles[key].partlistArticles[basketId]) return this.divaArticles[key].partlistArticles[basketId];
27709
+ var article = this.divaArticles[key];
27710
+ var plArticles = article.getRecursivePartlistArticles();
27711
+ if (plArticles[basketId]) return plArticles[basketId];
27683
27712
  }
27684
27713
  return undefined;
27685
27714
  }
@@ -28077,7 +28106,7 @@ var DivaSet = /*#__PURE__*/function () {
28077
28106
  break;
28078
28107
  }
28079
28108
  _context4.next = 3;
28080
- return Promise.resolve().then(function () { return require('./DoorPlanner-2b3e1289.js'); });
28109
+ return Promise.resolve().then(function () { return require('./DoorPlanner-40c989b0.js'); });
28081
28110
  case 3:
28082
28111
  _yield$import = _context4.sent;
28083
28112
  DoorPlanner = _yield$import["default"];
@@ -30341,46 +30370,49 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30341
30370
  value: function () {
30342
30371
  var _saveConfigVariantsInBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(set, basket, variant, repairOnly) {
30343
30372
  var _hQRenderScript, _basket$OrderSets$set, _basket$OrderSets$set2;
30344
- var setindex, setImage, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
30373
+ var setindex, setImage, dimensions, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
30345
30374
  return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context6) {
30346
30375
  while (1) switch (_context6.prev = _context6.next) {
30347
30376
  case 0:
30348
30377
  setindex = -1;
30349
30378
  setImage = undefined;
30379
+ dimensions = {};
30350
30380
  urlToPlanning2D = undefined;
30351
30381
  hQRenderScript = undefined;
30352
30382
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
30353
30383
  if (repairOnly) {
30354
- _context6.next = 14;
30384
+ _context6.next = 17;
30355
30385
  break;
30356
30386
  }
30357
30387
  promises = [setHandlerInstance.getSetImage(set, true), setHandlerInstance.get2DSetImage(set), setHandlerInstance.getHQRenderScript(set, basket.DivaNr)];
30358
- _context6.next = 9;
30388
+ _context6.next = 10;
30359
30389
  return Promise.all(promises);
30360
- case 9:
30390
+ case 10:
30361
30391
  _yield$Promise$all = _context6.sent;
30362
30392
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
30363
- setImage = _yield$Promise$all2[0];
30393
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
30394
+ setImage = _yield$Promise$all2$.url;
30395
+ dimensions = _yield$Promise$all2$.dimensions;
30364
30396
  urlToPlanning2D = _yield$Promise$all2[1];
30365
30397
  hQRenderScript = _yield$Promise$all2[2];
30366
- case 14:
30398
+ case 17:
30367
30399
  i = 0;
30368
- case 15:
30400
+ case 18:
30369
30401
  if (!(i < basket.OrderSets.length)) {
30370
- _context6.next = 22;
30402
+ _context6.next = 25;
30371
30403
  break;
30372
30404
  }
30373
30405
  if (!(set.getSetId() == basket.OrderSets[i].SetID)) {
30374
- _context6.next = 19;
30406
+ _context6.next = 22;
30375
30407
  break;
30376
30408
  }
30377
30409
  setindex = i;
30378
- return _context6.abrupt("break", 22);
30379
- case 19:
30410
+ return _context6.abrupt("break", 25);
30411
+ case 22:
30380
30412
  i++;
30381
- _context6.next = 15;
30413
+ _context6.next = 18;
30382
30414
  break;
30383
- case 22:
30415
+ case 25:
30384
30416
  if (!basket.OrderSets[setindex].ConfigVariants) basket.OrderSets[setindex].ConfigVariants = [];
30385
30417
  optionsSorted = set.CatalogData.getOptionsPosition();
30386
30418
  variantValues = {};
@@ -30391,9 +30423,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30391
30423
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30392
30424
  }
30393
30425
  }
30394
- configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30426
+ configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30395
30427
  set.basketConfigVariants.push(configVariant);
30396
- case 28:
30428
+ case 31:
30397
30429
  case "end":
30398
30430
  return _context6.stop();
30399
30431
  }
@@ -32795,7 +32827,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32795
32827
  */
32796
32828
  }, {
32797
32829
  key: "update3DPlannerView",
32798
- value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint) {
32830
+ value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, viewpoint, useLatestViewpoint) {
32799
32831
  var _set$plannerHandler, _set$getAlternateRend2;
32800
32832
  var width = renderSize.imgWidth;
32801
32833
  var height = renderSize.imgHeight;
@@ -32806,7 +32838,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32806
32838
  planner3DGridEnabled: planner3DGridEnabled,
32807
32839
  mediaServiceSaveMode: mediaServiceSaveMode,
32808
32840
  doShow3DDimensionLines: !!doShow3DDimensionLines
32809
- }, viewpoint);
32841
+ }, viewpoint, useLatestViewpoint);
32810
32842
  }
32811
32843
  }, {
32812
32844
  key: "getPlannerPaletteViewInfo",
@@ -33155,21 +33187,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
33155
33187
  key: "calcVariants",
33156
33188
  value: function () {
33157
33189
  var _calcVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(set, configItems, targetArticles) {
33158
- var variantInfo, origConfig, i, item, variantValues, doUseConfigs, key;
33190
+ var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
33159
33191
  return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context26) {
33160
33192
  while (1) switch (_context26.prev = _context26.next) {
33161
33193
  case 0:
33162
33194
  variantInfo = [];
33163
- origConfig = set.getDivaArticles()[targetArticles[0]].VariantValues;
33195
+ articles = set.getDivaArticles();
33196
+ origConfigs = targetArticles.map(function (basketId) {
33197
+ return articles[basketId].VariantValues;
33198
+ });
33164
33199
  i = 0;
33165
- case 3:
33200
+ case 4:
33166
33201
  if (!(i < configItems.length)) {
33167
- _context26.next = 16;
33202
+ _context26.next = 23;
33168
33203
  break;
33169
33204
  }
33170
33205
  item = configItems[i];
33171
33206
  variantValues = {};
33172
33207
  doUseConfigs = false;
33208
+ targetIndex = 0;
33209
+ case 9:
33210
+ if (!(targetIndex < origConfigs.length)) {
33211
+ _context26.next = 19;
33212
+ break;
33213
+ }
33214
+ origConfig = origConfigs[targetIndex];
33173
33215
  for (key in origConfig) {
33174
33216
  if (key == item.op || key == item.idmOpgOptionCodex) {
33175
33217
  doUseConfigs = true;
@@ -33177,24 +33219,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
33177
33219
  }
33178
33220
  variantValues[item.op] = item.codex;
33179
33221
  if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
33180
- _context26.next = 12;
33181
- return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
33182
- case 12:
33222
+ _context26.next = 16;
33223
+ return this.updateArticlesOptionStatesOfActSet(set, variantValues, [targetArticles[targetIndex]], true, 'calcVariant');
33224
+ case 16:
33225
+ targetIndex++;
33226
+ _context26.next = 9;
33227
+ break;
33228
+ case 19:
33183
33229
  variantInfo.push({
33184
33230
  price: set.getSetPrice(),
33185
33231
  variants: set.getGeneralVariantValues(targetArticles),
33186
33232
  opt: item.op
33187
33233
  });
33188
- case 13:
33234
+ case 20:
33189
33235
  i++;
33190
- _context26.next = 3;
33236
+ _context26.next = 4;
33191
33237
  break;
33192
- case 16:
33193
- _context26.next = 18;
33194
- return this.updateArticlesOptionStatesOfActSet(set, origConfig, targetArticles, true);
33195
- case 18:
33238
+ case 23:
33239
+ _targetIndex = 0;
33240
+ case 24:
33241
+ if (!(_targetIndex < origConfigs.length)) {
33242
+ _context26.next = 30;
33243
+ break;
33244
+ }
33245
+ _context26.next = 27;
33246
+ return this.updateArticlesOptionStatesOfActSet(set, origConfigs[_targetIndex], [targetArticles[_targetIndex]], true);
33247
+ case 27:
33248
+ _targetIndex++;
33249
+ _context26.next = 24;
33250
+ break;
33251
+ case 30:
33196
33252
  return _context26.abrupt("return", variantInfo);
33197
- case 19:
33253
+ case 31:
33198
33254
  case "end":
33199
33255
  return _context26.stop();
33200
33256
  }
@@ -33403,12 +33459,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
33403
33459
  _loop3();
33404
33460
  }
33405
33461
  }
33462
+ }, {
33463
+ key: "checkBannerRules",
33464
+ value: function checkBannerRules(set, visitedOptions, event) {
33465
+ var bannerRules = set.CatalogData.bannerRules;
33466
+ if (!bannerRules) return;
33467
+ var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
33468
+ return rules === null || rules === void 0 ? void 0 : rules[0];
33469
+ }
33406
33470
  }, {
33407
33471
  key: "checkNotificationRules",
33408
33472
  value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
33409
33473
  var _set$CatalogData$noti;
33410
33474
  if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
33411
- console.log('checking');
33412
33475
  var allArticles = set.getDivaArticles(true);
33413
33476
  var articles = {};
33414
33477
  for (var i = 0; i < targetArticles.length; i++) {
@@ -33892,7 +33955,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33892
33955
  value: function () {
33893
33956
  var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
33894
33957
  var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
33895
- var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
33958
+ var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
33896
33959
  return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context31) {
33897
33960
  while (1) switch (_context31.prev = _context31.next) {
33898
33961
  case 0:
@@ -33904,8 +33967,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33904
33967
  urlToPlanning2D = undefined;
33905
33968
  alternateSetImages = undefined;
33906
33969
  hqRenderScript = undefined;
33970
+ dimensions = {};
33907
33971
  if (dontGenerateImages) {
33908
- _context31.next = 25;
33972
+ _context31.next = 28;
33909
33973
  break;
33910
33974
  }
33911
33975
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33913,22 +33977,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
33913
33977
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33914
33978
  promise3DAlternate = this.getAlternateSetImages(set);
33915
33979
  }
33916
- _context31.next = 14;
33980
+ _context31.next = 15;
33917
33981
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33918
- case 14:
33982
+ case 15:
33919
33983
  _yield$Promise$all = _context31.sent;
33920
33984
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
33921
- setImage = _yield$Promise$all2[0];
33985
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
33986
+ setImage = _yield$Promise$all2$.url;
33987
+ dimensions = _yield$Promise$all2$.dimensions;
33922
33988
  urlToPlanning2D = _yield$Promise$all2[1];
33923
33989
  alternateSetImages = _yield$Promise$all2[2];
33924
33990
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33925
- _context31.next = 22;
33991
+ _context31.next = 25;
33926
33992
  return Promise.all([promiseHQRenderScript]);
33927
- case 22:
33993
+ case 25:
33928
33994
  _yield$Promise$all3 = _context31.sent;
33929
33995
  _yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
33930
33996
  hqRenderScript = _yield$Promise$all4[0];
33931
- case 25:
33997
+ case 28:
33932
33998
  LOG$8.startTransaction({
33933
33999
  event: 'FillBakset',
33934
34000
  eventId: 'FILL_BASKET',
@@ -33960,7 +34026,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33960
34026
  OfflineData: catalogData.offlineData,
33961
34027
  SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
33962
34028
  SetArticleNrPrefix: set.SetArticleNrPrefix,
33963
- BBox: this.getBBoxObject(set),
34029
+ BBox: this.getBBoxObject(set, dimensions),
33964
34030
  SetVariantBasketDatas: set.getVariantBasketData(),
33965
34031
  SetImage: setImage,
33966
34032
  //Add url string of current rendering.
@@ -33994,7 +34060,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33994
34060
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33995
34061
  });
33996
34062
  return _context31.abrupt("return", orderSet);
33997
- case 32:
34063
+ case 35:
33998
34064
  case "end":
33999
34065
  return _context31.stop();
34000
34066
  }
@@ -34014,14 +34080,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
34014
34080
  key: "getSetImage",
34015
34081
  value: (function () {
34016
34082
  var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, overwriteLastSavedRendering) {
34017
- var setImage, is3D;
34083
+ var is3D, _yield$set$plannerHan, dimensions, url;
34018
34084
  return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
34019
34085
  while (1) switch (_context32.prev = _context32.next) {
34020
34086
  case 0:
34021
- setImage = undefined;
34022
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34087
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34023
34088
  if (!is3D) {
34024
- _context32.next = 10;
34089
+ _context32.next = 12;
34025
34090
  break;
34026
34091
  }
34027
34092
  LOG$8.startTransaction({
@@ -34029,17 +34094,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
34029
34094
  message: 'render 3D Image',
34030
34095
  eventId: 'RENDER_3D_IMAGE'
34031
34096
  });
34032
- _context32.next = 6;
34097
+ _context32.next = 5;
34033
34098
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
34034
- case 6:
34035
- _context32.next = 8;
34099
+ case 5:
34100
+ _context32.next = 7;
34036
34101
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34037
- case 8:
34038
- setImage = _context32.sent;
34102
+ case 7:
34103
+ _yield$set$plannerHan = _context32.sent;
34104
+ dimensions = _yield$set$plannerHan.dimensions;
34105
+ url = _yield$set$plannerHan.url;
34039
34106
  LOG$8.successTransaction('RENDER_3D_IMAGE');
34040
- case 10:
34041
- return _context32.abrupt("return", setImage);
34042
- case 11:
34107
+ return _context32.abrupt("return", {
34108
+ dimensions: dimensions,
34109
+ url: url
34110
+ });
34111
+ case 12:
34112
+ return _context32.abrupt("return", {
34113
+ dimensions: {
34114
+ w: undefined,
34115
+ h: undefined,
34116
+ d: undefined
34117
+ }
34118
+ });
34119
+ case 13:
34043
34120
  case "end":
34044
34121
  return _context32.stop();
34045
34122
  }
@@ -34059,7 +34136,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34059
34136
  while (1) switch (_context33.prev = _context33.next) {
34060
34137
  case 0:
34061
34138
  //if not 3d
34062
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34139
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34063
34140
  if (is3D) {
34064
34141
  _context33.next = 3;
34065
34142
  break;
@@ -34115,7 +34192,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34115
34192
  message: 'render 3D alternative Image',
34116
34193
  eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
34117
34194
  });
34118
- is2D = !['3DImage', 'BoxPlanner'].includes(set.getPlannerMode());
34195
+ is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
34119
34196
  if (!(is2D || set.onlyRunLogic)) {
34120
34197
  _context34.next = 4;
34121
34198
  break;
@@ -34182,14 +34259,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
34182
34259
  }()
34183
34260
  }, {
34184
34261
  key: "getBBoxObject",
34185
- value: function getBBoxObject(set) {
34262
+ value: function getBBoxObject(set, dimensions) {
34263
+ var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n$t, _set$api$getI18n, _set$api$getI18n$t2, _set$api$getI18n$t3, _set$api$getI18n2, _set$api$getI18n2$t, _set$api$getI18n$t4, _set$api$getI18n3, _set$api$getI18n3$t;
34186
34264
  var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
34187
- return {
34188
- X: bbox.width,
34189
- Y: bbox.depth,
34190
- Z: bbox.height,
34191
- Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34265
+ var dim = {
34266
+ X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
34267
+ Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
34268
+ Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
34192
34269
  };
34270
+ return _objectSpread$8(_objectSpread$8({}, dim), {}, {
34271
+ Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
34272
+ });
34193
34273
  }
34194
34274
  }, {
34195
34275
  key: "loadProductsOfSets",
@@ -34916,7 +34996,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34916
34996
  case 9:
34917
34997
  _context7.prev = 9;
34918
34998
  _context7.t0 = _context7["catch"](0);
34919
- LOG$7.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34999
+ LOG$7.error(new DivaUtils.DivaError('ProductId cannot be found in Database', {
34920
35000
  code: 'WC_0004',
34921
35001
  custom: {
34922
35002
  divaNr: divaNr
@@ -34942,30 +35022,44 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34942
35022
  return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
34943
35023
  while (1) switch (_context8.prev = _context8.next) {
34944
35024
  case 0:
34945
- _context8.next = 2;
35025
+ _context8.prev = 0;
35026
+ _context8.next = 3;
34946
35027
  return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34947
35028
  fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
34948
35029
  });
34949
- case 2:
35030
+ case 3:
34950
35031
  variantData = _context8.sent;
34951
35032
  if (!(variantData.Error || !variantData.basket)) {
34952
- _context8.next = 8;
35033
+ _context8.next = 9;
34953
35034
  break;
34954
35035
  }
34955
- LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35036
+ LOG$7.error(new DivaUtils.DivaError('ProductId cannot be found in Database', {
34956
35037
  code: 'WC_0005',
34957
35038
  custom: {
34958
35039
  productId: productId
34959
35040
  }
34960
35041
  }));
34961
35042
  return _context8.abrupt("return", false);
34962
- case 8:
34963
- return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
34964
35043
  case 9:
35044
+ return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
35045
+ case 10:
35046
+ _context8.next = 16;
35047
+ break;
35048
+ case 12:
35049
+ _context8.prev = 12;
35050
+ _context8.t0 = _context8["catch"](0);
35051
+ LOG$7.error(new DivaUtils.DivaError('Error while fetching product data', {
35052
+ code: 'WC_0005',
35053
+ custom: {
35054
+ productId: productId
35055
+ }
35056
+ }));
35057
+ return _context8.abrupt("return", false);
35058
+ case 16:
34965
35059
  case "end":
34966
35060
  return _context8.stop();
34967
35061
  }
34968
- }, _callee8, this);
35062
+ }, _callee8, this, [[0, 12]]);
34969
35063
  }));
34970
35064
  function loadBasketByCustomProductId(_x17, _x18, _x19, _x20) {
34971
35065
  return _loadBasketByCustomProductId.apply(this, arguments);
@@ -35298,7 +35392,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35298
35392
  break;
35299
35393
  case 3:
35300
35394
  _context13.next = 5;
35301
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-cb1313d4.js'); });
35395
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-c542faae.js'); });
35302
35396
  case 5:
35303
35397
  _yield$import = _context13.sent;
35304
35398
  PfisterWWSHandler = _yield$import["default"];
@@ -35306,7 +35400,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35306
35400
  return _context13.abrupt("break", 33);
35307
35401
  case 9:
35308
35402
  _context13.next = 11;
35309
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-22b25127.js'); });
35403
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-84f677cc.js'); });
35310
35404
  case 11:
35311
35405
  _yield$import2 = _context13.sent;
35312
35406
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35314,7 +35408,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35314
35408
  return _context13.abrupt("break", 33);
35315
35409
  case 15:
35316
35410
  _context13.next = 17;
35317
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-0c288b72.js'); });
35411
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-cf892a55.js'); });
35318
35412
  case 17:
35319
35413
  _yield$import3 = _context13.sent;
35320
35414
  SeriousWWSHandler = _yield$import3["default"];
@@ -35322,7 +35416,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35322
35416
  return _context13.abrupt("break", 33);
35323
35417
  case 21:
35324
35418
  _context13.next = 23;
35325
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-2e320139.js'); });
35419
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-8cfcadcd.js'); });
35326
35420
  case 23:
35327
35421
  _yield$import4 = _context13.sent;
35328
35422
  ProductWWSHandler = _yield$import4["default"];
@@ -35330,7 +35424,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35330
35424
  return _context13.abrupt("break", 33);
35331
35425
  case 27:
35332
35426
  _context13.next = 29;
35333
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-ac69df0a.js'); });
35427
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-c4d2c718.js'); });
35334
35428
  case 29:
35335
35429
  _yield$import5 = _context13.sent;
35336
35430
  StandardWWSHandler = _yield$import5["default"];
@@ -36715,7 +36809,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36715
36809
  while (1) switch (_context3.prev = _context3.next) {
36716
36810
  case 0:
36717
36811
  _context3.next = 2;
36718
- return Promise.resolve().then(function () { return require('./Host3DSignalR-22e2b075.js'); });
36812
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-f9b0c4f0.js'); });
36719
36813
  case 2:
36720
36814
  _yield$import = _context3.sent;
36721
36815
  Host3DSignalR = _yield$import["default"];
@@ -37160,13 +37254,15 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37160
37254
  * @param catalogCodex The CatalogCodex in the planning
37161
37255
  * @param catalogGUID The CatalogGUID in the planning
37162
37256
  * @param forceReloadPlanning Force reload whole planning even if only viewPoint has changed. This is used when for example no 3D Render Client has loaded the current planning
37257
+ * @param camera The RTV Camera Information for Unity/RTV KOMBI
37258
+ * @param useLatestCamera should the latest camera be used ? default yes when requesting the start viewpoint via the configurator button not
37163
37259
  */
37164
37260
  }, {
37165
37261
  key: "request3D",
37166
37262
  value: (function () {
37167
37263
  var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
37168
37264
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37169
- 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;
37265
+ var room, newRenderSize, doReloadWholePlanning, camera, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, returnRequest;
37170
37266
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
37171
37267
  while (1) switch (_context7.prev = _context7.next) {
37172
37268
  case 0:
@@ -37192,7 +37288,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37192
37288
  //Check if viewPoint is changed based on alternateRendering
37193
37289
  //Do check if viewpoint has to be changed
37194
37290
  if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
37195
- planningHash = DivaUtils.md5(JSON.stringify(params.planningData));
37291
+ camera = params.camera ? params.camera : params.useLatestCamera ? this.latestCamera : undefined;
37292
+ planningHash = DivaUtils.md5(JSON.stringify(params.planningData) + JSON.stringify(camera));
37196
37293
  if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
37197
37294
  if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
37198
37295
  this.lastFramePlanningHash = planningHash;
@@ -37200,7 +37297,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37200
37297
  requestHqRenderScriptFrom3DHost = false;
37201
37298
  if (params.doRequestHqRenderScript) {
37202
37299
  rendering = this.hqRenderScriptCache.get(planningHash);
37203
- if (rendering) {
37300
+ if (rendering && !params.useLatestCamera) {
37204
37301
  LOG$4.debug('Get HQRenderScript from cache');
37205
37302
  this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37206
37303
  this.updatePlannerHqRenderScriptInView(rendering);
@@ -37221,7 +37318,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37221
37318
  if (params.doRequestRendering) {
37222
37319
  viewPointName = this.viewPointHandler.getCurViewPointToRender();
37223
37320
  sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37224
- renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37321
+ renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(camera));
37225
37322
  this.lastRequestedRenderHash = renderHash;
37226
37323
  LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37227
37324
  if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
@@ -37254,7 +37351,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37254
37351
  }
37255
37352
  }
37256
37353
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37257
- _context7.next = 31;
37354
+ _context7.next = 32;
37258
37355
  break;
37259
37356
  }
37260
37357
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37281,20 +37378,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37281
37378
  viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
37282
37379
  alternateRenderingsExist: params.alternateRenderingsExist,
37283
37380
  alternateRenderInfo: params.alternateRenderInfo,
37284
- camera: (_params$camera2 = params.camera) !== null && _params$camera2 !== void 0 ? _params$camera2 : this.latestCamera,
37285
- forceUseCam: !!((_params$camera3 = params.camera) !== null && _params$camera3 !== void 0 ? _params$camera3 : this.latestCamera)
37381
+ camera: camera,
37382
+ forceUseCam: !!camera
37286
37383
  } : undefined
37287
37384
  });
37288
37385
  if (params.camera) this.latestCamera = params.camera;
37289
37386
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37290
- _context7.next = 29;
37387
+ _context7.next = 30;
37291
37388
  break;
37292
37389
  }
37293
37390
  LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37294
37391
  code: 'WC_0013'
37295
37392
  }));
37296
37393
  return _context7.abrupt("return");
37297
- case 29:
37394
+ case 30:
37298
37395
  if (requestHqRenderScriptFrom3DHost) {
37299
37396
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37300
37397
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37306,12 +37403,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37306
37403
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37307
37404
  }
37308
37405
  }
37309
- case 31:
37406
+ case 32:
37310
37407
  return _context7.abrupt("return", {
37311
37408
  planningHash: planningHash,
37312
37409
  renderHash: renderHash
37313
37410
  });
37314
- case 32:
37411
+ case 33:
37315
37412
  case "end":
37316
37413
  return _context7.stop();
37317
37414
  }
@@ -38264,7 +38361,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38264
38361
  break;
38265
38362
  case 8:
38266
38363
  _context4.next = 10;
38267
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-e0c04f0c.js'); });
38364
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-4f6be897.js'); });
38268
38365
  case 10:
38269
38366
  _yield$import = _context4.sent;
38270
38367
  DivaStandardPlanner = _yield$import["default"];
@@ -38275,7 +38372,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38275
38372
  return _context4.abrupt("break", 21);
38276
38373
  case 15:
38277
38374
  _context4.next = 17;
38278
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-c59ee416.js'); });
38375
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-13d3daa2.js'); });
38279
38376
  case 17:
38280
38377
  _yield$import2 = _context4.sent;
38281
38378
  DivaBoxPlanner = _yield$import2["default"];
@@ -38409,6 +38506,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38409
38506
  key: "getSetImageAsUrl",
38410
38507
  value: (function () {
38411
38508
  var _getSetImageAsUrl = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(setId) {
38509
+ var _rendering$get3DDimIn, _rendering$get3DDimIn2, _rendering$get3DDimIn3;
38412
38510
  var rendering;
38413
38511
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
38414
38512
  while (1) switch (_context6.prev = _context6.next) {
@@ -38418,7 +38516,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38418
38516
  case 2:
38419
38517
  rendering = _context6.sent;
38420
38518
  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));
38421
- return _context6.abrupt("return", rendering != undefined ? rendering.UrlToSavedRendering : '');
38519
+ return _context6.abrupt("return", {
38520
+ url: rendering === null || rendering === void 0 ? void 0 : rendering.UrlToSavedRendering,
38521
+ dimensions: {
38522
+ 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,
38523
+ 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,
38524
+ 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
38525
+ }
38526
+ });
38422
38527
  case 5:
38423
38528
  case "end":
38424
38529
  return _context6.stop();
@@ -38534,7 +38639,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38534
38639
  key: "saveSetHQRenderScript",
38535
38640
  value: function () {
38536
38641
  var _saveSetHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
38537
- var hashes, planningHash, checkingTimes, i;
38642
+ var hashes, planningHash, checkingTimes, i, sumWaitingMS;
38538
38643
  return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
38539
38644
  while (1) switch (_context9.prev = _context9.next) {
38540
38645
  case 0:
@@ -38550,25 +38655,27 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38550
38655
  return _context9.abrupt("return");
38551
38656
  case 6:
38552
38657
  planningHash = hashes.planningHash;
38553
- checkingTimes = 50;
38658
+ checkingTimes = 200;
38554
38659
  i = 0;
38555
- case 9:
38660
+ sumWaitingMS = 0;
38661
+ case 10:
38556
38662
  if (!(this.handler3D.getWaitForHqRenderScript(planningHash) && checkingTimes > i)) {
38557
- _context9.next = 15;
38663
+ _context9.next = 17;
38558
38664
  break;
38559
38665
  }
38560
- _context9.next = 12;
38666
+ sumWaitingMS += 50;
38667
+ _context9.next = 14;
38561
38668
  return DivaUtils__default["default"].Sleep(50);
38562
- case 12:
38669
+ case 14:
38563
38670
  i++;
38564
- _context9.next = 9;
38671
+ _context9.next = 10;
38565
38672
  break;
38566
- case 15:
38567
- LOG$2.debug('saving performance: HQ Renderscript recieved after ' + i * checkingTimes + ' ms');
38673
+ case 17:
38674
+ LOG$2.debug('saving performance: HQ Renderscript recieved after ' + sumWaitingMS + ' ms');
38568
38675
  if (this.handler3D.checkIsWaitingForHQRenderScript() && checkingTimes == i) {
38569
38676
  LOG$2.error(new DivaUtils.DivaError('could not saveSetHQRenderScript'));
38570
38677
  }
38571
- case 17:
38678
+ case 19:
38572
38679
  case "end":
38573
38680
  return _context9.stop();
38574
38681
  }
@@ -39001,7 +39108,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39001
39108
  planner3DGridEnabled: false,
39002
39109
  mediaServiceSaveMode: 'STREAM',
39003
39110
  doShow3DDimensionLines: !!doShow3DDimensionLines
39004
- });
39111
+ }, undefined, true);
39005
39112
  } else {
39006
39113
  this.handler3D.handle3DVisualizationChanged(mode, params);
39007
39114
  }
@@ -39034,7 +39141,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39034
39141
  }, {
39035
39142
  key: "request3D",
39036
39143
  value: function () {
39037
- var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint) {
39144
+ var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, viewpoint, useLatestCamera) {
39038
39145
  var _this3 = this;
39039
39146
  var plannerData, loadedCatData, plannerExists, savedSetId;
39040
39147
  return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
@@ -39105,7 +39212,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39105
39212
  forceReloadPlanning: forceReloadPlanning,
39106
39213
  alternateRenderInfo: alternateRenderInfo,
39107
39214
  alternateRenderingsExist: alternateRenderingsExist,
39108
- camera: viewpoint
39215
+ camera: viewpoint,
39216
+ useLatestCamera: useLatestCamera
39109
39217
  });
39110
39218
  case 18:
39111
39219
  return _context16.abrupt("return", _context16.sent);
@@ -39117,7 +39225,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39117
39225
  }
39118
39226
  }, _callee16, this);
39119
39227
  }));
39120
- function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39) {
39228
+ function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
39121
39229
  return _request3D.apply(this, arguments);
39122
39230
  }
39123
39231
  return request3D;
@@ -39796,19 +39904,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39796
39904
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
39797
39905
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
39798
39906
  var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
39907
+ var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
39799
39908
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
39800
39909
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
39801
39910
  while (1) switch (_context11.prev = _context11.next) {
39802
39911
  case 0:
39803
39912
  set = _this.actSet();
39804
- _context11.next = 3;
39913
+ (_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);
39914
+ _context11.next = 4;
39805
39915
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
39806
- case 3:
39916
+ case 4:
39807
39917
  returnValues = _context11.sent;
39918
+ (_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);
39808
39919
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
39809
39920
  _this.checkVariantData();
39810
39921
  if (dontUpdatePlannerView) {
39811
- _context11.next = 16;
39922
+ _context11.next = 18;
39812
39923
  break;
39813
39924
  }
39814
39925
  _this.updateConfiguratorStructure(structure);
@@ -39822,16 +39933,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39822
39933
  _this.updateViewButtonsDependigOnConfigStructure();
39823
39934
  _this.updatePlannerView('DO_CONFIGURE', myValues);
39824
39935
  _this.updateWebConfiguratorTitle();
39825
- _context11.next = 16;
39936
+ _context11.next = 18;
39826
39937
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
39827
- case 16:
39938
+ case 18:
39828
39939
  if (dontCallEvents) {
39829
- _context11.next = 19;
39940
+ _context11.next = 21;
39830
39941
  break;
39831
39942
  }
39832
- _context11.next = 19;
39943
+ _context11.next = 21;
39833
39944
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
39834
- case 19:
39945
+ case 21:
39835
39946
  case "end":
39836
39947
  return _context11.stop();
39837
39948
  }
@@ -39895,6 +40006,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39895
40006
  return _ref12.apply(this, arguments);
39896
40007
  };
39897
40008
  }());
40009
+ _defineProperty__default["default"](this, "getPosNr", function (basketId) {
40010
+ var _set$getArticleByBask;
40011
+ var set = _this.actSet();
40012
+ if (!set) throw new Error('set undefined');
40013
+ return (_set$getArticleByBask = set.getArticleByBasketId(basketId)) === null || _set$getArticleByBask === void 0 ? void 0 : _set$getArticleByBask.posNr;
40014
+ });
39898
40015
  _defineProperty__default["default"](this, "getReturnTo", function (event) {
39899
40016
  var returnTo = _this.ReturnTo;
39900
40017
  if (returnTo == undefined) {
@@ -39925,7 +40042,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39925
40042
  key: "initialize",
39926
40043
  value: function () {
39927
40044
  var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
39928
- 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;
40045
+ 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;
39929
40046
  return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
39930
40047
  while (1) switch (_context13.prev = _context13.next) {
39931
40048
  case 0:
@@ -39969,7 +40086,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39969
40086
  return this.initView();
39970
40087
  case 20:
39971
40088
  this.subscribeToWebPlannerEvents();
39972
- (_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);
40089
+ (_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);
39973
40090
  return _context13.abrupt("return", true);
39974
40091
  case 23:
39975
40092
  //TODO: get prices of matching product with more than one element
@@ -40019,11 +40136,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40019
40136
  _context13.next = 44;
40020
40137
  return this.initView();
40021
40138
  case 44:
40022
- (_this$actions14 = this.actions) === null || _this$actions14 === void 0 || _this$actions14.onEvent({
40139
+ (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
40023
40140
  type: 'onConfiguratorReady'
40024
40141
  });
40025
40142
  if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
40026
- (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.onEvent({
40143
+ (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
40027
40144
  type: 'onArticleInitialized'
40028
40145
  });
40029
40146
  }
@@ -40118,11 +40235,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40118
40235
  }, {
40119
40236
  key: "onInitializationError",
40120
40237
  value: function onInitializationError() {
40121
- var _this$state2, _this$actions17, _this$actions17$toggl;
40238
+ var _this$state2, _this$actions19, _this$actions19$toggl;
40122
40239
  var onErrorHandling = this.api.onErrorHandling();
40123
40240
  if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
40124
- var _this$actions16;
40125
- (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.closeComponentInFullscreen();
40241
+ var _this$actions18;
40242
+ (_this$actions18 = this.actions) === null || _this$actions18 === void 0 || _this$actions18.closeComponentInFullscreen();
40126
40243
  return;
40127
40244
  }
40128
40245
  if (onErrorHandling) {
@@ -40163,7 +40280,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40163
40280
  });
40164
40281
  }
40165
40282
  }
40166
- (_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);
40283
+ (_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);
40167
40284
  }
40168
40285
  }, {
40169
40286
  key: "getDivaArticles",
@@ -40496,7 +40613,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40496
40613
  }, {
40497
40614
  key: "updatePlannerView",
40498
40615
  value: function updatePlannerView(callingFrom, onDoConfigureValues, viewpoint) {
40499
- var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3;
40616
+ var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
40500
40617
  var set = this.actSet();
40501
40618
  if (!set) return;
40502
40619
  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];
@@ -40531,24 +40648,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40531
40648
  //delete me if you see this
40532
40649
  LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
40533
40650
  switch (this.getCurPlannerViewMode()) {
40651
+ case '3DCOMB':
40652
+ 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');
40653
+ break;
40534
40654
  case 'RTViewer':
40535
40655
  //Request HQRenderscript + rendering
40536
40656
  //Request new Rendering
40537
- 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);
40657
+ 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);
40538
40658
  break;
40539
40659
  case '3DImage':
40540
40660
  //Request new Rendering
40541
- 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);
40661
+ 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);
40542
40662
  break;
40543
40663
  case '2DGrid':
40544
40664
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
40545
40665
  if (boundingBox) {
40546
40666
  this.updatePlanner2DGrid(boundingBox);
40547
40667
  }
40548
- if (['3DImage'].includes(this.getInitPlannerViewMode())) {
40549
- var _this$getDoShow3DDime4;
40668
+ if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
40669
+ var _this$getDoShow3DDime5;
40550
40670
  //update 3D image always even if you are in the 2DGrid mode
40551
- 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);
40671
+ 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);
40552
40672
  }
40553
40673
  break;
40554
40674
  }
@@ -40566,18 +40686,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40566
40686
  value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
40567
40687
  var set = this.actSet();
40568
40688
  this.update2DGrid(set);
40569
- if (['3DImage', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40570
- var _this$getDoShow3DDime6;
40689
+ if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40690
+ var _this$getDoShow3DDime7;
40571
40691
  if (doLoadAllAlternateRenderings) {
40572
40692
  var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
40573
40693
  for (var i = 0; i < alternateRenderings.length; i++) {
40574
40694
  if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
40575
- var _this$getDoShow3DDime5;
40576
- 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]);
40695
+ var _this$getDoShow3DDime6;
40696
+ 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]);
40577
40697
  }
40578
40698
  }
40579
40699
  }
40580
- 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));
40700
+ 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));
40581
40701
  }
40582
40702
  }
40583
40703
  }, {
@@ -40874,8 +40994,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40874
40994
  }, {
40875
40995
  key: "changeOnFavorites",
40876
40996
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
40877
- var _this$actions18;
40878
- favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions18 = this.actions) === null || _this$actions18 === void 0 ? void 0 : _this$actions18.openModal);
40997
+ var _this$actions20;
40998
+ favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions20 = this.actions) === null || _this$actions20 === void 0 ? void 0 : _this$actions20.openModal);
40879
40999
  }
40880
41000
  }, {
40881
41001
  key: "setDifferentOptions",
@@ -40922,25 +41042,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40922
41042
  }, {
40923
41043
  key: "callEvent",
40924
41044
  value: function callEvent(event, param) {
40925
- var _this$actions19, _this$actions20, _this$actions21, _this$actions22;
41045
+ var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
40926
41046
  switch (event) {
40927
41047
  case 'onFullscreenClose':
40928
- (_this$actions19 = this.actions) === null || _this$actions19 === void 0 || _this$actions19.onEvent({
41048
+ (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
40929
41049
  type: 'onFullscreenClose'
40930
41050
  });
40931
41051
  break;
40932
41052
  case 'onWebPlanerClose':
40933
- (_this$actions20 = this.actions) === null || _this$actions20 === void 0 || _this$actions20.onEvent({
41053
+ (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
40934
41054
  type: 'onWebPlanerClose'
40935
41055
  });
40936
41056
  break;
40937
41057
  case 'onWebPlanerHelp':
40938
- (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
41058
+ (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
40939
41059
  type: 'onWebPlanerHelp'
40940
41060
  });
40941
41061
  break;
40942
41062
  case 'onWebPlanerZoomClick':
40943
- (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
41063
+ (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
40944
41064
  type: 'onWebPlanerZoomClick',
40945
41065
  data: param
40946
41066
  });
@@ -40951,14 +41071,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40951
41071
  key: "saveToBasketWrapper",
40952
41072
  value: function () {
40953
41073
  var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
40954
- var _this$actions23,
40955
- _this$actions23$toggl,
40956
- _this$actions24,
40957
- _this$actions24$toggl,
41074
+ var _this$actions25,
41075
+ _this$actions25$toggl,
41076
+ _this$actions26,
41077
+ _this$actions26$toggl,
40958
41078
  _this2 = this,
40959
- _this$actions28,
41079
+ _this$actions30,
40960
41080
  _this$i18n14;
40961
- 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;
41081
+ 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;
40962
41082
  return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
40963
41083
  while (1) switch (_context26.prev = _context26.next) {
40964
41084
  case 0:
@@ -40992,18 +41112,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40992
41112
  case 15:
40993
41113
  returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40994
41114
  case 16:
40995
- (_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);
41115
+ (_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);
40996
41116
  _context26.next = 19;
40997
41117
  return this.saveToBasket(finalEvent, repairOnly, force);
40998
41118
  case 19:
40999
41119
  result = _context26.sent;
41000
- (_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);
41120
+ (_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);
41001
41121
  if (!(result === 'canceled')) {
41002
41122
  _context26.next = 25;
41003
41123
  break;
41004
41124
  }
41005
41125
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
41006
- (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.openModal({
41126
+ (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
41007
41127
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
41008
41128
  accept: true
41009
41129
  });
@@ -41017,12 +41137,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41017
41137
  LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
41018
41138
  code: 'WC_0010'
41019
41139
  }));
41020
- (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.openModal({
41140
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41021
41141
  text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
41022
41142
  accept: true
41023
41143
  });
41024
41144
  } else {
41025
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
41145
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41026
41146
  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'),
41027
41147
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
41028
41148
  callback: function callback() {
@@ -41032,7 +41152,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41032
41152
  }
41033
41153
  return _context26.abrupt("break", 31);
41034
41154
  case 30:
41035
- (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41155
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
41036
41156
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
41037
41157
  accept: true
41038
41158
  });
@@ -41048,7 +41168,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41048
41168
  _context26.next = 37;
41049
41169
  break;
41050
41170
  }
41051
- (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41171
+ (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
41052
41172
  accept: true,
41053
41173
  text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
41054
41174
  title: 'modals.error_saving'
@@ -41071,7 +41191,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41071
41191
  key: "saveToBasket",
41072
41192
  value: function () {
41073
41193
  var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, force) {
41074
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions30, _this$actions31;
41194
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
41075
41195
  var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
41076
41196
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
41077
41197
  while (1) switch (_context27.prev = _context27.next) {
@@ -41158,7 +41278,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41158
41278
  _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;
41159
41279
  break;
41160
41280
  case 39:
41161
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openComponent({
41281
+ (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
41162
41282
  type: 'SELLER',
41163
41283
  parameters: {
41164
41284
  module: 'PCreator',
@@ -41171,7 +41291,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41171
41291
  });
41172
41292
  return _context27.abrupt("break", 63);
41173
41293
  case 41:
41174
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openComponent({
41294
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
41175
41295
  type: 'SELLER',
41176
41296
  parameters: {
41177
41297
  module: 'Basket',
@@ -41253,6 +41373,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41253
41373
  if (!set) return;
41254
41374
  return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
41255
41375
  }
41376
+ }, {
41377
+ key: "checkBannerRules",
41378
+ value: function checkBannerRules(visitedOptions, event) {
41379
+ var set = this.actSet();
41380
+ if (!set) return;
41381
+ return setHandlerInstance.checkBannerRules(set, visitedOptions, event);
41382
+ }
41256
41383
 
41257
41384
  /**
41258
41385
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
@@ -41414,6 +41541,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41414
41541
  key: "getAllowRTV",
41415
41542
  value: function getAllowRTV() {
41416
41543
  var _this$actSet21, _this$actSet22;
41544
+ if (this.getEnableUnityRtvKombi()) return false;
41417
41545
  if (this.api.forceShowRTV()) return true;
41418
41546
  if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41419
41547
  if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
@@ -41429,16 +41557,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41429
41557
  }, {
41430
41558
  key: "getEnableUnityRtvKombi",
41431
41559
  value: function getEnableUnityRtvKombi() {
41432
- var _this$actSet24;
41560
+ var _this$actSet24, _this$actSet25;
41433
41561
  // if force rtv disable unity kombi - biohort
41434
41562
  if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
41435
- return this.api.getEnableRTVUnityKombi();
41563
+ return ((_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
41436
41564
  }
41437
41565
  }, {
41438
41566
  key: "getShelfPlannerRTV",
41439
41567
  value: function getShelfPlannerRTV() {
41440
- var _this$actSet25;
41441
- return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
41568
+ var _this$actSet26;
41569
+ return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.useShelfPlannerRTV;
41442
41570
  }
41443
41571
  }, {
41444
41572
  key: "getBasketData",
@@ -41479,8 +41607,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41479
41607
  }, {
41480
41608
  key: "getCatalogData",
41481
41609
  value: function getCatalogData() {
41482
- var _this$actSet26;
41483
- return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
41610
+ var _this$actSet27;
41611
+ return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
41484
41612
  }
41485
41613
  }, {
41486
41614
  key: "ReturnTo",
@@ -41496,16 +41624,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41496
41624
  key: "addToBasket",
41497
41625
  value: function () {
41498
41626
  var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
41499
- var _this$actions32,
41500
- _this$actions33,
41501
- _this$actions34,
41627
+ var _this$actions34,
41502
41628
  _this$actions35,
41503
41629
  _this$actions36,
41504
- _this$divaBasketHandl3,
41505
- _this3 = this,
41506
41630
  _this$actions37,
41507
41631
  _this$actions38,
41508
- _this$actions39;
41632
+ _this$divaBasketHandl3,
41633
+ _this3 = this,
41634
+ _this$actions39,
41635
+ _this$actions40,
41636
+ _this$actions41;
41509
41637
  var event,
41510
41638
  addToBasketLog,
41511
41639
  emailConfig,
@@ -41525,35 +41653,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41525
41653
  break;
41526
41654
  case 5:
41527
41655
  this.handleSuccessTransaction('onPrintBasket', actBasket);
41528
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.onEvent({
41656
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41529
41657
  type: 'onWebPlanerPrint',
41530
41658
  data: actBasket.getAsJson()
41531
41659
  });
41532
41660
  return _context29.abrupt("break", 38);
41533
41661
  case 8:
41534
41662
  this.handleSuccessTransaction('onSaveBasket', actBasket);
41535
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.onEvent({
41663
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41536
41664
  type: 'onWebPlanerSave',
41537
41665
  data: actBasket.getAsJson()
41538
41666
  });
41539
41667
  return _context29.abrupt("break", 38);
41540
41668
  case 11:
41541
41669
  this.handleSuccessTransaction('onShareBasket', actBasket);
41542
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41670
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41543
41671
  type: 'onWebPlanerShare',
41544
41672
  data: actBasket.getAsJson()
41545
41673
  });
41546
41674
  return _context29.abrupt("break", 38);
41547
41675
  case 14:
41548
41676
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
41549
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41677
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41550
41678
  type: 'onRequestConsulation',
41551
41679
  data: actBasket.getAsJson()
41552
41680
  });
41553
41681
  return _context29.abrupt("break", 38);
41554
41682
  case 17:
41555
41683
  this.handleSuccessTransaction('onSave', actBasket);
41556
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41684
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41557
41685
  type: 'onSave',
41558
41686
  data: actBasket.getAsJson()
41559
41687
  });
@@ -41589,7 +41717,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41589
41717
  });
41590
41718
  this.handleSuccessTransaction('onSendEmail', actBasket);
41591
41719
  }
41592
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41720
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41593
41721
  type: 'onAddToBasket',
41594
41722
  data: actBasket.getAsJson()
41595
41723
  });
@@ -41601,7 +41729,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41601
41729
  case 28:
41602
41730
  products = _context29.sent;
41603
41731
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41604
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41732
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41605
41733
  type: 'onAddToBasket',
41606
41734
  data: actBasket.getAsJson()
41607
41735
  });
@@ -41615,7 +41743,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41615
41743
  addToBasketLog = false;
41616
41744
  case 35:
41617
41745
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41618
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41746
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41619
41747
  type: 'onAddToBasket',
41620
41748
  data: actBasket.getAsJson()
41621
41749
  });
@@ -41647,8 +41775,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41647
41775
  }, {
41648
41776
  key: "openPDFpostAsEvent",
41649
41777
  value: function openPDFpostAsEvent(mongoDBId) {
41650
- var _this$actions40, _this$actions41, _this$actions42;
41651
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.updateBreadcrumbs({
41778
+ var _this$actions42, _this$actions43, _this$actions44;
41779
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
41652
41780
  type: 'update',
41653
41781
  param: {
41654
41782
  groupId: 'SHOWROOM',
@@ -41662,7 +41790,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41662
41790
  }
41663
41791
  }
41664
41792
  });
41665
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.updateBreadcrumbs({
41793
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
41666
41794
  type: 'update',
41667
41795
  param: {
41668
41796
  groupId: 'SHOWROOM',
@@ -41676,7 +41804,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41676
41804
  }
41677
41805
  }
41678
41806
  });
41679
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.openComponent({
41807
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
41680
41808
  type: 'REPORT',
41681
41809
  parameters: {
41682
41810
  id: mongoDBId
@@ -41896,14 +42024,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41896
42024
  }, {
41897
42025
  key: "subscribeToWebPlannerEvents",
41898
42026
  value: function subscribeToWebPlannerEvents() {
41899
- var _this$actions43;
41900
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.subscribeEvents(this.addToBasketEventFunction);
42027
+ var _this$actions45;
42028
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
41901
42029
  }
41902
42030
  }, {
41903
42031
  key: "unsubscribeFromWebPlannerEvents",
41904
42032
  value: function unsubscribeFromWebPlannerEvents() {
41905
- var _this$actions44;
41906
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.unSubscribeEvents(this.addToBasketEventFunction);
42033
+ var _this$actions46;
42034
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
41907
42035
  }
41908
42036
  }, {
41909
42037
  key: "initApiForLogicOnly",