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

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