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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/build/cjs/{DivaBoxPlanner-a5e169ca.js → DivaBoxPlanner-dd5c69fd.js} +3 -3
  2. package/build/cjs/{DivaStandardPlanner-d833dda6.js → DivaStandardPlanner-2efb3d58.js} +17 -81
  3. package/build/cjs/{DoorPlanner-4ad0b55d.js → DoorPlanner-dd6d3521.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-18d5959b.js → Host3DSignalR-3e4165d6.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-2df9ce37.js → LiviqueWWSHandler-ec226414.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-04557c0d.js → PfisterWWSHandler-bd3fca2a.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-ba17ec51.js → PlannerHandler2D-23dee569.js} +62 -67
  8. package/build/cjs/{ProductBasketHandler-a74547b4.js → ProductBasketHandler-bb03366e.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-d7eeeb38.js → SeriousBasketHandler-02d681ef.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-546bdbd7.js → ShelfPlanner-eb3ba49a.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-33b00bda.js → StandardWWSHandler-1c8180d6.js} +1 -1
  12. package/build/cjs/{index-079a47df.js → index-4ef55e73.js} +533 -401
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-a95c530a.js → DivaBoxPlanner-9854695f.js} +3 -3
  15. package/build/esm/{DivaStandardPlanner-660cec0e.js → DivaStandardPlanner-23117cf0.js} +17 -81
  16. package/build/esm/{DoorPlanner-9e3b1dff.js → DoorPlanner-5a3aa0e3.js} +1 -1
  17. package/build/esm/{Host3DSignalR-514ab7ea.js → Host3DSignalR-a9efc712.js} +1 -1
  18. package/build/esm/{LiviqueWWSHandler-5bbc4f4c.js → LiviqueWWSHandler-45311234.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-fea10934.js → PfisterWWSHandler-65456493.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-e204acd1.js → PlannerHandler2D-8d500b19.js} +62 -67
  21. package/build/esm/{ProductBasketHandler-ce45363b.js → ProductBasketHandler-2b076219.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-41c875f2.js → SeriousBasketHandler-03666454.js} +1 -1
  23. package/build/esm/{ShelfPlanner-88da02c7.js → ShelfPlanner-91bba80f.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-26c6ecb8.js → StandardWWSHandler-0d1aa5e9.js} +1 -1
  25. package/build/esm/{index-ae50d2a1.js → index-925c563b.js} +533 -401
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/index.d.ts +1 -1
  28. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -0
  30. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +3 -2
  34. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +2 -2
  36. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -1
  38. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -2
  40. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts +15 -7
  42. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -1
  44. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +7 -3
  46. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +5 -1
  49. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -2
  51. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +2 -0
  54. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +1 -0
  56. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  58. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  59. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +27 -6
  60. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
  62. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
  64. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
  66. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  67. package/package.json +2 -2
@@ -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-546bdbd7.js'); });
23579
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-eb3ba49a.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;
23699
- } else {
23700
- quantity = freeTextMeasure;
23701
- }
23702
- if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23703
- } else if (calcUnit2Price != 0) {
23704
- //for diamter option
23705
- if (myArtOPS.option.diameter) {
23706
- myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23714
+ if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23715
+ } else if (calcUnit2Price != 0) {
23716
+ //for diamter option
23717
+ if (myArtOPS.option.diameter) {
23718
+ myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23719
+ } else {
23720
+ if (firstUnit2Param == 0) {
23721
+ firstUnit2Param = freeTextMeasure;
23722
+ if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23707
23723
  } else {
23708
- 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-4ad0b55d.js'); });
28109
+ return Promise.resolve().then(function () { return require('./DoorPlanner-dd6d3521.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",
@@ -33098,33 +33130,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
33098
33130
  key: "variantsEvaluator",
33099
33131
  value: (function () {
33100
33132
  var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
33101
- var _set$WebConfig, _set$CatalogData$getO, _set$ViewConfig, _configItems$;
33102
- var calcVariantsForPricePreview, checkForProductsInStock, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33133
+ var _set$WebConfig, _set$ViewConfig, _configItems$;
33134
+ var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33103
33135
  return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
33104
33136
  while (1) switch (_context25.prev = _context25.next) {
33105
33137
  case 0:
33138
+ opt = set.CatalogData.getOption(configItems[0].op);
33139
+ if (opt) {
33140
+ _context25.next = 3;
33141
+ break;
33142
+ }
33143
+ return _context25.abrupt("return", configItems);
33144
+ case 3:
33145
+ checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
33106
33146
  calcVariantsForPricePreview = false;
33107
- checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !((_set$CatalogData$getO = set.CatalogData.getOption(configItems[0].op)) !== null && _set$CatalogData$getO !== void 0 && _set$CatalogData$getO.isDescribingState);
33108
33147
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
33109
33148
  if (previewType) {
33110
- calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
33111
- if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
33112
- calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
33113
- }
33149
+ calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
33114
33150
  }
33115
33151
  if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
33116
33152
  if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
33117
33153
  calcVariantsForPricePreview = false;
33118
33154
  }
33119
33155
  if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
33120
- _context25.next = 16;
33156
+ _context25.next = 19;
33121
33157
  break;
33122
33158
  }
33123
33159
  targetArticles = set.configTree.getTargetArticles(configStepKey);
33124
33160
  startTime = new Date();
33125
- _context25.next = 11;
33161
+ _context25.next = 14;
33126
33162
  return this.calcVariants(set, configItems, targetArticles);
33127
- case 11:
33163
+ case 14:
33128
33164
  variants = _context25.sent;
33129
33165
  endTime = new Date();
33130
33166
  if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
@@ -33134,9 +33170,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33134
33170
  if (checkForProductsInStock) {
33135
33171
  configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
33136
33172
  }
33137
- case 16:
33173
+ case 19:
33138
33174
  return _context25.abrupt("return", configItems);
33139
- case 17:
33175
+ case 20:
33140
33176
  case "end":
33141
33177
  return _context25.stop();
33142
33178
  }
@@ -33151,21 +33187,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
33151
33187
  key: "calcVariants",
33152
33188
  value: function () {
33153
33189
  var _calcVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(set, configItems, targetArticles) {
33154
- var variantInfo, origConfig, i, item, variantValues, doUseConfigs, key;
33190
+ var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
33155
33191
  return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context26) {
33156
33192
  while (1) switch (_context26.prev = _context26.next) {
33157
33193
  case 0:
33158
33194
  variantInfo = [];
33159
- origConfig = set.getDivaArticles()[targetArticles[0]].VariantValues;
33195
+ articles = set.getDivaArticles();
33196
+ origConfigs = targetArticles.map(function (basketId) {
33197
+ return articles[basketId].VariantValues;
33198
+ });
33160
33199
  i = 0;
33161
- case 3:
33200
+ case 4:
33162
33201
  if (!(i < configItems.length)) {
33163
- _context26.next = 16;
33202
+ _context26.next = 23;
33164
33203
  break;
33165
33204
  }
33166
33205
  item = configItems[i];
33167
33206
  variantValues = {};
33168
33207
  doUseConfigs = false;
33208
+ targetIndex = 0;
33209
+ case 9:
33210
+ if (!(targetIndex < origConfigs.length)) {
33211
+ _context26.next = 19;
33212
+ break;
33213
+ }
33214
+ origConfig = origConfigs[targetIndex];
33169
33215
  for (key in origConfig) {
33170
33216
  if (key == item.op || key == item.idmOpgOptionCodex) {
33171
33217
  doUseConfigs = true;
@@ -33173,24 +33219,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
33173
33219
  }
33174
33220
  variantValues[item.op] = item.codex;
33175
33221
  if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
33176
- _context26.next = 12;
33177
- return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
33178
- 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:
33179
33229
  variantInfo.push({
33180
33230
  price: set.getSetPrice(),
33181
33231
  variants: set.getGeneralVariantValues(targetArticles),
33182
33232
  opt: item.op
33183
33233
  });
33184
- case 13:
33234
+ case 20:
33185
33235
  i++;
33186
- _context26.next = 3;
33236
+ _context26.next = 4;
33187
33237
  break;
33188
- case 16:
33189
- _context26.next = 18;
33190
- return this.updateArticlesOptionStatesOfActSet(set, origConfig, targetArticles, true);
33191
- 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:
33192
33252
  return _context26.abrupt("return", variantInfo);
33193
- case 19:
33253
+ case 31:
33194
33254
  case "end":
33195
33255
  return _context26.stop();
33196
33256
  }
@@ -33399,12 +33459,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
33399
33459
  _loop3();
33400
33460
  }
33401
33461
  }
33462
+ }, {
33463
+ key: "checkBannerRules",
33464
+ value: function checkBannerRules(set, visitedOptions, event) {
33465
+ var bannerRules = set.CatalogData.bannerRules;
33466
+ if (!bannerRules) return;
33467
+ var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
33468
+ return rules === null || rules === void 0 ? void 0 : rules[0];
33469
+ }
33402
33470
  }, {
33403
33471
  key: "checkNotificationRules",
33404
33472
  value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
33405
33473
  var _set$CatalogData$noti;
33406
33474
  if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
33407
- console.log('checking');
33408
33475
  var allArticles = set.getDivaArticles(true);
33409
33476
  var articles = {};
33410
33477
  for (var i = 0; i < targetArticles.length; i++) {
@@ -33888,7 +33955,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33888
33955
  value: function () {
33889
33956
  var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
33890
33957
  var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
33891
- var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
33958
+ var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
33892
33959
  return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context31) {
33893
33960
  while (1) switch (_context31.prev = _context31.next) {
33894
33961
  case 0:
@@ -33900,8 +33967,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33900
33967
  urlToPlanning2D = undefined;
33901
33968
  alternateSetImages = undefined;
33902
33969
  hqRenderScript = undefined;
33970
+ dimensions = {};
33903
33971
  if (dontGenerateImages) {
33904
- _context31.next = 25;
33972
+ _context31.next = 28;
33905
33973
  break;
33906
33974
  }
33907
33975
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33909,22 +33977,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
33909
33977
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33910
33978
  promise3DAlternate = this.getAlternateSetImages(set);
33911
33979
  }
33912
- _context31.next = 14;
33980
+ _context31.next = 15;
33913
33981
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33914
- case 14:
33982
+ case 15:
33915
33983
  _yield$Promise$all = _context31.sent;
33916
33984
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
33917
- 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;
33918
33988
  urlToPlanning2D = _yield$Promise$all2[1];
33919
33989
  alternateSetImages = _yield$Promise$all2[2];
33920
33990
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33921
- _context31.next = 22;
33991
+ _context31.next = 25;
33922
33992
  return Promise.all([promiseHQRenderScript]);
33923
- case 22:
33993
+ case 25:
33924
33994
  _yield$Promise$all3 = _context31.sent;
33925
33995
  _yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
33926
33996
  hqRenderScript = _yield$Promise$all4[0];
33927
- case 25:
33997
+ case 28:
33928
33998
  LOG$8.startTransaction({
33929
33999
  event: 'FillBakset',
33930
34000
  eventId: 'FILL_BASKET',
@@ -33956,7 +34026,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33956
34026
  OfflineData: catalogData.offlineData,
33957
34027
  SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
33958
34028
  SetArticleNrPrefix: set.SetArticleNrPrefix,
33959
- BBox: this.getBBoxObject(set),
34029
+ BBox: this.getBBoxObject(set, dimensions),
33960
34030
  SetVariantBasketDatas: set.getVariantBasketData(),
33961
34031
  SetImage: setImage,
33962
34032
  //Add url string of current rendering.
@@ -33990,7 +34060,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33990
34060
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33991
34061
  });
33992
34062
  return _context31.abrupt("return", orderSet);
33993
- case 32:
34063
+ case 35:
33994
34064
  case "end":
33995
34065
  return _context31.stop();
33996
34066
  }
@@ -34010,14 +34080,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
34010
34080
  key: "getSetImage",
34011
34081
  value: (function () {
34012
34082
  var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, overwriteLastSavedRendering) {
34013
- var setImage, is3D;
34083
+ var is3D, _yield$set$plannerHan, dimensions, url;
34014
34084
  return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
34015
34085
  while (1) switch (_context32.prev = _context32.next) {
34016
34086
  case 0:
34017
- setImage = undefined;
34018
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34087
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34019
34088
  if (!is3D) {
34020
- _context32.next = 10;
34089
+ _context32.next = 12;
34021
34090
  break;
34022
34091
  }
34023
34092
  LOG$8.startTransaction({
@@ -34025,17 +34094,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
34025
34094
  message: 'render 3D Image',
34026
34095
  eventId: 'RENDER_3D_IMAGE'
34027
34096
  });
34028
- _context32.next = 6;
34097
+ _context32.next = 5;
34029
34098
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
34030
- case 6:
34031
- _context32.next = 8;
34099
+ case 5:
34100
+ _context32.next = 7;
34032
34101
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34033
- case 8:
34034
- setImage = _context32.sent;
34102
+ case 7:
34103
+ _yield$set$plannerHan = _context32.sent;
34104
+ dimensions = _yield$set$plannerHan.dimensions;
34105
+ url = _yield$set$plannerHan.url;
34035
34106
  LOG$8.successTransaction('RENDER_3D_IMAGE');
34036
- case 10:
34037
- return _context32.abrupt("return", setImage);
34038
- 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:
34039
34120
  case "end":
34040
34121
  return _context32.stop();
34041
34122
  }
@@ -34055,7 +34136,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34055
34136
  while (1) switch (_context33.prev = _context33.next) {
34056
34137
  case 0:
34057
34138
  //if not 3d
34058
- is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34139
+ is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34059
34140
  if (is3D) {
34060
34141
  _context33.next = 3;
34061
34142
  break;
@@ -34111,7 +34192,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34111
34192
  message: 'render 3D alternative Image',
34112
34193
  eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
34113
34194
  });
34114
- is2D = !['3DImage', 'BoxPlanner'].includes(set.getPlannerMode());
34195
+ is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
34115
34196
  if (!(is2D || set.onlyRunLogic)) {
34116
34197
  _context34.next = 4;
34117
34198
  break;
@@ -34178,14 +34259,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
34178
34259
  }()
34179
34260
  }, {
34180
34261
  key: "getBBoxObject",
34181
- value: function getBBoxObject(set) {
34262
+ value: function getBBoxObject(set, dimensions) {
34263
+ var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n$t, _set$api$getI18n, _set$api$getI18n$t2, _set$api$getI18n$t3, _set$api$getI18n2, _set$api$getI18n2$t, _set$api$getI18n$t4, _set$api$getI18n3, _set$api$getI18n3$t;
34182
34264
  var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
34183
- return {
34184
- X: bbox.width,
34185
- Y: bbox.depth,
34186
- Z: bbox.height,
34187
- Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34265
+ var dim = {
34266
+ X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
34267
+ Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
34268
+ Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
34188
34269
  };
34270
+ return _objectSpread$8(_objectSpread$8({}, dim), {}, {
34271
+ Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
34272
+ });
34189
34273
  }
34190
34274
  }, {
34191
34275
  key: "loadProductsOfSets",
@@ -34912,7 +34996,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34912
34996
  case 9:
34913
34997
  _context7.prev = 9;
34914
34998
  _context7.t0 = _context7["catch"](0);
34915
- LOG$7.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34999
+ LOG$7.error(new DivaUtils.DivaError('ProductId cannot be found in Database', {
34916
35000
  code: 'WC_0004',
34917
35001
  custom: {
34918
35002
  divaNr: divaNr
@@ -34938,30 +35022,44 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34938
35022
  return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
34939
35023
  while (1) switch (_context8.prev = _context8.next) {
34940
35024
  case 0:
34941
- _context8.next = 2;
35025
+ _context8.prev = 0;
35026
+ _context8.next = 3;
34942
35027
  return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34943
35028
  fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
34944
35029
  });
34945
- case 2:
35030
+ case 3:
34946
35031
  variantData = _context8.sent;
34947
35032
  if (!(variantData.Error || !variantData.basket)) {
34948
- _context8.next = 8;
35033
+ _context8.next = 9;
34949
35034
  break;
34950
35035
  }
34951
- 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', {
34952
35037
  code: 'WC_0005',
34953
35038
  custom: {
34954
35039
  productId: productId
34955
35040
  }
34956
35041
  }));
34957
35042
  return _context8.abrupt("return", false);
34958
- case 8:
34959
- return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
34960
35043
  case 9:
35044
+ return _context8.abrupt("return", this.initBasket(api, variantData.basket.DivaNr, variantData, undefined, productId));
35045
+ case 10:
35046
+ _context8.next = 16;
35047
+ break;
35048
+ case 12:
35049
+ _context8.prev = 12;
35050
+ _context8.t0 = _context8["catch"](0);
35051
+ LOG$7.error(new DivaUtils.DivaError('Error while fetching product data', {
35052
+ code: 'WC_0005',
35053
+ custom: {
35054
+ productId: productId
35055
+ }
35056
+ }));
35057
+ return _context8.abrupt("return", false);
35058
+ case 16:
34961
35059
  case "end":
34962
35060
  return _context8.stop();
34963
35061
  }
34964
- }, _callee8, this);
35062
+ }, _callee8, this, [[0, 12]]);
34965
35063
  }));
34966
35064
  function loadBasketByCustomProductId(_x17, _x18, _x19, _x20) {
34967
35065
  return _loadBasketByCustomProductId.apply(this, arguments);
@@ -35294,7 +35392,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35294
35392
  break;
35295
35393
  case 3:
35296
35394
  _context13.next = 5;
35297
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-04557c0d.js'); });
35395
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-bd3fca2a.js'); });
35298
35396
  case 5:
35299
35397
  _yield$import = _context13.sent;
35300
35398
  PfisterWWSHandler = _yield$import["default"];
@@ -35302,7 +35400,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35302
35400
  return _context13.abrupt("break", 33);
35303
35401
  case 9:
35304
35402
  _context13.next = 11;
35305
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-2df9ce37.js'); });
35403
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-ec226414.js'); });
35306
35404
  case 11:
35307
35405
  _yield$import2 = _context13.sent;
35308
35406
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35310,7 +35408,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35310
35408
  return _context13.abrupt("break", 33);
35311
35409
  case 15:
35312
35410
  _context13.next = 17;
35313
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d7eeeb38.js'); });
35411
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-02d681ef.js'); });
35314
35412
  case 17:
35315
35413
  _yield$import3 = _context13.sent;
35316
35414
  SeriousWWSHandler = _yield$import3["default"];
@@ -35318,7 +35416,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35318
35416
  return _context13.abrupt("break", 33);
35319
35417
  case 21:
35320
35418
  _context13.next = 23;
35321
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-a74547b4.js'); });
35419
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-bb03366e.js'); });
35322
35420
  case 23:
35323
35421
  _yield$import4 = _context13.sent;
35324
35422
  ProductWWSHandler = _yield$import4["default"];
@@ -35326,7 +35424,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35326
35424
  return _context13.abrupt("break", 33);
35327
35425
  case 27:
35328
35426
  _context13.next = 29;
35329
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-33b00bda.js'); });
35427
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-1c8180d6.js'); });
35330
35428
  case 29:
35331
35429
  _yield$import5 = _context13.sent;
35332
35430
  StandardWWSHandler = _yield$import5["default"];
@@ -36711,7 +36809,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36711
36809
  while (1) switch (_context3.prev = _context3.next) {
36712
36810
  case 0:
36713
36811
  _context3.next = 2;
36714
- return Promise.resolve().then(function () { return require('./Host3DSignalR-18d5959b.js'); });
36812
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-3e4165d6.js'); });
36715
36813
  case 2:
36716
36814
  _yield$import = _context3.sent;
36717
36815
  Host3DSignalR = _yield$import["default"];
@@ -37156,13 +37254,15 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37156
37254
  * @param catalogCodex The CatalogCodex in the planning
37157
37255
  * @param catalogGUID The CatalogGUID in the planning
37158
37256
  * @param forceReloadPlanning Force reload whole planning even if only viewPoint has changed. This is used when for example no 3D Render Client has loaded the current planning
37257
+ * @param camera The RTV Camera Information for Unity/RTV KOMBI
37258
+ * @param useLatestCamera should the latest camera be used ? default yes when requesting the start viewpoint via the configurator button not
37159
37259
  */
37160
37260
  }, {
37161
37261
  key: "request3D",
37162
37262
  value: (function () {
37163
37263
  var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
37164
37264
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37165
- var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _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;
37166
37266
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
37167
37267
  while (1) switch (_context7.prev = _context7.next) {
37168
37268
  case 0:
@@ -37188,7 +37288,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37188
37288
  //Check if viewPoint is changed based on alternateRendering
37189
37289
  //Do check if viewpoint has to be changed
37190
37290
  if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
37191
- 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));
37192
37293
  if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
37193
37294
  if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
37194
37295
  this.lastFramePlanningHash = planningHash;
@@ -37196,7 +37297,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37196
37297
  requestHqRenderScriptFrom3DHost = false;
37197
37298
  if (params.doRequestHqRenderScript) {
37198
37299
  rendering = this.hqRenderScriptCache.get(planningHash);
37199
- if (rendering) {
37300
+ if (rendering && !params.useLatestCamera) {
37200
37301
  LOG$4.debug('Get HQRenderScript from cache');
37201
37302
  this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37202
37303
  this.updatePlannerHqRenderScriptInView(rendering);
@@ -37217,7 +37318,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37217
37318
  if (params.doRequestRendering) {
37218
37319
  viewPointName = this.viewPointHandler.getCurViewPointToRender();
37219
37320
  sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37220
- renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_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));
37221
37322
  this.lastRequestedRenderHash = renderHash;
37222
37323
  LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37223
37324
  if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
@@ -37250,7 +37351,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37250
37351
  }
37251
37352
  }
37252
37353
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37253
- _context7.next = 31;
37354
+ _context7.next = 32;
37254
37355
  break;
37255
37356
  }
37256
37357
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37277,20 +37378,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37277
37378
  viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
37278
37379
  alternateRenderingsExist: params.alternateRenderingsExist,
37279
37380
  alternateRenderInfo: params.alternateRenderInfo,
37280
- camera: (_params$camera2 = params.camera) !== null && _params$camera2 !== void 0 ? _params$camera2 : this.latestCamera,
37281
- forceUseCam: !!((_params$camera3 = params.camera) !== null && _params$camera3 !== void 0 ? _params$camera3 : this.latestCamera)
37381
+ camera: camera,
37382
+ forceUseCam: !!camera
37282
37383
  } : undefined
37283
37384
  });
37284
37385
  if (params.camera) this.latestCamera = params.camera;
37285
37386
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37286
- _context7.next = 29;
37387
+ _context7.next = 30;
37287
37388
  break;
37288
37389
  }
37289
37390
  LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37290
37391
  code: 'WC_0013'
37291
37392
  }));
37292
37393
  return _context7.abrupt("return");
37293
- case 29:
37394
+ case 30:
37294
37395
  if (requestHqRenderScriptFrom3DHost) {
37295
37396
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37296
37397
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37302,12 +37403,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37302
37403
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37303
37404
  }
37304
37405
  }
37305
- case 31:
37406
+ case 32:
37306
37407
  return _context7.abrupt("return", {
37307
37408
  planningHash: planningHash,
37308
37409
  renderHash: renderHash
37309
37410
  });
37310
- case 32:
37411
+ case 33:
37311
37412
  case "end":
37312
37413
  return _context7.stop();
37313
37414
  }
@@ -38260,7 +38361,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38260
38361
  break;
38261
38362
  case 8:
38262
38363
  _context4.next = 10;
38263
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-d833dda6.js'); });
38364
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-2efb3d58.js'); });
38264
38365
  case 10:
38265
38366
  _yield$import = _context4.sent;
38266
38367
  DivaStandardPlanner = _yield$import["default"];
@@ -38271,7 +38372,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38271
38372
  return _context4.abrupt("break", 21);
38272
38373
  case 15:
38273
38374
  _context4.next = 17;
38274
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-a5e169ca.js'); });
38375
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-dd5c69fd.js'); });
38275
38376
  case 17:
38276
38377
  _yield$import2 = _context4.sent;
38277
38378
  DivaBoxPlanner = _yield$import2["default"];
@@ -38405,6 +38506,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38405
38506
  key: "getSetImageAsUrl",
38406
38507
  value: (function () {
38407
38508
  var _getSetImageAsUrl = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(setId) {
38509
+ var _rendering$get3DDimIn, _rendering$get3DDimIn2, _rendering$get3DDimIn3;
38408
38510
  var rendering;
38409
38511
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
38410
38512
  while (1) switch (_context6.prev = _context6.next) {
@@ -38414,7 +38516,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38414
38516
  case 2:
38415
38517
  rendering = _context6.sent;
38416
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));
38417
- 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
+ });
38418
38527
  case 5:
38419
38528
  case "end":
38420
38529
  return _context6.stop();
@@ -38530,7 +38639,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38530
38639
  key: "saveSetHQRenderScript",
38531
38640
  value: function () {
38532
38641
  var _saveSetHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
38533
- var hashes, planningHash, checkingTimes, i;
38642
+ var hashes, planningHash, checkingTimes, i, sumWaitingMS;
38534
38643
  return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
38535
38644
  while (1) switch (_context9.prev = _context9.next) {
38536
38645
  case 0:
@@ -38546,25 +38655,27 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38546
38655
  return _context9.abrupt("return");
38547
38656
  case 6:
38548
38657
  planningHash = hashes.planningHash;
38549
- checkingTimes = 50;
38658
+ checkingTimes = 200;
38550
38659
  i = 0;
38551
- case 9:
38660
+ sumWaitingMS = 0;
38661
+ case 10:
38552
38662
  if (!(this.handler3D.getWaitForHqRenderScript(planningHash) && checkingTimes > i)) {
38553
- _context9.next = 15;
38663
+ _context9.next = 17;
38554
38664
  break;
38555
38665
  }
38556
- _context9.next = 12;
38666
+ sumWaitingMS += 50;
38667
+ _context9.next = 14;
38557
38668
  return DivaUtils__default["default"].Sleep(50);
38558
- case 12:
38669
+ case 14:
38559
38670
  i++;
38560
- _context9.next = 9;
38671
+ _context9.next = 10;
38561
38672
  break;
38562
- case 15:
38563
- 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');
38564
38675
  if (this.handler3D.checkIsWaitingForHQRenderScript() && checkingTimes == i) {
38565
38676
  LOG$2.error(new DivaUtils.DivaError('could not saveSetHQRenderScript'));
38566
38677
  }
38567
- case 17:
38678
+ case 19:
38568
38679
  case "end":
38569
38680
  return _context9.stop();
38570
38681
  }
@@ -38997,7 +39108,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38997
39108
  planner3DGridEnabled: false,
38998
39109
  mediaServiceSaveMode: 'STREAM',
38999
39110
  doShow3DDimensionLines: !!doShow3DDimensionLines
39000
- });
39111
+ }, undefined, true);
39001
39112
  } else {
39002
39113
  this.handler3D.handle3DVisualizationChanged(mode, params);
39003
39114
  }
@@ -39030,7 +39141,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39030
39141
  }, {
39031
39142
  key: "request3D",
39032
39143
  value: function () {
39033
- 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) {
39034
39145
  var _this3 = this;
39035
39146
  var plannerData, loadedCatData, plannerExists, savedSetId;
39036
39147
  return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
@@ -39101,7 +39212,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39101
39212
  forceReloadPlanning: forceReloadPlanning,
39102
39213
  alternateRenderInfo: alternateRenderInfo,
39103
39214
  alternateRenderingsExist: alternateRenderingsExist,
39104
- camera: viewpoint
39215
+ camera: viewpoint,
39216
+ useLatestCamera: useLatestCamera
39105
39217
  });
39106
39218
  case 18:
39107
39219
  return _context16.abrupt("return", _context16.sent);
@@ -39113,7 +39225,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39113
39225
  }
39114
39226
  }, _callee16, this);
39115
39227
  }));
39116
- function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39) {
39228
+ function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
39117
39229
  return _request3D.apply(this, arguments);
39118
39230
  }
39119
39231
  return request3D;
@@ -39792,19 +39904,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39792
39904
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
39793
39905
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
39794
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;
39795
39908
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
39796
39909
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
39797
39910
  while (1) switch (_context11.prev = _context11.next) {
39798
39911
  case 0:
39799
39912
  set = _this.actSet();
39800
- _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;
39801
39915
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
39802
- case 3:
39916
+ case 4:
39803
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);
39804
39919
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
39805
39920
  _this.checkVariantData();
39806
39921
  if (dontUpdatePlannerView) {
39807
- _context11.next = 16;
39922
+ _context11.next = 18;
39808
39923
  break;
39809
39924
  }
39810
39925
  _this.updateConfiguratorStructure(structure);
@@ -39818,16 +39933,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39818
39933
  _this.updateViewButtonsDependigOnConfigStructure();
39819
39934
  _this.updatePlannerView('DO_CONFIGURE', myValues);
39820
39935
  _this.updateWebConfiguratorTitle();
39821
- _context11.next = 16;
39936
+ _context11.next = 18;
39822
39937
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
39823
- case 16:
39938
+ case 18:
39824
39939
  if (dontCallEvents) {
39825
- _context11.next = 19;
39940
+ _context11.next = 21;
39826
39941
  break;
39827
39942
  }
39828
- _context11.next = 19;
39943
+ _context11.next = 21;
39829
39944
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
39830
- case 19:
39945
+ case 21:
39831
39946
  case "end":
39832
39947
  return _context11.stop();
39833
39948
  }
@@ -39891,6 +40006,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39891
40006
  return _ref12.apply(this, arguments);
39892
40007
  };
39893
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
+ });
39894
40015
  _defineProperty__default["default"](this, "getReturnTo", function (event) {
39895
40016
  var returnTo = _this.ReturnTo;
39896
40017
  if (returnTo == undefined) {
@@ -39921,7 +40042,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39921
40042
  key: "initialize",
39922
40043
  value: function () {
39923
40044
  var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
39924
- 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;
39925
40046
  return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
39926
40047
  while (1) switch (_context13.prev = _context13.next) {
39927
40048
  case 0:
@@ -39965,7 +40086,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39965
40086
  return this.initView();
39966
40087
  case 20:
39967
40088
  this.subscribeToWebPlannerEvents();
39968
- (_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);
39969
40090
  return _context13.abrupt("return", true);
39970
40091
  case 23:
39971
40092
  //TODO: get prices of matching product with more than one element
@@ -40015,11 +40136,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40015
40136
  _context13.next = 44;
40016
40137
  return this.initView();
40017
40138
  case 44:
40018
- (_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({
40019
40140
  type: 'onConfiguratorReady'
40020
40141
  });
40021
40142
  if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
40022
- (_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({
40023
40144
  type: 'onArticleInitialized'
40024
40145
  });
40025
40146
  }
@@ -40114,11 +40235,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40114
40235
  }, {
40115
40236
  key: "onInitializationError",
40116
40237
  value: function onInitializationError() {
40117
- var _this$state2, _this$actions17, _this$actions17$toggl;
40238
+ var _this$state2, _this$actions19, _this$actions19$toggl;
40118
40239
  var onErrorHandling = this.api.onErrorHandling();
40119
40240
  if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
40120
- var _this$actions16;
40121
- (_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();
40122
40243
  return;
40123
40244
  }
40124
40245
  if (onErrorHandling) {
@@ -40159,7 +40280,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40159
40280
  });
40160
40281
  }
40161
40282
  }
40162
- (_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);
40163
40284
  }
40164
40285
  }, {
40165
40286
  key: "getDivaArticles",
@@ -40492,7 +40613,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40492
40613
  }, {
40493
40614
  key: "updatePlannerView",
40494
40615
  value: function updatePlannerView(callingFrom, onDoConfigureValues, viewpoint) {
40495
- var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3;
40616
+ var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
40496
40617
  var set = this.actSet();
40497
40618
  if (!set) return;
40498
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];
@@ -40527,24 +40648,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40527
40648
  //delete me if you see this
40528
40649
  LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
40529
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;
40530
40654
  case 'RTViewer':
40531
40655
  //Request HQRenderscript + rendering
40532
40656
  //Request new Rendering
40533
- 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);
40534
40658
  break;
40535
40659
  case '3DImage':
40536
40660
  //Request new Rendering
40537
- 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);
40538
40662
  break;
40539
40663
  case '2DGrid':
40540
40664
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
40541
40665
  if (boundingBox) {
40542
40666
  this.updatePlanner2DGrid(boundingBox);
40543
40667
  }
40544
- if (['3DImage'].includes(this.getInitPlannerViewMode())) {
40545
- var _this$getDoShow3DDime4;
40668
+ if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
40669
+ var _this$getDoShow3DDime5;
40546
40670
  //update 3D image always even if you are in the 2DGrid mode
40547
- setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$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);
40548
40672
  }
40549
40673
  break;
40550
40674
  }
@@ -40562,18 +40686,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40562
40686
  value: function forceUpdatePlannerView(renderSavingMode, doLoadAllAlternateRenderings) {
40563
40687
  var set = this.actSet();
40564
40688
  this.update2DGrid(set);
40565
- if (['3DImage', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40566
- var _this$getDoShow3DDime6;
40689
+ if (['3DImage', '3DCOMB', 'BoxPlanner'].includes(this.getInitPlannerViewMode())) {
40690
+ var _this$getDoShow3DDime7;
40567
40691
  if (doLoadAllAlternateRenderings) {
40568
40692
  var alternateRenderings = set.CatalogData.alternateRenderingsForSummary;
40569
40693
  for (var i = 0; i < alternateRenderings.length; i++) {
40570
40694
  if (alternateRenderings[i].hideOptionsIn3DImage && alternateRenderings[i].hideOptionsIn3DImage.length > 0) {
40571
- var _this$getDoShow3DDime5;
40572
- 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]);
40573
40697
  }
40574
40698
  }
40575
40699
  }
40576
- 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));
40577
40701
  }
40578
40702
  }
40579
40703
  }, {
@@ -40870,8 +40994,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40870
40994
  }, {
40871
40995
  key: "changeOnFavorites",
40872
40996
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
40873
- var _this$actions18;
40874
- 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);
40875
40999
  }
40876
41000
  }, {
40877
41001
  key: "setDifferentOptions",
@@ -40918,25 +41042,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40918
41042
  }, {
40919
41043
  key: "callEvent",
40920
41044
  value: function callEvent(event, param) {
40921
- var _this$actions19, _this$actions20, _this$actions21, _this$actions22;
41045
+ var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
40922
41046
  switch (event) {
40923
41047
  case 'onFullscreenClose':
40924
- (_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({
40925
41049
  type: 'onFullscreenClose'
40926
41050
  });
40927
41051
  break;
40928
41052
  case 'onWebPlanerClose':
40929
- (_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({
40930
41054
  type: 'onWebPlanerClose'
40931
41055
  });
40932
41056
  break;
40933
41057
  case 'onWebPlanerHelp':
40934
- (_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({
40935
41059
  type: 'onWebPlanerHelp'
40936
41060
  });
40937
41061
  break;
40938
41062
  case 'onWebPlanerZoomClick':
40939
- (_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({
40940
41064
  type: 'onWebPlanerZoomClick',
40941
41065
  data: param
40942
41066
  });
@@ -40947,14 +41071,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40947
41071
  key: "saveToBasketWrapper",
40948
41072
  value: function () {
40949
41073
  var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
40950
- var _this$actions23,
40951
- _this$actions23$toggl,
40952
- _this$actions24,
40953
- _this$actions24$toggl,
41074
+ var _this$actions25,
41075
+ _this$actions25$toggl,
41076
+ _this$actions26,
41077
+ _this$actions26$toggl,
40954
41078
  _this2 = this,
40955
- _this$actions28,
41079
+ _this$actions30,
40956
41080
  _this$i18n14;
40957
- 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;
40958
41082
  return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
40959
41083
  while (1) switch (_context26.prev = _context26.next) {
40960
41084
  case 0:
@@ -40988,18 +41112,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40988
41112
  case 15:
40989
41113
  returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40990
41114
  case 16:
40991
- (_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);
40992
41116
  _context26.next = 19;
40993
41117
  return this.saveToBasket(finalEvent, repairOnly, force);
40994
41118
  case 19:
40995
41119
  result = _context26.sent;
40996
- (_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);
40997
41121
  if (!(result === 'canceled')) {
40998
41122
  _context26.next = 25;
40999
41123
  break;
41000
41124
  }
41001
41125
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
41002
- (_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({
41003
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() : '',
41004
41128
  accept: true
41005
41129
  });
@@ -41013,12 +41137,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41013
41137
  LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
41014
41138
  code: 'WC_0010'
41015
41139
  }));
41016
- (_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({
41017
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() : '',
41018
41142
  accept: true
41019
41143
  });
41020
41144
  } else {
41021
- (_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({
41022
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'),
41023
41147
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
41024
41148
  callback: function callback() {
@@ -41028,7 +41152,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41028
41152
  }
41029
41153
  return _context26.abrupt("break", 31);
41030
41154
  case 30:
41031
- (_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({
41032
41156
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
41033
41157
  accept: true
41034
41158
  });
@@ -41044,7 +41168,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41044
41168
  _context26.next = 37;
41045
41169
  break;
41046
41170
  }
41047
- (_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({
41048
41172
  accept: true,
41049
41173
  text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
41050
41174
  title: 'modals.error_saving'
@@ -41067,7 +41191,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41067
41191
  key: "saveToBasket",
41068
41192
  value: function () {
41069
41193
  var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, force) {
41070
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions30, _this$actions31;
41194
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
41071
41195
  var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
41072
41196
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
41073
41197
  while (1) switch (_context27.prev = _context27.next) {
@@ -41154,7 +41278,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41154
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;
41155
41279
  break;
41156
41280
  case 39:
41157
- (_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({
41158
41282
  type: 'SELLER',
41159
41283
  parameters: {
41160
41284
  module: 'PCreator',
@@ -41167,7 +41291,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41167
41291
  });
41168
41292
  return _context27.abrupt("break", 63);
41169
41293
  case 41:
41170
- (_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({
41171
41295
  type: 'SELLER',
41172
41296
  parameters: {
41173
41297
  module: 'Basket',
@@ -41249,6 +41373,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41249
41373
  if (!set) return;
41250
41374
  return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
41251
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
+ }
41252
41383
 
41253
41384
  /**
41254
41385
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
@@ -41410,6 +41541,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41410
41541
  key: "getAllowRTV",
41411
41542
  value: function getAllowRTV() {
41412
41543
  var _this$actSet21, _this$actSet22;
41544
+ if (this.getEnableUnityRtvKombi()) return false;
41413
41545
  if (this.api.forceShowRTV()) return true;
41414
41546
  if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41415
41547
  if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
@@ -41492,16 +41624,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41492
41624
  key: "addToBasket",
41493
41625
  value: function () {
41494
41626
  var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
41495
- var _this$actions32,
41496
- _this$actions33,
41497
- _this$actions34,
41627
+ var _this$actions34,
41498
41628
  _this$actions35,
41499
41629
  _this$actions36,
41500
- _this$divaBasketHandl3,
41501
- _this3 = this,
41502
41630
  _this$actions37,
41503
41631
  _this$actions38,
41504
- _this$actions39;
41632
+ _this$divaBasketHandl3,
41633
+ _this3 = this,
41634
+ _this$actions39,
41635
+ _this$actions40,
41636
+ _this$actions41;
41505
41637
  var event,
41506
41638
  addToBasketLog,
41507
41639
  emailConfig,
@@ -41521,35 +41653,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41521
41653
  break;
41522
41654
  case 5:
41523
41655
  this.handleSuccessTransaction('onPrintBasket', actBasket);
41524
- (_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({
41525
41657
  type: 'onWebPlanerPrint',
41526
41658
  data: actBasket.getAsJson()
41527
41659
  });
41528
41660
  return _context29.abrupt("break", 38);
41529
41661
  case 8:
41530
41662
  this.handleSuccessTransaction('onSaveBasket', actBasket);
41531
- (_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({
41532
41664
  type: 'onWebPlanerSave',
41533
41665
  data: actBasket.getAsJson()
41534
41666
  });
41535
41667
  return _context29.abrupt("break", 38);
41536
41668
  case 11:
41537
41669
  this.handleSuccessTransaction('onShareBasket', actBasket);
41538
- (_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({
41539
41671
  type: 'onWebPlanerShare',
41540
41672
  data: actBasket.getAsJson()
41541
41673
  });
41542
41674
  return _context29.abrupt("break", 38);
41543
41675
  case 14:
41544
41676
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
41545
- (_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({
41546
41678
  type: 'onRequestConsulation',
41547
41679
  data: actBasket.getAsJson()
41548
41680
  });
41549
41681
  return _context29.abrupt("break", 38);
41550
41682
  case 17:
41551
41683
  this.handleSuccessTransaction('onSave', actBasket);
41552
- (_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({
41553
41685
  type: 'onSave',
41554
41686
  data: actBasket.getAsJson()
41555
41687
  });
@@ -41585,7 +41717,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41585
41717
  });
41586
41718
  this.handleSuccessTransaction('onSendEmail', actBasket);
41587
41719
  }
41588
- (_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({
41589
41721
  type: 'onAddToBasket',
41590
41722
  data: actBasket.getAsJson()
41591
41723
  });
@@ -41597,7 +41729,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41597
41729
  case 28:
41598
41730
  products = _context29.sent;
41599
41731
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41600
- (_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({
41601
41733
  type: 'onAddToBasket',
41602
41734
  data: actBasket.getAsJson()
41603
41735
  });
@@ -41611,7 +41743,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41611
41743
  addToBasketLog = false;
41612
41744
  case 35:
41613
41745
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41614
- (_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({
41615
41747
  type: 'onAddToBasket',
41616
41748
  data: actBasket.getAsJson()
41617
41749
  });
@@ -41643,8 +41775,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41643
41775
  }, {
41644
41776
  key: "openPDFpostAsEvent",
41645
41777
  value: function openPDFpostAsEvent(mongoDBId) {
41646
- var _this$actions40, _this$actions41, _this$actions42;
41647
- (_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({
41648
41780
  type: 'update',
41649
41781
  param: {
41650
41782
  groupId: 'SHOWROOM',
@@ -41658,7 +41790,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41658
41790
  }
41659
41791
  }
41660
41792
  });
41661
- (_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({
41662
41794
  type: 'update',
41663
41795
  param: {
41664
41796
  groupId: 'SHOWROOM',
@@ -41672,7 +41804,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41672
41804
  }
41673
41805
  }
41674
41806
  });
41675
- (_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({
41676
41808
  type: 'REPORT',
41677
41809
  parameters: {
41678
41810
  id: mongoDBId
@@ -41892,14 +42024,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41892
42024
  }, {
41893
42025
  key: "subscribeToWebPlannerEvents",
41894
42026
  value: function subscribeToWebPlannerEvents() {
41895
- var _this$actions43;
41896
- (_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);
41897
42029
  }
41898
42030
  }, {
41899
42031
  key: "unsubscribeFromWebPlannerEvents",
41900
42032
  value: function unsubscribeFromWebPlannerEvents() {
41901
- var _this$actions44;
41902
- (_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);
41903
42035
  }
41904
42036
  }, {
41905
42037
  key: "initApiForLogicOnly",