@crystaldesign/web-planner-logic 26.11.0-beta.5 → 26.11.0-beta.7

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 (44) hide show
  1. package/build/cjs/{DivaBoxPlanner-68cc1bd1.js → DivaBoxPlanner-02a2dbbf.js} +4 -4
  2. package/build/cjs/{DivaStandardPlanner-d44ae0e7.js → DivaStandardPlanner-150246c0.js} +8 -28
  3. package/build/cjs/{DoorPlanner-1719cbe1.js → DoorPlanner-ce630754.js} +2 -1
  4. package/build/cjs/{Host3DSignalR-a456221e.js → Host3DSignalR-b0b1fb8d.js} +2 -1
  5. package/build/cjs/{LiviqueWWSHandler-f2afb4eb.js → LiviqueWWSHandler-c11ea7d2.js} +2 -1
  6. package/build/cjs/{PfisterWWSHandler-8f522ab6.js → PfisterWWSHandler-3c723ecc.js} +2 -1
  7. package/build/cjs/PlannerHandler2D-6c0324be.js +544 -0
  8. package/build/cjs/{SeriousBasketHandler-b39f0556.js → SeriousBasketHandler-d1ae4006.js} +2 -1
  9. package/build/cjs/{ShelfPlanner-1dde2d7c.js → ShelfPlanner-04d98f4d.js} +2 -1
  10. package/build/cjs/{StandardWWSHandler-62ec343d.js → StandardWWSHandler-9b596caf.js} +2 -1
  11. package/build/cjs/{index-d63749e4.js → index-633196ab.js} +501 -650
  12. package/build/cjs/index.js +6 -2
  13. package/build/esm/{DivaBoxPlanner-a347ef5d.js → DivaBoxPlanner-fa9f6ec6.js} +4 -4
  14. package/build/esm/{DivaStandardPlanner-a8f0d722.js → DivaStandardPlanner-6c001048.js} +8 -28
  15. package/build/esm/{DoorPlanner-60c065e5.js → DoorPlanner-ef9165f9.js} +2 -1
  16. package/build/esm/{Host3DSignalR-0c7e84a7.js → Host3DSignalR-2dc8478a.js} +2 -1
  17. package/build/esm/{LiviqueWWSHandler-3df03404.js → LiviqueWWSHandler-b6e8bf5f.js} +2 -1
  18. package/build/esm/{PfisterWWSHandler-28b609ef.js → PfisterWWSHandler-54b3e0aa.js} +2 -1
  19. package/build/esm/PlannerHandler2D-0e61311d.js +526 -0
  20. package/build/esm/{SeriousBasketHandler-276a8035.js → SeriousBasketHandler-7b097870.js} +2 -1
  21. package/build/esm/{ShelfPlanner-7380b831.js → ShelfPlanner-f3e86534.js} +2 -1
  22. package/build/esm/{StandardWWSHandler-1d13f6a3.js → StandardWWSHandler-4b0caefd.js} +2 -1
  23. package/build/esm/{index-358c0a3c.js → index-6c8de812.js} +502 -650
  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-dbe1d858.js +0 -2470
  44. package/build/esm/PlannerHandler2D-f8657005.js +0 -2455
@@ -16,6 +16,7 @@ import _inherits from '@babel/runtime/helpers/inherits';
16
16
  import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper';
17
17
  import BasketHandler from '@crystaldesign/basket-handler';
18
18
  import { io } from 'socket.io-client';
19
+ import '@crystaldesign/planner-2d-core';
19
20
 
20
21
  (function() {
21
22
  const env = {"STAGE":"production"};
@@ -20632,6 +20633,8 @@ function getCatalogPlanner(article, catalogArticle, catalogData) {
20632
20633
  }
20633
20634
  function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps, plannerPaletteViewInfo) {
20634
20635
  var _catPlanArticle$filte, _catPlanArticle$group, _catPlanArticle$svgs;
20636
+ if (catPlanArticle.hideInPlannerStep) return;
20637
+ if (catalogProps.has3dModels && !catPlanArticle.modelName3D) return;
20635
20638
  plannerPaletteViewInfo.catalogPlannerArticles.push({
20636
20639
  articleCodex: catPlanArticle.codex,
20637
20640
  avlFilter: catPlanArticle.avlFilter,
@@ -20650,7 +20653,7 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
20650
20653
  hasAVS: !!catPlanArticle.topAVS,
20651
20654
  hasAVU: !!catPlanArticle.topAVU,
20652
20655
  image: catPlanArticle.getImage(),
20653
- is3DModell: false,
20656
+ is3DModell: !!catPlanArticle.modelName3D,
20654
20657
  layer: catPlanArticle.topLayer,
20655
20658
  price: catPlanArticle.basePrice,
20656
20659
  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,
@@ -29905,7 +29908,7 @@ var DivaArticle = /*#__PURE__*/function () {
29905
29908
  break;
29906
29909
  }
29907
29910
  _context.next = 4;
29908
- return import('./ShelfPlanner-7380b831.js');
29911
+ return import('./ShelfPlanner-f3e86534.js');
29909
29912
  case 4:
29910
29913
  _yield$import = _context.sent;
29911
29914
  ShelfPlanner = _yield$import["default"];
@@ -38000,7 +38003,7 @@ var DivaSet = /*#__PURE__*/function () {
38000
38003
  break;
38001
38004
  }
38002
38005
  _context5.next = 3;
38003
- return import('./DoorPlanner-60c065e5.js');
38006
+ return import('./DoorPlanner-ef9165f9.js');
38004
38007
  case 3:
38005
38008
  _yield$import = _context5.sent;
38006
38009
  DoorPlanner = _yield$import["default"];
@@ -42326,19 +42329,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
42326
42329
  while (1) switch (_context45.prev = _context45.next) {
42327
42330
  case 0:
42328
42331
  urlToPlanning2D = undefined;
42329
- planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
42332
+ _context45.next = 3;
42333
+ return set.getPlanning2DAsJpg();
42334
+ case 3:
42335
+ planning2DAsJPGBase64 = _context45.sent;
42330
42336
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
42331
- _context45.next = 7;
42337
+ _context45.next = 9;
42332
42338
  break;
42333
42339
  }
42334
42340
  fileName = this.getPendingUploadFileName(basketData, set.getSetId(), 'planning2D', 'jpg', variantId);
42335
- _context45.next = 6;
42341
+ _context45.next = 8;
42336
42342
  return set.plannerHandler.saveSet2DImage(basketData, set.getSetId(), planning2DAsJPGBase64, fileName, variantId);
42337
- case 6:
42343
+ case 8:
42338
42344
  urlToPlanning2D = _context45.sent;
42339
- case 7:
42345
+ case 9:
42340
42346
  return _context45.abrupt("return", urlToPlanning2D);
42341
- case 8:
42347
+ case 10:
42342
42348
  case "end":
42343
42349
  return _context45.stop();
42344
42350
  }
@@ -43581,7 +43587,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43581
43587
  break;
43582
43588
  case 3:
43583
43589
  _context12.next = 5;
43584
- return import('./PfisterWWSHandler-28b609ef.js');
43590
+ return import('./PfisterWWSHandler-54b3e0aa.js');
43585
43591
  case 5:
43586
43592
  _yield$import = _context12.sent;
43587
43593
  PfisterWWSHandler = _yield$import["default"];
@@ -43589,7 +43595,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43589
43595
  return _context12.abrupt("break", 27);
43590
43596
  case 9:
43591
43597
  _context12.next = 11;
43592
- return import('./LiviqueWWSHandler-3df03404.js');
43598
+ return import('./LiviqueWWSHandler-b6e8bf5f.js');
43593
43599
  case 11:
43594
43600
  _yield$import2 = _context12.sent;
43595
43601
  LiviqueWWSHandler = _yield$import2["default"];
@@ -43597,7 +43603,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43597
43603
  return _context12.abrupt("break", 27);
43598
43604
  case 15:
43599
43605
  _context12.next = 17;
43600
- return import('./SeriousBasketHandler-276a8035.js');
43606
+ return import('./SeriousBasketHandler-7b097870.js');
43601
43607
  case 17:
43602
43608
  _yield$import3 = _context12.sent;
43603
43609
  SeriousWWSHandler = _yield$import3["default"];
@@ -43605,7 +43611,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
43605
43611
  return _context12.abrupt("break", 27);
43606
43612
  case 21:
43607
43613
  _context12.next = 23;
43608
- return import('./StandardWWSHandler-1d13f6a3.js');
43614
+ return import('./StandardWWSHandler-4b0caefd.js');
43609
43615
  case 23:
43610
43616
  _yield$import4 = _context12.sent;
43611
43617
  StandardWWSHandler = _yield$import4["default"];
@@ -44988,7 +44994,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
44988
44994
  while (1) switch (_context3.prev = _context3.next) {
44989
44995
  case 0:
44990
44996
  _context3.next = 2;
44991
- return import('./Host3DSignalR-0c7e84a7.js');
44997
+ return import('./Host3DSignalR-2dc8478a.js');
44992
44998
  case 2:
44993
44999
  _yield$import = _context3.sent;
44994
45000
  Host3DSignalR = _yield$import["default"];
@@ -46664,7 +46670,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46664
46670
  break;
46665
46671
  case 8:
46666
46672
  _context5.next = 10;
46667
- return import('./DivaStandardPlanner-a8f0d722.js');
46673
+ return import('./DivaStandardPlanner-6c001048.js');
46668
46674
  case 10:
46669
46675
  _yield$import = _context5.sent;
46670
46676
  DivaStandardPlanner = _yield$import["default"];
@@ -46675,7 +46681,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
46675
46681
  return _context5.abrupt("break", 21);
46676
46682
  case 15:
46677
46683
  _context5.next = 17;
46678
- return import('./DivaBoxPlanner-a347ef5d.js');
46684
+ return import('./DivaBoxPlanner-fa9f6ec6.js');
46679
46685
  case 17:
46680
46686
  _yield$import2 = _context5.sent;
46681
46687
  DivaBoxPlanner = _yield$import2["default"];
@@ -47972,18 +47978,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47972
47978
  LOG$2.debug('new HQRenderScript set');
47973
47979
  (_this$setHQRenderScri = _this.setHQRenderScript) === null || _this$setHQRenderScri === void 0 || _this$setHQRenderScri.call(_this, hqRenderscript.HQRenderScript);
47974
47980
  });
47981
+ /** The latest 2D-grid render; a capture must await it, otherwise it reads the canvas of the previous planning. */
47982
+ _defineProperty(this, "pending2DRender", void 0);
47975
47983
  _defineProperty(this, "update2DGrid", function (set) {
47976
47984
  if (!_this.getInitPlannerViewMode || _this.getInitPlannerViewMode() == 'No') return;
47977
47985
  var boundingBox = setHandlerInstance.get2DViewPlannerBoundingBox(set);
47978
- if (boundingBox) {
47979
- var _this$updatePlanner2D;
47980
- (_this$updatePlanner2D = _this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 || _this$updatePlanner2D.call(_this, boundingBox);
47981
- }
47986
+ if (boundingBox) _this.start2DRender(boundingBox);
47982
47987
  });
47983
- _defineProperty(this, "getPlanning2DAsJpg", function () {
47988
+ _defineProperty(this, "getPlanning2DAsJpg", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
47984
47989
  var _this$getCanvas2DAsJP;
47985
- return (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this);
47986
- });
47990
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
47991
+ while (1) switch (_context.prev = _context.next) {
47992
+ case 0:
47993
+ _context.next = 2;
47994
+ return _this.pending2DRender;
47995
+ case 2:
47996
+ return _context.abrupt("return", (_this$getCanvas2DAsJP = _this.getCanvas2DAsJPG) === null || _this$getCanvas2DAsJP === void 0 ? void 0 : _this$getCanvas2DAsJP.call(_this));
47997
+ case 3:
47998
+ case "end":
47999
+ return _context.stop();
48000
+ }
48001
+ }, _callee);
48002
+ })));
47987
48003
  /***********************************Functions in Logik called From View *************************************/
47988
48004
  _defineProperty(this, "onElementSelectionChanged", function (setId, elementId, oldTabgroupType) {
47989
48005
  if (setId) {
@@ -48018,35 +48034,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48018
48034
  * @param configStepKey unique indentifier for configStep
48019
48035
  */
48020
48036
  _defineProperty(this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
48021
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(configStepKey, paletteId, isUpdate, visible) {
48037
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configStepKey, paletteId, isUpdate, visible) {
48022
48038
  var _this$state2, _this$state3, _this$updateConfigIte;
48023
48039
  var retValues;
48024
- return _regeneratorRuntime.wrap(function _callee$(_context) {
48025
- while (1) switch (_context.prev = _context.next) {
48040
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
48041
+ while (1) switch (_context2.prev = _context2.next) {
48026
48042
  case 0:
48027
- _context.next = 2;
48043
+ _context2.next = 2;
48028
48044
  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));
48029
48045
  case 2:
48030
- retValues = _context.sent;
48046
+ retValues = _context2.sent;
48031
48047
  (_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);
48032
48048
  case 4:
48033
48049
  case "end":
48034
- return _context.stop();
48050
+ return _context2.stop();
48035
48051
  }
48036
- }, _callee);
48052
+ }, _callee2);
48037
48053
  }));
48038
48054
  return function (_x, _x2, _x3, _x4) {
48039
- return _ref.apply(this, arguments);
48055
+ return _ref2.apply(this, arguments);
48040
48056
  };
48041
48057
  }());
48042
48058
  /**
48043
48059
  * this function laods the summary Items
48044
48060
  */
48045
- _defineProperty(this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
48061
+ _defineProperty(this, "loadSummaryItems", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
48046
48062
  var _this$actions, _this$actions$toggleL, _this$updateSummaryIt, _this$actions2, _this$actions2$toggle;
48047
48063
  var setPriceCurrency, setPriceFormat, summaryItems;
48048
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
48049
- while (1) switch (_context2.prev = _context2.next) {
48064
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
48065
+ while (1) switch (_context3.prev = _context3.next) {
48050
48066
  case 0:
48051
48067
  setPriceCurrency = setHandlerInstance.getActSetPriceFormat(_this.actSet());
48052
48068
  setPriceFormat = undefined;
@@ -48057,17 +48073,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48057
48073
  }
48058
48074
  //Do also pass the correct price format
48059
48075
  (_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');
48060
- _context2.next = 6;
48076
+ _context3.next = 6;
48061
48077
  return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
48062
48078
  case 6:
48063
- summaryItems = _context2.sent;
48079
+ summaryItems = _context3.sent;
48064
48080
  (_this$updateSummaryIt = _this.updateSummaryItems) === null || _this$updateSummaryIt === void 0 || _this$updateSummaryIt.call(_this, summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
48065
48081
  (_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');
48066
48082
  case 9:
48067
48083
  case "end":
48068
- return _context2.stop();
48084
+ return _context3.stop();
48069
48085
  }
48070
- }, _callee2);
48086
+ }, _callee3);
48071
48087
  })));
48072
48088
  _defineProperty(this, "loadStaticRoomList", function (dontUpdateView) {
48073
48089
  var _this$updateStaticRoo2;
@@ -48098,41 +48114,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48098
48114
  * @param parentElement ElementID of the parent element used for docking
48099
48115
  */
48100
48116
  _defineProperty(this, "addPlannerElement", /*#__PURE__*/function () {
48101
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(elementCodex, initParams, dontUpdateView) {
48117
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(elementCodex, initParams, dontUpdateView) {
48102
48118
  var _this$actions3, _this$actions3$toggle, _this$actions6, _this$actions6$toggle, _this$updateViewPlann, _this$updateElementSe;
48103
48119
  var set, newArticle, _this$actions4, _this$actions4$openMo, _this$i18n, _this$i18n2, _this$actions5, _this$actions5$toggle, baseArticle;
48104
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
48105
- while (1) switch (_context3.prev = _context3.next) {
48120
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
48121
+ while (1) switch (_context4.prev = _context4.next) {
48106
48122
  case 0:
48107
48123
  set = _this.actSet();
48108
48124
  (_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);
48109
- _context3.prev = 2;
48110
- _context3.next = 5;
48125
+ _context4.prev = 2;
48126
+ _context4.next = 5;
48111
48127
  return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
48112
48128
  case 5:
48113
- newArticle = _context3.sent;
48114
- _context3.next = 13;
48129
+ newArticle = _context4.sent;
48130
+ _context4.next = 13;
48115
48131
  break;
48116
48132
  case 8:
48117
- _context3.prev = 8;
48118
- _context3.t0 = _context3["catch"](2);
48133
+ _context4.prev = 8;
48134
+ _context4.t0 = _context4["catch"](2);
48119
48135
  (_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, {
48120
48136
  accept: true,
48121
48137
  title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
48122
- 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.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true)
48138
+ 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.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true)
48123
48139
  });
48124
48140
  (_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);
48125
- throw new Error(_context3.t0);
48141
+ throw new Error(_context4.t0);
48126
48142
  case 13:
48127
48143
  (_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);
48128
48144
  if (!newArticle.toDeleteAfterInit) {
48129
- _context3.next = 18;
48145
+ _context4.next = 18;
48130
48146
  break;
48131
48147
  }
48132
- _context3.next = 17;
48148
+ _context4.next = 17;
48133
48149
  return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
48134
48150
  case 17:
48135
- return _context3.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
48151
+ return _context4.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
48136
48152
  case 18:
48137
48153
  _this.updateConfigStructure();
48138
48154
  (_this$updateViewPlann = _this.updateViewPlannerElements) === null || _this$updateViewPlann === void 0 || _this$updateViewPlann.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
@@ -48144,15 +48160,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48144
48160
  if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
48145
48161
  _this.checkMatchingProducts('onAdd');
48146
48162
  _this.plannerChangeLog('onAddPlanner');
48147
- return _context3.abrupt("return", 'ElementAdded');
48163
+ return _context4.abrupt("return", 'ElementAdded');
48148
48164
  case 29:
48149
48165
  case "end":
48150
- return _context3.stop();
48166
+ return _context4.stop();
48151
48167
  }
48152
- }, _callee3, null, [[2, 8]]);
48168
+ }, _callee4, null, [[2, 8]]);
48153
48169
  }));
48154
48170
  return function (_x5, _x6, _x7) {
48155
- return _ref3.apply(this, arguments);
48171
+ return _ref4.apply(this, arguments);
48156
48172
  };
48157
48173
  }());
48158
48174
  /**
@@ -48162,27 +48178,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48162
48178
  * @param articleCodex articleCodex of the new Element
48163
48179
  */
48164
48180
  _defineProperty(this, "switchPlannerElement", /*#__PURE__*/function () {
48165
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(setId, elementId, articleCodex, initParams) {
48181
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(setId, elementId, articleCodex, initParams) {
48166
48182
  var _this$actions7, _this$actions7$toggle, _this$actions8, _this$actions8$toggle, _this$updateViewPlann2, _this$updateElementSe2;
48167
48183
  var set, variantValues, deletionResult, article;
48168
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
48169
- while (1) switch (_context4.prev = _context4.next) {
48184
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
48185
+ while (1) switch (_context5.prev = _context5.next) {
48170
48186
  case 0:
48171
48187
  _this.setActSet(setId);
48172
48188
  set = _this.actSet();
48173
48189
  variantValues = setHandlerInstance.getVariantValuesOfElement(set, elementId);
48174
- _context4.next = 5;
48190
+ _context5.next = 5;
48175
48191
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId);
48176
48192
  case 5:
48177
- deletionResult = _context4.sent;
48193
+ deletionResult = _context5.sent;
48178
48194
  (_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);
48179
48195
  initParams.oldPlannerTransform = deletionResult.oldTransform;
48180
48196
  initParams.variantValues = _objectSpread$8(_objectSpread$8({}, variantValues), {}, _defineProperty({}, (!set.CatalogData.isIDMFormat ? 'OPT' : '') + 'PLANNERSWITCH', (!set.CatalogData.isIDMFormat ? 'OPV' : '') + articleCodex));
48181
- _context4.next = 11;
48197
+ _context5.next = 11;
48182
48198
  return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
48183
48199
  case 11:
48184
- article = _context4.sent;
48185
- _context4.next = 14;
48200
+ article = _context5.sent;
48201
+ _context5.next = 14;
48186
48202
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
48187
48203
  case 14:
48188
48204
  (_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);
@@ -48197,29 +48213,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48197
48213
  _this.plannerChangeLog('onSwitchPlanner');
48198
48214
  case 24:
48199
48215
  case "end":
48200
- return _context4.stop();
48216
+ return _context5.stop();
48201
48217
  }
48202
- }, _callee4);
48218
+ }, _callee5);
48203
48219
  }));
48204
48220
  return function (_x8, _x9, _x10, _x11) {
48205
- return _ref4.apply(this, arguments);
48221
+ return _ref5.apply(this, arguments);
48206
48222
  };
48207
48223
  }());
48208
48224
  _defineProperty(this, "addAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48209
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
48225
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey, partlistCodexToInit) {
48210
48226
  var _this$actions9, _this$actions9$toggle, _this$actions10, _this$actions10$toggl;
48211
48227
  var set, retVal, _this$updateViewPlann3;
48212
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
48213
- while (1) switch (_context5.prev = _context5.next) {
48228
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
48229
+ while (1) switch (_context6.prev = _context6.next) {
48214
48230
  case 0:
48215
48231
  set = _this.actSet();
48216
48232
  (_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);
48217
- _context5.next = 4;
48233
+ _context6.next = 4;
48218
48234
  return setHandlerInstance.addAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId, {
48219
48235
  partlistCodexToInit: partlistCodexToInit
48220
48236
  });
48221
48237
  case 4:
48222
- retVal = _context5.sent;
48238
+ retVal = _context6.sent;
48223
48239
  (_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);
48224
48240
  if (retVal !== false) {
48225
48241
  _this.loadShelfPlannerItems(paletteId, configStepKey, 'add_accessoire');
@@ -48231,29 +48247,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48231
48247
  }
48232
48248
  _this.checkMatchingProducts('onShelfAdd');
48233
48249
  _this.plannerChangeLog('onAddPlanner');
48234
- return _context5.abrupt("return", retVal);
48250
+ return _context6.abrupt("return", retVal);
48235
48251
  case 10:
48236
48252
  case "end":
48237
- return _context5.stop();
48253
+ return _context6.stop();
48238
48254
  }
48239
- }, _callee5);
48255
+ }, _callee6);
48240
48256
  }));
48241
48257
  return function (_x12, _x13, _x14, _x15, _x16, _x17) {
48242
- return _ref5.apply(this, arguments);
48258
+ return _ref6.apply(this, arguments);
48243
48259
  };
48244
48260
  }());
48245
48261
  _defineProperty(this, "moveShelfItem", /*#__PURE__*/function () {
48246
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, grid, initialIndex, finalIndex, configStepKey) {
48262
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(paletteId, grid, initialIndex, finalIndex, configStepKey) {
48247
48263
  var _this$updateViewPlann4;
48248
48264
  var set, result, _this$updatePlannerMs, _this$i18n3;
48249
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
48250
- while (1) switch (_context6.prev = _context6.next) {
48265
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
48266
+ while (1) switch (_context7.prev = _context7.next) {
48251
48267
  case 0:
48252
48268
  set = _this.actSet();
48253
- _context6.next = 3;
48269
+ _context7.next = 3;
48254
48270
  return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
48255
48271
  case 3:
48256
- result = _context6.sent;
48272
+ result = _context7.sent;
48257
48273
  if (result == 'RESETTED_CELLS') {
48258
48274
  (_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);
48259
48275
  }
@@ -48263,12 +48279,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48263
48279
  _this.updatePlannerView('MOVE_SHELF_ITEM');
48264
48280
  case 9:
48265
48281
  case "end":
48266
- return _context6.stop();
48282
+ return _context7.stop();
48267
48283
  }
48268
- }, _callee6);
48284
+ }, _callee7);
48269
48285
  }));
48270
48286
  return function (_x18, _x19, _x20, _x21, _x22) {
48271
- return _ref6.apply(this, arguments);
48287
+ return _ref7.apply(this, arguments);
48272
48288
  };
48273
48289
  }());
48274
48290
  _defineProperty(this, "moveDoors", function (movedDoor, targetDoor) {
@@ -48276,14 +48292,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48276
48292
  _this.updatePlannerView('MOVE_DOORS');
48277
48293
  });
48278
48294
  _defineProperty(this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
48279
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
48295
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
48280
48296
  var _this$updateViewPlann5;
48281
48297
  var set;
48282
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
48283
- while (1) switch (_context7.prev = _context7.next) {
48298
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
48299
+ while (1) switch (_context8.prev = _context8.next) {
48284
48300
  case 0:
48285
48301
  set = _this.actSet();
48286
- _context7.next = 3;
48302
+ _context8.next = 3;
48287
48303
  return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
48288
48304
  case 3:
48289
48305
  _this.updateConfigStructure();
@@ -48296,12 +48312,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48296
48312
  _this.plannerChangeLog('onDeletePlanner');
48297
48313
  case 11:
48298
48314
  case "end":
48299
- return _context7.stop();
48315
+ return _context8.stop();
48300
48316
  }
48301
- }, _callee7);
48317
+ }, _callee8);
48302
48318
  }));
48303
48319
  return function (_x23, _x24, _x25, _x26, _x27) {
48304
- return _ref7.apply(this, arguments);
48320
+ return _ref8.apply(this, arguments);
48305
48321
  };
48306
48322
  }());
48307
48323
  /**
@@ -48312,12 +48328,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48312
48328
  * @param transState
48313
48329
  */
48314
48330
  _defineProperty(this, "updatePlannerTrans", /*#__PURE__*/function () {
48315
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
48331
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
48316
48332
  var _this$updateElementSe3;
48317
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
48318
- while (1) switch (_context8.prev = _context8.next) {
48333
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
48334
+ while (1) switch (_context9.prev = _context9.next) {
48319
48335
  case 0:
48320
- _context8.next = 2;
48336
+ _context9.next = 2;
48321
48337
  return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
48322
48338
  case 2:
48323
48339
  if (transState == 'END') {
@@ -48326,12 +48342,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48326
48342
  }
48327
48343
  case 3:
48328
48344
  case "end":
48329
- return _context8.stop();
48345
+ return _context9.stop();
48330
48346
  }
48331
- }, _callee8);
48347
+ }, _callee9);
48332
48348
  }));
48333
48349
  return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
48334
- return _ref8.apply(this, arguments);
48350
+ return _ref9.apply(this, arguments);
48335
48351
  };
48336
48352
  }());
48337
48353
  /**
@@ -48350,18 +48366,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48350
48366
  }
48351
48367
  });
48352
48368
  _defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
48353
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
48369
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
48354
48370
  var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
48355
48371
  var set, ret;
48356
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
48357
- while (1) switch (_context9.prev = _context9.next) {
48372
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
48373
+ while (1) switch (_context10.prev = _context10.next) {
48358
48374
  case 0:
48359
48375
  set = _this.actSet();
48360
48376
  (_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);
48361
- _context9.next = 4;
48377
+ _context10.next = 4;
48362
48378
  return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
48363
48379
  case 4:
48364
- ret = _context9.sent;
48380
+ ret = _context10.sent;
48365
48381
  (_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);
48366
48382
  if (ret.somethingChanged) _this.updateConfigStructure();
48367
48383
  _this.updatePlannerView('UPDATE_ACC_QUANTITY');
@@ -48371,25 +48387,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48371
48387
  _this.plannerChangeLog('onUpdateAccessoireQuantity');
48372
48388
  case 12:
48373
48389
  case "end":
48374
- return _context9.stop();
48390
+ return _context10.stop();
48375
48391
  }
48376
- }, _callee9);
48392
+ }, _callee10);
48377
48393
  }));
48378
48394
  return function (_x35, _x36, _x37, _x38) {
48379
- return _ref9.apply(this, arguments);
48395
+ return _ref10.apply(this, arguments);
48380
48396
  };
48381
48397
  }());
48382
48398
  _defineProperty(this, "deleteAccessoire", /*#__PURE__*/function () {
48383
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(articleCodex, parentBasketId) {
48399
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(articleCodex, parentBasketId) {
48384
48400
  var set, wasDeleted, _this$updateViewPlann6;
48385
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
48386
- while (1) switch (_context10.prev = _context10.next) {
48401
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
48402
+ while (1) switch (_context11.prev = _context11.next) {
48387
48403
  case 0:
48388
48404
  set = _this.actSet();
48389
- _context10.next = 3;
48405
+ _context11.next = 3;
48390
48406
  return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
48391
48407
  case 3:
48392
- wasDeleted = _context10.sent;
48408
+ wasDeleted = _context11.sent;
48393
48409
  if (wasDeleted) {
48394
48410
  _this.updateConfigStructure();
48395
48411
  (_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
@@ -48399,15 +48415,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48399
48415
  }
48400
48416
  _this.checkMatchingProducts('onAccessoireDelete');
48401
48417
  _this.plannerChangeLog('onDeletePlanner');
48402
- return _context10.abrupt("return", wasDeleted);
48418
+ return _context11.abrupt("return", wasDeleted);
48403
48419
  case 8:
48404
48420
  case "end":
48405
- return _context10.stop();
48421
+ return _context11.stop();
48406
48422
  }
48407
- }, _callee10);
48423
+ }, _callee11);
48408
48424
  }));
48409
48425
  return function (_x39, _x40) {
48410
- return _ref10.apply(this, arguments);
48426
+ return _ref11.apply(this, arguments);
48411
48427
  };
48412
48428
  }());
48413
48429
  _defineProperty(this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
@@ -48429,13 +48445,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48429
48445
  * @param configStepKey act ConfigStep
48430
48446
  */
48431
48447
  _defineProperty(this, "configSingleIsChanged", /*#__PURE__*/function () {
48432
- var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
48448
+ var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
48433
48449
  var set;
48434
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
48435
- while (1) switch (_context11.prev = _context11.next) {
48450
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
48451
+ while (1) switch (_context12.prev = _context12.next) {
48436
48452
  case 0:
48437
48453
  set = _this.actSet();
48438
- _context11.next = 3;
48454
+ _context12.next = 3;
48439
48455
  return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
48440
48456
  case 3:
48441
48457
  _this.updatePriceInView();
@@ -48445,15 +48461,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48445
48461
  configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
48446
48462
  _this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
48447
48463
  }
48448
- return _context11.abrupt("return", configStepKey);
48464
+ return _context12.abrupt("return", configStepKey);
48449
48465
  case 7:
48450
48466
  case "end":
48451
- return _context11.stop();
48467
+ return _context12.stop();
48452
48468
  }
48453
- }, _callee11);
48469
+ }, _callee12);
48454
48470
  }));
48455
48471
  return function (_x41, _x42, _x43, _x44, _x45, _x46) {
48456
- return _ref11.apply(this, arguments);
48472
+ return _ref12.apply(this, arguments);
48457
48473
  };
48458
48474
  }());
48459
48475
  /**
@@ -48467,23 +48483,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48467
48483
  */
48468
48484
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
48469
48485
  _defineProperty(this, "doConfigure", /*#__PURE__*/function () {
48470
- var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
48486
+ var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents, eventKey) {
48471
48487
  var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
48472
48488
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
48473
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
48474
- while (1) switch (_context12.prev = _context12.next) {
48489
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
48490
+ while (1) switch (_context13.prev = _context13.next) {
48475
48491
  case 0:
48476
48492
  set = _this.actSet();
48477
48493
  (_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);
48478
- _context12.next = 4;
48494
+ _context13.next = 4;
48479
48495
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
48480
48496
  case 4:
48481
- returnValues = _context12.sent;
48497
+ returnValues = _context13.sent;
48482
48498
  (_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);
48483
48499
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
48484
48500
  _this.checkMatchingProducts('onConfig');
48485
48501
  if (dontUpdatePlannerView) {
48486
- _context12.next = 18;
48502
+ _context13.next = 18;
48487
48503
  break;
48488
48504
  }
48489
48505
  _this.updateConfiguratorStructure(structure);
@@ -48497,80 +48513,80 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48497
48513
  _this.updateViewButtonsDependigOnConfigStructure();
48498
48514
  _this.updatePlannerView('DO_CONFIGURE', myValues);
48499
48515
  _this.updateWebConfiguratorTitle();
48500
- _context12.next = 18;
48516
+ _context13.next = 18;
48501
48517
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
48502
48518
  case 18:
48503
48519
  if (dontCallEvents) {
48504
- _context12.next = 21;
48520
+ _context13.next = 21;
48505
48521
  break;
48506
48522
  }
48507
- _context12.next = 21;
48523
+ _context13.next = 21;
48508
48524
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues, undefined, eventKey);
48509
48525
  case 21:
48510
48526
  _this.configuratorChangeLog('onConfigurationChange', myValues);
48511
48527
  case 22:
48512
48528
  case "end":
48513
- return _context12.stop();
48529
+ return _context13.stop();
48514
48530
  }
48515
- }, _callee12);
48531
+ }, _callee13);
48516
48532
  }));
48517
48533
  return function (_x47, _x48, _x49, _x50, _x51) {
48518
- return _ref12.apply(this, arguments);
48534
+ return _ref13.apply(this, arguments);
48519
48535
  };
48520
48536
  }());
48521
48537
  _defineProperty(this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
48522
- var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(myValues, isInit, eventKey) {
48538
+ var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(myValues, isInit, eventKey) {
48523
48539
  var _myValues;
48524
48540
  var set, articles, article;
48525
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
48526
- while (1) switch (_context13.prev = _context13.next) {
48541
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
48542
+ while (1) switch (_context14.prev = _context14.next) {
48527
48543
  case 0:
48528
48544
  if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
48529
- _context13.next = 2;
48545
+ _context14.next = 2;
48530
48546
  break;
48531
48547
  }
48532
- return _context13.abrupt("return");
48548
+ return _context14.abrupt("return");
48533
48549
  case 2:
48534
48550
  set = _this.actSet();
48535
48551
  if (set) {
48536
- _context13.next = 5;
48552
+ _context14.next = 5;
48537
48553
  break;
48538
48554
  }
48539
- return _context13.abrupt("return");
48555
+ return _context14.abrupt("return");
48540
48556
  case 5:
48541
48557
  if (!(!myValues || eventKey !== null && eventKey !== void 0 && eventKey.endsWith('repairing'))) {
48542
- _context13.next = 11;
48558
+ _context14.next = 11;
48543
48559
  break;
48544
48560
  }
48545
48561
  //get first option of the first article
48546
48562
  articles = set.getDivaArticles();
48547
48563
  article = articles[Object.keys(articles)[0]];
48548
48564
  if (article) {
48549
- _context13.next = 10;
48565
+ _context14.next = 10;
48550
48566
  break;
48551
48567
  }
48552
- return _context13.abrupt("return");
48568
+ return _context14.abrupt("return");
48553
48569
  case 10:
48554
48570
  myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutEmptyFreetext;
48555
48571
  case 11:
48556
- _context13.t0 = _this.divaBasketHandler;
48557
- _context13.t1 = set;
48558
- _context13.next = 15;
48572
+ _context14.t0 = _this.divaBasketHandler;
48573
+ _context14.t1 = set;
48574
+ _context14.next = 15;
48559
48575
  return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
48560
48576
  case 15:
48561
- _context13.t2 = _context13.sent;
48562
- _context13.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
48563
- _context13.t4 = isInit;
48564
- _context13.t5 = eventKey;
48565
- return _context13.abrupt("return", _context13.t0.fillBaksetforOnWebPlanerConfigChange.call(_context13.t0, _context13.t1, _context13.t2, _context13.t3, _context13.t4, _context13.t5));
48577
+ _context14.t2 = _context14.sent;
48578
+ _context14.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
48579
+ _context14.t4 = isInit;
48580
+ _context14.t5 = eventKey;
48581
+ return _context14.abrupt("return", _context14.t0.fillBaksetforOnWebPlanerConfigChange.call(_context14.t0, _context14.t1, _context14.t2, _context14.t3, _context14.t4, _context14.t5));
48566
48582
  case 20:
48567
48583
  case "end":
48568
- return _context13.stop();
48584
+ return _context14.stop();
48569
48585
  }
48570
- }, _callee13);
48586
+ }, _callee14);
48571
48587
  }));
48572
48588
  return function (_x52, _x53, _x54) {
48573
- return _ref13.apply(this, arguments);
48589
+ return _ref14.apply(this, arguments);
48574
48590
  };
48575
48591
  }());
48576
48592
  _defineProperty(this, "getPosNr", function (basketId) {
@@ -48608,10 +48624,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48608
48624
  return _createClass(DivaWebPlanner, [{
48609
48625
  key: "initialize",
48610
48626
  value: function () {
48611
- var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(cache) {
48627
+ var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(cache) {
48612
48628
  var viewReadyPromise, loadSuccessful, ret, set, _this$actions15, _this$i18n4, _this$i18n5, initializationId;
48613
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
48614
- while (1) switch (_context14.prev = _context14.next) {
48629
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
48630
+ while (1) switch (_context15.prev = _context15.next) {
48615
48631
  case 0:
48616
48632
  this.api = new DivaApiHandler(this.plannerConfig, this.handler, cache);
48617
48633
  this.api.setI18n(this.i18n);
@@ -48625,15 +48641,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48625
48641
  warningTime: 2000,
48626
48642
  errorTime: 4000
48627
48643
  });
48628
- _context14.next = 8;
48644
+ _context15.next = 8;
48629
48645
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
48630
48646
  case 8:
48631
48647
  this.plannerHandler = new DivaPlannerHandler(false);
48632
48648
  viewReadyPromise = this.initViewApiDependencies();
48633
- _context14.next = 12;
48649
+ _context15.next = 12;
48634
48650
  return this.divaBasketHandler.initializeBasket(this.api);
48635
48651
  case 12:
48636
- loadSuccessful = _context14.sent;
48652
+ loadSuccessful = _context15.sent;
48637
48653
  if (this.plannerConfig.configuratorSessionId) {
48638
48654
  // ID forced from outside (Landingpage, PDP, Planung-ändern)
48639
48655
  DivaUtils.businessMetrics.setConfiguratorSessionId(this.plannerConfig.configuratorSessionId);
@@ -48645,14 +48661,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48645
48661
  DivaUtils.businessMetrics.setConfiguratorSessionId();
48646
48662
  }
48647
48663
  if (!loadSuccessful) {
48648
- _context14.next = 31;
48664
+ _context15.next = 31;
48649
48665
  break;
48650
48666
  }
48651
- _context14.prev = 15;
48652
- _context14.next = 18;
48667
+ _context15.prev = 15;
48668
+ _context15.next = 18;
48653
48669
  return this.initializeSets(loadSuccessful, viewReadyPromise);
48654
48670
  case 18:
48655
- ret = _context14.sent;
48671
+ ret = _context15.sent;
48656
48672
  set = this.actSet();
48657
48673
  if (ret && set && set.CatalogData.archived) {
48658
48674
  if (this.i18n()) (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.openModal({
@@ -48661,15 +48677,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48661
48677
  text: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('configurator.catalog_not_listed_text')
48662
48678
  });
48663
48679
  }
48664
- return _context14.abrupt("return", ret);
48680
+ return _context15.abrupt("return", ret);
48665
48681
  case 24:
48666
- _context14.prev = 24;
48667
- _context14.t0 = _context14["catch"](15);
48668
- LOG$2.error(_context14.t0);
48669
- this.onError(_context14.t0);
48670
- return _context14.abrupt("return", false);
48682
+ _context15.prev = 24;
48683
+ _context15.t0 = _context15["catch"](15);
48684
+ LOG$2.error(_context15.t0);
48685
+ this.onError(_context15.t0);
48686
+ return _context15.abrupt("return", false);
48671
48687
  case 29:
48672
- _context14.next = 35;
48688
+ _context15.next = 35;
48673
48689
  break;
48674
48690
  case 31:
48675
48691
  this.onError();
@@ -48678,12 +48694,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48678
48694
  LOG$2.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
48679
48695
  initializationId: initializationId
48680
48696
  }, true);
48681
- return _context14.abrupt("return", false);
48697
+ return _context15.abrupt("return", false);
48682
48698
  case 35:
48683
48699
  case "end":
48684
- return _context14.stop();
48700
+ return _context15.stop();
48685
48701
  }
48686
- }, _callee14, this, [[15, 24]]);
48702
+ }, _callee15, this, [[15, 24]]);
48687
48703
  }));
48688
48704
  function initialize(_x55) {
48689
48705
  return _initialize.apply(this, arguments);
@@ -48693,50 +48709,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48693
48709
  }, {
48694
48710
  key: "initializeSets",
48695
48711
  value: function () {
48696
- var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(loadSuccessful, viewReadyPromise) {
48712
+ var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(loadSuccessful, viewReadyPromise) {
48697
48713
  var _this$actions17, _set$getDivaArticles, _catalogData$catalogM, _catalogData$catalogM2;
48698
48714
  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;
48699
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
48700
- while (1) switch (_context15.prev = _context15.next) {
48715
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
48716
+ while (1) switch (_context16.prev = _context16.next) {
48701
48717
  case 0:
48702
48718
  if (!(typeof loadSuccessful != 'boolean')) {
48703
- _context15.next = 9;
48719
+ _context16.next = 9;
48704
48720
  break;
48705
48721
  }
48706
48722
  if (!(loadSuccessful.type == 'ProductList')) {
48707
- _context15.next = 9;
48723
+ _context16.next = 9;
48708
48724
  break;
48709
48725
  }
48710
- _context15.next = 4;
48726
+ _context16.next = 4;
48711
48727
  return viewReadyPromise;
48712
48728
  case 4:
48713
- _context15.next = 6;
48729
+ _context16.next = 6;
48714
48730
  return this.initView();
48715
48731
  case 6:
48716
48732
  this.subscribeToWebPlannerEvents();
48717
48733
  (_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);
48718
- return _context15.abrupt("return", true);
48734
+ return _context16.abrupt("return", true);
48719
48735
  case 9:
48720
48736
  this.divaNr = this.divaBasketHandler.actDivaNr;
48721
48737
  initSetState = this.getInitStateForSet();
48722
48738
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
48723
- _context15.next = 14;
48739
+ _context16.next = 14;
48724
48740
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
48725
48741
  case 14:
48726
48742
  set = this.actSet();
48727
48743
  oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
48728
48744
  if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
48729
- _context15.next = 27;
48745
+ _context16.next = 27;
48730
48746
  break;
48731
48747
  }
48732
- _context15.next = 21;
48748
+ _context16.next = 21;
48733
48749
  return this.divaBasketHandler.getProduct(this.api, oldProductId);
48734
48750
  case 21:
48735
- result = _context15.sent;
48751
+ result = _context16.sent;
48736
48752
  if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
48737
48753
  (_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;
48738
48754
  (_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;
48739
- _context15.next = 28;
48755
+ _context16.next = 28;
48740
48756
  break;
48741
48757
  case 27:
48742
48758
  if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -48745,10 +48761,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48745
48761
  }
48746
48762
  }
48747
48763
  case 28:
48748
- _context15.next = 30;
48764
+ _context16.next = 30;
48749
48765
  return viewReadyPromise;
48750
48766
  case 30:
48751
- _context15.next = 32;
48767
+ _context16.next = 32;
48752
48768
  return this.initView();
48753
48769
  case 32:
48754
48770
  (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
@@ -48785,15 +48801,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48785
48801
  }, false);
48786
48802
  this.configuratorChangeLog('onConfigurationInit', undefined, true);
48787
48803
  this.plannerChangeLog('onInitPlanner', true);
48788
- _context15.next = 43;
48804
+ _context16.next = 43;
48789
48805
  return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
48790
48806
  case 43:
48791
- return _context15.abrupt("return", true);
48807
+ return _context16.abrupt("return", true);
48792
48808
  case 44:
48793
48809
  case "end":
48794
- return _context15.stop();
48810
+ return _context16.stop();
48795
48811
  }
48796
- }, _callee15, this);
48812
+ }, _callee16, this);
48797
48813
  }));
48798
48814
  function initializeSets(_x56, _x57) {
48799
48815
  return _initializeSets.apply(this, arguments);
@@ -48954,24 +48970,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48954
48970
  }, {
48955
48971
  key: "initView",
48956
48972
  value: (function () {
48957
- var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
48973
+ var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
48958
48974
  var _this$initConfigurato;
48959
48975
  var set, plannerMode, _this$initConfigurato2, _this$initPlannerView, _this$initConfigurato3, _this$updateViewButto, _this$updateViewPlann9, _this$onBasketInitial;
48960
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
48961
- while (1) switch (_context16.prev = _context16.next) {
48976
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
48977
+ while (1) switch (_context17.prev = _context17.next) {
48962
48978
  case 0:
48963
48979
  set = this.actSet();
48964
48980
  plannerMode = this.getPlannerMode();
48965
48981
  (_this$initConfigurato = this.initConfiguratorMode) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, plannerMode);
48966
48982
  if (!(plannerMode == 'ProductList')) {
48967
- _context16.next = 7;
48983
+ _context17.next = 7;
48968
48984
  break;
48969
48985
  }
48970
48986
  (_this$initConfigurato2 = this.initConfiguratorStructure) === null || _this$initConfigurato2 === void 0 || _this$initConfigurato2.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
48971
- _context16.next = 17;
48987
+ _context17.next = 17;
48972
48988
  break;
48973
48989
  case 7:
48974
- _context16.next = 9;
48990
+ _context17.next = 9;
48975
48991
  return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
48976
48992
  case 9:
48977
48993
  //first load the Configuratorstructure STARTCONFIG
@@ -48985,13 +49001,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
48985
49001
  (_this$onBasketInitial = this.onBasketInitialized) === null || _this$onBasketInitial === void 0 || _this$onBasketInitial.call(this);
48986
49002
  this.checkMatchingProducts('onInit');
48987
49003
  case 17:
48988
- _context16.next = 19;
49004
+ _context17.next = 19;
48989
49005
  return this.runInitMode(plannerMode);
48990
49006
  case 19:
48991
49007
  case "end":
48992
- return _context16.stop();
49008
+ return _context17.stop();
48993
49009
  }
48994
- }, _callee16, this);
49010
+ }, _callee17, this);
48995
49011
  }));
48996
49012
  function initView() {
48997
49013
  return _initView.apply(this, arguments);
@@ -49012,25 +49028,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49012
49028
  }, {
49013
49029
  key: "runInitMode",
49014
49030
  value: function () {
49015
- var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(plannerMode) {
49031
+ var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(plannerMode) {
49016
49032
  var _this$plannerConfig$i, _this$state5;
49017
49033
  var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
49018
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
49019
- while (1) switch (_context17.prev = _context17.next) {
49034
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
49035
+ while (1) switch (_context18.prev = _context18.next) {
49020
49036
  case 0:
49021
49037
  doDefault = true;
49022
49038
  if (!['SHOW_PDF'].includes((_this$plannerConfig$i = this.plannerConfig.initMode) !== null && _this$plannerConfig$i !== void 0 ? _this$plannerConfig$i : '')) {
49023
- _context17.next = 9;
49039
+ _context18.next = 9;
49024
49040
  break;
49025
49041
  }
49026
49042
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
49027
49043
  (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
49028
49044
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
49029
- _context17.next = 6;
49045
+ _context18.next = 6;
49030
49046
  return (_this$saveToBasketWra = this.saveToBasketWrapper) === null || _this$saveToBasketWra === void 0 ? void 0 : _this$saveToBasketWra.call(this);
49031
49047
  case 6:
49032
49048
  doDefault = false;
49033
- _context17.next = 10;
49049
+ _context18.next = 10;
49034
49050
  break;
49035
49051
  case 9:
49036
49052
  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) {
@@ -49054,9 +49070,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49054
49070
  }
49055
49071
  case 11:
49056
49072
  case "end":
49057
- return _context17.stop();
49073
+ return _context18.stop();
49058
49074
  }
49059
- }, _callee17, this);
49075
+ }, _callee18, this);
49060
49076
  }));
49061
49077
  function runInitMode(_x58) {
49062
49078
  return _runInitMode.apply(this, arguments);
@@ -49066,16 +49082,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49066
49082
  }, {
49067
49083
  key: "addSetToActPlanningByDivaNr",
49068
49084
  value: function () {
49069
- var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(divaNr) {
49085
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(divaNr) {
49070
49086
  var _this$updateViewPlann10;
49071
49087
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
49072
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
49073
- while (1) switch (_context18.prev = _context18.next) {
49088
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
49089
+ while (1) switch (_context19.prev = _context19.next) {
49074
49090
  case 0:
49075
49091
  set = this.actSet();
49076
49092
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
49077
49093
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
49078
- _context18.next = 5;
49094
+ _context19.next = 5;
49079
49095
  return this.divaBasketHandler.initializeBasket(this.api);
49080
49096
  case 5:
49081
49097
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -49083,30 +49099,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49083
49099
  i = 0;
49084
49100
  case 8:
49085
49101
  if (!(i < orderSets.length)) {
49086
- _context18.next = 24;
49102
+ _context19.next = 24;
49087
49103
  break;
49088
49104
  }
49089
49105
  orderset = orderSets[i];
49090
49106
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
49091
49107
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
49092
49108
  if (!loadedSet) {
49093
- _context18.next = 18;
49109
+ _context19.next = 18;
49094
49110
  break;
49095
49111
  }
49096
- _context18.next = 15;
49112
+ _context19.next = 15;
49097
49113
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
49098
49114
  case 15:
49099
49115
  this.checkMatchingProducts('onAdd');
49100
- _context18.next = 20;
49116
+ _context19.next = 20;
49101
49117
  break;
49102
49118
  case 18:
49103
- _context18.next = 20;
49119
+ _context19.next = 20;
49104
49120
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
49105
49121
  case 20:
49106
49122
  this.cleanUpEmptySets(true);
49107
49123
  case 21:
49108
49124
  i++;
49109
- _context18.next = 8;
49125
+ _context19.next = 8;
49110
49126
  break;
49111
49127
  case 24:
49112
49128
  this.divaBasketHandler.actBasket.OrderSets = [];
@@ -49118,9 +49134,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49118
49134
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
49119
49135
  case 31:
49120
49136
  case "end":
49121
- return _context18.stop();
49137
+ return _context19.stop();
49122
49138
  }
49123
- }, _callee18, this);
49139
+ }, _callee19, this);
49124
49140
  }));
49125
49141
  function addSetToActPlanningByDivaNr(_x59) {
49126
49142
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
@@ -49155,26 +49171,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49155
49171
  }, {
49156
49172
  key: "setActSetCurConfigStepKey",
49157
49173
  value: function () {
49158
- var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(curConfigStepKey) {
49174
+ var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(curConfigStepKey) {
49159
49175
  var set;
49160
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
49161
- while (1) switch (_context19.prev = _context19.next) {
49176
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
49177
+ while (1) switch (_context20.prev = _context20.next) {
49162
49178
  case 0:
49163
49179
  set = this.actSet();
49164
49180
  if (set) {
49165
- _context19.next = 3;
49181
+ _context20.next = 3;
49166
49182
  break;
49167
49183
  }
49168
- return _context19.abrupt("return");
49184
+ return _context20.abrupt("return");
49169
49185
  case 3:
49170
49186
  set.ActConfigStepKey = curConfigStepKey;
49171
- _context19.next = 6;
49187
+ _context20.next = 6;
49172
49188
  return setHandlerInstance.updateNavigation(set);
49173
49189
  case 6:
49174
49190
  case "end":
49175
- return _context19.stop();
49191
+ return _context20.stop();
49176
49192
  }
49177
- }, _callee19, this);
49193
+ }, _callee20, this);
49178
49194
  }));
49179
49195
  function setActSetCurConfigStepKey(_x60) {
49180
49196
  return _setActSetCurConfigStepKey.apply(this, arguments);
@@ -49269,7 +49285,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49269
49285
  if (boundingBox) {
49270
49286
  var _this$updateViewPlann11;
49271
49287
  (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49272
- this.updatePlanner2DGrid(boundingBox);
49288
+ this.start2DRender(boundingBox);
49273
49289
  }
49274
49290
  if (['3DImage', '3DCOMB'].includes(this.getInitPlannerViewMode())) {
49275
49291
  var _this$getDoShow3DDime5;
@@ -49306,6 +49322,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49306
49322
  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);
49307
49323
  }
49308
49324
  }
49325
+ }, {
49326
+ key: "start2DRender",
49327
+ value:
49328
+ /**
49329
+ * Starts a 2D-grid render and remembers it for {@link getPlanning2DAsJpg}.
49330
+ * The rejection MUST be swallowed: the cached promise is awaited by every later capture, so one failed render would break every following save.
49331
+ */
49332
+ function start2DRender(boundingBox) {
49333
+ var _this$updatePlanner2D;
49334
+ this.pending2DRender = Promise.resolve((_this$updatePlanner2D = this.updatePlanner2DGrid) === null || _this$updatePlanner2D === void 0 ? void 0 : _this$updatePlanner2D.call(this, boundingBox))["catch"](function (error) {
49335
+ LOG$2.error(error instanceof Error ? error : new Error('2D grid render failed: ' + String(error)));
49336
+ });
49337
+ }
49309
49338
  }, {
49310
49339
  key: "getAlternateRenderingsForSummary",
49311
49340
  value: function getAlternateRenderingsForSummary() {
@@ -49366,17 +49395,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49366
49395
  }, {
49367
49396
  key: "deletePlannerElement",
49368
49397
  value: function () {
49369
- var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, denyElementSelectionClear) {
49398
+ var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, denyElementSelectionClear) {
49370
49399
  var _this$updateViewPlann12;
49371
49400
  var set, result, _this$updateElementSe5, _this$updateElementSe6;
49372
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
49373
- while (1) switch (_context20.prev = _context20.next) {
49401
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
49402
+ while (1) switch (_context21.prev = _context21.next) {
49374
49403
  case 0:
49375
49404
  set = this.sets[setId];
49376
- _context20.next = 3;
49405
+ _context21.next = 3;
49377
49406
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
49378
49407
  case 3:
49379
- result = _context20.sent;
49408
+ result = _context21.sent;
49380
49409
  this.updateConfigStructure();
49381
49410
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49382
49411
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
@@ -49387,15 +49416,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49387
49416
  }
49388
49417
  this.updatePriceInView();
49389
49418
  this.checkMatchingProducts('onDelete');
49390
- _context20.next = 14;
49419
+ _context21.next = 14;
49391
49420
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
49392
49421
  case 14:
49393
49422
  this.plannerChangeLog('onDeletePlanner');
49394
49423
  case 15:
49395
49424
  case "end":
49396
- return _context20.stop();
49425
+ return _context21.stop();
49397
49426
  }
49398
- }, _callee20, this);
49427
+ }, _callee21, this);
49399
49428
  }));
49400
49429
  function deletePlannerElement(_x61, _x62, _x63) {
49401
49430
  return _deletePlannerElement.apply(this, arguments);
@@ -49410,14 +49439,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49410
49439
  }, {
49411
49440
  key: "movePlannerElement",
49412
49441
  value: (function () {
49413
- var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, absoluteIndex) {
49442
+ var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(setId, elementId, curConfigKey, absoluteIndex) {
49414
49443
  var _this$updateViewPlann13;
49415
49444
  var set;
49416
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
49417
- while (1) switch (_context21.prev = _context21.next) {
49445
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
49446
+ while (1) switch (_context22.prev = _context22.next) {
49418
49447
  case 0:
49419
49448
  set = this.sets[setId];
49420
- _context21.next = 3;
49449
+ _context22.next = 3;
49421
49450
  return setHandlerInstance.movePlannerElement(set, elementId, absoluteIndex);
49422
49451
  case 3:
49423
49452
  this.updateConfigStructure();
@@ -49427,9 +49456,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49427
49456
  this.updateViewButtonsDependigOnConfigStructure();
49428
49457
  case 8:
49429
49458
  case "end":
49430
- return _context21.stop();
49459
+ return _context22.stop();
49431
49460
  }
49432
- }, _callee21, this);
49461
+ }, _callee22, this);
49433
49462
  }));
49434
49463
  function movePlannerElement(_x64, _x65, _x66, _x67) {
49435
49464
  return _movePlannerElement.apply(this, arguments);
@@ -49446,23 +49475,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49446
49475
  }, {
49447
49476
  key: "copyPlannerElement",
49448
49477
  value: (function () {
49449
- var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(setId, elementId, curConfigKey, copyInfo) {
49478
+ var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(setId, elementId, curConfigKey, copyInfo) {
49450
49479
  var _this$updateViewPlann14;
49451
49480
  var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
49452
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
49453
- while (1) switch (_context22.prev = _context22.next) {
49481
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
49482
+ while (1) switch (_context23.prev = _context23.next) {
49454
49483
  case 0:
49455
49484
  if (copyInfo) {
49456
- _context22.next = 2;
49485
+ _context23.next = 2;
49457
49486
  break;
49458
49487
  }
49459
- return _context22.abrupt("return");
49488
+ return _context23.abrupt("return");
49460
49489
  case 2:
49461
49490
  set = this.sets[setId];
49462
- _context22.next = 5;
49491
+ _context23.next = 5;
49463
49492
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
49464
49493
  case 5:
49465
- newSelectedArticle = _context22.sent;
49494
+ newSelectedArticle = _context23.sent;
49466
49495
  this.updateConfigStructure();
49467
49496
  (_this$updateViewPlann14 = this.updateViewPlannerElements) === null || _this$updateViewPlann14 === void 0 || _this$updateViewPlann14.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
49468
49497
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
@@ -49476,12 +49505,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49476
49505
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
49477
49506
  }
49478
49507
  this.checkMatchingProducts('onCopy');
49479
- return _context22.abrupt("return", newConfigStepKey);
49508
+ return _context23.abrupt("return", newConfigStepKey);
49480
49509
  case 15:
49481
49510
  case "end":
49482
- return _context22.stop();
49511
+ return _context23.stop();
49483
49512
  }
49484
- }, _callee22, this);
49513
+ }, _callee23, this);
49485
49514
  }));
49486
49515
  function copyPlannerElement(_x68, _x69, _x70, _x71) {
49487
49516
  return _copyPlannerElement.apply(this, arguments);
@@ -49512,48 +49541,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49512
49541
  }, {
49513
49542
  key: "getFreePlacesOnGrids",
49514
49543
  value: function () {
49515
- var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(gridGroup, from) {
49544
+ var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(gridGroup, from) {
49516
49545
  var _this$updateFreePlace;
49517
49546
  var set, freeShelfGrids, plannedShelfGrids;
49518
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
49519
- while (1) switch (_context23.prev = _context23.next) {
49547
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
49548
+ while (1) switch (_context24.prev = _context24.next) {
49520
49549
  case 0:
49521
49550
  set = this.actSet();
49522
49551
  if (set) {
49523
- _context23.next = 3;
49552
+ _context24.next = 3;
49524
49553
  break;
49525
49554
  }
49526
49555
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
49527
49556
  case 3:
49528
49557
  if (!gridGroup) {
49529
- _context23.next = 9;
49558
+ _context24.next = 9;
49530
49559
  break;
49531
49560
  }
49532
- _context23.next = 6;
49561
+ _context24.next = 6;
49533
49562
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
49534
49563
  case 6:
49535
- _context23.t0 = _context23.sent;
49536
- _context23.next = 10;
49564
+ _context24.t0 = _context24.sent;
49565
+ _context24.next = 10;
49537
49566
  break;
49538
49567
  case 9:
49539
- _context23.t0 = undefined;
49568
+ _context24.t0 = undefined;
49540
49569
  case 10:
49541
- freeShelfGrids = _context23.t0;
49570
+ freeShelfGrids = _context24.t0;
49542
49571
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
49543
49572
  LOG$2.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
49544
49573
  (_this$updateFreePlace = this.updateFreePlacesOnGrids) === null || _this$updateFreePlace === void 0 || _this$updateFreePlace.call(this, {
49545
49574
  freeShelfGrids: freeShelfGrids,
49546
49575
  plannedShelfGrids: plannedShelfGrids
49547
49576
  });
49548
- return _context23.abrupt("return", {
49577
+ return _context24.abrupt("return", {
49549
49578
  freeShelfGrids: freeShelfGrids,
49550
49579
  plannedShelfGrids: plannedShelfGrids
49551
49580
  });
49552
49581
  case 15:
49553
49582
  case "end":
49554
- return _context23.stop();
49583
+ return _context24.stop();
49555
49584
  }
49556
- }, _callee23, this);
49585
+ }, _callee24, this);
49557
49586
  }));
49558
49587
  function getFreePlacesOnGrids(_x72, _x73) {
49559
49588
  return _getFreePlacesOnGrids.apply(this, arguments);
@@ -49571,34 +49600,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49571
49600
  }, {
49572
49601
  key: "moveShelfItemToGrid",
49573
49602
  value: function () {
49574
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49603
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(accessoireBasketId, parentBasketId, gridName, cellIndex) {
49575
49604
  var set, newGridId;
49576
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
49577
- while (1) switch (_context24.prev = _context24.next) {
49605
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
49606
+ while (1) switch (_context25.prev = _context25.next) {
49578
49607
  case 0:
49579
49608
  set = this.actSet();
49580
49609
  if (set) {
49581
- _context24.next = 3;
49610
+ _context25.next = 3;
49582
49611
  break;
49583
49612
  }
49584
- return _context24.abrupt("return");
49613
+ return _context25.abrupt("return");
49585
49614
  case 3:
49586
- _context24.next = 5;
49615
+ _context25.next = 5;
49587
49616
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
49588
49617
  case 5:
49589
- newGridId = _context24.sent;
49618
+ newGridId = _context25.sent;
49590
49619
  this.updatePlannerView('MOVE_SHELF_ITEM');
49591
49620
  if (!newGridId) {
49592
- _context24.next = 10;
49621
+ _context25.next = 10;
49593
49622
  break;
49594
49623
  }
49595
- _context24.next = 10;
49624
+ _context25.next = 10;
49596
49625
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
49597
49626
  case 10:
49598
49627
  case "end":
49599
- return _context24.stop();
49628
+ return _context25.stop();
49600
49629
  }
49601
- }, _callee24, this);
49630
+ }, _callee25, this);
49602
49631
  }));
49603
49632
  function moveShelfItemToGrid(_x74, _x75, _x76, _x77) {
49604
49633
  return _moveShelfItemToGrid.apply(this, arguments);
@@ -49622,25 +49651,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49622
49651
  }, {
49623
49652
  key: "resetArticle",
49624
49653
  value: function () {
49625
- var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(basketId) {
49654
+ var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(basketId) {
49626
49655
  var set;
49627
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
49628
- while (1) switch (_context25.prev = _context25.next) {
49656
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
49657
+ while (1) switch (_context26.prev = _context26.next) {
49629
49658
  case 0:
49630
49659
  set = this.actSet();
49631
49660
  if (set) {
49632
- _context25.next = 3;
49661
+ _context26.next = 3;
49633
49662
  break;
49634
49663
  }
49635
- return _context25.abrupt("return");
49664
+ return _context26.abrupt("return");
49636
49665
  case 3:
49637
- _context25.next = 5;
49666
+ _context26.next = 5;
49638
49667
  return setHandlerInstance.resetArticle(set, basketId);
49639
49668
  case 5:
49640
49669
  case "end":
49641
- return _context25.stop();
49670
+ return _context26.stop();
49642
49671
  }
49643
- }, _callee25, this);
49672
+ }, _callee26, this);
49644
49673
  }));
49645
49674
  function resetArticle(_x78) {
49646
49675
  return _resetArticle.apply(this, arguments);
@@ -49672,10 +49701,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49672
49701
  }, {
49673
49702
  key: "checkMatchingProducts",
49674
49703
  value: function () {
49675
- var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(from) {
49704
+ var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(from) {
49676
49705
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
49677
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
49678
- while (1) switch (_context26.prev = _context26.next) {
49706
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
49707
+ while (1) switch (_context27.prev = _context27.next) {
49679
49708
  case 0:
49680
49709
  set = this.actSet();
49681
49710
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -49689,18 +49718,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49689
49718
  }
49690
49719
  }
49691
49720
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
49692
- _context26.next = 6;
49721
+ _context27.next = 6;
49693
49722
  break;
49694
49723
  }
49695
- _context26.next = 5;
49724
+ _context27.next = 5;
49696
49725
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
49697
49726
  case 5:
49698
49727
  this.updatePriceInView();
49699
49728
  case 6:
49700
49729
  case "end":
49701
- return _context26.stop();
49730
+ return _context27.stop();
49702
49731
  }
49703
- }, _callee26, this);
49732
+ }, _callee27, this);
49704
49733
  }));
49705
49734
  function checkMatchingProducts(_x79) {
49706
49735
  return _checkMatchingProducts.apply(this, arguments);
@@ -49779,7 +49808,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49779
49808
  }, {
49780
49809
  key: "saveToBasketWrapper",
49781
49810
  value: function () {
49782
- var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, returnToParam, hideLoading) {
49811
+ var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(event, repairOnly, returnToParam, hideLoading) {
49783
49812
  var _this$actions28,
49784
49813
  _this$actions28$toggl,
49785
49814
  _this$actions29,
@@ -49788,8 +49817,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49788
49817
  _this$actions33,
49789
49818
  _this$i18n18;
49790
49819
  var returnTo, finalEvent, result, _this$actions30, _this$i18n12, _this$i18n13, _this$actions31, _this$i18n14, _this$i18n15, _this$actions32, _this$i18n16, _this$i18n17, _this$updatePlannerMs2;
49791
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
49792
- while (1) switch (_context27.prev = _context27.next) {
49820
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
49821
+ while (1) switch (_context28.prev = _context28.next) {
49793
49822
  case 0:
49794
49823
  returnTo = returnToParam !== null && returnToParam !== void 0 ? returnToParam : this.getReturnTo(event);
49795
49824
  finalEvent = {
@@ -49797,13 +49826,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49797
49826
  saveBasket: true
49798
49827
  };
49799
49828
  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);
49800
- _context27.next = 5;
49829
+ _context28.next = 5;
49801
49830
  return this.saveToBasket(returnTo, finalEvent.event, repairOnly);
49802
49831
  case 5:
49803
- result = _context27.sent;
49832
+ result = _context28.sent;
49804
49833
  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);
49805
49834
  if (!(result === 'canceled')) {
49806
- _context27.next = 11;
49835
+ _context28.next = 11;
49807
49836
  break;
49808
49837
  }
49809
49838
  LOG$2.error(new DivaError('failed to save Basket'));
@@ -49811,10 +49840,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49811
49840
  text: ((_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
49812
49841
  accept: true
49813
49842
  });
49814
- return _context27.abrupt("return", result);
49843
+ return _context28.abrupt("return", result);
49815
49844
  case 11:
49816
- _context27.t0 = returnTo;
49817
- _context27.next = _context27.t0 === 'OPEN_PDF' ? 14 : _context27.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context27.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
49845
+ _context28.t0 = returnTo;
49846
+ _context28.next = _context28.t0 === 'OPEN_PDF' ? 14 : _context28.t0 === 'SAVE_BASKET_WITH_MODAL' ? 16 : _context28.t0 === 'OPEN_CONTACT_FORM' ? 17 : 17;
49818
49847
  break;
49819
49848
  case 14:
49820
49849
  if (!this.getBasket().PDFDocumentURL) {
@@ -49834,7 +49863,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49834
49863
  }
49835
49864
  });
49836
49865
  }
49837
- return _context27.abrupt("break", 17);
49866
+ return _context28.abrupt("break", 17);
49838
49867
  case 16:
49839
49868
  (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openModal({
49840
49869
  text: (_this$i18n18 = this.i18n()) === null || _this$i18n18 === void 0 ? void 0 : _this$i18n18.t('modal.planning_saved'),
@@ -49842,18 +49871,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49842
49871
  });
49843
49872
  case 17:
49844
49873
  if (!(result == 'noArticleToSave')) {
49845
- _context27.next = 20;
49874
+ _context28.next = 20;
49846
49875
  break;
49847
49876
  }
49848
49877
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
49849
- return _context27.abrupt("return", 'canceled');
49878
+ return _context28.abrupt("return", 'canceled');
49850
49879
  case 20:
49851
- return _context27.abrupt("return", result);
49880
+ return _context28.abrupt("return", result);
49852
49881
  case 21:
49853
49882
  case "end":
49854
- return _context27.stop();
49883
+ return _context28.stop();
49855
49884
  }
49856
- }, _callee27, this);
49885
+ }, _callee28, this);
49857
49886
  }));
49858
49887
  function saveToBasketWrapper(_x80, _x81, _x82, _x83) {
49859
49888
  return _saveToBasketWrapper.apply(this, arguments);
@@ -49863,42 +49892,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49863
49892
  }, {
49864
49893
  key: "saveToBasket",
49865
49894
  value: function () {
49866
- var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(returnTo, event, repairOnly) {
49895
+ var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(returnTo, event, repairOnly) {
49867
49896
  var _returnTo, _returnTo2, _returnTo3, _this$actions34, _this$actions35, _this$divaBasketHandl2;
49868
49897
  var set, actBasket, oldReturnTo, result, newDivaNr, _this$actSet10, arReady, _result, product;
49869
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
49870
- while (1) switch (_context28.prev = _context28.next) {
49898
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
49899
+ while (1) switch (_context29.prev = _context29.next) {
49871
49900
  case 0:
49872
49901
  set = this.actSet();
49873
49902
  if (!setHandlerInstance.isNoArticleToSave(this.sets)) {
49874
- _context28.next = 3;
49903
+ _context29.next = 3;
49875
49904
  break;
49876
49905
  }
49877
- return _context28.abrupt("return", 'noArticleToSave');
49906
+ return _context29.abrupt("return", 'noArticleToSave');
49878
49907
  case 3:
49879
49908
  actBasket = this.divaBasketHandler.actBasket;
49880
49909
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
49881
- _context28.next = 12;
49910
+ _context29.next = 12;
49882
49911
  break;
49883
49912
  }
49884
49913
  oldReturnTo = returnTo;
49885
49914
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
49886
- _context28.next = 9;
49915
+ _context29.next = 9;
49887
49916
  return this.handleFavorites('SAVE');
49888
49917
  case 9:
49889
- result = _context28.sent;
49918
+ result = _context29.sent;
49890
49919
  if (result === 'canceled') {
49891
49920
  this.ReturnTo = oldReturnTo;
49892
49921
  }
49893
- return _context28.abrupt("return", result);
49922
+ return _context29.abrupt("return", result);
49894
49923
  case 12:
49895
- _context28.t0 = this.divaBasketHandler;
49896
- _context28.t1 = this.divaBasketHandler.actDivaNr;
49897
- _context28.next = 16;
49924
+ _context29.t0 = this.divaBasketHandler;
49925
+ _context29.t1 = this.divaBasketHandler.actDivaNr;
49926
+ _context29.next = 16;
49898
49927
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
49899
49928
  case 16:
49900
- _context28.t2 = _context28.sent;
49901
- _context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
49929
+ _context29.t2 = _context29.sent;
49930
+ _context29.t0.setBasketData.call(_context29.t0, _context29.t1, _context29.t2);
49902
49931
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
49903
49932
  this.ReturnTo = 'OPEN_SELLER_BASKET';
49904
49933
  returnTo = this.ReturnTo;
@@ -49913,11 +49942,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49913
49942
  this.divaBasketHandler.fillOrigConfigurations();
49914
49943
  actBasket.Updated = Date.now();
49915
49944
  if (!returnTo) {
49916
- _context28.next = 54;
49945
+ _context29.next = 54;
49917
49946
  break;
49918
49947
  }
49919
- _context28.t3 = returnTo;
49920
- _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;
49948
+ _context29.t3 = returnTo;
49949
+ _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;
49921
49950
  break;
49922
49951
  case 27:
49923
49952
  (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
@@ -49930,7 +49959,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49930
49959
  basketData: actBasket
49931
49960
  }
49932
49961
  });
49933
- return _context28.abrupt("break", 54);
49962
+ return _context29.abrupt("break", 54);
49934
49963
  case 29:
49935
49964
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
49936
49965
  actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
@@ -49945,26 +49974,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49945
49974
  basketData: actBasket
49946
49975
  }
49947
49976
  });
49948
- return _context28.abrupt("break", 54);
49977
+ return _context29.abrupt("break", 54);
49949
49978
  case 32:
49950
49979
  if (!(event == 'onSaveProduct')) {
49951
- _context28.next = 44;
49980
+ _context29.next = 44;
49952
49981
  break;
49953
49982
  }
49954
- _context28.next = 35;
49983
+ _context29.next = 35;
49955
49984
  return setHandlerInstance.flushPendingUploadsViaMediaService(actBasket);
49956
49985
  case 35:
49957
49986
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
49958
49987
  actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
49959
- _context28.next = 38;
49988
+ _context29.next = 38;
49960
49989
  return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
49961
49990
  case 38:
49962
- _context28.next = 40;
49991
+ _context29.next = 40;
49963
49992
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
49964
49993
  case 40:
49965
- newDivaNr = _context28.sent;
49994
+ newDivaNr = _context29.sent;
49966
49995
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
49967
- _context28.next = 53;
49996
+ _context29.next = 53;
49968
49997
  break;
49969
49998
  case 44:
49970
49999
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -49974,30 +50003,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
49974
50003
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
49975
50004
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
49976
50005
  arReady = !!((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && _this$actSet10.CatalogData.divaArReady);
49977
- _context28.next = 50;
50006
+ _context29.next = 50;
49978
50007
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo, arReady);
49979
50008
  case 50:
49980
- _result = _context28.sent;
50009
+ _result = _context29.sent;
49981
50010
  if (!(_result === 'ERROR_NO_BASKET_SAVED' || _result === 'ERROR_BASKET_AFTER_SAVE')) {
49982
- _context28.next = 53;
50011
+ _context29.next = 53;
49983
50012
  break;
49984
50013
  }
49985
- return _context28.abrupt("return", 'canceled');
50014
+ return _context29.abrupt("return", 'canceled');
49986
50015
  case 53:
49987
- return _context28.abrupt("break", 54);
50016
+ return _context29.abrupt("break", 54);
49988
50017
  case 54:
49989
50018
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
49990
50019
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
49991
- _context28.next = 58;
50020
+ _context29.next = 58;
49992
50021
  return this.addToBasket(actBasket, event);
49993
50022
  case 58:
49994
- product = _context28.sent;
49995
- return _context28.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
50023
+ product = _context29.sent;
50024
+ return _context29.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
49996
50025
  case 60:
49997
50026
  case "end":
49998
- return _context28.stop();
50027
+ return _context29.stop();
49999
50028
  }
50000
- }, _callee28, this);
50029
+ }, _callee29, this);
50001
50030
  }));
50002
50031
  function saveToBasket(_x84, _x85, _x86) {
50003
50032
  return _saveToBasket.apply(this, arguments);
@@ -50014,24 +50043,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50014
50043
  }, {
50015
50044
  key: "generateAiImageWithReferenceImages",
50016
50045
  value: function () {
50017
- var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(data, leadKey) {
50046
+ var _generateAiImageWithReferenceImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(data, leadKey) {
50018
50047
  var _this$actSet11, _this$state6, _this$actSet12;
50019
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
50020
- while (1) switch (_context29.prev = _context29.next) {
50048
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
50049
+ while (1) switch (_context30.prev = _context30.next) {
50021
50050
  case 0:
50022
50051
  (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 || _this$actSet11.CatalogData.catalogCodex;
50023
- _context29.next = 3;
50052
+ _context30.next = 3;
50024
50053
  return this.api.generateAiImageWithReferenceImages(_objectSpread$8(_objectSpread$8({}, data), {}, {
50025
50054
  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,
50026
50055
  catalogCodex: (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.CatalogData.catalogCodex
50027
50056
  }), leadKey);
50028
50057
  case 3:
50029
- return _context29.abrupt("return", _context29.sent);
50058
+ return _context30.abrupt("return", _context30.sent);
50030
50059
  case 4:
50031
50060
  case "end":
50032
- return _context29.stop();
50061
+ return _context30.stop();
50033
50062
  }
50034
- }, _callee29, this);
50063
+ }, _callee30, this);
50035
50064
  }));
50036
50065
  function generateAiImageWithReferenceImages(_x87, _x88) {
50037
50066
  return _generateAiImageWithReferenceImages.apply(this, arguments);
@@ -50041,25 +50070,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50041
50070
  }, {
50042
50071
  key: "getUsageLimits",
50043
50072
  value: function () {
50044
- var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
50073
+ var _getUsageLimits = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
50045
50074
  var _localStorage$getItem, _localStorage;
50046
50075
  var leadKey;
50047
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
50048
- while (1) switch (_context30.prev = _context30.next) {
50076
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
50077
+ while (1) switch (_context31.prev = _context31.next) {
50049
50078
  case 0:
50050
50079
  // Get lead key from localStorage if it exists (for anonymous users)
50051
50080
  leadKey = (_localStorage$getItem = (_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('diva_lead_key')) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : undefined;
50052
- _context30.next = 3;
50081
+ _context31.next = 3;
50053
50082
  return this.api.getUsageLimits(leadKey ? {
50054
50083
  leadKey: leadKey
50055
50084
  } : undefined);
50056
50085
  case 3:
50057
- return _context30.abrupt("return", _context30.sent);
50086
+ return _context31.abrupt("return", _context31.sent);
50058
50087
  case 4:
50059
50088
  case "end":
50060
- return _context30.stop();
50089
+ return _context31.stop();
50061
50090
  }
50062
- }, _callee30, this);
50091
+ }, _callee31, this);
50063
50092
  }));
50064
50093
  function getUsageLimits() {
50065
50094
  return _getUsageLimits.apply(this, arguments);
@@ -50069,23 +50098,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50069
50098
  }, {
50070
50099
  key: "getAiRoomRenderings",
50071
50100
  value: function () {
50072
- var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
50101
+ var _getAiRoomRenderings = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
50073
50102
  var _this$state7;
50074
50103
  var organizationId, lang;
50075
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
50076
- while (1) switch (_context31.prev = _context31.next) {
50104
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
50105
+ while (1) switch (_context32.prev = _context32.next) {
50077
50106
  case 0:
50078
50107
  organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
50079
50108
  lang = this.api.getLanguage();
50080
- _context31.next = 4;
50109
+ _context32.next = 4;
50081
50110
  return this.api.getAiRoomRenderings(organizationId, lang !== null && lang !== void 0 ? lang : undefined);
50082
50111
  case 4:
50083
- return _context31.abrupt("return", _context31.sent);
50112
+ return _context32.abrupt("return", _context32.sent);
50084
50113
  case 5:
50085
50114
  case "end":
50086
- return _context31.stop();
50115
+ return _context32.stop();
50087
50116
  }
50088
- }, _callee31, this);
50117
+ }, _callee32, this);
50089
50118
  }));
50090
50119
  function getAiRoomRenderings() {
50091
50120
  return _getAiRoomRenderings.apply(this, arguments);
@@ -50095,19 +50124,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50095
50124
  }, {
50096
50125
  key: "createLeadKey",
50097
50126
  value: function () {
50098
- var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(email) {
50099
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
50100
- while (1) switch (_context32.prev = _context32.next) {
50127
+ var _createLeadKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(email) {
50128
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
50129
+ while (1) switch (_context33.prev = _context33.next) {
50101
50130
  case 0:
50102
- _context32.next = 2;
50131
+ _context33.next = 2;
50103
50132
  return this.api.createLeadKey(email);
50104
50133
  case 2:
50105
- return _context32.abrupt("return", _context32.sent);
50134
+ return _context33.abrupt("return", _context33.sent);
50106
50135
  case 3:
50107
50136
  case "end":
50108
- return _context32.stop();
50137
+ return _context33.stop();
50109
50138
  }
50110
- }, _callee32, this);
50139
+ }, _callee33, this);
50111
50140
  }));
50112
50141
  function createLeadKey(_x89) {
50113
50142
  return _createLeadKey.apply(this, arguments);
@@ -50405,23 +50434,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50405
50434
  }, {
50406
50435
  key: "getBasketDataWithEkText",
50407
50436
  value: function () {
50408
- var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
50409
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
50410
- while (1) switch (_context33.prev = _context33.next) {
50437
+ var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
50438
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
50439
+ while (1) switch (_context34.prev = _context34.next) {
50411
50440
  case 0:
50412
- _context33.t0 = this.divaBasketHandler;
50413
- _context33.t1 = this.divaBasketHandler.actDivaNr;
50414
- _context33.next = 4;
50441
+ _context34.t0 = this.divaBasketHandler;
50442
+ _context34.t1 = this.divaBasketHandler.actDivaNr;
50443
+ _context34.next = 4;
50415
50444
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
50416
50445
  case 4:
50417
- _context33.t2 = _context33.sent;
50418
- _context33.t0.setBasketData.call(_context33.t0, _context33.t1, _context33.t2);
50419
- return _context33.abrupt("return", this.divaBasketHandler.actBasket);
50446
+ _context34.t2 = _context34.sent;
50447
+ _context34.t0.setBasketData.call(_context34.t0, _context34.t1, _context34.t2);
50448
+ return _context34.abrupt("return", this.divaBasketHandler.actBasket);
50420
50449
  case 7:
50421
50450
  case "end":
50422
- return _context33.stop();
50451
+ return _context34.stop();
50423
50452
  }
50424
- }, _callee33, this);
50453
+ }, _callee34, this);
50425
50454
  }));
50426
50455
  function getBasketDataWithEkText() {
50427
50456
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -50447,7 +50476,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50447
50476
  }, {
50448
50477
  key: "addToBasket",
50449
50478
  value: function () {
50450
- var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(actBasket) {
50479
+ var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(actBasket) {
50451
50480
  var _this$actions36,
50452
50481
  _this$actions37,
50453
50482
  _this$actions38,
@@ -50466,44 +50495,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50466
50495
  to,
50467
50496
  variants,
50468
50497
  products,
50469
- _args34 = arguments;
50470
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
50471
- while (1) switch (_context34.prev = _context34.next) {
50498
+ _args35 = arguments;
50499
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
50500
+ while (1) switch (_context35.prev = _context35.next) {
50472
50501
  case 0:
50473
- event = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : 'onAddToBasket';
50474
- _context34.t0 = event;
50475
- _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;
50502
+ event = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : 'onAddToBasket';
50503
+ _context35.t0 = event;
50504
+ _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;
50476
50505
  break;
50477
50506
  case 4:
50478
50507
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
50479
50508
  type: 'onWebPlanerPrint',
50480
50509
  data: actBasket.getAsJson()
50481
50510
  });
50482
- return _context34.abrupt("break", 30);
50511
+ return _context35.abrupt("break", 30);
50483
50512
  case 6:
50484
50513
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
50485
50514
  type: 'onWebPlanerSave',
50486
50515
  data: actBasket.getAsJson()
50487
50516
  });
50488
- return _context34.abrupt("break", 30);
50517
+ return _context35.abrupt("break", 30);
50489
50518
  case 8:
50490
50519
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
50491
50520
  type: 'onWebPlanerShare',
50492
50521
  data: actBasket.getAsJson()
50493
50522
  });
50494
- return _context34.abrupt("break", 30);
50523
+ return _context35.abrupt("break", 30);
50495
50524
  case 10:
50496
50525
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
50497
50526
  type: 'onRequestConsulation',
50498
50527
  data: actBasket.getAsJson()
50499
50528
  });
50500
- return _context34.abrupt("break", 30);
50529
+ return _context35.abrupt("break", 30);
50501
50530
  case 12:
50502
50531
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
50503
50532
  type: 'onSave',
50504
50533
  data: actBasket.getAsJson()
50505
50534
  });
50506
- return _context34.abrupt("break", 30);
50535
+ return _context35.abrupt("break", 30);
50507
50536
  case 14:
50508
50537
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
50509
50538
  this.divaBasketHandler.emailConfig = undefined;
@@ -50538,41 +50567,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50538
50567
  type: 'onAddToBasket',
50539
50568
  data: actBasket.getAsJson()
50540
50569
  });
50541
- return _context34.abrupt("break", 30);
50570
+ return _context35.abrupt("break", 30);
50542
50571
  case 19:
50543
50572
  this.actSet().CatalogData;
50544
- _context34.next = 22;
50573
+ _context35.next = 22;
50545
50574
  return this.api.saveAsProduct(this.sets, actBasket);
50546
50575
  case 22:
50547
- products = _context34.sent;
50576
+ products = _context35.sent;
50548
50577
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
50549
50578
  type: 'onAddToBasket',
50550
50579
  data: actBasket.getAsJson()
50551
50580
  });
50552
50581
  if (!products) {
50553
- _context34.next = 26;
50582
+ _context35.next = 26;
50554
50583
  break;
50555
50584
  }
50556
- return _context34.abrupt("return", products[0]);
50585
+ return _context35.abrupt("return", products[0]);
50557
50586
  case 26:
50558
50587
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
50559
50588
  type: 'onAddToBasket',
50560
50589
  data: actBasket.getAsJson()
50561
50590
  });
50562
- return _context34.abrupt("break", 30);
50591
+ return _context35.abrupt("break", 30);
50563
50592
  case 28:
50564
50593
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
50565
50594
  type: event,
50566
50595
  data: actBasket.getAsJson()
50567
50596
  });
50568
- return _context34.abrupt("break", 30);
50597
+ return _context35.abrupt("break", 30);
50569
50598
  case 30:
50570
- return _context34.abrupt("return");
50599
+ return _context35.abrupt("return");
50571
50600
  case 31:
50572
50601
  case "end":
50573
- return _context34.stop();
50602
+ return _context35.stop();
50574
50603
  }
50575
- }, _callee34, this);
50604
+ }, _callee35, this);
50576
50605
  }));
50577
50606
  function addToBasket(_x90) {
50578
50607
  return _addToBasket.apply(this, arguments);
@@ -50629,26 +50658,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50629
50658
  }, {
50630
50659
  key: "getCurrentBasket",
50631
50660
  value: function () {
50632
- var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(event, force, returnTo, dontGoToSummary, hideLoading) {
50661
+ var _getCurrentBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(event, force, returnTo, dontGoToSummary, hideLoading) {
50633
50662
  var _this$actSet40, _this$divaBasketHandl5, _this$onClickAddToBas3;
50634
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
50635
- while (1) switch (_context35.prev = _context35.next) {
50663
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
50664
+ while (1) switch (_context36.prev = _context36.next) {
50636
50665
  case 0:
50637
50666
  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')))) {
50638
- _context35.next = 2;
50667
+ _context36.next = 2;
50639
50668
  break;
50640
50669
  }
50641
- return _context35.abrupt("return", 'BASKET_ALREADY_SAVED');
50670
+ return _context36.abrupt("return", 'BASKET_ALREADY_SAVED');
50642
50671
  case 2:
50643
- _context35.next = 4;
50672
+ _context36.next = 4;
50644
50673
  return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
50645
50674
  case 4:
50646
- return _context35.abrupt("return", !!_context35.sent);
50675
+ return _context36.abrupt("return", !!_context36.sent);
50647
50676
  case 5:
50648
50677
  case "end":
50649
- return _context35.stop();
50678
+ return _context36.stop();
50650
50679
  }
50651
- }, _callee35, this);
50680
+ }, _callee36, this);
50652
50681
  }));
50653
50682
  function getCurrentBasket(_x91, _x92, _x93, _x94, _x95) {
50654
50683
  return _getCurrentBasket.apply(this, arguments);
@@ -50881,9 +50910,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50881
50910
  key: "initApiForLogicOnly",
50882
50911
  value: //just for testing purposes
50883
50912
  function () {
50884
- var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50885
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
50886
- while (1) switch (_context36.prev = _context36.next) {
50913
+ var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
50914
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
50915
+ while (1) switch (_context37.prev = _context37.next) {
50887
50916
  case 0:
50888
50917
  //empty services
50889
50918
  this.api = new DivaApiHandler(_objectSpread$8(_objectSpread$8({}, this.plannerConfig), {}, {
@@ -50896,16 +50925,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50896
50925
  jwt: jwt,
50897
50926
  apiKey: apiKey
50898
50927
  }), handler);
50899
- _context36.next = 3;
50928
+ _context37.next = 3;
50900
50929
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
50901
50930
  case 3:
50902
50931
  this.plannerHandler = new DivaPlannerHandler(true);
50903
50932
  if (this.strictArtifactGeneration) this.plannerHandler.setStrictArtifactGeneration(true);
50904
50933
  case 5:
50905
50934
  case "end":
50906
- return _context36.stop();
50935
+ return _context37.stop();
50907
50936
  }
50908
- }, _callee36, this);
50937
+ }, _callee37, this);
50909
50938
  }));
50910
50939
  function initApiForLogicOnly(_x96, _x97, _x98, _x99, _x100, _x101, _x102) {
50911
50940
  return _initApiForLogicOnly.apply(this, arguments);
@@ -50920,16 +50949,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50920
50949
  }, {
50921
50950
  key: "loadBasket",
50922
50951
  value: function () {
50923
- var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37() {
50924
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
50925
- while (1) switch (_context37.prev = _context37.next) {
50952
+ var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38() {
50953
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
50954
+ while (1) switch (_context38.prev = _context38.next) {
50926
50955
  case 0:
50927
- return _context37.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
50956
+ return _context38.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
50928
50957
  case 1:
50929
50958
  case "end":
50930
- return _context37.stop();
50959
+ return _context38.stop();
50931
50960
  }
50932
- }, _callee37, this);
50961
+ }, _callee38, this);
50933
50962
  }));
50934
50963
  function loadBasket() {
50935
50964
  return _loadBasket.apply(this, arguments);
@@ -50944,39 +50973,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
50944
50973
  }, {
50945
50974
  key: "initBasket",
50946
50975
  value: function () {
50947
- var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(init3D, ignoreFavorites) {
50976
+ var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39(init3D, ignoreFavorites) {
50948
50977
  var initSetState, set, basket;
50949
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
50950
- while (1) switch (_context38.prev = _context38.next) {
50978
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
50979
+ while (1) switch (_context39.prev = _context39.next) {
50951
50980
  case 0:
50952
50981
  this.divaNr = this.divaBasketHandler.actDivaNr;
50953
50982
  initSetState = this.getInitStateForSet(!init3D);
50954
- _context38.next = 4;
50983
+ _context39.next = 4;
50955
50984
  return this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
50956
50985
  case 4:
50957
- _context38.next = 6;
50986
+ _context39.next = 6;
50958
50987
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
50959
50988
  case 6:
50960
50989
  //TODO check if when basket gets repaired the product match gets called
50961
50990
  set = this.actSet();
50962
50991
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
50963
50992
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
50964
- _context38.next = 11;
50993
+ _context39.next = 11;
50965
50994
  break;
50966
50995
  }
50967
- _context38.next = 11;
50996
+ _context39.next = 11;
50968
50997
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
50969
50998
  case 11:
50970
- _context38.next = 13;
50999
+ _context39.next = 13;
50971
51000
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
50972
51001
  case 13:
50973
- basket = _context38.sent;
50974
- return _context38.abrupt("return", basket);
51002
+ basket = _context39.sent;
51003
+ return _context39.abrupt("return", basket);
50975
51004
  case 15:
50976
51005
  case "end":
50977
- return _context38.stop();
51006
+ return _context39.stop();
50978
51007
  }
50979
- }, _callee38, this);
51008
+ }, _callee39, this);
50980
51009
  }));
50981
51010
  function initBasket(_x103, _x104) {
50982
51011
  return _initBasket.apply(this, arguments);
@@ -51015,21 +51044,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51015
51044
  }, {
51016
51045
  key: "getValidVariantsLength",
51017
51046
  value: function () {
51018
- var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39() {
51047
+ var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40() {
51019
51048
  var set;
51020
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
51021
- while (1) switch (_context39.prev = _context39.next) {
51049
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
51050
+ while (1) switch (_context40.prev = _context40.next) {
51022
51051
  case 0:
51023
51052
  set = this.actSet();
51024
- _context39.next = 3;
51053
+ _context40.next = 3;
51025
51054
  return favoritesHandlerInstance.getValidVariants(set, true);
51026
51055
  case 3:
51027
- return _context39.abrupt("return", _context39.sent.length);
51056
+ return _context40.abrupt("return", _context40.sent.length);
51028
51057
  case 4:
51029
51058
  case "end":
51030
- return _context39.stop();
51059
+ return _context40.stop();
51031
51060
  }
51032
- }, _callee39, this);
51061
+ }, _callee40, this);
51033
51062
  }));
51034
51063
  function getValidVariantsLength() {
51035
51064
  return _getValidVariantsLength.apply(this, arguments);
@@ -51039,44 +51068,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51039
51068
  }, {
51040
51069
  key: "handleFavorites",
51041
51070
  value: function () {
51042
- var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(mode) {
51071
+ var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41(mode) {
51043
51072
  var _this5 = this;
51044
51073
  var set, i;
51045
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
51046
- while (1) switch (_context40.prev = _context40.next) {
51074
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
51075
+ while (1) switch (_context41.prev = _context41.next) {
51047
51076
  case 0:
51048
51077
  set = this.actSet();
51049
51078
  i = 0;
51050
51079
  case 2:
51051
51080
  if (!favoritesHandlerInstance.IsCalcForSummary) {
51052
- _context40.next = 11;
51081
+ _context41.next = 11;
51053
51082
  break;
51054
51083
  }
51055
- _context40.next = 5;
51084
+ _context41.next = 5;
51056
51085
  return DivaUtils.Sleep(200);
51057
51086
  case 5:
51058
51087
  i++;
51059
51088
  if (!(i > 1000)) {
51060
- _context40.next = 9;
51089
+ _context41.next = 9;
51061
51090
  break;
51062
51091
  }
51063
51092
  LOG$2.error(new DivaError('error on generating Variants of Summary'));
51064
- return _context40.abrupt("break", 11);
51093
+ return _context41.abrupt("break", 11);
51065
51094
  case 9:
51066
- _context40.next = 2;
51095
+ _context41.next = 2;
51067
51096
  break;
51068
51097
  case 11:
51069
- _context40.next = 13;
51098
+ _context41.next = 13;
51070
51099
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
51071
51100
  return _this5.update2DGrid(set);
51072
51101
  }, this.actions);
51073
51102
  case 13:
51074
- return _context40.abrupt("return", _context40.sent);
51103
+ return _context41.abrupt("return", _context41.sent);
51075
51104
  case 14:
51076
51105
  case "end":
51077
- return _context40.stop();
51106
+ return _context41.stop();
51078
51107
  }
51079
- }, _callee40, this);
51108
+ }, _callee41, this);
51080
51109
  }));
51081
51110
  function handleFavorites(_x105) {
51082
51111
  return _handleFavorites.apply(this, arguments);
@@ -51091,46 +51120,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51091
51120
  }, {
51092
51121
  key: "initSapOrderLinesFromBasket",
51093
51122
  value: function () {
51094
- var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee41(divaNr, init3D, onlyLoadOldBakset) {
51123
+ var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee42(divaNr, init3D, onlyLoadOldBakset) {
51095
51124
  var result, oldBasket, basket;
51096
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
51097
- while (1) switch (_context41.prev = _context41.next) {
51125
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
51126
+ while (1) switch (_context42.prev = _context42.next) {
51098
51127
  case 0:
51099
51128
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
51100
- _context41.next = 3;
51129
+ _context42.next = 3;
51101
51130
  return this.loadBasket();
51102
51131
  case 3:
51103
- result = _context41.sent;
51132
+ result = _context42.sent;
51104
51133
  if (!onlyLoadOldBakset) {
51105
- _context41.next = 6;
51134
+ _context42.next = 6;
51106
51135
  break;
51107
51136
  }
51108
- return _context41.abrupt("return", {
51137
+ return _context42.abrupt("return", {
51109
51138
  oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
51110
51139
  cache: {}
51111
51140
  });
51112
51141
  case 6:
51113
51142
  if (!(result === false)) {
51114
- _context41.next = 8;
51143
+ _context42.next = 8;
51115
51144
  break;
51116
51145
  }
51117
51146
  throw new Error('Could not load basket! ' + divaNr);
51118
51147
  case 8:
51119
51148
  oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
51120
- _context41.next = 11;
51149
+ _context42.next = 11;
51121
51150
  return this.initBasket(init3D);
51122
51151
  case 11:
51123
- basket = _context41.sent;
51124
- return _context41.abrupt("return", {
51152
+ basket = _context42.sent;
51153
+ return _context42.abrupt("return", {
51125
51154
  basket: basket,
51126
51155
  oldBasket: oldBasket,
51127
51156
  cache: this.api.getJsonDataCache()
51128
51157
  });
51129
51158
  case 13:
51130
51159
  case "end":
51131
- return _context41.stop();
51160
+ return _context42.stop();
51132
51161
  }
51133
- }, _callee41, this);
51162
+ }, _callee42, this);
51134
51163
  }));
51135
51164
  function initSapOrderLinesFromBasket(_x106, _x107, _x108) {
51136
51165
  return _initSapOrderLinesFromBasket.apply(this, arguments);
@@ -51386,183 +51415,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
51386
51415
  }]);
51387
51416
  }();
51388
51417
 
51389
- var DockingPoint = /*#__PURE__*/function () {
51390
- function DockingPoint(elementId, type, name, localPos, rotDeg, layer, plannerconfig, filter) {
51391
- _classCallCheck(this, DockingPoint);
51392
- _defineProperty(this, "dockingPoint", void 0);
51393
- _defineProperty(this, "layer", void 0);
51394
- _defineProperty(this, "isDisabled", void 0);
51395
- //this is used to disable a docking point temporarily
51396
- _defineProperty(this, "plannerconfig", void 0);
51397
- this.plannerconfig = plannerconfig;
51398
-
51399
- //Check for number backwardscompatible with _ (e.g. AVC_2)
51400
- var splittedAV = name.split('_');
51401
- this.isDisabled = false;
51402
- var number = -1;
51403
- if (splittedAV.length >= 2) {
51404
- for (var i = 1; i < splittedAV.length; i++) {
51405
- var part = parseInt(splittedAV[i]);
51406
- if (!isNaN(part)) {
51407
- number = part;
51408
- break;
51409
- }
51410
- }
51411
- } else if (name.length > 3) {
51412
- //Check for number IDM Standard without _ (e.g. AVC2)
51413
- var _part = parseInt(name.substring(3));
51414
- if (!isNaN(_part)) {
51415
- number = _part;
51416
- }
51417
- }
51418
- this.dockingPoint = {
51419
- dpId: type + '_' + name,
51420
- elementId: elementId,
51421
- type: type,
51422
- name: name,
51423
- ignoreLayer: type == 'AVR' || type == 'AVL' || name.indexOf('_IL') >= 0,
51424
- localWorldPos: localPos,
51425
- rotDeg: rotDeg,
51426
- isDocking: false,
51427
- dpFilter: filter
51428
- };
51429
- if (number >= 0) {
51430
- this.dockingPoint.number = number;
51431
- }
51432
- this.layer = layer;
51433
- }
51434
-
51435
- /**
51436
- * Creates a clone of the current dockingPoint
51437
- */
51438
- return _createClass(DockingPoint, [{
51439
- key: "clone",
51440
- value: function clone() {
51441
- 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);
51442
- dpClone.dockingPoint.dpId = this.dockingPoint.dpId;
51443
- dpClone.dockingPoint.ignoreLayer = this.dockingPoint.ignoreLayer;
51444
- dpClone.dockingPoint.isDocking = this.dockingPoint.isDocking;
51445
- dpClone.dockingPoint.number = this.dockingPoint.number;
51446
- dpClone.dockingPoint.onDP = this.dockingPoint.onDP;
51447
- dpClone.dockingPoint.onElementId = this.dockingPoint.onElementId;
51448
- return dpClone;
51449
- }
51450
- }, {
51451
- key: "ElementId",
51452
- get: function get() {
51453
- return this.dockingPoint.elementId;
51454
- }
51455
- }, {
51456
- key: "Name",
51457
- get: function get() {
51458
- return this.dockingPoint.name;
51459
- }
51460
- }, {
51461
- key: "LocalWorldPos",
51462
- get: function get() {
51463
- return this.dockingPoint.localWorldPos;
51464
- }
51465
- }, {
51466
- key: "RotDeg",
51467
- get: function get() {
51468
- return this.dockingPoint.rotDeg;
51469
- }
51470
- }, {
51471
- key: "Type",
51472
- get: function get() {
51473
- return this.dockingPoint.type;
51474
- }
51475
- }, {
51476
- key: "IsDocking",
51477
- get: function get() {
51478
- return this.dockingPoint.isDocking;
51479
- }
51480
- }, {
51481
- key: "Layer",
51482
- get: function get() {
51483
- return this.layer;
51484
- }
51485
- }, {
51486
- key: "IgnoreLayer",
51487
- get: function get() {
51488
- return this.dockingPoint.ignoreLayer;
51489
- }
51490
- }, {
51491
- key: "HasNumber",
51492
- get: function get() {
51493
- return this.dockingPoint.number == undefined ? false : true;
51494
- }
51495
- }, {
51496
- key: "Number",
51497
- get: function get() {
51498
- return this.dockingPoint.number;
51499
- }
51500
- }, {
51501
- key: "PlannerConfig",
51502
- get: function get() {
51503
- return this.plannerconfig;
51504
- }
51505
- }, {
51506
- key: "IsDisabled",
51507
- get: function get() {
51508
- return this.isDisabled;
51509
- }
51510
- }, {
51511
- key: "DPFilter",
51512
- get: function get() {
51513
- return this.dockingPoint.dpFilter;
51514
- }
51515
- /**
51516
- * This function is called when the dockingPoint is docked to another dockingPoint
51517
- * @param refDockingPoint The reference dockingpoint, this is docked to
51518
- * @param refElementId The elementId of the reference DockingPoint
51519
- */
51520
- }, {
51521
- key: "doDock",
51522
- value: function doDock(refDockingPoint, refElementId) {
51523
- this.dockingPoint.isDocking = true;
51524
- this.dockingPoint.onDP = refDockingPoint;
51525
- this.dockingPoint.onElementId = refElementId;
51526
- }
51527
-
51528
- /**
51529
- * This function is called when the dockingpoint should be undocked
51530
- */
51531
- }, {
51532
- key: "undock",
51533
- value: function undock() {
51534
- this.dockingPoint.isDocking = false;
51535
- this.dockingPoint.onDP = undefined;
51536
- this.dockingPoint.onElementId = undefined;
51537
- }
51538
-
51539
- /**
51540
- * This function is used to disable the dp temporarily. It is ignored in the planer
51541
- * @param doDisable
51542
- */
51543
- }, {
51544
- key: "disableDP",
51545
- value: function disableDP(doDisable) {
51546
- this.isDisabled = doDisable;
51547
- }
51548
- }, {
51549
- key: "OnDP",
51550
- get: function get() {
51551
- return this.dockingPoint.onDP;
51552
- }
51553
- }, {
51554
- key: "OnElementId",
51555
- get: function get() {
51556
- return this.dockingPoint.onElementId;
51557
- }
51558
- }, {
51559
- key: "DpId",
51560
- get: function get() {
51561
- return this.dockingPoint.dpId;
51562
- }
51563
- }]);
51564
- }();
51565
-
51566
51418
  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; }
51567
51419
  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(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; }
51568
51420
  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; } } }; }
@@ -71996,4 +71848,4 @@ function _withTimeout() {
71996
71848
  return _withTimeout.apply(this, arguments);
71997
71849
  }
71998
71850
 
71999
- export { ArtifactGenerationError as A, BoundingBox as B, Cell as C, DockingPoint as D, Grid as G, HQRenderScript as H, JsonDataCache as J, OptionCatalogData as O, PlannerElementData as P, Rendering as R, Vector3 as V, articleHandlerInstance as a, setHandlerInstance as b, Vector2 as c, DivaWebPlanner as d, DivaArticle as e, DivaCatalogData as f, DivaBasketHandler as g, CatalogPlannerArticleData as h, Vector4 as i, creatRenderOrders as j, getOrigProductId as k, loadAndRepairBasket as l, headlessSession as m, collectStructureStepKeys as n, runHeadlessArtifactPassBatch as o, runHeadlessArtifactPass as r, summaryHandlerInstance as s };
71851
+ export { ArtifactGenerationError as A, BoundingBox as B, Cell as C, DivaWebPlanner as D, Grid as G, HQRenderScript as H, JsonDataCache as J, OptionCatalogData as O, PlannerElementData as P, Rendering as R, Vector3 as V, articleHandlerInstance as a, setHandlerInstance as b, Vector2 as c, DivaArticle as d, DivaCatalogData as e, DivaBasketHandler as f, CatalogPlannerArticleData as g, Vector4 as h, creatRenderOrders as i, getOrigProductId as j, headlessSession as k, loadAndRepairBasket as l, collectStructureStepKeys as m, runHeadlessArtifactPassBatch as n, runHeadlessArtifactPass as r, summaryHandlerInstance as s };