@crystaldesign/web-planner-logic 25.3.0-beta.18 → 25.3.0-beta.19

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 (29) hide show
  1. package/build/cjs/{DivaBoxPlanner-de468027.js → DivaBoxPlanner-1a7853f2.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-1dd1defa.js → DivaStandardPlanner-ceca3901.js} +2 -2
  3. package/build/cjs/{DoorPlanner-752ec417.js → DoorPlanner-a0385fd8.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-87835538.js → Host3DSignalR-7fab26d7.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-65d46ddd.js → LiviqueWWSHandler-62f9e3c6.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-57e8727d.js → PfisterWWSHandler-7977e1d8.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-26e34923.js → PlannerHandler2D-ff44402a.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-44baa629.js → SeriousBasketHandler-503bc153.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-ed71e8b6.js → ShelfPlanner-3fec6ada.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-cc2decaf.js → StandardWWSHandler-3f920d18.js} +1 -1
  11. package/build/cjs/{index-2ecdfcea.js → index-bc62cd46.js} +341 -312
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-7c18cb20.js → DivaBoxPlanner-48803ce3.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-cf1719d1.js → DivaStandardPlanner-ce7927f6.js} +2 -2
  15. package/build/esm/{DoorPlanner-fcdcf791.js → DoorPlanner-f893f34e.js} +1 -1
  16. package/build/esm/{Host3DSignalR-de2d0fb4.js → Host3DSignalR-b2645aac.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-6abc6ed0.js → LiviqueWWSHandler-7a582c3d.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-3592cb0a.js → PfisterWWSHandler-9f3a0b55.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-412d4225.js → PlannerHandler2D-d57ebcdc.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-a4bfc054.js → SeriousBasketHandler-19a9ff95.js} +1 -1
  21. package/build/esm/{ShelfPlanner-79da7b85.js → ShelfPlanner-1e795caa.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-7fb93076.js → StandardWWSHandler-454f0faa.js} +1 -1
  23. package/build/esm/{index-5e88a132.js → index-30e0f4dc.js} +341 -312
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  29. package/package.json +2 -2
@@ -24106,7 +24106,7 @@ var DivaArticle = /*#__PURE__*/function () {
24106
24106
  break;
24107
24107
  }
24108
24108
  _context.next = 4;
24109
- return Promise.resolve().then(function () { return require('./ShelfPlanner-ed71e8b6.js'); });
24109
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-3fec6ada.js'); });
24110
24110
  case 4:
24111
24111
  _yield$import = _context.sent;
24112
24112
  ShelfPlanner = _yield$import["default"];
@@ -25074,7 +25074,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25074
25074
  value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
25075
25075
  function () {
25076
25076
  var _loadArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, articleCodex, initParams) {
25077
- var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId, _set$actions;
25077
+ var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
25078
25078
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
25079
25079
  while (1) switch (_context.prev = _context.next) {
25080
25080
  case 0:
@@ -25098,12 +25098,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25098
25098
  articleCodex: articleCodex
25099
25099
  }
25100
25100
  }));
25101
- (_set$actions = set.actions) === null || _set$actions === void 0 || _set$actions.openModal({
25102
- accept: true,
25103
- title: set.i18n.t('modals.error_accured')
25104
- });
25105
- return _context.abrupt("return", false);
25106
- case 13:
25101
+ throw new Error('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!');
25102
+ case 12:
25107
25103
  case "end":
25108
25104
  return _context.stop();
25109
25105
  }
@@ -28802,7 +28798,7 @@ var DivaSet = /*#__PURE__*/function () {
28802
28798
  break;
28803
28799
  }
28804
28800
  _context5.next = 3;
28805
- return Promise.resolve().then(function () { return require('./DoorPlanner-752ec417.js'); });
28801
+ return Promise.resolve().then(function () { return require('./DoorPlanner-a0385fd8.js'); });
28806
28802
  case 3:
28807
28803
  _yield$import = _context5.sent;
28808
28804
  DoorPlanner = _yield$import["default"];
@@ -35596,7 +35592,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35596
35592
  break;
35597
35593
  case 3:
35598
35594
  _context12.next = 5;
35599
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-57e8727d.js'); });
35595
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-7977e1d8.js'); });
35600
35596
  case 5:
35601
35597
  _yield$import = _context12.sent;
35602
35598
  PfisterWWSHandler = _yield$import["default"];
@@ -35604,7 +35600,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35604
35600
  return _context12.abrupt("break", 27);
35605
35601
  case 9:
35606
35602
  _context12.next = 11;
35607
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-65d46ddd.js'); });
35603
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-62f9e3c6.js'); });
35608
35604
  case 11:
35609
35605
  _yield$import2 = _context12.sent;
35610
35606
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35612,7 +35608,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35612
35608
  return _context12.abrupt("break", 27);
35613
35609
  case 15:
35614
35610
  _context12.next = 17;
35615
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-44baa629.js'); });
35611
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-503bc153.js'); });
35616
35612
  case 17:
35617
35613
  _yield$import3 = _context12.sent;
35618
35614
  SeriousWWSHandler = _yield$import3["default"];
@@ -35620,7 +35616,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35620
35616
  return _context12.abrupt("break", 27);
35621
35617
  case 21:
35622
35618
  _context12.next = 23;
35623
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-cc2decaf.js'); });
35619
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-3f920d18.js'); });
35624
35620
  case 23:
35625
35621
  _yield$import4 = _context12.sent;
35626
35622
  StandardWWSHandler = _yield$import4["default"];
@@ -37042,7 +37038,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37042
37038
  while (1) switch (_context3.prev = _context3.next) {
37043
37039
  case 0:
37044
37040
  _context3.next = 2;
37045
- return Promise.resolve().then(function () { return require('./Host3DSignalR-87835538.js'); });
37041
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-7fab26d7.js'); });
37046
37042
  case 2:
37047
37043
  _yield$import = _context3.sent;
37048
37044
  Host3DSignalR = _yield$import["default"];
@@ -38596,7 +38592,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38596
38592
  break;
38597
38593
  case 8:
38598
38594
  _context4.next = 10;
38599
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-1dd1defa.js'); });
38595
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-ceca3901.js'); });
38600
38596
  case 10:
38601
38597
  _yield$import = _context4.sent;
38602
38598
  DivaStandardPlanner = _yield$import["default"];
@@ -38607,7 +38603,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38607
38603
  return _context4.abrupt("break", 21);
38608
38604
  case 15:
38609
38605
  _context4.next = 17;
38610
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-de468027.js'); });
38606
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-1a7853f2.js'); });
38611
38607
  case 17:
38612
38608
  _yield$import2 = _context4.sent;
38613
38609
  DivaBoxPlanner = _yield$import2["default"];
@@ -40361,7 +40357,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40361
40357
  key: "initialize",
40362
40358
  value: function () {
40363
40359
  var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14() {
40364
- var viewReadyPromise, loadSuccessful, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
40360
+ var viewReadyPromise, loadSuccessful;
40365
40361
  return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
40366
40362
  while (1) switch (_context14.prev = _context14.next) {
40367
40363
  case 0:
@@ -40390,59 +40386,97 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40390
40386
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
40391
40387
  }
40392
40388
  if (!loadSuccessful) {
40393
- _context14.next = 56;
40389
+ _context14.next = 27;
40394
40390
  break;
40395
40391
  }
40392
+ _context14.prev = 15;
40393
+ _context14.next = 18;
40394
+ return this.initializeSets(loadSuccessful, viewReadyPromise);
40395
+ case 18:
40396
+ return _context14.abrupt("return", _context14.sent);
40397
+ case 21:
40398
+ _context14.prev = 21;
40399
+ _context14.t0 = _context14["catch"](15);
40400
+ this.onInitializationError();
40401
+ return _context14.abrupt("return", false);
40402
+ case 25:
40403
+ _context14.next = 30;
40404
+ break;
40405
+ case 27:
40406
+ this.onInitializationError();
40407
+ //fehler beim laden vom basket..
40408
+ LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
40409
+ return _context14.abrupt("return", false);
40410
+ case 30:
40411
+ case "end":
40412
+ return _context14.stop();
40413
+ }
40414
+ }, _callee14, this, [[15, 21]]);
40415
+ }));
40416
+ function initialize() {
40417
+ return _initialize.apply(this, arguments);
40418
+ }
40419
+ return initialize;
40420
+ }()
40421
+ }, {
40422
+ key: "initializeSets",
40423
+ value: function () {
40424
+ var _initializeSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(loadSuccessful, viewReadyPromise) {
40425
+ var _this$actions16, _set$getDivaArticles;
40426
+ var _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
40427
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
40428
+ while (1) switch (_context15.prev = _context15.next) {
40429
+ case 0:
40396
40430
  if (!(typeof loadSuccessful != 'boolean')) {
40397
- _context14.next = 24;
40431
+ _context15.next = 9;
40398
40432
  break;
40399
40433
  }
40400
40434
  if (!(loadSuccessful.type == 'ProductList')) {
40401
- _context14.next = 24;
40435
+ _context15.next = 9;
40402
40436
  break;
40403
40437
  }
40404
- _context14.next = 19;
40438
+ _context15.next = 4;
40405
40439
  return viewReadyPromise;
40406
- case 19:
40407
- _context14.next = 21;
40440
+ case 4:
40441
+ _context15.next = 6;
40408
40442
  return this.initView();
40409
- case 21:
40443
+ case 6:
40410
40444
  this.subscribeToWebPlannerEvents();
40411
40445
  (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
40412
- return _context14.abrupt("return", true);
40413
- case 24:
40446
+ return _context15.abrupt("return", true);
40447
+ case 9:
40414
40448
  this.divaNr = this.divaBasketHandler.actDivaNr;
40415
40449
  initSetState = this.getInitStateForSet();
40416
40450
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
40417
- _context14.next = 29;
40451
+ _context15.next = 14;
40418
40452
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
40419
- case 29:
40453
+ case 14:
40420
40454
  set = this.actSet();
40421
40455
  oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
40422
40456
  if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
40423
- _context14.next = 38;
40457
+ _context15.next = 23;
40424
40458
  break;
40425
40459
  }
40426
- _context14.next = 34;
40460
+ _context15.next = 19;
40427
40461
  return this.divaBasketHandler.getProduct(this.api, oldProductId);
40428
- case 34:
40429
- result = _context14.sent;
40462
+ case 19:
40463
+ result = _context15.sent;
40430
40464
  if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
40431
- _context14.next = 39;
40465
+ _context15.next = 24;
40432
40466
  break;
40433
- case 38:
40467
+ case 23:
40434
40468
  if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
40435
40469
  if (loadSuccessful.type != 'ProductList') {
40436
40470
  productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
40437
40471
  }
40438
40472
  }
40439
- case 39:
40440
- _context14.next = 41;
40473
+ case 24:
40474
+ _context15.next = 26;
40441
40475
  return viewReadyPromise;
40442
- case 41:
40443
- _context14.next = 43;
40476
+ case 26:
40477
+ _context15.next = 28;
40444
40478
  return this.initView();
40445
- case 43:
40479
+ case 28:
40446
40480
  (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
40447
40481
  type: 'onConfiguratorReady'
40448
40482
  });
@@ -40452,7 +40486,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40452
40486
  });
40453
40487
  }
40454
40488
  this.subscribeToWebPlannerEvents();
40455
- this.divaBasketHandler.actBasket;
40456
40489
  catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
40457
40490
  initializationId = undefined;
40458
40491
  if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
@@ -40477,25 +40510,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40477
40510
  initializationType: this.divaBasketHandler.initializationTypeGetter,
40478
40511
  initializationId: initializationId
40479
40512
  }, false);
40480
- _context14.next = 53;
40513
+ _context15.next = 37;
40481
40514
  return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
40482
- case 53:
40483
- return _context14.abrupt("return", true);
40484
- case 56:
40485
- this.onInitializationError();
40486
- //fehler beim laden vom basket..
40487
- LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
40488
- return _context14.abrupt("return", false);
40489
- case 59:
40515
+ case 37:
40516
+ return _context15.abrupt("return", true);
40517
+ case 38:
40490
40518
  case "end":
40491
- return _context14.stop();
40519
+ return _context15.stop();
40492
40520
  }
40493
- }, _callee14, this);
40521
+ }, _callee15, this);
40494
40522
  }));
40495
- function initialize() {
40496
- return _initialize.apply(this, arguments);
40523
+ function initializeSets(_x53, _x54) {
40524
+ return _initializeSets.apply(this, arguments);
40497
40525
  }
40498
- return initialize;
40526
+ return initializeSets;
40499
40527
  }()
40500
40528
  }, {
40501
40529
  key: "updatePlannerConfig",
@@ -40554,11 +40582,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40554
40582
  var _this$plannerConfig$a3;
40555
40583
  if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
40556
40584
  var _this$plannerConfig$a2, _this$i18n$t, _this$i18n4, _onErrorHandling$erro;
40585
+ var isWeb = this.api.getApplicationEnvironment() == 'WEB';
40557
40586
  (_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
40558
40587
  title: (_this$i18n$t = (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured')) !== null && _this$i18n$t !== void 0 ? _this$i18n$t : 'An error occured. Please try again later.',
40559
40588
  accept: true,
40560
40589
  callback: function callback(accepted) {
40561
- if (accepted && _this2.api.getApplicationEnvironment() == 'WEB') {
40590
+ if (accepted && isWeb) {
40562
40591
  var _this2$state;
40563
40592
  _this2.callEvent('onWebPlanerClose');
40564
40593
  ((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
@@ -40585,7 +40614,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40585
40614
  var _this$plannerConfig$a6, _this$i18n7, _this$plannerConfig$a7, _this$plannerConfig$c;
40586
40615
  (_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openModal({
40587
40616
  accept: true,
40588
- title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured')
40617
+ title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured33')
40589
40618
  });
40590
40619
  (_this$plannerConfig$a7 = this.plannerConfig.actions) === null || _this$plannerConfig$a7 === void 0 || _this$plannerConfig$a7.openComponent({
40591
40620
  type: 'SELLER',
@@ -40622,23 +40651,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40622
40651
  }, {
40623
40652
  key: "initView",
40624
40653
  value: (function () {
40625
- var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15() {
40654
+ var _initView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16() {
40626
40655
  var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
40627
- return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
40628
- while (1) switch (_context15.prev = _context15.next) {
40656
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
40657
+ while (1) switch (_context16.prev = _context16.next) {
40629
40658
  case 0:
40630
40659
  set = this.actSet();
40631
40660
  plannerMode = this.getPlannerMode();
40632
40661
  this.initConfiguratorMode(plannerMode);
40633
40662
  if (!(plannerMode == 'ProductList')) {
40634
- _context15.next = 7;
40663
+ _context16.next = 7;
40635
40664
  break;
40636
40665
  }
40637
40666
  (_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
40638
- _context15.next = 17;
40667
+ _context16.next = 17;
40639
40668
  break;
40640
40669
  case 7:
40641
- _context15.next = 9;
40670
+ _context16.next = 9;
40642
40671
  return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
40643
40672
  case 9:
40644
40673
  //first load the Configuratorstructure STARTCONFIG
@@ -40652,13 +40681,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40652
40681
  this.onBasketInitialized();
40653
40682
  this.checkMatchingProducts('onInit');
40654
40683
  case 17:
40655
- _context15.next = 19;
40684
+ _context16.next = 19;
40656
40685
  return this.runInitMode(plannerMode);
40657
40686
  case 19:
40658
40687
  case "end":
40659
- return _context15.stop();
40688
+ return _context16.stop();
40660
40689
  }
40661
- }, _callee15, this);
40690
+ }, _callee16, this);
40662
40691
  }));
40663
40692
  function initView() {
40664
40693
  return _initView.apply(this, arguments);
@@ -40679,26 +40708,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40679
40708
  }, {
40680
40709
  key: "runInitMode",
40681
40710
  value: function () {
40682
- var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
40711
+ var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(plannerMode) {
40683
40712
  var _this$state3;
40684
40713
  var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40685
- return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
40686
- while (1) switch (_context16.prev = _context16.next) {
40714
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
40715
+ while (1) switch (_context17.prev = _context17.next) {
40687
40716
  case 0:
40688
40717
  doDefault = true;
40689
40718
  if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
40690
- _context16.next = 10;
40719
+ _context17.next = 10;
40691
40720
  break;
40692
40721
  }
40693
40722
  if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
40694
40723
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
40695
40724
  (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
40696
40725
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
40697
- _context16.next = 7;
40726
+ _context17.next = 7;
40698
40727
  return this.saveToBasketWrapper();
40699
40728
  case 7:
40700
40729
  doDefault = false;
40701
- _context16.next = 11;
40730
+ _context17.next = 11;
40702
40731
  break;
40703
40732
  case 10:
40704
40733
  if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.dimensions.isMobile) {
@@ -40722,11 +40751,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40722
40751
  }
40723
40752
  case 12:
40724
40753
  case "end":
40725
- return _context16.stop();
40754
+ return _context17.stop();
40726
40755
  }
40727
- }, _callee16, this);
40756
+ }, _callee17, this);
40728
40757
  }));
40729
- function runInitMode(_x53) {
40758
+ function runInitMode(_x55) {
40730
40759
  return _runInitMode.apply(this, arguments);
40731
40760
  }
40732
40761
  return runInitMode;
@@ -40734,16 +40763,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40734
40763
  }, {
40735
40764
  key: "addSetToActPlanningByDivaNr",
40736
40765
  value: function () {
40737
- var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(divaNr) {
40766
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(divaNr) {
40738
40767
  var _this$updateViewPlann10;
40739
40768
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
40740
- return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
40741
- while (1) switch (_context17.prev = _context17.next) {
40769
+ return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
40770
+ while (1) switch (_context18.prev = _context18.next) {
40742
40771
  case 0:
40743
40772
  set = this.actSet();
40744
40773
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
40745
40774
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
40746
- _context17.next = 5;
40775
+ _context18.next = 5;
40747
40776
  return this.divaBasketHandler.initializeBasket(this.api);
40748
40777
  case 5:
40749
40778
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -40751,30 +40780,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40751
40780
  i = 0;
40752
40781
  case 8:
40753
40782
  if (!(i < orderSets.length)) {
40754
- _context17.next = 24;
40783
+ _context18.next = 24;
40755
40784
  break;
40756
40785
  }
40757
40786
  orderset = orderSets[i];
40758
40787
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
40759
40788
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
40760
40789
  if (!loadedSet) {
40761
- _context17.next = 18;
40790
+ _context18.next = 18;
40762
40791
  break;
40763
40792
  }
40764
- _context17.next = 15;
40793
+ _context18.next = 15;
40765
40794
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
40766
40795
  case 15:
40767
40796
  this.checkMatchingProducts('onAdd');
40768
- _context17.next = 20;
40797
+ _context18.next = 20;
40769
40798
  break;
40770
40799
  case 18:
40771
- _context17.next = 20;
40800
+ _context18.next = 20;
40772
40801
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
40773
40802
  case 20:
40774
40803
  this.cleanUpEmptySets(true);
40775
40804
  case 21:
40776
40805
  i++;
40777
- _context17.next = 8;
40806
+ _context18.next = 8;
40778
40807
  break;
40779
40808
  case 24:
40780
40809
  this.divaBasketHandler.actBasket.OrderSets = [];
@@ -40786,11 +40815,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40786
40815
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
40787
40816
  case 31:
40788
40817
  case "end":
40789
- return _context17.stop();
40818
+ return _context18.stop();
40790
40819
  }
40791
- }, _callee17, this);
40820
+ }, _callee18, this);
40792
40821
  }));
40793
- function addSetToActPlanningByDivaNr(_x54) {
40822
+ function addSetToActPlanningByDivaNr(_x56) {
40794
40823
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
40795
40824
  }
40796
40825
  return addSetToActPlanningByDivaNr;
@@ -40823,28 +40852,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40823
40852
  }, {
40824
40853
  key: "setActSetCurConfigStepKey",
40825
40854
  value: function () {
40826
- var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(curConfigStepKey) {
40855
+ var _setActSetCurConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(curConfigStepKey) {
40827
40856
  var set;
40828
- return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context18) {
40829
- while (1) switch (_context18.prev = _context18.next) {
40857
+ return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
40858
+ while (1) switch (_context19.prev = _context19.next) {
40830
40859
  case 0:
40831
40860
  set = this.actSet();
40832
40861
  if (set) {
40833
- _context18.next = 3;
40862
+ _context19.next = 3;
40834
40863
  break;
40835
40864
  }
40836
- return _context18.abrupt("return");
40865
+ return _context19.abrupt("return");
40837
40866
  case 3:
40838
40867
  set.ActConfigStepKey = curConfigStepKey;
40839
- _context18.next = 6;
40868
+ _context19.next = 6;
40840
40869
  return setHandlerInstance.updateNavigation(set);
40841
40870
  case 6:
40842
40871
  case "end":
40843
- return _context18.stop();
40872
+ return _context19.stop();
40844
40873
  }
40845
- }, _callee18, this);
40874
+ }, _callee19, this);
40846
40875
  }));
40847
- function setActSetCurConfigStepKey(_x55) {
40876
+ function setActSetCurConfigStepKey(_x57) {
40848
40877
  return _setActSetCurConfigStepKey.apply(this, arguments);
40849
40878
  }
40850
40879
  return setActSetCurConfigStepKey;
@@ -40993,17 +41022,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40993
41022
  }, {
40994
41023
  key: "deletePlannerElement",
40995
41024
  value: function () {
40996
- var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee19(setId, elementId, denyElementSelectionClear) {
41025
+ var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(setId, elementId, denyElementSelectionClear) {
40997
41026
  var _this$updateViewPlann11;
40998
41027
  var set, result, _this$updateElementSe5, _this$updateElementSe6;
40999
- return _regeneratorRuntime__default["default"].wrap(function _callee19$(_context19) {
41000
- while (1) switch (_context19.prev = _context19.next) {
41028
+ return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
41029
+ while (1) switch (_context20.prev = _context20.next) {
41001
41030
  case 0:
41002
41031
  set = this.sets[setId];
41003
- _context19.next = 3;
41032
+ _context20.next = 3;
41004
41033
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
41005
41034
  case 3:
41006
- result = _context19.sent;
41035
+ result = _context20.sent;
41007
41036
  this.updateConfigStructure();
41008
41037
  (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
41009
41038
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
@@ -41014,17 +41043,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41014
41043
  }
41015
41044
  this.updatePriceInView();
41016
41045
  this.checkMatchingProducts('onDelete');
41017
- _context19.next = 14;
41046
+ _context20.next = 14;
41018
41047
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
41019
41048
  case 14:
41020
41049
  this.plannerChangeLog('onDeletePlanner');
41021
41050
  case 15:
41022
41051
  case "end":
41023
- return _context19.stop();
41052
+ return _context20.stop();
41024
41053
  }
41025
- }, _callee19, this);
41054
+ }, _callee20, this);
41026
41055
  }));
41027
- function deletePlannerElement(_x56, _x57, _x58) {
41056
+ function deletePlannerElement(_x58, _x59, _x60) {
41028
41057
  return _deletePlannerElement.apply(this, arguments);
41029
41058
  }
41030
41059
  return deletePlannerElement;
@@ -41038,17 +41067,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41038
41067
  }, {
41039
41068
  key: "copyPlannerElement",
41040
41069
  value: (function () {
41041
- var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee20(setId, elementId, curConfigKey, copyInfo) {
41070
+ var _copyPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
41042
41071
  var _this$updateViewPlann12;
41043
41072
  var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
41044
- return _regeneratorRuntime__default["default"].wrap(function _callee20$(_context20) {
41045
- while (1) switch (_context20.prev = _context20.next) {
41073
+ return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
41074
+ while (1) switch (_context21.prev = _context21.next) {
41046
41075
  case 0:
41047
41076
  set = this.sets[setId];
41048
- _context20.next = 3;
41077
+ _context21.next = 3;
41049
41078
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
41050
41079
  case 3:
41051
- newSelectedArticle = _context20.sent;
41080
+ newSelectedArticle = _context21.sent;
41052
41081
  this.updateConfigStructure();
41053
41082
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
41054
41083
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
@@ -41062,14 +41091,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41062
41091
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
41063
41092
  }
41064
41093
  this.checkMatchingProducts('onCopy');
41065
- return _context20.abrupt("return", newConfigStepKey);
41094
+ return _context21.abrupt("return", newConfigStepKey);
41066
41095
  case 13:
41067
41096
  case "end":
41068
- return _context20.stop();
41097
+ return _context21.stop();
41069
41098
  }
41070
- }, _callee20, this);
41099
+ }, _callee21, this);
41071
41100
  }));
41072
- function copyPlannerElement(_x59, _x60, _x61, _x62) {
41101
+ function copyPlannerElement(_x61, _x62, _x63, _x64) {
41073
41102
  return _copyPlannerElement.apply(this, arguments);
41074
41103
  }
41075
41104
  return copyPlannerElement;
@@ -41098,33 +41127,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41098
41127
  }, {
41099
41128
  key: "getFreePlacesOnGrids",
41100
41129
  value: function () {
41101
- var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee21(gridGroup, from) {
41130
+ var _getFreePlacesOnGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(gridGroup, from) {
41102
41131
  var _this$updateFreePlace;
41103
41132
  var set, freeShelfGrids, plannedShelfGrids;
41104
- return _regeneratorRuntime__default["default"].wrap(function _callee21$(_context21) {
41105
- while (1) switch (_context21.prev = _context21.next) {
41133
+ return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
41134
+ while (1) switch (_context22.prev = _context22.next) {
41106
41135
  case 0:
41107
41136
  set = this.actSet();
41108
41137
  if (set) {
41109
- _context21.next = 3;
41138
+ _context22.next = 3;
41110
41139
  break;
41111
41140
  }
41112
41141
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
41113
41142
  case 3:
41114
41143
  if (!gridGroup) {
41115
- _context21.next = 9;
41144
+ _context22.next = 9;
41116
41145
  break;
41117
41146
  }
41118
- _context21.next = 6;
41147
+ _context22.next = 6;
41119
41148
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
41120
41149
  case 6:
41121
- _context21.t0 = _context21.sent;
41122
- _context21.next = 10;
41150
+ _context22.t0 = _context22.sent;
41151
+ _context22.next = 10;
41123
41152
  break;
41124
41153
  case 9:
41125
- _context21.t0 = undefined;
41154
+ _context22.t0 = undefined;
41126
41155
  case 10:
41127
- freeShelfGrids = _context21.t0;
41156
+ freeShelfGrids = _context22.t0;
41128
41157
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
41129
41158
  LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
41130
41159
  LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
@@ -41132,17 +41161,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41132
41161
  freeShelfGrids: freeShelfGrids,
41133
41162
  plannedShelfGrids: plannedShelfGrids
41134
41163
  });
41135
- return _context21.abrupt("return", {
41164
+ return _context22.abrupt("return", {
41136
41165
  freeShelfGrids: freeShelfGrids,
41137
41166
  plannedShelfGrids: plannedShelfGrids
41138
41167
  });
41139
41168
  case 16:
41140
41169
  case "end":
41141
- return _context21.stop();
41170
+ return _context22.stop();
41142
41171
  }
41143
- }, _callee21, this);
41172
+ }, _callee22, this);
41144
41173
  }));
41145
- function getFreePlacesOnGrids(_x63, _x64) {
41174
+ function getFreePlacesOnGrids(_x65, _x66) {
41146
41175
  return _getFreePlacesOnGrids.apply(this, arguments);
41147
41176
  }
41148
41177
  return getFreePlacesOnGrids;
@@ -41159,36 +41188,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41159
41188
  }, {
41160
41189
  key: "moveShelfItemToGrid",
41161
41190
  value: function () {
41162
- var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(accessoireBasketId, parentBasketId, gridName, cellIndex) {
41191
+ var _moveShelfItemToGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(accessoireBasketId, parentBasketId, gridName, cellIndex) {
41163
41192
  var set, newGridId;
41164
- return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context22) {
41165
- while (1) switch (_context22.prev = _context22.next) {
41193
+ return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
41194
+ while (1) switch (_context23.prev = _context23.next) {
41166
41195
  case 0:
41167
41196
  set = this.actSet();
41168
41197
  if (set) {
41169
- _context22.next = 3;
41198
+ _context23.next = 3;
41170
41199
  break;
41171
41200
  }
41172
- return _context22.abrupt("return");
41201
+ return _context23.abrupt("return");
41173
41202
  case 3:
41174
- _context22.next = 5;
41203
+ _context23.next = 5;
41175
41204
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
41176
41205
  case 5:
41177
- newGridId = _context22.sent;
41206
+ newGridId = _context23.sent;
41178
41207
  this.updatePlannerView('MOVE_SHELF_ITEM');
41179
41208
  if (!newGridId) {
41180
- _context22.next = 10;
41209
+ _context23.next = 10;
41181
41210
  break;
41182
41211
  }
41183
- _context22.next = 10;
41212
+ _context23.next = 10;
41184
41213
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
41185
41214
  case 10:
41186
41215
  case "end":
41187
- return _context22.stop();
41216
+ return _context23.stop();
41188
41217
  }
41189
- }, _callee22, this);
41218
+ }, _callee23, this);
41190
41219
  }));
41191
- function moveShelfItemToGrid(_x65, _x66, _x67, _x68) {
41220
+ function moveShelfItemToGrid(_x67, _x68, _x69, _x70) {
41192
41221
  return _moveShelfItemToGrid.apply(this, arguments);
41193
41222
  }
41194
41223
  return moveShelfItemToGrid;
@@ -41196,27 +41225,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41196
41225
  }, {
41197
41226
  key: "resetArticle",
41198
41227
  value: function () {
41199
- var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(basketId) {
41228
+ var _resetArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(basketId) {
41200
41229
  var set;
41201
- return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context23) {
41202
- while (1) switch (_context23.prev = _context23.next) {
41230
+ return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
41231
+ while (1) switch (_context24.prev = _context24.next) {
41203
41232
  case 0:
41204
41233
  set = this.actSet();
41205
41234
  if (set) {
41206
- _context23.next = 3;
41235
+ _context24.next = 3;
41207
41236
  break;
41208
41237
  }
41209
- return _context23.abrupt("return");
41238
+ return _context24.abrupt("return");
41210
41239
  case 3:
41211
- _context23.next = 5;
41240
+ _context24.next = 5;
41212
41241
  return setHandlerInstance.resetArticle(set, basketId);
41213
41242
  case 5:
41214
41243
  case "end":
41215
- return _context23.stop();
41244
+ return _context24.stop();
41216
41245
  }
41217
- }, _callee23, this);
41246
+ }, _callee24, this);
41218
41247
  }));
41219
- function resetArticle(_x69) {
41248
+ function resetArticle(_x71) {
41220
41249
  return _resetArticle.apply(this, arguments);
41221
41250
  }
41222
41251
  return resetArticle;
@@ -41246,10 +41275,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41246
41275
  }, {
41247
41276
  key: "checkMatchingProducts",
41248
41277
  value: function () {
41249
- var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(from) {
41278
+ var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(from) {
41250
41279
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
41251
- return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
41252
- while (1) switch (_context24.prev = _context24.next) {
41280
+ return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
41281
+ while (1) switch (_context25.prev = _context25.next) {
41253
41282
  case 0:
41254
41283
  set = this.actSet();
41255
41284
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -41263,20 +41292,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41263
41292
  }
41264
41293
  }
41265
41294
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
41266
- _context24.next = 6;
41295
+ _context25.next = 6;
41267
41296
  break;
41268
41297
  }
41269
- _context24.next = 5;
41298
+ _context25.next = 5;
41270
41299
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
41271
41300
  case 5:
41272
41301
  this.updatePriceInView();
41273
41302
  case 6:
41274
41303
  case "end":
41275
- return _context24.stop();
41304
+ return _context25.stop();
41276
41305
  }
41277
- }, _callee24, this);
41306
+ }, _callee25, this);
41278
41307
  }));
41279
- function checkMatchingProducts(_x70) {
41308
+ function checkMatchingProducts(_x72) {
41280
41309
  return _checkMatchingProducts.apply(this, arguments);
41281
41310
  }
41282
41311
  return checkMatchingProducts;
@@ -41353,7 +41382,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41353
41382
  }, {
41354
41383
  key: "saveToBasketWrapper",
41355
41384
  value: function () {
41356
- var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(event, repairOnly, force) {
41385
+ var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
41357
41386
  var _this$actions27,
41358
41387
  _this$actions27$toggl,
41359
41388
  _this$actions28,
@@ -41362,8 +41391,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41362
41391
  _this$actions32,
41363
41392
  _this$i18n14;
41364
41393
  var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions26, result, _this$actions29, _this$i18n8, _this$i18n9, _this$actions30, _this$i18n10, _this$i18n11, _this$actions31, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
41365
- return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
41366
- while (1) switch (_context25.prev = _context25.next) {
41394
+ return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
41395
+ while (1) switch (_context26.prev = _context26.next) {
41367
41396
  case 0:
41368
41397
  returnTo = this.getReturnTo(event);
41369
41398
  finalEvent = {
@@ -41371,50 +41400,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41371
41400
  saveBasket: true
41372
41401
  };
41373
41402
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
41374
- _context25.next = 21;
41403
+ _context26.next = 21;
41375
41404
  break;
41376
41405
  }
41377
41406
  product = undefined;
41378
41407
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
41379
- _context25.next = 10;
41408
+ _context26.next = 10;
41380
41409
  break;
41381
41410
  }
41382
41411
  url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
41383
- _context25.next = 8;
41412
+ _context26.next = 8;
41384
41413
  return this.api.getDataCache(url, url, undefined, 'catalog');
41385
41414
  case 8:
41386
- _result = _context25.sent;
41415
+ _result = _context26.sent;
41387
41416
  product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
41388
41417
  case 10:
41389
- _context25.next = 12;
41418
+ _context26.next = 12;
41390
41419
  return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
41391
41420
  case 12:
41392
- finalEvent = _context25.sent;
41421
+ finalEvent = _context26.sent;
41393
41422
  if (finalEvent) {
41394
- _context25.next = 17;
41423
+ _context26.next = 17;
41395
41424
  break;
41396
41425
  }
41397
- return _context25.abrupt("return", 'canceled');
41426
+ return _context26.abrupt("return", 'canceled');
41398
41427
  case 17:
41399
41428
  if (!(!finalEvent.saveBasket && finalEvent.event)) {
41400
- _context25.next = 20;
41429
+ _context26.next = 20;
41401
41430
  break;
41402
41431
  }
41403
41432
  (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
41404
41433
  type: finalEvent.event
41405
41434
  });
41406
- return _context25.abrupt("return", 'canceled');
41435
+ return _context26.abrupt("return", 'canceled');
41407
41436
  case 20:
41408
41437
  returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
41409
41438
  case 21:
41410
41439
  (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || (_this$actions27$toggl = _this$actions27.toggleLoading) === null || _this$actions27$toggl === void 0 || _this$actions27$toggl.call(_this$actions27, 'Planner_Saving', false, true);
41411
- _context25.next = 24;
41440
+ _context26.next = 24;
41412
41441
  return this.saveToBasket(finalEvent.event, repairOnly, force);
41413
41442
  case 24:
41414
- result = _context25.sent;
41443
+ result = _context26.sent;
41415
41444
  (_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, false);
41416
41445
  if (!(result === 'canceled')) {
41417
- _context25.next = 30;
41446
+ _context26.next = 30;
41418
41447
  break;
41419
41448
  }
41420
41449
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
@@ -41422,10 +41451,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41422
41451
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
41423
41452
  accept: true
41424
41453
  });
41425
- return _context25.abrupt("return", result);
41454
+ return _context26.abrupt("return", result);
41426
41455
  case 30:
41427
- _context25.t0 = returnTo;
41428
- _context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context25.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
41456
+ _context26.t0 = returnTo;
41457
+ _context26.next = _context26.t0 === 'OPEN_PDF' ? 33 : _context26.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
41429
41458
  break;
41430
41459
  case 33:
41431
41460
  if (!this.getBasket().PDFDocumentURL) {
@@ -41445,7 +41474,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41445
41474
  }
41446
41475
  });
41447
41476
  }
41448
- return _context25.abrupt("break", 36);
41477
+ return _context26.abrupt("break", 36);
41449
41478
  case 35:
41450
41479
  (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
41451
41480
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
@@ -41453,20 +41482,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41453
41482
  });
41454
41483
  case 36:
41455
41484
  if (!(result == 'noArticleToSave')) {
41456
- _context25.next = 39;
41485
+ _context26.next = 39;
41457
41486
  break;
41458
41487
  }
41459
41488
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
41460
- return _context25.abrupt("return", 'canceled');
41489
+ return _context26.abrupt("return", 'canceled');
41461
41490
  case 39:
41462
- return _context25.abrupt("return", result);
41491
+ return _context26.abrupt("return", result);
41463
41492
  case 40:
41464
41493
  case "end":
41465
- return _context25.stop();
41494
+ return _context26.stop();
41466
41495
  }
41467
- }, _callee25, this);
41496
+ }, _callee26, this);
41468
41497
  }));
41469
- function saveToBasketWrapper(_x71, _x72, _x73) {
41498
+ function saveToBasketWrapper(_x73, _x74, _x75) {
41470
41499
  return _saveToBasketWrapper.apply(this, arguments);
41471
41500
  }
41472
41501
  return saveToBasketWrapper;
@@ -41474,43 +41503,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41474
41503
  }, {
41475
41504
  key: "saveToBasket",
41476
41505
  value: function () {
41477
- var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
41506
+ var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, force) {
41478
41507
  var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
41479
41508
  var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
41480
- return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
41481
- while (1) switch (_context26.prev = _context26.next) {
41509
+ return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
41510
+ while (1) switch (_context27.prev = _context27.next) {
41482
41511
  case 0:
41483
41512
  set = this.actSet();
41484
41513
  if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
41485
- _context26.next = 3;
41514
+ _context27.next = 3;
41486
41515
  break;
41487
41516
  }
41488
- return _context26.abrupt("return", 'noArticleToSave');
41517
+ return _context27.abrupt("return", 'noArticleToSave');
41489
41518
  case 3:
41490
41519
  actBasket = this.divaBasketHandler.actBasket;
41491
41520
  returnTo = this.getReturnTo(event);
41492
41521
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
41493
- _context26.next = 13;
41522
+ _context27.next = 13;
41494
41523
  break;
41495
41524
  }
41496
41525
  oldReturnTo = returnTo;
41497
41526
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
41498
- _context26.next = 10;
41527
+ _context27.next = 10;
41499
41528
  return this.handleFavorites('SAVE');
41500
41529
  case 10:
41501
- result = _context26.sent;
41530
+ result = _context27.sent;
41502
41531
  if (result === 'canceled') {
41503
41532
  this.ReturnTo = oldReturnTo;
41504
41533
  }
41505
- return _context26.abrupt("return", result);
41534
+ return _context27.abrupt("return", result);
41506
41535
  case 13:
41507
- _context26.t0 = this.divaBasketHandler;
41508
- _context26.t1 = this.divaBasketHandler.actDivaNr;
41509
- _context26.next = 17;
41536
+ _context27.t0 = this.divaBasketHandler;
41537
+ _context27.t1 = this.divaBasketHandler.actDivaNr;
41538
+ _context27.next = 17;
41510
41539
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
41511
41540
  case 17:
41512
- _context26.t2 = _context26.sent;
41513
- _context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
41541
+ _context27.t2 = _context27.sent;
41542
+ _context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
41514
41543
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
41515
41544
  this.ReturnTo = 'OPEN_SELLER_BASKET';
41516
41545
  returnTo = this.ReturnTo;
@@ -41525,11 +41554,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41525
41554
  this.divaBasketHandler.fillOrigConfigurations();
41526
41555
  actBasket.Updated = Date.now();
41527
41556
  if (!returnTo) {
41528
- _context26.next = 52;
41557
+ _context27.next = 52;
41529
41558
  break;
41530
41559
  }
41531
- _context26.t3 = returnTo;
41532
- _context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context26.t3 === 'OPEN_PDF' ? 33 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context26.t3 === 'SAVE_BASKET' ? 33 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
41560
+ _context27.t3 = returnTo;
41561
+ _context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
41533
41562
  break;
41534
41563
  case 28:
41535
41564
  (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
@@ -41543,7 +41572,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41543
41572
  basketData: actBasket
41544
41573
  }
41545
41574
  });
41546
- return _context26.abrupt("break", 52);
41575
+ return _context27.abrupt("break", 52);
41547
41576
  case 31:
41548
41577
  (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
41549
41578
  type: 'SELLER',
@@ -41555,23 +41584,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41555
41584
  basketData: actBasket
41556
41585
  }
41557
41586
  });
41558
- return _context26.abrupt("break", 52);
41587
+ return _context27.abrupt("break", 52);
41559
41588
  case 33:
41560
41589
  if (!(event == 'onSaveProduct')) {
41561
- _context26.next = 43;
41590
+ _context27.next = 43;
41562
41591
  break;
41563
41592
  }
41564
41593
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
41565
41594
  actBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(actBasket)));
41566
- _context26.next = 37;
41595
+ _context27.next = 37;
41567
41596
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
41568
41597
  case 37:
41569
- _context26.next = 39;
41598
+ _context27.next = 39;
41570
41599
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
41571
41600
  case 39:
41572
- newDivaNr = _context26.sent;
41601
+ newDivaNr = _context27.sent;
41573
41602
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
41574
- _context26.next = 51;
41603
+ _context27.next = 51;
41575
41604
  break;
41576
41605
  case 43:
41577
41606
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -41580,32 +41609,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41580
41609
  }
41581
41610
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
41582
41611
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
41583
- _context26.next = 48;
41612
+ _context27.next = 48;
41584
41613
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
41585
41614
  case 48:
41586
- _result2 = _context26.sent;
41615
+ _result2 = _context27.sent;
41587
41616
  if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
41588
- _context26.next = 51;
41617
+ _context27.next = 51;
41589
41618
  break;
41590
41619
  }
41591
- return _context26.abrupt("return", 'canceled');
41620
+ return _context27.abrupt("return", 'canceled');
41592
41621
  case 51:
41593
- return _context26.abrupt("break", 52);
41622
+ return _context27.abrupt("break", 52);
41594
41623
  case 52:
41595
41624
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
41596
41625
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
41597
- _context26.next = 56;
41626
+ _context27.next = 56;
41598
41627
  return this.addToBasket(actBasket, event);
41599
41628
  case 56:
41600
- product = _context26.sent;
41601
- return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41629
+ product = _context27.sent;
41630
+ return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41602
41631
  case 58:
41603
41632
  case "end":
41604
- return _context26.stop();
41633
+ return _context27.stop();
41605
41634
  }
41606
- }, _callee26, this);
41635
+ }, _callee27, this);
41607
41636
  }));
41608
- function saveToBasket(_x74, _x75, _x76) {
41637
+ function saveToBasket(_x76, _x77, _x78) {
41609
41638
  return _saveToBasket.apply(this, arguments);
41610
41639
  }
41611
41640
  return saveToBasket;
@@ -41839,23 +41868,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41839
41868
  }, {
41840
41869
  key: "getBasketDataWithEkText",
41841
41870
  value: function () {
41842
- var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27() {
41843
- return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
41844
- while (1) switch (_context27.prev = _context27.next) {
41871
+ var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28() {
41872
+ return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
41873
+ while (1) switch (_context28.prev = _context28.next) {
41845
41874
  case 0:
41846
- _context27.t0 = this.divaBasketHandler;
41847
- _context27.t1 = this.divaBasketHandler.actDivaNr;
41848
- _context27.next = 4;
41875
+ _context28.t0 = this.divaBasketHandler;
41876
+ _context28.t1 = this.divaBasketHandler.actDivaNr;
41877
+ _context28.next = 4;
41849
41878
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
41850
41879
  case 4:
41851
- _context27.t2 = _context27.sent;
41852
- _context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
41853
- return _context27.abrupt("return", this.divaBasketHandler.actBasket);
41880
+ _context28.t2 = _context28.sent;
41881
+ _context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
41882
+ return _context28.abrupt("return", this.divaBasketHandler.actBasket);
41854
41883
  case 7:
41855
41884
  case "end":
41856
- return _context27.stop();
41885
+ return _context28.stop();
41857
41886
  }
41858
- }, _callee27, this);
41887
+ }, _callee28, this);
41859
41888
  }));
41860
41889
  function getBasketDataWithEkText() {
41861
41890
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -41881,7 +41910,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41881
41910
  }, {
41882
41911
  key: "addToBasket",
41883
41912
  value: function () {
41884
- var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(actBasket) {
41913
+ var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
41885
41914
  var _this$actions36,
41886
41915
  _this$actions37,
41887
41916
  _this$actions38,
@@ -41901,44 +41930,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41901
41930
  to,
41902
41931
  variants,
41903
41932
  products,
41904
- _args28 = arguments;
41905
- return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
41906
- while (1) switch (_context28.prev = _context28.next) {
41933
+ _args29 = arguments;
41934
+ return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
41935
+ while (1) switch (_context29.prev = _context29.next) {
41907
41936
  case 0:
41908
- event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
41909
- _context28.t0 = event;
41910
- _context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 7 : _context28.t0 === 'onWebPlanerShare' ? 9 : _context28.t0 === 'onRequestConsulation' ? 11 : _context28.t0 === 'onSave' ? 13 : _context28.t0 === 'onSendEmail' ? 15 : _context28.t0 === 'onSaveProduct' ? 20 : _context28.t0 === 'dontSaveBasket' ? 27 : _context28.t0 === 'onAddToBasket' ? 28 : _context28.t0 === 'onSendContactForm' ? 30 : 33;
41937
+ event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
41938
+ _context29.t0 = event;
41939
+ _context29.next = _context29.t0 === 'onWebPlanerPrint' ? 5 : _context29.t0 === 'onWebPlanerSave' ? 7 : _context29.t0 === 'onWebPlanerShare' ? 9 : _context29.t0 === 'onRequestConsulation' ? 11 : _context29.t0 === 'onSave' ? 13 : _context29.t0 === 'onSendEmail' ? 15 : _context29.t0 === 'onSaveProduct' ? 20 : _context29.t0 === 'dontSaveBasket' ? 27 : _context29.t0 === 'onAddToBasket' ? 28 : _context29.t0 === 'onSendContactForm' ? 30 : 33;
41911
41940
  break;
41912
41941
  case 5:
41913
41942
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41914
41943
  type: 'onWebPlanerPrint',
41915
41944
  data: actBasket.getAsJson()
41916
41945
  });
41917
- return _context28.abrupt("break", 35);
41946
+ return _context29.abrupt("break", 35);
41918
41947
  case 7:
41919
41948
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41920
41949
  type: 'onWebPlanerSave',
41921
41950
  data: actBasket.getAsJson()
41922
41951
  });
41923
- return _context28.abrupt("break", 35);
41952
+ return _context29.abrupt("break", 35);
41924
41953
  case 9:
41925
41954
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41926
41955
  type: 'onWebPlanerShare',
41927
41956
  data: actBasket.getAsJson()
41928
41957
  });
41929
- return _context28.abrupt("break", 35);
41958
+ return _context29.abrupt("break", 35);
41930
41959
  case 11:
41931
41960
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41932
41961
  type: 'onRequestConsulation',
41933
41962
  data: actBasket.getAsJson()
41934
41963
  });
41935
- return _context28.abrupt("break", 35);
41964
+ return _context29.abrupt("break", 35);
41936
41965
  case 13:
41937
41966
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41938
41967
  type: 'onSave',
41939
41968
  data: actBasket.getAsJson()
41940
41969
  });
41941
- return _context28.abrupt("break", 35);
41970
+ return _context29.abrupt("break", 35);
41942
41971
  case 15:
41943
41972
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
41944
41973
  this.divaBasketHandler.emailConfig = undefined;
@@ -41973,51 +42002,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41973
42002
  type: 'onAddToBasket',
41974
42003
  data: actBasket.getAsJson()
41975
42004
  });
41976
- return _context28.abrupt("break", 35);
42005
+ return _context29.abrupt("break", 35);
41977
42006
  case 20:
41978
42007
  this.actSet().CatalogData;
41979
- _context28.next = 23;
42008
+ _context29.next = 23;
41980
42009
  return this.api.saveAsProduct(this.sets, actBasket);
41981
42010
  case 23:
41982
- products = _context28.sent;
42011
+ products = _context29.sent;
41983
42012
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
41984
42013
  type: 'onAddToBasket',
41985
42014
  data: actBasket.getAsJson()
41986
42015
  });
41987
42016
  if (!products) {
41988
- _context28.next = 27;
42017
+ _context29.next = 27;
41989
42018
  break;
41990
42019
  }
41991
- return _context28.abrupt("return", products[0]);
42020
+ return _context29.abrupt("return", products[0]);
41992
42021
  case 27:
41993
42022
  case 28:
41994
42023
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
41995
42024
  type: 'onAddToBasket',
41996
42025
  data: actBasket.getAsJson()
41997
42026
  });
41998
- return _context28.abrupt("break", 35);
42027
+ return _context29.abrupt("break", 35);
41999
42028
  case 30:
42000
42029
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
42001
42030
  type: 'onAddToBasket',
42002
42031
  data: actBasket.getAsJson()
42003
42032
  });
42004
42033
  this.openContactForm(this.divaBasketHandler);
42005
- return _context28.abrupt("break", 35);
42034
+ return _context29.abrupt("break", 35);
42006
42035
  case 33:
42007
42036
  (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
42008
42037
  type: event,
42009
42038
  data: actBasket.getAsJson()
42010
42039
  });
42011
- return _context28.abrupt("break", 35);
42040
+ return _context29.abrupt("break", 35);
42012
42041
  case 35:
42013
- return _context28.abrupt("return");
42042
+ return _context29.abrupt("return");
42014
42043
  case 36:
42015
42044
  case "end":
42016
- return _context28.stop();
42045
+ return _context29.stop();
42017
42046
  }
42018
- }, _callee28, this);
42047
+ }, _callee29, this);
42019
42048
  }));
42020
- function addToBasket(_x77) {
42049
+ function addToBasket(_x79) {
42021
42050
  return _addToBasket.apply(this, arguments);
42022
42051
  }
42023
42052
  return addToBasket;
@@ -42292,9 +42321,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42292
42321
  key: "initApiForLogicOnly",
42293
42322
  value: //just for testing purposes
42294
42323
  function () {
42295
- var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42296
- return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
42297
- while (1) switch (_context29.prev = _context29.next) {
42324
+ var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42325
+ return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
42326
+ while (1) switch (_context30.prev = _context30.next) {
42298
42327
  case 0:
42299
42328
  //empty services
42300
42329
  this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
@@ -42307,17 +42336,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42307
42336
  jwt: jwt,
42308
42337
  apiKey: apiKey
42309
42338
  }), handler);
42310
- _context29.next = 3;
42339
+ _context30.next = 3;
42311
42340
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
42312
42341
  case 3:
42313
42342
  this.plannerHandler = new DivaPlannerHandler(true);
42314
42343
  case 4:
42315
42344
  case "end":
42316
- return _context29.stop();
42345
+ return _context30.stop();
42317
42346
  }
42318
- }, _callee29, this);
42347
+ }, _callee30, this);
42319
42348
  }));
42320
- function initApiForLogicOnly(_x78, _x79, _x80, _x81, _x82, _x83, _x84) {
42349
+ function initApiForLogicOnly(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
42321
42350
  return _initApiForLogicOnly.apply(this, arguments);
42322
42351
  }
42323
42352
  return initApiForLogicOnly;
@@ -42330,16 +42359,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42330
42359
  }, {
42331
42360
  key: "loadBasket",
42332
42361
  value: function () {
42333
- var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30() {
42334
- return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
42335
- while (1) switch (_context30.prev = _context30.next) {
42362
+ var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31() {
42363
+ return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
42364
+ while (1) switch (_context31.prev = _context31.next) {
42336
42365
  case 0:
42337
- return _context30.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42366
+ return _context31.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42338
42367
  case 1:
42339
42368
  case "end":
42340
- return _context30.stop();
42369
+ return _context31.stop();
42341
42370
  }
42342
- }, _callee30, this);
42371
+ }, _callee31, this);
42343
42372
  }));
42344
42373
  function loadBasket() {
42345
42374
  return _loadBasket.apply(this, arguments);
@@ -42354,39 +42383,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42354
42383
  }, {
42355
42384
  key: "initBasket",
42356
42385
  value: function () {
42357
- var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites) {
42386
+ var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32(init3D, ignoreFavorites) {
42358
42387
  var initSetState, set, basket;
42359
- return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
42360
- while (1) switch (_context31.prev = _context31.next) {
42388
+ return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
42389
+ while (1) switch (_context32.prev = _context32.next) {
42361
42390
  case 0:
42362
42391
  this.divaNr = this.divaBasketHandler.actDivaNr;
42363
42392
  initSetState = this.getInitStateForSet(!init3D);
42364
42393
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
42365
- _context31.next = 5;
42394
+ _context32.next = 5;
42366
42395
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
42367
42396
  case 5:
42368
42397
  //TODO check if when basket gets repaired the product match gets called
42369
42398
  set = this.actSet();
42370
42399
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
42371
42400
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
42372
- _context31.next = 10;
42401
+ _context32.next = 10;
42373
42402
  break;
42374
42403
  }
42375
- _context31.next = 10;
42404
+ _context32.next = 10;
42376
42405
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
42377
42406
  case 10:
42378
- _context31.next = 12;
42407
+ _context32.next = 12;
42379
42408
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
42380
42409
  case 12:
42381
- basket = _context31.sent;
42382
- return _context31.abrupt("return", basket);
42410
+ basket = _context32.sent;
42411
+ return _context32.abrupt("return", basket);
42383
42412
  case 14:
42384
42413
  case "end":
42385
- return _context31.stop();
42414
+ return _context32.stop();
42386
42415
  }
42387
- }, _callee31, this);
42416
+ }, _callee32, this);
42388
42417
  }));
42389
- function initBasket(_x85, _x86) {
42418
+ function initBasket(_x87, _x88) {
42390
42419
  return _initBasket.apply(this, arguments);
42391
42420
  }
42392
42421
  return initBasket;
@@ -42400,21 +42429,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42400
42429
  }, {
42401
42430
  key: "getValidVariantsLength",
42402
42431
  value: function () {
42403
- var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
42432
+ var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33() {
42404
42433
  var set;
42405
- return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
42406
- while (1) switch (_context32.prev = _context32.next) {
42434
+ return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
42435
+ while (1) switch (_context33.prev = _context33.next) {
42407
42436
  case 0:
42408
42437
  set = this.actSet();
42409
- _context32.next = 3;
42438
+ _context33.next = 3;
42410
42439
  return favoritesHandlerInstance.getValidVariants(set, true);
42411
42440
  case 3:
42412
- return _context32.abrupt("return", _context32.sent.length);
42441
+ return _context33.abrupt("return", _context33.sent.length);
42413
42442
  case 4:
42414
42443
  case "end":
42415
- return _context32.stop();
42444
+ return _context33.stop();
42416
42445
  }
42417
- }, _callee32, this);
42446
+ }, _callee33, this);
42418
42447
  }));
42419
42448
  function getValidVariantsLength() {
42420
42449
  return _getValidVariantsLength.apply(this, arguments);
@@ -42424,46 +42453,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42424
42453
  }, {
42425
42454
  key: "handleFavorites",
42426
42455
  value: function () {
42427
- var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(mode) {
42456
+ var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(mode) {
42428
42457
  var _this5 = this;
42429
42458
  var set, i;
42430
- return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
42431
- while (1) switch (_context33.prev = _context33.next) {
42459
+ return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
42460
+ while (1) switch (_context34.prev = _context34.next) {
42432
42461
  case 0:
42433
42462
  set = this.actSet();
42434
42463
  i = 0;
42435
42464
  case 2:
42436
42465
  if (!favoritesHandlerInstance.IsCalcForSummary) {
42437
- _context33.next = 11;
42466
+ _context34.next = 11;
42438
42467
  break;
42439
42468
  }
42440
- _context33.next = 5;
42469
+ _context34.next = 5;
42441
42470
  return DivaUtils__default["default"].Sleep(200);
42442
42471
  case 5:
42443
42472
  i++;
42444
42473
  if (!(i > 1000)) {
42445
- _context33.next = 9;
42474
+ _context34.next = 9;
42446
42475
  break;
42447
42476
  }
42448
42477
  LOG$1.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
42449
- return _context33.abrupt("break", 11);
42478
+ return _context34.abrupt("break", 11);
42450
42479
  case 9:
42451
- _context33.next = 2;
42480
+ _context34.next = 2;
42452
42481
  break;
42453
42482
  case 11:
42454
- _context33.next = 13;
42483
+ _context34.next = 13;
42455
42484
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
42456
42485
  return _this5.update2DGrid(set);
42457
42486
  }, this.actions);
42458
42487
  case 13:
42459
- return _context33.abrupt("return", _context33.sent);
42488
+ return _context34.abrupt("return", _context34.sent);
42460
42489
  case 14:
42461
42490
  case "end":
42462
- return _context33.stop();
42491
+ return _context34.stop();
42463
42492
  }
42464
- }, _callee33, this);
42493
+ }, _callee34, this);
42465
42494
  }));
42466
- function handleFavorites(_x87) {
42495
+ function handleFavorites(_x89) {
42467
42496
  return _handleFavorites.apply(this, arguments);
42468
42497
  }
42469
42498
  return handleFavorites;
@@ -42476,48 +42505,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42476
42505
  }, {
42477
42506
  key: "initSapOrderLinesFromBasket",
42478
42507
  value: function () {
42479
- var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(divaNr, init3D, onlyLoadOldBakset) {
42508
+ var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(divaNr, init3D, onlyLoadOldBakset) {
42480
42509
  var result, oldBasket, basket;
42481
- return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
42482
- while (1) switch (_context34.prev = _context34.next) {
42510
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
42511
+ while (1) switch (_context35.prev = _context35.next) {
42483
42512
  case 0:
42484
42513
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
42485
- _context34.next = 3;
42514
+ _context35.next = 3;
42486
42515
  return this.loadBasket();
42487
42516
  case 3:
42488
- result = _context34.sent;
42517
+ result = _context35.sent;
42489
42518
  if (!onlyLoadOldBakset) {
42490
- _context34.next = 6;
42519
+ _context35.next = 6;
42491
42520
  break;
42492
42521
  }
42493
- return _context34.abrupt("return", {
42522
+ return _context35.abrupt("return", {
42494
42523
  oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
42495
42524
  cache: {}
42496
42525
  });
42497
42526
  case 6:
42498
42527
  if (!(result === false)) {
42499
- _context34.next = 8;
42528
+ _context35.next = 8;
42500
42529
  break;
42501
42530
  }
42502
42531
  throw new Error('Could not load basket! ' + divaNr);
42503
42532
  case 8:
42504
42533
  oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
42505
- _context34.next = 11;
42534
+ _context35.next = 11;
42506
42535
  return this.initBasket(init3D);
42507
42536
  case 11:
42508
- basket = _context34.sent;
42509
- return _context34.abrupt("return", {
42537
+ basket = _context35.sent;
42538
+ return _context35.abrupt("return", {
42510
42539
  basket: basket,
42511
42540
  oldBasket: oldBasket,
42512
42541
  cache: this.api.getJsonDataCache()
42513
42542
  });
42514
42543
  case 13:
42515
42544
  case "end":
42516
- return _context34.stop();
42545
+ return _context35.stop();
42517
42546
  }
42518
- }, _callee34, this);
42547
+ }, _callee35, this);
42519
42548
  }));
42520
- function initSapOrderLinesFromBasket(_x88, _x89, _x90) {
42549
+ function initSapOrderLinesFromBasket(_x90, _x91, _x92) {
42521
42550
  return _initSapOrderLinesFromBasket.apply(this, arguments);
42522
42551
  }
42523
42552
  return initSapOrderLinesFromBasket;