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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/build/cjs/{DivaBoxPlanner-9b908b19.js → DivaBoxPlanner-022b9e6d.js} +60 -77
  2. package/build/cjs/{DivaStandardPlanner-fc5b6e71.js → DivaStandardPlanner-cceebe23.js} +3 -3
  3. package/build/cjs/{DoorPlanner-7d363e3b.js → DoorPlanner-11b462aa.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-09589f6f.js → Host3DSignalR-e782c432.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-73899dec.js → LiviqueWWSHandler-35f2e8ed.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-21fc0405.js → PfisterWWSHandler-4414e221.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-b6d6d66c.js → PlannerHandler2D-f03be183.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-38942a5b.js → SeriousBasketHandler-3923b9fb.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-b81aaa3b.js → ShelfPlanner-f84fca39.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-678ea32e.js → StandardWWSHandler-a6679920.js} +1 -1
  11. package/build/cjs/{index-c89f3375.js → index-e5ef9654.js} +460 -432
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-28a692cd.js → DivaBoxPlanner-d1fe2f39.js} +60 -77
  14. package/build/esm/{DivaStandardPlanner-90620c78.js → DivaStandardPlanner-2977514b.js} +3 -3
  15. package/build/esm/{DoorPlanner-54471e77.js → DoorPlanner-fd15242e.js} +1 -1
  16. package/build/esm/{Host3DSignalR-79df2488.js → Host3DSignalR-e075d73c.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-53a5195d.js → LiviqueWWSHandler-e04621da.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-a5542a05.js → PfisterWWSHandler-55f4ec64.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-0c96ec2e.js → PlannerHandler2D-5c595ec6.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-fed815e3.js → SeriousBasketHandler-aad3b760.js} +1 -1
  21. package/build/esm/{ShelfPlanner-d3568028.js → ShelfPlanner-ecbad409.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-38258f9c.js → StandardWWSHandler-dc2603b4.js} +1 -1
  23. package/build/esm/{index-9836bc0f.js → index-f0630368.js} +460 -432
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +6 -3
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +5 -1
  28. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -0
  30. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +16 -15
  32. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +2 -9
  34. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
  36. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Summary/SummaryItemType.d.ts +4 -1
  38. package/build/types/web-planner-logic/src/interface/Summary/SummaryItemType.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/Summary/SummaryPaletteItemType.d.ts +1 -1
  40. package/build/types/web-planner-logic/src/interface/Summary/SummaryPaletteItemType.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts +1 -1
  42. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +1 -1
  44. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +1 -0
  46. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +1 -1
  48. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +1 -3
  50. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +2 -2
  52. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts +10 -2
  54. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +3 -3
  57. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +3 -3
  59. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +3 -3
  60. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +3 -2
  62. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +3 -1
  66. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +2 -0
  68. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -0
  70. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  71. package/package.json +2 -2
@@ -1935,6 +1935,12 @@ var OptionCatalogData = /*#__PURE__*/function () {
1935
1935
  case 'INFO_URL':
1936
1936
  this.opt.url = prop.Value;
1937
1937
  break;
1938
+ case 'IGNORE_GROUPS':
1939
+ this.opt.ignoreGroups = prop.Value == '1';
1940
+ break;
1941
+ case 'IGNORE_PGR_GROUP_POSITION':
1942
+ this.opt.ignorePgrGroupPosition = prop.Value == '1';
1943
+ break;
1938
1944
  case 'SHOW_SEARCHBAR':
1939
1945
  this.opt.showSearchbar = prop.Value == '1';
1940
1946
  break;
@@ -2252,6 +2258,16 @@ var OptionCatalogData = /*#__PURE__*/function () {
2252
2258
  get: function get() {
2253
2259
  return this.opt.sequenceNo;
2254
2260
  }
2261
+ }, {
2262
+ key: "ignoreGroups",
2263
+ get: function get() {
2264
+ return this.opt.ignoreGroups;
2265
+ }
2266
+ }, {
2267
+ key: "ignorePgrGroupPosition",
2268
+ get: function get() {
2269
+ return this.opt.ignorePgrGroupPosition;
2270
+ }
2255
2271
  }]);
2256
2272
  }();
2257
2273
 
@@ -17679,6 +17695,7 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
17679
17695
  isAccessoireWasUndefined = true;
17680
17696
  }
17681
17697
  if (topSvg.IsAccessoire == false) {
17698
+ var _catalogArticle$artic;
17682
17699
  nSVG++;
17683
17700
  //Artikelbild mit svg üerschreiben, wenn es mehr als 1 Eintrag mit IsAccessoire == false gibt
17684
17701
  if (nDoShowSVGsinElementlist > 1) {
@@ -17746,13 +17763,17 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
17746
17763
  metaData: catalogArticle.metaDataView,
17747
17764
  contentItemId: catalogArticle.contentItemId,
17748
17765
  groupContentItemId: catalogArticle.groupContentItemId,
17749
- partlistcodexes: catalogArticle.possiblePartlistCodexes
17766
+ partlistcodexes: catalogArticle.possiblePartlistCodexes,
17767
+ accessoires: (_catalogArticle$artic = catalogArticle.articleRelations) === null || _catalogArticle$artic === void 0 ? void 0 : _catalogArticle$artic.map(function (relation) {
17768
+ return relation.articleCodex;
17769
+ })
17750
17770
  };
17751
17771
  plannerPaletteViewInfo.catalogPlannerArticles.push(catPlanArtView);
17752
17772
  }
17753
17773
  }
17754
17774
  }
17755
17775
  if (!catPlanArticle.hasTopSvgsWithFormula || catPlanArticle.topSvgsWithFormula.length == 1) {
17776
+ var _catalogArticle$artic2;
17756
17777
  var _filterType = getFilterType(catPlanArticle.isArticleRelation, catPlanArticle.topHasAVL ? catPlanArticle.avlFilter : [], catPlanArticle.topHasAVR ? catPlanArticle.avrFilter : [], catalogProps);
17757
17778
  catPlanArticle.filterType = _filterType;
17758
17779
  //Artikelbild ist abh�ngig von DIVA3DPlanerShowArticleAsSvg das SVG des Elements
@@ -17807,7 +17828,10 @@ function initCatalogPlannerArticleView$1(catalogData, catPlanArticle, catalogPro
17807
17828
  metaData: catalogArticle.metaDataView,
17808
17829
  contentItemId: catalogArticle.contentItemId,
17809
17830
  groupContentItemId: catalogArticle.groupContentItemId,
17810
- partlistcodexes: catalogArticle.possiblePartlistCodexes
17831
+ partlistcodexes: catalogArticle.possiblePartlistCodexes,
17832
+ accessoires: (_catalogArticle$artic2 = catalogArticle.articleRelations) === null || _catalogArticle$artic2 === void 0 ? void 0 : _catalogArticle$artic2.map(function (relation) {
17833
+ return relation.articleCodex;
17834
+ })
17811
17835
  };
17812
17836
  //nicht ausmultiplizierte Elemente
17813
17837
  plannerPaletteViewInfo.catalogPlannerArticles.push(_catPlanArtView);
@@ -18366,13 +18390,19 @@ var ArticleOptionData = /*#__PURE__*/function () {
18366
18390
  }, {
18367
18391
  key: "hasImages",
18368
18392
  get: function get() {
18369
- var _this$opt$articleOpti, _this$opt$articleOpti2;
18370
- return ((_this$opt$articleOpti = (_this$opt$articleOpti2 = this.opt.articleOptionValues) === null || _this$opt$articleOpti2 === void 0 ? void 0 : _this$opt$articleOpti2.values()) !== null && _this$opt$articleOpti !== void 0 ? _this$opt$articleOpti : []).some(function (v) {
18371
- var _v$articleOptionValue;
18372
- return (_v$articleOptionValue = v.articleOptionValues) === null || _v$articleOptionValue === void 0 ? void 0 : _v$articleOptionValue.values().some(function (v2) {
18373
- return v2.image || v2.hexColor;
18374
- });
18375
- });
18393
+ if (this.opt.hasImages === undefined) {
18394
+ var _this$opt$articleOpti, _this$opt$articleOpti2;
18395
+ var opvs = Array.from((_this$opt$articleOpti = (_this$opt$articleOpti2 = this.opt.articleOptionValues) === null || _this$opt$articleOpti2 === void 0 ? void 0 : _this$opt$articleOpti2.values()) !== null && _this$opt$articleOpti !== void 0 ? _this$opt$articleOpti : []);
18396
+ if (opvs.length > 0) {
18397
+ this.opt.hasImages = opvs.some(function (v) {
18398
+ var _v$articleOptionValue;
18399
+ return v.image || v.hexColor || ((_v$articleOptionValue = v.articleOptionValues) === null || _v$articleOptionValue === void 0 ? void 0 : _v$articleOptionValue.values().some(function (v2) {
18400
+ return v2.image || v2.hexColor;
18401
+ }));
18402
+ });
18403
+ }
18404
+ }
18405
+ return this.opt.hasImages;
18376
18406
  }
18377
18407
  }, {
18378
18408
  key: "parentOptionCodex",
@@ -18556,6 +18586,16 @@ var ArticleOptionData = /*#__PURE__*/function () {
18556
18586
  get: function get() {
18557
18587
  return this.opt.catalogOPT.measureKey;
18558
18588
  }
18589
+ }, {
18590
+ key: "ignoreGroups",
18591
+ get: function get() {
18592
+ return this.opt.catalogOPT.ignoreGroups;
18593
+ }
18594
+ }, {
18595
+ key: "ignorePgrGroupPosition",
18596
+ get: function get() {
18597
+ return this.opt.catalogOPT.ignorePgrGroupPosition;
18598
+ }
18559
18599
  }]);
18560
18600
  }();
18561
18601
 
@@ -18914,7 +18954,6 @@ function getArticleOptionType(myOPT, set) {
18914
18954
  sendToSAP: myOPT.SendToSAP && myOPT.SendToSAP != '-1' ? myOPT.SendToSAP : undefined,
18915
18955
  articlePlaceholder: myOPT.ArticlePlaceholder,
18916
18956
  hasOPG: optHasOpg,
18917
- hasImages: false,
18918
18957
  invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : myOPT.Invisible == 'True' ? true : myOPT.Invisible == 'False' ? false : undefined,
18919
18958
  parentOptionCodex: myOPT.ParentOptionCodex
18920
18959
  };
@@ -19929,7 +19968,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
19929
19968
  // Start article that is loaded after starting the planner. used for boxplanner
19930
19969
  accessorieStepAsPlanner: false,
19931
19970
  // the accessorie step has all the planner capabilities
19932
- planner2Dot0: false,
19971
+ planner2Dot0: true,
19933
19972
  // the planner is a planner 2.0
19934
19973
  dontSaveAlternativeRenderings: false,
19935
19974
  // alternative Rendering dont get saved and added to basket and pdf
@@ -28273,7 +28312,7 @@ var DivaArticle = /*#__PURE__*/function () {
28273
28312
  break;
28274
28313
  }
28275
28314
  _context.next = 4;
28276
- return Promise.resolve().then(function () { return require('./ShelfPlanner-b81aaa3b.js'); });
28315
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-f84fca39.js'); });
28277
28316
  case 4:
28278
28317
  _yield$import = _context.sent;
28279
28318
  ShelfPlanner = _yield$import["default"];
@@ -32774,7 +32813,7 @@ var DivaSet = /*#__PURE__*/function () {
32774
32813
  break;
32775
32814
  }
32776
32815
  _context5.next = 3;
32777
- return Promise.resolve().then(function () { return require('./DoorPlanner-7d363e3b.js'); });
32816
+ return Promise.resolve().then(function () { return require('./DoorPlanner-11b462aa.js'); });
32778
32817
  case 3:
32779
32818
  _yield$import = _context5.sent;
32780
32819
  DoorPlanner = _yield$import["default"];
@@ -32988,178 +33027,172 @@ var SummaryHandler = /*#__PURE__*/function () {
32988
33027
  return _createClass__default["default"](SummaryHandler, [{
32989
33028
  key: "buildSummaryItems",
32990
33029
  value: function buildSummaryItems(articlesPosNrs, set) {
32991
- var articles = set.getDivaArticles(true);
33030
+ var articles = Object.values(set.getDivaArticles(true)).filter(function (a) {
33031
+ return !a.relatedToBasketId || a.isPartListArticle;
33032
+ });
33033
+ var baseArticlesCount = Object.values(set.getDivaArticles()).filter(function (a) {
33034
+ return !a.relatedToBasketId;
33035
+ }).length;
32992
33036
  var summaryTabItems = {};
32993
- var catalog = set.CatalogData;
32994
- if (!set.showAccessioreOnLastTab) {
32995
- this.addAccessoires(articles, summaryTabItems, set, articlesPosNrs);
33037
+ var _iterator = _createForOfIteratorHelper$3(articles),
33038
+ _step;
33039
+ try {
33040
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
33041
+ var article = _step.value;
33042
+ this.getSummaryItemsofArticle(article, set, summaryTabItems, baseArticlesCount);
33043
+ }
33044
+ } catch (err) {
33045
+ _iterator.e(err);
33046
+ } finally {
33047
+ _iterator.f();
32996
33048
  }
32997
- for (var basketId in articles) {
32998
- //add config Steps
32999
- var article = articles[basketId];
33000
- var _iterator = _createForOfIteratorHelper$3(article.articleOptionStates.values()),
33001
- _step;
33002
- try {
33003
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
33004
- var ops = _step.value;
33005
- if (ops.visibleInSummary(article)) {
33006
- var tabGroupCodex = void 0;
33007
- var tabGroupTitel = void 0;
33008
- if (ops.optionTabGroup) {
33009
- tabGroupCodex = ops === null || ops === void 0 ? void 0 : ops.optionTabGroup;
33010
- } else {
33011
- tabGroupCodex = ops.optionName;
33012
- }
33013
- tabGroupTitel = tabGroupCodex;
33014
- tabGroupCodex = tabGroupCodex.replace(/[^\w\s]/gi, '');
33015
- if (!summaryTabItems[tabGroupCodex]) {
33016
- summaryTabItems[tabGroupCodex] = this.newTabGroupSummaryItem(tabGroupTitel, set.getSetId());
33017
- }
33018
- var configStep = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, ops.optionCodex);
33019
- var itemsInTabGroup = summaryTabItems[tabGroupCodex].summaryItems;
33020
- var itemImage = ops.val.image ? catalog.getCatImageURL(ops.val.image, '') : undefined;
33021
- if (configStep && itemsInTabGroup) {
33022
- var _ops$val, _this$getAdditionalPr;
33023
- var sameOPVAndOPTDoAlreadyExist = false;
33024
- var configStepKeyToUse = configStep.key + ((_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex);
33025
- var posNr = configStep === null || configStep === void 0 ? void 0 : configStep.posNr;
33026
- if (configStep !== null && configStep !== void 0 && configStep.accessoireArticleCodex && article.relatedToBasketId) {
33027
- var _set$configTree$getCo;
33028
- posNr = (_set$configTree$getCo = set.configTree.getConfigStepBasketIdAndOptionCodex(article.relatedToBasketId, 'ACC')) === null || _set$configTree$getCo === void 0 ? void 0 : _set$configTree$getCo.posNr;
33029
- }
33030
- //inhalt könnte der selbe sein aber getrennt konfiguriert worden in diesem Fall trotzdem zusammenfassen
33031
- if (!itemsInTabGroup[configStep.key]) {
33032
- for (var _key in itemsInTabGroup) {
33033
- if (itemsInTabGroup[_key].description == ops.name && itemsInTabGroup[_key].image == itemImage && itemsInTabGroup[_key].title == ops.option.name) {
33034
- sameOPVAndOPTDoAlreadyExist = true;
33035
- configStepKeyToUse = _key;
33036
- }
33049
+ this.addAccessoires(articles, summaryTabItems, set, articlesPosNrs, baseArticlesCount);
33050
+ return summaryTabItems;
33051
+ }
33052
+ }, {
33053
+ key: "getSummaryItemsofArticle",
33054
+ value: function getSummaryItemsofArticle(article, set, summaryTabItems, baseArticlesCount) {
33055
+ var _iterator2 = _createForOfIteratorHelper$3(article.articleOptionStates.values()),
33056
+ _step2;
33057
+ try {
33058
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
33059
+ var ops = _step2.value;
33060
+ if (ops.visibleInSummary(article)) {
33061
+ var tabGroupCodex = void 0;
33062
+ var tabGroupTitel = void 0;
33063
+ if (ops.optionTabGroup) {
33064
+ tabGroupCodex = ops === null || ops === void 0 ? void 0 : ops.optionTabGroup;
33065
+ } else {
33066
+ tabGroupCodex = ops.optionName;
33067
+ }
33068
+ tabGroupTitel = tabGroupCodex;
33069
+ tabGroupCodex = tabGroupCodex.replace(/[^\w\s]/gi, '');
33070
+ if (!summaryTabItems[tabGroupCodex]) {
33071
+ summaryTabItems[tabGroupCodex] = this.newTabGroupSummaryItem(tabGroupTitel, set.getSetId());
33072
+ }
33073
+ var configStep = set.configTree.getConfigStepBasketIdAndOptionCodex(article.basketId, ops.optionCodex);
33074
+ var itemsInTabGroup = summaryTabItems[tabGroupCodex].summaryItems;
33075
+ var itemImage = ops.val.image ? set.CatalogData.getCatImageURL(ops.val.image, '') : undefined;
33076
+ if (configStep && itemsInTabGroup) {
33077
+ var _ops$val, _this$getAdditionalPr;
33078
+ var sameOPVAndOPTDoAlreadyExist = false;
33079
+ var configStepKeyToUse = configStep.key + ((_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex);
33080
+ var posNr = configStep === null || configStep === void 0 ? void 0 : configStep.posNr;
33081
+ if (configStep !== null && configStep !== void 0 && configStep.accessoireArticleCodex && article.relatedToBasketId) {
33082
+ var _set$configTree$getCo;
33083
+ posNr = (_set$configTree$getCo = set.configTree.getConfigStepBasketIdAndOptionCodex(article.relatedToBasketId, 'ACC')) === null || _set$configTree$getCo === void 0 ? void 0 : _set$configTree$getCo.posNr;
33084
+ }
33085
+ //inhalt könnte der selbe sein aber getrennt konfiguriert worden in diesem Fall trotzdem zusammenfassen
33086
+ if (!itemsInTabGroup[configStep.key]) {
33087
+ for (var _key in itemsInTabGroup) {
33088
+ if (itemsInTabGroup[_key].description == ops.name && itemsInTabGroup[_key].image == itemImage && itemsInTabGroup[_key].title == ops.option.name) {
33089
+ sameOPVAndOPTDoAlreadyExist = true;
33090
+ configStepKeyToUse = _key;
33037
33091
  }
33038
- } else {
33039
- sameOPVAndOPTDoAlreadyExist = true;
33040
33092
  }
33041
- var bruttoPrice = (ops.price !== 0 ? ops.price : (_this$getAdditionalPr = this.getAdditionalPriceOfOption(article, ops.optionCodex)) !== null && _this$getAdditionalPr !== void 0 ? _this$getAdditionalPr : 0) * ops.quantity;
33042
- var rabatt = set.getCurrentDisountPercentage();
33043
- var price = rabatt ? DivaUtils__default["default"].roundPrice(bruttoPrice * ((100 - rabatt) / 100), 1, 2) : bruttoPrice;
33044
- if (!sameOPVAndOPTDoAlreadyExist) {
33045
- itemsInTabGroup[configStepKeyToUse] = {
33046
- title: ops.optionName,
33047
- title_locales: ops.optionName_locales,
33048
- tabgroupName: tabGroupTitel,
33049
- description: ops.name,
33050
- description_locales: ops.valName_locales,
33051
- posNr: posNr,
33052
- price: price,
33053
- targetArticlePosNrs: [articlesPosNrs[basketId]],
33054
- targetBasketIds: [basketId],
33055
- image: itemImage,
33056
- isDefined: ops.isDefined,
33057
- setId: set.getSetId()
33058
- };
33093
+ } else {
33094
+ sameOPVAndOPTDoAlreadyExist = true;
33095
+ }
33096
+ var bruttoPrice = (ops.price !== 0 ? ops.price : (_this$getAdditionalPr = this.getAdditionalPriceOfOption(article, ops.optionCodex)) !== null && _this$getAdditionalPr !== void 0 ? _this$getAdditionalPr : 0) * ops.quantity;
33097
+ var rabatt = set.getCurrentDisountPercentage();
33098
+ var price = rabatt ? DivaUtils__default["default"].roundPrice(bruttoPrice * ((100 - rabatt) / 100), 1, 2) : bruttoPrice;
33099
+ if (!sameOPVAndOPTDoAlreadyExist) {
33100
+ var _ops$val$contentItemI, _ops$val2, _ops$val3;
33101
+ itemsInTabGroup[configStepKeyToUse] = {
33102
+ title: ops.optionName,
33103
+ title_locales: ops.optionName_locales,
33104
+ tabgroupName: tabGroupTitel,
33105
+ description: ops.name,
33106
+ description_locales: ops.valName_locales,
33107
+ posNr: posNr,
33108
+ price: price,
33109
+ targetArticlePosNrs: [article.posNr],
33110
+ targetBasketIds: [article.basketId],
33111
+ image: itemImage,
33112
+ isDefined: ops.isDefined,
33113
+ setId: set.getSetId(),
33114
+ contentItemId: (_ops$val$contentItemI = (_ops$val2 = ops.val) === null || _ops$val2 === void 0 ? void 0 : _ops$val2.contentItemId) !== null && _ops$val$contentItemI !== void 0 ? _ops$val$contentItemI : (_ops$val3 = ops.val) === null || _ops$val3 === void 0 ? void 0 : _ops$val3.groupContentItemId,
33115
+ optionContentItemId: ops.option.contentItemId,
33116
+ includesAllPosNrs: baseArticlesCount <= 1
33117
+ };
33118
+ } else {
33119
+ var _summaryItem$targetAr, _summaryItem$targetAr2, _summaryItem$targetAr3;
33120
+ var summaryItem = itemsInTabGroup[configStepKeyToUse];
33121
+ if (summaryItem.price == undefined) {
33122
+ summaryItem.price = price;
33059
33123
  } else {
33060
- var _summaryItem$targetAr;
33061
- var summaryItem = itemsInTabGroup[configStepKeyToUse];
33062
- if (summaryItem.price == undefined) {
33063
- summaryItem.price = price;
33064
- } else {
33065
- summaryItem.price = summaryItem.price + price * ops.quantity;
33066
- }
33067
- (_summaryItem$targetAr = summaryItem.targetArticlePosNrs) === null || _summaryItem$targetAr === void 0 || _summaryItem$targetAr.push(articlesPosNrs[basketId]);
33068
- summaryItem.targetBasketIds.push(basketId);
33124
+ summaryItem.price = summaryItem.price + price * ops.quantity;
33125
+ }
33126
+ (_summaryItem$targetAr = summaryItem.targetArticlePosNrs) === null || _summaryItem$targetAr === void 0 || _summaryItem$targetAr.push(article.posNr);
33127
+ if (((_summaryItem$targetAr2 = (_summaryItem$targetAr3 = summaryItem.targetArticlePosNrs) === null || _summaryItem$targetAr3 === void 0 ? void 0 : _summaryItem$targetAr3.length) !== null && _summaryItem$targetAr2 !== void 0 ? _summaryItem$targetAr2 : 0) >= baseArticlesCount) {
33128
+ summaryItem.includesAllPosNrs = true;
33069
33129
  }
33130
+ summaryItem.targetBasketIds.push(article.basketId);
33070
33131
  }
33071
33132
  }
33072
33133
  }
33073
- } catch (err) {
33074
- _iterator.e(err);
33075
- } finally {
33076
- _iterator.f();
33077
33134
  }
33135
+ } catch (err) {
33136
+ _iterator2.e(err);
33137
+ } finally {
33138
+ _iterator2.f();
33078
33139
  }
33079
- if (set.showAccessioreOnLastTab) {
33080
- this.addAccessoires(articles, summaryTabItems, set, articlesPosNrs);
33081
- }
33082
- return summaryTabItems;
33083
33140
  }
33084
33141
  }, {
33085
33142
  key: "addAccessoires",
33086
- value: function addAccessoires(articles, summaryTabItems, set, articlesPosNrs) {
33087
- for (var basketId in articles) {
33088
- //add accessoires
33089
- var article = articles[basketId];
33090
- article.accessoires;
33091
- for (var _key2 in article.accessoires) {
33092
- var _ref, _ref2, _set$configTree$getCo2, _set$configTree$getCo3, _set$configTree$getCo4, _set$configTree$getCo5, _accessoire$accessoir, _accessoire$accessoir2, _accessoire$relatedTo, _set$configTree$getCo6;
33093
- var accessoire = article.accessoires[_key2];
33094
- var entryKey = basketId + accessoire.articleCodex;
33095
- if (!summaryTabItems['ZUSATZARTIKEL']) {
33096
- var _set$i18n$t, _set$i18n;
33097
- summaryTabItems['ZUSATZARTIKEL'] = this.newTabGroupSummaryItem((_set$i18n$t = (_set$i18n = set.i18n) === null || _set$i18n === void 0 ? void 0 : _set$i18n.t('configurator.ZUSATZARTIKEL', 'ZUSATZARTIKEL')) !== null && _set$i18n$t !== void 0 ? _set$i18n$t : 'ZUSATZARTIKEL', set.getSetId());
33098
- }
33099
- var tabGroup = summaryTabItems['ZUSATZARTIKEL'];
33100
- var posNr = (_ref = (_ref2 = (_set$configTree$getCo2 = (_set$configTree$getCo3 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'ACC')) === null || _set$configTree$getCo3 === void 0 ? void 0 : _set$configTree$getCo3.posNr) !== null && _set$configTree$getCo2 !== void 0 ? _set$configTree$getCo2 : (_set$configTree$getCo4 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'SHELFARTICLE_' + basketId + '_' + accessoire.relatedToShelfGrid)) === null || _set$configTree$getCo4 === void 0 ? void 0 : _set$configTree$getCo4.posNr) !== null && _ref2 !== void 0 ? _ref2 : (_set$configTree$getCo5 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, (_accessoire$accessoir = (_accessoire$accessoir2 = accessoire.accessoireParentArticle) === null || _accessoire$accessoir2 === void 0 || (_accessoire$accessoir2 = _accessoire$accessoir2.shelfPlanner) === null || _accessoire$accessoir2 === void 0 || (_accessoire$accessoir2 = _accessoire$accessoir2.getGridByIndex((_accessoire$relatedTo = accessoire.relatedToShelfGrid) !== null && _accessoire$relatedTo !== void 0 ? _accessoire$relatedTo : -1)) === null || _accessoire$accessoir2 === void 0 ? void 0 : _accessoire$accessoir2.gridGroup) !== null && _accessoire$accessoir !== void 0 ? _accessoire$accessoir : '')) === null || _set$configTree$getCo5 === void 0 ? void 0 : _set$configTree$getCo5.posNr) !== null && _ref !== void 0 ? _ref : (_set$configTree$getCo6 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'PLANNER')) === null || _set$configTree$getCo6 === void 0 ? void 0 : _set$configTree$getCo6.posNr;
33101
- if (tabGroup.summaryItems && posNr) {
33102
- if (tabGroup.summaryItems[entryKey]) {
33103
- tabGroup.summaryItems[entryKey].quantity += article.quantity;
33104
- tabGroup.summaryItems[entryKey].price += accessoire.calcPrice();
33105
- } else {
33106
- var _set$i18n$t2, _set$i18n2;
33107
- tabGroup.summaryItems[entryKey] = {
33108
- title: accessoire.name,
33109
- tabgroupName: (_set$i18n$t2 = (_set$i18n2 = set.i18n) === null || _set$i18n2 === void 0 ? void 0 : _set$i18n2.t('configurator.ZUSATZARTIKEL', 'ZUSATZARTIKEL')) !== null && _set$i18n$t2 !== void 0 ? _set$i18n$t2 : 'ZUSATZARTIKEL',
33110
- description: accessoire.actSizeText,
33111
- posNr: posNr,
33112
- price: accessoire.calcPrice(),
33113
- quantity: accessoire.quantity,
33114
- targetArticlePosNrs: [articlesPosNrs[basketId]],
33115
- targetBasketIds: [basketId],
33116
- image: accessoire.imageUrl ? accessoire.CatalogData.getCatImageURL(accessoire.imageUrl, '') : undefined,
33117
- isDefined: true,
33118
- setId: set.getSetId()
33119
- };
33143
+ value: function addAccessoires(articles, summaryTabItems, set, articlesPosNrs, baseArticlesCount) {
33144
+ var _iterator3 = _createForOfIteratorHelper$3(articles),
33145
+ _step3;
33146
+ try {
33147
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
33148
+ var article = _step3.value;
33149
+ var basketId = article.basketId;
33150
+ //add accessoires
33151
+ for (var _key2 in article.accessoires) {
33152
+ var _ref, _ref2, _set$configTree$getCo2, _set$configTree$getCo3, _set$configTree$getCo4, _set$configTree$getCo5, _accessoire$accessoir, _accessoire$accessoir2, _accessoire$relatedTo, _set$configTree$getCo6;
33153
+ var accessoire = article.accessoires[_key2];
33154
+ var entryKey = basketId + accessoire.articleCodex + accessoire.articleHash;
33155
+ if (!summaryTabItems['ZUSATZARTIKEL']) {
33156
+ var _set$i18n$t, _set$i18n;
33157
+ summaryTabItems['ZUSATZARTIKEL'] = this.newTabGroupSummaryItem((_set$i18n$t = (_set$i18n = set.i18n) === null || _set$i18n === void 0 ? void 0 : _set$i18n.t('configurator.ZUSATZARTIKEL', 'ZUSATZARTIKEL')) !== null && _set$i18n$t !== void 0 ? _set$i18n$t : 'ZUSATZARTIKEL', set.getSetId());
33158
+ }
33159
+ var tabGroup = summaryTabItems['ZUSATZARTIKEL'];
33160
+ var posNr = (_ref = (_ref2 = (_set$configTree$getCo2 = (_set$configTree$getCo3 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'ACC')) === null || _set$configTree$getCo3 === void 0 ? void 0 : _set$configTree$getCo3.posNr) !== null && _set$configTree$getCo2 !== void 0 ? _set$configTree$getCo2 : (_set$configTree$getCo4 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'SHELFARTICLE_' + basketId + '_' + accessoire.relatedToShelfGrid)) === null || _set$configTree$getCo4 === void 0 ? void 0 : _set$configTree$getCo4.posNr) !== null && _ref2 !== void 0 ? _ref2 : (_set$configTree$getCo5 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, (_accessoire$accessoir = (_accessoire$accessoir2 = accessoire.accessoireParentArticle) === null || _accessoire$accessoir2 === void 0 || (_accessoire$accessoir2 = _accessoire$accessoir2.shelfPlanner) === null || _accessoire$accessoir2 === void 0 || (_accessoire$accessoir2 = _accessoire$accessoir2.getGridByIndex((_accessoire$relatedTo = accessoire.relatedToShelfGrid) !== null && _accessoire$relatedTo !== void 0 ? _accessoire$relatedTo : -1)) === null || _accessoire$accessoir2 === void 0 ? void 0 : _accessoire$accessoir2.gridGroup) !== null && _accessoire$accessoir !== void 0 ? _accessoire$accessoir : '')) === null || _set$configTree$getCo5 === void 0 ? void 0 : _set$configTree$getCo5.posNr) !== null && _ref !== void 0 ? _ref : (_set$configTree$getCo6 = set.configTree.getConfigStepBasketIdAndOptionCodex(basketId, 'PLANNER')) === null || _set$configTree$getCo6 === void 0 ? void 0 : _set$configTree$getCo6.posNr;
33161
+ if (tabGroup.summaryItems && posNr) {
33162
+ if (tabGroup.summaryItems[entryKey]) {
33163
+ tabGroup.summaryItems[entryKey].quantity += article.quantity;
33164
+ tabGroup.summaryItems[entryKey].price += accessoire.calcPrice();
33165
+ } else {
33166
+ var _set$i18n$t2, _set$i18n2, _accessoire$catalogAr, _accessoire$catalogAr2, _accessoire$catalogAr3;
33167
+ var summaryItems = {};
33168
+ this.getSummaryItemsofArticle(accessoire, set, summaryItems, 0);
33169
+ this.addAccessoires([accessoire], summaryItems, set, articlesPosNrs, baseArticlesCount);
33170
+ tabGroup.summaryItems[entryKey] = {
33171
+ title: accessoire.name,
33172
+ tabgroupName: (_set$i18n$t2 = (_set$i18n2 = set.i18n) === null || _set$i18n2 === void 0 ? void 0 : _set$i18n2.t('configurator.ZUSATZARTIKEL', 'ZUSATZARTIKEL')) !== null && _set$i18n$t2 !== void 0 ? _set$i18n$t2 : 'ZUSATZARTIKEL',
33173
+ description: accessoire.actSizeText,
33174
+ posNr: posNr,
33175
+ price: accessoire.calcPrice(),
33176
+ quantity: accessoire.quantity,
33177
+ targetArticlePosNrs: [articlesPosNrs[basketId]],
33178
+ targetBasketIds: [basketId],
33179
+ image: accessoire.imageUrl ? accessoire.CatalogData.getCatImageURL(accessoire.imageUrl, '') : undefined,
33180
+ isDefined: true,
33181
+ setId: set.getSetId(),
33182
+ contentItemId: (_accessoire$catalogAr = (_accessoire$catalogAr2 = accessoire.catalogArticle) === null || _accessoire$catalogAr2 === void 0 ? void 0 : _accessoire$catalogAr2.contentItemId) !== null && _accessoire$catalogAr !== void 0 ? _accessoire$catalogAr : (_accessoire$catalogAr3 = accessoire.catalogArticle) === null || _accessoire$catalogAr3 === void 0 ? void 0 : _accessoire$catalogAr3.groupContentItemId,
33183
+ includesAllPosNrs: baseArticlesCount == 1,
33184
+ summaryItems: summaryItems
33185
+ };
33186
+ }
33120
33187
  }
33121
33188
  }
33122
33189
  }
33190
+ } catch (err) {
33191
+ _iterator3.e(err);
33192
+ } finally {
33193
+ _iterator3.f();
33123
33194
  }
33124
33195
  }
33125
- }, {
33126
- key: "buildSummaryItemsOfPartlist",
33127
- value: function buildSummaryItemsOfPartlist(set) {
33128
- var partlistArticles = set.getPartlistArticlesOfSet();
33129
- var catalogData = set.CatalogData;
33130
- var ret = {};
33131
- for (var _key3 in partlistArticles) {
33132
- var article = partlistArticles[_key3];
33133
- var foundBasketId = undefined;
33134
- for (var jKey in ret) {
33135
- if (ret[jKey].description == article.articleCodex) {
33136
- foundBasketId = jKey;
33137
- break;
33138
- }
33139
- }
33140
- if (!foundBasketId) {
33141
- ret[article.basketId] = {
33142
- title: article.name,
33143
- description: article.articleCodex,
33144
- targetArticlePosNrs: [article.quantity],
33145
- targetBasketIds: [article.basketId],
33146
- price: article.calcPrice(),
33147
- image: article.image ? catalogData.getCatImageURL(article.image, '') : undefined,
33148
- posNr: article.quantity,
33149
- quantity: article.quantity,
33150
- isDefined: true,
33151
- setId: set.getSetId()
33152
- };
33153
- } else {
33154
- var _ret$foundBasketId$qu, _ret$foundBasketId$pr;
33155
- ret[foundBasketId].quantity = ((_ret$foundBasketId$qu = ret[foundBasketId].quantity) !== null && _ret$foundBasketId$qu !== void 0 ? _ret$foundBasketId$qu : 0) + article.quantity;
33156
- ret[foundBasketId].price = ((_ret$foundBasketId$pr = ret[foundBasketId].price) !== null && _ret$foundBasketId$pr !== void 0 ? _ret$foundBasketId$pr : 0) + article.price;
33157
- ret[foundBasketId].posNr = ret[foundBasketId].posNr + article.quantity;
33158
- ret[foundBasketId].targetArticlePosNrs[0] = ret[foundBasketId].targetArticlePosNrs[0] + article.quantity;
33159
- }
33160
- }
33161
- return ret;
33162
- }
33163
33196
 
33164
33197
  /**Lück specific summary */
33165
33198
  }, {
@@ -33298,8 +33331,8 @@ var SummaryHandler = /*#__PURE__*/function () {
33298
33331
  delete summaryTabItems[p];
33299
33332
  }
33300
33333
  }
33301
- for (var _key4 in summaryTabItems) {
33302
- summaryTabItemsSorted[_key4] = summaryTabItems[_key4];
33334
+ for (var _key3 in summaryTabItems) {
33335
+ summaryTabItemsSorted[_key3] = summaryTabItems[_key3];
33303
33336
  }
33304
33337
  } else {
33305
33338
  summaryTabItemsSorted = summaryTabItems;
@@ -33327,7 +33360,7 @@ var SummaryHandler = /*#__PURE__*/function () {
33327
33360
  key: "getSummaryItems",
33328
33361
  value: function () {
33329
33362
  var _getSummaryItems = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(sets, doConfigure) {
33330
- var ret, _key5, set, items, type;
33363
+ var ret, _key4, set, type;
33331
33364
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
33332
33365
  while (1) switch (_context.prev = _context.next) {
33333
33366
  case 0:
@@ -33335,46 +33368,35 @@ var SummaryHandler = /*#__PURE__*/function () {
33335
33368
  _context.t0 = _regeneratorRuntime__default["default"].keys(sets);
33336
33369
  case 2:
33337
33370
  if ((_context.t1 = _context.t0()).done) {
33338
- _context.next = 25;
33371
+ _context.next = 21;
33339
33372
  break;
33340
33373
  }
33341
- _key5 = _context.t1.value;
33342
- set = sets[_key5];
33343
- items = void 0;
33374
+ _key4 = _context.t1.value;
33375
+ set = sets[_key4];
33344
33376
  type = this.getSummaryType(set);
33345
33377
  _context.t2 = type;
33346
- _context.next = _context.t2 === 'SUMMARY_PARTLIST' ? 10 : _context.t2 === 'SUMMARY_OPTIONTREE' ? 13 : _context.t2 === 'VARIANTS' ? 15 : _context.t2 === 'PARTLIST_AND_SPECIALOPTIONS' ? 21 : 23;
33378
+ _context.next = _context.t2 === 'SUMMARY_OPTIONTREE' ? 9 : _context.t2 === 'VARIANTS' ? 11 : _context.t2 === 'PARTLIST_AND_SPECIALOPTIONS' ? 17 : 19;
33347
33379
  break;
33348
- case 10:
33349
- items = this.buildSummaryItemsOfPartlist(set);
33350
- ret.push({
33351
- items: items,
33352
- type: type,
33353
- name: set.CatalogData.catalogName,
33354
- price: set.getSetPrice(),
33355
- quantity: 1
33356
- });
33357
- return _context.abrupt("break", 23);
33358
- case 13:
33380
+ case 9:
33359
33381
  ret = ret.concat(this.getOptionTreeSummary(set));
33360
- return _context.abrupt("break", 23);
33361
- case 15:
33382
+ return _context.abrupt("break", 19);
33383
+ case 11:
33362
33384
  _context.t3 = ret;
33363
- _context.next = 18;
33385
+ _context.next = 14;
33364
33386
  return this.getVariantsSummary(doConfigure, set);
33365
- case 18:
33387
+ case 14:
33366
33388
  _context.t4 = _context.sent;
33367
33389
  _context.t3.push.call(_context.t3, _context.t4);
33368
- return _context.abrupt("break", 23);
33369
- case 21:
33390
+ return _context.abrupt("break", 19);
33391
+ case 17:
33370
33392
  ret.push(this.buildSummaryItemsOfPartlistWithSpecialOptions(set));
33371
- return _context.abrupt("break", 23);
33372
- case 23:
33393
+ return _context.abrupt("break", 19);
33394
+ case 19:
33373
33395
  _context.next = 2;
33374
33396
  break;
33375
- case 25:
33397
+ case 21:
33376
33398
  return _context.abrupt("return", ret);
33377
- case 26:
33399
+ case 22:
33378
33400
  case "end":
33379
33401
  return _context.stop();
33380
33402
  }
@@ -33393,17 +33415,17 @@ var SummaryHandler = /*#__PURE__*/function () {
33393
33415
  if (Object.keys((_summaryItems$0$items = (_summaryItems$ = summaryItems[0]) === null || _summaryItems$ === void 0 ? void 0 : _summaryItems$.items) !== null && _summaryItems$0$items !== void 0 ? _summaryItems$0$items : {}).length === 0) {
33394
33416
  var articles = Object.values(set.getDivaArticles());
33395
33417
  var ret = [];
33396
- var _loop = function _loop(_key6) {
33418
+ var _loop = function _loop(_key5) {
33397
33419
  var _articles$find;
33398
33420
  var ops = (_articles$find = articles.find(function (a) {
33399
- return a.getArticleOptionState(_key6);
33400
- })) === null || _articles$find === void 0 ? void 0 : _articles$find.getArticleOptionState(_key6);
33421
+ return a.getArticleOptionState(_key5);
33422
+ })) === null || _articles$find === void 0 ? void 0 : _articles$find.getArticleOptionState(_key5);
33401
33423
  if (ops && !(ops !== null && ops !== void 0 && ops.isDoShow)) {
33402
33424
  ret.push(ops.name);
33403
33425
  }
33404
33426
  };
33405
- for (var _key6 in set.favorites.VariantValues) {
33406
- _loop(_key6);
33427
+ for (var _key5 in set.favorites.VariantValues) {
33428
+ _loop(_key5);
33407
33429
  }
33408
33430
  return ret.length ? ret.join('<br/>') : 'ERROR';
33409
33431
  }
@@ -33417,8 +33439,8 @@ var SummaryHandler = /*#__PURE__*/function () {
33417
33439
  var summaryObject = (_this$getOptionTreeSu = this.getOptionTreeSummary(set)[0]) === null || _this$getOptionTreeSu === void 0 ? void 0 : _this$getOptionTreeSu.items;
33418
33440
  var SummaryInfo = [];
33419
33441
  var counter = 0;
33420
- for (var _key7 in summaryObject) {
33421
- var mySummaryObejct = summaryObject[_key7];
33442
+ for (var _key6 in summaryObject) {
33443
+ var mySummaryObejct = summaryObject[_key6];
33422
33444
  if (mySummaryObejct.isTabGroup) {
33423
33445
  var GroupDataInitParams = {
33424
33446
  SetID: set.getSetId(),
@@ -33444,12 +33466,10 @@ var SummaryHandler = /*#__PURE__*/function () {
33444
33466
  value: function getSummaryType(set) {
33445
33467
  var _set$ViewConfig;
33446
33468
  var summaryType = 'SUMMARY_OPTIONTREE';
33447
- var plannerType = set.getPlannerEdition();
33469
+ set.getPlannerEdition();
33448
33470
  var viewConfigSummaryType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.LoadSummaryType;
33449
33471
  if (favoritesHandlerInstance.FavoritesDefined(set)) {
33450
33472
  summaryType = 'VARIANTS';
33451
- } else if (plannerType === 'BOX') {
33452
- summaryType = 'SUMMARY_PARTLIST';
33453
33473
  } else if (set.doAllowSetPlanner) {
33454
33474
  summaryType = 'SUMMARY_ARTICLES';
33455
33475
  } else if (viewConfigSummaryType) {
@@ -33472,8 +33492,8 @@ var SummaryHandler = /*#__PURE__*/function () {
33472
33492
  }
33473
33493
  };
33474
33494
  }
33475
- for (var _key8 in elementGroups) {
33476
- var group = elementGroups[_key8];
33495
+ for (var _key7 in elementGroups) {
33496
+ var group = elementGroups[_key7];
33477
33497
  ret.push({
33478
33498
  items: this.buildSummaryItems(this.getArticlesPosNr(group.articles), set),
33479
33499
  price: this.getArticlesPrice(group.articles),
@@ -33488,11 +33508,11 @@ var SummaryHandler = /*#__PURE__*/function () {
33488
33508
  key: "getSummaryItemsOfAllSets",
33489
33509
  value: function getSummaryItemsOfAllSets(sets, set) {
33490
33510
  var summaryItemsOfAllSets = {};
33491
- for (var _key9 in sets) {
33492
- var _set = sets[_key9];
33511
+ for (var _key8 in sets) {
33512
+ var _set = sets[_key8];
33493
33513
  var articlePosNrs = this.getArticlesPosNr(_set.getDivaArticles(true));
33494
33514
  var summaryItems = this.buildSummaryItems(articlePosNrs, _set);
33495
- summaryItemsOfAllSets[_key9] = {
33515
+ summaryItemsOfAllSets[_key8] = {
33496
33516
  setName: _set.CatalogData.catalogName,
33497
33517
  setPrice: _set.getSetPrice(),
33498
33518
  summaryItems: summaryItems
@@ -33506,10 +33526,10 @@ var SummaryHandler = /*#__PURE__*/function () {
33506
33526
  var groupedArticles = setHandlerInstance.getDockedGroupedArticles(set);
33507
33527
  var retGroups = {};
33508
33528
  var articlesCodexesOnIndex = {};
33509
- for (var _key10 in groupedArticles) {
33510
- var basketId = groupedArticles[_key10][Object.keys(groupedArticles[_key10])[0]].basketId;
33529
+ for (var _key9 in groupedArticles) {
33530
+ var basketId = groupedArticles[_key9][Object.keys(groupedArticles[_key9])[0]].basketId;
33511
33531
  retGroups[basketId] = {
33512
- articles: groupedArticles[_key10],
33532
+ articles: groupedArticles[_key9],
33513
33533
  quantity: 1
33514
33534
  };
33515
33535
  }
@@ -33524,12 +33544,12 @@ var SummaryHandler = /*#__PURE__*/function () {
33524
33544
  articlesCodexesOnIndex[articleCodex].push(i);
33525
33545
  }
33526
33546
  }
33527
- for (var _key11 in articlesCodexesOnIndex) {
33528
- if (articlesCodexesOnIndex[_key11].length > 1) {
33547
+ for (var _key10 in articlesCodexesOnIndex) {
33548
+ if (articlesCodexesOnIndex[_key10].length > 1) {
33529
33549
  //group the single groups by the aricleCodex
33530
33550
  var articles = [];
33531
- for (var _i4 = 0; _i4 < articlesCodexesOnIndex[_key11].length; _i4++) {
33532
- var _group = groupedArticles[articlesCodexesOnIndex[_key11][_i4]];
33551
+ for (var _i4 = 0; _i4 < articlesCodexesOnIndex[_key10].length; _i4++) {
33552
+ var _group = groupedArticles[articlesCodexesOnIndex[_key10][_i4]];
33533
33553
  articles.push({
33534
33554
  article: _group[Object.keys(_group)[0]]
33535
33555
  });
@@ -33574,11 +33594,11 @@ var SummaryHandler = /*#__PURE__*/function () {
33574
33594
  var isIDM = article.CatalogData.isIDMFormat;
33575
33595
  var tabGroups = [];
33576
33596
  for (var basketId in article.partlistArticles) {
33577
- var _ops$val2;
33597
+ var _ops$val4;
33578
33598
  var partlistArticle = article.partlistArticles[basketId];
33579
33599
  if (!partlistArticle.tabGroup) continue;
33580
33600
  var ops = article.getArticleOptionState((!isIDM ? 'OPT' : '') + partlistArticle.tabGroup);
33581
- if (ops && !ops.isInvisible && (ops.selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && article.set.api.showSelectionModeZero()) && ops.isDoShow && !((_ops$val2 = ops.val) !== null && _ops$val2 !== void 0 && _ops$val2.isNotRelevant) && ops !== null && ops !== void 0 && ops.optionTabGroup) {
33601
+ if (ops && !ops.isInvisible && (ops.selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && article.set.api.showSelectionModeZero()) && ops.isDoShow && !((_ops$val4 = ops.val) !== null && _ops$val4 !== void 0 && _ops$val4.isNotRelevant) && ops !== null && ops !== void 0 && ops.optionTabGroup) {
33582
33602
  tabGroups.push({
33583
33603
  optionCodex: ops.optionCodex,
33584
33604
  tabGroup: ops.optionTabGroup
@@ -33802,8 +33822,8 @@ var SummaryHandler = /*#__PURE__*/function () {
33802
33822
  key: "getArticlesPrice",
33803
33823
  value: function getArticlesPrice(articles) {
33804
33824
  var price = 0;
33805
- for (var _key12 in articles) {
33806
- price = price + articles[_key12].price * articles[_key12].quantity;
33825
+ for (var _key11 in articles) {
33826
+ price = price + articles[_key11].price * articles[_key11].quantity;
33807
33827
  }
33808
33828
  return price;
33809
33829
  }
@@ -34713,6 +34733,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34713
34733
  _iterator.f();
34714
34734
  }
34715
34735
  }
34736
+ this.checkForMergableSelectionModes(set.configTree);
34737
+ }
34738
+ }, {
34739
+ key: "checkForMergableSelectionModes",
34740
+ value: function checkForMergableSelectionModes(configTree) {
34741
+ return;
34716
34742
  }
34717
34743
  }, {
34718
34744
  key: "addOptionsStateToConfigTree",
@@ -35002,7 +35028,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35002
35028
  key: "getConifgItemsForView",
35003
35029
  value: function () {
35004
35030
  var _getConifgItemsForView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, configStepKey) {
35005
- var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, _iterator2, _step2, _configItem$parent$oc, key, configItem, configItemsInOPG, retVal, _retVal, totalTime, configStepOPG, configStepOPV, targetArticle, opg, ops, selectedOpv, originalVariantValues, seomethingChanged, variantValues, _iterator3, _step3, _set$favorites$Varian, _set$favorites, _key, startTime, alreadyCalcedVisibleOPVs, _i, _ops$optionOcd2, _retVal2, clonedConfigItemsForView, i, timeDiff;
35031
+ var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, _iterator5, _step5, _configItem$parent$oc, key, configItem, configItemsInOPG, retVal, _retVal, totalTime, configStepOPG, configStepOPV, targetArticle, opg, ops, selectedOpv, originalVariantValues, seomethingChanged, variantValues, _iterator6, _step6, _set$favorites$Varian, _set$favorites, _key, startTime, alreadyCalcedVisibleOPVs, _i, _ops$optionOcd2, _retVal2, clonedConfigItemsForView, i, timeDiff;
35006
35032
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
35007
35033
  while (1) switch (_context.prev = _context.next) {
35008
35034
  case 0:
@@ -35011,7 +35037,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35011
35037
  retValues = this.getConfigItems(configStepKey, articles, set.configTree);
35012
35038
  optionCodex = undefined;
35013
35039
  if (!(retValues && step != null)) {
35014
- _context.next = 95;
35040
+ _context.next = 96;
35015
35041
  break;
35016
35042
  }
35017
35043
  configItems = [];
@@ -35025,18 +35051,18 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35025
35051
  case 10:
35026
35052
  optionCodex = optionState.optionCodex;
35027
35053
  if (!retValues.isOPG) {
35028
- _context.next = 35;
35054
+ _context.next = 36;
35029
35055
  break;
35030
35056
  }
35031
- _iterator2 = _createForOfIteratorHelper$2(retValues.configItems.keys());
35057
+ _iterator5 = _createForOfIteratorHelper$2(retValues.configItems.keys());
35032
35058
  _context.prev = 13;
35033
- _iterator2.s();
35059
+ _iterator5.s();
35034
35060
  case 15:
35035
- if ((_step2 = _iterator2.n()).done) {
35036
- _context.next = 25;
35061
+ if ((_step5 = _iterator5.n()).done) {
35062
+ _context.next = 26;
35037
35063
  break;
35038
35064
  }
35039
- key = _step2.value;
35065
+ key = _step5.value;
35040
35066
  configItem = retValues.configItems.get(key);
35041
35067
  if (configItem) {
35042
35068
  _context.next = 20;
@@ -35050,77 +35076,83 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35050
35076
  retVal = this.prepareConfigItemsForView(set, optionState, configItemsInOPG, retValues.constructionRules, selectedItems, step.configStep.targetArticles, optionCodex);
35051
35077
  configItems = configItems.concat(retVal.myConfigItemsForView);
35052
35078
  }
35053
- case 23:
35079
+ if (optionState.option.ignorePgrGroupPosition) {
35080
+ configItems = configItems.sort(function (a, b) {
35081
+ var _a$groupName$localeCo, _a$groupName, _b$groupName;
35082
+ return (_a$groupName$localeCo = (_a$groupName = a.groupName) === null || _a$groupName === void 0 ? void 0 : _a$groupName.localeCompare((_b$groupName = b.groupName) !== null && _b$groupName !== void 0 ? _b$groupName : '')) !== null && _a$groupName$localeCo !== void 0 ? _a$groupName$localeCo : 0;
35083
+ });
35084
+ }
35085
+ case 24:
35054
35086
  _context.next = 15;
35055
35087
  break;
35056
- case 25:
35057
- _context.next = 30;
35088
+ case 26:
35089
+ _context.next = 31;
35058
35090
  break;
35059
- case 27:
35060
- _context.prev = 27;
35091
+ case 28:
35092
+ _context.prev = 28;
35061
35093
  _context.t0 = _context["catch"](13);
35062
- _iterator2.e(_context.t0);
35063
- case 30:
35064
- _context.prev = 30;
35065
- _iterator2.f();
35066
- return _context.finish(30);
35067
- case 33:
35068
- _context.next = 92;
35094
+ _iterator5.e(_context.t0);
35095
+ case 31:
35096
+ _context.prev = 31;
35097
+ _iterator5.f();
35098
+ return _context.finish(31);
35099
+ case 34:
35100
+ _context.next = 93;
35069
35101
  break;
35070
- case 35:
35102
+ case 36:
35071
35103
  if (!(step.optionStep.mergesToOPG == undefined)) {
35072
- _context.next = 40;
35104
+ _context.next = 41;
35073
35105
  break;
35074
35106
  }
35075
35107
  _retVal = this.prepareConfigItemsForView(set, optionState, retValues.configItems, retValues.constructionRules, selectedItems, step.configStep.targetArticles, undefined, undefined, undefined, undefined, retValues.freeTextValue, retValues.freeTextLang);
35076
35108
  configItems = _retVal.myConfigItemsForView;
35077
- _context.next = 92;
35109
+ _context.next = 93;
35078
35110
  break;
35079
- case 40:
35111
+ case 41:
35080
35112
  if (!(typeof step.optionStep.mergesToOPG == 'string' && step.tabGroup.options[step.optionStep.mergesToOPG])) {
35081
- _context.next = 92;
35113
+ _context.next = 93;
35082
35114
  break;
35083
35115
  }
35084
35116
  //IDM Bezugschritte werden zusammengefasst zu OPG und OPV
35085
35117
  totalTime = Date.now();
35086
35118
  configStepOPG = step.configStep, configStepOPV = set.configTree.getConfigStepBasketIdAndOptionCodex(configStepOPG.targetArticles[0], step.optionStep.mergesToOPG); //falls mehrere Artikel im Schritt sind werden trotzdem nur die Values des erster verwendet um die z.B. OPT2 und OPT3 zu vereinen
35087
35119
  if (!configStepOPV) {
35088
- _context.next = 92;
35120
+ _context.next = 93;
35089
35121
  break;
35090
35122
  }
35091
35123
  targetArticle = articles[configStepOPG.targetArticles[0]];
35092
35124
  opg = targetArticle.getArticleOptionState(configStepOPG.option);
35093
35125
  ops = targetArticle.getArticleOptionState(configStepOPV.option);
35094
35126
  if (opg) {
35095
- _context.next = 49;
35127
+ _context.next = 50;
35096
35128
  break;
35097
35129
  }
35098
35130
  throw new Error('myOptionState ' + configStepOPG.option + ' is undefined');
35099
- case 49:
35131
+ case 50:
35100
35132
  if (ops) {
35101
- _context.next = 51;
35133
+ _context.next = 52;
35102
35134
  break;
35103
35135
  }
35104
35136
  throw new Error('myOptionState ' + configStepOPV.option + ' is undefined');
35105
- case 51:
35137
+ case 52:
35106
35138
  selectedOpv = ops.val;
35107
35139
  originalVariantValues = targetArticle.VariantValues;
35108
35140
  seomethingChanged = false;
35109
35141
  variantValues = {};
35110
- _iterator3 = _createForOfIteratorHelper$2(opg.visibleOptionValues.keys());
35111
- _context.prev = 56;
35112
- _iterator3.s();
35113
- case 58:
35114
- if ((_step3 = _iterator3.n()).done) {
35115
- _context.next = 78;
35142
+ _iterator6 = _createForOfIteratorHelper$2(opg.visibleOptionValues.keys());
35143
+ _context.prev = 57;
35144
+ _iterator6.s();
35145
+ case 59:
35146
+ if ((_step6 = _iterator6.n()).done) {
35147
+ _context.next = 79;
35116
35148
  break;
35117
35149
  }
35118
- _key = _step3.value;
35150
+ _key = _step6.value;
35119
35151
  startTime = Date.now(); //die sichtbaren gruppen werden nun nacheinander beim Artikel gesetzt und die Validen bezüge jeder gruppe geholt -> visibleOptionValues;
35120
35152
  variantValues[opg.optionCodex] = opg.visibleOptionValues.get(_key).codex;
35121
35153
  alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues.get(_key).codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)));
35122
35154
  if (!(alreadyCalcedVisibleOPVs != undefined && Object.keys((_set$favorites$Varian = (_set$favorites = set.favorites) === null || _set$favorites === void 0 ? void 0 : _set$favorites.VariantValues) !== null && _set$favorites$Varian !== void 0 ? _set$favorites$Varian : {}).length == 0)) {
35123
- _context.next = 68;
35155
+ _context.next = 69;
35124
35156
  break;
35125
35157
  }
35126
35158
  //die merged OPG wurde bereist ausgerechnet und kann wiederverwendet werden. nur die Selected value muss repariert werden
@@ -35132,41 +35164,41 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35132
35164
  }
35133
35165
  }
35134
35166
  configItems = configItems.concat(alreadyCalcedVisibleOPVs);
35135
- _context.next = 75;
35167
+ _context.next = 76;
35136
35168
  break;
35137
- case 68:
35169
+ case 69:
35138
35170
  seomethingChanged = true;
35139
- _context.next = 71;
35171
+ _context.next = 72;
35140
35172
  return articleHandlerInstance.updateCfgValues(targetArticle, variantValues, {}, true, true, true, true);
35141
- case 71:
35173
+ case 72:
35142
35174
  _retVal2 = this.prepareConfigItemsForView(set, optionState, targetArticle.getArticleOptionState(ops.optionCodex).visibleOptionValues, retValues.constructionRules, [], step.configStep.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opg.visibleOptionValues.get(_key).name, opg.visibleOptionValues.get(_key).codex, opg.optionCodex);
35143
35175
  configItems = configItems.concat(_retVal2.myConfigItemsForView);
35144
35176
  clonedConfigItemsForView = JSON.parse(JSON.stringify(_retVal2.myConfigItemsForView));
35145
35177
  targetArticle.addMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues.get(_key).codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)), clonedConfigItemsForView);
35146
- case 75:
35147
- LOG$a.debug('calculating for merge to opg', _key, Date.now() - startTime + 'ms');
35148
35178
  case 76:
35149
- _context.next = 58;
35179
+ LOG$a.debug('calculating for merge to opg', _key, Date.now() - startTime + 'ms');
35180
+ case 77:
35181
+ _context.next = 59;
35150
35182
  break;
35151
- case 78:
35152
- _context.next = 83;
35183
+ case 79:
35184
+ _context.next = 84;
35153
35185
  break;
35154
- case 80:
35155
- _context.prev = 80;
35156
- _context.t1 = _context["catch"](56);
35157
- _iterator3.e(_context.t1);
35158
- case 83:
35159
- _context.prev = 83;
35160
- _iterator3.f();
35161
- return _context.finish(83);
35162
- case 86:
35186
+ case 81:
35187
+ _context.prev = 81;
35188
+ _context.t1 = _context["catch"](57);
35189
+ _iterator6.e(_context.t1);
35190
+ case 84:
35191
+ _context.prev = 84;
35192
+ _iterator6.f();
35193
+ return _context.finish(84);
35194
+ case 87:
35163
35195
  if (!seomethingChanged) {
35164
- _context.next = 89;
35196
+ _context.next = 90;
35165
35197
  break;
35166
35198
  }
35167
- _context.next = 89;
35199
+ _context.next = 90;
35168
35200
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, originalVariantValues, [targetArticle.basketId], true, 'calcVariant');
35169
- case 89:
35201
+ case 90:
35170
35202
  for (i = 0; i < configItems.length; i++) {
35171
35203
  if (configItems[i].codex == (selectedOpv === null || selectedOpv === void 0 ? void 0 : selectedOpv.codex)) {
35172
35204
  selectedItems = [selectedOpv.codex];
@@ -35175,7 +35207,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35175
35207
  }
35176
35208
  timeDiff = Date.now() - totalTime;
35177
35209
  LOG$a.debug('calculating for merge to opg', 'totalTime', timeDiff + 'ms');
35178
- case 92:
35210
+ case 93:
35179
35211
  return _context.abrupt("return", {
35180
35212
  configItems: configItems,
35181
35213
  option: optionCodex ? set.CatalogData.getOption(optionCodex) : undefined,
@@ -35186,16 +35218,16 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35186
35218
  }),
35187
35219
  notTotallyMatichingOPVs: !set.CatalogData.articleConfigAll ? retValues.notTotallyMatichingOPVs : undefined
35188
35220
  });
35189
- case 95:
35221
+ case 96:
35190
35222
  return _context.abrupt("return", {
35191
35223
  configItems: [],
35192
35224
  selectedItems: []
35193
35225
  });
35194
- case 96:
35226
+ case 97:
35195
35227
  case "end":
35196
35228
  return _context.stop();
35197
35229
  }
35198
- }, _callee, this, [[13, 27, 30, 33], [56, 80, 83, 86]]);
35230
+ }, _callee, this, [[13, 28, 31, 34], [57, 81, 84, 87]]);
35199
35231
  }));
35200
35232
  function getConifgItemsForView(_x, _x2) {
35201
35233
  return _getConifgItemsForView.apply(this, arguments);
@@ -35237,19 +35269,19 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35237
35269
  constructionRules = myOptionState.constructionRules;
35238
35270
  configItems = new Map(myOptionState.visibleOptionValues);
35239
35271
  } else {
35240
- var _iterator4 = _createForOfIteratorHelper$2(configItems.keys()),
35241
- _step4;
35272
+ var _iterator7 = _createForOfIteratorHelper$2(configItems.keys()),
35273
+ _step7;
35242
35274
  try {
35243
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
35244
- var _key2 = _step4.value;
35275
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
35276
+ var _key2 = _step7.value;
35245
35277
  if (!myOptionState.visibleOptionValues.get(_key2)) {
35246
35278
  configItems["delete"](_key2);
35247
35279
  }
35248
35280
  }
35249
35281
  } catch (err) {
35250
- _iterator4.e(err);
35282
+ _iterator7.e(err);
35251
35283
  } finally {
35252
- _iterator4.f();
35284
+ _iterator7.f();
35253
35285
  }
35254
35286
  }
35255
35287
  } else if (i == 0 && configStep.targetArticles.length == 1) {
@@ -35354,11 +35386,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35354
35386
  ret = false;
35355
35387
  var articles = set.getDivaArticles();
35356
35388
  for (var basketId in articles) {
35357
- var _iterator5 = _createForOfIteratorHelper$2(articles[basketId].articleOptionStates.values()),
35358
- _step5;
35389
+ var _iterator8 = _createForOfIteratorHelper$2(articles[basketId].articleOptionStates.values()),
35390
+ _step8;
35359
35391
  try {
35360
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
35361
- var ops = _step5.value;
35392
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
35393
+ var ops = _step8.value;
35362
35394
  if (ops.headerPosVariationType == 'K') {
35363
35395
  if (optionValues[ops.optionCodex] == undefined) {
35364
35396
  optionValues[ops.optionCodex] = ops.valCodex ? ops.valCodex : null;
@@ -35371,9 +35403,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35371
35403
  }
35372
35404
  }
35373
35405
  } catch (err) {
35374
- _iterator5.e(err);
35406
+ _iterator8.e(err);
35375
35407
  } finally {
35376
- _iterator5.f();
35408
+ _iterator8.f();
35377
35409
  }
35378
35410
  if (ret == true) break;
35379
35411
  }
@@ -35392,7 +35424,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35392
35424
  var item = myConfigItems.get(objectKeys[i]);
35393
35425
  if (!item) throw new Error('item ' + objectKeys[i] + ' not found in myConfigItems');
35394
35426
  var key = objectKeys[i];
35395
- var groupName = item.groupName ? item.groupName : idmOpgGroupName;
35427
+ var groupName = !ops.option.ignoreGroups ? item.groupName ? item.groupName : idmOpgGroupName : undefined;
35396
35428
  if (!selectedVals.find(function (opv) {
35397
35429
  var _myConfigItems$get, _myConfigItems$get2;
35398
35430
  return opv == item.codex || ((_myConfigItems$get = myConfigItems.get(opv)) === null || _myConfigItems$get === void 0 ? void 0 : _myConfigItems$get.ocd) && ((_myConfigItems$get2 = myConfigItems.get(opv)) === null || _myConfigItems$get2 === void 0 ? void 0 : _myConfigItems$get2.ocd) === item.codex;
@@ -35494,12 +35526,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35494
35526
  for (var iKey in optionStatesOfArticles) {
35495
35527
  //hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
35496
35528
  var optionsStates = optionStatesOfArticles[iKey];
35497
- var _iterator6 = _createForOfIteratorHelper$2(optionsStates.values()),
35498
- _step6;
35529
+ var _iterator9 = _createForOfIteratorHelper$2(optionsStates.values()),
35530
+ _step9;
35499
35531
  try {
35500
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
35532
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
35501
35533
  var _ops$addToMeasure2;
35502
- var ops = _step6.value;
35534
+ var ops = _step9.value;
35503
35535
  var selectionmode = ops.selectionmode;
35504
35536
  if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
35505
35537
  if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
@@ -35507,9 +35539,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35507
35539
  }
35508
35540
  }
35509
35541
  } catch (err) {
35510
- _iterator6.e(err);
35542
+ _iterator9.e(err);
35511
35543
  } finally {
35512
- _iterator6.f();
35544
+ _iterator9.f();
35513
35545
  }
35514
35546
  }
35515
35547
  return configTree;
@@ -37377,7 +37409,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
37377
37409
  articleInfos: articleInfos,
37378
37410
  doShowConfigSingle: doShowConfigSingle && groupedArticles.length > 1,
37379
37411
  isConfigSingle: isConfigSingle,
37380
- articleName: ''
37412
+ articleName: '',
37413
+ bbox: this.getBBoxObject(set)
37381
37414
  };
37382
37415
  }
37383
37416
  }, {
@@ -37757,7 +37790,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37757
37790
  value: (function () {
37758
37791
  var _updateArticlesOptionStatesOfActSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
37759
37792
  var _resultPlannerUpdate;
37760
- var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
37793
+ var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle, rpu, copyIndex;
37761
37794
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context29) {
37762
37795
  while (1) switch (_context29.prev = _context29.next) {
37763
37796
  case 0:
@@ -37807,7 +37840,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37807
37840
 
37808
37841
  //Update Planner - check if planner data changed
37809
37842
  if (!(!ignorePlanner && from != 'calcVariant')) {
37810
- _context29.next = 55;
37843
+ _context29.next = 58;
37811
37844
  break;
37812
37845
  }
37813
37846
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
@@ -37852,7 +37885,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37852
37885
  break;
37853
37886
  case 41:
37854
37887
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
37855
- _context29.next = 54;
37888
+ _context29.next = 57;
37856
37889
  break;
37857
37890
  }
37858
37891
  //Todo copy these elements
@@ -37873,22 +37906,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
37873
37906
  _context29.next = 44;
37874
37907
  break;
37875
37908
  case 52:
37876
- _context29.next = 54;
37909
+ rpu = resultPlannerUpdate;
37910
+ copyIndex = {
37911
+ x: rpu.copyDPType == 'AVL' ? -1 : rpu.copyDPType == 'AVR' ? 1 : 0,
37912
+ y: 0,
37913
+ z: rpu.copyType == 'BoxPlanner_backside' ? -1 : 0
37914
+ };
37915
+ if (!(resultPlannerUpdate.copyType == 'BoxPlanner_backside')) {
37916
+ _context29.next = 57;
37917
+ break;
37918
+ }
37919
+ _context29.next = 57;
37877
37920
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
37878
- dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
37921
+ copyIndex: copyIndex,
37879
37922
  copyType: resultPlannerUpdate.copyType,
37880
37923
  changedOPT: resultPlannerUpdate.changedOPT,
37881
37924
  targetElements: resultPlannerUpdate.targetElements
37882
37925
  });
37883
- case 54:
37926
+ case 57:
37884
37927
  this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
37885
- case 55:
37928
+ case 58:
37886
37929
  return _context29.abrupt("return", {
37887
37930
  articleCountChanged: elementsToDeleteById.length > 0,
37888
37931
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
37889
37932
  setId: set.getSetId()
37890
37933
  });
37891
- case 56:
37934
+ case 59:
37892
37935
  case "end":
37893
37936
  return _context29.stop();
37894
37937
  }
@@ -39762,7 +39805,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39762
39805
  break;
39763
39806
  case 3:
39764
39807
  _context12.next = 5;
39765
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-21fc0405.js'); });
39808
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-4414e221.js'); });
39766
39809
  case 5:
39767
39810
  _yield$import = _context12.sent;
39768
39811
  PfisterWWSHandler = _yield$import["default"];
@@ -39770,7 +39813,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39770
39813
  return _context12.abrupt("break", 27);
39771
39814
  case 9:
39772
39815
  _context12.next = 11;
39773
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-73899dec.js'); });
39816
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-35f2e8ed.js'); });
39774
39817
  case 11:
39775
39818
  _yield$import2 = _context12.sent;
39776
39819
  LiviqueWWSHandler = _yield$import2["default"];
@@ -39778,7 +39821,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39778
39821
  return _context12.abrupt("break", 27);
39779
39822
  case 15:
39780
39823
  _context12.next = 17;
39781
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-38942a5b.js'); });
39824
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-3923b9fb.js'); });
39782
39825
  case 17:
39783
39826
  _yield$import3 = _context12.sent;
39784
39827
  SeriousWWSHandler = _yield$import3["default"];
@@ -39786,7 +39829,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39786
39829
  return _context12.abrupt("break", 27);
39787
39830
  case 21:
39788
39831
  _context12.next = 23;
39789
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-678ea32e.js'); });
39832
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-a6679920.js'); });
39790
39833
  case 23:
39791
39834
  _yield$import4 = _context12.sent;
39792
39835
  StandardWWSHandler = _yield$import4["default"];
@@ -41215,7 +41258,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41215
41258
  while (1) switch (_context3.prev = _context3.next) {
41216
41259
  case 0:
41217
41260
  _context3.next = 2;
41218
- return Promise.resolve().then(function () { return require('./Host3DSignalR-09589f6f.js'); });
41261
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-e782c432.js'); });
41219
41262
  case 2:
41220
41263
  _yield$import = _context3.sent;
41221
41264
  Host3DSignalR = _yield$import["default"];
@@ -42773,7 +42816,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42773
42816
  break;
42774
42817
  case 8:
42775
42818
  _context4.next = 10;
42776
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-fc5b6e71.js'); });
42819
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-cceebe23.js'); });
42777
42820
  case 10:
42778
42821
  _yield$import = _context4.sent;
42779
42822
  DivaStandardPlanner = _yield$import["default"];
@@ -42784,7 +42827,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42784
42827
  return _context4.abrupt("break", 21);
42785
42828
  case 15:
42786
42829
  _context4.next = 17;
42787
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-9b908b19.js'); });
42830
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-022b9e6d.js'); });
42788
42831
  case 17:
42789
42832
  _yield$import2 = _context4.sent;
42790
42833
  DivaBoxPlanner = _yield$import2["default"];
@@ -43428,7 +43471,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43428
43471
  return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
43429
43472
  while (1) switch (_context15.prev = _context15.next) {
43430
43473
  case 0:
43431
- if (this.plannerList.has(setId)) {
43474
+ if (!(!this.plannerList.has(setId) || !copyInfo)) {
43432
43475
  _context15.next = 2;
43433
43476
  break;
43434
43477
  }
@@ -44357,7 +44400,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
44357
44400
  var retValues = setHandlerInstance.loadPaletteInfos(set, configStepKey, activeArticles, targetArticles);
44358
44401
  if (!retValues.articleInfos) return;
44359
44402
  //this.setWebConifguratorTitle({ articleName: retValues.articleName });
44360
- _this.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle);
44403
+ _this.updatePaletteInfos(retValues.articleInfos, retValues.doShowConfigSingle, retValues.isConfigSingle, retValues.bbox);
44361
44404
  (_this$updateViewPlann7 = _this.updateViewPlannerElements) === null || _this$updateViewPlann7 === void 0 || _this$updateViewPlann7.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
44362
44405
  _this.updateElementSelectionConfig(retValues.articleInfos, _this.doAllowSetPlanner());
44363
44406
  });
@@ -45298,7 +45341,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45298
45341
  key: "copyPlannerElement",
45299
45342
  value: (function () {
45300
45343
  var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
45301
- var newConfigStepKey, copyDps, eId, _i, _copyDps, _this$updateViewPlann12, copyDp, set, newSelectedArticle, _this$updateElementSe7, baseArticle;
45344
+ var _this$updateViewPlann12;
45345
+ var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
45302
45346
  return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
45303
45347
  while (1) switch (_context21.prev = _context21.next) {
45304
45348
  case 0:
@@ -45308,46 +45352,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45308
45352
  }
45309
45353
  return _context21.abrupt("return");
45310
45354
  case 2:
45311
- newConfigStepKey = '';
45312
- copyDps = [];
45313
- eId = elementId;
45314
- if (copyInfo.copyIndex.x > 0) copyDps.push('AVR');else copyDps.push('AVL');
45315
- if (copyInfo.copyIndex.y > 0) copyDps.push('AVO');
45316
- _i = 0, _copyDps = copyDps;
45317
- case 8:
45318
- if (!(_i < _copyDps.length)) {
45319
- _context21.next = 26;
45320
- break;
45321
- }
45322
- copyDp = _copyDps[_i];
45323
45355
  set = this.sets[setId];
45324
- _context21.next = 13;
45325
- return setHandlerInstance.copyPlannerElement(set, eId, {
45326
- copyType: copyInfo.copyType,
45327
- dpType: copyDp
45328
- });
45329
- case 13:
45356
+ _context21.next = 5;
45357
+ return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
45358
+ case 5:
45330
45359
  newSelectedArticle = _context21.sent;
45331
- if (newSelectedArticle !== null && newSelectedArticle !== void 0 && newSelectedArticle.elementId) eId = newSelectedArticle.elementId;
45332
45360
  this.updateConfigStructure();
45333
45361
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
45334
45362
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
45335
45363
  this.updatePriceInView();
45336
45364
  this.updateViewButtonsDependigOnConfigStructure();
45365
+ newConfigStepKey = undefined;
45337
45366
  if (newSelectedArticle != undefined) {
45338
- set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
45367
+ newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
45339
45368
  this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
45340
45369
  baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
45341
45370
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
45342
45371
  }
45343
45372
  this.checkMatchingProducts('onCopy');
45344
- case 23:
45345
- _i++;
45346
- _context21.next = 8;
45347
- break;
45348
- case 26:
45349
45373
  return _context21.abrupt("return", newConfigStepKey);
45350
- case 27:
45374
+ case 15:
45351
45375
  case "end":
45352
45376
  return _context21.stop();
45353
45377
  }
@@ -45587,7 +45611,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45587
45611
  key: "updatePriceInView",
45588
45612
  value: function updatePriceInView() {
45589
45613
  var _this$updatePrice, _this$actSet9;
45590
- setHandlerInstance.getActSetPriceFormat(this.actSet());
45591
45614
  (_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getCustomDimensionsOfActSet());
45592
45615
  }
45593
45616
 
@@ -45773,7 +45796,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45773
45796
  key: "saveToBasket",
45774
45797
  value: function () {
45775
45798
  var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(returnTo, event, repairOnly) {
45776
- var _returnTo, _returnTo2, _returnTo3, _this$actions35, _this$actions36, _this$actions37, _this$divaBasketHandl2;
45799
+ var _returnTo, _returnTo2, _returnTo3, _this$actions35, _this$actions36, _this$divaBasketHandl2;
45777
45800
  var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet11, arReady, _result2, product;
45778
45801
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
45779
45802
  while (1) switch (_context27.prev = _context27.next) {
@@ -45822,15 +45845,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45822
45845
  this.divaBasketHandler.fillOrigConfigurations();
45823
45846
  actBasket.Updated = Date.now();
45824
45847
  if (!returnTo) {
45825
- _context27.next = 53;
45848
+ _context27.next = 52;
45826
45849
  break;
45827
45850
  }
45828
45851
  _context27.t3 = returnTo;
45829
- _context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 30 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 53;
45852
+ _context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context27.t3 === 'OPEN_PDF' ? 32 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context27.t3 === 'SAVE_BASKET' ? 32 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 32 : 52;
45830
45853
  break;
45831
45854
  case 27:
45832
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.toggleLoading('buildScene', false, false);
45833
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openComponent({
45855
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
45834
45856
  type: 'SELLER',
45835
45857
  parameters: {
45836
45858
  module: 'PCreator',
@@ -45840,12 +45862,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45840
45862
  basketData: actBasket
45841
45863
  }
45842
45864
  });
45843
- return _context27.abrupt("break", 53);
45844
- case 30:
45865
+ return _context27.abrupt("break", 52);
45866
+ case 29:
45845
45867
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
45846
45868
  actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
45847
45869
  }
45848
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.openComponent({
45870
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.openComponent({
45849
45871
  type: 'SELLER',
45850
45872
  parameters: {
45851
45873
  module: 'Basket',
@@ -45855,25 +45877,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45855
45877
  basketData: actBasket
45856
45878
  }
45857
45879
  });
45858
- return _context27.abrupt("break", 53);
45859
- case 33:
45880
+ return _context27.abrupt("break", 52);
45881
+ case 32:
45860
45882
  if (!(event == 'onSaveProduct')) {
45861
- _context27.next = 43;
45883
+ _context27.next = 42;
45862
45884
  break;
45863
45885
  }
45864
45886
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
45865
45887
  actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
45866
- _context27.next = 37;
45888
+ _context27.next = 36;
45867
45889
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
45868
- case 37:
45869
- _context27.next = 39;
45890
+ case 36:
45891
+ _context27.next = 38;
45870
45892
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
45871
- case 39:
45893
+ case 38:
45872
45894
  newDivaNr = _context27.sent;
45873
45895
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
45874
- _context27.next = 52;
45896
+ _context27.next = 51;
45875
45897
  break;
45876
- case 43:
45898
+ case 42:
45877
45899
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
45878
45900
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = undefined;
45879
45901
  actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
@@ -45881,26 +45903,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45881
45903
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
45882
45904
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
45883
45905
  arReady = !!((_this$actSet11 = this.actSet()) !== null && _this$actSet11 !== void 0 && _this$actSet11.CatalogData.divaArReady);
45884
- _context27.next = 49;
45906
+ _context27.next = 48;
45885
45907
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
45886
- case 49:
45908
+ case 48:
45887
45909
  _result2 = _context27.sent;
45888
45910
  if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
45889
- _context27.next = 52;
45911
+ _context27.next = 51;
45890
45912
  break;
45891
45913
  }
45892
45914
  return _context27.abrupt("return", 'canceled');
45915
+ case 51:
45916
+ return _context27.abrupt("break", 52);
45893
45917
  case 52:
45894
- return _context27.abrupt("break", 53);
45895
- case 53:
45896
45918
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
45897
45919
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
45898
- _context27.next = 57;
45920
+ _context27.next = 56;
45899
45921
  return this.addToBasket(actBasket, event);
45900
- case 57:
45922
+ case 56:
45901
45923
  product = _context27.sent;
45902
45924
  return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
45903
- case 59:
45925
+ case 58:
45904
45926
  case "end":
45905
45927
  return _context27.stop();
45906
45928
  }
@@ -46212,18 +46234,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46212
46234
  key: "addToBasket",
46213
46235
  value: function () {
46214
46236
  var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
46215
- var _this$actions38,
46237
+ var _this$actions37,
46238
+ _this$actions38,
46216
46239
  _this$actions39,
46217
46240
  _this$actions40,
46218
46241
  _this$actions41,
46219
- _this$actions42,
46220
46242
  _this$divaBasketHandl4,
46221
46243
  _this4 = this,
46244
+ _this$actions42,
46222
46245
  _this$actions43,
46223
46246
  _this$actions44,
46224
46247
  _this$actions45,
46225
- _this$actions46,
46226
- _this$actions47;
46248
+ _this$actions46;
46227
46249
  var event,
46228
46250
  emailConfig,
46229
46251
  _emailConfig$to$split,
@@ -46240,31 +46262,31 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46240
46262
  _context29.next = _context29.t0 === 'onWebPlanerPrint' ? 4 : _context29.t0 === 'onWebPlanerSave' ? 6 : _context29.t0 === 'onWebPlanerShare' ? 8 : _context29.t0 === 'onRequestConsulation' ? 10 : _context29.t0 === 'onSave' ? 12 : _context29.t0 === 'onSendEmail' ? 14 : _context29.t0 === 'onSaveProduct' ? 19 : _context29.t0 === 'dontSaveBasket' ? 26 : _context29.t0 === 'onAddToBasket' ? 26 : _context29.t0 === 'onSendContactForm' ? 28 : 31;
46241
46263
  break;
46242
46264
  case 4:
46243
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
46265
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
46244
46266
  type: 'onWebPlanerPrint',
46245
46267
  data: actBasket.getAsJson()
46246
46268
  });
46247
46269
  return _context29.abrupt("break", 33);
46248
46270
  case 6:
46249
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
46271
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
46250
46272
  type: 'onWebPlanerSave',
46251
46273
  data: actBasket.getAsJson()
46252
46274
  });
46253
46275
  return _context29.abrupt("break", 33);
46254
46276
  case 8:
46255
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
46277
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
46256
46278
  type: 'onWebPlanerShare',
46257
46279
  data: actBasket.getAsJson()
46258
46280
  });
46259
46281
  return _context29.abrupt("break", 33);
46260
46282
  case 10:
46261
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
46283
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
46262
46284
  type: 'onRequestConsulation',
46263
46285
  data: actBasket.getAsJson()
46264
46286
  });
46265
46287
  return _context29.abrupt("break", 33);
46266
46288
  case 12:
46267
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
46289
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
46268
46290
  type: 'onSave',
46269
46291
  data: actBasket.getAsJson()
46270
46292
  });
@@ -46299,7 +46321,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46299
46321
  });
46300
46322
  });
46301
46323
  }
46302
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
46324
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
46303
46325
  type: 'onAddToBasket',
46304
46326
  data: actBasket.getAsJson()
46305
46327
  });
@@ -46310,7 +46332,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46310
46332
  return this.api.saveAsProduct(this.sets, actBasket);
46311
46333
  case 22:
46312
46334
  products = _context29.sent;
46313
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
46335
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
46314
46336
  type: 'onAddToBasket',
46315
46337
  data: actBasket.getAsJson()
46316
46338
  });
@@ -46320,20 +46342,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46320
46342
  }
46321
46343
  return _context29.abrupt("return", products[0]);
46322
46344
  case 26:
46323
- (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
46345
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
46324
46346
  type: 'onAddToBasket',
46325
46347
  data: actBasket.getAsJson()
46326
46348
  });
46327
46349
  return _context29.abrupt("break", 33);
46328
46350
  case 28:
46329
- (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
46351
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
46330
46352
  type: 'onAddToBasket',
46331
46353
  data: actBasket.getAsJson()
46332
46354
  });
46333
46355
  this.openContactForm(this.divaBasketHandler);
46334
46356
  return _context29.abrupt("break", 33);
46335
46357
  case 31:
46336
- (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.onEvent({
46358
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.onEvent({
46337
46359
  type: event,
46338
46360
  data: actBasket.getAsJson()
46339
46361
  });
@@ -46354,8 +46376,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46354
46376
  }, {
46355
46377
  key: "openPDFpostAsEvent",
46356
46378
  value: function openPDFpostAsEvent(mongoDBId) {
46357
- var _this$actions48, _this$actions49, _this$actions50;
46358
- (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.updateBreadcrumbs({
46379
+ var _this$actions47, _this$actions48, _this$actions49;
46380
+ (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.updateBreadcrumbs({
46359
46381
  type: 'update',
46360
46382
  param: {
46361
46383
  groupId: 'SHOWROOM',
@@ -46369,7 +46391,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46369
46391
  }
46370
46392
  }
46371
46393
  });
46372
- (_this$actions49 = this.actions) === null || _this$actions49 === void 0 || _this$actions49.updateBreadcrumbs({
46394
+ (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.updateBreadcrumbs({
46373
46395
  type: 'update',
46374
46396
  param: {
46375
46397
  groupId: 'SHOWROOM',
@@ -46383,7 +46405,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46383
46405
  }
46384
46406
  }
46385
46407
  });
46386
- (_this$actions50 = this.actions) === null || _this$actions50 === void 0 || _this$actions50.openComponent({
46408
+ (_this$actions49 = this.actions) === null || _this$actions49 === void 0 || _this$actions49.openComponent({
46387
46409
  type: 'REPORT',
46388
46410
  parameters: {
46389
46411
  id: mongoDBId
@@ -46641,14 +46663,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46641
46663
  }, {
46642
46664
  key: "subscribeToWebPlannerEvents",
46643
46665
  value: function subscribeToWebPlannerEvents() {
46644
- var _this$actions51;
46645
- (_this$actions51 = this.actions) === null || _this$actions51 === void 0 || _this$actions51.subscribeEvents(this.addToBasketEventFunction);
46666
+ var _this$actions50;
46667
+ (_this$actions50 = this.actions) === null || _this$actions50 === void 0 || _this$actions50.subscribeEvents(this.addToBasketEventFunction);
46646
46668
  }
46647
46669
  }, {
46648
46670
  key: "unsubscribeFromWebPlannerEvents",
46649
46671
  value: function unsubscribeFromWebPlannerEvents() {
46650
- var _this$actions52;
46651
- (_this$actions52 = this.actions) === null || _this$actions52 === void 0 || _this$actions52.unSubscribeEvents(this.addToBasketEventFunction);
46672
+ var _this$actions51;
46673
+ (_this$actions51 = this.actions) === null || _this$actions51 === void 0 || _this$actions51.unSubscribeEvents(this.addToBasketEventFunction);
46652
46674
  }
46653
46675
  }, {
46654
46676
  key: "initApiForLogicOnly",
@@ -46955,8 +46977,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46955
46977
  var actualBasketvalue = 0;
46956
46978
  if (set) {
46957
46979
  actualBasketvalue = set === null || set === void 0 ? void 0 : set.getSetPrice();
46958
- for (var _i2 = 0, _Object$values = Object.values(set.getDivaArticles()); _i2 < _Object$values.length; _i2++) {
46959
- var article = _Object$values[_i2];
46980
+ for (var _i = 0, _Object$values = Object.values(set.getDivaArticles()); _i < _Object$values.length; _i++) {
46981
+ var article = _Object$values[_i];
46960
46982
  if (article.relatedToBasketId) {
46961
46983
  var toAdd = {
46962
46984
  codex: article.configArticleCodex,
@@ -47023,8 +47045,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47023
47045
  };
47024
47046
  latestColor = ((_set$CatalogData$getO3 = set.CatalogData.getOptionValue(Object.values(myValues)[0])) === null || _set$CatalogData$getO3 === void 0 ? void 0 : _set$CatalogData$getO3.colorGroups) || [];
47025
47047
  }
47026
- for (var _i3 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i3 < _Object$values2.length; _i3++) {
47027
- var article = _Object$values2[_i3];
47048
+ for (var _i2 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i2 < _Object$values2.length; _i2++) {
47049
+ var article = _Object$values2[_i2];
47028
47050
  if (!configuration) {
47029
47051
  configuration = [{
47030
47052
  varientValues: article.VariantValues,
@@ -47064,9 +47086,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47064
47086
  })
47065
47087
  });
47066
47088
  }
47067
- for (var _i4 = 0, _Object$entries = Object.entries(article.VariantValues); _i4 < _Object$entries.length; _i4++) {
47089
+ for (var _i3 = 0, _Object$entries = Object.entries(article.VariantValues); _i3 < _Object$entries.length; _i3++) {
47068
47090
  var _set$CatalogData$getO8, _set$CatalogData$getO9;
47069
- var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i4], 2),
47091
+ var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i3], 2),
47070
47092
  opt = _Object$entries$_i[0],
47071
47093
  opv = _Object$entries$_i[1];
47072
47094
  allOpt.push({
@@ -48963,6 +48985,12 @@ var PlannerElementData = /*#__PURE__*/function () {
48963
48985
  var _this$planElement$pla3, _this$planElement$pla4;
48964
48986
  return ((_this$planElement$pla3 = this.planElement.plannerData) === null || _this$planElement$pla3 === void 0 ? void 0 : _this$planElement$pla3.filterType) == 'Accessoire' || ((_this$planElement$pla4 = this.planElement.plannerData) === null || _this$planElement$pla4 === void 0 ? void 0 : _this$planElement$pla4.isAccessoire);
48965
48987
  }
48988
+ }, {
48989
+ key: "FilterType",
48990
+ get: function get() {
48991
+ var _this$planElement$pla5;
48992
+ return (_this$planElement$pla5 = this.planElement.plannerData) === null || _this$planElement$pla5 === void 0 ? void 0 : _this$planElement$pla5.filterType;
48993
+ }
48966
48994
  }, {
48967
48995
  key: "FilterAVL",
48968
48996
  get: function get() {
@@ -49177,38 +49205,38 @@ var PlannerElementData = /*#__PURE__*/function () {
49177
49205
  }, {
49178
49206
  key: "SvgFileName",
49179
49207
  get: function get() {
49180
- var _this$planElement$pla5;
49181
- return (_this$planElement$pla5 = this.planElement.plannerData) === null || _this$planElement$pla5 === void 0 ? void 0 : _this$planElement$pla5.curSVG;
49208
+ var _this$planElement$pla6;
49209
+ return (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.curSVG;
49182
49210
  }
49183
49211
  }, {
49184
49212
  key: "Width",
49185
49213
  get: function get() {
49186
- var _this$planElement$pla6;
49187
- return (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.width;
49214
+ var _this$planElement$pla7;
49215
+ return (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.width;
49188
49216
  }
49189
49217
  }, {
49190
49218
  key: "Height",
49191
49219
  get: function get() {
49192
- var _this$planElement$pla7;
49193
- return (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.height;
49220
+ var _this$planElement$pla8;
49221
+ return (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.height;
49194
49222
  }
49195
49223
  }, {
49196
49224
  key: "Depth",
49197
49225
  get: function get() {
49198
- var _this$planElement$pla8;
49199
- return (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.depth;
49226
+ var _this$planElement$pla9;
49227
+ return (_this$planElement$pla9 = this.planElement.plannerData) === null || _this$planElement$pla9 === void 0 ? void 0 : _this$planElement$pla9.depth;
49200
49228
  }
49201
49229
  }, {
49202
49230
  key: "HasAVL",
49203
49231
  get: function get() {
49204
- var _this$planElement$pla9;
49205
- return (_this$planElement$pla9 = this.planElement.plannerData) === null || _this$planElement$pla9 === void 0 ? void 0 : _this$planElement$pla9.hasAVL;
49232
+ var _this$planElement$pla10;
49233
+ return (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.hasAVL;
49206
49234
  }
49207
49235
  }, {
49208
49236
  key: "HasAVR",
49209
49237
  get: function get() {
49210
- var _this$planElement$pla10;
49211
- return (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.hasAVR;
49238
+ var _this$planElement$pla11;
49239
+ return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.hasAVR;
49212
49240
  }
49213
49241
  }, {
49214
49242
  key: "HasAVO",
@@ -49317,8 +49345,8 @@ var PlannerElementData = /*#__PURE__*/function () {
49317
49345
  }, {
49318
49346
  key: "svgBefore",
49319
49347
  get: function get() {
49320
- var _this$planElement$pla11;
49321
- return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.svgBefore;
49348
+ var _this$planElement$pla12;
49349
+ return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.svgBefore;
49322
49350
  },
49323
49351
  set: function set(svg) {
49324
49352
  if (this.planElement.plannerData) this.planElement.plannerData.svgBefore = svg;
@@ -49326,8 +49354,8 @@ var PlannerElementData = /*#__PURE__*/function () {
49326
49354
  }, {
49327
49355
  key: "svgAfter",
49328
49356
  get: function get() {
49329
- var _this$planElement$pla12;
49330
- return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.svgAfter;
49357
+ var _this$planElement$pla13;
49358
+ return (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.svgAfter;
49331
49359
  },
49332
49360
  set: function set(svg) {
49333
49361
  if (this.planElement.plannerData) this.planElement.plannerData.svgAfter = svg;
@@ -49407,14 +49435,14 @@ var PlannerElementData = /*#__PURE__*/function () {
49407
49435
  }, {
49408
49436
  key: "getIsNotDockedAccessoire",
49409
49437
  value: function getIsNotDockedAccessoire() {
49410
- var _this$planElement$pla13;
49411
- return !!((_this$planElement$pla13 = this.planElement.plannerData) !== null && _this$planElement$pla13 !== void 0 && _this$planElement$pla13.isNotDockedAccessoire);
49438
+ var _this$planElement$pla14;
49439
+ return !!((_this$planElement$pla14 = this.planElement.plannerData) !== null && _this$planElement$pla14 !== void 0 && _this$planElement$pla14.isNotDockedAccessoire);
49412
49440
  }
49413
49441
  }, {
49414
49442
  key: "getParentElementId",
49415
49443
  value: function getParentElementId() {
49416
- var _this$planElement$pla14;
49417
- return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.parentElementId;
49444
+ var _this$planElement$pla15;
49445
+ return (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.parentElementId;
49418
49446
  }
49419
49447
  }, {
49420
49448
  key: "getElementId",
@@ -49493,8 +49521,8 @@ var PlannerElementData = /*#__PURE__*/function () {
49493
49521
  }, {
49494
49522
  key: "getFilterAVL",
49495
49523
  value: function getFilterAVL() {
49496
- var _this$planElement$pla15;
49497
- return this.planElement.plannerData ? (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.AVLFilter : [];
49524
+ var _this$planElement$pla16;
49525
+ return this.planElement.plannerData ? (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.AVLFilter : [];
49498
49526
  }
49499
49527
  }, {
49500
49528
  key: "getFilterAVR",
@@ -49578,26 +49606,26 @@ var PlannerElementData = /*#__PURE__*/function () {
49578
49606
  }, {
49579
49607
  key: "getAccessoires",
49580
49608
  value: function getAccessoires() {
49581
- var _this$planElement$pla16;
49582
- return this.planElement.plannerData ? (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.accessoireList : [];
49609
+ var _this$planElement$pla17;
49610
+ return this.planElement.plannerData ? (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.accessoireList : [];
49583
49611
  }
49584
49612
  }, {
49585
49613
  key: "getSVGsWithFormula",
49586
49614
  value: function getSVGsWithFormula() {
49587
- var _this$planElement$pla17;
49588
- return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.svgsWithFormula;
49615
+ var _this$planElement$pla18;
49616
+ return (_this$planElement$pla18 = this.planElement.plannerData) === null || _this$planElement$pla18 === void 0 ? void 0 : _this$planElement$pla18.svgsWithFormula;
49589
49617
  }
49590
49618
  }, {
49591
49619
  key: "getVaraintValuesInfluencingAVLAVRFilter",
49592
49620
  value: function getVaraintValuesInfluencingAVLAVRFilter() {
49593
- var _this$planElement$pla18;
49594
- return (_this$planElement$pla18 = this.planElement.plannerData) === null || _this$planElement$pla18 === void 0 ? void 0 : _this$planElement$pla18.varaintValuesInfluencingAVLAVRFilter;
49621
+ var _this$planElement$pla19;
49622
+ return (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.varaintValuesInfluencingAVLAVRFilter;
49595
49623
  }
49596
49624
  }, {
49597
49625
  key: "getCurrentAccessorires",
49598
49626
  value: function getCurrentAccessorires() {
49599
- var _this$planElement$pla19;
49600
- return this.planElement.plannerData ? (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.currentAccessorires : [];
49627
+ var _this$planElement$pla20;
49628
+ return this.planElement.plannerData ? (_this$planElement$pla20 = this.planElement.plannerData) === null || _this$planElement$pla20 === void 0 ? void 0 : _this$planElement$pla20.currentAccessorires : [];
49601
49629
  }
49602
49630
  }]);
49603
49631
  }();