@crystaldesign/web-planner-logic 25.3.0-beta.17 → 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 (52) hide show
  1. package/build/cjs/{DivaBoxPlanner-d0763a4e.js → DivaBoxPlanner-1a7853f2.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-12dad013.js → DivaStandardPlanner-ceca3901.js} +2 -2
  3. package/build/cjs/{DoorPlanner-131c0708.js → DoorPlanner-a0385fd8.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-f91cdb0e.js → Host3DSignalR-7fab26d7.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-6d856e18.js → LiviqueWWSHandler-62f9e3c6.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-41460264.js → PfisterWWSHandler-7977e1d8.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-3f4293de.js → PlannerHandler2D-ff44402a.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-10f3f838.js → SeriousBasketHandler-503bc153.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-fa790dd1.js → ShelfPlanner-3fec6ada.js} +39 -22
  10. package/build/cjs/{StandardWWSHandler-61a42ac7.js → StandardWWSHandler-3f920d18.js} +1 -1
  11. package/build/cjs/{index-b9a1cd19.js → index-bc62cd46.js} +469 -319
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-9d231b2a.js → DivaBoxPlanner-48803ce3.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-59cf616a.js → DivaStandardPlanner-ce7927f6.js} +2 -2
  15. package/build/esm/{DoorPlanner-ef05a0cd.js → DoorPlanner-f893f34e.js} +1 -1
  16. package/build/esm/{Host3DSignalR-40c2b0b3.js → Host3DSignalR-b2645aac.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-38af38c3.js → LiviqueWWSHandler-7a582c3d.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-8f9dea5a.js → PfisterWWSHandler-9f3a0b55.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-dfcaf42f.js → PlannerHandler2D-d57ebcdc.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-4ee45772.js → SeriousBasketHandler-19a9ff95.js} +1 -1
  21. package/build/esm/{ShelfPlanner-de28a2ec.js → ShelfPlanner-1e795caa.js} +39 -22
  22. package/build/esm/{StandardWWSHandler-780961d1.js → StandardWWSHandler-454f0faa.js} +1 -1
  23. package/build/esm/{index-8fac2013.js → index-30e0f4dc.js} +469 -319
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  30. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +5 -0
  32. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +4 -0
  34. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
  36. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +4 -0
  38. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
  40. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +5 -0
  44. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -0
  46. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Planner/Rendering/ViewPointHandler.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +5 -0
  49. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +5 -0
  51. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
  52. package/package.json +2 -2
@@ -1676,7 +1676,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
1676
1676
  parent: parent,
1677
1677
  ocd: jsonOPV.OCD,
1678
1678
  quantity: jsonOPV.Quantity ? Number(jsonOPV.Quantity) : 1,
1679
- isDefault: jsonOPV.IsDefault,
1680
1679
  isPIMFlatValue: jsonOPV.PIMFlatValues === 'True',
1681
1680
  isVariantAttribute: jsonOPV.IsVariantAttribute
1682
1681
  };
@@ -1933,6 +1932,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
1933
1932
  get: function get() {
1934
1933
  return this.opv.subArticleTypeNr;
1935
1934
  }
1935
+ }, {
1936
+ key: "addToMeasure",
1937
+ get: function get() {
1938
+ return this.opv.catalogOPV.addToMeasure;
1939
+ }
1936
1940
  }, {
1937
1941
  key: "hideSubarticleDescription",
1938
1942
  get: function get() {
@@ -16094,6 +16098,15 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16094
16098
  case 'SET_BY_RULE':
16095
16099
  this.opv.setByRule = prop.Value;
16096
16100
  break;
16101
+ case 'ADD_TO_MEASURE':
16102
+ this.opv.addToMeasure = prop.Value.split(';').map(function (v) {
16103
+ return {
16104
+ op: v.split(':')[0],
16105
+ value: Number(v.split(':')[1]),
16106
+ opt: 'OPT' + v.split(':')[2]
16107
+ };
16108
+ });
16109
+ break;
16097
16110
  default:
16098
16111
  if (key.includes('__')) break;
16099
16112
  var values_locales = [];
@@ -16389,6 +16402,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16389
16402
  get: function get() {
16390
16403
  return this.opv.customDimension;
16391
16404
  }
16405
+ }, {
16406
+ key: "addToMeasure",
16407
+ get: function get() {
16408
+ return this.opv.addToMeasure;
16409
+ }
16392
16410
  }]);
16393
16411
  }();
16394
16412
 
@@ -17986,10 +18004,10 @@ var OptionCatalogData = /*#__PURE__*/function () {
17986
18004
  case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
17987
18005
  this.opt.onlyVisibleIfNotDocked = prop.Value;
17988
18006
  break;
17989
- case 'ONLY_VIDSIBLE_IF_CONFIG_SINGLE':
18007
+ case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
17990
18008
  this.opt.onlyVisibleIfConfigSingle = prop.Value;
17991
18009
  break;
17992
- case 'ONLY_VIDSIBLE_IF_CONFIG_ALL':
18010
+ case 'ONLY_VISIBLE_IF_CONFIG_ALL':
17993
18011
  this.opt.onlyVisibleIfConfigAll = prop.Value;
17994
18012
  break;
17995
18013
  case 'ISDEFAULTVALUEFOROPTIONS':
@@ -20642,6 +20660,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20642
20660
  var _this$val$customDimen, _this$val24;
20643
20661
  return this.val && ((_this$val$customDimen = (_this$val24 = this.val) === null || _this$val24 === void 0 ? void 0 : _this$val24.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
20644
20662
  }
20663
+ }, {
20664
+ key: "addToMeasure",
20665
+ get: function get() {
20666
+ var _this$val25;
20667
+ return (_this$val25 = this.val) === null || _this$val25 === void 0 ? void 0 : _this$val25.addToMeasure;
20668
+ }
20645
20669
  }, {
20646
20670
  key: "showWarningForRequiresUserInput",
20647
20671
  get: function get() {
@@ -22219,6 +22243,16 @@ var DivaArticle = /*#__PURE__*/function () {
22219
22243
  }
22220
22244
  return true;
22221
22245
  }
22246
+ }, {
22247
+ key: "optionStatesWithAddToMeasure",
22248
+ value: function optionStatesWithAddToMeasure(opt) {
22249
+ return Object.values(this.articleOptionStates).filter(function (ops) {
22250
+ var _ops$addToMeasure, _ops$addToMeasure2;
22251
+ return ((_ops$addToMeasure = ops.addToMeasure) === null || _ops$addToMeasure === void 0 ? void 0 : _ops$addToMeasure.find(function (o) {
22252
+ return o.opt == opt;
22253
+ })) || ops.optionCodex == opt && ((_ops$addToMeasure2 = ops.addToMeasure) === null || _ops$addToMeasure2 === void 0 ? void 0 : _ops$addToMeasure2.length);
22254
+ });
22255
+ }
22222
22256
  }, {
22223
22257
  key: "requiredUserInputOptions",
22224
22258
  get: function get() {
@@ -22954,6 +22988,7 @@ var DivaArticle = /*#__PURE__*/function () {
22954
22988
  }
22955
22989
  this.updateIDMSpecificFeature(myArtOPS);
22956
22990
  }
22991
+ this.updateOptionsWithAddToMeasure(OP);
22957
22992
  }
22958
22993
  }, {
22959
22994
  key: "updateIDMSpecificFeature",
@@ -23109,6 +23144,61 @@ var DivaArticle = /*#__PURE__*/function () {
23109
23144
  return myDesc;
23110
23145
  }
23111
23146
  }
23147
+ }, {
23148
+ key: "updateOptionsWithAddToMeasure",
23149
+ value: function updateOptionsWithAddToMeasure(optionCodex) {
23150
+ var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
23151
+ var result = undefined;
23152
+ var optionsUsedFreetext = {};
23153
+ for (var i = 0; i < opsWithAddToMeasure.length; i++) {
23154
+ var _result2;
23155
+ var addToMeasureOps = opsWithAddToMeasure[i];
23156
+ for (var j = 0; j < addToMeasureOps.addToMeasure.length; j++) {
23157
+ var _Number, _this$getArticleOptio4;
23158
+ var addToMeasure = addToMeasureOps.addToMeasure[j];
23159
+ var value = optionsUsedFreetext[addToMeasure.opt] ? 0 : (_Number = Number((_this$getArticleOptio4 = this.getArticleOptionState(addToMeasure.opt)) === null || _this$getArticleOptio4 === void 0 ? void 0 : _this$getArticleOptio4.freeText)) !== null && _Number !== void 0 ? _Number : 0;
23160
+ optionsUsedFreetext[addToMeasure.opt] = true;
23161
+ if (!addToMeasureOps.val) continue;
23162
+ if (isNaN(value)) {
23163
+ result = undefined;
23164
+ break;
23165
+ } else {
23166
+ var _result;
23167
+ result = this.calculateMeasure(addToMeasure, ((_result = result) !== null && _result !== void 0 ? _result : 0) + value);
23168
+ }
23169
+ }
23170
+ this.setOP(addToMeasureOps.optionCodex, addToMeasureOps.val, (_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.toString());
23171
+ }
23172
+ }
23173
+ }, {
23174
+ key: "calcAddToMeasure",
23175
+ value: function calcAddToMeasure(optionCodex, value) {
23176
+ var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
23177
+ for (var j = 0; j < opsWithAddToMeasure.length; j++) {
23178
+ for (var i = 0; i < opsWithAddToMeasure[j].addToMeasure.length; i++) {
23179
+ var measure = opsWithAddToMeasure[j].addToMeasure[i];
23180
+ if (measure.opt != optionCodex) continue;
23181
+ value = this.calculateMeasure(measure, value);
23182
+ }
23183
+ }
23184
+ return value;
23185
+ }
23186
+ }, {
23187
+ key: "calculateMeasure",
23188
+ value: function calculateMeasure(measure, value) {
23189
+ switch (measure.op) {
23190
+ case '+':
23191
+ return Math.round(value + measure.value);
23192
+ case '-':
23193
+ return Math.round(value - measure.value);
23194
+ case '*':
23195
+ return Math.round(value * measure.value);
23196
+ case '/':
23197
+ return Math.round(value / measure.value);
23198
+ }
23199
+ LOG$d.error(new Error('operator ' + measure.op + ' not implemented'));
23200
+ return value;
23201
+ }
23112
23202
  }, {
23113
23203
  key: "clearOP",
23114
23204
  value: function clearOP(optionCodex) {
@@ -23999,7 +24089,7 @@ var DivaArticle = /*#__PURE__*/function () {
23999
24089
  break;
24000
24090
  }
24001
24091
  _context.next = 4;
24002
- return import('./ShelfPlanner-de28a2ec.js');
24092
+ return import('./ShelfPlanner-1e795caa.js');
24003
24093
  case 4:
24004
24094
  _yield$import = _context.sent;
24005
24095
  ShelfPlanner = _yield$import["default"];
@@ -24130,6 +24220,9 @@ var DivaArticle = /*#__PURE__*/function () {
24130
24220
  }
24131
24221
  if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
24132
24222
  var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
24223
+ var newFreeTextMeasure = this.calcAddToMeasure(OP, freeTextMeasure);
24224
+ LOG$d.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, myArtOPS.addToMeasure);
24225
+ freeTextMeasure = newFreeTextMeasure;
24133
24226
  if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
24134
24227
  if (calcUnitPrice != 0) {
24135
24228
  var quantity = 0;
@@ -24443,6 +24536,13 @@ var DivaArticle = /*#__PURE__*/function () {
24443
24536
  }
24444
24537
  }
24445
24538
  }
24539
+ //for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
24540
+ if (_ops8) {
24541
+ var _ops8$valCodex;
24542
+ if ((_ops8$valCodex = _ops8.valCodex) !== null && _ops8$valCodex !== void 0 && _ops8$valCodex.startsWith('OPVSUB_') && !validValues[_key4 + '.' + _key4] && this.getArticleOptionState(_key4 + '.' + _key4)) {
24543
+ validValues[_key4 + '.' + _key4] = myValues[_key4];
24544
+ }
24545
+ }
24446
24546
  }
24447
24547
  return validValues;
24448
24548
  }
@@ -24643,8 +24743,9 @@ var DivaArticle = /*#__PURE__*/function () {
24643
24743
  }, {
24644
24744
  key: "addOptionStateFromArticleToPlannerData",
24645
24745
  value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
24646
- for (var key in this.articleOptionStates) {
24647
- this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
24746
+ var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
24747
+ for (var key in articleOptions) {
24748
+ this.addOptionStateToPlannerData(ret, articleOptions[key], alternateRenderInfo);
24648
24749
  }
24649
24750
  for (var _key5 in this.article.partlistArticles) {
24650
24751
  var partlistArticle = this.article.partlistArticles[_key5];
@@ -24956,7 +25057,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24956
25057
  value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
24957
25058
  function () {
24958
25059
  var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
24959
- var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId, _set$actions;
25060
+ var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
24960
25061
  return _regeneratorRuntime.wrap(function _callee$(_context) {
24961
25062
  while (1) switch (_context.prev = _context.next) {
24962
25063
  case 0:
@@ -24980,12 +25081,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24980
25081
  articleCodex: articleCodex
24981
25082
  }
24982
25083
  }));
24983
- (_set$actions = set.actions) === null || _set$actions === void 0 || _set$actions.openModal({
24984
- accept: true,
24985
- title: set.i18n.t('modals.error_accured')
24986
- });
24987
- return _context.abrupt("return", false);
24988
- case 13:
25084
+ throw new Error('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!');
25085
+ case 12:
24989
25086
  case "end":
24990
25087
  return _context.stop();
24991
25088
  }
@@ -28684,7 +28781,7 @@ var DivaSet = /*#__PURE__*/function () {
28684
28781
  break;
28685
28782
  }
28686
28783
  _context5.next = 3;
28687
- return import('./DoorPlanner-ef05a0cd.js');
28784
+ return import('./DoorPlanner-f893f34e.js');
28688
28785
  case 3:
28689
28786
  _yield$import = _context5.sent;
28690
28787
  DoorPlanner = _yield$import["default"];
@@ -30595,10 +30692,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
30595
30692
  //hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
30596
30693
  var optionsStates = optionStatesOfArticles[basketId];
30597
30694
  for (var optionCodex in optionsStates) {
30695
+ var _ops$addToMeasure;
30598
30696
  var ops = optionsStates[optionCodex];
30599
30697
  var selectionmode = ops.selectionmode;
30600
30698
  if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
30601
- if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && ops.visibleCount > 0) {
30699
+ if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && !((_ops$addToMeasure = ops.addToMeasure) !== null && _ops$addToMeasure !== void 0 && _ops$addToMeasure.length) && ops.visibleCount > 0) {
30602
30700
  this.addOptionsStateToConfigTree(set, set.configTree, articles, basketId, ops, optionCodex, selectionmode, addToTabGroup);
30603
30701
  }
30604
30702
  }
@@ -31282,10 +31380,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
31282
31380
  //hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
31283
31381
  var optionsStates = optionStatesOfArticles[iKey];
31284
31382
  for (var jKey in optionsStates) {
31383
+ var _ops$addToMeasure2;
31285
31384
  var ops = optionsStates[jKey];
31286
31385
  var selectionmode = ops.selectionmode;
31287
31386
  if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
31288
- if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0) {
31387
+ if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
31289
31388
  this.addOptionsStateToConfigTree(set, configTree, articles, iKey, ops, jKey, selectionmode);
31290
31389
  }
31291
31390
  }
@@ -35476,7 +35575,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35476
35575
  break;
35477
35576
  case 3:
35478
35577
  _context12.next = 5;
35479
- return import('./PfisterWWSHandler-8f9dea5a.js');
35578
+ return import('./PfisterWWSHandler-9f3a0b55.js');
35480
35579
  case 5:
35481
35580
  _yield$import = _context12.sent;
35482
35581
  PfisterWWSHandler = _yield$import["default"];
@@ -35484,7 +35583,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35484
35583
  return _context12.abrupt("break", 27);
35485
35584
  case 9:
35486
35585
  _context12.next = 11;
35487
- return import('./LiviqueWWSHandler-38af38c3.js');
35586
+ return import('./LiviqueWWSHandler-7a582c3d.js');
35488
35587
  case 11:
35489
35588
  _yield$import2 = _context12.sent;
35490
35589
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35492,7 +35591,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35492
35591
  return _context12.abrupt("break", 27);
35493
35592
  case 15:
35494
35593
  _context12.next = 17;
35495
- return import('./SeriousBasketHandler-4ee45772.js');
35594
+ return import('./SeriousBasketHandler-19a9ff95.js');
35496
35595
  case 17:
35497
35596
  _yield$import3 = _context12.sent;
35498
35597
  SeriousWWSHandler = _yield$import3["default"];
@@ -35500,7 +35599,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35500
35599
  return _context12.abrupt("break", 27);
35501
35600
  case 21:
35502
35601
  _context12.next = 23;
35503
- return import('./StandardWWSHandler-780961d1.js');
35602
+ return import('./StandardWWSHandler-454f0faa.js');
35504
35603
  case 23:
35505
35604
  _yield$import4 = _context12.sent;
35506
35605
  StandardWWSHandler = _yield$import4["default"];
@@ -35839,6 +35938,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
35839
35938
  key: "initRoomList",
35840
35939
  value: function initRoomList(roomlist, defaultBackgroundWidth, defaultBackgroundHeight) {
35841
35940
  this.roomListInfo = [];
35941
+ if (!roomlist) return;
35842
35942
  var roomListObj = JSON.parse(roomlist);
35843
35943
  var roomIsSel = true;
35844
35944
  for (var roomCodex in roomListObj) {
@@ -36921,7 +37021,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36921
37021
  while (1) switch (_context3.prev = _context3.next) {
36922
37022
  case 0:
36923
37023
  _context3.next = 2;
36924
- return import('./Host3DSignalR-40c2b0b3.js');
37024
+ return import('./Host3DSignalR-b2645aac.js');
36925
37025
  case 2:
36926
37026
  _yield$import = _context3.sent;
36927
37027
  Host3DSignalR = _yield$import["default"];
@@ -38475,7 +38575,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38475
38575
  break;
38476
38576
  case 8:
38477
38577
  _context4.next = 10;
38478
- return import('./DivaStandardPlanner-59cf616a.js');
38578
+ return import('./DivaStandardPlanner-ce7927f6.js');
38479
38579
  case 10:
38480
38580
  _yield$import = _context4.sent;
38481
38581
  DivaStandardPlanner = _yield$import["default"];
@@ -38486,7 +38586,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38486
38586
  return _context4.abrupt("break", 21);
38487
38587
  case 15:
38488
38588
  _context4.next = 17;
38489
- return import('./DivaBoxPlanner-9d231b2a.js');
38589
+ return import('./DivaBoxPlanner-48803ce3.js');
38490
38590
  case 17:
38491
38591
  _yield$import2 = _context4.sent;
38492
38592
  DivaBoxPlanner = _yield$import2["default"];
@@ -40240,7 +40340,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40240
40340
  key: "initialize",
40241
40341
  value: function () {
40242
40342
  var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
40243
- var viewReadyPromise, loadSuccessful, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
40343
+ var viewReadyPromise, loadSuccessful;
40244
40344
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
40245
40345
  while (1) switch (_context14.prev = _context14.next) {
40246
40346
  case 0:
@@ -40269,59 +40369,97 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40269
40369
  DivaUtils.businessMetrics.setConfiguratorSessionId();
40270
40370
  }
40271
40371
  if (!loadSuccessful) {
40272
- _context14.next = 56;
40372
+ _context14.next = 27;
40273
40373
  break;
40274
40374
  }
40375
+ _context14.prev = 15;
40376
+ _context14.next = 18;
40377
+ return this.initializeSets(loadSuccessful, viewReadyPromise);
40378
+ case 18:
40379
+ return _context14.abrupt("return", _context14.sent);
40380
+ case 21:
40381
+ _context14.prev = 21;
40382
+ _context14.t0 = _context14["catch"](15);
40383
+ this.onInitializationError();
40384
+ return _context14.abrupt("return", false);
40385
+ case 25:
40386
+ _context14.next = 30;
40387
+ break;
40388
+ case 27:
40389
+ this.onInitializationError();
40390
+ //fehler beim laden vom basket..
40391
+ LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
40392
+ return _context14.abrupt("return", false);
40393
+ case 30:
40394
+ case "end":
40395
+ return _context14.stop();
40396
+ }
40397
+ }, _callee14, this, [[15, 21]]);
40398
+ }));
40399
+ function initialize() {
40400
+ return _initialize.apply(this, arguments);
40401
+ }
40402
+ return initialize;
40403
+ }()
40404
+ }, {
40405
+ key: "initializeSets",
40406
+ value: function () {
40407
+ var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(loadSuccessful, viewReadyPromise) {
40408
+ var _this$actions16, _set$getDivaArticles;
40409
+ var _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
40410
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
40411
+ while (1) switch (_context15.prev = _context15.next) {
40412
+ case 0:
40275
40413
  if (!(typeof loadSuccessful != 'boolean')) {
40276
- _context14.next = 24;
40414
+ _context15.next = 9;
40277
40415
  break;
40278
40416
  }
40279
40417
  if (!(loadSuccessful.type == 'ProductList')) {
40280
- _context14.next = 24;
40418
+ _context15.next = 9;
40281
40419
  break;
40282
40420
  }
40283
- _context14.next = 19;
40421
+ _context15.next = 4;
40284
40422
  return viewReadyPromise;
40285
- case 19:
40286
- _context14.next = 21;
40423
+ case 4:
40424
+ _context15.next = 6;
40287
40425
  return this.initView();
40288
- case 21:
40426
+ case 6:
40289
40427
  this.subscribeToWebPlannerEvents();
40290
40428
  (_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);
40291
- return _context14.abrupt("return", true);
40292
- case 24:
40429
+ return _context15.abrupt("return", true);
40430
+ case 9:
40293
40431
  this.divaNr = this.divaBasketHandler.actDivaNr;
40294
40432
  initSetState = this.getInitStateForSet();
40295
40433
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
40296
- _context14.next = 29;
40434
+ _context15.next = 14;
40297
40435
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
40298
- case 29:
40436
+ case 14:
40299
40437
  set = this.actSet();
40300
40438
  oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
40301
40439
  if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
40302
- _context14.next = 38;
40440
+ _context15.next = 23;
40303
40441
  break;
40304
40442
  }
40305
- _context14.next = 34;
40443
+ _context15.next = 19;
40306
40444
  return this.divaBasketHandler.getProduct(this.api, oldProductId);
40307
- case 34:
40308
- result = _context14.sent;
40445
+ case 19:
40446
+ result = _context15.sent;
40309
40447
  if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
40310
- _context14.next = 39;
40448
+ _context15.next = 24;
40311
40449
  break;
40312
- case 38:
40450
+ case 23:
40313
40451
  if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
40314
40452
  if (loadSuccessful.type != 'ProductList') {
40315
40453
  productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
40316
40454
  }
40317
40455
  }
40318
- case 39:
40319
- _context14.next = 41;
40456
+ case 24:
40457
+ _context15.next = 26;
40320
40458
  return viewReadyPromise;
40321
- case 41:
40322
- _context14.next = 43;
40459
+ case 26:
40460
+ _context15.next = 28;
40323
40461
  return this.initView();
40324
- case 43:
40462
+ case 28:
40325
40463
  (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
40326
40464
  type: 'onConfiguratorReady'
40327
40465
  });
@@ -40331,7 +40469,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40331
40469
  });
40332
40470
  }
40333
40471
  this.subscribeToWebPlannerEvents();
40334
- this.divaBasketHandler.actBasket;
40335
40472
  catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
40336
40473
  initializationId = undefined;
40337
40474
  if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
@@ -40356,25 +40493,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40356
40493
  initializationType: this.divaBasketHandler.initializationTypeGetter,
40357
40494
  initializationId: initializationId
40358
40495
  }, false);
40359
- _context14.next = 53;
40496
+ _context15.next = 37;
40360
40497
  return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
40361
- case 53:
40362
- return _context14.abrupt("return", true);
40363
- case 56:
40364
- this.onInitializationError();
40365
- //fehler beim laden vom basket..
40366
- LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
40367
- return _context14.abrupt("return", false);
40368
- case 59:
40498
+ case 37:
40499
+ return _context15.abrupt("return", true);
40500
+ case 38:
40369
40501
  case "end":
40370
- return _context14.stop();
40502
+ return _context15.stop();
40371
40503
  }
40372
- }, _callee14, this);
40504
+ }, _callee15, this);
40373
40505
  }));
40374
- function initialize() {
40375
- return _initialize.apply(this, arguments);
40506
+ function initializeSets(_x53, _x54) {
40507
+ return _initializeSets.apply(this, arguments);
40376
40508
  }
40377
- return initialize;
40509
+ return initializeSets;
40378
40510
  }()
40379
40511
  }, {
40380
40512
  key: "updatePlannerConfig",
@@ -40433,11 +40565,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40433
40565
  var _this$plannerConfig$a3;
40434
40566
  if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
40435
40567
  var _this$plannerConfig$a2, _this$i18n$t, _this$i18n4, _onErrorHandling$erro;
40568
+ var isWeb = this.api.getApplicationEnvironment() == 'WEB';
40436
40569
  (_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
40437
40570
  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.',
40438
40571
  accept: true,
40439
40572
  callback: function callback(accepted) {
40440
- if (accepted && _this2.api.getApplicationEnvironment() == 'WEB') {
40573
+ if (accepted && isWeb) {
40441
40574
  var _this2$state;
40442
40575
  _this2.callEvent('onWebPlanerClose');
40443
40576
  ((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
@@ -40464,7 +40597,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40464
40597
  var _this$plannerConfig$a6, _this$i18n7, _this$plannerConfig$a7, _this$plannerConfig$c;
40465
40598
  (_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openModal({
40466
40599
  accept: true,
40467
- title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured')
40600
+ title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured33')
40468
40601
  });
40469
40602
  (_this$plannerConfig$a7 = this.plannerConfig.actions) === null || _this$plannerConfig$a7 === void 0 || _this$plannerConfig$a7.openComponent({
40470
40603
  type: 'SELLER',
@@ -40501,23 +40634,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40501
40634
  }, {
40502
40635
  key: "initView",
40503
40636
  value: (function () {
40504
- var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
40637
+ var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
40505
40638
  var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
40506
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
40507
- while (1) switch (_context15.prev = _context15.next) {
40639
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40640
+ while (1) switch (_context16.prev = _context16.next) {
40508
40641
  case 0:
40509
40642
  set = this.actSet();
40510
40643
  plannerMode = this.getPlannerMode();
40511
40644
  this.initConfiguratorMode(plannerMode);
40512
40645
  if (!(plannerMode == 'ProductList')) {
40513
- _context15.next = 7;
40646
+ _context16.next = 7;
40514
40647
  break;
40515
40648
  }
40516
40649
  (_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
40517
- _context15.next = 17;
40650
+ _context16.next = 17;
40518
40651
  break;
40519
40652
  case 7:
40520
- _context15.next = 9;
40653
+ _context16.next = 9;
40521
40654
  return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
40522
40655
  case 9:
40523
40656
  //first load the Configuratorstructure STARTCONFIG
@@ -40531,13 +40664,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40531
40664
  this.onBasketInitialized();
40532
40665
  this.checkMatchingProducts('onInit');
40533
40666
  case 17:
40534
- _context15.next = 19;
40667
+ _context16.next = 19;
40535
40668
  return this.runInitMode(plannerMode);
40536
40669
  case 19:
40537
40670
  case "end":
40538
- return _context15.stop();
40671
+ return _context16.stop();
40539
40672
  }
40540
- }, _callee15, this);
40673
+ }, _callee16, this);
40541
40674
  }));
40542
40675
  function initView() {
40543
40676
  return _initView.apply(this, arguments);
@@ -40558,26 +40691,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40558
40691
  }, {
40559
40692
  key: "runInitMode",
40560
40693
  value: function () {
40561
- var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
40694
+ var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(plannerMode) {
40562
40695
  var _this$state3;
40563
40696
  var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40564
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40565
- while (1) switch (_context16.prev = _context16.next) {
40697
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
40698
+ while (1) switch (_context17.prev = _context17.next) {
40566
40699
  case 0:
40567
40700
  doDefault = true;
40568
40701
  if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
40569
- _context16.next = 10;
40702
+ _context17.next = 10;
40570
40703
  break;
40571
40704
  }
40572
40705
  if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
40573
40706
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
40574
40707
  (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
40575
40708
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
40576
- _context16.next = 7;
40709
+ _context17.next = 7;
40577
40710
  return this.saveToBasketWrapper();
40578
40711
  case 7:
40579
40712
  doDefault = false;
40580
- _context16.next = 11;
40713
+ _context17.next = 11;
40581
40714
  break;
40582
40715
  case 10:
40583
40716
  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) {
@@ -40601,11 +40734,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40601
40734
  }
40602
40735
  case 12:
40603
40736
  case "end":
40604
- return _context16.stop();
40737
+ return _context17.stop();
40605
40738
  }
40606
- }, _callee16, this);
40739
+ }, _callee17, this);
40607
40740
  }));
40608
- function runInitMode(_x53) {
40741
+ function runInitMode(_x55) {
40609
40742
  return _runInitMode.apply(this, arguments);
40610
40743
  }
40611
40744
  return runInitMode;
@@ -40613,16 +40746,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40613
40746
  }, {
40614
40747
  key: "addSetToActPlanningByDivaNr",
40615
40748
  value: function () {
40616
- var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(divaNr) {
40749
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(divaNr) {
40617
40750
  var _this$updateViewPlann10;
40618
40751
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
40619
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
40620
- while (1) switch (_context17.prev = _context17.next) {
40752
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
40753
+ while (1) switch (_context18.prev = _context18.next) {
40621
40754
  case 0:
40622
40755
  set = this.actSet();
40623
40756
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
40624
40757
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
40625
- _context17.next = 5;
40758
+ _context18.next = 5;
40626
40759
  return this.divaBasketHandler.initializeBasket(this.api);
40627
40760
  case 5:
40628
40761
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -40630,30 +40763,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40630
40763
  i = 0;
40631
40764
  case 8:
40632
40765
  if (!(i < orderSets.length)) {
40633
- _context17.next = 24;
40766
+ _context18.next = 24;
40634
40767
  break;
40635
40768
  }
40636
40769
  orderset = orderSets[i];
40637
40770
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
40638
40771
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
40639
40772
  if (!loadedSet) {
40640
- _context17.next = 18;
40773
+ _context18.next = 18;
40641
40774
  break;
40642
40775
  }
40643
- _context17.next = 15;
40776
+ _context18.next = 15;
40644
40777
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
40645
40778
  case 15:
40646
40779
  this.checkMatchingProducts('onAdd');
40647
- _context17.next = 20;
40780
+ _context18.next = 20;
40648
40781
  break;
40649
40782
  case 18:
40650
- _context17.next = 20;
40783
+ _context18.next = 20;
40651
40784
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
40652
40785
  case 20:
40653
40786
  this.cleanUpEmptySets(true);
40654
40787
  case 21:
40655
40788
  i++;
40656
- _context17.next = 8;
40789
+ _context18.next = 8;
40657
40790
  break;
40658
40791
  case 24:
40659
40792
  this.divaBasketHandler.actBasket.OrderSets = [];
@@ -40665,11 +40798,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40665
40798
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
40666
40799
  case 31:
40667
40800
  case "end":
40668
- return _context17.stop();
40801
+ return _context18.stop();
40669
40802
  }
40670
- }, _callee17, this);
40803
+ }, _callee18, this);
40671
40804
  }));
40672
- function addSetToActPlanningByDivaNr(_x54) {
40805
+ function addSetToActPlanningByDivaNr(_x56) {
40673
40806
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
40674
40807
  }
40675
40808
  return addSetToActPlanningByDivaNr;
@@ -40702,28 +40835,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40702
40835
  }, {
40703
40836
  key: "setActSetCurConfigStepKey",
40704
40837
  value: function () {
40705
- var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(curConfigStepKey) {
40838
+ var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(curConfigStepKey) {
40706
40839
  var set;
40707
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
40708
- while (1) switch (_context18.prev = _context18.next) {
40840
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
40841
+ while (1) switch (_context19.prev = _context19.next) {
40709
40842
  case 0:
40710
40843
  set = this.actSet();
40711
40844
  if (set) {
40712
- _context18.next = 3;
40845
+ _context19.next = 3;
40713
40846
  break;
40714
40847
  }
40715
- return _context18.abrupt("return");
40848
+ return _context19.abrupt("return");
40716
40849
  case 3:
40717
40850
  set.ActConfigStepKey = curConfigStepKey;
40718
- _context18.next = 6;
40851
+ _context19.next = 6;
40719
40852
  return setHandlerInstance.updateNavigation(set);
40720
40853
  case 6:
40721
40854
  case "end":
40722
- return _context18.stop();
40855
+ return _context19.stop();
40723
40856
  }
40724
- }, _callee18, this);
40857
+ }, _callee19, this);
40725
40858
  }));
40726
- function setActSetCurConfigStepKey(_x55) {
40859
+ function setActSetCurConfigStepKey(_x57) {
40727
40860
  return _setActSetCurConfigStepKey.apply(this, arguments);
40728
40861
  }
40729
40862
  return setActSetCurConfigStepKey;
@@ -40872,17 +41005,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40872
41005
  }, {
40873
41006
  key: "deletePlannerElement",
40874
41007
  value: function () {
40875
- var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, denyElementSelectionClear) {
41008
+ var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, denyElementSelectionClear) {
40876
41009
  var _this$updateViewPlann11;
40877
41010
  var set, result, _this$updateElementSe5, _this$updateElementSe6;
40878
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
40879
- while (1) switch (_context19.prev = _context19.next) {
41011
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
41012
+ while (1) switch (_context20.prev = _context20.next) {
40880
41013
  case 0:
40881
41014
  set = this.sets[setId];
40882
- _context19.next = 3;
41015
+ _context20.next = 3;
40883
41016
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
40884
41017
  case 3:
40885
- result = _context19.sent;
41018
+ result = _context20.sent;
40886
41019
  this.updateConfigStructure();
40887
41020
  (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
40888
41021
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
@@ -40893,17 +41026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40893
41026
  }
40894
41027
  this.updatePriceInView();
40895
41028
  this.checkMatchingProducts('onDelete');
40896
- _context19.next = 14;
41029
+ _context20.next = 14;
40897
41030
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
40898
41031
  case 14:
40899
41032
  this.plannerChangeLog('onDeletePlanner');
40900
41033
  case 15:
40901
41034
  case "end":
40902
- return _context19.stop();
41035
+ return _context20.stop();
40903
41036
  }
40904
- }, _callee19, this);
41037
+ }, _callee20, this);
40905
41038
  }));
40906
- function deletePlannerElement(_x56, _x57, _x58) {
41039
+ function deletePlannerElement(_x58, _x59, _x60) {
40907
41040
  return _deletePlannerElement.apply(this, arguments);
40908
41041
  }
40909
41042
  return deletePlannerElement;
@@ -40917,17 +41050,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40917
41050
  }, {
40918
41051
  key: "copyPlannerElement",
40919
41052
  value: (function () {
40920
- var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, curConfigKey, copyInfo) {
41053
+ var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
40921
41054
  var _this$updateViewPlann12;
40922
41055
  var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
40923
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
40924
- while (1) switch (_context20.prev = _context20.next) {
41056
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
41057
+ while (1) switch (_context21.prev = _context21.next) {
40925
41058
  case 0:
40926
41059
  set = this.sets[setId];
40927
- _context20.next = 3;
41060
+ _context21.next = 3;
40928
41061
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
40929
41062
  case 3:
40930
- newSelectedArticle = _context20.sent;
41063
+ newSelectedArticle = _context21.sent;
40931
41064
  this.updateConfigStructure();
40932
41065
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
40933
41066
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
@@ -40941,14 +41074,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40941
41074
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
40942
41075
  }
40943
41076
  this.checkMatchingProducts('onCopy');
40944
- return _context20.abrupt("return", newConfigStepKey);
41077
+ return _context21.abrupt("return", newConfigStepKey);
40945
41078
  case 13:
40946
41079
  case "end":
40947
- return _context20.stop();
41080
+ return _context21.stop();
40948
41081
  }
40949
- }, _callee20, this);
41082
+ }, _callee21, this);
40950
41083
  }));
40951
- function copyPlannerElement(_x59, _x60, _x61, _x62) {
41084
+ function copyPlannerElement(_x61, _x62, _x63, _x64) {
40952
41085
  return _copyPlannerElement.apply(this, arguments);
40953
41086
  }
40954
41087
  return copyPlannerElement;
@@ -40977,33 +41110,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40977
41110
  }, {
40978
41111
  key: "getFreePlacesOnGrids",
40979
41112
  value: function () {
40980
- var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(gridGroup, from) {
41113
+ var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(gridGroup, from) {
40981
41114
  var _this$updateFreePlace;
40982
41115
  var set, freeShelfGrids, plannedShelfGrids;
40983
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
40984
- while (1) switch (_context21.prev = _context21.next) {
41116
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
41117
+ while (1) switch (_context22.prev = _context22.next) {
40985
41118
  case 0:
40986
41119
  set = this.actSet();
40987
41120
  if (set) {
40988
- _context21.next = 3;
41121
+ _context22.next = 3;
40989
41122
  break;
40990
41123
  }
40991
41124
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
40992
41125
  case 3:
40993
41126
  if (!gridGroup) {
40994
- _context21.next = 9;
41127
+ _context22.next = 9;
40995
41128
  break;
40996
41129
  }
40997
- _context21.next = 6;
41130
+ _context22.next = 6;
40998
41131
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
40999
41132
  case 6:
41000
- _context21.t0 = _context21.sent;
41001
- _context21.next = 10;
41133
+ _context22.t0 = _context22.sent;
41134
+ _context22.next = 10;
41002
41135
  break;
41003
41136
  case 9:
41004
- _context21.t0 = undefined;
41137
+ _context22.t0 = undefined;
41005
41138
  case 10:
41006
- freeShelfGrids = _context21.t0;
41139
+ freeShelfGrids = _context22.t0;
41007
41140
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
41008
41141
  LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
41009
41142
  LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
@@ -41011,17 +41144,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41011
41144
  freeShelfGrids: freeShelfGrids,
41012
41145
  plannedShelfGrids: plannedShelfGrids
41013
41146
  });
41014
- return _context21.abrupt("return", {
41147
+ return _context22.abrupt("return", {
41015
41148
  freeShelfGrids: freeShelfGrids,
41016
41149
  plannedShelfGrids: plannedShelfGrids
41017
41150
  });
41018
41151
  case 16:
41019
41152
  case "end":
41020
- return _context21.stop();
41153
+ return _context22.stop();
41021
41154
  }
41022
- }, _callee21, this);
41155
+ }, _callee22, this);
41023
41156
  }));
41024
- function getFreePlacesOnGrids(_x63, _x64) {
41157
+ function getFreePlacesOnGrids(_x65, _x66) {
41025
41158
  return _getFreePlacesOnGrids.apply(this, arguments);
41026
41159
  }
41027
41160
  return getFreePlacesOnGrids;
@@ -41038,36 +41171,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41038
41171
  }, {
41039
41172
  key: "moveShelfItemToGrid",
41040
41173
  value: function () {
41041
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(accessoireBasketId, parentBasketId, gridName, cellIndex) {
41174
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(accessoireBasketId, parentBasketId, gridName, cellIndex) {
41042
41175
  var set, newGridId;
41043
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
41044
- while (1) switch (_context22.prev = _context22.next) {
41176
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
41177
+ while (1) switch (_context23.prev = _context23.next) {
41045
41178
  case 0:
41046
41179
  set = this.actSet();
41047
41180
  if (set) {
41048
- _context22.next = 3;
41181
+ _context23.next = 3;
41049
41182
  break;
41050
41183
  }
41051
- return _context22.abrupt("return");
41184
+ return _context23.abrupt("return");
41052
41185
  case 3:
41053
- _context22.next = 5;
41186
+ _context23.next = 5;
41054
41187
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
41055
41188
  case 5:
41056
- newGridId = _context22.sent;
41189
+ newGridId = _context23.sent;
41057
41190
  this.updatePlannerView('MOVE_SHELF_ITEM');
41058
41191
  if (!newGridId) {
41059
- _context22.next = 10;
41192
+ _context23.next = 10;
41060
41193
  break;
41061
41194
  }
41062
- _context22.next = 10;
41195
+ _context23.next = 10;
41063
41196
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
41064
41197
  case 10:
41065
41198
  case "end":
41066
- return _context22.stop();
41199
+ return _context23.stop();
41067
41200
  }
41068
- }, _callee22, this);
41201
+ }, _callee23, this);
41069
41202
  }));
41070
- function moveShelfItemToGrid(_x65, _x66, _x67, _x68) {
41203
+ function moveShelfItemToGrid(_x67, _x68, _x69, _x70) {
41071
41204
  return _moveShelfItemToGrid.apply(this, arguments);
41072
41205
  }
41073
41206
  return moveShelfItemToGrid;
@@ -41075,27 +41208,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41075
41208
  }, {
41076
41209
  key: "resetArticle",
41077
41210
  value: function () {
41078
- var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(basketId) {
41211
+ var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(basketId) {
41079
41212
  var set;
41080
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
41081
- while (1) switch (_context23.prev = _context23.next) {
41213
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
41214
+ while (1) switch (_context24.prev = _context24.next) {
41082
41215
  case 0:
41083
41216
  set = this.actSet();
41084
41217
  if (set) {
41085
- _context23.next = 3;
41218
+ _context24.next = 3;
41086
41219
  break;
41087
41220
  }
41088
- return _context23.abrupt("return");
41221
+ return _context24.abrupt("return");
41089
41222
  case 3:
41090
- _context23.next = 5;
41223
+ _context24.next = 5;
41091
41224
  return setHandlerInstance.resetArticle(set, basketId);
41092
41225
  case 5:
41093
41226
  case "end":
41094
- return _context23.stop();
41227
+ return _context24.stop();
41095
41228
  }
41096
- }, _callee23, this);
41229
+ }, _callee24, this);
41097
41230
  }));
41098
- function resetArticle(_x69) {
41231
+ function resetArticle(_x71) {
41099
41232
  return _resetArticle.apply(this, arguments);
41100
41233
  }
41101
41234
  return resetArticle;
@@ -41125,10 +41258,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41125
41258
  }, {
41126
41259
  key: "checkMatchingProducts",
41127
41260
  value: function () {
41128
- var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(from) {
41261
+ var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(from) {
41129
41262
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
41130
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
41131
- while (1) switch (_context24.prev = _context24.next) {
41263
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
41264
+ while (1) switch (_context25.prev = _context25.next) {
41132
41265
  case 0:
41133
41266
  set = this.actSet();
41134
41267
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -41142,20 +41275,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41142
41275
  }
41143
41276
  }
41144
41277
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
41145
- _context24.next = 6;
41278
+ _context25.next = 6;
41146
41279
  break;
41147
41280
  }
41148
- _context24.next = 5;
41281
+ _context25.next = 5;
41149
41282
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
41150
41283
  case 5:
41151
41284
  this.updatePriceInView();
41152
41285
  case 6:
41153
41286
  case "end":
41154
- return _context24.stop();
41287
+ return _context25.stop();
41155
41288
  }
41156
- }, _callee24, this);
41289
+ }, _callee25, this);
41157
41290
  }));
41158
- function checkMatchingProducts(_x70) {
41291
+ function checkMatchingProducts(_x72) {
41159
41292
  return _checkMatchingProducts.apply(this, arguments);
41160
41293
  }
41161
41294
  return checkMatchingProducts;
@@ -41232,7 +41365,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41232
41365
  }, {
41233
41366
  key: "saveToBasketWrapper",
41234
41367
  value: function () {
41235
- var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
41368
+ var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
41236
41369
  var _this$actions27,
41237
41370
  _this$actions27$toggl,
41238
41371
  _this$actions28,
@@ -41241,8 +41374,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41241
41374
  _this$actions32,
41242
41375
  _this$i18n14;
41243
41376
  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;
41244
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
41245
- while (1) switch (_context25.prev = _context25.next) {
41377
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
41378
+ while (1) switch (_context26.prev = _context26.next) {
41246
41379
  case 0:
41247
41380
  returnTo = this.getReturnTo(event);
41248
41381
  finalEvent = {
@@ -41250,50 +41383,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41250
41383
  saveBasket: true
41251
41384
  };
41252
41385
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
41253
- _context25.next = 21;
41386
+ _context26.next = 21;
41254
41387
  break;
41255
41388
  }
41256
41389
  product = undefined;
41257
41390
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
41258
- _context25.next = 10;
41391
+ _context26.next = 10;
41259
41392
  break;
41260
41393
  }
41261
41394
  url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
41262
- _context25.next = 8;
41395
+ _context26.next = 8;
41263
41396
  return this.api.getDataCache(url, url, undefined, 'catalog');
41264
41397
  case 8:
41265
- _result = _context25.sent;
41398
+ _result = _context26.sent;
41266
41399
  product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
41267
41400
  case 10:
41268
- _context25.next = 12;
41401
+ _context26.next = 12;
41269
41402
  return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
41270
41403
  case 12:
41271
- finalEvent = _context25.sent;
41404
+ finalEvent = _context26.sent;
41272
41405
  if (finalEvent) {
41273
- _context25.next = 17;
41406
+ _context26.next = 17;
41274
41407
  break;
41275
41408
  }
41276
- return _context25.abrupt("return", 'canceled');
41409
+ return _context26.abrupt("return", 'canceled');
41277
41410
  case 17:
41278
41411
  if (!(!finalEvent.saveBasket && finalEvent.event)) {
41279
- _context25.next = 20;
41412
+ _context26.next = 20;
41280
41413
  break;
41281
41414
  }
41282
41415
  (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
41283
41416
  type: finalEvent.event
41284
41417
  });
41285
- return _context25.abrupt("return", 'canceled');
41418
+ return _context26.abrupt("return", 'canceled');
41286
41419
  case 20:
41287
41420
  returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
41288
41421
  case 21:
41289
41422
  (_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);
41290
- _context25.next = 24;
41423
+ _context26.next = 24;
41291
41424
  return this.saveToBasket(finalEvent.event, repairOnly, force);
41292
41425
  case 24:
41293
- result = _context25.sent;
41426
+ result = _context26.sent;
41294
41427
  (_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);
41295
41428
  if (!(result === 'canceled')) {
41296
- _context25.next = 30;
41429
+ _context26.next = 30;
41297
41430
  break;
41298
41431
  }
41299
41432
  LOG$1.error(new DivaError('failed to save Basket'));
@@ -41301,10 +41434,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41301
41434
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
41302
41435
  accept: true
41303
41436
  });
41304
- return _context25.abrupt("return", result);
41437
+ return _context26.abrupt("return", result);
41305
41438
  case 30:
41306
- _context25.t0 = returnTo;
41307
- _context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context25.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
41439
+ _context26.t0 = returnTo;
41440
+ _context26.next = _context26.t0 === 'OPEN_PDF' ? 33 : _context26.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
41308
41441
  break;
41309
41442
  case 33:
41310
41443
  if (!this.getBasket().PDFDocumentURL) {
@@ -41324,7 +41457,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41324
41457
  }
41325
41458
  });
41326
41459
  }
41327
- return _context25.abrupt("break", 36);
41460
+ return _context26.abrupt("break", 36);
41328
41461
  case 35:
41329
41462
  (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
41330
41463
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
@@ -41332,20 +41465,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41332
41465
  });
41333
41466
  case 36:
41334
41467
  if (!(result == 'noArticleToSave')) {
41335
- _context25.next = 39;
41468
+ _context26.next = 39;
41336
41469
  break;
41337
41470
  }
41338
41471
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
41339
- return _context25.abrupt("return", 'canceled');
41472
+ return _context26.abrupt("return", 'canceled');
41340
41473
  case 39:
41341
- return _context25.abrupt("return", result);
41474
+ return _context26.abrupt("return", result);
41342
41475
  case 40:
41343
41476
  case "end":
41344
- return _context25.stop();
41477
+ return _context26.stop();
41345
41478
  }
41346
- }, _callee25, this);
41479
+ }, _callee26, this);
41347
41480
  }));
41348
- function saveToBasketWrapper(_x71, _x72, _x73) {
41481
+ function saveToBasketWrapper(_x73, _x74, _x75) {
41349
41482
  return _saveToBasketWrapper.apply(this, arguments);
41350
41483
  }
41351
41484
  return saveToBasketWrapper;
@@ -41353,43 +41486,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41353
41486
  }, {
41354
41487
  key: "saveToBasket",
41355
41488
  value: function () {
41356
- var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
41489
+ var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
41357
41490
  var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
41358
41491
  var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
41359
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
41360
- while (1) switch (_context26.prev = _context26.next) {
41492
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
41493
+ while (1) switch (_context27.prev = _context27.next) {
41361
41494
  case 0:
41362
41495
  set = this.actSet();
41363
41496
  if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
41364
- _context26.next = 3;
41497
+ _context27.next = 3;
41365
41498
  break;
41366
41499
  }
41367
- return _context26.abrupt("return", 'noArticleToSave');
41500
+ return _context27.abrupt("return", 'noArticleToSave');
41368
41501
  case 3:
41369
41502
  actBasket = this.divaBasketHandler.actBasket;
41370
41503
  returnTo = this.getReturnTo(event);
41371
41504
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
41372
- _context26.next = 13;
41505
+ _context27.next = 13;
41373
41506
  break;
41374
41507
  }
41375
41508
  oldReturnTo = returnTo;
41376
41509
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
41377
- _context26.next = 10;
41510
+ _context27.next = 10;
41378
41511
  return this.handleFavorites('SAVE');
41379
41512
  case 10:
41380
- result = _context26.sent;
41513
+ result = _context27.sent;
41381
41514
  if (result === 'canceled') {
41382
41515
  this.ReturnTo = oldReturnTo;
41383
41516
  }
41384
- return _context26.abrupt("return", result);
41517
+ return _context27.abrupt("return", result);
41385
41518
  case 13:
41386
- _context26.t0 = this.divaBasketHandler;
41387
- _context26.t1 = this.divaBasketHandler.actDivaNr;
41388
- _context26.next = 17;
41519
+ _context27.t0 = this.divaBasketHandler;
41520
+ _context27.t1 = this.divaBasketHandler.actDivaNr;
41521
+ _context27.next = 17;
41389
41522
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
41390
41523
  case 17:
41391
- _context26.t2 = _context26.sent;
41392
- _context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
41524
+ _context27.t2 = _context27.sent;
41525
+ _context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
41393
41526
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
41394
41527
  this.ReturnTo = 'OPEN_SELLER_BASKET';
41395
41528
  returnTo = this.ReturnTo;
@@ -41404,11 +41537,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41404
41537
  this.divaBasketHandler.fillOrigConfigurations();
41405
41538
  actBasket.Updated = Date.now();
41406
41539
  if (!returnTo) {
41407
- _context26.next = 52;
41540
+ _context27.next = 52;
41408
41541
  break;
41409
41542
  }
41410
- _context26.t3 = returnTo;
41411
- _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;
41543
+ _context27.t3 = returnTo;
41544
+ _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;
41412
41545
  break;
41413
41546
  case 28:
41414
41547
  (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
@@ -41422,7 +41555,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41422
41555
  basketData: actBasket
41423
41556
  }
41424
41557
  });
41425
- return _context26.abrupt("break", 52);
41558
+ return _context27.abrupt("break", 52);
41426
41559
  case 31:
41427
41560
  (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
41428
41561
  type: 'SELLER',
@@ -41434,23 +41567,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41434
41567
  basketData: actBasket
41435
41568
  }
41436
41569
  });
41437
- return _context26.abrupt("break", 52);
41570
+ return _context27.abrupt("break", 52);
41438
41571
  case 33:
41439
41572
  if (!(event == 'onSaveProduct')) {
41440
- _context26.next = 43;
41573
+ _context27.next = 43;
41441
41574
  break;
41442
41575
  }
41443
41576
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
41444
41577
  actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
41445
- _context26.next = 37;
41578
+ _context27.next = 37;
41446
41579
  return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
41447
41580
  case 37:
41448
- _context26.next = 39;
41581
+ _context27.next = 39;
41449
41582
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
41450
41583
  case 39:
41451
- newDivaNr = _context26.sent;
41584
+ newDivaNr = _context27.sent;
41452
41585
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
41453
- _context26.next = 51;
41586
+ _context27.next = 51;
41454
41587
  break;
41455
41588
  case 43:
41456
41589
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -41459,32 +41592,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41459
41592
  }
41460
41593
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
41461
41594
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
41462
- _context26.next = 48;
41595
+ _context27.next = 48;
41463
41596
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
41464
41597
  case 48:
41465
- _result2 = _context26.sent;
41598
+ _result2 = _context27.sent;
41466
41599
  if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
41467
- _context26.next = 51;
41600
+ _context27.next = 51;
41468
41601
  break;
41469
41602
  }
41470
- return _context26.abrupt("return", 'canceled');
41603
+ return _context27.abrupt("return", 'canceled');
41471
41604
  case 51:
41472
- return _context26.abrupt("break", 52);
41605
+ return _context27.abrupt("break", 52);
41473
41606
  case 52:
41474
41607
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
41475
41608
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
41476
- _context26.next = 56;
41609
+ _context27.next = 56;
41477
41610
  return this.addToBasket(actBasket, event);
41478
41611
  case 56:
41479
- product = _context26.sent;
41480
- return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41612
+ product = _context27.sent;
41613
+ return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41481
41614
  case 58:
41482
41615
  case "end":
41483
- return _context26.stop();
41616
+ return _context27.stop();
41484
41617
  }
41485
- }, _callee26, this);
41618
+ }, _callee27, this);
41486
41619
  }));
41487
- function saveToBasket(_x74, _x75, _x76) {
41620
+ function saveToBasket(_x76, _x77, _x78) {
41488
41621
  return _saveToBasket.apply(this, arguments);
41489
41622
  }
41490
41623
  return saveToBasket;
@@ -41718,23 +41851,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41718
41851
  }, {
41719
41852
  key: "getBasketDataWithEkText",
41720
41853
  value: function () {
41721
- var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
41722
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
41723
- while (1) switch (_context27.prev = _context27.next) {
41854
+ var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
41855
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
41856
+ while (1) switch (_context28.prev = _context28.next) {
41724
41857
  case 0:
41725
- _context27.t0 = this.divaBasketHandler;
41726
- _context27.t1 = this.divaBasketHandler.actDivaNr;
41727
- _context27.next = 4;
41858
+ _context28.t0 = this.divaBasketHandler;
41859
+ _context28.t1 = this.divaBasketHandler.actDivaNr;
41860
+ _context28.next = 4;
41728
41861
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
41729
41862
  case 4:
41730
- _context27.t2 = _context27.sent;
41731
- _context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
41732
- return _context27.abrupt("return", this.divaBasketHandler.actBasket);
41863
+ _context28.t2 = _context28.sent;
41864
+ _context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
41865
+ return _context28.abrupt("return", this.divaBasketHandler.actBasket);
41733
41866
  case 7:
41734
41867
  case "end":
41735
- return _context27.stop();
41868
+ return _context28.stop();
41736
41869
  }
41737
- }, _callee27, this);
41870
+ }, _callee28, this);
41738
41871
  }));
41739
41872
  function getBasketDataWithEkText() {
41740
41873
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -41760,7 +41893,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41760
41893
  }, {
41761
41894
  key: "addToBasket",
41762
41895
  value: function () {
41763
- var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(actBasket) {
41896
+ var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
41764
41897
  var _this$actions36,
41765
41898
  _this$actions37,
41766
41899
  _this$actions38,
@@ -41780,44 +41913,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41780
41913
  to,
41781
41914
  variants,
41782
41915
  products,
41783
- _args28 = arguments;
41784
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
41785
- while (1) switch (_context28.prev = _context28.next) {
41916
+ _args29 = arguments;
41917
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
41918
+ while (1) switch (_context29.prev = _context29.next) {
41786
41919
  case 0:
41787
- event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
41788
- _context28.t0 = event;
41789
- _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;
41920
+ event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
41921
+ _context29.t0 = event;
41922
+ _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;
41790
41923
  break;
41791
41924
  case 5:
41792
41925
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41793
41926
  type: 'onWebPlanerPrint',
41794
41927
  data: actBasket.getAsJson()
41795
41928
  });
41796
- return _context28.abrupt("break", 35);
41929
+ return _context29.abrupt("break", 35);
41797
41930
  case 7:
41798
41931
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41799
41932
  type: 'onWebPlanerSave',
41800
41933
  data: actBasket.getAsJson()
41801
41934
  });
41802
- return _context28.abrupt("break", 35);
41935
+ return _context29.abrupt("break", 35);
41803
41936
  case 9:
41804
41937
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41805
41938
  type: 'onWebPlanerShare',
41806
41939
  data: actBasket.getAsJson()
41807
41940
  });
41808
- return _context28.abrupt("break", 35);
41941
+ return _context29.abrupt("break", 35);
41809
41942
  case 11:
41810
41943
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41811
41944
  type: 'onRequestConsulation',
41812
41945
  data: actBasket.getAsJson()
41813
41946
  });
41814
- return _context28.abrupt("break", 35);
41947
+ return _context29.abrupt("break", 35);
41815
41948
  case 13:
41816
41949
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41817
41950
  type: 'onSave',
41818
41951
  data: actBasket.getAsJson()
41819
41952
  });
41820
- return _context28.abrupt("break", 35);
41953
+ return _context29.abrupt("break", 35);
41821
41954
  case 15:
41822
41955
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
41823
41956
  this.divaBasketHandler.emailConfig = undefined;
@@ -41852,51 +41985,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41852
41985
  type: 'onAddToBasket',
41853
41986
  data: actBasket.getAsJson()
41854
41987
  });
41855
- return _context28.abrupt("break", 35);
41988
+ return _context29.abrupt("break", 35);
41856
41989
  case 20:
41857
41990
  this.actSet().CatalogData;
41858
- _context28.next = 23;
41991
+ _context29.next = 23;
41859
41992
  return this.api.saveAsProduct(this.sets, actBasket);
41860
41993
  case 23:
41861
- products = _context28.sent;
41994
+ products = _context29.sent;
41862
41995
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
41863
41996
  type: 'onAddToBasket',
41864
41997
  data: actBasket.getAsJson()
41865
41998
  });
41866
41999
  if (!products) {
41867
- _context28.next = 27;
42000
+ _context29.next = 27;
41868
42001
  break;
41869
42002
  }
41870
- return _context28.abrupt("return", products[0]);
42003
+ return _context29.abrupt("return", products[0]);
41871
42004
  case 27:
41872
42005
  case 28:
41873
42006
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
41874
42007
  type: 'onAddToBasket',
41875
42008
  data: actBasket.getAsJson()
41876
42009
  });
41877
- return _context28.abrupt("break", 35);
42010
+ return _context29.abrupt("break", 35);
41878
42011
  case 30:
41879
42012
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
41880
42013
  type: 'onAddToBasket',
41881
42014
  data: actBasket.getAsJson()
41882
42015
  });
41883
42016
  this.openContactForm(this.divaBasketHandler);
41884
- return _context28.abrupt("break", 35);
42017
+ return _context29.abrupt("break", 35);
41885
42018
  case 33:
41886
42019
  (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
41887
42020
  type: event,
41888
42021
  data: actBasket.getAsJson()
41889
42022
  });
41890
- return _context28.abrupt("break", 35);
42023
+ return _context29.abrupt("break", 35);
41891
42024
  case 35:
41892
- return _context28.abrupt("return");
42025
+ return _context29.abrupt("return");
41893
42026
  case 36:
41894
42027
  case "end":
41895
- return _context28.stop();
42028
+ return _context29.stop();
41896
42029
  }
41897
- }, _callee28, this);
42030
+ }, _callee29, this);
41898
42031
  }));
41899
- function addToBasket(_x77) {
42032
+ function addToBasket(_x79) {
41900
42033
  return _addToBasket.apply(this, arguments);
41901
42034
  }
41902
42035
  return addToBasket;
@@ -42171,9 +42304,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42171
42304
  key: "initApiForLogicOnly",
42172
42305
  value: //just for testing purposes
42173
42306
  function () {
42174
- var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42175
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
42176
- while (1) switch (_context29.prev = _context29.next) {
42307
+ var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42308
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
42309
+ while (1) switch (_context30.prev = _context30.next) {
42177
42310
  case 0:
42178
42311
  //empty services
42179
42312
  this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
@@ -42186,17 +42319,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42186
42319
  jwt: jwt,
42187
42320
  apiKey: apiKey
42188
42321
  }), handler);
42189
- _context29.next = 3;
42322
+ _context30.next = 3;
42190
42323
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
42191
42324
  case 3:
42192
42325
  this.plannerHandler = new DivaPlannerHandler(true);
42193
42326
  case 4:
42194
42327
  case "end":
42195
- return _context29.stop();
42328
+ return _context30.stop();
42196
42329
  }
42197
- }, _callee29, this);
42330
+ }, _callee30, this);
42198
42331
  }));
42199
- function initApiForLogicOnly(_x78, _x79, _x80, _x81, _x82, _x83, _x84) {
42332
+ function initApiForLogicOnly(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
42200
42333
  return _initApiForLogicOnly.apply(this, arguments);
42201
42334
  }
42202
42335
  return initApiForLogicOnly;
@@ -42209,16 +42342,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42209
42342
  }, {
42210
42343
  key: "loadBasket",
42211
42344
  value: function () {
42212
- var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
42213
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
42214
- while (1) switch (_context30.prev = _context30.next) {
42345
+ var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
42346
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
42347
+ while (1) switch (_context31.prev = _context31.next) {
42215
42348
  case 0:
42216
- return _context30.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42349
+ return _context31.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42217
42350
  case 1:
42218
42351
  case "end":
42219
- return _context30.stop();
42352
+ return _context31.stop();
42220
42353
  }
42221
- }, _callee30, this);
42354
+ }, _callee31, this);
42222
42355
  }));
42223
42356
  function loadBasket() {
42224
42357
  return _loadBasket.apply(this, arguments);
@@ -42233,39 +42366,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42233
42366
  }, {
42234
42367
  key: "initBasket",
42235
42368
  value: function () {
42236
- var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites) {
42369
+ var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(init3D, ignoreFavorites) {
42237
42370
  var initSetState, set, basket;
42238
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
42239
- while (1) switch (_context31.prev = _context31.next) {
42371
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
42372
+ while (1) switch (_context32.prev = _context32.next) {
42240
42373
  case 0:
42241
42374
  this.divaNr = this.divaBasketHandler.actDivaNr;
42242
42375
  initSetState = this.getInitStateForSet(!init3D);
42243
42376
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
42244
- _context31.next = 5;
42377
+ _context32.next = 5;
42245
42378
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
42246
42379
  case 5:
42247
42380
  //TODO check if when basket gets repaired the product match gets called
42248
42381
  set = this.actSet();
42249
42382
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
42250
42383
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
42251
- _context31.next = 10;
42384
+ _context32.next = 10;
42252
42385
  break;
42253
42386
  }
42254
- _context31.next = 10;
42387
+ _context32.next = 10;
42255
42388
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
42256
42389
  case 10:
42257
- _context31.next = 12;
42390
+ _context32.next = 12;
42258
42391
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
42259
42392
  case 12:
42260
- basket = _context31.sent;
42261
- return _context31.abrupt("return", basket);
42393
+ basket = _context32.sent;
42394
+ return _context32.abrupt("return", basket);
42262
42395
  case 14:
42263
42396
  case "end":
42264
- return _context31.stop();
42397
+ return _context32.stop();
42265
42398
  }
42266
- }, _callee31, this);
42399
+ }, _callee32, this);
42267
42400
  }));
42268
- function initBasket(_x85, _x86) {
42401
+ function initBasket(_x87, _x88) {
42269
42402
  return _initBasket.apply(this, arguments);
42270
42403
  }
42271
42404
  return initBasket;
@@ -42279,21 +42412,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42279
42412
  }, {
42280
42413
  key: "getValidVariantsLength",
42281
42414
  value: function () {
42282
- var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
42415
+ var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
42283
42416
  var set;
42284
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
42285
- while (1) switch (_context32.prev = _context32.next) {
42417
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
42418
+ while (1) switch (_context33.prev = _context33.next) {
42286
42419
  case 0:
42287
42420
  set = this.actSet();
42288
- _context32.next = 3;
42421
+ _context33.next = 3;
42289
42422
  return favoritesHandlerInstance.getValidVariants(set, true);
42290
42423
  case 3:
42291
- return _context32.abrupt("return", _context32.sent.length);
42424
+ return _context33.abrupt("return", _context33.sent.length);
42292
42425
  case 4:
42293
42426
  case "end":
42294
- return _context32.stop();
42427
+ return _context33.stop();
42295
42428
  }
42296
- }, _callee32, this);
42429
+ }, _callee33, this);
42297
42430
  }));
42298
42431
  function getValidVariantsLength() {
42299
42432
  return _getValidVariantsLength.apply(this, arguments);
@@ -42303,46 +42436,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42303
42436
  }, {
42304
42437
  key: "handleFavorites",
42305
42438
  value: function () {
42306
- var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(mode) {
42439
+ var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(mode) {
42307
42440
  var _this5 = this;
42308
42441
  var set, i;
42309
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
42310
- while (1) switch (_context33.prev = _context33.next) {
42442
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
42443
+ while (1) switch (_context34.prev = _context34.next) {
42311
42444
  case 0:
42312
42445
  set = this.actSet();
42313
42446
  i = 0;
42314
42447
  case 2:
42315
42448
  if (!favoritesHandlerInstance.IsCalcForSummary) {
42316
- _context33.next = 11;
42449
+ _context34.next = 11;
42317
42450
  break;
42318
42451
  }
42319
- _context33.next = 5;
42452
+ _context34.next = 5;
42320
42453
  return DivaUtils.Sleep(200);
42321
42454
  case 5:
42322
42455
  i++;
42323
42456
  if (!(i > 1000)) {
42324
- _context33.next = 9;
42457
+ _context34.next = 9;
42325
42458
  break;
42326
42459
  }
42327
42460
  LOG$1.error(new DivaError('error on generating Variants of Summary'));
42328
- return _context33.abrupt("break", 11);
42461
+ return _context34.abrupt("break", 11);
42329
42462
  case 9:
42330
- _context33.next = 2;
42463
+ _context34.next = 2;
42331
42464
  break;
42332
42465
  case 11:
42333
- _context33.next = 13;
42466
+ _context34.next = 13;
42334
42467
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
42335
42468
  return _this5.update2DGrid(set);
42336
42469
  }, this.actions);
42337
42470
  case 13:
42338
- return _context33.abrupt("return", _context33.sent);
42471
+ return _context34.abrupt("return", _context34.sent);
42339
42472
  case 14:
42340
42473
  case "end":
42341
- return _context33.stop();
42474
+ return _context34.stop();
42342
42475
  }
42343
- }, _callee33, this);
42476
+ }, _callee34, this);
42344
42477
  }));
42345
- function handleFavorites(_x87) {
42478
+ function handleFavorites(_x89) {
42346
42479
  return _handleFavorites.apply(this, arguments);
42347
42480
  }
42348
42481
  return handleFavorites;
@@ -42355,48 +42488,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42355
42488
  }, {
42356
42489
  key: "initSapOrderLinesFromBasket",
42357
42490
  value: function () {
42358
- var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(divaNr, init3D, onlyLoadOldBakset) {
42491
+ var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(divaNr, init3D, onlyLoadOldBakset) {
42359
42492
  var result, oldBasket, basket;
42360
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
42361
- while (1) switch (_context34.prev = _context34.next) {
42493
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
42494
+ while (1) switch (_context35.prev = _context35.next) {
42362
42495
  case 0:
42363
42496
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
42364
- _context34.next = 3;
42497
+ _context35.next = 3;
42365
42498
  return this.loadBasket();
42366
42499
  case 3:
42367
- result = _context34.sent;
42500
+ result = _context35.sent;
42368
42501
  if (!onlyLoadOldBakset) {
42369
- _context34.next = 6;
42502
+ _context35.next = 6;
42370
42503
  break;
42371
42504
  }
42372
- return _context34.abrupt("return", {
42505
+ return _context35.abrupt("return", {
42373
42506
  oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
42374
42507
  cache: {}
42375
42508
  });
42376
42509
  case 6:
42377
42510
  if (!(result === false)) {
42378
- _context34.next = 8;
42511
+ _context35.next = 8;
42379
42512
  break;
42380
42513
  }
42381
42514
  throw new Error('Could not load basket! ' + divaNr);
42382
42515
  case 8:
42383
42516
  oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
42384
- _context34.next = 11;
42517
+ _context35.next = 11;
42385
42518
  return this.initBasket(init3D);
42386
42519
  case 11:
42387
- basket = _context34.sent;
42388
- return _context34.abrupt("return", {
42520
+ basket = _context35.sent;
42521
+ return _context35.abrupt("return", {
42389
42522
  basket: basket,
42390
42523
  oldBasket: oldBasket,
42391
42524
  cache: this.api.getJsonDataCache()
42392
42525
  });
42393
42526
  case 13:
42394
42527
  case "end":
42395
- return _context34.stop();
42528
+ return _context35.stop();
42396
42529
  }
42397
- }, _callee34, this);
42530
+ }, _callee35, this);
42398
42531
  }));
42399
- function initSapOrderLinesFromBasket(_x88, _x89, _x90) {
42532
+ function initSapOrderLinesFromBasket(_x90, _x91, _x92) {
42400
42533
  return _initSapOrderLinesFromBasket.apply(this, arguments);
42401
42534
  }
42402
42535
  return initSapOrderLinesFromBasket;
@@ -43053,6 +43186,7 @@ var Grid = /*#__PURE__*/function () {
43053
43186
  //all the different accessoires selectable to place in the grid. can be absolute defined in grid.ArticleRelations or can change due to the heightGridCellCountOnRule where we rule is depending on the current configuration of the article.
43054
43187
  _defineProperty(this, "articleRelations", void 0);
43055
43188
  _defineProperty(this, "articleRelationsForOtherGroups", void 0);
43189
+ _defineProperty(this, "disableCellsByRules", void 0);
43056
43190
  //if in theis grid an shelfaccessoire is planned laod this article aswell
43057
43191
  _defineProperty(this, "montageOptions", void 0);
43058
43192
  //disableCellsByFreeText
@@ -43083,6 +43217,7 @@ var Grid = /*#__PURE__*/function () {
43083
43217
  this.showOnRule = grid.ShowOnRule;
43084
43218
  this.montageOptions = grid.MontageOptions;
43085
43219
  this.disableCellsByMeasures = grid.DisableCellsByMeasures;
43220
+ this.disableCellsByRules = grid.DisableCellsByRules;
43086
43221
  this.visitOption = grid.VisitOption;
43087
43222
  this.shelfId = 'SHELFARTICLE_' + article.basketId + '_' + index;
43088
43223
  this.heightGridCellCountOnRule = data.ShelfPlanner[index].HeightGridCellCountOnRule;
@@ -44051,6 +44186,21 @@ var Grid = /*#__PURE__*/function () {
44051
44186
  }
44052
44187
  return count;
44053
44188
  }
44189
+ }, {
44190
+ key: "getDisabledCellsByRule",
44191
+ value: function getDisabledCellsByRule() {
44192
+ var _this$disableCellsByR;
44193
+ var cellsToDisable = [];
44194
+ if (!((_this$disableCellsByR = this.disableCellsByRules) !== null && _this$disableCellsByR !== void 0 && _this$disableCellsByR.length)) return cellsToDisable;
44195
+ var article = this.article;
44196
+ for (var i = 0; i < this.disableCellsByRules.length; i++) {
44197
+ var rule = this.disableCellsByRules[i];
44198
+ if (!rule.rule || this.article.evalRule(DivaUtils.getRuleByFormula(rule.rule, this.article.catalogCodex, article.CatalogData.multiselectOptions))) {
44199
+ cellsToDisable = [].concat(_toConsumableArray(cellsToDisable), _toConsumableArray(rule.cells));
44200
+ }
44201
+ }
44202
+ return cellsToDisable;
44203
+ }
44054
44204
  }, {
44055
44205
  key: "ShelfId",
44056
44206
  get: function get() {