@crystaldesign/web-planner-logic 26.11.0-beta.4 → 26.11.0-beta.6

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