@crystaldesign/web-planner-logic 26.10.0 → 26.11.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/build/cjs/{DivaBoxPlanner-de40ba61.js → DivaBoxPlanner-02a2dbbf.js} +4 -4
  2. package/build/cjs/{DivaStandardPlanner-6d5e0308.js → DivaStandardPlanner-150246c0.js} +8 -28
  3. package/build/cjs/{DoorPlanner-29f34e16.js → DoorPlanner-ce630754.js} +2 -1
  4. package/build/cjs/{Host3DSignalR-9d0fd3b8.js → Host3DSignalR-b0b1fb8d.js} +2 -1
  5. package/build/cjs/{LiviqueWWSHandler-b69b3ff9.js → LiviqueWWSHandler-c11ea7d2.js} +2 -1
  6. package/build/cjs/{PfisterWWSHandler-e64d0e3c.js → PfisterWWSHandler-3c723ecc.js} +2 -1
  7. package/build/cjs/PlannerHandler2D-6c0324be.js +544 -0
  8. package/build/cjs/{SeriousBasketHandler-f3127599.js → SeriousBasketHandler-d1ae4006.js} +2 -1
  9. package/build/cjs/{ShelfPlanner-ebdb243e.js → ShelfPlanner-04d98f4d.js} +2 -1
  10. package/build/cjs/{StandardWWSHandler-c6b743e1.js → StandardWWSHandler-9b596caf.js} +2 -1
  11. package/build/cjs/{index-5526e606.js → index-633196ab.js} +501 -653
  12. package/build/cjs/index.js +6 -2
  13. package/build/esm/{DivaBoxPlanner-7cb39f00.js → DivaBoxPlanner-fa9f6ec6.js} +4 -4
  14. package/build/esm/{DivaStandardPlanner-7bb632be.js → DivaStandardPlanner-6c001048.js} +8 -28
  15. package/build/esm/{DoorPlanner-ee5b7e87.js → DoorPlanner-ef9165f9.js} +2 -1
  16. package/build/esm/{Host3DSignalR-70c009fa.js → Host3DSignalR-2dc8478a.js} +2 -1
  17. package/build/esm/{LiviqueWWSHandler-b37a5217.js → LiviqueWWSHandler-b6e8bf5f.js} +2 -1
  18. package/build/esm/{PfisterWWSHandler-4e442f71.js → PfisterWWSHandler-54b3e0aa.js} +2 -1
  19. package/build/esm/PlannerHandler2D-0e61311d.js +526 -0
  20. package/build/esm/{SeriousBasketHandler-1bdf0405.js → SeriousBasketHandler-7b097870.js} +2 -1
  21. package/build/esm/{ShelfPlanner-a9bb33c9.js → ShelfPlanner-f3e86534.js} +2 -1
  22. package/build/esm/{StandardWWSHandler-711d5a50.js → StandardWWSHandler-4b0caefd.js} +2 -1
  23. package/build/esm/{index-bca96b80.js → index-6c8de812.js} +502 -653
  24. package/build/esm/index.js +2 -1
  25. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +9 -2
  26. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  28. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts +9 -114
  29. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
  30. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts +5 -7
  31. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
  32. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +5 -6
  33. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts.map +1 -1
  34. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -2
  35. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  36. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts +1 -44
  37. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts.map +1 -1
  38. package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts +2 -0
  39. package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts.map +1 -0
  40. package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts +2 -0
  41. package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts.map +1 -0
  42. package/package.json +4 -5
  43. package/build/cjs/PlannerHandler2D-6f937986.js +0 -2470
  44. package/build/esm/PlannerHandler2D-e169e698.js +0 -2455
  45. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts +0 -2
  46. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts.map +0 -1
@@ -18,6 +18,7 @@ var _inherits = require('@babel/runtime/helpers/inherits');
18
18
  var _wrapNativeSuper = require('@babel/runtime/helpers/wrapNativeSuper');
19
19
  var BasketHandler = require('@crystaldesign/basket-handler');
20
20
  var io = require('socket.io-client');
21
+ require('@crystaldesign/planner-2d-core');
21
22
 
22
23
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
24
 
@@ -20653,11 +20654,10 @@ function getCatalogPlanner(article, catalogArticle, catalogData) {
20653
20654
  }
20654
20655
  function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
20655
20656
  var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
20656
- var catalogArticle = catalogData.allCatalogArticles[catPlanArticle.codex];
20657
+ if (catPlanArticle.hideInPlannerStep) return;
20658
+ if (catalogProps.has3dModels && !catPlanArticle.modelName3D) return;
20657
20659
  plannerPaletteViewInfo.catalogPlannerArticles.push({
20658
20660
  articleCodex: catPlanArticle.codex,
20659
- contentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.contentItemId,
20660
- groupContentItemId: catalogArticle === null || catalogArticle === void 0 ? void 0 : catalogArticle.groupContentItemId,
20661
20661
  avlFilter: catPlanArticle.avlFilter,
20662
20662
  avrFilter: catPlanArticle.avrFilter,
20663
20663
  longDescription: catPlanArticle.longDescription,
@@ -20674,7 +20674,7 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
20674
20674
  hasAVS: !!catPlanArticle.topAVS,
20675
20675
  hasAVU: !!catPlanArticle.topAVU,
20676
20676
  image: catPlanArticle.getImage(),
20677
- is3DModell: false,
20677
+ is3DModell: !!catPlanArticle.modelName3D,
20678
20678
  layer: catPlanArticle.topLayer,
20679
20679
  price: catPlanArticle.basePrice,
20680
20680
  svgSrc: (_catPlanArticle$svgs = catPlanArticle.svgs) === null || _catPlanArticle$svgs === void 0 || (_catPlanArticle$svgs = _catPlanArticle$svgs[0]) === null || _catPlanArticle$svgs === void 0 ? void 0 : _catPlanArticle$svgs.url,
@@ -29929,7 +29929,7 @@ var DivaArticle = /*#__PURE__*/function () {
29929
29929
  break;
29930
29930
  }
29931
29931
  _context.next = 4;
29932
- return Promise.resolve().then(function () { return require('./ShelfPlanner-ebdb243e.js'); });
29932
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-04d98f4d.js'); });
29933
29933
  case 4:
29934
29934
  _yield$import = _context.sent;
29935
29935
  ShelfPlanner = _yield$import["default"];
@@ -38024,7 +38024,7 @@ var DivaSet = /*#__PURE__*/function () {
38024
38024
  break;
38025
38025
  }
38026
38026
  _context5.next = 3;
38027
- return Promise.resolve().then(function () { return require('./DoorPlanner-29f34e16.js'); });
38027
+ return Promise.resolve().then(function () { return require('./DoorPlanner-ce630754.js'); });
38028
38028
  case 3:
38029
38029
  _yield$import = _context5.sent;
38030
38030
  DoorPlanner = _yield$import["default"];
@@ -42350,19 +42350,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
42350
42350
  while (1) switch (_context45.prev = _context45.next) {
42351
42351
  case 0:
42352
42352
  urlToPlanning2D = undefined;
42353
- planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
42353
+ _context45.next = 3;
42354
+ return set.getPlanning2DAsJpg();
42355
+ case 3:
42356
+ planning2DAsJPGBase64 = _context45.sent;
42354
42357
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
42355
- _context45.next = 7;
42358
+ _context45.next = 9;
42356
42359
  break;
42357
42360
  }
42358
42361
  fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'planning2D', 'jpg', variantId);
42359
- _context45.next = 6;
42362
+ _context45.next = 8;
42360
42363
  return set.plannerHandler.saveSet2DImage(basketData, set.getSetId(), planning2DAsJPGBase64, fileName, variantId);
42361
- case 6:
42364
+ case 8:
42362
42365
  urlToPlanning2D = _context45.sent;
42363
- case 7:
42366
+ case 9:
42364
42367
  return _context45.abrupt("return", urlToPlanning2D);
42365
- case 8:
42368
+ case 10:
42366
42369
  case "end":
42367
42370
  return _context45.stop();
42368
42371
  }
@@ -43605,7 +43608,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43605
43608
  break;
43606
43609
  case 3:
43607
43610
  _context12.next = 5;
43608
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-e64d0e3c.js'); });
43611
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-3c723ecc.js'); });
43609
43612
  case 5:
43610
43613
  _yield$import = _context12.sent;
43611
43614
  PfisterWWSHandler = _yield$import["default"];
@@ -43613,7 +43616,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43613
43616
  return _context12.abrupt("break", 27);
43614
43617
  case 9:
43615
43618
  _context12.next = 11;
43616
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-b69b3ff9.js'); });
43619
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-c11ea7d2.js'); });
43617
43620
  case 11:
43618
43621
  _yield$import2 = _context12.sent;
43619
43622
  LiviqueWWSHandler = _yield$import2["default"];
@@ -43621,7 +43624,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43621
43624
  return _context12.abrupt("break", 27);
43622
43625
  case 15:
43623
43626
  _context12.next = 17;
43624
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-f3127599.js'); });
43627
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d1ae4006.js'); });
43625
43628
  case 17:
43626
43629
  _yield$import3 = _context12.sent;
43627
43630
  SeriousWWSHandler = _yield$import3["default"];
@@ -43629,7 +43632,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43629
43632
  return _context12.abrupt("break", 27);
43630
43633
  case 21:
43631
43634
  _context12.next = 23;
43632
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-c6b743e1.js'); });
43635
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-9b596caf.js'); });
43633
43636
  case 23:
43634
43637
  _yield$import4 = _context12.sent;
43635
43638
  StandardWWSHandler = _yield$import4["default"];
@@ -45012,7 +45015,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
45012
45015
  while (1) switch (_context3.prev = _context3.next) {
45013
45016
  case 0:
45014
45017
  _context3.next = 2;
45015
- return Promise.resolve().then(function () { return require('./Host3DSignalR-9d0fd3b8.js'); });
45018
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-b0b1fb8d.js'); });
45016
45019
  case 2:
45017
45020
  _yield$import = _context3.sent;
45018
45021
  Host3DSignalR = _yield$import["default"];
@@ -46688,7 +46691,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46688
46691
  break;
46689
46692
  case 8:
46690
46693
  _context5.next = 10;
46691
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-6d5e0308.js'); });
46694
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-150246c0.js'); });
46692
46695
  case 10:
46693
46696
  _yield$import = _context5.sent;
46694
46697
  DivaStandardPlanner = _yield$import["default"];
@@ -46699,7 +46702,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46699
46702
  return _context5.abrupt("break", 21);
46700
46703
  case 15:
46701
46704
  _context5.next = 17;
46702
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-de40ba61.js'); });
46705
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-02a2dbbf.js'); });
46703
46706
  case 17:
46704
46707
  _yield$import2 = _context5.sent;
46705
46708
  DivaBoxPlanner = _yield$import2["default"];
@@ -47996,18 +47999,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47996
47999
  LOG$2.debug('new HQRenderScript set');
47997
48000
  (_this$setHQRenderScri = _this.setHQRenderScript) === null || _this$setHQRenderScri === void 0 || _this$setHQRenderScri.call(_this, hqRenderscript.HQRenderScript);
47998
48001
  });
48002
+ /** The latest 2D-grid render; a capture must await it, otherwise it reads the canvas of the previous planning. */
48003
+ _defineProperty__default["default"](this, "pending2DRender", void 0);
47999
48004
  _defineProperty__default["default"](this, "update2DGrid", function (set) {
48000
48005
  if (!_this.getInitPlannerViewMode || _this.getInitPlannerViewMode() == 'No') return;
48001
48006
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
48002
- if (boundingBox) {
48003
- var _this$updatePlanner2D;
48004
- (_this$updatePlanner2D = _this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 || _this$updatePlanner2D.call(_this, boundingBox);
48005
- }
48007
+ if (boundingBox) _this.start2DRender(boundingBox);
48006
48008
  });
48007
- _defineProperty__default["default"](this, "getPlanning2DAsJpg", function () {
48009
+ _defineProperty__default["default"](this, "getPlanning2DAsJpg", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
48008
48010
  var _this$getCanvas2DAsJP;
48009
- return (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this);
48010
- });
48011
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
48012
+ while (1) switch (_context.prev = _context.next) {
48013
+ case 0:
48014
+ _context.next = 2;
48015
+ return _this.pending2DRender;
48016
+ case 2:
48017
+ return _context.abrupt("return", (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this));
48018
+ case 3:
48019
+ case "end":
48020
+ return _context.stop();
48021
+ }
48022
+ }, _callee);
48023
+ })));
48011
48024
  /***********************************Functions in Logik called From View *************************************/
48012
48025
  _defineProperty__default["default"](this, "onElementSelectionChanged", function (setId, elementId, oldTabgroupType) {
48013
48026
  if (setId) {
@@ -48042,35 +48055,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48042
48055
  * @param configStepKey unique indentifier for configStep
48043
48056
  */
48044
48057
  _defineProperty__default["default"](this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
48045
- var _ref = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(configStepKey, paletteId, isUpdate, visible) {
48058
+ var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(configStepKey, paletteId, isUpdate, visible) {
48046
48059
  var _this$state2, _this$state3, _this$updateConfigIte;
48047
48060
  var retValues;
48048
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
48049
- while (1) switch (_context.prev = _context.next) {
48061
+ return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
48062
+ while (1) switch (_context2.prev = _context2.next) {
48050
48063
  case 0:
48051
- _context.next = 2;
48064
+ _context2.next = 2;
48052
48065
  return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible, !!((_this$state2 = _this.state) !== null && _this$state2 !== void 0 && _this$state2.hidePrices || (_this$state3 = _this.state) !== null && _this$state3 !== void 0 && _this$state3.hideConfigPricePreview));
48053
48066
  case 2:
48054
- retValues = _context.sent;
48067
+ retValues = _context2.sent;
48055
48068
  (_this$updateConfigIte = _this.updateConfigItems) === null || _this$updateConfigIte === void 0 || _this$updateConfigIte.call(_this, configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter, retValues.contentItemTeaser, retValues.description);
48056
48069
  case 4:
48057
48070
  case "end":
48058
- return _context.stop();
48071
+ return _context2.stop();
48059
48072
  }
48060
- }, _callee);
48073
+ }, _callee2);
48061
48074
  }));
48062
48075
  return function (_x, _x2, _x3, _x4) {
48063
- return _ref.apply(this, arguments);
48076
+ return _ref2.apply(this, arguments);
48064
48077
  };
48065
48078
  }());
48066
48079
  /**
48067
48080
  * this function laods the summary Items
48068
48081
  */
48069
- _defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2() {
48082
+ _defineProperty__default["default"](this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3() {
48070
48083
  var _this$actions, _this$actions$toggleL, _this$updateSummaryIt, _this$actions2, _this$actions2$toggle;
48071
48084
  var setPriceCurrency, setPriceFormat, summaryItems;
48072
- return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
48073
- while (1) switch (_context2.prev = _context2.next) {
48085
+ return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
48086
+ while (1) switch (_context3.prev = _context3.next) {
48074
48087
  case 0:
48075
48088
  setPriceCurrency = setHandlerInstance.getActSetPriceFormat(_this.actSet());
48076
48089
  setPriceFormat = undefined;
@@ -48081,17 +48094,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48081
48094
  }
48082
48095
  //Do also pass the correct price format
48083
48096
  (_this$actions = _this.actions) === null || _this$actions === void 0 || (_this$actions$toggleL = _this$actions.toggleLoading) === null || _this$actions$toggleL === void 0 || _this$actions$toggleL.call(_this$actions, 'SUMMARY');
48084
- _context2.next = 6;
48097
+ _context3.next = 6;
48085
48098
  return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
48086
48099
  case 6:
48087
- summaryItems = _context2.sent;
48100
+ summaryItems = _context3.sent;
48088
48101
  (_this$updateSummaryIt = _this.updateSummaryItems) === null || _this$updateSummaryIt === void 0 || _this$updateSummaryIt.call(_this, summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
48089
48102
  (_this$actions2 = _this.actions) === null || _this$actions2 === void 0 || (_this$actions2$toggle = _this$actions2.toggleLoading) === null || _this$actions2$toggle === void 0 || _this$actions2$toggle.call(_this$actions2, 'SUMMARY');
48090
48103
  case 9:
48091
48104
  case "end":
48092
- return _context2.stop();
48105
+ return _context3.stop();
48093
48106
  }
48094
- }, _callee2);
48107
+ }, _callee3);
48095
48108
  })));
48096
48109
  _defineProperty__default["default"](this, "loadStaticRoomList", function (dontUpdateView) {
48097
48110
  var _this$updateStaticRoo2;
@@ -48122,41 +48135,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48122
48135
  * @param parentElement ElementID of the parent element used for docking
48123
48136
  */
48124
48137
  _defineProperty__default["default"](this, "addPlannerElement", /*#__PURE__*/function () {
48125
- var _ref3 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(elementCodex, initParams, dontUpdateView) {
48138
+ var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(elementCodex, initParams, dontUpdateView) {
48126
48139
  var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$updateViewPlann, _this$updateElementSe;
48127
48140
  var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
48128
- return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
48129
- while (1) switch (_context3.prev = _context3.next) {
48141
+ return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
48142
+ while (1) switch (_context4.prev = _context4.next) {
48130
48143
  case 0:
48131
48144
  set = _this.actSet();
48132
48145
  (_this$actions3 = _this.actions) === null || _this$actions3 === void 0 || (_this$actions3$toggle = _this$actions3.toggleLoading) === null || _this$actions3$toggle === void 0 || _this$actions3$toggle.call(_this$actions3, 'plannElement' + elementCodex, false, true);
48133
- _context3.prev = 2;
48134
- _context3.next = 5;
48146
+ _context4.prev = 2;
48147
+ _context4.next = 5;
48135
48148
  return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
48136
48149
  case 5:
48137
- newArticle = _context3.sent;
48138
- _context3.next = 13;
48150
+ newArticle = _context4.sent;
48151
+ _context4.next = 13;
48139
48152
  break;
48140
48153
  case 8:
48141
- _context3.prev = 8;
48142
- _context3.t0 = _context3["catch"](2);
48154
+ _context4.prev = 8;
48155
+ _context4.t0 = _context4["catch"](2);
48143
48156
  (_this$actions4 = _this.actions) === null || _this$actions4 === void 0 || (_this$actions4$openMo = _this$actions4.openModal) === null || _this$actions4$openMo === void 0 || _this$actions4$openMo.call(_this$actions4, {
48144
48157
  accept: true,
48145
48158
  title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
48146
- text: (_context3.t0 !== null && _context3.t0 !== void 0 && _context3.t0.message ? _context3.t0.message : (_this$i18n2 = _this.i18n()) === null || _this$i18n2 === void 0 ? void 0 : _this$i18n2.t('modal.errorcode')) + ':' + DivaUtils__default["default"].getCurrentTraceId() + ' ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true)
48159
+ text: (_context4.t0 !== null && _context4.t0 !== void 0 && _context4.t0.message ? _context4.t0.message : (_this$i18n2 = _this.i18n()) === null || _this$i18n2 === void 0 ? void 0 : _this$i18n2.t('modal.errorcode')) + ':' + DivaUtils__default["default"].getCurrentTraceId() + ' ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true)
48147
48160
  });
48148
48161
  (_this$actions5 = _this.actions) === null || _this$actions5 === void 0 || (_this$actions5$toggle = _this$actions5.toggleLoading) === null || _this$actions5$toggle === void 0 || _this$actions5$toggle.call(_this$actions5, 'plannElement' + elementCodex, false, false);
48149
- throw new Error(_context3.t0);
48162
+ throw new Error(_context4.t0);
48150
48163
  case 13:
48151
48164
  (_this$actions6 = _this.actions) === null || _this$actions6 === void 0 || (_this$actions6$toggle = _this$actions6.toggleLoading) === null || _this$actions6$toggle === void 0 || _this$actions6$toggle.call(_this$actions6, 'plannElement' + elementCodex, false, false);
48152
48165
  if (!newArticle.toDeleteAfterInit) {
48153
- _context3.next = 18;
48166
+ _context4.next = 18;
48154
48167
  break;
48155
48168
  }
48156
- _context3.next = 17;
48169
+ _context4.next = 17;
48157
48170
  return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
48158
48171
  case 17:
48159
- return _context3.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
48172
+ return _context4.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
48160
48173
  case 18:
48161
48174
  _this.updateConfigStructure();
48162
48175
  (_this$updateViewPlann = _this.updateViewPlannerElements) === null || _this$updateViewPlann === void 0 || _this$updateViewPlann.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
@@ -48168,15 +48181,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48168
48181
  if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
48169
48182
  _this.checkMatchingProducts('onAdd');
48170
48183
  _this.plannerChangeLog('onAddPlanner');
48171
- return _context3.abrupt("return", 'ElementAdded');
48184
+ return _context4.abrupt("return", 'ElementAdded');
48172
48185
  case 29:
48173
48186
  case "end":
48174
- return _context3.stop();
48187
+ return _context4.stop();
48175
48188
  }
48176
- }, _callee3, null, [[2, 8]]);
48189
+ }, _callee4, null, [[2, 8]]);
48177
48190
  }));
48178
48191
  return function (_x5, _x6, _x7) {
48179
- return _ref3.apply(this, arguments);
48192
+ return _ref4.apply(this, arguments);
48180
48193
  };
48181
48194
  }());
48182
48195
  /**
@@ -48186,27 +48199,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48186
48199
  * @param articleCodex articleCodex of the new Element
48187
48200
  */
48188
48201
  _defineProperty__default["default"](this, "switchPlannerElement", /*#__PURE__*/function () {
48189
- var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(setId, elementId, articleCodex, initParams) {
48202
+ var _ref5 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(setId, elementId, articleCodex, initParams) {
48190
48203
  var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$updateViewPlann2, _this$updateElementSe2;
48191
48204
  var set, variantValues, deletionResult, article;
48192
- return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
48193
- while (1) switch (_context4.prev = _context4.next) {
48205
+ return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
48206
+ while (1) switch (_context5.prev = _context5.next) {
48194
48207
  case 0:
48195
48208
  _this.setActSet(setId);
48196
48209
  set = _this.actSet();
48197
48210
  variantValues = setHandlerInstance.getVariantValuesOfElement(set, elementId);
48198
- _context4.next = 5;
48211
+ _context5.next = 5;
48199
48212
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId);
48200
48213
  case 5:
48201
- deletionResult = _context4.sent;
48214
+ deletionResult = _context5.sent;
48202
48215
  (_this$actions7 = _this.actions) === null || _this$actions7 === void 0 || (_this$actions7$toggle = _this$actions7.toggleLoading) === null || _this$actions7$toggle === void 0 || _this$actions7$toggle.call(_this$actions7, 'plannerswitch' + articleCodex, false, true);
48203
48216
  initParams.oldPlannerTransform = deletionResult.oldTransform;
48204
48217
  initParams.variantValues = _objectSpread$8(_objectSpread$8({}, variantValues), {}, _defineProperty__default["default"]({}, (!set.CatalogData.isIDMFormat ? 'OPT' : '') + 'PLANNERSWITCH', (!set.CatalogData.isIDMFormat ? 'OPV' : '') + articleCodex));
48205
- _context4.next = 11;
48218
+ _context5.next = 11;
48206
48219
  return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
48207
48220
  case 11:
48208
- article = _context4.sent;
48209
- _context4.next = 14;
48221
+ article = _context5.sent;
48222
+ _context5.next = 14;
48210
48223
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
48211
48224
  case 14:
48212
48225
  (_this$actions8 = _this.actions) === null || _this$actions8 === void 0 || (_this$actions8$toggle = _this$actions8.toggleLoading) === null || _this$actions8$toggle === void 0 || _this$actions8$toggle.call(_this$actions8, 'plannerswitch' + articleCodex, false, false);
@@ -48221,29 +48234,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48221
48234
  _this.plannerChangeLog('onSwitchPlanner');
48222
48235
  case 24:
48223
48236
  case "end":
48224
- return _context4.stop();
48237
+ return _context5.stop();
48225
48238
  }
48226
- }, _callee4);
48239
+ }, _callee5);
48227
48240
  }));
48228
48241
  return function (_x8, _x9, _x10, _x11) {
48229
- return _ref4.apply(this, arguments);
48242
+ return _ref5.apply(this, arguments);
48230
48243
  };
48231
48244
  }());
48232
48245
  _defineProperty__default["default"](this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48233
- var _ref5 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
48246
+ var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
48234
48247
  var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
48235
48248
  var set, retVal, _this$updateViewPlann3;
48236
- return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
48237
- while (1) switch (_context5.prev = _context5.next) {
48249
+ return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
48250
+ while (1) switch (_context6.prev = _context6.next) {
48238
48251
  case 0:
48239
48252
  set = _this.actSet();
48240
48253
  (_this$actions9 = _this.actions) === null || _this$actions9 === void 0 || (_this$actions9$toggle = _this$actions9.toggleLoading) === null || _this$actions9$toggle === void 0 || _this$actions9$toggle.call(_this$actions9, 'LoadingArticle', false, true);
48241
- _context5.next = 4;
48254
+ _context6.next = 4;
48242
48255
  return setHandlerInstance.addAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId, {
48243
48256
  partlistCodexToInit: partlistCodexToInit
48244
48257
  });
48245
48258
  case 4:
48246
- retVal = _context5.sent;
48259
+ retVal = _context6.sent;
48247
48260
  (_this$actions10 = _this.actions) === null || _this$actions10 === void 0 || (_this$actions10$toggl = _this$actions10.toggleLoading) === null || _this$actions10$toggl === void 0 || _this$actions10$toggl.call(_this$actions10, 'LoadingArticle', false, false);
48248
48261
  if (retVal !== false) {
48249
48262
  _this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
@@ -48255,29 +48268,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48255
48268
  }
48256
48269
  _this.checkMatchingProducts('onShelfAdd');
48257
48270
  _this.plannerChangeLog('onAddPlanner');
48258
- return _context5.abrupt("return", retVal);
48271
+ return _context6.abrupt("return", retVal);
48259
48272
  case 10:
48260
48273
  case "end":
48261
- return _context5.stop();
48274
+ return _context6.stop();
48262
48275
  }
48263
- }, _callee5);
48276
+ }, _callee6);
48264
48277
  }));
48265
48278
  return function (_x12, _x13, _x14, _x15, _x16, _x17) {
48266
- return _ref5.apply(this, arguments);
48279
+ return _ref6.apply(this, arguments);
48267
48280
  };
48268
48281
  }());
48269
48282
  _defineProperty__default["default"](this, "moveShelfItem", /*#__PURE__*/function () {
48270
- var _ref6 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(paletteId, grid, initialIndex, finalIndex, configStepKey) {
48283
+ var _ref7 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(paletteId, grid, initialIndex, finalIndex, configStepKey) {
48271
48284
  var _this$updateViewPlann4;
48272
48285
  var set, result, _this$updatePlannerMs, _this$i18n3;
48273
- return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
48274
- while (1) switch (_context6.prev = _context6.next) {
48286
+ return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
48287
+ while (1) switch (_context7.prev = _context7.next) {
48275
48288
  case 0:
48276
48289
  set = _this.actSet();
48277
- _context6.next = 3;
48290
+ _context7.next = 3;
48278
48291
  return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
48279
48292
  case 3:
48280
- result = _context6.sent;
48293
+ result = _context7.sent;
48281
48294
  if (result == 'RESETTED_CELLS') {
48282
48295
  (_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
48283
48296
  }
@@ -48287,12 +48300,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48287
48300
  _this.updatePlannerView('MOVE_SHELF_ITEM');
48288
48301
  case 9:
48289
48302
  case "end":
48290
- return _context6.stop();
48303
+ return _context7.stop();
48291
48304
  }
48292
- }, _callee6);
48305
+ }, _callee7);
48293
48306
  }));
48294
48307
  return function (_x18, _x19, _x20, _x21, _x22) {
48295
- return _ref6.apply(this, arguments);
48308
+ return _ref7.apply(this, arguments);
48296
48309
  };
48297
48310
  }());
48298
48311
  _defineProperty__default["default"](this, "moveDoors", function (movedDoor, targetDoor) {
@@ -48300,14 +48313,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48300
48313
  _this.updatePlannerView('MOVE_DOORS');
48301
48314
  });
48302
48315
  _defineProperty__default["default"](this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48303
- var _ref7 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
48316
+ var _ref8 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
48304
48317
  var _this$updateViewPlann5;
48305
48318
  var set;
48306
- return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
48307
- while (1) switch (_context7.prev = _context7.next) {
48319
+ return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
48320
+ while (1) switch (_context8.prev = _context8.next) {
48308
48321
  case 0:
48309
48322
  set = _this.actSet();
48310
- _context7.next = 3;
48323
+ _context8.next = 3;
48311
48324
  return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
48312
48325
  case 3:
48313
48326
  _this.updateConfigStructure();
@@ -48320,12 +48333,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48320
48333
  _this.plannerChangeLog('onDeletePlanner');
48321
48334
  case 11:
48322
48335
  case "end":
48323
- return _context7.stop();
48336
+ return _context8.stop();
48324
48337
  }
48325
- }, _callee7);
48338
+ }, _callee8);
48326
48339
  }));
48327
48340
  return function (_x23, _x24, _x25, _x26, _x27) {
48328
- return _ref7.apply(this, arguments);
48341
+ return _ref8.apply(this, arguments);
48329
48342
  };
48330
48343
  }());
48331
48344
  /**
@@ -48336,12 +48349,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48336
48349
  * @param transState
48337
48350
  */
48338
48351
  _defineProperty__default["default"](this, "updatePlannerTrans", /*#__PURE__*/function () {
48339
- var _ref8 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
48352
+ var _ref9 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
48340
48353
  var _this$updateElementSe3;
48341
- return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
48342
- while (1) switch (_context8.prev = _context8.next) {
48354
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
48355
+ while (1) switch (_context9.prev = _context9.next) {
48343
48356
  case 0:
48344
- _context8.next = 2;
48357
+ _context9.next = 2;
48345
48358
  return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
48346
48359
  case 2:
48347
48360
  if (transState == 'END') {
@@ -48350,12 +48363,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48350
48363
  }
48351
48364
  case 3:
48352
48365
  case "end":
48353
- return _context8.stop();
48366
+ return _context9.stop();
48354
48367
  }
48355
- }, _callee8);
48368
+ }, _callee9);
48356
48369
  }));
48357
48370
  return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
48358
- return _ref8.apply(this, arguments);
48371
+ return _ref9.apply(this, arguments);
48359
48372
  };
48360
48373
  }());
48361
48374
  /**
@@ -48374,18 +48387,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48374
48387
  }
48375
48388
  });
48376
48389
  _defineProperty__default["default"](this, "updateAccessoireQuantity", /*#__PURE__*/function () {
48377
- var _ref9 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
48390
+ var _ref10 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
48378
48391
  var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
48379
48392
  var set, ret;
48380
- return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
48381
- while (1) switch (_context9.prev = _context9.next) {
48393
+ return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
48394
+ while (1) switch (_context10.prev = _context10.next) {
48382
48395
  case 0:
48383
48396
  set = _this.actSet();
48384
48397
  (_this$actions11 = _this.actions) === null || _this$actions11 === void 0 || (_this$actions11$toggl = _this$actions11.toggleLoading) === null || _this$actions11$toggl === void 0 || _this$actions11$toggl.call(_this$actions11, 'LoadingArticles_' + accessoireItem.articleCodex, false, true);
48385
- _context9.next = 4;
48398
+ _context10.next = 4;
48386
48399
  return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
48387
48400
  case 4:
48388
- ret = _context9.sent;
48401
+ ret = _context10.sent;
48389
48402
  (_this$actions12 = _this.actions) === null || _this$actions12 === void 0 || (_this$actions12$toggl = _this$actions12.toggleLoading) === null || _this$actions12$toggl === void 0 || _this$actions12$toggl.call(_this$actions12, 'LoadingArticles_' + accessoireItem.articleCodex, false, false);
48390
48403
  if (ret.somethingChanged) _this.updateConfigStructure();
48391
48404
  _this.updatePlannerView('UPDATE_ACC_QUANTITY');
@@ -48395,25 +48408,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48395
48408
  _this.plannerChangeLog('onUpdateAccessoireQuantity');
48396
48409
  case 12:
48397
48410
  case "end":
48398
- return _context9.stop();
48411
+ return _context10.stop();
48399
48412
  }
48400
- }, _callee9);
48413
+ }, _callee10);
48401
48414
  }));
48402
48415
  return function (_x35, _x36, _x37, _x38) {
48403
- return _ref9.apply(this, arguments);
48416
+ return _ref10.apply(this, arguments);
48404
48417
  };
48405
48418
  }());
48406
48419
  _defineProperty__default["default"](this, "deleteAccessoire", /*#__PURE__*/function () {
48407
- var _ref10 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(articleCodex, parentBasketId) {
48420
+ var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(articleCodex, parentBasketId) {
48408
48421
  var set, wasDeleted, _this$updateViewPlann6;
48409
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
48410
- while (1) switch (_context10.prev = _context10.next) {
48422
+ return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
48423
+ while (1) switch (_context11.prev = _context11.next) {
48411
48424
  case 0:
48412
48425
  set = _this.actSet();
48413
- _context10.next = 3;
48426
+ _context11.next = 3;
48414
48427
  return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
48415
48428
  case 3:
48416
- wasDeleted = _context10.sent;
48429
+ wasDeleted = _context11.sent;
48417
48430
  if (wasDeleted) {
48418
48431
  _this.updateConfigStructure();
48419
48432
  (_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
@@ -48423,15 +48436,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48423
48436
  }
48424
48437
  _this.checkMatchingProducts('onAccessoireDelete');
48425
48438
  _this.plannerChangeLog('onDeletePlanner');
48426
- return _context10.abrupt("return", wasDeleted);
48439
+ return _context11.abrupt("return", wasDeleted);
48427
48440
  case 8:
48428
48441
  case "end":
48429
- return _context10.stop();
48442
+ return _context11.stop();
48430
48443
  }
48431
- }, _callee10);
48444
+ }, _callee11);
48432
48445
  }));
48433
48446
  return function (_x39, _x40) {
48434
- return _ref10.apply(this, arguments);
48447
+ return _ref11.apply(this, arguments);
48435
48448
  };
48436
48449
  }());
48437
48450
  _defineProperty__default["default"](this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
@@ -48453,13 +48466,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48453
48466
  * @param configStepKey act ConfigStep
48454
48467
  */
48455
48468
  _defineProperty__default["default"](this, "configSingleIsChanged", /*#__PURE__*/function () {
48456
- var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
48469
+ var _ref12 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
48457
48470
  var set;
48458
- return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
48459
- while (1) switch (_context11.prev = _context11.next) {
48471
+ return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
48472
+ while (1) switch (_context12.prev = _context12.next) {
48460
48473
  case 0:
48461
48474
  set = _this.actSet();
48462
- _context11.next = 3;
48475
+ _context12.next = 3;
48463
48476
  return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
48464
48477
  case 3:
48465
48478
  _this.updatePriceInView();
@@ -48469,15 +48482,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48469
48482
  configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
48470
48483
  _this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
48471
48484
  }
48472
- return _context11.abrupt("return", configStepKey);
48485
+ return _context12.abrupt("return", configStepKey);
48473
48486
  case 7:
48474
48487
  case "end":
48475
- return _context11.stop();
48488
+ return _context12.stop();
48476
48489
  }
48477
- }, _callee11);
48490
+ }, _callee12);
48478
48491
  }));
48479
48492
  return function (_x41, _x42, _x43, _x44, _x45, _x46) {
48480
- return _ref11.apply(this, arguments);
48493
+ return _ref12.apply(this, arguments);
48481
48494
  };
48482
48495
  }());
48483
48496
  /**
@@ -48491,23 +48504,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48491
48504
  */
48492
48505
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
48493
48506
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
48494
- var _ref12 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
48507
+ var _ref13 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
48495
48508
  var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
48496
48509
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
48497
- return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
48498
- while (1) switch (_context12.prev = _context12.next) {
48510
+ return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
48511
+ while (1) switch (_context13.prev = _context13.next) {
48499
48512
  case 0:
48500
48513
  set = _this.actSet();
48501
48514
  (_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
48502
- _context12.next = 4;
48515
+ _context13.next = 4;
48503
48516
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
48504
48517
  case 4:
48505
- returnValues = _context12.sent;
48518
+ returnValues = _context13.sent;
48506
48519
  (_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
48507
48520
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
48508
48521
  _this.checkMatchingProducts('onConfig');
48509
48522
  if (dontUpdatePlannerView) {
48510
- _context12.next = 18;
48523
+ _context13.next = 18;
48511
48524
  break;
48512
48525
  }
48513
48526
  _this.updateConfiguratorStructure(structure);
@@ -48521,80 +48534,80 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48521
48534
  _this.updateViewButtonsDependigOnConfigStructure();
48522
48535
  _this.updatePlannerView('DO_CONFIGURE', myValues);
48523
48536
  _this.updateWebConfiguratorTitle();
48524
- _context12.next = 18;
48537
+ _context13.next = 18;
48525
48538
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
48526
48539
  case 18:
48527
48540
  if (dontCallEvents) {
48528
- _context12.next = 21;
48541
+ _context13.next = 21;
48529
48542
  break;
48530
48543
  }
48531
- _context12.next = 21;
48544
+ _context13.next = 21;
48532
48545
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
48533
48546
  case 21:
48534
48547
  _this.configuratorChangeLog('onConfigurationChange', myValues);
48535
48548
  case 22:
48536
48549
  case "end":
48537
- return _context12.stop();
48550
+ return _context13.stop();
48538
48551
  }
48539
- }, _callee12);
48552
+ }, _callee13);
48540
48553
  }));
48541
48554
  return function (_x47, _x48, _x49, _x50, _x51) {
48542
- return _ref12.apply(this, arguments);
48555
+ return _ref13.apply(this, arguments);
48543
48556
  };
48544
48557
  }());
48545
48558
  _defineProperty__default["default"](this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
48546
- var _ref13 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(myValues, isInit, eventKey) {
48559
+ var _ref14 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(myValues, isInit, eventKey) {
48547
48560
  var _myValues;
48548
48561
  var set, articles, article;
48549
- return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
48550
- while (1) switch (_context13.prev = _context13.next) {
48562
+ return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
48563
+ while (1) switch (_context14.prev = _context14.next) {
48551
48564
  case 0:
48552
48565
  if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
48553
- _context13.next = 2;
48566
+ _context14.next = 2;
48554
48567
  break;
48555
48568
  }
48556
- return _context13.abrupt("return");
48569
+ return _context14.abrupt("return");
48557
48570
  case 2:
48558
48571
  set = _this.actSet();
48559
48572
  if (set) {
48560
- _context13.next = 5;
48573
+ _context14.next = 5;
48561
48574
  break;
48562
48575
  }
48563
- return _context13.abrupt("return");
48576
+ return _context14.abrupt("return");
48564
48577
  case 5:
48565
48578
  if (!(!myValues || eventKey !== null && eventKey !== void 0 && eventKey.endsWith('repairing'))) {
48566
- _context13.next = 11;
48579
+ _context14.next = 11;
48567
48580
  break;
48568
48581
  }
48569
48582
  //get first option of the first article
48570
48583
  articles = set.getDivaArticles();
48571
48584
  article = articles[Object.keys(articles)[0]];
48572
48585
  if (article) {
48573
- _context13.next = 10;
48586
+ _context14.next = 10;
48574
48587
  break;
48575
48588
  }
48576
- return _context13.abrupt("return");
48589
+ return _context14.abrupt("return");
48577
48590
  case 10:
48578
48591
  myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutEmptyFreetext;
48579
48592
  case 11:
48580
- _context13.t0 = _this.divaBasketHandler;
48581
- _context13.t1 = set;
48582
- _context13.next = 15;
48593
+ _context14.t0 = _this.divaBasketHandler;
48594
+ _context14.t1 = set;
48595
+ _context14.next = 15;
48583
48596
  return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
48584
48597
  case 15:
48585
- _context13.t2 = _context13.sent;
48586
- _context13.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
48587
- _context13.t4 = isInit;
48588
- _context13.t5 = eventKey;
48589
- return _context13.abrupt("return", _context13.t0.fillBaksetforOnWebPlanerConfigChange.call(_context13.t0, _context13.t1, _context13.t2, _context13.t3, _context13.t4, _context13.t5));
48598
+ _context14.t2 = _context14.sent;
48599
+ _context14.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
48600
+ _context14.t4 = isInit;
48601
+ _context14.t5 = eventKey;
48602
+ return _context14.abrupt("return", _context14.t0.fillBaksetforOnWebPlanerConfigChange.call(_context14.t0, _context14.t1, _context14.t2, _context14.t3, _context14.t4, _context14.t5));
48590
48603
  case 20:
48591
48604
  case "end":
48592
- return _context13.stop();
48605
+ return _context14.stop();
48593
48606
  }
48594
- }, _callee13);
48607
+ }, _callee14);
48595
48608
  }));
48596
48609
  return function (_x52, _x53, _x54) {
48597
- return _ref13.apply(this, arguments);
48610
+ return _ref14.apply(this, arguments);
48598
48611
  };
48599
48612
  }());
48600
48613
  _defineProperty__default["default"](this, "getPosNr", function (basketId) {
@@ -48632,10 +48645,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48632
48645
  return _createClass__default["default"](DivaWebPlanner, [{
48633
48646
  key: "initialize",
48634
48647
  value: function () {
48635
- var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(cache) {
48648
+ var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(cache) {
48636
48649
  var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
48637
- return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
48638
- while (1) switch (_context14.prev = _context14.next) {
48650
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
48651
+ while (1) switch (_context15.prev = _context15.next) {
48639
48652
  case 0:
48640
48653
  this.api = new DivaApiHandler(this.plannerConfig, this.handler, cache);
48641
48654
  this.api.setI18n(this.i18n);
@@ -48649,15 +48662,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48649
48662
  warningTime: 2000,
48650
48663
  errorTime: 4000
48651
48664
  });
48652
- _context14.next = 8;
48665
+ _context15.next = 8;
48653
48666
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
48654
48667
  case 8:
48655
48668
  this.plannerHandler = new DivaPlannerHandler(false);
48656
48669
  viewReadyPromise = this.initViewApiDependencies();
48657
- _context14.next = 12;
48670
+ _context15.next = 12;
48658
48671
  return this.divaBasketHandler.initializeBasket(this.api);
48659
48672
  case 12:
48660
- loadSuccessful = _context14.sent;
48673
+ loadSuccessful = _context15.sent;
48661
48674
  if (this.plannerConfig.configuratorSessionId) {
48662
48675
  // ID forced from outside (Landingpage, PDP, Planung-ändern)
48663
48676
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
@@ -48669,14 +48682,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48669
48682
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
48670
48683
  }
48671
48684
  if (!loadSuccessful) {
48672
- _context14.next = 31;
48685
+ _context15.next = 31;
48673
48686
  break;
48674
48687
  }
48675
- _context14.prev = 15;
48676
- _context14.next = 18;
48688
+ _context15.prev = 15;
48689
+ _context15.next = 18;
48677
48690
  return this.initializeSets(loadSuccessful, viewReadyPromise);
48678
48691
  case 18:
48679
- ret = _context14.sent;
48692
+ ret = _context15.sent;
48680
48693
  set = this.actSet();
48681
48694
  if (ret && set && set.CatalogData.archived) {
48682
48695
  if (this.i18n()) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
@@ -48685,15 +48698,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48685
48698
  text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
48686
48699
  });
48687
48700
  }
48688
- return _context14.abrupt("return", ret);
48701
+ return _context15.abrupt("return", ret);
48689
48702
  case 24:
48690
- _context14.prev = 24;
48691
- _context14.t0 = _context14["catch"](15);
48692
- LOG$2.error(_context14.t0);
48693
- this.onError(_context14.t0);
48694
- return _context14.abrupt("return", false);
48703
+ _context15.prev = 24;
48704
+ _context15.t0 = _context15["catch"](15);
48705
+ LOG$2.error(_context15.t0);
48706
+ this.onError(_context15.t0);
48707
+ return _context15.abrupt("return", false);
48695
48708
  case 29:
48696
- _context14.next = 35;
48709
+ _context15.next = 35;
48697
48710
  break;
48698
48711
  case 31:
48699
48712
  this.onError();
@@ -48702,12 +48715,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48702
48715
  LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
48703
48716
  initializationId: initializationId
48704
48717
  }, true);
48705
- return _context14.abrupt("return", false);
48718
+ return _context15.abrupt("return", false);
48706
48719
  case 35:
48707
48720
  case "end":
48708
- return _context14.stop();
48721
+ return _context15.stop();
48709
48722
  }
48710
- }, _callee14, this, [[15, 24]]);
48723
+ }, _callee15, this, [[15, 24]]);
48711
48724
  }));
48712
48725
  function initialize(_x55) {
48713
48726
  return _initialize.apply(this, arguments);
@@ -48717,50 +48730,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48717
48730
  }, {
48718
48731
  key: "initializeSets",
48719
48732
  value: function () {
48720
- var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(loadSuccessful, viewReadyPromise) {
48733
+ var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(loadSuccessful, viewReadyPromise) {
48721
48734
  var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
48722
48735
  var _this$actions16, _this$actions16$toggl, initSetState, set, oldProductId, _result$customData$SA, _result$customData, _result$customData2, _result$customData$SA2, _result$customData3, _result$customData4, result, _this$actions18, catalogData, initializationId, initializationType;
48723
- return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
48724
- while (1) switch (_context15.prev = _context15.next) {
48736
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
48737
+ while (1) switch (_context16.prev = _context16.next) {
48725
48738
  case 0:
48726
48739
  if (!(typeof loadSuccessful != 'boolean')) {
48727
- _context15.next = 9;
48740
+ _context16.next = 9;
48728
48741
  break;
48729
48742
  }
48730
48743
  if (!(loadSuccessful.type == 'ProductList')) {
48731
- _context15.next = 9;
48744
+ _context16.next = 9;
48732
48745
  break;
48733
48746
  }
48734
- _context15.next = 4;
48747
+ _context16.next = 4;
48735
48748
  return viewReadyPromise;
48736
48749
  case 4:
48737
- _context15.next = 6;
48750
+ _context16.next = 6;
48738
48751
  return this.initView();
48739
48752
  case 6:
48740
48753
  this.subscribeToWebPlannerEvents();
48741
48754
  (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || (_this$actions16$toggl = _this$actions16.toggleLoading) === null || _this$actions16$toggl === void 0 || _this$actions16$toggl.call(_this$actions16, 'Planner_Loading', false, false);
48742
- return _context15.abrupt("return", true);
48755
+ return _context16.abrupt("return", true);
48743
48756
  case 9:
48744
48757
  this.divaNr = this.divaBasketHandler.actDivaNr;
48745
48758
  initSetState = this.getInitStateForSet();
48746
48759
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
48747
- _context15.next = 14;
48760
+ _context16.next = 14;
48748
48761
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
48749
48762
  case 14:
48750
48763
  set = this.actSet();
48751
48764
  oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
48752
48765
  if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
48753
- _context15.next = 27;
48766
+ _context16.next = 27;
48754
48767
  break;
48755
48768
  }
48756
- _context15.next = 21;
48769
+ _context16.next = 21;
48757
48770
  return this.divaBasketHandler.getProduct(this.api, oldProductId);
48758
48771
  case 21:
48759
- result = _context15.sent;
48772
+ result = _context16.sent;
48760
48773
  if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
48761
48774
  (_result$customData$SA = result === null || result === void 0 || (_result$customData = result.customData) === null || _result$customData === void 0 || (_result$customData = _result$customData.SAP) === null || _result$customData === void 0 ? void 0 : _result$customData.SAP_MARA_MATKL) !== null && _result$customData$SA !== void 0 ? _result$customData$SA : result === null || result === void 0 || (_result$customData2 = result.customData) === null || _result$customData2 === void 0 || (_result$customData2 = _result$customData2.SAP_MARA_MATKL) === null || _result$customData2 === void 0 ? void 0 : _result$customData2.value;
48762
48775
  (_result$customData$SA2 = result === null || result === void 0 || (_result$customData3 = result.customData) === null || _result$customData3 === void 0 || (_result$customData3 = _result$customData3.SAP) === null || _result$customData3 === void 0 ? void 0 : _result$customData3.SAP_MARA_PRDHA) !== null && _result$customData$SA2 !== void 0 ? _result$customData$SA2 : result === null || result === void 0 || (_result$customData4 = result.customData) === null || _result$customData4 === void 0 || (_result$customData4 = _result$customData4.SAP_MARA_PRDHA) === null || _result$customData4 === void 0 ? void 0 : _result$customData4.value;
48763
- _context15.next = 28;
48776
+ _context16.next = 28;
48764
48777
  break;
48765
48778
  case 27:
48766
48779
  if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -48769,10 +48782,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48769
48782
  }
48770
48783
  }
48771
48784
  case 28:
48772
- _context15.next = 30;
48785
+ _context16.next = 30;
48773
48786
  return viewReadyPromise;
48774
48787
  case 30:
48775
- _context15.next = 32;
48788
+ _context16.next = 32;
48776
48789
  return this.initView();
48777
48790
  case 32:
48778
48791
  (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
@@ -48809,15 +48822,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48809
48822
  }, false);
48810
48823
  this.configuratorChangeLog('onConfigurationInit', undefined, true);
48811
48824
  this.plannerChangeLog('onInitPlanner', true);
48812
- _context15.next = 43;
48825
+ _context16.next = 43;
48813
48826
  return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
48814
48827
  case 43:
48815
- return _context15.abrupt("return", true);
48828
+ return _context16.abrupt("return", true);
48816
48829
  case 44:
48817
48830
  case "end":
48818
- return _context15.stop();
48831
+ return _context16.stop();
48819
48832
  }
48820
- }, _callee15, this);
48833
+ }, _callee16, this);
48821
48834
  }));
48822
48835
  function initializeSets(_x56, _x57) {
48823
48836
  return _initializeSets.apply(this, arguments);
@@ -48978,24 +48991,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48978
48991
  }, {
48979
48992
  key: "initView",
48980
48993
  value: (function () {
48981
- var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16() {
48994
+ var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17() {
48982
48995
  var _this$initConfigurato;
48983
48996
  var set, plannerMode, _this$initConfigurato2, _this$initPlannerView, _this$initConfigurato3, _this$updateViewButto, _this$updateViewPlann9, _this$onBasketInitial;
48984
- return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
48985
- while (1) switch (_context16.prev = _context16.next) {
48997
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
48998
+ while (1) switch (_context17.prev = _context17.next) {
48986
48999
  case 0:
48987
49000
  set = this.actSet();
48988
49001
  plannerMode = this.getPlannerMode();
48989
49002
  (_this$initConfigurato = this.initConfiguratorMode) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, plannerMode);
48990
49003
  if (!(plannerMode == 'ProductList')) {
48991
- _context16.next = 7;
49004
+ _context17.next = 7;
48992
49005
  break;
48993
49006
  }
48994
49007
  (_this$initConfigurato2 = this.initConfiguratorStructure) === null || _this$initConfigurato2 === void 0 || _this$initConfigurato2.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
48995
- _context16.next = 17;
49008
+ _context17.next = 17;
48996
49009
  break;
48997
49010
  case 7:
48998
- _context16.next = 9;
49011
+ _context17.next = 9;
48999
49012
  return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
49000
49013
  case 9:
49001
49014
  //first load the Configuratorstructure STARTCONFIG
@@ -49009,13 +49022,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49009
49022
  (_this$onBasketInitial = this.onBasketInitialized) === null || _this$onBasketInitial === void 0 || _this$onBasketInitial.call(this);
49010
49023
  this.checkMatchingProducts('onInit');
49011
49024
  case 17:
49012
- _context16.next = 19;
49025
+ _context17.next = 19;
49013
49026
  return this.runInitMode(plannerMode);
49014
49027
  case 19:
49015
49028
  case "end":
49016
- return _context16.stop();
49029
+ return _context17.stop();
49017
49030
  }
49018
- }, _callee16, this);
49031
+ }, _callee17, this);
49019
49032
  }));
49020
49033
  function initView() {
49021
49034
  return _initView.apply(this, arguments);
@@ -49036,25 +49049,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49036
49049
  }, {
49037
49050
  key: "runInitMode",
49038
49051
  value: function () {
49039
- var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(plannerMode) {
49052
+ var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(plannerMode) {
49040
49053
  var _this$plannerConfig$i, _this$state5;
49041
49054
  var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
49042
- return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
49043
- while (1) switch (_context17.prev = _context17.next) {
49055
+ return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
49056
+ while (1) switch (_context18.prev = _context18.next) {
49044
49057
  case 0:
49045
49058
  doDefault = true;
49046
49059
  if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
49047
- _context17.next = 9;
49060
+ _context18.next = 9;
49048
49061
  break;
49049
49062
  }
49050
49063
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
49051
49064
  (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
49052
49065
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
49053
- _context17.next = 6;
49066
+ _context18.next = 6;
49054
49067
  return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
49055
49068
  case 6:
49056
49069
  doDefault = false;
49057
- _context17.next = 10;
49070
+ _context18.next = 10;
49058
49071
  break;
49059
49072
  case 9:
49060
49073
  if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.dimensions.isMobile) {
@@ -49078,9 +49091,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49078
49091
  }
49079
49092
  case 11:
49080
49093
  case "end":
49081
- return _context17.stop();
49094
+ return _context18.stop();
49082
49095
  }
49083
- }, _callee17, this);
49096
+ }, _callee18, this);
49084
49097
  }));
49085
49098
  function runInitMode(_x58) {
49086
49099
  return _runInitMode.apply(this, arguments);
@@ -49090,16 +49103,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49090
49103
  }, {
49091
49104
  key: "addSetToActPlanningByDivaNr",
49092
49105
  value: function () {
49093
- var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(divaNr) {
49106
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(divaNr) {
49094
49107
  var _this$updateViewPlann10;
49095
49108
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
49096
- return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
49097
- while (1) switch (_context18.prev = _context18.next) {
49109
+ return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
49110
+ while (1) switch (_context19.prev = _context19.next) {
49098
49111
  case 0:
49099
49112
  set = this.actSet();
49100
49113
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
49101
49114
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
49102
- _context18.next = 5;
49115
+ _context19.next = 5;
49103
49116
  return this.divaBasketHandler.initializeBasket(this.api);
49104
49117
  case 5:
49105
49118
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -49107,30 +49120,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49107
49120
  i = 0;
49108
49121
  case 8:
49109
49122
  if (!(i < orderSets.length)) {
49110
- _context18.next = 24;
49123
+ _context19.next = 24;
49111
49124
  break;
49112
49125
  }
49113
49126
  orderset = orderSets[i];
49114
49127
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
49115
49128
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
49116
49129
  if (!loadedSet) {
49117
- _context18.next = 18;
49130
+ _context19.next = 18;
49118
49131
  break;
49119
49132
  }
49120
- _context18.next = 15;
49133
+ _context19.next = 15;
49121
49134
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
49122
49135
  case 15:
49123
49136
  this.checkMatchingProducts('onAdd');
49124
- _context18.next = 20;
49137
+ _context19.next = 20;
49125
49138
  break;
49126
49139
  case 18:
49127
- _context18.next = 20;
49140
+ _context19.next = 20;
49128
49141
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
49129
49142
  case 20:
49130
49143
  this.cleanUpEmptySets(true);
49131
49144
  case 21:
49132
49145
  i++;
49133
- _context18.next = 8;
49146
+ _context19.next = 8;
49134
49147
  break;
49135
49148
  case 24:
49136
49149
  this.divaBasketHandler.actBasket.OrderSets = [];
@@ -49142,9 +49155,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49142
49155
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
49143
49156
  case 31:
49144
49157
  case "end":
49145
- return _context18.stop();
49158
+ return _context19.stop();
49146
49159
  }
49147
- }, _callee18, this);
49160
+ }, _callee19, this);
49148
49161
  }));
49149
49162
  function addSetToActPlanningByDivaNr(_x59) {
49150
49163
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
@@ -49179,26 +49192,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49179
49192
  }, {
49180
49193
  key: "setActSetCurConfigStepKey",
49181
49194
  value: function () {
49182
- var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(curConfigStepKey) {
49195
+ var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(curConfigStepKey) {
49183
49196
  var set;
49184
- return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
49185
- while (1) switch (_context19.prev = _context19.next) {
49197
+ return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
49198
+ while (1) switch (_context20.prev = _context20.next) {
49186
49199
  case 0:
49187
49200
  set = this.actSet();
49188
49201
  if (set) {
49189
- _context19.next = 3;
49202
+ _context20.next = 3;
49190
49203
  break;
49191
49204
  }
49192
- return _context19.abrupt("return");
49205
+ return _context20.abrupt("return");
49193
49206
  case 3:
49194
49207
  set.ActConfigStepKey = curConfigStepKey;
49195
- _context19.next = 6;
49208
+ _context20.next = 6;
49196
49209
  return setHandlerInstance.updateNavigation(set);
49197
49210
  case 6:
49198
49211
  case "end":
49199
- return _context19.stop();
49212
+ return _context20.stop();
49200
49213
  }
49201
- }, _callee19, this);
49214
+ }, _callee20, this);
49202
49215
  }));
49203
49216
  function setActSetCurConfigStepKey(_x60) {
49204
49217
  return _setActSetCurConfigStepKey.apply(this, arguments);
@@ -49293,7 +49306,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49293
49306
  if (boundingBox) {
49294
49307
  var _this$updateViewPlann11;
49295
49308
  (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49296
- this.updatePlanner2DGrid(boundingBox);
49309
+ this.start2DRender(boundingBox);
49297
49310
  }
49298
49311
  if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
49299
49312
  var _this$getDoShow3DDime5;
@@ -49330,6 +49343,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49330
49343
  setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), renderSavingMode, (_this$getDoShow3DDime7 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime7 === void 0 ? void 0 : _this$getDoShow3DDime7.call(this), undefined, undefined, false);
49331
49344
  }
49332
49345
  }
49346
+ }, {
49347
+ key: "start2DRender",
49348
+ value:
49349
+ /**
49350
+ * Starts a 2D-grid render and remembers it for {@link getPlanning2DAsJpg}.
49351
+ * The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
49352
+ */
49353
+ function start2DRender(boundingBox) {
49354
+ var _this$updatePlanner2D;
49355
+ this.pending2DRender = Promise.resolve((_this$updatePlanner2D = this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 ? void 0 : _this$updatePlanner2D.call(this, boundingBox))["catch"](function (error) {
49356
+ LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
49357
+ });
49358
+ }
49333
49359
  }, {
49334
49360
  key: "getAlternateRenderingsForSummary",
49335
49361
  value: function getAlternateRenderingsForSummary() {
@@ -49390,17 +49416,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49390
49416
  }, {
49391
49417
  key: "deletePlannerElement",
49392
49418
  value: function () {
49393
- var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(setId, elementId, denyElementSelectionClear) {
49419
+ var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, denyElementSelectionClear) {
49394
49420
  var _this$updateViewPlann12;
49395
49421
  var set, result, _this$updateElementSe5, _this$updateElementSe6;
49396
- return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
49397
- while (1) switch (_context20.prev = _context20.next) {
49422
+ return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
49423
+ while (1) switch (_context21.prev = _context21.next) {
49398
49424
  case 0:
49399
49425
  set = this.sets[setId];
49400
- _context20.next = 3;
49426
+ _context21.next = 3;
49401
49427
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
49402
49428
  case 3:
49403
- result = _context20.sent;
49429
+ result = _context21.sent;
49404
49430
  this.updateConfigStructure();
49405
49431
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49406
49432
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
@@ -49411,15 +49437,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49411
49437
  }
49412
49438
  this.updatePriceInView();
49413
49439
  this.checkMatchingProducts('onDelete');
49414
- _context20.next = 14;
49440
+ _context21.next = 14;
49415
49441
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
49416
49442
  case 14:
49417
49443
  this.plannerChangeLog('onDeletePlanner');
49418
49444
  case 15:
49419
49445
  case "end":
49420
- return _context20.stop();
49446
+ return _context21.stop();
49421
49447
  }
49422
- }, _callee20, this);
49448
+ }, _callee21, this);
49423
49449
  }));
49424
49450
  function deletePlannerElement(_x61, _x62, _x63) {
49425
49451
  return _deletePlannerElement.apply(this, arguments);
@@ -49434,14 +49460,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49434
49460
  }, {
49435
49461
  key: "movePlannerElement",
49436
49462
  value: (function () {
49437
- var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, curConfigKey, absoluteIndex) {
49463
+ var _movePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(setId, elementId, curConfigKey, absoluteIndex) {
49438
49464
  var _this$updateViewPlann13;
49439
49465
  var set;
49440
- return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
49441
- while (1) switch (_context21.prev = _context21.next) {
49466
+ return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
49467
+ while (1) switch (_context22.prev = _context22.next) {
49442
49468
  case 0:
49443
49469
  set = this.sets[setId];
49444
- _context21.next = 3;
49470
+ _context22.next = 3;
49445
49471
  return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
49446
49472
  case 3:
49447
49473
  this.updateConfigStructure();
@@ -49451,9 +49477,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49451
49477
  this.updateViewButtonsDependigOnConfigStructure();
49452
49478
  case 8:
49453
49479
  case "end":
49454
- return _context21.stop();
49480
+ return _context22.stop();
49455
49481
  }
49456
- }, _callee21, this);
49482
+ }, _callee22, this);
49457
49483
  }));
49458
49484
  function movePlannerElement(_x64, _x65, _x66, _x67) {
49459
49485
  return _movePlannerElement.apply(this, arguments);
@@ -49470,23 +49496,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49470
49496
  }, {
49471
49497
  key: "copyPlannerElement",
49472
49498
  value: (function () {
49473
- var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(setId, elementId, curConfigKey, copyInfo) {
49499
+ var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(setId, elementId, curConfigKey, copyInfo) {
49474
49500
  var _this$updateViewPlann14;
49475
49501
  var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
49476
- return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
49477
- while (1) switch (_context22.prev = _context22.next) {
49502
+ return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
49503
+ while (1) switch (_context23.prev = _context23.next) {
49478
49504
  case 0:
49479
49505
  if (copyInfo) {
49480
- _context22.next = 2;
49506
+ _context23.next = 2;
49481
49507
  break;
49482
49508
  }
49483
- return _context22.abrupt("return");
49509
+ return _context23.abrupt("return");
49484
49510
  case 2:
49485
49511
  set = this.sets[setId];
49486
- _context22.next = 5;
49512
+ _context23.next = 5;
49487
49513
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
49488
49514
  case 5:
49489
- newSelectedArticle = _context22.sent;
49515
+ newSelectedArticle = _context23.sent;
49490
49516
  this.updateConfigStructure();
49491
49517
  (_this$updateViewPlann14 = this.updateViewPlannerElements) === null || _this$updateViewPlann14 === void 0 || _this$updateViewPlann14.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49492
49518
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
@@ -49500,12 +49526,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49500
49526
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
49501
49527
  }
49502
49528
  this.checkMatchingProducts('onCopy');
49503
- return _context22.abrupt("return", newConfigStepKey);
49529
+ return _context23.abrupt("return", newConfigStepKey);
49504
49530
  case 15:
49505
49531
  case "end":
49506
- return _context22.stop();
49532
+ return _context23.stop();
49507
49533
  }
49508
- }, _callee22, this);
49534
+ }, _callee23, this);
49509
49535
  }));
49510
49536
  function copyPlannerElement(_x68, _x69, _x70, _x71) {
49511
49537
  return _copyPlannerElement.apply(this, arguments);
@@ -49536,48 +49562,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49536
49562
  }, {
49537
49563
  key: "getFreePlacesOnGrids",
49538
49564
  value: function () {
49539
- var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(gridGroup, from) {
49565
+ var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(gridGroup, from) {
49540
49566
  var _this$updateFreePlace;
49541
49567
  var set, freeShelfGrids, plannedShelfGrids;
49542
- return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
49543
- while (1) switch (_context23.prev = _context23.next) {
49568
+ return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
49569
+ while (1) switch (_context24.prev = _context24.next) {
49544
49570
  case 0:
49545
49571
  set = this.actSet();
49546
49572
  if (set) {
49547
- _context23.next = 3;
49573
+ _context24.next = 3;
49548
49574
  break;
49549
49575
  }
49550
49576
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
49551
49577
  case 3:
49552
49578
  if (!gridGroup) {
49553
- _context23.next = 9;
49579
+ _context24.next = 9;
49554
49580
  break;
49555
49581
  }
49556
- _context23.next = 6;
49582
+ _context24.next = 6;
49557
49583
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
49558
49584
  case 6:
49559
- _context23.t0 = _context23.sent;
49560
- _context23.next = 10;
49585
+ _context24.t0 = _context24.sent;
49586
+ _context24.next = 10;
49561
49587
  break;
49562
49588
  case 9:
49563
- _context23.t0 = undefined;
49589
+ _context24.t0 = undefined;
49564
49590
  case 10:
49565
- freeShelfGrids = _context23.t0;
49591
+ freeShelfGrids = _context24.t0;
49566
49592
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
49567
49593
  LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
49568
49594
  (_this$updateFreePlace = this.updateFreePlacesOnGrids) === null || _this$updateFreePlace === void 0 || _this$updateFreePlace.call(this, {
49569
49595
  freeShelfGrids: freeShelfGrids,
49570
49596
  plannedShelfGrids: plannedShelfGrids
49571
49597
  });
49572
- return _context23.abrupt("return", {
49598
+ return _context24.abrupt("return", {
49573
49599
  freeShelfGrids: freeShelfGrids,
49574
49600
  plannedShelfGrids: plannedShelfGrids
49575
49601
  });
49576
49602
  case 15:
49577
49603
  case "end":
49578
- return _context23.stop();
49604
+ return _context24.stop();
49579
49605
  }
49580
- }, _callee23, this);
49606
+ }, _callee24, this);
49581
49607
  }));
49582
49608
  function getFreePlacesOnGrids(_x72, _x73) {
49583
49609
  return _getFreePlacesOnGrids.apply(this, arguments);
@@ -49595,34 +49621,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49595
49621
  }, {
49596
49622
  key: "moveShelfItemToGrid",
49597
49623
  value: function () {
49598
- var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49624
+ var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49599
49625
  var set, newGridId;
49600
- return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
49601
- while (1) switch (_context24.prev = _context24.next) {
49626
+ return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
49627
+ while (1) switch (_context25.prev = _context25.next) {
49602
49628
  case 0:
49603
49629
  set = this.actSet();
49604
49630
  if (set) {
49605
- _context24.next = 3;
49631
+ _context25.next = 3;
49606
49632
  break;
49607
49633
  }
49608
- return _context24.abrupt("return");
49634
+ return _context25.abrupt("return");
49609
49635
  case 3:
49610
- _context24.next = 5;
49636
+ _context25.next = 5;
49611
49637
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
49612
49638
  case 5:
49613
- newGridId = _context24.sent;
49639
+ newGridId = _context25.sent;
49614
49640
  this.updatePlannerView('MOVE_SHELF_ITEM');
49615
49641
  if (!newGridId) {
49616
- _context24.next = 10;
49642
+ _context25.next = 10;
49617
49643
  break;
49618
49644
  }
49619
- _context24.next = 10;
49645
+ _context25.next = 10;
49620
49646
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
49621
49647
  case 10:
49622
49648
  case "end":
49623
- return _context24.stop();
49649
+ return _context25.stop();
49624
49650
  }
49625
- }, _callee24, this);
49651
+ }, _callee25, this);
49626
49652
  }));
49627
49653
  function moveShelfItemToGrid(_x74, _x75, _x76, _x77) {
49628
49654
  return _moveShelfItemToGrid.apply(this, arguments);
@@ -49646,25 +49672,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49646
49672
  }, {
49647
49673
  key: "resetArticle",
49648
49674
  value: function () {
49649
- var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(basketId) {
49675
+ var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(basketId) {
49650
49676
  var set;
49651
- return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
49652
- while (1) switch (_context25.prev = _context25.next) {
49677
+ return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
49678
+ while (1) switch (_context26.prev = _context26.next) {
49653
49679
  case 0:
49654
49680
  set = this.actSet();
49655
49681
  if (set) {
49656
- _context25.next = 3;
49682
+ _context26.next = 3;
49657
49683
  break;
49658
49684
  }
49659
- return _context25.abrupt("return");
49685
+ return _context26.abrupt("return");
49660
49686
  case 3:
49661
- _context25.next = 5;
49687
+ _context26.next = 5;
49662
49688
  return setHandlerInstance.resetArticle(set, basketId);
49663
49689
  case 5:
49664
49690
  case "end":
49665
- return _context25.stop();
49691
+ return _context26.stop();
49666
49692
  }
49667
- }, _callee25, this);
49693
+ }, _callee26, this);
49668
49694
  }));
49669
49695
  function resetArticle(_x78) {
49670
49696
  return _resetArticle.apply(this, arguments);
@@ -49696,10 +49722,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49696
49722
  }, {
49697
49723
  key: "checkMatchingProducts",
49698
49724
  value: function () {
49699
- var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(from) {
49725
+ var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(from) {
49700
49726
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
49701
- return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
49702
- while (1) switch (_context26.prev = _context26.next) {
49727
+ return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
49728
+ while (1) switch (_context27.prev = _context27.next) {
49703
49729
  case 0:
49704
49730
  set = this.actSet();
49705
49731
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -49713,18 +49739,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49713
49739
  }
49714
49740
  }
49715
49741
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
49716
- _context26.next = 6;
49742
+ _context27.next = 6;
49717
49743
  break;
49718
49744
  }
49719
- _context26.next = 5;
49745
+ _context27.next = 5;
49720
49746
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
49721
49747
  case 5:
49722
49748
  this.updatePriceInView();
49723
49749
  case 6:
49724
49750
  case "end":
49725
- return _context26.stop();
49751
+ return _context27.stop();
49726
49752
  }
49727
- }, _callee26, this);
49753
+ }, _callee27, this);
49728
49754
  }));
49729
49755
  function checkMatchingProducts(_x79) {
49730
49756
  return _checkMatchingProducts.apply(this, arguments);
@@ -49803,7 +49829,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49803
49829
  }, {
49804
49830
  key: "saveToBasketWrapper",
49805
49831
  value: function () {
49806
- var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, returnToParam, hideLoading) {
49832
+ var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(event, repairOnly, returnToParam, hideLoading) {
49807
49833
  var _this$actions28,
49808
49834
  _this$actions28$toggl,
49809
49835
  _this$actions29,
@@ -49812,8 +49838,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49812
49838
  _this$actions33,
49813
49839
  _this$i18n18;
49814
49840
  var returnTo, finalEvent, result, _this$actions30, _this$i18n12, _this$i18n13, _this$actions31, _this$i18n14, _this$i18n15, _this$actions32, _this$i18n16, _this$i18n17, _this$updatePlannerMs2;
49815
- return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
49816
- while (1) switch (_context27.prev = _context27.next) {
49841
+ return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
49842
+ while (1) switch (_context28.prev = _context28.next) {
49817
49843
  case 0:
49818
49844
  returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
49819
49845
  finalEvent = {
@@ -49821,13 +49847,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49821
49847
  saveBasket: true
49822
49848
  };
49823
49849
  if (!hideLoading) (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, true);
49824
- _context27.next = 5;
49850
+ _context28.next = 5;
49825
49851
  return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
49826
49852
  case 5:
49827
- result = _context27.sent;
49853
+ result = _context28.sent;
49828
49854
  if (!hideLoading) (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || (_this$actions29$toggl = _this$actions29.toggleLoading) === null || _this$actions29$toggl === void 0 || _this$actions29$toggl.call(_this$actions29, 'Planner_Saving', false, false);
49829
49855
  if (!(result === 'canceled')) {
49830
- _context27.next = 11;
49856
+ _context28.next = 11;
49831
49857
  break;
49832
49858
  }
49833
49859
  LOG$2.error(new DivaUtils.DivaError('failed to save Basket'));
@@ -49835,10 +49861,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49835
49861
  text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
49836
49862
  accept: true
49837
49863
  });
49838
- return _context27.abrupt("return", result);
49864
+ return _context28.abrupt("return", result);
49839
49865
  case 11:
49840
- _context27.t0 = returnTo;
49841
- _context27.next = _context27.t0 === 'OPEN_PDF' ? 14 : _context27.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context27.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
49866
+ _context28.t0 = returnTo;
49867
+ _context28.next = _context28.t0 === 'OPEN_PDF' ? 14 : _context28.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context28.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
49842
49868
  break;
49843
49869
  case 14:
49844
49870
  if (!this.getBasket().PDFDocumentURL) {
@@ -49858,7 +49884,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49858
49884
  }
49859
49885
  });
49860
49886
  }
49861
- return _context27.abrupt("break", 17);
49887
+ return _context28.abrupt("break", 17);
49862
49888
  case 16:
49863
49889
  (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
49864
49890
  text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
@@ -49866,18 +49892,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49866
49892
  });
49867
49893
  case 17:
49868
49894
  if (!(result == 'noArticleToSave')) {
49869
- _context27.next = 20;
49895
+ _context28.next = 20;
49870
49896
  break;
49871
49897
  }
49872
49898
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
49873
- return _context27.abrupt("return", 'canceled');
49899
+ return _context28.abrupt("return", 'canceled');
49874
49900
  case 20:
49875
- return _context27.abrupt("return", result);
49901
+ return _context28.abrupt("return", result);
49876
49902
  case 21:
49877
49903
  case "end":
49878
- return _context27.stop();
49904
+ return _context28.stop();
49879
49905
  }
49880
- }, _callee27, this);
49906
+ }, _callee28, this);
49881
49907
  }));
49882
49908
  function saveToBasketWrapper(_x80, _x81, _x82, _x83) {
49883
49909
  return _saveToBasketWrapper.apply(this, arguments);
@@ -49887,42 +49913,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49887
49913
  }, {
49888
49914
  key: "saveToBasket",
49889
49915
  value: function () {
49890
- var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(returnTo, event, repairOnly) {
49916
+ var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(returnTo, event, repairOnly) {
49891
49917
  var _returnTo, _returnTo2, _returnTo3, _this$actions34, _this$actions35, _this$divaBasketHandl2;
49892
49918
  var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet10, arReady, _result, product;
49893
- return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
49894
- while (1) switch (_context28.prev = _context28.next) {
49919
+ return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
49920
+ while (1) switch (_context29.prev = _context29.next) {
49895
49921
  case 0:
49896
49922
  set = this.actSet();
49897
49923
  if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
49898
- _context28.next = 3;
49924
+ _context29.next = 3;
49899
49925
  break;
49900
49926
  }
49901
- return _context28.abrupt("return", 'noArticleToSave');
49927
+ return _context29.abrupt("return", 'noArticleToSave');
49902
49928
  case 3:
49903
49929
  actBasket = this.divaBasketHandler.actBasket;
49904
49930
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
49905
- _context28.next = 12;
49931
+ _context29.next = 12;
49906
49932
  break;
49907
49933
  }
49908
49934
  oldReturnTo = returnTo;
49909
49935
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
49910
- _context28.next = 9;
49936
+ _context29.next = 9;
49911
49937
  return this.handleFavorites('SAVE');
49912
49938
  case 9:
49913
- result = _context28.sent;
49939
+ result = _context29.sent;
49914
49940
  if (result === 'canceled') {
49915
49941
  this.ReturnTo = oldReturnTo;
49916
49942
  }
49917
- return _context28.abrupt("return", result);
49943
+ return _context29.abrupt("return", result);
49918
49944
  case 12:
49919
- _context28.t0 = this.divaBasketHandler;
49920
- _context28.t1 = this.divaBasketHandler.actDivaNr;
49921
- _context28.next = 16;
49945
+ _context29.t0 = this.divaBasketHandler;
49946
+ _context29.t1 = this.divaBasketHandler.actDivaNr;
49947
+ _context29.next = 16;
49922
49948
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
49923
49949
  case 16:
49924
- _context28.t2 = _context28.sent;
49925
- _context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
49950
+ _context29.t2 = _context29.sent;
49951
+ _context29.t0.setBasketData.call(_context29.t0, _context29.t1, _context29.t2);
49926
49952
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
49927
49953
  this.ReturnTo = 'OPEN_SELLER_BASKET';
49928
49954
  returnTo = this.ReturnTo;
@@ -49937,11 +49963,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49937
49963
  this.divaBasketHandler.fillOrigConfigurations();
49938
49964
  actBasket.Updated = Date.now();
49939
49965
  if (!returnTo) {
49940
- _context28.next = 54;
49966
+ _context29.next = 54;
49941
49967
  break;
49942
49968
  }
49943
- _context28.t3 = returnTo;
49944
- _context28.next = _context28.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context28.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context28.t3 === 'OPEN_PDF' ? 32 : _context28.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context28.t3 === 'SAVE_BASKET' ? 32 : _context28.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context28.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
49969
+ _context29.t3 = returnTo;
49970
+ _context29.next = _context29.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 27 : _context29.t3 === 'OPEN_SELLER_BASKET' ? 29 : _context29.t3 === 'OPEN_PDF' ? 32 : _context29.t3 === 'SAVE_BASKET_WITH_MODAL' ? 32 : _context29.t3 === 'SAVE_BASKET' ? 32 : _context29.t3 === 'SAVE_BASKET_SYNC' ? 32 : _context29.t3 === 'SAVE_BASKET_ASYNC' ? 32 : 54;
49945
49971
  break;
49946
49972
  case 27:
49947
49973
  (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
@@ -49954,7 +49980,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49954
49980
  basketData: actBasket
49955
49981
  }
49956
49982
  });
49957
- return _context28.abrupt("break", 54);
49983
+ return _context29.abrupt("break", 54);
49958
49984
  case 29:
49959
49985
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
49960
49986
  actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
@@ -49969,26 +49995,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49969
49995
  basketData: actBasket
49970
49996
  }
49971
49997
  });
49972
- return _context28.abrupt("break", 54);
49998
+ return _context29.abrupt("break", 54);
49973
49999
  case 32:
49974
50000
  if (!(event == 'onSaveProduct')) {
49975
- _context28.next = 44;
50001
+ _context29.next = 44;
49976
50002
  break;
49977
50003
  }
49978
- _context28.next = 35;
50004
+ _context29.next = 35;
49979
50005
  return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
49980
50006
  case 35:
49981
50007
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
49982
50008
  actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
49983
- _context28.next = 38;
50009
+ _context29.next = 38;
49984
50010
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
49985
50011
  case 38:
49986
- _context28.next = 40;
50012
+ _context29.next = 40;
49987
50013
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
49988
50014
  case 40:
49989
- newDivaNr = _context28.sent;
50015
+ newDivaNr = _context29.sent;
49990
50016
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
49991
- _context28.next = 53;
50017
+ _context29.next = 53;
49992
50018
  break;
49993
50019
  case 44:
49994
50020
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -49998,30 +50024,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49998
50024
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
49999
50025
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
50000
50026
  arReady = !!((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && _this$actSet10.CatalogData.divaArReady);
50001
- _context28.next = 50;
50027
+ _context29.next = 50;
50002
50028
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
50003
50029
  case 50:
50004
- _result = _context28.sent;
50030
+ _result = _context29.sent;
50005
50031
  if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
50006
- _context28.next = 53;
50032
+ _context29.next = 53;
50007
50033
  break;
50008
50034
  }
50009
- return _context28.abrupt("return", 'canceled');
50035
+ return _context29.abrupt("return", 'canceled');
50010
50036
  case 53:
50011
- return _context28.abrupt("break", 54);
50037
+ return _context29.abrupt("break", 54);
50012
50038
  case 54:
50013
50039
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
50014
50040
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
50015
- _context28.next = 58;
50041
+ _context29.next = 58;
50016
50042
  return this.addToBasket(actBasket, event);
50017
50043
  case 58:
50018
- product = _context28.sent;
50019
- return _context28.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
50044
+ product = _context29.sent;
50045
+ return _context29.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
50020
50046
  case 60:
50021
50047
  case "end":
50022
- return _context28.stop();
50048
+ return _context29.stop();
50023
50049
  }
50024
- }, _callee28, this);
50050
+ }, _callee29, this);
50025
50051
  }));
50026
50052
  function saveToBasket(_x84, _x85, _x86) {
50027
50053
  return _saveToBasket.apply(this, arguments);
@@ -50038,24 +50064,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50038
50064
  }, {
50039
50065
  key: "generateAiImageWithReferenceImages",
50040
50066
  value: function () {
50041
- var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(data, leadKey) {
50067
+ var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(data, leadKey) {
50042
50068
  var _this$actSet11, _this$state6, _this$actSet12;
50043
- return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
50044
- while (1) switch (_context29.prev = _context29.next) {
50069
+ return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
50070
+ while (1) switch (_context30.prev = _context30.next) {
50045
50071
  case 0:
50046
50072
  (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
50047
- _context29.next = 3;
50073
+ _context30.next = 3;
50048
50074
  return this.api.generateAiImageWithReferenceImages(_objectSpread$8(_objectSpread$8({}, data), {}, {
50049
50075
  userId: (_this$state6 = this.state) === null || _this$state6 === void 0 || (_this$state6 = _this$state6.user) === null || _this$state6 === void 0 ? void 0 : _this$state6._id,
50050
50076
  catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
50051
50077
  }), leadKey);
50052
50078
  case 3:
50053
- return _context29.abrupt("return", _context29.sent);
50079
+ return _context30.abrupt("return", _context30.sent);
50054
50080
  case 4:
50055
50081
  case "end":
50056
- return _context29.stop();
50082
+ return _context30.stop();
50057
50083
  }
50058
- }, _callee29, this);
50084
+ }, _callee30, this);
50059
50085
  }));
50060
50086
  function generateAiImageWithReferenceImages(_x87, _x88) {
50061
50087
  return _generateAiImageWithReferenceImages.apply(this, arguments);
@@ -50065,25 +50091,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50065
50091
  }, {
50066
50092
  key: "getUsageLimits",
50067
50093
  value: function () {
50068
- var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30() {
50094
+ var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31() {
50069
50095
  var _localStorage$getItem, _localStorage;
50070
50096
  var leadKey;
50071
- return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
50072
- while (1) switch (_context30.prev = _context30.next) {
50097
+ return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
50098
+ while (1) switch (_context31.prev = _context31.next) {
50073
50099
  case 0:
50074
50100
  // Get lead key from localStorage if it exists (for anonymous users)
50075
50101
  leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
50076
- _context30.next = 3;
50102
+ _context31.next = 3;
50077
50103
  return this.api.getUsageLimits(leadKey ? {
50078
50104
  leadKey: leadKey
50079
50105
  } : undefined);
50080
50106
  case 3:
50081
- return _context30.abrupt("return", _context30.sent);
50107
+ return _context31.abrupt("return", _context31.sent);
50082
50108
  case 4:
50083
50109
  case "end":
50084
- return _context30.stop();
50110
+ return _context31.stop();
50085
50111
  }
50086
- }, _callee30, this);
50112
+ }, _callee31, this);
50087
50113
  }));
50088
50114
  function getUsageLimits() {
50089
50115
  return _getUsageLimits.apply(this, arguments);
@@ -50093,23 +50119,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50093
50119
  }, {
50094
50120
  key: "getAiRoomRenderings",
50095
50121
  value: function () {
50096
- var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31() {
50122
+ var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
50097
50123
  var _this$state7;
50098
50124
  var organizationId, lang;
50099
- return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
50100
- while (1) switch (_context31.prev = _context31.next) {
50125
+ return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
50126
+ while (1) switch (_context32.prev = _context32.next) {
50101
50127
  case 0:
50102
50128
  organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
50103
50129
  lang = this.api.getLanguage();
50104
- _context31.next = 4;
50130
+ _context32.next = 4;
50105
50131
  return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
50106
50132
  case 4:
50107
- return _context31.abrupt("return", _context31.sent);
50133
+ return _context32.abrupt("return", _context32.sent);
50108
50134
  case 5:
50109
50135
  case "end":
50110
- return _context31.stop();
50136
+ return _context32.stop();
50111
50137
  }
50112
- }, _callee31, this);
50138
+ }, _callee32, this);
50113
50139
  }));
50114
50140
  function getAiRoomRenderings() {
50115
50141
  return _getAiRoomRenderings.apply(this, arguments);
@@ -50119,19 +50145,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50119
50145
  }, {
50120
50146
  key: "createLeadKey",
50121
50147
  value: function () {
50122
- var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32(email) {
50123
- return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
50124
- while (1) switch (_context32.prev = _context32.next) {
50148
+ var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(email) {
50149
+ return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
50150
+ while (1) switch (_context33.prev = _context33.next) {
50125
50151
  case 0:
50126
- _context32.next = 2;
50152
+ _context33.next = 2;
50127
50153
  return this.api.createLeadKey(email);
50128
50154
  case 2:
50129
- return _context32.abrupt("return", _context32.sent);
50155
+ return _context33.abrupt("return", _context33.sent);
50130
50156
  case 3:
50131
50157
  case "end":
50132
- return _context32.stop();
50158
+ return _context33.stop();
50133
50159
  }
50134
- }, _callee32, this);
50160
+ }, _callee33, this);
50135
50161
  }));
50136
50162
  function createLeadKey(_x89) {
50137
50163
  return _createLeadKey.apply(this, arguments);
@@ -50429,23 +50455,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50429
50455
  }, {
50430
50456
  key: "getBasketDataWithEkText",
50431
50457
  value: function () {
50432
- var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33() {
50433
- return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
50434
- while (1) switch (_context33.prev = _context33.next) {
50458
+ var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
50459
+ return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
50460
+ while (1) switch (_context34.prev = _context34.next) {
50435
50461
  case 0:
50436
- _context33.t0 = this.divaBasketHandler;
50437
- _context33.t1 = this.divaBasketHandler.actDivaNr;
50438
- _context33.next = 4;
50462
+ _context34.t0 = this.divaBasketHandler;
50463
+ _context34.t1 = this.divaBasketHandler.actDivaNr;
50464
+ _context34.next = 4;
50439
50465
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
50440
50466
  case 4:
50441
- _context33.t2 = _context33.sent;
50442
- _context33.t0.setBasketData.call(_context33.t0, _context33.t1, _context33.t2);
50443
- return _context33.abrupt("return", this.divaBasketHandler.actBasket);
50467
+ _context34.t2 = _context34.sent;
50468
+ _context34.t0.setBasketData.call(_context34.t0, _context34.t1, _context34.t2);
50469
+ return _context34.abrupt("return", this.divaBasketHandler.actBasket);
50444
50470
  case 7:
50445
50471
  case "end":
50446
- return _context33.stop();
50472
+ return _context34.stop();
50447
50473
  }
50448
- }, _callee33, this);
50474
+ }, _callee34, this);
50449
50475
  }));
50450
50476
  function getBasketDataWithEkText() {
50451
50477
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -50471,7 +50497,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50471
50497
  }, {
50472
50498
  key: "addToBasket",
50473
50499
  value: function () {
50474
- var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(actBasket) {
50500
+ var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(actBasket) {
50475
50501
  var _this$actions36,
50476
50502
  _this$actions37,
50477
50503
  _this$actions38,
@@ -50490,44 +50516,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50490
50516
  to,
50491
50517
  variants,
50492
50518
  products,
50493
- _args34 = arguments;
50494
- return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
50495
- while (1) switch (_context34.prev = _context34.next) {
50519
+ _args35 = arguments;
50520
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
50521
+ while (1) switch (_context35.prev = _context35.next) {
50496
50522
  case 0:
50497
- event = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : 'onAddToBasket';
50498
- _context34.t0 = event;
50499
- _context34.next = _context34.t0 === 'onWebPlanerPrint' ? 4 : _context34.t0 === 'onWebPlanerSave' ? 6 : _context34.t0 === 'onWebPlanerShare' ? 8 : _context34.t0 === 'onRequestConsulation' ? 10 : _context34.t0 === 'onSave' ? 12 : _context34.t0 === 'onSendEmail' ? 14 : _context34.t0 === 'onSaveProduct' ? 19 : _context34.t0 === 'dontSaveBasket' ? 26 : _context34.t0 === 'onAddToBasket' ? 26 : 28;
50523
+ event = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : 'onAddToBasket';
50524
+ _context35.t0 = event;
50525
+ _context35.next = _context35.t0 === 'onWebPlanerPrint' ? 4 : _context35.t0 === 'onWebPlanerSave' ? 6 : _context35.t0 === 'onWebPlanerShare' ? 8 : _context35.t0 === 'onRequestConsulation' ? 10 : _context35.t0 === 'onSave' ? 12 : _context35.t0 === 'onSendEmail' ? 14 : _context35.t0 === 'onSaveProduct' ? 19 : _context35.t0 === 'dontSaveBasket' ? 26 : _context35.t0 === 'onAddToBasket' ? 26 : 28;
50500
50526
  break;
50501
50527
  case 4:
50502
50528
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
50503
50529
  type: 'onWebPlanerPrint',
50504
50530
  data: actBasket.getAsJson()
50505
50531
  });
50506
- return _context34.abrupt("break", 30);
50532
+ return _context35.abrupt("break", 30);
50507
50533
  case 6:
50508
50534
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
50509
50535
  type: 'onWebPlanerSave',
50510
50536
  data: actBasket.getAsJson()
50511
50537
  });
50512
- return _context34.abrupt("break", 30);
50538
+ return _context35.abrupt("break", 30);
50513
50539
  case 8:
50514
50540
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
50515
50541
  type: 'onWebPlanerShare',
50516
50542
  data: actBasket.getAsJson()
50517
50543
  });
50518
- return _context34.abrupt("break", 30);
50544
+ return _context35.abrupt("break", 30);
50519
50545
  case 10:
50520
50546
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
50521
50547
  type: 'onRequestConsulation',
50522
50548
  data: actBasket.getAsJson()
50523
50549
  });
50524
- return _context34.abrupt("break", 30);
50550
+ return _context35.abrupt("break", 30);
50525
50551
  case 12:
50526
50552
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
50527
50553
  type: 'onSave',
50528
50554
  data: actBasket.getAsJson()
50529
50555
  });
50530
- return _context34.abrupt("break", 30);
50556
+ return _context35.abrupt("break", 30);
50531
50557
  case 14:
50532
50558
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
50533
50559
  this.divaBasketHandler.emailConfig = undefined;
@@ -50562,41 +50588,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50562
50588
  type: 'onAddToBasket',
50563
50589
  data: actBasket.getAsJson()
50564
50590
  });
50565
- return _context34.abrupt("break", 30);
50591
+ return _context35.abrupt("break", 30);
50566
50592
  case 19:
50567
50593
  this.actSet().CatalogData;
50568
- _context34.next = 22;
50594
+ _context35.next = 22;
50569
50595
  return this.api.saveAsProduct(this.sets, actBasket);
50570
50596
  case 22:
50571
- products = _context34.sent;
50597
+ products = _context35.sent;
50572
50598
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
50573
50599
  type: 'onAddToBasket',
50574
50600
  data: actBasket.getAsJson()
50575
50601
  });
50576
50602
  if (!products) {
50577
- _context34.next = 26;
50603
+ _context35.next = 26;
50578
50604
  break;
50579
50605
  }
50580
- return _context34.abrupt("return", products[0]);
50606
+ return _context35.abrupt("return", products[0]);
50581
50607
  case 26:
50582
50608
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
50583
50609
  type: 'onAddToBasket',
50584
50610
  data: actBasket.getAsJson()
50585
50611
  });
50586
- return _context34.abrupt("break", 30);
50612
+ return _context35.abrupt("break", 30);
50587
50613
  case 28:
50588
50614
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
50589
50615
  type: event,
50590
50616
  data: actBasket.getAsJson()
50591
50617
  });
50592
- return _context34.abrupt("break", 30);
50618
+ return _context35.abrupt("break", 30);
50593
50619
  case 30:
50594
- return _context34.abrupt("return");
50620
+ return _context35.abrupt("return");
50595
50621
  case 31:
50596
50622
  case "end":
50597
- return _context34.stop();
50623
+ return _context35.stop();
50598
50624
  }
50599
- }, _callee34, this);
50625
+ }, _callee35, this);
50600
50626
  }));
50601
50627
  function addToBasket(_x90) {
50602
50628
  return _addToBasket.apply(this, arguments);
@@ -50653,26 +50679,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50653
50679
  }, {
50654
50680
  key: "getCurrentBasket",
50655
50681
  value: function () {
50656
- var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(event, force, returnTo, dontGoToSummary, hideLoading) {
50682
+ var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(event, force, returnTo, dontGoToSummary, hideLoading) {
50657
50683
  var _this$actSet40, _this$divaBasketHandl5, _this$onClickAddToBas3;
50658
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
50659
- while (1) switch (_context35.prev = _context35.next) {
50684
+ return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
50685
+ while (1) switch (_context36.prev = _context36.next) {
50660
50686
  case 0:
50661
50687
  if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet40 = this.actSet()) === null || _this$actSet40 === void 0 ? void 0 : _this$actSet40.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
50662
- _context35.next = 2;
50688
+ _context36.next = 2;
50663
50689
  break;
50664
50690
  }
50665
- return _context35.abrupt("return", 'BASKET_ALREADY_SAVED');
50691
+ return _context36.abrupt("return", 'BASKET_ALREADY_SAVED');
50666
50692
  case 2:
50667
- _context35.next = 4;
50693
+ _context36.next = 4;
50668
50694
  return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
50669
50695
  case 4:
50670
- return _context35.abrupt("return", !!_context35.sent);
50696
+ return _context36.abrupt("return", !!_context36.sent);
50671
50697
  case 5:
50672
50698
  case "end":
50673
- return _context35.stop();
50699
+ return _context36.stop();
50674
50700
  }
50675
- }, _callee35, this);
50701
+ }, _callee36, this);
50676
50702
  }));
50677
50703
  function getCurrentBasket(_x91, _x92, _x93, _x94, _x95) {
50678
50704
  return _getCurrentBasket.apply(this, arguments);
@@ -50905,9 +50931,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50905
50931
  key: "initApiForLogicOnly",
50906
50932
  value: //just for testing purposes
50907
50933
  function () {
50908
- var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50909
- return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
50910
- while (1) switch (_context36.prev = _context36.next) {
50934
+ var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50935
+ return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
50936
+ while (1) switch (_context37.prev = _context37.next) {
50911
50937
  case 0:
50912
50938
  //empty services
50913
50939
  this.api = new DivaApiHandler(_objectSpread$8(_objectSpread$8({}, this.plannerConfig), {}, {
@@ -50920,16 +50946,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50920
50946
  jwt: jwt,
50921
50947
  apiKey: apiKey
50922
50948
  }), handler);
50923
- _context36.next = 3;
50949
+ _context37.next = 3;
50924
50950
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
50925
50951
  case 3:
50926
50952
  this.plannerHandler = new DivaPlannerHandler(true);
50927
50953
  if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
50928
50954
  case 5:
50929
50955
  case "end":
50930
- return _context36.stop();
50956
+ return _context37.stop();
50931
50957
  }
50932
- }, _callee36, this);
50958
+ }, _callee37, this);
50933
50959
  }));
50934
50960
  function initApiForLogicOnly(_x96, _x97, _x98, _x99, _x100, _x101, _x102) {
50935
50961
  return _initApiForLogicOnly.apply(this, arguments);
@@ -50944,16 +50970,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50944
50970
  }, {
50945
50971
  key: "loadBasket",
50946
50972
  value: function () {
50947
- var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37() {
50948
- return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
50949
- while (1) switch (_context37.prev = _context37.next) {
50973
+ var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38() {
50974
+ return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
50975
+ while (1) switch (_context38.prev = _context38.next) {
50950
50976
  case 0:
50951
- return _context37.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
50977
+ return _context38.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
50952
50978
  case 1:
50953
50979
  case "end":
50954
- return _context37.stop();
50980
+ return _context38.stop();
50955
50981
  }
50956
- }, _callee37, this);
50982
+ }, _callee38, this);
50957
50983
  }));
50958
50984
  function loadBasket() {
50959
50985
  return _loadBasket.apply(this, arguments);
@@ -50968,39 +50994,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50968
50994
  }, {
50969
50995
  key: "initBasket",
50970
50996
  value: function () {
50971
- var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38(init3D, ignoreFavorites) {
50997
+ var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39(init3D, ignoreFavorites) {
50972
50998
  var initSetState, set, basket;
50973
- return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
50974
- while (1) switch (_context38.prev = _context38.next) {
50999
+ return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
51000
+ while (1) switch (_context39.prev = _context39.next) {
50975
51001
  case 0:
50976
51002
  this.divaNr = this.divaBasketHandler.actDivaNr;
50977
51003
  initSetState = this.getInitStateForSet(!init3D);
50978
- _context38.next = 4;
51004
+ _context39.next = 4;
50979
51005
  return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
50980
51006
  case 4:
50981
- _context38.next = 6;
51007
+ _context39.next = 6;
50982
51008
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
50983
51009
  case 6:
50984
51010
  //TODO check if when basket gets repaired the product match gets called
50985
51011
  set = this.actSet();
50986
51012
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
50987
51013
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
50988
- _context38.next = 11;
51014
+ _context39.next = 11;
50989
51015
  break;
50990
51016
  }
50991
- _context38.next = 11;
51017
+ _context39.next = 11;
50992
51018
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
50993
51019
  case 11:
50994
- _context38.next = 13;
51020
+ _context39.next = 13;
50995
51021
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
50996
51022
  case 13:
50997
- basket = _context38.sent;
50998
- return _context38.abrupt("return", basket);
51023
+ basket = _context39.sent;
51024
+ return _context39.abrupt("return", basket);
50999
51025
  case 15:
51000
51026
  case "end":
51001
- return _context38.stop();
51027
+ return _context39.stop();
51002
51028
  }
51003
- }, _callee38, this);
51029
+ }, _callee39, this);
51004
51030
  }));
51005
51031
  function initBasket(_x103, _x104) {
51006
51032
  return _initBasket.apply(this, arguments);
@@ -51039,21 +51065,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51039
51065
  }, {
51040
51066
  key: "getValidVariantsLength",
51041
51067
  value: function () {
51042
- var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39() {
51068
+ var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40() {
51043
51069
  var set;
51044
- return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
51045
- while (1) switch (_context39.prev = _context39.next) {
51070
+ return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
51071
+ while (1) switch (_context40.prev = _context40.next) {
51046
51072
  case 0:
51047
51073
  set = this.actSet();
51048
- _context39.next = 3;
51074
+ _context40.next = 3;
51049
51075
  return favoritesHandlerInstance.getValidVariants(set, true);
51050
51076
  case 3:
51051
- return _context39.abrupt("return", _context39.sent.length);
51077
+ return _context40.abrupt("return", _context40.sent.length);
51052
51078
  case 4:
51053
51079
  case "end":
51054
- return _context39.stop();
51080
+ return _context40.stop();
51055
51081
  }
51056
- }, _callee39, this);
51082
+ }, _callee40, this);
51057
51083
  }));
51058
51084
  function getValidVariantsLength() {
51059
51085
  return _getValidVariantsLength.apply(this, arguments);
@@ -51063,44 +51089,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51063
51089
  }, {
51064
51090
  key: "handleFavorites",
51065
51091
  value: function () {
51066
- var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40(mode) {
51092
+ var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41(mode) {
51067
51093
  var _this5 = this;
51068
51094
  var set, i;
51069
- return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
51070
- while (1) switch (_context40.prev = _context40.next) {
51095
+ return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
51096
+ while (1) switch (_context41.prev = _context41.next) {
51071
51097
  case 0:
51072
51098
  set = this.actSet();
51073
51099
  i = 0;
51074
51100
  case 2:
51075
51101
  if (!favoritesHandlerInstance.IsCalcForSummary) {
51076
- _context40.next = 11;
51102
+ _context41.next = 11;
51077
51103
  break;
51078
51104
  }
51079
- _context40.next = 5;
51105
+ _context41.next = 5;
51080
51106
  return DivaUtils__default["default"].Sleep(200);
51081
51107
  case 5:
51082
51108
  i++;
51083
51109
  if (!(i > 1000)) {
51084
- _context40.next = 9;
51110
+ _context41.next = 9;
51085
51111
  break;
51086
51112
  }
51087
51113
  LOG$2.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
51088
- return _context40.abrupt("break", 11);
51114
+ return _context41.abrupt("break", 11);
51089
51115
  case 9:
51090
- _context40.next = 2;
51116
+ _context41.next = 2;
51091
51117
  break;
51092
51118
  case 11:
51093
- _context40.next = 13;
51119
+ _context41.next = 13;
51094
51120
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
51095
51121
  return _this5.update2DGrid(set);
51096
51122
  }, this.actions);
51097
51123
  case 13:
51098
- return _context40.abrupt("return", _context40.sent);
51124
+ return _context41.abrupt("return", _context41.sent);
51099
51125
  case 14:
51100
51126
  case "end":
51101
- return _context40.stop();
51127
+ return _context41.stop();
51102
51128
  }
51103
- }, _callee40, this);
51129
+ }, _callee41, this);
51104
51130
  }));
51105
51131
  function handleFavorites(_x105) {
51106
51132
  return _handleFavorites.apply(this, arguments);
@@ -51115,46 +51141,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51115
51141
  }, {
51116
51142
  key: "initSapOrderLinesFromBasket",
51117
51143
  value: function () {
51118
- var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee41(divaNr, init3D, onlyLoadOldBakset) {
51144
+ var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee42(divaNr, init3D, onlyLoadOldBakset) {
51119
51145
  var result, oldBasket, basket;
51120
- return _regeneratorRuntime__default["default"].wrap(function _callee41$(_context41) {
51121
- while (1) switch (_context41.prev = _context41.next) {
51146
+ return _regeneratorRuntime__default["default"].wrap(function _callee42$(_context42) {
51147
+ while (1) switch (_context42.prev = _context42.next) {
51122
51148
  case 0:
51123
51149
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
51124
- _context41.next = 3;
51150
+ _context42.next = 3;
51125
51151
  return this.loadBasket();
51126
51152
  case 3:
51127
- result = _context41.sent;
51153
+ result = _context42.sent;
51128
51154
  if (!onlyLoadOldBakset) {
51129
- _context41.next = 6;
51155
+ _context42.next = 6;
51130
51156
  break;
51131
51157
  }
51132
- return _context41.abrupt("return", {
51158
+ return _context42.abrupt("return", {
51133
51159
  oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
51134
51160
  cache: {}
51135
51161
  });
51136
51162
  case 6:
51137
51163
  if (!(result === false)) {
51138
- _context41.next = 8;
51164
+ _context42.next = 8;
51139
51165
  break;
51140
51166
  }
51141
51167
  throw new Error('Could not load basket! ' + divaNr);
51142
51168
  case 8:
51143
51169
  oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
51144
- _context41.next = 11;
51170
+ _context42.next = 11;
51145
51171
  return this.initBasket(init3D);
51146
51172
  case 11:
51147
- basket = _context41.sent;
51148
- return _context41.abrupt("return", {
51173
+ basket = _context42.sent;
51174
+ return _context42.abrupt("return", {
51149
51175
  basket: basket,
51150
51176
  oldBasket: oldBasket,
51151
51177
  cache: this.api.getJsonDataCache()
51152
51178
  });
51153
51179
  case 13:
51154
51180
  case "end":
51155
- return _context41.stop();
51181
+ return _context42.stop();
51156
51182
  }
51157
- }, _callee41, this);
51183
+ }, _callee42, this);
51158
51184
  }));
51159
51185
  function initSapOrderLinesFromBasket(_x106, _x107, _x108) {
51160
51186
  return _initSapOrderLinesFromBasket.apply(this, arguments);
@@ -51410,183 +51436,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51410
51436
  }]);
51411
51437
  }();
51412
51438
 
51413
- var DockingPoint = /*#__PURE__*/function () {
51414
- function DockingPoint(elementId, type, name, localPos, rotDeg, layer, plannerconfig, filter) {
51415
- _classCallCheck__default["default"](this, DockingPoint);
51416
- _defineProperty__default["default"](this, "dockingPoint", void 0);
51417
- _defineProperty__default["default"](this, "layer", void 0);
51418
- _defineProperty__default["default"](this, "isDisabled", void 0);
51419
- //this is used to disable a docking point temporarily
51420
- _defineProperty__default["default"](this, "plannerconfig", void 0);
51421
- this.plannerconfig = plannerconfig;
51422
-
51423
- //Check for number backwardscompatible with _ (e.g. AVC_2)
51424
- var splittedAV = name.split('_');
51425
- this.isDisabled = false;
51426
- var number = -1;
51427
- if (splittedAV.length >= 2) {
51428
- for (var i = 1; i < splittedAV.length; i++) {
51429
- var part = parseInt(splittedAV[i]);
51430
- if (!isNaN(part)) {
51431
- number = part;
51432
- break;
51433
- }
51434
- }
51435
- } else if (name.length > 3) {
51436
- //Check for number IDM Standard without _ (e.g. AVC2)
51437
- var _part = parseInt(name.substring(3));
51438
- if (!isNaN(_part)) {
51439
- number = _part;
51440
- }
51441
- }
51442
- this.dockingPoint = {
51443
- dpId: type + '_' + name,
51444
- elementId: elementId,
51445
- type: type,
51446
- name: name,
51447
- ignoreLayer: type == 'AVR' || type == 'AVL' || name.indexOf('_IL') >= 0,
51448
- localWorldPos: localPos,
51449
- rotDeg: rotDeg,
51450
- isDocking: false,
51451
- dpFilter: filter
51452
- };
51453
- if (number >= 0) {
51454
- this.dockingPoint.number = number;
51455
- }
51456
- this.layer = layer;
51457
- }
51458
-
51459
- /**
51460
- * Creates a clone of the current dockingPoint
51461
- */
51462
- return _createClass__default["default"](DockingPoint, [{
51463
- key: "clone",
51464
- value: function clone() {
51465
- var dpClone = new DockingPoint(this.dockingPoint.elementId, this.dockingPoint.type, this.dockingPoint.name, this.dockingPoint.localWorldPos, this.dockingPoint.rotDeg, this.layer, this.plannerconfig, this.dockingPoint.dpFilter);
51466
- dpClone.dockingPoint.dpId = this.dockingPoint.dpId;
51467
- dpClone.dockingPoint.ignoreLayer = this.dockingPoint.ignoreLayer;
51468
- dpClone.dockingPoint.isDocking = this.dockingPoint.isDocking;
51469
- dpClone.dockingPoint.number = this.dockingPoint.number;
51470
- dpClone.dockingPoint.onDP = this.dockingPoint.onDP;
51471
- dpClone.dockingPoint.onElementId = this.dockingPoint.onElementId;
51472
- return dpClone;
51473
- }
51474
- }, {
51475
- key: "ElementId",
51476
- get: function get() {
51477
- return this.dockingPoint.elementId;
51478
- }
51479
- }, {
51480
- key: "Name",
51481
- get: function get() {
51482
- return this.dockingPoint.name;
51483
- }
51484
- }, {
51485
- key: "LocalWorldPos",
51486
- get: function get() {
51487
- return this.dockingPoint.localWorldPos;
51488
- }
51489
- }, {
51490
- key: "RotDeg",
51491
- get: function get() {
51492
- return this.dockingPoint.rotDeg;
51493
- }
51494
- }, {
51495
- key: "Type",
51496
- get: function get() {
51497
- return this.dockingPoint.type;
51498
- }
51499
- }, {
51500
- key: "IsDocking",
51501
- get: function get() {
51502
- return this.dockingPoint.isDocking;
51503
- }
51504
- }, {
51505
- key: "Layer",
51506
- get: function get() {
51507
- return this.layer;
51508
- }
51509
- }, {
51510
- key: "IgnoreLayer",
51511
- get: function get() {
51512
- return this.dockingPoint.ignoreLayer;
51513
- }
51514
- }, {
51515
- key: "HasNumber",
51516
- get: function get() {
51517
- return this.dockingPoint.number == undefined ? false : true;
51518
- }
51519
- }, {
51520
- key: "Number",
51521
- get: function get() {
51522
- return this.dockingPoint.number;
51523
- }
51524
- }, {
51525
- key: "PlannerConfig",
51526
- get: function get() {
51527
- return this.plannerconfig;
51528
- }
51529
- }, {
51530
- key: "IsDisabled",
51531
- get: function get() {
51532
- return this.isDisabled;
51533
- }
51534
- }, {
51535
- key: "DPFilter",
51536
- get: function get() {
51537
- return this.dockingPoint.dpFilter;
51538
- }
51539
- /**
51540
- * This function is called when the dockingPoint is docked to another dockingPoint
51541
- * @param refDockingPoint The reference dockingpoint, this is docked to
51542
- * @param refElementId The elementId of the reference DockingPoint
51543
- */
51544
- }, {
51545
- key: "doDock",
51546
- value: function doDock(refDockingPoint, refElementId) {
51547
- this.dockingPoint.isDocking = true;
51548
- this.dockingPoint.onDP = refDockingPoint;
51549
- this.dockingPoint.onElementId = refElementId;
51550
- }
51551
-
51552
- /**
51553
- * This function is called when the dockingpoint should be undocked
51554
- */
51555
- }, {
51556
- key: "undock",
51557
- value: function undock() {
51558
- this.dockingPoint.isDocking = false;
51559
- this.dockingPoint.onDP = undefined;
51560
- this.dockingPoint.onElementId = undefined;
51561
- }
51562
-
51563
- /**
51564
- * This function is used to disable the dp temporarily. It is ignored in the planer
51565
- * @param doDisable
51566
- */
51567
- }, {
51568
- key: "disableDP",
51569
- value: function disableDP(doDisable) {
51570
- this.isDisabled = doDisable;
51571
- }
51572
- }, {
51573
- key: "OnDP",
51574
- get: function get() {
51575
- return this.dockingPoint.onDP;
51576
- }
51577
- }, {
51578
- key: "OnElementId",
51579
- get: function get() {
51580
- return this.dockingPoint.onElementId;
51581
- }
51582
- }, {
51583
- key: "DpId",
51584
- get: function get() {
51585
- return this.dockingPoint.dpId;
51586
- }
51587
- }]);
51588
- }();
51589
-
51590
51439
  function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
51591
51440
  function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
51592
51441
  function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -72028,7 +71877,6 @@ exports.DivaArticle = DivaArticle;
72028
71877
  exports.DivaBasketHandler = DivaBasketHandler;
72029
71878
  exports.DivaCatalogData = DivaCatalogData;
72030
71879
  exports.DivaWebPlanner = DivaWebPlanner;
72031
- exports.DockingPoint = DockingPoint;
72032
71880
  exports.Grid = Grid;
72033
71881
  exports.HQRenderScript = HQRenderScript;
72034
71882
  exports.JsonDataCache = JsonDataCache;