@crystaldesign/web-planner-logic 25.2.0-beta.37 → 25.2.0-beta.38

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-9af577c0.js → DivaBoxPlanner-d00ed77e.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-ee35bfea.js → DivaStandardPlanner-b17bda27.js} +2 -2
  3. package/build/cjs/{DoorPlanner-12087488.js → DoorPlanner-0dd20db4.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-9f5f0d8d.js → Host3DSignalR-319ec415.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-1b0af4b7.js → LiviqueWWSHandler-80a8ebe1.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-0179eb08.js → PfisterWWSHandler-be257d63.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-d653a179.js → PlannerHandler2D-bf174796.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-ae4052f6.js → SeriousBasketHandler-dc659309.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-b3a9e5b2.js → ShelfPlanner-b7e911b6.js} +86 -56
  10. package/build/cjs/{StandardWWSHandler-cfc6a796.js → StandardWWSHandler-7c6f47ac.js} +1 -1
  11. package/build/cjs/{index-d7b37252.js → index-16996d63.js} +1035 -856
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-7c40aa5b.js → DivaBoxPlanner-112bc2bf.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-5c6cc87c.js → DivaStandardPlanner-fbcc22bb.js} +2 -2
  15. package/build/esm/{DoorPlanner-09e8a29d.js → DoorPlanner-3b74bca4.js} +1 -1
  16. package/build/esm/{Host3DSignalR-85c6a251.js → Host3DSignalR-222ed95d.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-aa91694f.js → LiviqueWWSHandler-107ff34e.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-f5c82bab.js → PfisterWWSHandler-02f5f572.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-36f1f7c6.js → PlannerHandler2D-2350729b.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-9ca925b6.js → SeriousBasketHandler-7b43a780.js} +1 -1
  21. package/build/esm/{ShelfPlanner-3c55864b.js → ShelfPlanner-637b2e24.js} +86 -56
  22. package/build/esm/{StandardWWSHandler-d3611d24.js → StandardWWSHandler-c0b776f6.js} +1 -1
  23. package/build/esm/{index-0af027b3.js → index-aa396ddb.js} +1035 -856
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
  30. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +7 -0
  32. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +3 -2
  34. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +7 -4
  36. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  38. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +4 -2
  39. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  40. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +10 -1
  41. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -1
  43. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -1
  45. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +1 -0
  47. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +2 -0
  49. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +2 -0
  51. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  52. package/package.json +2 -2
@@ -1560,6 +1560,16 @@ var ArticleOptionData = /*#__PURE__*/function () {
1560
1560
  get: function get() {
1561
1561
  return this.opt.catalogOPT.onlyVisibleIfNotDocked;
1562
1562
  }
1563
+ }, {
1564
+ key: "onlyVisibleIfConfigSingle",
1565
+ get: function get() {
1566
+ return this.opt.catalogOPT.onlyVisibleIfConfigSingle;
1567
+ }
1568
+ }, {
1569
+ key: "onlyVisibleIfConfigAll",
1570
+ get: function get() {
1571
+ return this.opt.catalogOPT.onlyVisibleIfConfigAll;
1572
+ }
1563
1573
  }, {
1564
1574
  key: "isDefaultValueForOptions",
1565
1575
  get: function get() {
@@ -16533,6 +16543,9 @@ var CatalogArticleData = /*#__PURE__*/function () {
16533
16543
  case 'HAS3D':
16534
16544
  this.catalogArticle.isVisualized = prop.Value;
16535
16545
  break;
16546
+ case 'OPTIONS_FOR_PRINT':
16547
+ this.catalogArticle.optionsForPrint = prop.Value.split(';');
16548
+ break;
16536
16549
  default:
16537
16550
  if (_key.includes('__')) break;
16538
16551
  var values = prop.Value.split(';');
@@ -16968,6 +16981,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
16968
16981
  get: function get() {
16969
16982
  return this.catalogArticle.usePRGasOPVArticleNr;
16970
16983
  }
16984
+ }, {
16985
+ key: "optionsForPrint",
16986
+ get: function get() {
16987
+ return this.catalogArticle.optionsForPrint;
16988
+ }
16971
16989
  //tabGroup can include an optionCodex to reference a tabgroup or a tabgroup -> this was made for translation purposes
16972
16990
  }, {
16973
16991
  key: "tabGroup",
@@ -17968,6 +17986,12 @@ var OptionCatalogData = /*#__PURE__*/function () {
17968
17986
  case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
17969
17987
  this.opt.onlyVisibleIfNotDocked = prop.Value;
17970
17988
  break;
17989
+ case 'ONLY_VIDSIBLE_IF_CONFIG_SINGLE':
17990
+ this.opt.onlyVisibleIfConfigSingle = prop.Value;
17991
+ break;
17992
+ case 'ONLY_VIDSIBLE_IF_CONFIG_ALL':
17993
+ this.opt.onlyVisibleIfConfigAll = prop.Value;
17994
+ break;
17971
17995
  case 'ISDEFAULTVALUEFOROPTIONS':
17972
17996
  this.opt.isDefaultValueForOptions = prop.Value;
17973
17997
  break;
@@ -18129,6 +18153,16 @@ var OptionCatalogData = /*#__PURE__*/function () {
18129
18153
  // deprecated: was used for Bail amalfi accessoires
18130
18154
  return this.opt.onlyVisibleIfNotDocked;
18131
18155
  }
18156
+ }, {
18157
+ key: "onlyVisibleIfConfigSingle",
18158
+ get: function get() {
18159
+ return this.opt.onlyVisibleIfConfigSingle;
18160
+ }
18161
+ }, {
18162
+ key: "onlyVisibleIfConfigAll",
18163
+ get: function get() {
18164
+ return this.opt.onlyVisibleIfConfigAll;
18165
+ }
18132
18166
  }, {
18133
18167
  key: "isDefaultValueForOptions",
18134
18168
  get: function get() {
@@ -20013,9 +20047,11 @@ var catalogHandlerInstance = new DivaCatalogHandler();
20013
20047
  function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20014
20048
  function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20015
20049
  var ArticleOptionStateData = /*#__PURE__*/function () {
20016
- function ArticleOptionStateData(option, defaultOPV, useIsOptionDefinedWarning) {
20050
+ function ArticleOptionStateData(option, getIsConfigSingle, defaultOPV, useIsOptionDefinedWarning) {
20017
20051
  _classCallCheck(this, ArticleOptionStateData);
20018
20052
  _defineProperty(this, "articleOptionState", void 0);
20053
+ _defineProperty(this, "getIsConfigSingle", void 0);
20054
+ this.getIsConfigSingle = getIsConfigSingle;
20019
20055
  this.articleOptionState = {
20020
20056
  option: option,
20021
20057
  name: '',
@@ -20272,7 +20308,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20272
20308
  key: "isDoShow",
20273
20309
  get: function get() {
20274
20310
  var _this$val4;
20275
- return this.articleOptionState.doShow && (!((_this$val4 = this.val) !== null && _this$val4 !== void 0 && _this$val4.isNotRelevant) || this.visibleCount > 1);
20311
+ return this.articleOptionState.doShow && (!((_this$val4 = this.val) !== null && _this$val4 !== void 0 && _this$val4.isNotRelevant) || this.visibleCount > 1) && (!this.option.onlyVisibleIfConfigAll || !this.getIsConfigSingle()) && (!this.option.onlyVisibleIfConfigSingle || this.getIsConfigSingle());
20276
20312
  },
20277
20313
  set: function set(doShow) {
20278
20314
  this.articleOptionState.doShow = doShow;
@@ -20652,8 +20688,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20652
20688
  }
20653
20689
  }, {
20654
20690
  key: "cloneOptionState",
20655
- value: function cloneOptionState() {
20656
- var clonedOps = new ArticleOptionStateData(this.option);
20691
+ value: function cloneOptionState(getIsConfigSingle) {
20692
+ var clonedOps = new ArticleOptionStateData(this.option, getIsConfigSingle);
20657
20693
  clonedOps.articleOptionState = _objectSpread$f(_objectSpread$f({}, this.articleOptionState), {}, {
20658
20694
  imageOPVs: _objectSpread$f({}, this.articleOptionState.imageOPVs),
20659
20695
  visibleOPVs: _objectSpread$f({}, this.articleOptionState.visibleOPVs),
@@ -20681,6 +20717,9 @@ var DivaArticle = /*#__PURE__*/function () {
20681
20717
  _defineProperty(this, "actPlannerData", void 0);
20682
20718
  //Hier steht die aktuelle Konfiguration
20683
20719
  _defineProperty(this, "decisionDebugStacks", []);
20720
+ _defineProperty(this, "getIsConfigSingle", function () {
20721
+ return _this.set.configSingle;
20722
+ });
20684
20723
  _defineProperty(this, "getPreviousPartlistArticle", function (articleCodex) {
20685
20724
  var _this$article$previou;
20686
20725
  var prevPartlistArticles = (_this$article$previou = _this.article.previousPartlistArticles) !== null && _this$article$previou !== void 0 ? _this$article$previou : {};
@@ -21162,9 +21201,10 @@ var DivaArticle = /*#__PURE__*/function () {
21162
21201
  key: "getArticleOptionStatesWithOptionsForPrint",
21163
21202
  value: function getArticleOptionStatesWithOptionsForPrint() {
21164
21203
  var opsObj = _objectSpread$e({}, this.articleOptionStates);
21165
- if (this.article.optionsForPrint) {
21166
- for (var i = 0; i < this.article.optionsForPrint.length; i++) {
21167
- var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
21204
+ var optionsForPrint = this.optionsForPrint;
21205
+ if (optionsForPrint.length) {
21206
+ for (var i = 0; i < optionsForPrint.length; i++) {
21207
+ var ops = this.getArticleOptionState(optionsForPrint[i], undefined, true);
21168
21208
  if (ops) opsObj[ops.optionCodex] = ops;
21169
21209
  }
21170
21210
  }
@@ -21247,9 +21287,9 @@ var DivaArticle = /*#__PURE__*/function () {
21247
21287
  }, {
21248
21288
  key: "name",
21249
21289
  get: function get() {
21250
- var _this$article$actDesc, _this$article$options;
21290
+ var _this$article$actDesc, _this$optionsForPrint;
21251
21291
  var ret = (_this$article$actDesc = this.article.actDescription) !== null && _this$article$actDesc !== void 0 ? _this$article$actDesc : this.catalogArticleName;
21252
- if (this.RetailPrefix != 'SAP' && this.article.ruleDesc && this.article.ruleDesc != '' && !((_this$article$options = this.article.optionsForPrint) !== null && _this$article$options !== void 0 && _this$article$options.length)) {
21292
+ if (this.RetailPrefix != 'SAP' && this.article.ruleDesc && this.article.ruleDesc != '' && !((_this$optionsForPrint = this.optionsForPrint) !== null && _this$optionsForPrint !== void 0 && _this$optionsForPrint.length)) {
21253
21293
  var ruleDesc = this.article.ruleDesc;
21254
21294
  if (!this.set.api.ruleDescWithoutParenthesis()) ruleDesc = '(' + ruleDesc + ')';
21255
21295
  ret += ' ' + (this.CatalogData.addNewLineBeforRuleDesc ? this.set.api.ruleDescSeperator() : '') + ruleDesc;
@@ -21286,7 +21326,10 @@ var DivaArticle = /*#__PURE__*/function () {
21286
21326
  }, {
21287
21327
  key: "optionsForPrint",
21288
21328
  get: function get() {
21289
- return this.article.optionsForPrint;
21329
+ var _this$article$options, _this$catalogArticle$;
21330
+ return [].concat(_toConsumableArray((_this$article$options = this.article.optionsForPrint) !== null && _this$article$options !== void 0 ? _this$article$options : []), _toConsumableArray((_this$catalogArticle$ = this.catalogArticle.optionsForPrint) !== null && _this$catalogArticle$ !== void 0 ? _this$catalogArticle$ : [])).map(function (o) {
21331
+ return 'OPT' + o;
21332
+ });
21290
21333
  }
21291
21334
  }, {
21292
21335
  key: "image",
@@ -21403,19 +21446,19 @@ var DivaArticle = /*#__PURE__*/function () {
21403
21446
  }
21404
21447
  }, {
21405
21448
  key: "getArticleOptionState",
21406
- value: function getArticleOptionState(codex, from) {
21449
+ value: function getArticleOptionState(codex, from, checkOnAccessoireParent) {
21407
21450
  var _this$partListParentA10, _this$partListParentA11, _this$partlistArticle3;
21408
21451
  if (this.articleOptionStatesData[codex]) {
21409
21452
  return this.articleOptionStatesData[codex];
21410
21453
  }
21411
- if (from !== ((_this$partListParentA10 = this.partListParentArticle) === null || _this$partListParentA10 === void 0 ? void 0 : _this$partListParentA10.basketId) && (_this$partListParentA11 = this.partListParentArticle) !== null && _this$partListParentA11 !== void 0 && _this$partListParentA11.getArticleOptionState(codex)) {
21412
- return this.partListParentArticle.getArticleOptionState(codex, this.basketId);
21454
+ if (from !== ((_this$partListParentA10 = this.partListParentArticle) === null || _this$partListParentA10 === void 0 ? void 0 : _this$partListParentA10.basketId) && (_this$partListParentA11 = this.partListParentArticle) !== null && _this$partListParentA11 !== void 0 && _this$partListParentA11.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
21455
+ return this.partListParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
21413
21456
  }
21414
21457
  if (Object.keys((_this$partlistArticle3 = this.partlistArticles) !== null && _this$partlistArticle3 !== void 0 ? _this$partlistArticle3 : {}).length > 0) {
21415
21458
  for (var key in this.partlistArticles) {
21416
21459
  if (from === key) continue;
21417
21460
  var partlistArticle = this.partlistArticles[key];
21418
- var ops = partlistArticle.getArticleOptionState(codex, this.basketId);
21461
+ var ops = partlistArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
21419
21462
  if (ops) return ops;
21420
21463
  }
21421
21464
  }
@@ -21434,6 +21477,10 @@ var DivaArticle = /*#__PURE__*/function () {
21434
21477
  }
21435
21478
  }
21436
21479
  }
21480
+ if (checkOnAccessoireParent && this.accessoireParentArticle) {
21481
+ var _ops2 = this.accessoireParentArticle.getArticleOptionState(codex, this.basketId, checkOnAccessoireParent);
21482
+ if (_ops2) return _ops2;
21483
+ }
21437
21484
  return this.articleOptionStatesData[codex];
21438
21485
  //kann sein dass die OCD der Option dem codex entspricht
21439
21486
  }
@@ -21648,7 +21695,7 @@ var DivaArticle = /*#__PURE__*/function () {
21648
21695
  }, {
21649
21696
  key: "dockedOnAV",
21650
21697
  value: function dockedOnAV(type) {
21651
- return articleHandlerInstance.dockedOnAV(type, this);
21698
+ return articleHandlerInstance.dockedOnAV('AV' + type, this);
21652
21699
  }
21653
21700
  }, {
21654
21701
  key: "accessoireParentArticle",
@@ -22368,6 +22415,9 @@ var DivaArticle = /*#__PURE__*/function () {
22368
22415
  if (actArticleOptionState[refOptCodex].visibleOptionValues[_iKey]) {
22369
22416
  actArticleOptionState[refOptCodex].defaultOPV = curOpvValue;
22370
22417
  optToChange[refOptCodex] = curOpvValue;
22418
+ if (optToChange[opt + '_val']) {
22419
+ optToChange[refOptCodex + '_val'] = optToChange[opt + '_val'];
22420
+ }
22371
22421
  opvIsValid = true;
22372
22422
  }
22373
22423
  break;
@@ -22491,9 +22541,9 @@ var DivaArticle = /*#__PURE__*/function () {
22491
22541
  }
22492
22542
  //fallback for pfister classification usecase
22493
22543
  for (var _iKey2 in this.articleOptionStates) {
22494
- var _ops2 = this.articleOptionStates[_iKey2];
22495
- if (_ops2.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops2.option.parentOptionCodex)) {
22496
- return this.checkOptionSearchOPV(_ops2.option, optionValueCodex, ret);
22544
+ var _ops3 = this.articleOptionStates[_iKey2];
22545
+ if (_ops3.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops3.option.parentOptionCodex)) {
22546
+ return this.checkOptionSearchOPV(_ops3.option, optionValueCodex, ret);
22497
22547
  }
22498
22548
  }
22499
22549
  }
@@ -22581,15 +22631,15 @@ var DivaArticle = /*#__PURE__*/function () {
22581
22631
  value: function validateAndSetNewConfigValues(newConfigValues) {
22582
22632
  var freeTextValues = {};
22583
22633
  for (var key in newConfigValues) {
22584
- var _ops3, _ops4, _newConfigValues$key;
22634
+ var _ops4, _ops5, _newConfigValues$key;
22585
22635
  var ops = this.getArticleOptionState(key);
22586
22636
  var _this$parentOptionCod3 = this.parentOptionCodex(key),
22587
22637
  optionCodex = _this$parentOptionCod3.optionCodex,
22588
22638
  partenOptionCodex = _this$parentOptionCod3.partenOptionCodex;
22589
- if ((_ops3 = ops) !== null && _ops3 !== void 0 && _ops3.isMultiselect) {
22639
+ if ((_ops4 = ops) !== null && _ops4 !== void 0 && _ops4.isMultiselect) {
22590
22640
  ops = this.handleMultiselect(ops, newConfigValues, key);
22591
22641
  }
22592
- if ((_ops4 = ops) !== null && _ops4 !== void 0 && _ops4.isFreeText) {
22642
+ if ((_ops5 = ops) !== null && _ops5 !== void 0 && _ops5.isFreeText) {
22593
22643
  this.handleFreeText(ops, newConfigValues, key, freeTextValues);
22594
22644
  }
22595
22645
  var opvCodex = (_newConfigValues$key = newConfigValues[key]) === null || _newConfigValues$key === void 0 ? void 0 : _newConfigValues$key.split(';')[0];
@@ -22600,8 +22650,8 @@ var DivaArticle = /*#__PURE__*/function () {
22600
22650
  var myFreeText = foundItem.opv.isFreeText ? newConfigValues[optionCodex + '_val'] : undefined;
22601
22651
  this.updateArtOPV(foundItem.opv, foundItem.opt.codex, this.getArticleOptionState(foundItem.opt.codex), myFreeText);
22602
22652
  } else {
22603
- var _ops5;
22604
- if (ops && !((_ops5 = ops) !== null && _ops5 !== void 0 && _ops5.isFreeText)) {
22653
+ var _ops6;
22654
+ if (ops && !((_ops6 = ops) !== null && _ops6 !== void 0 && _ops6.isFreeText)) {
22605
22655
  // to initialize freetexts where the freetext is not the only selectable opv in the options
22606
22656
  this.checkIfSelectableOpvIsFreetext(ops, opvCodex, newConfigValues);
22607
22657
  }
@@ -23066,7 +23116,7 @@ var DivaArticle = /*#__PURE__*/function () {
23066
23116
  //die Klasse ArticleOptionState wird einfach neu initialisiert
23067
23117
  var oldOPS = this.getArticleOptionState(optionCodex);
23068
23118
  var option = oldOPS.option;
23069
- var optionState = new ArticleOptionStateData(option, oldOPS.defaultOPV, (_this$set$ViewConfig2 = this.set.ViewConfig) === null || _this$set$ViewConfig2 === void 0 ? void 0 : _this$set$ViewConfig2.useIsOptionDefinedWarning);
23119
+ var optionState = new ArticleOptionStateData(option, this.getIsConfigSingle, oldOPS.defaultOPV, (_this$set$ViewConfig2 = this.set.ViewConfig) === null || _this$set$ViewConfig2 === void 0 ? void 0 : _this$set$ViewConfig2.useIsOptionDefinedWarning);
23070
23120
  optionState.isDisabled = true;
23071
23121
  this.uploadOptionState(optionState);
23072
23122
  }
@@ -23135,9 +23185,7 @@ var DivaArticle = /*#__PURE__*/function () {
23135
23185
  _this3 = this;
23136
23186
  var allDecisions = this.article.catalogArticle.articleDecisions;
23137
23187
  var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
23138
- var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';').map(function (o) {
23139
- return 'OPT' + o;
23140
- });
23188
+ var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
23141
23189
  var optionImgForPrint = myPartListPos.OptionImgForPrint ? 'OPT' + myPartListPos.OptionImgForPrint : undefined;
23142
23190
  var _loop = function _loop() {
23143
23191
  var myRuleDesc = '';
@@ -23509,13 +23557,13 @@ var DivaArticle = /*#__PURE__*/function () {
23509
23557
  for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
23510
23558
  var _myDoc$Row;
23511
23559
  var checkOptX = doAlsoCheckOPTs[f];
23512
- var _ops6 = this.getArticleOptionState(checkOptX);
23513
- if (_ops6 && (_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[checkOptX] && _ops6.valCodex && !myDoc.Row[checkOptX].includes(_ops6.valCodex)) {
23560
+ var _ops7 = this.getArticleOptionState(checkOptX);
23561
+ if (_ops7 && (_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[checkOptX] && _ops7.valCodex && !myDoc.Row[checkOptX].includes(_ops7.valCodex)) {
23514
23562
  if (!myDoc.Row[checkOptX].find(function (o) {
23515
23563
  return !o.startsWith('!');
23516
23564
  })) {
23517
23565
  //all is inverted
23518
- if (myDoc.Row[checkOptX].includes('!' + _ops6.valCodex)) {
23566
+ if (myDoc.Row[checkOptX].includes('!' + _ops7.valCodex)) {
23519
23567
  doUseDoc = false;
23520
23568
  break;
23521
23569
  }
@@ -23939,7 +23987,7 @@ var DivaArticle = /*#__PURE__*/function () {
23939
23987
  }, {
23940
23988
  key: "updateShelfPlannerState",
23941
23989
  value: function () {
23942
- var _updateShelfPlannerState = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
23990
+ var _updateShelfPlannerState = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(variantValues) {
23943
23991
  var _this$doorPlanner;
23944
23992
  var j3D, _yield$import, ShelfPlanner;
23945
23993
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -23951,7 +23999,7 @@ var DivaArticle = /*#__PURE__*/function () {
23951
23999
  break;
23952
24000
  }
23953
24001
  _context.next = 4;
23954
- return import('./ShelfPlanner-3c55864b.js');
24002
+ return import('./ShelfPlanner-637b2e24.js');
23955
24003
  case 4:
23956
24004
  _yield$import = _context.sent;
23957
24005
  ShelfPlanner = _yield$import["default"];
@@ -23988,14 +24036,14 @@ var DivaArticle = /*#__PURE__*/function () {
23988
24036
  return this.shelfPlanner.setIsVisible(true);
23989
24037
  case 21:
23990
24038
  _context.next = 23;
23991
- return this.shelfPlanner.onConfigChanged();
24039
+ return this.shelfPlanner.onConfigChanged(variantValues);
23992
24040
  case 23:
23993
24041
  case "end":
23994
24042
  return _context.stop();
23995
24043
  }
23996
24044
  }, _callee, this);
23997
24045
  }));
23998
- function updateShelfPlannerState() {
24046
+ function updateShelfPlannerState(_x) {
23999
24047
  return _updateShelfPlannerState.apply(this, arguments);
24000
24048
  }
24001
24049
  return updateShelfPlannerState;
@@ -24004,7 +24052,7 @@ var DivaArticle = /*#__PURE__*/function () {
24004
24052
  key: "calcConfigPrice",
24005
24053
  value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
24006
24054
  var _this4 = this,
24007
- _this$catalogArticle$;
24055
+ _this$catalogArticle$2;
24008
24056
  //Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
24009
24057
  //wenn ja, hier neues shape übergeben
24010
24058
  if (this.articleType === 'FLAT') return;
@@ -24204,7 +24252,7 @@ var DivaArticle = /*#__PURE__*/function () {
24204
24252
 
24205
24253
  //Wenn der Artikel über IDM einnen Längen/Flächenabhängigen Preis hat, dann entspricht der aktuelle Preis nur einer Einheit
24206
24254
  //dieser muss jetzt m it entsprechenden Massen multipliziert werden
24207
- if (articleUsedCalcPrice > 0 && ((_this$catalogArticle$ = this.catalogArticle.basicUnitPrice) !== null && _this$catalogArticle$ !== void 0 ? _this$catalogArticle$ : 0) > 0 && idmPriceMeasureFactor > 1) {
24255
+ if (articleUsedCalcPrice > 0 && ((_this$catalogArticle$2 = this.catalogArticle.basicUnitPrice) !== null && _this$catalogArticle$2 !== void 0 ? _this$catalogArticle$2 : 0) > 0 && idmPriceMeasureFactor > 1) {
24208
24256
  articleUsedCalcPrice = articleUsedCalcPrice * idmPriceMeasureFactor / this.catalogArticle.basicUnitPrice;
24209
24257
  }
24210
24258
  this.article.price = articleUsedCalcPrice;
@@ -24373,16 +24421,16 @@ var DivaArticle = /*#__PURE__*/function () {
24373
24421
  }
24374
24422
  }
24375
24423
  for (var _key4 in myValues) {
24376
- var _ops7 = this.getArticleOptionState(_key4);
24377
- if (_ops7) {
24424
+ var _ops8 = this.getArticleOptionState(_key4);
24425
+ if (_ops8) {
24378
24426
  validValues[_key4] = myValues[_key4];
24379
24427
  } else if (_key4.endsWith('_val') && this.getArticleOptionState(_key4.replace(/_val/g, ''))) {
24380
24428
  validValues[_key4] = myValues[_key4];
24381
24429
  } else {
24382
24430
  for (var _opt in this.articleOptionStates) {
24383
- var _ops8 = this.articleOptionStates[_opt];
24431
+ var _ops9 = this.articleOptionStates[_opt];
24384
24432
  if (this.articleOptionStates[_opt].optionOcd == _key4) {
24385
- var values = this.checkOptionSearchOPV(_ops8.option, myValues[_key4], {});
24433
+ var values = this.checkOptionSearchOPV(_ops9.option, myValues[_key4], {});
24386
24434
  if (values !== null && values !== void 0 && values.opv) validValues[_opt] = values.opv.codex;
24387
24435
  }
24388
24436
  }
@@ -24702,7 +24750,7 @@ var DivaArticle = /*#__PURE__*/function () {
24702
24750
  }
24703
24751
  if (myArtOption.isDoShow && !doHideSizeOption && myArtOption.val) {
24704
24752
  if (myArtOption.visibleCount > 0) {
24705
- var _myArtOption$valName_, _this$article$options2, _this$article$options3, _myArtOption$val;
24753
+ var _myArtOption$valName_, _this$optionsForPrint2, _this$optionsForPrint3, _myArtOption$val;
24706
24754
  var isfreeText = false,
24707
24755
  isMeasureValue = false,
24708
24756
  freeText = undefined,
@@ -24744,7 +24792,7 @@ var DivaArticle = /*#__PURE__*/function () {
24744
24792
  TabGroup_locales: myArtOption.optionTabGroup_locales,
24745
24793
  SendToSAP: myArtOption.option.sendToSAP,
24746
24794
  ArticlePlaceholder: myArtOption.option.articlePlaceholder,
24747
- Hidden: myArtOption.headerPosVariationType == 'I' || myArtOption.isInvisible || myArtOption.val.hideInSummary || this.isPartListArticle && ((_this$article$options2 = this.article.optionsForPrint) === null || _this$article$options2 === void 0 ? void 0 : _this$article$options2.length) && !((_this$article$options3 = this.article.optionsForPrint) !== null && _this$article$options3 !== void 0 && _this$article$options3.includes(OP)),
24795
+ Hidden: !!(myArtOption.headerPosVariationType == 'I' || myArtOption.isInvisible || myArtOption.val.hideInSummary || this.isPartListArticle && (_this$optionsForPrint2 = this.optionsForPrint) !== null && _this$optionsForPrint2 !== void 0 && _this$optionsForPrint2.length && !((_this$optionsForPrint3 = this.optionsForPrint) !== null && _this$optionsForPrint3 !== void 0 && _this$optionsForPrint3.includes(OP))),
24748
24796
  HideInOrderText: myArtOption.hideInOrderText,
24749
24797
  IsDescribingState: myArtOption.isDescribingState,
24750
24798
  FreeTextLang: myArtOption.freeTextLang,
@@ -24873,7 +24921,7 @@ var DivaArticle = /*#__PURE__*/function () {
24873
24921
  value: function cloneArticle(set) {
24874
24922
  var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$e({}, this.article), this.article.catalogArticle, set.CatalogData);
24875
24923
  for (var key in this.articleOptionStates) {
24876
- clonedArticle.articleOptionStates[key] = this.articleOptionStates[key].cloneOptionState();
24924
+ clonedArticle.articleOptionStates[key] = this.articleOptionStates[key].cloneOptionState(clonedArticle.getIsConfigSingle);
24877
24925
  }
24878
24926
  clonedArticle.article.partlistArticles = {};
24879
24927
  clonedArticle.article.previousPartlistArticles = {};
@@ -25373,7 +25421,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25373
25421
  for (key in myCatalogArticleOptions) {
25374
25422
  //Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
25375
25423
  if (!articleOptionState[key]) {
25376
- optionState = new ArticleOptionStateData(myCatalogArticleOptions[key], undefined, (_article$set$ViewConf = article.set.ViewConfig) === null || _article$set$ViewConf === void 0 ? void 0 : _article$set$ViewConf.useIsOptionDefinedWarning);
25424
+ optionState = new ArticleOptionStateData(myCatalogArticleOptions[key], article.getIsConfigSingle, undefined, (_article$set$ViewConf = article.set.ViewConfig) === null || _article$set$ViewConf === void 0 ? void 0 : _article$set$ViewConf.useIsOptionDefinedWarning);
25377
25425
  article.uploadOptionState(optionState); //alle Optionen erstellen
25378
25426
  }
25379
25427
  }
@@ -25544,7 +25592,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25544
25592
  break;
25545
25593
  }
25546
25594
  _context10.next = 9;
25547
- return article.updateShelfPlannerState();
25595
+ return article.updateShelfPlannerState(newConfigValues);
25548
25596
  case 9:
25549
25597
  if (!(!dontCalcPrice && !calcVariantPrice)) {
25550
25598
  _context10.next = 12;
@@ -28628,7 +28676,7 @@ var DivaSet = /*#__PURE__*/function () {
28628
28676
  break;
28629
28677
  }
28630
28678
  _context5.next = 3;
28631
- return import('./DoorPlanner-09e8a29d.js');
28679
+ return import('./DoorPlanner-3b74bca4.js');
28632
28680
  case 3:
28633
28681
  _yield$import = _context5.sent;
28634
28682
  DoorPlanner = _yield$import["default"];
@@ -32376,7 +32424,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32376
32424
  break;
32377
32425
  }
32378
32426
  _context17.next = 18;
32379
- return parentArticle.shelfPlanner.onConfigChanged();
32427
+ return parentArticle.shelfPlanner.onConfigChanged({});
32380
32428
  case 18:
32381
32429
  _context17.next = 22;
32382
32430
  break;
@@ -32406,13 +32454,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
32406
32454
  }()
32407
32455
  }, {
32408
32456
  key: "moveShelfItem",
32409
- value: function moveShelfItem(set, grid, initialIndex, finalIndex) {
32410
- var article = set.getArticleByBasketId(grid.basketId);
32411
- if (article && article.shelfPlanner) {
32412
- return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
32457
+ value: function () {
32458
+ var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, grid, initialIndex, finalIndex) {
32459
+ var article;
32460
+ return _regeneratorRuntime.wrap(function _callee16$(_context18) {
32461
+ while (1) switch (_context18.prev = _context18.next) {
32462
+ case 0:
32463
+ article = set.getArticleByBasketId(grid.basketId);
32464
+ if (!(article && article.shelfPlanner)) {
32465
+ _context18.next = 5;
32466
+ break;
32467
+ }
32468
+ _context18.next = 4;
32469
+ return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
32470
+ case 4:
32471
+ return _context18.abrupt("return", _context18.sent);
32472
+ case 5:
32473
+ return _context18.abrupt("return", 'NOTHING_CHANGED');
32474
+ case 6:
32475
+ case "end":
32476
+ return _context18.stop();
32477
+ }
32478
+ }, _callee16);
32479
+ }));
32480
+ function moveShelfItem(_x52, _x53, _x54, _x55) {
32481
+ return _moveShelfItem.apply(this, arguments);
32413
32482
  }
32414
- return 'NOTHING_CHANGED';
32415
- }
32483
+ return moveShelfItem;
32484
+ }()
32416
32485
  }, {
32417
32486
  key: "selectShelfAccArticle",
32418
32487
  value: function selectShelfAccArticle(set, gridGroup, targetArticles, articleCodex) {
@@ -32429,11 +32498,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
32429
32498
  }, {
32430
32499
  key: "getFreeShelfGrids",
32431
32500
  value: function () {
32432
- var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, gridGroup) {
32501
+ var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, gridGroup) {
32433
32502
  var _article$shelfPlanner;
32434
32503
  var articles, article, articleCodex, accessoire, ret;
32435
- return _regeneratorRuntime.wrap(function _callee16$(_context18) {
32436
- while (1) switch (_context18.prev = _context18.next) {
32504
+ return _regeneratorRuntime.wrap(function _callee17$(_context19) {
32505
+ while (1) switch (_context19.prev = _context19.next) {
32437
32506
  case 0:
32438
32507
  articles = set.getDivaArticlesByGridGroup(gridGroup);
32439
32508
  article = Object.values(articles).find(function (a) {
@@ -32442,38 +32511,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
32442
32511
  });
32443
32512
  articleCodex = article === null || article === void 0 || (_article$shelfPlanner = article.shelfPlanner) === null || _article$shelfPlanner === void 0 ? void 0 : _article$shelfPlanner.getSelectedAccessoireById(gridGroup);
32444
32513
  if (!(!article || !articleCodex)) {
32445
- _context18.next = 5;
32514
+ _context19.next = 5;
32446
32515
  break;
32447
32516
  }
32448
- return _context18.abrupt("return", undefined);
32517
+ return _context19.abrupt("return", undefined);
32449
32518
  case 5:
32450
- _context18.next = 7;
32519
+ _context19.next = 7;
32451
32520
  return this.addArticleToActSet(set, articleCodex, {
32452
32521
  relatedToBasketId: article.basketId,
32453
32522
  relatedToShelf: article.basketId,
32454
32523
  relatedToShelfGrid: 0
32455
32524
  }, false, 'toDeleteShelf');
32456
32525
  case 7:
32457
- accessoire = _context18.sent;
32458
- _context18.next = 10;
32459
- return accessoire.updateShelfPlannerState();
32526
+ accessoire = _context19.sent;
32527
+ _context19.next = 10;
32528
+ return accessoire.updateShelfPlannerState({});
32460
32529
  case 10:
32461
32530
  articleHandlerInstance.initCfgValues(accessoire, {});
32462
- _context18.next = 13;
32531
+ _context19.next = 13;
32463
32532
  return articleHandlerInstance.updateCfgValues(accessoire, {}, {}, true, true);
32464
32533
  case 13:
32465
32534
  ret = this.getFreePlaces(gridGroup, articles, accessoire);
32466
- _context18.next = 16;
32535
+ _context19.next = 16;
32467
32536
  return this.deleteElementFromSet(set, accessoire, undefined, undefined, true);
32468
32537
  case 16:
32469
- return _context18.abrupt("return", ret);
32538
+ return _context19.abrupt("return", ret);
32470
32539
  case 17:
32471
32540
  case "end":
32472
- return _context18.stop();
32541
+ return _context19.stop();
32473
32542
  }
32474
- }, _callee16, this);
32543
+ }, _callee17, this);
32475
32544
  }));
32476
- function getFreeShelfGrids(_x52, _x53) {
32545
+ function getFreeShelfGrids(_x56, _x57) {
32477
32546
  return _getFreeShelfGrids.apply(this, arguments);
32478
32547
  }
32479
32548
  return getFreeShelfGrids;
@@ -32532,62 +32601,62 @@ var DivaSetHandler = /*#__PURE__*/function () {
32532
32601
  }, {
32533
32602
  key: "moveShelfItemToGrid",
32534
32603
  value: function () {
32535
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
32604
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
32536
32605
  var _oldGrid$Cells$find;
32537
32606
  var artices, accessoire, oldParent, newParent, oldGrid, newGrid, index;
32538
- return _regeneratorRuntime.wrap(function _callee17$(_context19) {
32539
- while (1) switch (_context19.prev = _context19.next) {
32607
+ return _regeneratorRuntime.wrap(function _callee18$(_context20) {
32608
+ while (1) switch (_context20.prev = _context20.next) {
32540
32609
  case 0:
32541
32610
  artices = set.getDivaArticles();
32542
32611
  accessoire = artices[accessoireBasketId];
32543
32612
  oldParent = accessoire.accessoireParentArticle;
32544
32613
  newParent = artices[parentBasketId];
32545
32614
  if (!(accessoire.relatedToShelfGrid === undefined)) {
32546
- _context19.next = 6;
32615
+ _context20.next = 6;
32547
32616
  break;
32548
32617
  }
32549
- return _context19.abrupt("return");
32618
+ return _context20.abrupt("return");
32550
32619
  case 6:
32551
32620
  if (oldParent !== null && oldParent !== void 0 && oldParent.shelfPlanner) {
32552
- _context19.next = 8;
32621
+ _context20.next = 8;
32553
32622
  break;
32554
32623
  }
32555
- return _context19.abrupt("return");
32624
+ return _context20.abrupt("return");
32556
32625
  case 8:
32557
32626
  if (newParent !== null && newParent !== void 0 && newParent.shelfPlanner) {
32558
- _context19.next = 10;
32627
+ _context20.next = 10;
32559
32628
  break;
32560
32629
  }
32561
- return _context19.abrupt("return");
32630
+ return _context20.abrupt("return");
32562
32631
  case 10:
32563
32632
  oldGrid = oldParent.shelfPlanner.getGridByIndex(accessoire.relatedToShelfGrid);
32564
32633
  newGrid = newParent.shelfPlanner.getGridByGridName(gridName);
32565
32634
  if (oldGrid) {
32566
- _context19.next = 14;
32635
+ _context20.next = 14;
32567
32636
  break;
32568
32637
  }
32569
- return _context19.abrupt("return");
32638
+ return _context20.abrupt("return");
32570
32639
  case 14:
32571
32640
  if (newGrid) {
32572
- _context19.next = 16;
32641
+ _context20.next = 16;
32573
32642
  break;
32574
32643
  }
32575
- return _context19.abrupt("return");
32644
+ return _context20.abrupt("return");
32576
32645
  case 16:
32577
32646
  index = oldGrid === null || oldGrid === void 0 || (_oldGrid$Cells$find = oldGrid.Cells.find(function (c, i) {
32578
32647
  var _c$Article;
32579
32648
  return c.Index === c.InUse && ((_c$Article = c.Article) === null || _c$Article === void 0 ? void 0 : _c$Article.basketId) == accessoire.basketId;
32580
32649
  })) === null || _oldGrid$Cells$find === void 0 ? void 0 : _oldGrid$Cells$find.Index;
32581
32650
  if (!(index === undefined)) {
32582
- _context19.next = 19;
32651
+ _context20.next = 19;
32583
32652
  break;
32584
32653
  }
32585
- return _context19.abrupt("return");
32654
+ return _context20.abrupt("return");
32586
32655
  case 19:
32587
- _context19.next = 21;
32656
+ _context20.next = 21;
32588
32657
  return oldParent.shelfPlanner.deleteAccessoireOfCellInGrid(accessoire.relatedToShelfGrid, index);
32589
32658
  case 21:
32590
- _context19.next = 23;
32659
+ _context20.next = 23;
32591
32660
  return newParent.shelfPlanner.addAccessoireInCellInGrid(accessoire, newGrid.ShelfIndex, cellIndex, 'fitsOn');
32592
32661
  case 23:
32593
32662
  accessoire.relatedToShelfGrid = newGrid.ShelfIndex;
@@ -32599,17 +32668,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
32599
32668
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(oldParent.basketId).basketId);
32600
32669
  }
32601
32670
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(newParent.basketId).basketId);
32602
- _context19.next = 28;
32671
+ _context20.next = 28;
32603
32672
  return this.updateArticlesOptionStatesOfActSet(set, {}, [oldParent.basketId, newParent.basketId]);
32604
32673
  case 28:
32605
- return _context19.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
32674
+ return _context20.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
32606
32675
  case 29:
32607
32676
  case "end":
32608
- return _context19.stop();
32677
+ return _context20.stop();
32609
32678
  }
32610
- }, _callee17, this);
32679
+ }, _callee18, this);
32611
32680
  }));
32612
- function moveShelfItemToGrid(_x54, _x55, _x56, _x57, _x58) {
32681
+ function moveShelfItemToGrid(_x58, _x59, _x60, _x61, _x62) {
32613
32682
  return _moveShelfItemToGrid.apply(this, arguments);
32614
32683
  }
32615
32684
  return moveShelfItemToGrid;
@@ -32617,33 +32686,33 @@ var DivaSetHandler = /*#__PURE__*/function () {
32617
32686
  }, {
32618
32687
  key: "deleteAccessorieOnShelfPlanner",
32619
32688
  value: function () {
32620
- var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, gridIndex, cellIndex, parentBasketId, dontReload) {
32689
+ var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, gridIndex, cellIndex, parentBasketId, dontReload) {
32621
32690
  var _parentArticle$shelfP2;
32622
32691
  var parentArticle, articeToDelete, _parentArticle$shelfP3;
32623
- return _regeneratorRuntime.wrap(function _callee18$(_context20) {
32624
- while (1) switch (_context20.prev = _context20.next) {
32692
+ return _regeneratorRuntime.wrap(function _callee19$(_context21) {
32693
+ while (1) switch (_context21.prev = _context21.next) {
32625
32694
  case 0:
32626
32695
  parentArticle = set.getArticleByBasketId(parentBasketId);
32627
- _context20.next = 3;
32696
+ _context21.next = 3;
32628
32697
  return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP2 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP2 === void 0 ? void 0 : _parentArticle$shelfP2.deleteAccessoireOfCellInGrid(gridIndex, cellIndex);
32629
32698
  case 3:
32630
- articeToDelete = _context20.sent;
32699
+ articeToDelete = _context21.sent;
32631
32700
  if (!articeToDelete) {
32632
- _context20.next = 9;
32701
+ _context21.next = 9;
32633
32702
  break;
32634
32703
  }
32635
- _context20.next = 7;
32704
+ _context21.next = 7;
32636
32705
  return this.deleteElementFromSet(set, articeToDelete, false, undefined, dontReload);
32637
32706
  case 7:
32638
- _context20.next = 9;
32639
- return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged();
32707
+ _context21.next = 9;
32708
+ return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged({});
32640
32709
  case 9:
32641
32710
  case "end":
32642
- return _context20.stop();
32711
+ return _context21.stop();
32643
32712
  }
32644
- }, _callee18, this);
32713
+ }, _callee19, this);
32645
32714
  }));
32646
- function deleteAccessorieOnShelfPlanner(_x59, _x60, _x61, _x62, _x63) {
32715
+ function deleteAccessorieOnShelfPlanner(_x63, _x64, _x65, _x66, _x67) {
32647
32716
  return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
32648
32717
  }
32649
32718
  return deleteAccessorieOnShelfPlanner;
@@ -32651,25 +32720,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
32651
32720
  }, {
32652
32721
  key: "updatePlannerTrans",
32653
32722
  value: function () {
32654
- var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
32723
+ var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
32655
32724
  var updateConfig;
32656
- return _regeneratorRuntime.wrap(function _callee19$(_context21) {
32657
- while (1) switch (_context21.prev = _context21.next) {
32725
+ return _regeneratorRuntime.wrap(function _callee20$(_context22) {
32726
+ while (1) switch (_context22.prev = _context22.next) {
32658
32727
  case 0:
32659
32728
  updateConfig = set.plannerHandler.updatePlannerTrans(set.getSetId(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
32660
32729
  if (!updateConfig) {
32661
- _context21.next = 4;
32730
+ _context22.next = 4;
32662
32731
  break;
32663
32732
  }
32664
- _context21.next = 4;
32733
+ _context22.next = 4;
32665
32734
  return this.updateArticlesOptionStatesOfActSet(set, {}, [], true, 'initializingAfterTrans');
32666
32735
  case 4:
32667
32736
  case "end":
32668
- return _context21.stop();
32737
+ return _context22.stop();
32669
32738
  }
32670
- }, _callee19, this);
32739
+ }, _callee20, this);
32671
32740
  }));
32672
- function updatePlannerTrans(_x64, _x65, _x66, _x67, _x68, _x69, _x70) {
32741
+ function updatePlannerTrans(_x68, _x69, _x70, _x71, _x72, _x73, _x74) {
32673
32742
  return _updatePlannerTrans.apply(this, arguments);
32674
32743
  }
32675
32744
  return updatePlannerTrans;
@@ -32745,10 +32814,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
32745
32814
  }, {
32746
32815
  key: "deleteAccessoire",
32747
32816
  value: function () {
32748
- var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, articleCodex, parentBasketId) {
32817
+ var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, articleCodex, parentBasketId) {
32749
32818
  var divaArticles, articlesToDelete, key, articleToDelete, maxQuantity, i;
32750
- return _regeneratorRuntime.wrap(function _callee20$(_context22) {
32751
- while (1) switch (_context22.prev = _context22.next) {
32819
+ return _regeneratorRuntime.wrap(function _callee21$(_context23) {
32820
+ while (1) switch (_context23.prev = _context23.next) {
32752
32821
  case 0:
32753
32822
  divaArticles = set.getDivaArticles();
32754
32823
  articlesToDelete = [];
@@ -32760,7 +32829,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32760
32829
  }
32761
32830
  }
32762
32831
  if (!(articlesToDelete.length > 0)) {
32763
- _context22.next = 17;
32832
+ _context23.next = 17;
32764
32833
  break;
32765
32834
  }
32766
32835
  articlesToDelete.sort(function (a, b) {
@@ -32774,27 +32843,27 @@ var DivaSetHandler = /*#__PURE__*/function () {
32774
32843
  }
32775
32844
  }
32776
32845
  if (!(articleToDelete.quantity > 1)) {
32777
- _context22.next = 14;
32846
+ _context23.next = 14;
32778
32847
  break;
32779
32848
  }
32780
- _context22.next = 11;
32849
+ _context23.next = 11;
32781
32850
  return articleHandlerInstance.updateAccessoireQuantity(articleToDelete, articleToDelete.quantity - 1);
32782
32851
  case 11:
32783
- return _context22.abrupt("return", true);
32852
+ return _context23.abrupt("return", true);
32784
32853
  case 14:
32785
- _context22.next = 16;
32854
+ _context23.next = 16;
32786
32855
  return this.deleteElementFromSet(articleToDelete.set, articleToDelete);
32787
32856
  case 16:
32788
- return _context22.abrupt("return", _context22.sent);
32857
+ return _context23.abrupt("return", _context23.sent);
32789
32858
  case 17:
32790
- return _context22.abrupt("return", false);
32859
+ return _context23.abrupt("return", false);
32791
32860
  case 18:
32792
32861
  case "end":
32793
- return _context22.stop();
32862
+ return _context23.stop();
32794
32863
  }
32795
- }, _callee20, this);
32864
+ }, _callee21, this);
32796
32865
  }));
32797
- function deleteAccessoire(_x71, _x72, _x73) {
32866
+ function deleteAccessoire(_x75, _x76, _x77) {
32798
32867
  return _deleteAccessoire.apply(this, arguments);
32799
32868
  }
32800
32869
  return deleteAccessoire;
@@ -32920,19 +32989,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
32920
32989
  }, {
32921
32990
  key: "configSingleIsChanged",
32922
32991
  value: (function () {
32923
- var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, newIsConfigSingle, groupedOptions, groupedArticles) {
32992
+ var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, newIsConfigSingle, groupedOptions, groupedArticles) {
32924
32993
  var _set$getArticleByBask4, variantValues, key;
32925
- return _regeneratorRuntime.wrap(function _callee21$(_context23) {
32926
- while (1) switch (_context23.prev = _context23.next) {
32994
+ return _regeneratorRuntime.wrap(function _callee22$(_context24) {
32995
+ while (1) switch (_context24.prev = _context24.next) {
32927
32996
  case 0:
32928
32997
  set.configSingle = newIsConfigSingle;
32929
32998
  if (!(!set.configSingle && !set.CatalogData.onConfigSingleDontGeneralize && groupedOptions && groupedArticles)) {
32930
- _context23.next = 7;
32999
+ _context24.next = 7;
32931
33000
  break;
32932
33001
  }
32933
33002
  variantValues = (_set$getArticleByBask4 = set.getArticleByBasketId(groupedArticles[0])) === null || _set$getArticleByBask4 === void 0 ? void 0 : _set$getArticleByBask4.VariantValues;
32934
33003
  if (!variantValues) {
32935
- _context23.next = 7;
33004
+ _context24.next = 7;
32936
33005
  break;
32937
33006
  }
32938
33007
  for (key in variantValues) {
@@ -32940,15 +33009,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
32940
33009
  delete variantValues[key];
32941
33010
  }
32942
33011
  }
32943
- _context23.next = 7;
33012
+ _context24.next = 7;
32944
33013
  return this.updateArticlesOptionStatesOfActSet(set, variantValues, groupedArticles);
32945
33014
  case 7:
32946
33015
  case "end":
32947
- return _context23.stop();
33016
+ return _context24.stop();
32948
33017
  }
32949
- }, _callee21, this);
33018
+ }, _callee22, this);
32950
33019
  }));
32951
- function configSingleIsChanged(_x74, _x75, _x76, _x77) {
33020
+ function configSingleIsChanged(_x78, _x79, _x80, _x81) {
32952
33021
  return _configSingleIsChanged.apply(this, arguments);
32953
33022
  }
32954
33023
  return configSingleIsChanged;
@@ -33045,26 +33114,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
33045
33114
  }, {
33046
33115
  key: "loadConfigItemsOfActSetByConfigStepKey",
33047
33116
  value: function () {
33048
- var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, configStepKey, visible) {
33117
+ var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configStepKey, visible) {
33049
33118
  var _configItems$option;
33050
33119
  var configItems, paletteType, filterType, stepInfo, contentItemId;
33051
- return _regeneratorRuntime.wrap(function _callee22$(_context24) {
33052
- while (1) switch (_context24.prev = _context24.next) {
33120
+ return _regeneratorRuntime.wrap(function _callee23$(_context25) {
33121
+ while (1) switch (_context25.prev = _context25.next) {
33053
33122
  case 0:
33054
- _context24.next = 2;
33123
+ _context25.next = 2;
33055
33124
  return configTreeHandler.getConifgItemsForView(set, configStepKey);
33056
33125
  case 2:
33057
- configItems = _context24.sent;
33126
+ configItems = _context25.sent;
33058
33127
  paletteType = set.configTree.getCurPaletteType(set, configStepKey);
33059
33128
  configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
33060
- _context24.next = 7;
33129
+ _context25.next = 7;
33061
33130
  return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType);
33062
33131
  case 7:
33063
- configItems.configItems = _context24.sent;
33132
+ configItems.configItems = _context25.sent;
33064
33133
  filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
33065
33134
  stepInfo = set.configTree.getStepInfo(configStepKey);
33066
33135
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
33067
- return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
33136
+ return _context25.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
33068
33137
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
33069
33138
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
33070
33139
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -33077,11 +33146,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
33077
33146
  }));
33078
33147
  case 12:
33079
33148
  case "end":
33080
- return _context24.stop();
33149
+ return _context25.stop();
33081
33150
  }
33082
- }, _callee22, this);
33151
+ }, _callee23, this);
33083
33152
  }));
33084
- function loadConfigItemsOfActSetByConfigStepKey(_x78, _x79, _x80) {
33153
+ function loadConfigItemsOfActSetByConfigStepKey(_x82, _x83, _x84) {
33085
33154
  return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
33086
33155
  }
33087
33156
  return loadConfigItemsOfActSetByConfigStepKey;
@@ -33123,7 +33192,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33123
33192
  }, {
33124
33193
  key: "variantsEvaluator",
33125
33194
  value: (function () {
33126
- var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
33195
+ var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, configStepKey, paletteType) {
33127
33196
  var _configItems$0$option,
33128
33197
  _set$ViewConfig,
33129
33198
  _set$api$ReturnToFrom,
@@ -33131,22 +33200,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
33131
33200
  _set$CatalogData$hide,
33132
33201
  _this = this;
33133
33202
  var opt, previewType, targetArticles, variants;
33134
- return _regeneratorRuntime.wrap(function _callee23$(_context25) {
33135
- while (1) switch (_context25.prev = _context25.next) {
33203
+ return _regeneratorRuntime.wrap(function _callee24$(_context26) {
33204
+ while (1) switch (_context26.prev = _context26.next) {
33136
33205
  case 0:
33137
33206
  opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
33138
33207
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
33139
33208
  if (!(!opt || !previewType || opt.mergeIDMToOPG || opt.isDescribingState || configItems[0].isOPVG || configItems.length == 1 || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR') || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)))) {
33140
- _context25.next = 4;
33209
+ _context26.next = 4;
33141
33210
  break;
33142
33211
  }
33143
- return _context25.abrupt("return", configItems);
33212
+ return _context26.abrupt("return", configItems);
33144
33213
  case 4:
33145
33214
  targetArticles = set.configTree.getTargetArticles(configStepKey);
33146
- _context25.next = 7;
33215
+ _context26.next = 7;
33147
33216
  return this.calcVariants(set, configItems, targetArticles, opt.codex);
33148
33217
  case 7:
33149
- variants = _context25.sent;
33218
+ variants = _context26.sent;
33150
33219
  if (previewType) {
33151
33220
  configItems.map(function (c, index) {
33152
33221
  return c.pricePreviewPromise = {
@@ -33155,14 +33224,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
33155
33224
  };
33156
33225
  });
33157
33226
  }
33158
- return _context25.abrupt("return", configItems);
33227
+ return _context26.abrupt("return", configItems);
33159
33228
  case 10:
33160
33229
  case "end":
33161
- return _context25.stop();
33230
+ return _context26.stop();
33162
33231
  }
33163
- }, _callee23, this);
33232
+ }, _callee24, this);
33164
33233
  }));
33165
- function variantsEvaluator(_x81, _x82, _x83, _x84) {
33234
+ function variantsEvaluator(_x85, _x86, _x87, _x88) {
33166
33235
  return _variantsEvaluator.apply(this, arguments);
33167
33236
  }
33168
33237
  return variantsEvaluator;
@@ -33170,10 +33239,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
33170
33239
  }, {
33171
33240
  key: "calcVariants",
33172
33241
  value: function () {
33173
- var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(realSet, configItems, targetArticles, optionCodex) {
33242
+ var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(realSet, configItems, targetArticles, optionCodex) {
33174
33243
  var variantInfo, set, articles, origPrice, articleConfigs, i, basketId, totalConfig, key, parentNames, _i5, configItem, _configItem$parentNam, _configItem$parentNam2;
33175
- return _regeneratorRuntime.wrap(function _callee24$(_context26) {
33176
- while (1) switch (_context26.prev = _context26.next) {
33244
+ return _regeneratorRuntime.wrap(function _callee25$(_context27) {
33245
+ while (1) switch (_context27.prev = _context27.next) {
33177
33246
  case 0:
33178
33247
  variantInfo = [];
33179
33248
  set = realSet.cloneSet();
@@ -33198,37 +33267,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
33198
33267
  _i5 = 0;
33199
33268
  case 10:
33200
33269
  if (!(_i5 < configItems.length)) {
33201
- _context26.next = 23;
33270
+ _context27.next = 23;
33202
33271
  break;
33203
33272
  }
33204
33273
  configItem = configItems[_i5];
33205
33274
  if (!(configItem.parentName && configItem.isParentOPVG || configItem.idmOpgValCodex)) {
33206
- _context26.next = 19;
33275
+ _context27.next = 19;
33207
33276
  break;
33208
33277
  }
33209
33278
  if (!parentNames.includes((_configItem$parentNam = configItem.parentName) !== null && _configItem$parentNam !== void 0 ? _configItem$parentNam : configItem.idmOpgValCodex)) {
33210
- _context26.next = 18;
33279
+ _context27.next = 18;
33211
33280
  break;
33212
33281
  }
33213
33282
  variantInfo.push(variantInfo[_i5 - 1]);
33214
- return _context26.abrupt("continue", 20);
33283
+ return _context27.abrupt("continue", 20);
33215
33284
  case 18:
33216
33285
  parentNames.push((_configItem$parentNam2 = configItem.parentName) !== null && _configItem$parentNam2 !== void 0 ? _configItem$parentNam2 : configItem.idmOpgValCodex);
33217
33286
  case 19:
33218
33287
  variantInfo.push(this.getVariant(set, configItem, articleConfigs, totalConfig, targetArticles, optionCodex, origPrice, _i5, variantInfo[_i5 - 1]));
33219
33288
  case 20:
33220
33289
  _i5++;
33221
- _context26.next = 10;
33290
+ _context27.next = 10;
33222
33291
  break;
33223
33292
  case 23:
33224
- return _context26.abrupt("return", variantInfo);
33293
+ return _context27.abrupt("return", variantInfo);
33225
33294
  case 24:
33226
33295
  case "end":
33227
- return _context26.stop();
33296
+ return _context27.stop();
33228
33297
  }
33229
- }, _callee24, this);
33298
+ }, _callee25, this);
33230
33299
  }));
33231
- function calcVariants(_x85, _x86, _x87, _x88) {
33300
+ function calcVariants(_x89, _x90, _x91, _x92) {
33232
33301
  return _calcVariants.apply(this, arguments);
33233
33302
  }
33234
33303
  return calcVariants;
@@ -33236,23 +33305,23 @@ var DivaSetHandler = /*#__PURE__*/function () {
33236
33305
  }, {
33237
33306
  key: "getVariant",
33238
33307
  value: function () {
33239
- var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
33308
+ var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
33240
33309
  var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, basketId, origConfig, key, hash, dataHash, _i6, endTime, calcTime, price, priceObj;
33241
- return _regeneratorRuntime.wrap(function _callee25$(_context27) {
33242
- while (1) switch (_context27.prev = _context27.next) {
33310
+ return _regeneratorRuntime.wrap(function _callee26$(_context28) {
33311
+ while (1) switch (_context28.prev = _context28.next) {
33243
33312
  case 0:
33244
33313
  firstPrice = undefined;
33245
33314
  prevProm = undefined;
33246
33315
  if (!previousPromise) {
33247
- _context27.next = 9;
33316
+ _context28.next = 9;
33248
33317
  break;
33249
33318
  }
33250
- _context27.next = 5;
33319
+ _context28.next = 5;
33251
33320
  return previousPromise;
33252
33321
  case 5:
33253
- prevProm = _context27.sent;
33322
+ prevProm = _context28.sent;
33254
33323
  firstPrice = prevProm.firstPrice;
33255
- _context27.next = 10;
33324
+ _context28.next = 10;
33256
33325
  break;
33257
33326
  case 9:
33258
33327
  firstPrice = set.getSetPrice();
@@ -33285,11 +33354,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
33285
33354
  hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
33286
33355
  dataHash = set.CatalogData.getVariantsPriceByHash(hash);
33287
33356
  if (!dataHash) {
33288
- _context27.next = 21;
33357
+ _context28.next = 21;
33289
33358
  break;
33290
33359
  }
33291
33360
  LOG$9.debug('calcingVariant from Option:' + optionCodex + ' and index: ' + index + ' hash hit!', dataHash, [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))), targetArticles);
33292
- return _context27.abrupt("return", _objectSpread$9(_objectSpread$9({}, dataHash), {}, {
33361
+ return _context28.abrupt("return", _objectSpread$9(_objectSpread$9({}, dataHash), {}, {
33293
33362
  origPrice: origPrice,
33294
33363
  firstPrice: firstPrice
33295
33364
  }));
@@ -33297,14 +33366,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
33297
33366
  _i6 = 0;
33298
33367
  case 22:
33299
33368
  if (!(_i6 < variantValues.length)) {
33300
- _context27.next = 28;
33369
+ _context28.next = 28;
33301
33370
  break;
33302
33371
  }
33303
- _context27.next = 25;
33372
+ _context28.next = 25;
33304
33373
  return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i6], [targetArticles[_i6]], true, 'calcVariant');
33305
33374
  case 25:
33306
33375
  _i6++;
33307
- _context27.next = 22;
33376
+ _context28.next = 22;
33308
33377
  break;
33309
33378
  case 28:
33310
33379
  endTime = new Date();
@@ -33322,14 +33391,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
33322
33391
  hashObj: [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))
33323
33392
  };
33324
33393
  set.CatalogData.setVariantsPriceByHash(hash, priceObj);
33325
- return _context27.abrupt("return", priceObj);
33394
+ return _context28.abrupt("return", priceObj);
33326
33395
  case 35:
33327
33396
  case "end":
33328
- return _context27.stop();
33397
+ return _context28.stop();
33329
33398
  }
33330
- }, _callee25, this);
33399
+ }, _callee26, this);
33331
33400
  }));
33332
- function getVariant(_x89, _x90, _x91, _x92, _x93, _x94, _x95, _x96, _x97) {
33401
+ function getVariant(_x93, _x94, _x95, _x96, _x97, _x98, _x99, _x100, _x101) {
33333
33402
  return _getVariant.apply(this, arguments);
33334
33403
  }
33335
33404
  return getVariant;
@@ -33337,53 +33406,53 @@ var DivaSetHandler = /*#__PURE__*/function () {
33337
33406
  }, {
33338
33407
  key: "checkIfPriceDiffers",
33339
33408
  value: function () {
33340
- var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(promises) {
33409
+ var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(promises) {
33341
33410
  var results, i, price, j;
33342
- return _regeneratorRuntime.wrap(function _callee26$(_context28) {
33343
- while (1) switch (_context28.prev = _context28.next) {
33411
+ return _regeneratorRuntime.wrap(function _callee27$(_context29) {
33412
+ while (1) switch (_context29.prev = _context29.next) {
33344
33413
  case 0:
33345
33414
  results = [];
33346
33415
  i = 0;
33347
33416
  case 2:
33348
33417
  if (!(i < promises.length)) {
33349
- _context28.next = 19;
33418
+ _context29.next = 19;
33350
33419
  break;
33351
33420
  }
33352
- _context28.t0 = results;
33353
- _context28.next = 6;
33421
+ _context29.t0 = results;
33422
+ _context29.next = 6;
33354
33423
  return promises[i];
33355
33424
  case 6:
33356
- _context28.t1 = _context28.sent;
33357
- _context28.t0.push.call(_context28.t0, _context28.t1);
33425
+ _context29.t1 = _context29.sent;
33426
+ _context29.t0.push.call(_context29.t0, _context29.t1);
33358
33427
  price = results[0].price;
33359
33428
  j = 1;
33360
33429
  case 10:
33361
33430
  if (!(j < results.length)) {
33362
- _context28.next = 16;
33431
+ _context29.next = 16;
33363
33432
  break;
33364
33433
  }
33365
33434
  if (!(price !== results[j].price)) {
33366
- _context28.next = 13;
33435
+ _context29.next = 13;
33367
33436
  break;
33368
33437
  }
33369
- return _context28.abrupt("return", true);
33438
+ return _context29.abrupt("return", true);
33370
33439
  case 13:
33371
33440
  j++;
33372
- _context28.next = 10;
33441
+ _context29.next = 10;
33373
33442
  break;
33374
33443
  case 16:
33375
33444
  i++;
33376
- _context28.next = 2;
33445
+ _context29.next = 2;
33377
33446
  break;
33378
33447
  case 19:
33379
- return _context28.abrupt("return", false);
33448
+ return _context29.abrupt("return", false);
33380
33449
  case 20:
33381
33450
  case "end":
33382
- return _context28.stop();
33451
+ return _context29.stop();
33383
33452
  }
33384
- }, _callee26);
33453
+ }, _callee27);
33385
33454
  }));
33386
- function checkIfPriceDiffers(_x98) {
33455
+ function checkIfPriceDiffers(_x102) {
33387
33456
  return _checkIfPriceDiffers.apply(this, arguments);
33388
33457
  }
33389
33458
  return checkIfPriceDiffers;
@@ -33397,11 +33466,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
33397
33466
  }, {
33398
33467
  key: "updateArticlesOptionStatesOfActSet",
33399
33468
  value: (function () {
33400
- var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
33469
+ var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
33401
33470
  var _Object$keys, _resultPlannerUpdate;
33402
33471
  var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
33403
- return _regeneratorRuntime.wrap(function _callee27$(_context29) {
33404
- while (1) switch (_context29.prev = _context29.next) {
33472
+ return _regeneratorRuntime.wrap(function _callee28$(_context30) {
33473
+ while (1) switch (_context30.prev = _context30.next) {
33405
33474
  case 0:
33406
33475
  elementsToDeleteById = [];
33407
33476
  targetArticlesToUpdateOnly = [];
@@ -33413,50 +33482,50 @@ var DivaSetHandler = /*#__PURE__*/function () {
33413
33482
  } else {
33414
33483
  targetArticlesToUpdateOnly = targetArticlesWithNewValues;
33415
33484
  }
33416
- _context29.next = 5;
33485
+ _context30.next = 5;
33417
33486
  return articleHandlerInstance.updateArticlesOptionStates(myValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
33418
33487
  case 5:
33419
- retValues = _context29.sent;
33488
+ retValues = _context30.sent;
33420
33489
  targetArticlesWithNewValues = retValues.targetArticlesToUpdate;
33421
33490
  if (!(retValues.partlistArticlesToLoad.length > 0)) {
33422
- _context29.next = 16;
33491
+ _context30.next = 16;
33423
33492
  break;
33424
33493
  }
33425
33494
  diff = targetArticlesToUpdateOnly.length - Object.keys(set.getDivaArticles()).length;
33426
33495
  if (!(diff == 0 || partlistDiff == diff)) {
33427
- _context29.next = 14;
33496
+ _context30.next = 14;
33428
33497
  break;
33429
33498
  }
33430
- _context29.next = 12;
33499
+ _context30.next = 12;
33431
33500
  return articleHandlerInstance.correctPartlistArticlesByGlobalRules(set, retValues.partlistArticlesToLoad, set.CatalogData.bundleRules, {
33432
33501
  doChange: false
33433
33502
  });
33434
33503
  case 12:
33435
- _context29.next = 16;
33504
+ _context30.next = 16;
33436
33505
  break;
33437
33506
  case 14:
33438
- _context29.next = 16;
33507
+ _context30.next = 16;
33439
33508
  return this.updateArticlesOptionStatesOfActSet(set, {}, targetArticlesWithNewValues, ignorePlanner, from, diff);
33440
33509
  case 16:
33441
33510
  if (!(from !== 'initializingPartlist')) {
33442
- _context29.next = 19;
33511
+ _context30.next = 19;
33443
33512
  break;
33444
33513
  }
33445
- _context29.next = 19;
33514
+ _context30.next = 19;
33446
33515
  return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
33447
33516
  case 19:
33448
33517
  if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
33449
33518
 
33450
33519
  //Update Planner - check if planner data changed
33451
33520
  if (!(!ignorePlanner && from != 'calcVariant')) {
33452
- _context29.next = 55;
33521
+ _context30.next = 55;
33453
33522
  break;
33454
33523
  }
33455
33524
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
33456
- _context29.next = 24;
33525
+ _context30.next = 24;
33457
33526
  return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
33458
33527
  case 24:
33459
- resultPlannerUpdate = _context29.sent;
33528
+ resultPlannerUpdate = _context30.sent;
33460
33529
  elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
33461
33530
  for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
33462
33531
  articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
@@ -33466,35 +33535,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
33466
33535
  }
33467
33536
  }
33468
33537
  if (!resultPlannerUpdate.doDeleteBackGrid) {
33469
- _context29.next = 34;
33538
+ _context30.next = 34;
33470
33539
  break;
33471
33540
  }
33472
- _context29.next = 30;
33541
+ _context30.next = 30;
33473
33542
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
33474
33543
  case 30:
33475
- result = _context29.sent;
33544
+ result = _context30.sent;
33476
33545
  //Others are deleted recursive
33477
33546
  if (result.selectElementId) {
33478
33547
  resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
33479
33548
  }
33480
- _context29.next = 41;
33549
+ _context30.next = 41;
33481
33550
  break;
33482
33551
  case 34:
33483
33552
  i = 0;
33484
33553
  case 35:
33485
33554
  if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
33486
- _context29.next = 41;
33555
+ _context30.next = 41;
33487
33556
  break;
33488
33557
  }
33489
- _context29.next = 38;
33558
+ _context30.next = 38;
33490
33559
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
33491
33560
  case 38:
33492
33561
  i++;
33493
- _context29.next = 35;
33562
+ _context30.next = 35;
33494
33563
  break;
33495
33564
  case 41:
33496
33565
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
33497
- _context29.next = 54;
33566
+ _context30.next = 54;
33498
33567
  break;
33499
33568
  }
33500
33569
  //Todo copy these elements
@@ -33502,20 +33571,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
33502
33571
  i = 0;
33503
33572
  case 44:
33504
33573
  if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
33505
- _context29.next = 52;
33574
+ _context30.next = 52;
33506
33575
  break;
33507
33576
  }
33508
- _context29.next = 47;
33577
+ _context30.next = 47;
33509
33578
  return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
33510
33579
  case 47:
33511
- newArticle = _context29.sent;
33580
+ newArticle = _context30.sent;
33512
33581
  articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
33513
33582
  case 49:
33514
33583
  i++;
33515
- _context29.next = 44;
33584
+ _context30.next = 44;
33516
33585
  break;
33517
33586
  case 52:
33518
- _context29.next = 54;
33587
+ _context30.next = 54;
33519
33588
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
33520
33589
  dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
33521
33590
  copyType: resultPlannerUpdate.copyType,
@@ -33528,18 +33597,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
33528
33597
  if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
33529
33598
  this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]);
33530
33599
  }
33531
- return _context29.abrupt("return", {
33600
+ return _context30.abrupt("return", {
33532
33601
  articleCountChanged: elementsToDeleteById.length > 0,
33533
33602
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
33534
33603
  setId: set.getSetId()
33535
33604
  });
33536
33605
  case 57:
33537
33606
  case "end":
33538
- return _context29.stop();
33607
+ return _context30.stop();
33539
33608
  }
33540
- }, _callee27, this);
33609
+ }, _callee28, this);
33541
33610
  }));
33542
- function updateArticlesOptionStatesOfActSet(_x99, _x100, _x101, _x102, _x103, _x104) {
33611
+ function updateArticlesOptionStatesOfActSet(_x103, _x104, _x105, _x106, _x107, _x108) {
33543
33612
  return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
33544
33613
  }
33545
33614
  return updateArticlesOptionStatesOfActSet;
@@ -33593,32 +33662,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
33593
33662
  }, {
33594
33663
  key: "updateEdoArticles",
33595
33664
  value: function () {
33596
- var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, edoArticlesToLoad) {
33665
+ var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, edoArticlesToLoad) {
33597
33666
  var oldBasketIds, i, article, newArticles, _i7, _i8;
33598
- return _regeneratorRuntime.wrap(function _callee28$(_context30) {
33599
- while (1) switch (_context30.prev = _context30.next) {
33667
+ return _regeneratorRuntime.wrap(function _callee29$(_context31) {
33668
+ while (1) switch (_context31.prev = _context31.next) {
33600
33669
  case 0:
33601
33670
  if (!(set.edoExtraArticles.length > 0 || edoArticlesToLoad.length > 0)) {
33602
- _context30.next = 22;
33671
+ _context31.next = 22;
33603
33672
  break;
33604
33673
  }
33605
33674
  oldBasketIds = _toConsumableArray(set.edoExtraArticles);
33606
33675
  i = 0;
33607
33676
  case 3:
33608
33677
  if (!(i < set.edoExtraArticles.length)) {
33609
- _context30.next = 11;
33678
+ _context31.next = 11;
33610
33679
  break;
33611
33680
  }
33612
33681
  article = set.getArticleByBasketId(set.edoExtraArticles[i]);
33613
33682
  if (!article) {
33614
- _context30.next = 8;
33683
+ _context31.next = 8;
33615
33684
  break;
33616
33685
  }
33617
- _context30.next = 8;
33686
+ _context31.next = 8;
33618
33687
  return this.deleteElementFromSet(set, article);
33619
33688
  case 8:
33620
33689
  i++;
33621
- _context30.next = 3;
33690
+ _context31.next = 3;
33622
33691
  break;
33623
33692
  case 11:
33624
33693
  set.edoExtraArticles = [];
@@ -33626,18 +33695,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
33626
33695
  _i7 = 0;
33627
33696
  case 14:
33628
33697
  if (!(_i7 < edoArticlesToLoad.length)) {
33629
- _context30.next = 21;
33698
+ _context31.next = 21;
33630
33699
  break;
33631
33700
  }
33632
- _context30.next = 17;
33701
+ _context31.next = 17;
33633
33702
  return this.addArticleToActSet(set, edoArticlesToLoad[_i7].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i7]), {}, {
33634
33703
  basketId: oldBasketIds[_i7]
33635
33704
  }), true);
33636
33705
  case 17:
33637
- newArticles[_i7] = _context30.sent;
33706
+ newArticles[_i7] = _context31.sent;
33638
33707
  case 18:
33639
33708
  _i7++;
33640
- _context30.next = 14;
33709
+ _context31.next = 14;
33641
33710
  break;
33642
33711
  case 21:
33643
33712
  for (_i8 = 0; _i8 < newArticles.length; _i8++) {
@@ -33645,11 +33714,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
33645
33714
  }
33646
33715
  case 22:
33647
33716
  case "end":
33648
- return _context30.stop();
33717
+ return _context31.stop();
33649
33718
  }
33650
- }, _callee28, this);
33719
+ }, _callee29, this);
33651
33720
  }));
33652
- function updateEdoArticles(_x105, _x106) {
33721
+ function updateEdoArticles(_x109, _x110) {
33653
33722
  return _updateEdoArticles.apply(this, arguments);
33654
33723
  }
33655
33724
  return updateEdoArticles;
@@ -33815,11 +33884,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
33815
33884
  }, {
33816
33885
  key: "fillOrderLinesAndOrderSets",
33817
33886
  value: function () {
33818
- var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
33887
+ var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
33819
33888
  var _set$getMatchingProdu2, _set$getMatchingProdu3;
33820
33889
  var orderSets, basketData, set, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, customDimensions, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
33821
- return _regeneratorRuntime.wrap(function _callee29$(_context31) {
33822
- while (1) switch (_context31.prev = _context31.next) {
33890
+ return _regeneratorRuntime.wrap(function _callee30$(_context32) {
33891
+ while (1) switch (_context32.prev = _context32.next) {
33823
33892
  case 0:
33824
33893
  orderSets = [];
33825
33894
  basketData = divaBasketHandler.actBasket;
@@ -33831,32 +33900,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
33831
33900
  }
33832
33901
  basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
33833
33902
  basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
33834
- _context31.t0 = _regeneratorRuntime.keys(sets);
33903
+ _context32.t0 = _regeneratorRuntime.keys(sets);
33835
33904
  case 8:
33836
- if ((_context31.t1 = _context31.t0()).done) {
33837
- _context31.next = 32;
33905
+ if ((_context32.t1 = _context32.t0()).done) {
33906
+ _context32.next = 32;
33838
33907
  break;
33839
33908
  }
33840
- key = _context31.t1.value;
33909
+ key = _context32.t1.value;
33841
33910
  _set = sets[key];
33842
33911
  catalogData = _set.CatalogData;
33843
33912
  articles = _set.getDivaArticles();
33844
- _context31.next = 15;
33913
+ _context32.next = 15;
33845
33914
  return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
33846
33915
  case 15:
33847
- newOrderSet = _context31.sent;
33916
+ newOrderSet = _context32.sent;
33848
33917
  basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
33849
- _context31.next = 19;
33918
+ _context32.next = 19;
33850
33919
  return _set.getCustomDimensionsOfActSet();
33851
33920
  case 19:
33852
- customDimensions = _context31.sent;
33921
+ customDimensions = _context32.sent;
33853
33922
  OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
33854
33923
  articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
33855
33924
  if (OrderLinesOfActSet.length) {
33856
- _context31.next = 24;
33925
+ _context32.next = 24;
33857
33926
  break;
33858
33927
  }
33859
- return _context31.abrupt("continue", 8);
33928
+ return _context32.abrupt("continue", 8);
33860
33929
  case 24:
33861
33930
  OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
33862
33931
  if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
@@ -33878,7 +33947,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33878
33947
  }
33879
33948
  newOrderSet.setOrderLines(OrderLinesOfActSet);
33880
33949
  orderSets.push(newOrderSet);
33881
- _context31.next = 8;
33950
+ _context32.next = 8;
33882
33951
  break;
33883
33952
  case 32:
33884
33953
  //fill diva3DProject for renderings & AR Converter
@@ -33886,7 +33955,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33886
33955
  i = 0;
33887
33956
  case 34:
33888
33957
  if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
33889
- _context31.next = 49;
33958
+ _context32.next = 49;
33890
33959
  break;
33891
33960
  }
33892
33961
  oderSetsIsInActPlanning = false;
@@ -33894,18 +33963,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
33894
33963
  j = 0;
33895
33964
  case 38:
33896
33965
  if (!(j < orderSets.length)) {
33897
- _context31.next = 45;
33966
+ _context32.next = 45;
33898
33967
  break;
33899
33968
  }
33900
33969
  if (!(orderSets[j].SetID == setId)) {
33901
- _context31.next = 42;
33970
+ _context32.next = 42;
33902
33971
  break;
33903
33972
  }
33904
33973
  oderSetsIsInActPlanning = true;
33905
- return _context31.abrupt("break", 45);
33974
+ return _context32.abrupt("break", 45);
33906
33975
  case 42:
33907
33976
  j++;
33908
- _context31.next = 38;
33977
+ _context32.next = 38;
33909
33978
  break;
33910
33979
  case 45:
33911
33980
  if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
@@ -33913,7 +33982,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33913
33982
  }
33914
33983
  case 46:
33915
33984
  i++;
33916
- _context31.next = 34;
33985
+ _context32.next = 34;
33917
33986
  break;
33918
33987
  case 49:
33919
33988
  basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
@@ -33922,14 +33991,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
33922
33991
  } else {
33923
33992
  basketData.setOrderSets(orderSets);
33924
33993
  }
33925
- return _context31.abrupt("return", basketData);
33994
+ return _context32.abrupt("return", basketData);
33926
33995
  case 52:
33927
33996
  case "end":
33928
- return _context31.stop();
33997
+ return _context32.stop();
33929
33998
  }
33930
- }, _callee29, this);
33999
+ }, _callee30, this);
33931
34000
  }));
33932
- function fillOrderLinesAndOrderSets(_x107, _x108, _x109, _x110, _x111) {
34001
+ function fillOrderLinesAndOrderSets(_x111, _x112, _x113, _x114, _x115) {
33933
34002
  return _fillOrderLinesAndOrderSets.apply(this, arguments);
33934
34003
  }
33935
34004
  return fillOrderLinesAndOrderSets;
@@ -34013,11 +34082,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
34013
34082
  }, {
34014
34083
  key: "getOrderSet",
34015
34084
  value: function () {
34016
- var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, catalogData, divaNr, repairOnly, returnTo) {
34085
+ var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, catalogData, divaNr, repairOnly, returnTo) {
34017
34086
  var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
34018
34087
  var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
34019
- return _regeneratorRuntime.wrap(function _callee30$(_context32) {
34020
- while (1) switch (_context32.prev = _context32.next) {
34088
+ return _regeneratorRuntime.wrap(function _callee31$(_context33) {
34089
+ while (1) switch (_context33.prev = _context33.next) {
34021
34090
  case 0:
34022
34091
  dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
34023
34092
  DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
@@ -34029,7 +34098,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34029
34098
  hqRenderScript = undefined;
34030
34099
  dimensions = {};
34031
34100
  if (dontGenerateImages) {
34032
- _context32.next = 28;
34101
+ _context33.next = 28;
34033
34102
  break;
34034
34103
  }
34035
34104
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -34037,10 +34106,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
34037
34106
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
34038
34107
  promise3DAlternate = this.getAlternateSetImages(set);
34039
34108
  }
34040
- _context32.next = 15;
34109
+ _context33.next = 15;
34041
34110
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
34042
34111
  case 15:
34043
- _yield$Promise$all = _context32.sent;
34112
+ _yield$Promise$all = _context33.sent;
34044
34113
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
34045
34114
  _yield$Promise$all2$ = _yield$Promise$all2[0];
34046
34115
  setImage = _yield$Promise$all2$.url;
@@ -34048,10 +34117,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
34048
34117
  urlToPlanning2D = _yield$Promise$all2[1];
34049
34118
  alternateSetImages = _yield$Promise$all2[2];
34050
34119
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
34051
- _context32.next = 25;
34120
+ _context33.next = 25;
34052
34121
  return Promise.all([promiseHQRenderScript]);
34053
34122
  case 25:
34054
- _yield$Promise$all3 = _context32.sent;
34123
+ _yield$Promise$all3 = _context33.sent;
34055
34124
  _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
34056
34125
  hqRenderScript = _yield$Promise$all4[0];
34057
34126
  case 28:
@@ -34113,14 +34182,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
34113
34182
  MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
34114
34183
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
34115
34184
  });
34116
- return _context32.abrupt("return", orderSet);
34185
+ return _context33.abrupt("return", orderSet);
34117
34186
  case 34:
34118
34187
  case "end":
34119
- return _context32.stop();
34188
+ return _context33.stop();
34120
34189
  }
34121
- }, _callee30, this);
34190
+ }, _callee31, this);
34122
34191
  }));
34123
- function getOrderSet(_x112, _x113, _x114, _x115, _x116) {
34192
+ function getOrderSet(_x116, _x117, _x118, _x119, _x120) {
34124
34193
  return _getOrderSet.apply(this, arguments);
34125
34194
  }
34126
34195
  return getOrderSet;
@@ -34133,31 +34202,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
34133
34202
  }, {
34134
34203
  key: "getSetImage",
34135
34204
  value: (function () {
34136
- var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, overwriteLastSavedRendering) {
34205
+ var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, overwriteLastSavedRendering) {
34137
34206
  var is3D, _yield$set$plannerHan, dimensions, url;
34138
- return _regeneratorRuntime.wrap(function _callee31$(_context33) {
34139
- while (1) switch (_context33.prev = _context33.next) {
34207
+ return _regeneratorRuntime.wrap(function _callee32$(_context34) {
34208
+ while (1) switch (_context34.prev = _context34.next) {
34140
34209
  case 0:
34141
34210
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34142
34211
  if (!is3D) {
34143
- _context33.next = 10;
34212
+ _context34.next = 10;
34144
34213
  break;
34145
34214
  }
34146
- _context33.next = 4;
34215
+ _context34.next = 4;
34147
34216
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
34148
34217
  case 4:
34149
- _context33.next = 6;
34218
+ _context34.next = 6;
34150
34219
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34151
34220
  case 6:
34152
- _yield$set$plannerHan = _context33.sent;
34221
+ _yield$set$plannerHan = _context34.sent;
34153
34222
  dimensions = _yield$set$plannerHan.dimensions;
34154
34223
  url = _yield$set$plannerHan.url;
34155
- return _context33.abrupt("return", {
34224
+ return _context34.abrupt("return", {
34156
34225
  dimensions: dimensions,
34157
34226
  url: url
34158
34227
  });
34159
34228
  case 10:
34160
- return _context33.abrupt("return", {
34229
+ return _context34.abrupt("return", {
34161
34230
  dimensions: {
34162
34231
  w: undefined,
34163
34232
  h: undefined,
@@ -34166,11 +34235,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
34166
34235
  });
34167
34236
  case 11:
34168
34237
  case "end":
34169
- return _context33.stop();
34238
+ return _context34.stop();
34170
34239
  }
34171
- }, _callee31);
34240
+ }, _callee32);
34172
34241
  }));
34173
- function getSetImage(_x117, _x118) {
34242
+ function getSetImage(_x121, _x122) {
34174
34243
  return _getSetImage.apply(this, arguments);
34175
34244
  }
34176
34245
  return getSetImage;
@@ -34178,45 +34247,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
34178
34247
  }, {
34179
34248
  key: "getHQRenderScript",
34180
34249
  value: function () {
34181
- var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, divaNr) {
34250
+ var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, divaNr) {
34182
34251
  var is3D, hqRenderScript, createdHQRenderScript;
34183
- return _regeneratorRuntime.wrap(function _callee32$(_context34) {
34184
- while (1) switch (_context34.prev = _context34.next) {
34252
+ return _regeneratorRuntime.wrap(function _callee33$(_context35) {
34253
+ while (1) switch (_context35.prev = _context35.next) {
34185
34254
  case 0:
34186
34255
  //if not 3d
34187
34256
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34188
34257
  if (is3D) {
34189
- _context34.next = 3;
34258
+ _context35.next = 3;
34190
34259
  break;
34191
34260
  }
34192
- return _context34.abrupt("return");
34261
+ return _context35.abrupt("return");
34193
34262
  case 3:
34194
- _context34.next = 5;
34263
+ _context35.next = 5;
34195
34264
  return set.plannerHandler.saveSetHQRenderScript();
34196
34265
  case 5:
34197
34266
  hqRenderScript = set.plannerHandler.getSetHQRenderScript();
34198
34267
  if (hqRenderScript) {
34199
- _context34.next = 8;
34268
+ _context35.next = 8;
34200
34269
  break;
34201
34270
  }
34202
- return _context34.abrupt("return");
34271
+ return _context35.abrupt("return");
34203
34272
  case 8:
34204
- _context34.next = 10;
34273
+ _context35.next = 10;
34205
34274
  return set.api.postHQRenderScript({
34206
34275
  divaNr: divaNr,
34207
34276
  hqRenderscript: hqRenderScript,
34208
34277
  organization: set.api.OrganizationId
34209
34278
  });
34210
34279
  case 10:
34211
- createdHQRenderScript = _context34.sent;
34212
- return _context34.abrupt("return", createdHQRenderScript);
34280
+ createdHQRenderScript = _context35.sent;
34281
+ return _context35.abrupt("return", createdHQRenderScript);
34213
34282
  case 12:
34214
34283
  case "end":
34215
- return _context34.stop();
34284
+ return _context35.stop();
34216
34285
  }
34217
- }, _callee32);
34286
+ }, _callee33);
34218
34287
  }));
34219
- function getHQRenderScript(_x119, _x120) {
34288
+ function getHQRenderScript(_x123, _x124) {
34220
34289
  return _getHQRenderScript.apply(this, arguments);
34221
34290
  }
34222
34291
  return getHQRenderScript;
@@ -34230,34 +34299,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
34230
34299
  }, {
34231
34300
  key: "getAlternateSetImages",
34232
34301
  value: (function () {
34233
- var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set) {
34302
+ var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
34234
34303
  var is2D, catalogData, setImages;
34235
- return _regeneratorRuntime.wrap(function _callee33$(_context35) {
34236
- while (1) switch (_context35.prev = _context35.next) {
34304
+ return _regeneratorRuntime.wrap(function _callee34$(_context36) {
34305
+ while (1) switch (_context36.prev = _context36.next) {
34237
34306
  case 0:
34238
34307
  is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
34239
34308
  if (!(is2D || set.onlyRunLogic)) {
34240
- _context35.next = 3;
34309
+ _context36.next = 3;
34241
34310
  break;
34242
34311
  }
34243
- return _context35.abrupt("return", []);
34312
+ return _context36.abrupt("return", []);
34244
34313
  case 3:
34245
34314
  catalogData = set.CatalogData;
34246
- _context35.next = 6;
34315
+ _context36.next = 6;
34247
34316
  return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
34248
34317
  case 6:
34249
- _context35.next = 8;
34318
+ _context36.next = 8;
34250
34319
  return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
34251
34320
  case 8:
34252
- setImages = _context35.sent;
34253
- return _context35.abrupt("return", setImages);
34321
+ setImages = _context36.sent;
34322
+ return _context36.abrupt("return", setImages);
34254
34323
  case 10:
34255
34324
  case "end":
34256
- return _context35.stop();
34325
+ return _context36.stop();
34257
34326
  }
34258
- }, _callee33);
34327
+ }, _callee34);
34259
34328
  }));
34260
- function getAlternateSetImages(_x121) {
34329
+ function getAlternateSetImages(_x125) {
34261
34330
  return _getAlternateSetImages.apply(this, arguments);
34262
34331
  }
34263
34332
  return getAlternateSetImages;
@@ -34265,30 +34334,30 @@ var DivaSetHandler = /*#__PURE__*/function () {
34265
34334
  }, {
34266
34335
  key: "get2DSetImage",
34267
34336
  value: function () {
34268
- var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
34337
+ var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set) {
34269
34338
  var urlToPlanning2D, catalogData, planning2DAsJPGBase64;
34270
- return _regeneratorRuntime.wrap(function _callee34$(_context36) {
34271
- while (1) switch (_context36.prev = _context36.next) {
34339
+ return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34340
+ while (1) switch (_context37.prev = _context37.next) {
34272
34341
  case 0:
34273
34342
  urlToPlanning2D = undefined, catalogData = set.CatalogData;
34274
34343
  planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
34275
34344
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
34276
- _context36.next = 6;
34345
+ _context37.next = 6;
34277
34346
  break;
34278
34347
  }
34279
- _context36.next = 5;
34348
+ _context37.next = 5;
34280
34349
  return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
34281
34350
  case 5:
34282
- urlToPlanning2D = _context36.sent;
34351
+ urlToPlanning2D = _context37.sent;
34283
34352
  case 6:
34284
- return _context36.abrupt("return", urlToPlanning2D);
34353
+ return _context37.abrupt("return", urlToPlanning2D);
34285
34354
  case 7:
34286
34355
  case "end":
34287
- return _context36.stop();
34356
+ return _context37.stop();
34288
34357
  }
34289
- }, _callee34);
34358
+ }, _callee35);
34290
34359
  }));
34291
- function get2DSetImage(_x122) {
34360
+ function get2DSetImage(_x126) {
34292
34361
  return _get2DSetImage.apply(this, arguments);
34293
34362
  }
34294
34363
  return get2DSetImage;
@@ -34328,25 +34397,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
34328
34397
  }, {
34329
34398
  key: "addOrderSetArticlesToExistingSet",
34330
34399
  value: function () {
34331
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, orderSet, lastSetToInitialize) {
34332
- return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34333
- while (1) switch (_context37.prev = _context37.next) {
34400
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set, orderSet, lastSetToInitialize) {
34401
+ return _regeneratorRuntime.wrap(function _callee36$(_context38) {
34402
+ while (1) switch (_context38.prev = _context38.next) {
34334
34403
  case 0:
34335
34404
  //TODO: GLOBAL STUFF
34336
34405
  //this.updateActSet(set);
34337
34406
  orderSet.changeBasketIds();
34338
- _context37.next = 3;
34407
+ _context38.next = 3;
34339
34408
  return this.initOrderLineArticles(set, orderSet);
34340
34409
  case 3:
34341
- _context37.next = 5;
34410
+ _context38.next = 5;
34342
34411
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
34343
34412
  case 5:
34344
34413
  case "end":
34345
- return _context37.stop();
34414
+ return _context38.stop();
34346
34415
  }
34347
- }, _callee35, this);
34416
+ }, _callee36, this);
34348
34417
  }));
34349
- function addOrderSetArticlesToExistingSet(_x123, _x124, _x125) {
34418
+ function addOrderSetArticlesToExistingSet(_x127, _x128, _x129) {
34350
34419
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
34351
34420
  }
34352
34421
  return addOrderSetArticlesToExistingSet;
@@ -35397,7 +35466,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35397
35466
  break;
35398
35467
  case 3:
35399
35468
  _context12.next = 5;
35400
- return import('./PfisterWWSHandler-f5c82bab.js');
35469
+ return import('./PfisterWWSHandler-02f5f572.js');
35401
35470
  case 5:
35402
35471
  _yield$import = _context12.sent;
35403
35472
  PfisterWWSHandler = _yield$import["default"];
@@ -35405,7 +35474,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35405
35474
  return _context12.abrupt("break", 27);
35406
35475
  case 9:
35407
35476
  _context12.next = 11;
35408
- return import('./LiviqueWWSHandler-aa91694f.js');
35477
+ return import('./LiviqueWWSHandler-107ff34e.js');
35409
35478
  case 11:
35410
35479
  _yield$import2 = _context12.sent;
35411
35480
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35413,7 +35482,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35413
35482
  return _context12.abrupt("break", 27);
35414
35483
  case 15:
35415
35484
  _context12.next = 17;
35416
- return import('./SeriousBasketHandler-9ca925b6.js');
35485
+ return import('./SeriousBasketHandler-7b43a780.js');
35417
35486
  case 17:
35418
35487
  _yield$import3 = _context12.sent;
35419
35488
  SeriousWWSHandler = _yield$import3["default"];
@@ -35421,7 +35490,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35421
35490
  return _context12.abrupt("break", 27);
35422
35491
  case 21:
35423
35492
  _context12.next = 23;
35424
- return import('./StandardWWSHandler-d3611d24.js');
35493
+ return import('./StandardWWSHandler-c0b776f6.js');
35425
35494
  case 23:
35426
35495
  _yield$import4 = _context12.sent;
35427
35496
  StandardWWSHandler = _yield$import4["default"];
@@ -36864,7 +36933,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36864
36933
  while (1) switch (_context3.prev = _context3.next) {
36865
36934
  case 0:
36866
36935
  _context3.next = 2;
36867
- return import('./Host3DSignalR-85c6a251.js');
36936
+ return import('./Host3DSignalR-222ed95d.js');
36868
36937
  case 2:
36869
36938
  _yield$import = _context3.sent;
36870
36939
  Host3DSignalR = _yield$import["default"];
@@ -38429,7 +38498,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38429
38498
  break;
38430
38499
  case 8:
38431
38500
  _context4.next = 10;
38432
- return import('./DivaStandardPlanner-5c6cc87c.js');
38501
+ return import('./DivaStandardPlanner-fbcc22bb.js');
38433
38502
  case 10:
38434
38503
  _yield$import = _context4.sent;
38435
38504
  DivaStandardPlanner = _yield$import["default"];
@@ -38440,7 +38509,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38440
38509
  return _context4.abrupt("break", 21);
38441
38510
  case 15:
38442
38511
  _context4.next = 17;
38443
- return import('./DivaBoxPlanner-7c40aa5b.js');
38512
+ return import('./DivaBoxPlanner-112bc2bf.js');
38444
38513
  case 17:
38445
38514
  _yield$import2 = _context4.sent;
38446
38515
  DivaBoxPlanner = _yield$import2["default"];
@@ -39826,32 +39895,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39826
39895
  return _ref5.apply(this, arguments);
39827
39896
  };
39828
39897
  }());
39829
- _defineProperty(this, "moveShelfItem", function (paletteId, grid, initialIndex, finalIndex, configStepKey) {
39830
- var _this$updateViewPlann4;
39831
- var set = _this.actSet();
39832
- var result = setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
39833
- if (result == 'RESETTED_CELLS') {
39834
- var _this$updatePlannerMs, _this$i18n3;
39835
- (_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
39836
- }
39837
- _this.updateConfigStructure();
39838
- _this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
39839
- (_this$updateViewPlann4 = _this.updateViewPlannerElements) === null || _this$updateViewPlann4 === void 0 || _this$updateViewPlann4.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
39840
- _this.updatePlannerView('MOVE_SHELF_ITEM');
39841
- });
39898
+ _defineProperty(this, "moveShelfItem", /*#__PURE__*/function () {
39899
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, grid, initialIndex, finalIndex, configStepKey) {
39900
+ var _this$updateViewPlann4;
39901
+ var set, result, _this$updatePlannerMs, _this$i18n3;
39902
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
39903
+ while (1) switch (_context6.prev = _context6.next) {
39904
+ case 0:
39905
+ set = _this.actSet();
39906
+ _context6.next = 3;
39907
+ return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
39908
+ case 3:
39909
+ result = _context6.sent;
39910
+ if (result == 'RESETTED_CELLS') {
39911
+ (_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
39912
+ }
39913
+ _this.updateConfigStructure();
39914
+ _this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
39915
+ (_this$updateViewPlann4 = _this.updateViewPlannerElements) === null || _this$updateViewPlann4 === void 0 || _this$updateViewPlann4.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
39916
+ _this.updatePlannerView('MOVE_SHELF_ITEM');
39917
+ case 9:
39918
+ case "end":
39919
+ return _context6.stop();
39920
+ }
39921
+ }, _callee6);
39922
+ }));
39923
+ return function (_x18, _x19, _x20, _x21, _x22) {
39924
+ return _ref6.apply(this, arguments);
39925
+ };
39926
+ }());
39842
39927
  _defineProperty(this, "moveDoors", function (movedDoor, targetDoor) {
39843
39928
  setHandlerInstance.moveDoors(_this.actSet(), movedDoor, targetDoor);
39844
39929
  _this.updatePlannerView('MOVE_DOORS');
39845
39930
  });
39846
39931
  _defineProperty(this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
39847
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
39932
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
39848
39933
  var _this$updateViewPlann5;
39849
39934
  var set;
39850
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
39851
- while (1) switch (_context6.prev = _context6.next) {
39935
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
39936
+ while (1) switch (_context7.prev = _context7.next) {
39852
39937
  case 0:
39853
39938
  set = _this.actSet();
39854
- _context6.next = 3;
39939
+ _context7.next = 3;
39855
39940
  return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
39856
39941
  case 3:
39857
39942
  _this.updateConfigStructure();
@@ -39864,12 +39949,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39864
39949
  _this.plannerChangeLog('onDeletePlanner');
39865
39950
  case 11:
39866
39951
  case "end":
39867
- return _context6.stop();
39952
+ return _context7.stop();
39868
39953
  }
39869
- }, _callee6);
39954
+ }, _callee7);
39870
39955
  }));
39871
- return function (_x18, _x19, _x20, _x21, _x22) {
39872
- return _ref6.apply(this, arguments);
39956
+ return function (_x23, _x24, _x25, _x26, _x27) {
39957
+ return _ref7.apply(this, arguments);
39873
39958
  };
39874
39959
  }());
39875
39960
  /**
@@ -39880,12 +39965,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39880
39965
  * @param transState
39881
39966
  */
39882
39967
  _defineProperty(this, "updatePlannerTrans", /*#__PURE__*/function () {
39883
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
39968
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
39884
39969
  var _this$updateElementSe3;
39885
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
39886
- while (1) switch (_context7.prev = _context7.next) {
39970
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
39971
+ while (1) switch (_context8.prev = _context8.next) {
39887
39972
  case 0:
39888
- _context7.next = 2;
39973
+ _context8.next = 2;
39889
39974
  return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
39890
39975
  case 2:
39891
39976
  if (transState == 'END') {
@@ -39894,12 +39979,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39894
39979
  }
39895
39980
  case 3:
39896
39981
  case "end":
39897
- return _context7.stop();
39982
+ return _context8.stop();
39898
39983
  }
39899
- }, _callee7);
39984
+ }, _callee8);
39900
39985
  }));
39901
- return function (_x23, _x24, _x25, _x26, _x27, _x28, _x29) {
39902
- return _ref7.apply(this, arguments);
39986
+ return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
39987
+ return _ref8.apply(this, arguments);
39903
39988
  };
39904
39989
  }());
39905
39990
  /**
@@ -39918,18 +40003,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39918
40003
  }
39919
40004
  });
39920
40005
  _defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
39921
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
40006
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
39922
40007
  var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
39923
40008
  var set, ret;
39924
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
39925
- while (1) switch (_context8.prev = _context8.next) {
40009
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
40010
+ while (1) switch (_context9.prev = _context9.next) {
39926
40011
  case 0:
39927
40012
  set = _this.actSet();
39928
40013
  (_this$actions11 = _this.actions) === null || _this$actions11 === void 0 || (_this$actions11$toggl = _this$actions11.toggleLoading) === null || _this$actions11$toggl === void 0 || _this$actions11$toggl.call(_this$actions11, 'LoadingArticles_' + accessoireItem.articleCodex, false, true);
39929
- _context8.next = 4;
40014
+ _context9.next = 4;
39930
40015
  return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
39931
40016
  case 4:
39932
- ret = _context8.sent;
40017
+ ret = _context9.sent;
39933
40018
  (_this$actions12 = _this.actions) === null || _this$actions12 === void 0 || (_this$actions12$toggl = _this$actions12.toggleLoading) === null || _this$actions12$toggl === void 0 || _this$actions12$toggl.call(_this$actions12, 'LoadingArticles_' + accessoireItem.articleCodex, false, false);
39934
40019
  if (ret.somethingChanged) _this.updateConfigStructure();
39935
40020
  _this.updatePlannerView('UPDATE_ACC_QUANTITY');
@@ -39939,25 +40024,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39939
40024
  _this.plannerChangeLog('onUpdateAccessoireQuantity');
39940
40025
  case 12:
39941
40026
  case "end":
39942
- return _context8.stop();
40027
+ return _context9.stop();
39943
40028
  }
39944
- }, _callee8);
40029
+ }, _callee9);
39945
40030
  }));
39946
- return function (_x30, _x31, _x32, _x33) {
39947
- return _ref8.apply(this, arguments);
40031
+ return function (_x35, _x36, _x37, _x38) {
40032
+ return _ref9.apply(this, arguments);
39948
40033
  };
39949
40034
  }());
39950
40035
  _defineProperty(this, "deleteAccessoire", /*#__PURE__*/function () {
39951
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(articleCodex, parentBasketId) {
40036
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(articleCodex, parentBasketId) {
39952
40037
  var set, wasDeleted, _this$updateViewPlann6;
39953
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
39954
- while (1) switch (_context9.prev = _context9.next) {
40038
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
40039
+ while (1) switch (_context10.prev = _context10.next) {
39955
40040
  case 0:
39956
40041
  set = _this.actSet();
39957
- _context9.next = 3;
40042
+ _context10.next = 3;
39958
40043
  return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
39959
40044
  case 3:
39960
- wasDeleted = _context9.sent;
40045
+ wasDeleted = _context10.sent;
39961
40046
  if (wasDeleted) {
39962
40047
  _this.updateConfigStructure();
39963
40048
  (_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
@@ -39967,15 +40052,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39967
40052
  }
39968
40053
  _this.checkMatchingProducts('onAccessoireDelete');
39969
40054
  _this.plannerChangeLog('onDeletePlanner');
39970
- return _context9.abrupt("return", wasDeleted);
40055
+ return _context10.abrupt("return", wasDeleted);
39971
40056
  case 8:
39972
40057
  case "end":
39973
- return _context9.stop();
40058
+ return _context10.stop();
39974
40059
  }
39975
- }, _callee9);
40060
+ }, _callee10);
39976
40061
  }));
39977
- return function (_x34, _x35) {
39978
- return _ref9.apply(this, arguments);
40062
+ return function (_x39, _x40) {
40063
+ return _ref10.apply(this, arguments);
39979
40064
  };
39980
40065
  }());
39981
40066
  _defineProperty(this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
@@ -39998,13 +40083,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39998
40083
  * @param configStepKey act ConfigStep
39999
40084
  */
40000
40085
  _defineProperty(this, "configSingleIsChanged", /*#__PURE__*/function () {
40001
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
40086
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
40002
40087
  var set;
40003
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
40004
- while (1) switch (_context10.prev = _context10.next) {
40088
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
40089
+ while (1) switch (_context11.prev = _context11.next) {
40005
40090
  case 0:
40006
40091
  set = _this.actSet();
40007
- _context10.next = 3;
40092
+ _context11.next = 3;
40008
40093
  return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
40009
40094
  case 3:
40010
40095
  _this.updatePriceInView();
@@ -40014,15 +40099,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40014
40099
  configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
40015
40100
  _this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
40016
40101
  }
40017
- return _context10.abrupt("return", configStepKey);
40102
+ return _context11.abrupt("return", configStepKey);
40018
40103
  case 7:
40019
40104
  case "end":
40020
- return _context10.stop();
40105
+ return _context11.stop();
40021
40106
  }
40022
- }, _callee10);
40107
+ }, _callee11);
40023
40108
  }));
40024
- return function (_x36, _x37, _x38, _x39, _x40, _x41) {
40025
- return _ref10.apply(this, arguments);
40109
+ return function (_x41, _x42, _x43, _x44, _x45, _x46) {
40110
+ return _ref11.apply(this, arguments);
40026
40111
  };
40027
40112
  }());
40028
40113
  /**
@@ -40036,23 +40121,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40036
40121
  */
40037
40122
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
40038
40123
  _defineProperty(this, "doConfigure", /*#__PURE__*/function () {
40039
- var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
40124
+ var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
40040
40125
  var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
40041
40126
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
40042
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
40043
- while (1) switch (_context11.prev = _context11.next) {
40127
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
40128
+ while (1) switch (_context12.prev = _context12.next) {
40044
40129
  case 0:
40045
40130
  set = _this.actSet();
40046
40131
  (_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
40047
- _context11.next = 4;
40132
+ _context12.next = 4;
40048
40133
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
40049
40134
  case 4:
40050
- returnValues = _context11.sent;
40135
+ returnValues = _context12.sent;
40051
40136
  (_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
40052
40137
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
40053
40138
  _this.checkMatchingProducts('onConfig');
40054
40139
  if (dontUpdatePlannerView) {
40055
- _context11.next = 18;
40140
+ _context12.next = 18;
40056
40141
  break;
40057
40142
  }
40058
40143
  _this.updateConfiguratorStructure(structure);
@@ -40066,79 +40151,79 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40066
40151
  _this.updateViewButtonsDependigOnConfigStructure();
40067
40152
  _this.updatePlannerView('DO_CONFIGURE', myValues);
40068
40153
  _this.updateWebConfiguratorTitle();
40069
- _context11.next = 18;
40154
+ _context12.next = 18;
40070
40155
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
40071
40156
  case 18:
40072
40157
  if (dontCallEvents) {
40073
- _context11.next = 21;
40158
+ _context12.next = 21;
40074
40159
  break;
40075
40160
  }
40076
- _context11.next = 21;
40161
+ _context12.next = 21;
40077
40162
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
40078
40163
  case 21:
40079
40164
  _this.configuratorChangeLog('onConfiguratorStep', myValues);
40080
40165
  case 22:
40081
40166
  case "end":
40082
- return _context11.stop();
40167
+ return _context12.stop();
40083
40168
  }
40084
- }, _callee11);
40169
+ }, _callee12);
40085
40170
  }));
40086
- return function (_x42, _x43, _x44, _x45) {
40087
- return _ref11.apply(this, arguments);
40171
+ return function (_x47, _x48, _x49, _x50) {
40172
+ return _ref12.apply(this, arguments);
40088
40173
  };
40089
40174
  }());
40090
40175
  _defineProperty(this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
40091
- var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(myValues, isInit) {
40176
+ var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(myValues, isInit) {
40092
40177
  var _myValues;
40093
40178
  var set, articles, article;
40094
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
40095
- while (1) switch (_context12.prev = _context12.next) {
40179
+ return _regeneratorRuntime.wrap(function _callee13$(_context13) {
40180
+ while (1) switch (_context13.prev = _context13.next) {
40096
40181
  case 0:
40097
40182
  if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
40098
- _context12.next = 2;
40183
+ _context13.next = 2;
40099
40184
  break;
40100
40185
  }
40101
- return _context12.abrupt("return");
40186
+ return _context13.abrupt("return");
40102
40187
  case 2:
40103
40188
  set = _this.actSet();
40104
40189
  if (set) {
40105
- _context12.next = 5;
40190
+ _context13.next = 5;
40106
40191
  break;
40107
40192
  }
40108
- return _context12.abrupt("return");
40193
+ return _context13.abrupt("return");
40109
40194
  case 5:
40110
40195
  if (myValues) {
40111
- _context12.next = 11;
40196
+ _context13.next = 11;
40112
40197
  break;
40113
40198
  }
40114
40199
  //get first option of the first article
40115
40200
  articles = set.getDivaArticles();
40116
40201
  article = articles[Object.keys(articles)[0]];
40117
40202
  if (article) {
40118
- _context12.next = 10;
40203
+ _context13.next = 10;
40119
40204
  break;
40120
40205
  }
40121
- return _context12.abrupt("return");
40206
+ return _context13.abrupt("return");
40122
40207
  case 10:
40123
40208
  myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutFreetext;
40124
40209
  case 11:
40125
- _context12.t0 = _this.divaBasketHandler;
40126
- _context12.t1 = set;
40127
- _context12.next = 15;
40210
+ _context13.t0 = _this.divaBasketHandler;
40211
+ _context13.t1 = set;
40212
+ _context13.next = 15;
40128
40213
  return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
40129
40214
  case 15:
40130
- _context12.t2 = _context12.sent;
40131
- _context12.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
40132
- _context12.t4 = isInit;
40133
- return _context12.abrupt("return", _context12.t0.fillBaksetforOnWebPlanerConfigChange.call(_context12.t0, _context12.t1, _context12.t2, _context12.t3, _context12.t4));
40215
+ _context13.t2 = _context13.sent;
40216
+ _context13.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
40217
+ _context13.t4 = isInit;
40218
+ return _context13.abrupt("return", _context13.t0.fillBaksetforOnWebPlanerConfigChange.call(_context13.t0, _context13.t1, _context13.t2, _context13.t3, _context13.t4));
40134
40219
  case 19:
40135
40220
  case "end":
40136
- return _context12.stop();
40221
+ return _context13.stop();
40137
40222
  }
40138
- }, _callee12);
40223
+ }, _callee13);
40139
40224
  }));
40140
- return function (_x46, _x47) {
40141
- return _ref12.apply(this, arguments);
40225
+ return function (_x51, _x52) {
40226
+ return _ref13.apply(this, arguments);
40142
40227
  };
40143
40228
  }());
40144
40229
  _defineProperty(this, "getPosNr", function (basketId) {
@@ -40176,10 +40261,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40176
40261
  return _createClass(DivaWebPlanner, [{
40177
40262
  key: "initialize",
40178
40263
  value: function () {
40179
- var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
40264
+ var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
40180
40265
  var viewReadyPromise, loadSuccessful, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
40181
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
40182
- while (1) switch (_context13.prev = _context13.next) {
40266
+ return _regeneratorRuntime.wrap(function _callee14$(_context14) {
40267
+ while (1) switch (_context14.prev = _context14.next) {
40183
40268
  case 0:
40184
40269
  this.api = new DivaApiHandler(this.plannerConfig, this.handler);
40185
40270
  this.api.setI18n(this.i18n);
@@ -40193,58 +40278,58 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40193
40278
  warningTime: 2000,
40194
40279
  errorTime: 4000
40195
40280
  });
40196
- _context13.next = 8;
40281
+ _context14.next = 8;
40197
40282
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
40198
40283
  case 8:
40199
40284
  this.plannerHandler = new DivaPlannerHandler(false);
40200
40285
  viewReadyPromise = this.initViewApiDependencies();
40201
- _context13.next = 12;
40286
+ _context14.next = 12;
40202
40287
  return this.divaBasketHandler.initializeBasket(this.api);
40203
40288
  case 12:
40204
- loadSuccessful = _context13.sent;
40289
+ loadSuccessful = _context14.sent;
40205
40290
  if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils.businessMetrics.getConfiguratorSessionId() === undefined)) {
40206
40291
  DivaUtils.businessMetrics.setConfiguratorSessionId();
40207
40292
  }
40208
40293
  if (!loadSuccessful) {
40209
- _context13.next = 56;
40294
+ _context14.next = 56;
40210
40295
  break;
40211
40296
  }
40212
40297
  if (!(typeof loadSuccessful != 'boolean')) {
40213
- _context13.next = 24;
40298
+ _context14.next = 24;
40214
40299
  break;
40215
40300
  }
40216
40301
  if (!(loadSuccessful.type == 'ProductList')) {
40217
- _context13.next = 24;
40302
+ _context14.next = 24;
40218
40303
  break;
40219
40304
  }
40220
- _context13.next = 19;
40305
+ _context14.next = 19;
40221
40306
  return viewReadyPromise;
40222
40307
  case 19:
40223
- _context13.next = 21;
40308
+ _context14.next = 21;
40224
40309
  return this.initView();
40225
40310
  case 21:
40226
40311
  this.subscribeToWebPlannerEvents();
40227
40312
  (_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);
40228
- return _context13.abrupt("return", true);
40313
+ return _context14.abrupt("return", true);
40229
40314
  case 24:
40230
40315
  this.divaNr = this.divaBasketHandler.actDivaNr;
40231
40316
  initSetState = this.getInitStateForSet();
40232
40317
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
40233
- _context13.next = 29;
40318
+ _context14.next = 29;
40234
40319
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
40235
40320
  case 29:
40236
40321
  set = this.actSet();
40237
40322
  oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
40238
40323
  if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
40239
- _context13.next = 38;
40324
+ _context14.next = 38;
40240
40325
  break;
40241
40326
  }
40242
- _context13.next = 34;
40327
+ _context14.next = 34;
40243
40328
  return this.divaBasketHandler.getProduct(this.api, oldProductId);
40244
40329
  case 34:
40245
- result = _context13.sent;
40330
+ result = _context14.sent;
40246
40331
  if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
40247
- _context13.next = 39;
40332
+ _context14.next = 39;
40248
40333
  break;
40249
40334
  case 38:
40250
40335
  if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -40253,10 +40338,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40253
40338
  }
40254
40339
  }
40255
40340
  case 39:
40256
- _context13.next = 41;
40341
+ _context14.next = 41;
40257
40342
  return viewReadyPromise;
40258
40343
  case 41:
40259
- _context13.next = 43;
40344
+ _context14.next = 43;
40260
40345
  return this.initView();
40261
40346
  case 43:
40262
40347
  (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
@@ -40293,20 +40378,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40293
40378
  initializationType: this.divaBasketHandler.initializationTypeGetter,
40294
40379
  initializationId: initializationId
40295
40380
  }, false);
40296
- _context13.next = 53;
40381
+ _context14.next = 53;
40297
40382
  return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
40298
40383
  case 53:
40299
- return _context13.abrupt("return", true);
40384
+ return _context14.abrupt("return", true);
40300
40385
  case 56:
40301
40386
  this.onInitializationError();
40302
40387
  //fehler beim laden vom basket..
40303
40388
  LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
40304
- return _context13.abrupt("return", false);
40389
+ return _context14.abrupt("return", false);
40305
40390
  case 59:
40306
40391
  case "end":
40307
- return _context13.stop();
40392
+ return _context14.stop();
40308
40393
  }
40309
- }, _callee13, this);
40394
+ }, _callee14, this);
40310
40395
  }));
40311
40396
  function initialize() {
40312
40397
  return _initialize.apply(this, arguments);
@@ -40438,23 +40523,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40438
40523
  }, {
40439
40524
  key: "initView",
40440
40525
  value: (function () {
40441
- var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
40526
+ var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
40442
40527
  var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
40443
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
40444
- while (1) switch (_context14.prev = _context14.next) {
40528
+ return _regeneratorRuntime.wrap(function _callee15$(_context15) {
40529
+ while (1) switch (_context15.prev = _context15.next) {
40445
40530
  case 0:
40446
40531
  set = this.actSet();
40447
40532
  plannerMode = this.getPlannerMode();
40448
40533
  this.initConfiguratorMode(plannerMode);
40449
40534
  if (!(plannerMode == 'ProductList')) {
40450
- _context14.next = 7;
40535
+ _context15.next = 7;
40451
40536
  break;
40452
40537
  }
40453
40538
  (_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
40454
- _context14.next = 17;
40539
+ _context15.next = 17;
40455
40540
  break;
40456
40541
  case 7:
40457
- _context14.next = 9;
40542
+ _context15.next = 9;
40458
40543
  return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
40459
40544
  case 9:
40460
40545
  //first load the Configuratorstructure STARTCONFIG
@@ -40468,13 +40553,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40468
40553
  this.onBasketInitialized();
40469
40554
  this.checkMatchingProducts('onInit');
40470
40555
  case 17:
40471
- _context14.next = 19;
40556
+ _context15.next = 19;
40472
40557
  return this.runInitMode(plannerMode);
40473
40558
  case 19:
40474
40559
  case "end":
40475
- return _context14.stop();
40560
+ return _context15.stop();
40476
40561
  }
40477
- }, _callee14, this);
40562
+ }, _callee15, this);
40478
40563
  }));
40479
40564
  function initView() {
40480
40565
  return _initView.apply(this, arguments);
@@ -40495,26 +40580,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40495
40580
  }, {
40496
40581
  key: "runInitMode",
40497
40582
  value: function () {
40498
- var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(plannerMode) {
40583
+ var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
40499
40584
  var _this$state3;
40500
40585
  var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40501
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
40502
- while (1) switch (_context15.prev = _context15.next) {
40586
+ return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40587
+ while (1) switch (_context16.prev = _context16.next) {
40503
40588
  case 0:
40504
40589
  doDefault = true;
40505
40590
  if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
40506
- _context15.next = 10;
40591
+ _context16.next = 10;
40507
40592
  break;
40508
40593
  }
40509
40594
  if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
40510
40595
  if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
40511
40596
  (_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
40512
40597
  //TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
40513
- _context15.next = 7;
40598
+ _context16.next = 7;
40514
40599
  return this.saveToBasketWrapper();
40515
40600
  case 7:
40516
40601
  doDefault = false;
40517
- _context15.next = 11;
40602
+ _context16.next = 11;
40518
40603
  break;
40519
40604
  case 10:
40520
40605
  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) {
@@ -40538,11 +40623,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40538
40623
  }
40539
40624
  case 12:
40540
40625
  case "end":
40541
- return _context15.stop();
40626
+ return _context16.stop();
40542
40627
  }
40543
- }, _callee15, this);
40628
+ }, _callee16, this);
40544
40629
  }));
40545
- function runInitMode(_x48) {
40630
+ function runInitMode(_x53) {
40546
40631
  return _runInitMode.apply(this, arguments);
40547
40632
  }
40548
40633
  return runInitMode;
@@ -40550,16 +40635,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40550
40635
  }, {
40551
40636
  key: "addSetToActPlanningByDivaNr",
40552
40637
  value: function () {
40553
- var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(divaNr) {
40638
+ var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(divaNr) {
40554
40639
  var _this$updateViewPlann10;
40555
40640
  var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
40556
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40557
- while (1) switch (_context16.prev = _context16.next) {
40641
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
40642
+ while (1) switch (_context17.prev = _context17.next) {
40558
40643
  case 0:
40559
40644
  set = this.actSet();
40560
40645
  this.divaBasketHandler.updateDivaNrInBasket(divaNr);
40561
40646
  this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
40562
- _context16.next = 5;
40647
+ _context17.next = 5;
40563
40648
  return this.divaBasketHandler.initializeBasket(this.api);
40564
40649
  case 5:
40565
40650
  orderSets = this.divaBasketHandler.actBasket.OrderSets;
@@ -40567,30 +40652,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40567
40652
  i = 0;
40568
40653
  case 8:
40569
40654
  if (!(i < orderSets.length)) {
40570
- _context16.next = 24;
40655
+ _context17.next = 24;
40571
40656
  break;
40572
40657
  }
40573
40658
  orderset = orderSets[i];
40574
40659
  lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
40575
40660
  loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
40576
40661
  if (!loadedSet) {
40577
- _context16.next = 18;
40662
+ _context17.next = 18;
40578
40663
  break;
40579
40664
  }
40580
- _context16.next = 15;
40665
+ _context17.next = 15;
40581
40666
  return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
40582
40667
  case 15:
40583
40668
  this.checkMatchingProducts('onAdd');
40584
- _context16.next = 20;
40669
+ _context17.next = 20;
40585
40670
  break;
40586
40671
  case 18:
40587
- _context16.next = 20;
40672
+ _context17.next = 20;
40588
40673
  return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
40589
40674
  case 20:
40590
40675
  this.cleanUpEmptySets(true);
40591
40676
  case 21:
40592
40677
  i++;
40593
- _context16.next = 8;
40678
+ _context17.next = 8;
40594
40679
  break;
40595
40680
  case 24:
40596
40681
  this.divaBasketHandler.actBasket.OrderSets = [];
@@ -40602,11 +40687,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40602
40687
  this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
40603
40688
  case 31:
40604
40689
  case "end":
40605
- return _context16.stop();
40690
+ return _context17.stop();
40606
40691
  }
40607
- }, _callee16, this);
40692
+ }, _callee17, this);
40608
40693
  }));
40609
- function addSetToActPlanningByDivaNr(_x49) {
40694
+ function addSetToActPlanningByDivaNr(_x54) {
40610
40695
  return _addSetToActPlanningByDivaNr.apply(this, arguments);
40611
40696
  }
40612
40697
  return addSetToActPlanningByDivaNr;
@@ -40639,28 +40724,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40639
40724
  }, {
40640
40725
  key: "setActSetCurConfigStepKey",
40641
40726
  value: function () {
40642
- var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(curConfigStepKey) {
40727
+ var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(curConfigStepKey) {
40643
40728
  var set;
40644
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
40645
- while (1) switch (_context17.prev = _context17.next) {
40729
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
40730
+ while (1) switch (_context18.prev = _context18.next) {
40646
40731
  case 0:
40647
40732
  set = this.actSet();
40648
40733
  if (set) {
40649
- _context17.next = 3;
40734
+ _context18.next = 3;
40650
40735
  break;
40651
40736
  }
40652
- return _context17.abrupt("return");
40737
+ return _context18.abrupt("return");
40653
40738
  case 3:
40654
40739
  set.ActConfigStepKey = curConfigStepKey;
40655
- _context17.next = 6;
40740
+ _context18.next = 6;
40656
40741
  return setHandlerInstance.updateNavigation(set);
40657
40742
  case 6:
40658
40743
  case "end":
40659
- return _context17.stop();
40744
+ return _context18.stop();
40660
40745
  }
40661
- }, _callee17, this);
40746
+ }, _callee18, this);
40662
40747
  }));
40663
- function setActSetCurConfigStepKey(_x50) {
40748
+ function setActSetCurConfigStepKey(_x55) {
40664
40749
  return _setActSetCurConfigStepKey.apply(this, arguments);
40665
40750
  }
40666
40751
  return setActSetCurConfigStepKey;
@@ -40809,17 +40894,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40809
40894
  }, {
40810
40895
  key: "deletePlannerElement",
40811
40896
  value: function () {
40812
- var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(setId, elementId, denyElementSelectionClear) {
40897
+ var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, denyElementSelectionClear) {
40813
40898
  var _this$updateViewPlann11;
40814
40899
  var set, result, _this$updateElementSe5, _this$updateElementSe6;
40815
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
40816
- while (1) switch (_context18.prev = _context18.next) {
40900
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
40901
+ while (1) switch (_context19.prev = _context19.next) {
40817
40902
  case 0:
40818
40903
  set = this.sets[setId];
40819
- _context18.next = 3;
40904
+ _context19.next = 3;
40820
40905
  return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
40821
40906
  case 3:
40822
- result = _context18.sent;
40907
+ result = _context19.sent;
40823
40908
  this.updateConfigStructure();
40824
40909
  (_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
40825
40910
  this.updatePlannerView('DELETE_PLANNER_ELEMENT');
@@ -40830,17 +40915,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40830
40915
  }
40831
40916
  this.updatePriceInView();
40832
40917
  this.checkMatchingProducts('onDelete');
40833
- _context18.next = 14;
40918
+ _context19.next = 14;
40834
40919
  return this.getFreePlacesOnGrids(undefined, 'deleteElement');
40835
40920
  case 14:
40836
40921
  this.plannerChangeLog('onDeletePlanner');
40837
40922
  case 15:
40838
40923
  case "end":
40839
- return _context18.stop();
40924
+ return _context19.stop();
40840
40925
  }
40841
- }, _callee18, this);
40926
+ }, _callee19, this);
40842
40927
  }));
40843
- function deletePlannerElement(_x51, _x52, _x53) {
40928
+ function deletePlannerElement(_x56, _x57, _x58) {
40844
40929
  return _deletePlannerElement.apply(this, arguments);
40845
40930
  }
40846
40931
  return deletePlannerElement;
@@ -40854,17 +40939,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40854
40939
  }, {
40855
40940
  key: "copyPlannerElement",
40856
40941
  value: (function () {
40857
- var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, curConfigKey, copyInfo) {
40942
+ var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, curConfigKey, copyInfo) {
40858
40943
  var _this$updateViewPlann12;
40859
40944
  var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
40860
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
40861
- while (1) switch (_context19.prev = _context19.next) {
40945
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
40946
+ while (1) switch (_context20.prev = _context20.next) {
40862
40947
  case 0:
40863
40948
  set = this.sets[setId];
40864
- _context19.next = 3;
40949
+ _context20.next = 3;
40865
40950
  return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
40866
40951
  case 3:
40867
- newSelectedArticle = _context19.sent;
40952
+ newSelectedArticle = _context20.sent;
40868
40953
  this.updateConfigStructure();
40869
40954
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
40870
40955
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
@@ -40878,14 +40963,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40878
40963
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
40879
40964
  }
40880
40965
  this.checkMatchingProducts('onCopy');
40881
- return _context19.abrupt("return", newConfigStepKey);
40966
+ return _context20.abrupt("return", newConfigStepKey);
40882
40967
  case 13:
40883
40968
  case "end":
40884
- return _context19.stop();
40969
+ return _context20.stop();
40885
40970
  }
40886
- }, _callee19, this);
40971
+ }, _callee20, this);
40887
40972
  }));
40888
- function copyPlannerElement(_x54, _x55, _x56, _x57) {
40973
+ function copyPlannerElement(_x59, _x60, _x61, _x62) {
40889
40974
  return _copyPlannerElement.apply(this, arguments);
40890
40975
  }
40891
40976
  return copyPlannerElement;
@@ -40914,33 +40999,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40914
40999
  }, {
40915
41000
  key: "getFreePlacesOnGrids",
40916
41001
  value: function () {
40917
- var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(gridGroup, from) {
41002
+ var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(gridGroup, from) {
40918
41003
  var _this$updateFreePlace;
40919
41004
  var set, freeShelfGrids, plannedShelfGrids;
40920
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
40921
- while (1) switch (_context20.prev = _context20.next) {
41005
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
41006
+ while (1) switch (_context21.prev = _context21.next) {
40922
41007
  case 0:
40923
41008
  set = this.actSet();
40924
41009
  if (set) {
40925
- _context20.next = 3;
41010
+ _context21.next = 3;
40926
41011
  break;
40927
41012
  }
40928
41013
  throw new Error('getFreePlacesOnGrids: act set is not defined!');
40929
41014
  case 3:
40930
41015
  if (!gridGroup) {
40931
- _context20.next = 9;
41016
+ _context21.next = 9;
40932
41017
  break;
40933
41018
  }
40934
- _context20.next = 6;
41019
+ _context21.next = 6;
40935
41020
  return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
40936
41021
  case 6:
40937
- _context20.t0 = _context20.sent;
40938
- _context20.next = 10;
41022
+ _context21.t0 = _context21.sent;
41023
+ _context21.next = 10;
40939
41024
  break;
40940
41025
  case 9:
40941
- _context20.t0 = undefined;
41026
+ _context21.t0 = undefined;
40942
41027
  case 10:
40943
- freeShelfGrids = _context20.t0;
41028
+ freeShelfGrids = _context21.t0;
40944
41029
  plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
40945
41030
  LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
40946
41031
  LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
@@ -40948,17 +41033,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40948
41033
  freeShelfGrids: freeShelfGrids,
40949
41034
  plannedShelfGrids: plannedShelfGrids
40950
41035
  });
40951
- return _context20.abrupt("return", {
41036
+ return _context21.abrupt("return", {
40952
41037
  freeShelfGrids: freeShelfGrids,
40953
41038
  plannedShelfGrids: plannedShelfGrids
40954
41039
  });
40955
41040
  case 16:
40956
41041
  case "end":
40957
- return _context20.stop();
41042
+ return _context21.stop();
40958
41043
  }
40959
- }, _callee20, this);
41044
+ }, _callee21, this);
40960
41045
  }));
40961
- function getFreePlacesOnGrids(_x58, _x59) {
41046
+ function getFreePlacesOnGrids(_x63, _x64) {
40962
41047
  return _getFreePlacesOnGrids.apply(this, arguments);
40963
41048
  }
40964
41049
  return getFreePlacesOnGrids;
@@ -40975,36 +41060,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40975
41060
  }, {
40976
41061
  key: "moveShelfItemToGrid",
40977
41062
  value: function () {
40978
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(accessoireBasketId, parentBasketId, gridName, cellIndex) {
41063
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(accessoireBasketId, parentBasketId, gridName, cellIndex) {
40979
41064
  var set, newGridId;
40980
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
40981
- while (1) switch (_context21.prev = _context21.next) {
41065
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
41066
+ while (1) switch (_context22.prev = _context22.next) {
40982
41067
  case 0:
40983
41068
  set = this.actSet();
40984
41069
  if (set) {
40985
- _context21.next = 3;
41070
+ _context22.next = 3;
40986
41071
  break;
40987
41072
  }
40988
- return _context21.abrupt("return");
41073
+ return _context22.abrupt("return");
40989
41074
  case 3:
40990
- _context21.next = 5;
41075
+ _context22.next = 5;
40991
41076
  return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
40992
41077
  case 5:
40993
- newGridId = _context21.sent;
41078
+ newGridId = _context22.sent;
40994
41079
  this.updatePlannerView('MOVE_SHELF_ITEM');
40995
41080
  if (!newGridId) {
40996
- _context21.next = 10;
41081
+ _context22.next = 10;
40997
41082
  break;
40998
41083
  }
40999
- _context21.next = 10;
41084
+ _context22.next = 10;
41000
41085
  return this.getFreePlacesOnGrids(newGridId, 'move shelf');
41001
41086
  case 10:
41002
41087
  case "end":
41003
- return _context21.stop();
41088
+ return _context22.stop();
41004
41089
  }
41005
- }, _callee21, this);
41090
+ }, _callee22, this);
41006
41091
  }));
41007
- function moveShelfItemToGrid(_x60, _x61, _x62, _x63) {
41092
+ function moveShelfItemToGrid(_x65, _x66, _x67, _x68) {
41008
41093
  return _moveShelfItemToGrid.apply(this, arguments);
41009
41094
  }
41010
41095
  return moveShelfItemToGrid;
@@ -41012,27 +41097,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41012
41097
  }, {
41013
41098
  key: "resetArticle",
41014
41099
  value: function () {
41015
- var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(basketId) {
41100
+ var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(basketId) {
41016
41101
  var set;
41017
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
41018
- while (1) switch (_context22.prev = _context22.next) {
41102
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
41103
+ while (1) switch (_context23.prev = _context23.next) {
41019
41104
  case 0:
41020
41105
  set = this.actSet();
41021
41106
  if (set) {
41022
- _context22.next = 3;
41107
+ _context23.next = 3;
41023
41108
  break;
41024
41109
  }
41025
- return _context22.abrupt("return");
41110
+ return _context23.abrupt("return");
41026
41111
  case 3:
41027
- _context22.next = 5;
41112
+ _context23.next = 5;
41028
41113
  return setHandlerInstance.resetArticle(set, basketId);
41029
41114
  case 5:
41030
41115
  case "end":
41031
- return _context22.stop();
41116
+ return _context23.stop();
41032
41117
  }
41033
- }, _callee22, this);
41118
+ }, _callee23, this);
41034
41119
  }));
41035
- function resetArticle(_x64) {
41120
+ function resetArticle(_x69) {
41036
41121
  return _resetArticle.apply(this, arguments);
41037
41122
  }
41038
41123
  return resetArticle;
@@ -41062,10 +41147,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41062
41147
  }, {
41063
41148
  key: "checkMatchingProducts",
41064
41149
  value: function () {
41065
- var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(from) {
41150
+ var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(from) {
41066
41151
  var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
41067
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
41068
- while (1) switch (_context23.prev = _context23.next) {
41152
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
41153
+ while (1) switch (_context24.prev = _context24.next) {
41069
41154
  case 0:
41070
41155
  set = this.actSet();
41071
41156
  if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
@@ -41079,20 +41164,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41079
41164
  }
41080
41165
  }
41081
41166
  if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
41082
- _context23.next = 6;
41167
+ _context24.next = 6;
41083
41168
  break;
41084
41169
  }
41085
- _context23.next = 5;
41170
+ _context24.next = 5;
41086
41171
  return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
41087
41172
  case 5:
41088
41173
  this.updatePriceInView();
41089
41174
  case 6:
41090
41175
  case "end":
41091
- return _context23.stop();
41176
+ return _context24.stop();
41092
41177
  }
41093
- }, _callee23, this);
41178
+ }, _callee24, this);
41094
41179
  }));
41095
- function checkMatchingProducts(_x65) {
41180
+ function checkMatchingProducts(_x70) {
41096
41181
  return _checkMatchingProducts.apply(this, arguments);
41097
41182
  }
41098
41183
  return checkMatchingProducts;
@@ -41169,7 +41254,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41169
41254
  }, {
41170
41255
  key: "saveToBasketWrapper",
41171
41256
  value: function () {
41172
- var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(event, repairOnly, force) {
41257
+ var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
41173
41258
  var _this$actions27,
41174
41259
  _this$actions27$toggl,
41175
41260
  _this$actions28,
@@ -41178,8 +41263,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41178
41263
  _this$actions32,
41179
41264
  _this$i18n14;
41180
41265
  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;
41181
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
41182
- while (1) switch (_context24.prev = _context24.next) {
41266
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
41267
+ while (1) switch (_context25.prev = _context25.next) {
41183
41268
  case 0:
41184
41269
  returnTo = this.getReturnTo(event);
41185
41270
  finalEvent = {
@@ -41187,50 +41272,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41187
41272
  saveBasket: true
41188
41273
  };
41189
41274
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
41190
- _context24.next = 21;
41275
+ _context25.next = 21;
41191
41276
  break;
41192
41277
  }
41193
41278
  product = undefined;
41194
41279
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
41195
- _context24.next = 10;
41280
+ _context25.next = 10;
41196
41281
  break;
41197
41282
  }
41198
41283
  url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
41199
- _context24.next = 8;
41284
+ _context25.next = 8;
41200
41285
  return this.api.getDataCache(url, url, undefined, 'catalog');
41201
41286
  case 8:
41202
- _result = _context24.sent;
41287
+ _result = _context25.sent;
41203
41288
  product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
41204
41289
  case 10:
41205
- _context24.next = 12;
41290
+ _context25.next = 12;
41206
41291
  return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
41207
41292
  case 12:
41208
- finalEvent = _context24.sent;
41293
+ finalEvent = _context25.sent;
41209
41294
  if (finalEvent) {
41210
- _context24.next = 17;
41295
+ _context25.next = 17;
41211
41296
  break;
41212
41297
  }
41213
- return _context24.abrupt("return", 'canceled');
41298
+ return _context25.abrupt("return", 'canceled');
41214
41299
  case 17:
41215
41300
  if (!(!finalEvent.saveBasket && finalEvent.event)) {
41216
- _context24.next = 20;
41301
+ _context25.next = 20;
41217
41302
  break;
41218
41303
  }
41219
41304
  (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
41220
41305
  type: finalEvent.event
41221
41306
  });
41222
- return _context24.abrupt("return", 'canceled');
41307
+ return _context25.abrupt("return", 'canceled');
41223
41308
  case 20:
41224
41309
  returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
41225
41310
  case 21:
41226
41311
  (_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);
41227
- _context24.next = 24;
41312
+ _context25.next = 24;
41228
41313
  return this.saveToBasket(finalEvent.event, repairOnly, force);
41229
41314
  case 24:
41230
- result = _context24.sent;
41315
+ result = _context25.sent;
41231
41316
  (_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);
41232
41317
  if (!(result === 'canceled')) {
41233
- _context24.next = 30;
41318
+ _context25.next = 30;
41234
41319
  break;
41235
41320
  }
41236
41321
  LOG$1.error(new DivaError('failed to save Basket'));
@@ -41238,10 +41323,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41238
41323
  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() : '',
41239
41324
  accept: true
41240
41325
  });
41241
- return _context24.abrupt("return", result);
41326
+ return _context25.abrupt("return", result);
41242
41327
  case 30:
41243
- _context24.t0 = returnTo;
41244
- _context24.next = _context24.t0 === 'OPEN_PDF' ? 33 : _context24.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
41328
+ _context25.t0 = returnTo;
41329
+ _context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
41245
41330
  break;
41246
41331
  case 33:
41247
41332
  if (!this.getBasket().PDFDocumentURL) {
@@ -41261,7 +41346,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41261
41346
  }
41262
41347
  });
41263
41348
  }
41264
- return _context24.abrupt("break", 36);
41349
+ return _context25.abrupt("break", 36);
41265
41350
  case 35:
41266
41351
  (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
41267
41352
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
@@ -41269,20 +41354,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41269
41354
  });
41270
41355
  case 36:
41271
41356
  if (!(result == 'noArticleToSave')) {
41272
- _context24.next = 39;
41357
+ _context25.next = 39;
41273
41358
  break;
41274
41359
  }
41275
41360
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
41276
- return _context24.abrupt("return", 'canceled');
41361
+ return _context25.abrupt("return", 'canceled');
41277
41362
  case 39:
41278
- return _context24.abrupt("return", result);
41363
+ return _context25.abrupt("return", result);
41279
41364
  case 40:
41280
41365
  case "end":
41281
- return _context24.stop();
41366
+ return _context25.stop();
41282
41367
  }
41283
- }, _callee24, this);
41368
+ }, _callee25, this);
41284
41369
  }));
41285
- function saveToBasketWrapper(_x66, _x67, _x68) {
41370
+ function saveToBasketWrapper(_x71, _x72, _x73) {
41286
41371
  return _saveToBasketWrapper.apply(this, arguments);
41287
41372
  }
41288
41373
  return saveToBasketWrapper;
@@ -41290,43 +41375,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41290
41375
  }, {
41291
41376
  key: "saveToBasket",
41292
41377
  value: function () {
41293
- var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
41378
+ var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
41294
41379
  var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
41295
41380
  var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
41296
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
41297
- while (1) switch (_context25.prev = _context25.next) {
41381
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
41382
+ while (1) switch (_context26.prev = _context26.next) {
41298
41383
  case 0:
41299
41384
  set = this.actSet();
41300
41385
  if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
41301
- _context25.next = 3;
41386
+ _context26.next = 3;
41302
41387
  break;
41303
41388
  }
41304
- return _context25.abrupt("return", 'noArticleToSave');
41389
+ return _context26.abrupt("return", 'noArticleToSave');
41305
41390
  case 3:
41306
41391
  actBasket = this.divaBasketHandler.actBasket;
41307
41392
  returnTo = this.getReturnTo(event);
41308
41393
  if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
41309
- _context25.next = 13;
41394
+ _context26.next = 13;
41310
41395
  break;
41311
41396
  }
41312
41397
  oldReturnTo = returnTo;
41313
41398
  this.ReturnTo = returnTo.replace('FAVORITS_', '');
41314
- _context25.next = 10;
41399
+ _context26.next = 10;
41315
41400
  return this.handleFavorites('SAVE');
41316
41401
  case 10:
41317
- result = _context25.sent;
41402
+ result = _context26.sent;
41318
41403
  if (result === 'canceled') {
41319
41404
  this.ReturnTo = oldReturnTo;
41320
41405
  }
41321
- return _context25.abrupt("return", result);
41406
+ return _context26.abrupt("return", result);
41322
41407
  case 13:
41323
- _context25.t0 = this.divaBasketHandler;
41324
- _context25.t1 = this.divaBasketHandler.actDivaNr;
41325
- _context25.next = 17;
41408
+ _context26.t0 = this.divaBasketHandler;
41409
+ _context26.t1 = this.divaBasketHandler.actDivaNr;
41410
+ _context26.next = 17;
41326
41411
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
41327
41412
  case 17:
41328
- _context25.t2 = _context25.sent;
41329
- _context25.t0.setBasketData.call(_context25.t0, _context25.t1, _context25.t2);
41413
+ _context26.t2 = _context26.sent;
41414
+ _context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
41330
41415
  if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
41331
41416
  this.ReturnTo = 'OPEN_SELLER_BASKET';
41332
41417
  returnTo = this.ReturnTo;
@@ -41341,11 +41426,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41341
41426
  this.divaBasketHandler.fillOrigConfigurations();
41342
41427
  actBasket.Updated = Date.now();
41343
41428
  if (!returnTo) {
41344
- _context25.next = 52;
41429
+ _context26.next = 52;
41345
41430
  break;
41346
41431
  }
41347
- _context25.t3 = returnTo;
41348
- _context25.next = _context25.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context25.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context25.t3 === 'OPEN_PDF' ? 33 : _context25.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context25.t3 === 'SAVE_BASKET' ? 33 : _context25.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context25.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
41432
+ _context26.t3 = returnTo;
41433
+ _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;
41349
41434
  break;
41350
41435
  case 28:
41351
41436
  (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
@@ -41359,7 +41444,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41359
41444
  basketData: actBasket
41360
41445
  }
41361
41446
  });
41362
- return _context25.abrupt("break", 52);
41447
+ return _context26.abrupt("break", 52);
41363
41448
  case 31:
41364
41449
  (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
41365
41450
  type: 'SELLER',
@@ -41371,23 +41456,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41371
41456
  basketData: actBasket
41372
41457
  }
41373
41458
  });
41374
- return _context25.abrupt("break", 52);
41459
+ return _context26.abrupt("break", 52);
41375
41460
  case 33:
41376
41461
  if (!(event == 'onSaveProduct')) {
41377
- _context25.next = 43;
41462
+ _context26.next = 43;
41378
41463
  break;
41379
41464
  }
41380
41465
  //copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
41381
41466
  actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
41382
- _context25.next = 37;
41467
+ _context26.next = 37;
41383
41468
  return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
41384
41469
  case 37:
41385
- _context25.next = 39;
41470
+ _context26.next = 39;
41386
41471
  return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
41387
41472
  case 39:
41388
- newDivaNr = _context25.sent;
41473
+ newDivaNr = _context26.sent;
41389
41474
  actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
41390
- _context25.next = 51;
41475
+ _context26.next = 51;
41391
41476
  break;
41392
41477
  case 43:
41393
41478
  if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
@@ -41396,32 +41481,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41396
41481
  }
41397
41482
  this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
41398
41483
  actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
41399
- _context25.next = 48;
41484
+ _context26.next = 48;
41400
41485
  return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
41401
41486
  case 48:
41402
- _result2 = _context25.sent;
41487
+ _result2 = _context26.sent;
41403
41488
  if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
41404
- _context25.next = 51;
41489
+ _context26.next = 51;
41405
41490
  break;
41406
41491
  }
41407
- return _context25.abrupt("return", 'canceled');
41492
+ return _context26.abrupt("return", 'canceled');
41408
41493
  case 51:
41409
- return _context25.abrupt("break", 52);
41494
+ return _context26.abrupt("break", 52);
41410
41495
  case 52:
41411
41496
  if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
41412
41497
  actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
41413
- _context25.next = 56;
41498
+ _context26.next = 56;
41414
41499
  return this.addToBasket(actBasket, event);
41415
41500
  case 56:
41416
- product = _context25.sent;
41417
- return _context25.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41501
+ product = _context26.sent;
41502
+ return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
41418
41503
  case 58:
41419
41504
  case "end":
41420
- return _context25.stop();
41505
+ return _context26.stop();
41421
41506
  }
41422
- }, _callee25, this);
41507
+ }, _callee26, this);
41423
41508
  }));
41424
- function saveToBasket(_x69, _x70, _x71) {
41509
+ function saveToBasket(_x74, _x75, _x76) {
41425
41510
  return _saveToBasket.apply(this, arguments);
41426
41511
  }
41427
41512
  return saveToBasket;
@@ -41655,23 +41740,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41655
41740
  }, {
41656
41741
  key: "getBasketDataWithEkText",
41657
41742
  value: function () {
41658
- var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
41659
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
41660
- while (1) switch (_context26.prev = _context26.next) {
41743
+ var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
41744
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
41745
+ while (1) switch (_context27.prev = _context27.next) {
41661
41746
  case 0:
41662
- _context26.t0 = this.divaBasketHandler;
41663
- _context26.t1 = this.divaBasketHandler.actDivaNr;
41664
- _context26.next = 4;
41747
+ _context27.t0 = this.divaBasketHandler;
41748
+ _context27.t1 = this.divaBasketHandler.actDivaNr;
41749
+ _context27.next = 4;
41665
41750
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
41666
41751
  case 4:
41667
- _context26.t2 = _context26.sent;
41668
- _context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
41669
- return _context26.abrupt("return", this.divaBasketHandler.actBasket);
41752
+ _context27.t2 = _context27.sent;
41753
+ _context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
41754
+ return _context27.abrupt("return", this.divaBasketHandler.actBasket);
41670
41755
  case 7:
41671
41756
  case "end":
41672
- return _context26.stop();
41757
+ return _context27.stop();
41673
41758
  }
41674
- }, _callee26, this);
41759
+ }, _callee27, this);
41675
41760
  }));
41676
41761
  function getBasketDataWithEkText() {
41677
41762
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -41697,7 +41782,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41697
41782
  }, {
41698
41783
  key: "addToBasket",
41699
41784
  value: function () {
41700
- var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(actBasket) {
41785
+ var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(actBasket) {
41701
41786
  var _this$actions36,
41702
41787
  _this$actions37,
41703
41788
  _this$actions38,
@@ -41716,44 +41801,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41716
41801
  to,
41717
41802
  variants,
41718
41803
  products,
41719
- _args27 = arguments;
41720
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
41721
- while (1) switch (_context27.prev = _context27.next) {
41804
+ _args28 = arguments;
41805
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
41806
+ while (1) switch (_context28.prev = _context28.next) {
41722
41807
  case 0:
41723
- event = _args27.length > 1 && _args27[1] !== undefined ? _args27[1] : 'onAddToBasket';
41724
- _context27.t0 = event;
41725
- _context27.next = _context27.t0 === 'onWebPlanerPrint' ? 5 : _context27.t0 === 'onWebPlanerSave' ? 7 : _context27.t0 === 'onWebPlanerShare' ? 9 : _context27.t0 === 'onRequestConsulation' ? 11 : _context27.t0 === 'onSave' ? 13 : _context27.t0 === 'onSendEmail' ? 15 : _context27.t0 === 'onSaveProduct' ? 20 : _context27.t0 === 'dontSaveBasket' ? 27 : _context27.t0 === 'onAddToBasket' ? 28 : 30;
41808
+ event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
41809
+ _context28.t0 = event;
41810
+ _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 : 30;
41726
41811
  break;
41727
41812
  case 5:
41728
41813
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41729
41814
  type: 'onWebPlanerPrint',
41730
41815
  data: actBasket.getAsJson()
41731
41816
  });
41732
- return _context27.abrupt("break", 32);
41817
+ return _context28.abrupt("break", 32);
41733
41818
  case 7:
41734
41819
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41735
41820
  type: 'onWebPlanerSave',
41736
41821
  data: actBasket.getAsJson()
41737
41822
  });
41738
- return _context27.abrupt("break", 32);
41823
+ return _context28.abrupt("break", 32);
41739
41824
  case 9:
41740
41825
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41741
41826
  type: 'onWebPlanerShare',
41742
41827
  data: actBasket.getAsJson()
41743
41828
  });
41744
- return _context27.abrupt("break", 32);
41829
+ return _context28.abrupt("break", 32);
41745
41830
  case 11:
41746
41831
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41747
41832
  type: 'onRequestConsulation',
41748
41833
  data: actBasket.getAsJson()
41749
41834
  });
41750
- return _context27.abrupt("break", 32);
41835
+ return _context28.abrupt("break", 32);
41751
41836
  case 13:
41752
41837
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41753
41838
  type: 'onSave',
41754
41839
  data: actBasket.getAsJson()
41755
41840
  });
41756
- return _context27.abrupt("break", 32);
41841
+ return _context28.abrupt("break", 32);
41757
41842
  case 15:
41758
41843
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
41759
41844
  this.divaBasketHandler.emailConfig = undefined;
@@ -41788,44 +41873,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41788
41873
  type: 'onAddToBasket',
41789
41874
  data: actBasket.getAsJson()
41790
41875
  });
41791
- return _context27.abrupt("break", 32);
41876
+ return _context28.abrupt("break", 32);
41792
41877
  case 20:
41793
41878
  this.actSet().CatalogData;
41794
- _context27.next = 23;
41879
+ _context28.next = 23;
41795
41880
  return this.api.saveAsProduct(this.sets, actBasket);
41796
41881
  case 23:
41797
- products = _context27.sent;
41882
+ products = _context28.sent;
41798
41883
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
41799
41884
  type: 'onAddToBasket',
41800
41885
  data: actBasket.getAsJson()
41801
41886
  });
41802
41887
  if (!products) {
41803
- _context27.next = 27;
41888
+ _context28.next = 27;
41804
41889
  break;
41805
41890
  }
41806
- return _context27.abrupt("return", products[0]);
41891
+ return _context28.abrupt("return", products[0]);
41807
41892
  case 27:
41808
41893
  case 28:
41809
41894
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
41810
41895
  type: 'onAddToBasket',
41811
41896
  data: actBasket.getAsJson()
41812
41897
  });
41813
- return _context27.abrupt("break", 32);
41898
+ return _context28.abrupt("break", 32);
41814
41899
  case 30:
41815
41900
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
41816
41901
  type: event,
41817
41902
  data: actBasket.getAsJson()
41818
41903
  });
41819
- return _context27.abrupt("break", 32);
41904
+ return _context28.abrupt("break", 32);
41820
41905
  case 32:
41821
- return _context27.abrupt("return");
41906
+ return _context28.abrupt("return");
41822
41907
  case 33:
41823
41908
  case "end":
41824
- return _context27.stop();
41909
+ return _context28.stop();
41825
41910
  }
41826
- }, _callee27, this);
41911
+ }, _callee28, this);
41827
41912
  }));
41828
- function addToBasket(_x72) {
41913
+ function addToBasket(_x77) {
41829
41914
  return _addToBasket.apply(this, arguments);
41830
41915
  }
41831
41916
  return addToBasket;
@@ -42095,9 +42180,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42095
42180
  key: "initApiForLogicOnly",
42096
42181
  value: //just for testing purposes
42097
42182
  function () {
42098
- var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42099
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
42100
- while (1) switch (_context28.prev = _context28.next) {
42183
+ var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
42184
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
42185
+ while (1) switch (_context29.prev = _context29.next) {
42101
42186
  case 0:
42102
42187
  //empty services
42103
42188
  this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
@@ -42110,17 +42195,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42110
42195
  jwt: jwt,
42111
42196
  apiKey: apiKey
42112
42197
  }), handler);
42113
- _context28.next = 3;
42198
+ _context29.next = 3;
42114
42199
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
42115
42200
  case 3:
42116
42201
  this.plannerHandler = new DivaPlannerHandler(true);
42117
42202
  case 4:
42118
42203
  case "end":
42119
- return _context28.stop();
42204
+ return _context29.stop();
42120
42205
  }
42121
- }, _callee28, this);
42206
+ }, _callee29, this);
42122
42207
  }));
42123
- function initApiForLogicOnly(_x73, _x74, _x75, _x76, _x77, _x78, _x79) {
42208
+ function initApiForLogicOnly(_x78, _x79, _x80, _x81, _x82, _x83, _x84) {
42124
42209
  return _initApiForLogicOnly.apply(this, arguments);
42125
42210
  }
42126
42211
  return initApiForLogicOnly;
@@ -42133,16 +42218,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42133
42218
  }, {
42134
42219
  key: "loadBasket",
42135
42220
  value: function () {
42136
- var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
42137
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
42138
- while (1) switch (_context29.prev = _context29.next) {
42221
+ var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
42222
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
42223
+ while (1) switch (_context30.prev = _context30.next) {
42139
42224
  case 0:
42140
- return _context29.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42225
+ return _context30.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
42141
42226
  case 1:
42142
42227
  case "end":
42143
- return _context29.stop();
42228
+ return _context30.stop();
42144
42229
  }
42145
- }, _callee29, this);
42230
+ }, _callee30, this);
42146
42231
  }));
42147
42232
  function loadBasket() {
42148
42233
  return _loadBasket.apply(this, arguments);
@@ -42157,39 +42242,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42157
42242
  }, {
42158
42243
  key: "initBasket",
42159
42244
  value: function () {
42160
- var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(init3D, ignoreFavorites) {
42245
+ var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites) {
42161
42246
  var initSetState, set, basket;
42162
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
42163
- while (1) switch (_context30.prev = _context30.next) {
42247
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
42248
+ while (1) switch (_context31.prev = _context31.next) {
42164
42249
  case 0:
42165
42250
  this.divaNr = this.divaBasketHandler.actDivaNr;
42166
42251
  initSetState = this.getInitStateForSet(!init3D);
42167
42252
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
42168
- _context30.next = 5;
42253
+ _context31.next = 5;
42169
42254
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
42170
42255
  case 5:
42171
42256
  //TODO check if when basket gets repaired the product match gets called
42172
42257
  set = this.actSet();
42173
42258
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
42174
42259
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
42175
- _context30.next = 10;
42260
+ _context31.next = 10;
42176
42261
  break;
42177
42262
  }
42178
- _context30.next = 10;
42263
+ _context31.next = 10;
42179
42264
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
42180
42265
  case 10:
42181
- _context30.next = 12;
42266
+ _context31.next = 12;
42182
42267
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
42183
42268
  case 12:
42184
- basket = _context30.sent;
42185
- return _context30.abrupt("return", basket);
42269
+ basket = _context31.sent;
42270
+ return _context31.abrupt("return", basket);
42186
42271
  case 14:
42187
42272
  case "end":
42188
- return _context30.stop();
42273
+ return _context31.stop();
42189
42274
  }
42190
- }, _callee30, this);
42275
+ }, _callee31, this);
42191
42276
  }));
42192
- function initBasket(_x80, _x81) {
42277
+ function initBasket(_x85, _x86) {
42193
42278
  return _initBasket.apply(this, arguments);
42194
42279
  }
42195
42280
  return initBasket;
@@ -42203,21 +42288,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42203
42288
  }, {
42204
42289
  key: "getValidVariantsLength",
42205
42290
  value: function () {
42206
- var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
42291
+ var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
42207
42292
  var set;
42208
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
42209
- while (1) switch (_context31.prev = _context31.next) {
42293
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
42294
+ while (1) switch (_context32.prev = _context32.next) {
42210
42295
  case 0:
42211
42296
  set = this.actSet();
42212
- _context31.next = 3;
42297
+ _context32.next = 3;
42213
42298
  return favoritesHandlerInstance.getValidVariants(set, true);
42214
42299
  case 3:
42215
- return _context31.abrupt("return", _context31.sent.length);
42300
+ return _context32.abrupt("return", _context32.sent.length);
42216
42301
  case 4:
42217
42302
  case "end":
42218
- return _context31.stop();
42303
+ return _context32.stop();
42219
42304
  }
42220
- }, _callee31, this);
42305
+ }, _callee32, this);
42221
42306
  }));
42222
42307
  function getValidVariantsLength() {
42223
42308
  return _getValidVariantsLength.apply(this, arguments);
@@ -42227,46 +42312,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42227
42312
  }, {
42228
42313
  key: "handleFavorites",
42229
42314
  value: function () {
42230
- var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(mode) {
42315
+ var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(mode) {
42231
42316
  var _this5 = this;
42232
42317
  var set, i;
42233
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
42234
- while (1) switch (_context32.prev = _context32.next) {
42318
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
42319
+ while (1) switch (_context33.prev = _context33.next) {
42235
42320
  case 0:
42236
42321
  set = this.actSet();
42237
42322
  i = 0;
42238
42323
  case 2:
42239
42324
  if (!favoritesHandlerInstance.IsCalcForSummary) {
42240
- _context32.next = 11;
42325
+ _context33.next = 11;
42241
42326
  break;
42242
42327
  }
42243
- _context32.next = 5;
42328
+ _context33.next = 5;
42244
42329
  return DivaUtils.Sleep(200);
42245
42330
  case 5:
42246
42331
  i++;
42247
42332
  if (!(i > 1000)) {
42248
- _context32.next = 9;
42333
+ _context33.next = 9;
42249
42334
  break;
42250
42335
  }
42251
42336
  LOG$1.error(new DivaError('error on generating Variants of Summary'));
42252
- return _context32.abrupt("break", 11);
42337
+ return _context33.abrupt("break", 11);
42253
42338
  case 9:
42254
- _context32.next = 2;
42339
+ _context33.next = 2;
42255
42340
  break;
42256
42341
  case 11:
42257
- _context32.next = 13;
42342
+ _context33.next = 13;
42258
42343
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
42259
42344
  return _this5.update2DGrid(set);
42260
42345
  }, this.actions);
42261
42346
  case 13:
42262
- return _context32.abrupt("return", _context32.sent);
42347
+ return _context33.abrupt("return", _context33.sent);
42263
42348
  case 14:
42264
42349
  case "end":
42265
- return _context32.stop();
42350
+ return _context33.stop();
42266
42351
  }
42267
- }, _callee32, this);
42352
+ }, _callee33, this);
42268
42353
  }));
42269
- function handleFavorites(_x82) {
42354
+ function handleFavorites(_x87) {
42270
42355
  return _handleFavorites.apply(this, arguments);
42271
42356
  }
42272
42357
  return handleFavorites;
@@ -42279,48 +42364,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42279
42364
  }, {
42280
42365
  key: "initSapOrderLinesFromBasket",
42281
42366
  value: function () {
42282
- var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(divaNr, init3D, onlyLoadOldBakset) {
42367
+ var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(divaNr, init3D, onlyLoadOldBakset) {
42283
42368
  var result, oldBasket, basket;
42284
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
42285
- while (1) switch (_context33.prev = _context33.next) {
42369
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
42370
+ while (1) switch (_context34.prev = _context34.next) {
42286
42371
  case 0:
42287
42372
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
42288
- _context33.next = 3;
42373
+ _context34.next = 3;
42289
42374
  return this.loadBasket();
42290
42375
  case 3:
42291
- result = _context33.sent;
42376
+ result = _context34.sent;
42292
42377
  if (!onlyLoadOldBakset) {
42293
- _context33.next = 6;
42378
+ _context34.next = 6;
42294
42379
  break;
42295
42380
  }
42296
- return _context33.abrupt("return", {
42381
+ return _context34.abrupt("return", {
42297
42382
  oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
42298
42383
  cache: {}
42299
42384
  });
42300
42385
  case 6:
42301
42386
  if (!(result === false)) {
42302
- _context33.next = 8;
42387
+ _context34.next = 8;
42303
42388
  break;
42304
42389
  }
42305
42390
  throw new Error('Could not load basket! ' + divaNr);
42306
42391
  case 8:
42307
42392
  oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
42308
- _context33.next = 11;
42393
+ _context34.next = 11;
42309
42394
  return this.initBasket(init3D);
42310
42395
  case 11:
42311
- basket = _context33.sent;
42312
- return _context33.abrupt("return", {
42396
+ basket = _context34.sent;
42397
+ return _context34.abrupt("return", {
42313
42398
  basket: basket,
42314
42399
  oldBasket: oldBasket,
42315
42400
  cache: this.api.getJsonDataCache()
42316
42401
  });
42317
42402
  case 13:
42318
42403
  case "end":
42319
- return _context33.stop();
42404
+ return _context34.stop();
42320
42405
  }
42321
- }, _callee33, this);
42406
+ }, _callee34, this);
42322
42407
  }));
42323
- function initSapOrderLinesFromBasket(_x83, _x84, _x85) {
42408
+ function initSapOrderLinesFromBasket(_x88, _x89, _x90) {
42324
42409
  return _initSapOrderLinesFromBasket.apply(this, arguments);
42325
42410
  }
42326
42411
  return initSapOrderLinesFromBasket;
@@ -42978,6 +43063,8 @@ var Grid = /*#__PURE__*/function () {
42978
43063
  _defineProperty(this, "articleRelationsForOtherGroups", void 0);
42979
43064
  //if in theis grid an shelfaccessoire is planned laod this article aswell
42980
43065
  _defineProperty(this, "montageOptions", void 0);
43066
+ //disableCellsByFreeText
43067
+ _defineProperty(this, "disableCellsByMeasures", void 0);
42981
43068
  //this option gets triggered when the shelfplanner is visible and set back when navigating out of shelfstep
42982
43069
  _defineProperty(this, "visitOption", void 0);
42983
43070
  //this field allows the shelfplanner on the rule the cellCount and ArticleRelations can change
@@ -43003,6 +43090,7 @@ var Grid = /*#__PURE__*/function () {
43003
43090
  this.showAfterOPT = data.ShowAfterOPT;
43004
43091
  this.showOnRule = grid.ShowOnRule;
43005
43092
  this.montageOptions = grid.MontageOptions;
43093
+ this.disableCellsByMeasures = grid.DisableCellsByMeasures;
43006
43094
  this.visitOption = grid.VisitOption;
43007
43095
  this.shelfId = 'SHELFARTICLE_' + article.basketId + '_' + index;
43008
43096
  this.heightGridCellCountOnRule = data.ShelfPlanner[index].HeightGridCellCountOnRule;
@@ -43338,7 +43426,7 @@ var Grid = /*#__PURE__*/function () {
43338
43426
  case 2:
43339
43427
  dontOverwriteOptions = [];
43340
43428
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
43341
- var option, inUseCell, specificAccessoire, options, j, optionCodex, montageOptionState, _this$article$shelfAc;
43429
+ var option, inUseCell, specificAccessoire, options, j, optionCodex, montageOptionState, _this$article$shelfAc, rest;
43342
43430
  return _regeneratorRuntime.wrap(function _loop$(_context4) {
43343
43431
  while (1) switch (_context4.prev = _context4.next) {
43344
43432
  case 0:
@@ -43354,7 +43442,7 @@ var Grid = /*#__PURE__*/function () {
43354
43442
  j = 0;
43355
43443
  case 6:
43356
43444
  if (!(j < options.length)) {
43357
- _context4.next = 27;
43445
+ _context4.next = 29;
43358
43446
  break;
43359
43447
  }
43360
43448
  optionCodex = options[j];
@@ -43363,7 +43451,7 @@ var Grid = /*#__PURE__*/function () {
43363
43451
  _context4.next = 11;
43364
43452
  break;
43365
43453
  }
43366
- return _context4.abrupt("continue", 24);
43454
+ return _context4.abrupt("continue", 26);
43367
43455
  case 11:
43368
43456
  if (!inUseCell) {
43369
43457
  _context4.next = 18;
@@ -43382,20 +43470,25 @@ var Grid = /*#__PURE__*/function () {
43382
43470
  return _this.updateAccessoireMontageOption('OPT' + optionCodex, 'OPVOHNE', []);
43383
43471
  case 21:
43384
43472
  if (!specificAccessoire.length) {
43385
- _context4.next = 24;
43473
+ _context4.next = 26;
43386
43474
  break;
43387
43475
  }
43388
- _context4.next = 24;
43389
- return _this.updateAccessoireMontageOption('OPT' + optionCodex, 'OPVOHNE', Object.values((_this$article$shelfAc = _this.article.shelfAccessoires) !== null && _this$article$shelfAc !== void 0 ? _this$article$shelfAc : {}).filter(function (a) {
43476
+ rest = Object.values((_this$article$shelfAc = _this.article.shelfAccessoires) !== null && _this$article$shelfAc !== void 0 ? _this$article$shelfAc : {}).filter(function (a) {
43390
43477
  return !specificAccessoire.find(function (b) {
43391
43478
  return b.basketId == a.basketId;
43392
43479
  });
43393
- }));
43394
- case 24:
43480
+ });
43481
+ if (!rest.length) {
43482
+ _context4.next = 26;
43483
+ break;
43484
+ }
43485
+ _context4.next = 26;
43486
+ return _this.updateAccessoireMontageOption('OPT' + optionCodex, 'OPVOHNE', rest);
43487
+ case 26:
43395
43488
  j++;
43396
43489
  _context4.next = 6;
43397
43490
  break;
43398
- case 27:
43491
+ case 29:
43399
43492
  case "end":
43400
43493
  return _context4.stop();
43401
43494
  }
@@ -43535,145 +43628,204 @@ var Grid = /*#__PURE__*/function () {
43535
43628
  */
43536
43629
  }, {
43537
43630
  key: "moveCell",
43538
- value: function moveCell(initialIndex, finalIndex) {
43539
- var _this2 = this;
43540
- var cellsMoving = {};
43541
- var cellsMovingFinalPosition = {};
43542
- var cellsAjusting = {};
43543
- var cellsAtStart = [];
43544
- var cellsAtEnd = [];
43545
- var startAndFinalSwitched = false;
43546
- if (initialIndex > finalIndex) {
43547
- var tmp = finalIndex;
43548
- finalIndex = initialIndex;
43549
- initialIndex = tmp;
43550
- startAndFinalSwitched = true;
43551
- }
43552
-
43553
- //ajust finalIndex maybe at the place is already an element
43554
- if (!startAndFinalSwitched) {
43555
- while (this.cells[finalIndex] && this.cells[finalIndex].InUse != -1 && this.cells[finalIndex + 1] !== undefined) {
43556
- finalIndex++;
43557
- }
43558
- }
43559
- for (var i = 0; i < initialIndex; i++) {
43560
- cellsAtStart.push(this.cells[i]);
43561
- }
43562
- if (!startAndFinalSwitched) {
43563
- //moving up
43564
- for (var _i5 = 0; _i5 < this.cells.length; _i5++) {
43565
- if (this.cells[_i5].InUse == initialIndex || this.cells[_i5].OnBoard == initialIndex) {
43566
- cellsMoving[_i5] = this.cells[_i5];
43567
- }
43568
- }
43569
- var cellsMovingCount = Object.keys(cellsMoving).length;
43570
- for (var _i6 = initialIndex; _i6 <= finalIndex; _i6++) {
43571
- if (!cellsMoving[_i6]) {
43572
- cellsAjusting[_i6 - cellsMovingCount] = this.cells[_i6];
43573
- }
43574
- }
43575
- var cellsAjustingCount = Object.keys(cellsAjusting).length;
43576
- for (var key in cellsMoving) {
43577
- cellsMovingFinalPosition[Number(key) + cellsAjustingCount] = cellsMoving[key];
43578
- }
43579
- for (var _i7 = finalIndex + 1; _i7 < this.cells.length; _i7++) {
43580
- cellsAtEnd.push(this.cells[_i7]);
43581
- }
43582
- } else {
43583
- //moving down
43584
- for (var _i8 = 0; _i8 < this.cells.length; _i8++) {
43585
- if (this.cells[_i8].InUse == finalIndex || this.cells[_i8].OnBoard == finalIndex) {
43586
- cellsMoving[_i8] = this.cells[_i8];
43587
- }
43588
- }
43589
- var _cellsMovingCount = Object.keys(cellsMoving).length;
43590
- for (var _i9 = initialIndex; _i9 <= finalIndex; _i9++) {
43591
- if (!cellsMoving[_i9]) {
43592
- cellsAjusting[_i9 + _cellsMovingCount] = this.cells[_i9];
43593
- }
43594
- }
43595
- var _cellsAjustingCount = Object.keys(cellsAjusting).length;
43596
- for (var _key in cellsMoving) {
43597
- cellsMovingFinalPosition[Number(_key) - _cellsAjustingCount] = cellsMoving[_key];
43598
- }
43599
- for (var _i10 = finalIndex + _cellsMovingCount; _i10 < this.cells.length; _i10++) {
43600
- cellsAtEnd.push(this.cells[_i10]);
43601
- }
43602
- }
43631
+ value: (function () {
43632
+ var _moveCell = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(initialIndex, finalIndex) {
43633
+ var _this2 = this;
43634
+ var cellsMoving, cellsMovingFinalPosition, cellsAjusting, cellsAtStart, cellsAtEnd, startAndFinalSwitched, tmp, i, _i5, cellsMovingCount, _i6, cellsAjustingCount, key, _i7, _i8, _cellsMovingCount, _i9, _cellsAjustingCount, _key, _i10, _key2, oldCells, _key3, _key4, _key5, _key6, _i11, _i12, accessoriesMoved, _loop2, _i13, resetCells, _i14, result, _i15;
43635
+ return _regeneratorRuntime.wrap(function _callee6$(_context8) {
43636
+ while (1) switch (_context8.prev = _context8.next) {
43637
+ case 0:
43638
+ cellsMoving = {};
43639
+ cellsMovingFinalPosition = {};
43640
+ cellsAjusting = {};
43641
+ cellsAtStart = [];
43642
+ cellsAtEnd = [];
43643
+ startAndFinalSwitched = false;
43644
+ if (initialIndex > finalIndex) {
43645
+ tmp = finalIndex;
43646
+ finalIndex = initialIndex;
43647
+ initialIndex = tmp;
43648
+ startAndFinalSwitched = true;
43649
+ }
43650
+
43651
+ //ajust finalIndex maybe at the place is already an element
43652
+ if (!startAndFinalSwitched) {
43653
+ while (this.cells[finalIndex] && this.cells[finalIndex].InUse != -1 && this.cells[finalIndex + 1] !== undefined) {
43654
+ finalIndex++;
43655
+ }
43656
+ }
43657
+ for (i = 0; i < initialIndex; i++) {
43658
+ cellsAtStart.push(this.cells[i]);
43659
+ }
43660
+ if (!startAndFinalSwitched) {
43661
+ //moving up
43662
+ for (_i5 = 0; _i5 < this.cells.length; _i5++) {
43663
+ if (this.cells[_i5].InUse == initialIndex || this.cells[_i5].OnBoard == initialIndex) {
43664
+ cellsMoving[_i5] = this.cells[_i5];
43665
+ }
43666
+ }
43667
+ cellsMovingCount = Object.keys(cellsMoving).length;
43668
+ for (_i6 = initialIndex; _i6 <= finalIndex; _i6++) {
43669
+ if (!cellsMoving[_i6]) {
43670
+ cellsAjusting[_i6 - cellsMovingCount] = this.cells[_i6];
43671
+ }
43672
+ }
43673
+ cellsAjustingCount = Object.keys(cellsAjusting).length;
43674
+ for (key in cellsMoving) {
43675
+ cellsMovingFinalPosition[Number(key) + cellsAjustingCount] = cellsMoving[key];
43676
+ }
43677
+ for (_i7 = finalIndex + 1; _i7 < this.cells.length; _i7++) {
43678
+ cellsAtEnd.push(this.cells[_i7]);
43679
+ }
43680
+ } else {
43681
+ //moving down
43682
+ for (_i8 = 0; _i8 < this.cells.length; _i8++) {
43683
+ if (this.cells[_i8].InUse == finalIndex || this.cells[_i8].OnBoard == finalIndex) {
43684
+ cellsMoving[_i8] = this.cells[_i8];
43685
+ }
43686
+ }
43687
+ _cellsMovingCount = Object.keys(cellsMoving).length;
43688
+ for (_i9 = initialIndex; _i9 <= finalIndex; _i9++) {
43689
+ if (!cellsMoving[_i9]) {
43690
+ cellsAjusting[_i9 + _cellsMovingCount] = this.cells[_i9];
43691
+ }
43692
+ }
43693
+ _cellsAjustingCount = Object.keys(cellsAjusting).length;
43694
+ for (_key in cellsMoving) {
43695
+ cellsMovingFinalPosition[Number(_key) - _cellsAjustingCount] = cellsMoving[_key];
43696
+ }
43697
+ for (_i10 = finalIndex + _cellsMovingCount; _i10 < this.cells.length; _i10++) {
43698
+ cellsAtEnd.push(this.cells[_i10]);
43699
+ }
43700
+ }
43603
43701
 
43604
- // if an element gets moved which shouldnt be moved dont fill the cells with the new order and just cancel
43605
- for (var _key2 in cellsAjusting) {
43606
- if (cellsAjusting[_key2].IsDisabled || cellsAjusting[_key2].NoMove) {
43607
- return;
43608
- }
43609
- }
43610
- var oldCells = this.cells;
43611
- // fill cells with new order
43612
- this.cells = [];
43613
- this.cells = cellsAtStart;
43614
- if (!startAndFinalSwitched) {
43615
- for (var _key3 in cellsAjusting) {
43616
- this.cells.push(cellsAjusting[_key3]);
43617
- }
43618
- for (var _key4 in cellsMovingFinalPosition) {
43619
- this.cells.push(cellsMovingFinalPosition[_key4]);
43620
- }
43621
- } else {
43622
- for (var _key5 in cellsMovingFinalPosition) {
43623
- this.cells.push(cellsMovingFinalPosition[_key5]);
43624
- }
43625
- for (var _key6 in cellsAjusting) {
43626
- this.cells.push(cellsAjusting[_key6]);
43627
- }
43628
- }
43629
- for (var _i11 = 0; _i11 < cellsAtEnd.length; _i11++) {
43630
- this.cells.push(cellsAtEnd[_i11]);
43631
- }
43632
- for (var _i12 = 0; _i12 < this.cells.length; _i12++) {
43633
- this.cells[_i12].moveCellToIndex(_i12);
43634
- }
43702
+ // if an element gets moved which shouldnt be moved dont fill the cells with the new order and just cancel
43703
+ _context8.t0 = _regeneratorRuntime.keys(cellsAjusting);
43704
+ case 11:
43705
+ if ((_context8.t1 = _context8.t0()).done) {
43706
+ _context8.next = 17;
43707
+ break;
43708
+ }
43709
+ _key2 = _context8.t1.value;
43710
+ if (!(cellsAjusting[_key2].IsDisabled || cellsAjusting[_key2].NoMove)) {
43711
+ _context8.next = 15;
43712
+ break;
43713
+ }
43714
+ return _context8.abrupt("return");
43715
+ case 15:
43716
+ _context8.next = 11;
43717
+ break;
43718
+ case 17:
43719
+ oldCells = this.cells; // fill cells with new order
43720
+ this.cells = [];
43721
+ this.cells = cellsAtStart;
43722
+ if (!startAndFinalSwitched) {
43723
+ for (_key3 in cellsAjusting) {
43724
+ this.cells.push(cellsAjusting[_key3]);
43725
+ }
43726
+ for (_key4 in cellsMovingFinalPosition) {
43727
+ this.cells.push(cellsMovingFinalPosition[_key4]);
43728
+ }
43729
+ } else {
43730
+ for (_key5 in cellsMovingFinalPosition) {
43731
+ this.cells.push(cellsMovingFinalPosition[_key5]);
43732
+ }
43733
+ for (_key6 in cellsAjusting) {
43734
+ this.cells.push(cellsAjusting[_key6]);
43735
+ }
43736
+ }
43737
+ for (_i11 = 0; _i11 < cellsAtEnd.length; _i11++) {
43738
+ this.cells.push(cellsAtEnd[_i11]);
43739
+ }
43740
+ for (_i12 = 0; _i12 < this.cells.length; _i12++) {
43741
+ this.cells[_i12].moveCellToIndex(_i12);
43742
+ }
43635
43743
 
43636
- //check for all the accessoires that moved during the process if they are allowed to be there
43637
- var accessoriesMoved = [];
43638
- var _loop2 = function _loop2() {
43639
- var cell = _this2.cells[_i13];
43640
- if (cell.Type == 'fitsOnParentRule' && cell.InUse > -1 && !accessoriesMoved.find(function (a) {
43641
- var _cell$Article2;
43642
- return ((_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) == a.basketId;
43643
- })) {
43644
- var _cell$Article3;
43645
- accessoriesMoved.push({
43646
- article: cell.Article,
43647
- basketId: (_cell$Article3 = cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId,
43648
- index: cell.InUse
43649
- });
43650
- }
43651
- };
43652
- for (var _i13 = 0; _i13 < this.cells.length; _i13++) {
43653
- _loop2();
43654
- }
43655
- var resetCells = false;
43656
- for (var _i14 = 0; _i14 < accessoriesMoved.length; _i14++) {
43657
- var result = this.tryFitOnShelf(accessoriesMoved[_i14].article, accessoriesMoved[_i14].index, accessoriesMoved[_i14].article.shelfPlanner, true);
43658
- if (result && result.type === 'fitsOnParentRule' && result.index === accessoriesMoved[_i14].index) ; else {
43659
- resetCells = true;
43660
- break;
43661
- }
43662
- }
43663
- if (resetCells) {
43664
- this.cells = oldCells;
43665
- for (var _i15 = 0; _i15 < this.cells.length; _i15++) {
43666
- this.cells[_i15].moveCellToIndex(_i15);
43667
- }
43744
+ //check for all the accessoires that moved during the process if they are allowed to be there
43745
+ accessoriesMoved = [];
43746
+ _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
43747
+ var cell, _cell$Article3;
43748
+ return _regeneratorRuntime.wrap(function _loop2$(_context7) {
43749
+ while (1) switch (_context7.prev = _context7.next) {
43750
+ case 0:
43751
+ cell = _this2.cells[_i13];
43752
+ if (cell.Type == 'fitsOnParentRule' && cell.InUse > -1 && !accessoriesMoved.find(function (a) {
43753
+ var _cell$Article2;
43754
+ return ((_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) == a.basketId;
43755
+ })) {
43756
+ accessoriesMoved.push({
43757
+ article: cell.Article,
43758
+ basketId: (_cell$Article3 = cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId,
43759
+ index: cell.InUse
43760
+ });
43761
+ }
43762
+ case 2:
43763
+ case "end":
43764
+ return _context7.stop();
43765
+ }
43766
+ }, _loop2);
43767
+ });
43768
+ _i13 = 0;
43769
+ case 26:
43770
+ if (!(_i13 < this.cells.length)) {
43771
+ _context8.next = 31;
43772
+ break;
43773
+ }
43774
+ return _context8.delegateYield(_loop2(), "t2", 28);
43775
+ case 28:
43776
+ _i13++;
43777
+ _context8.next = 26;
43778
+ break;
43779
+ case 31:
43780
+ resetCells = false;
43781
+ _i14 = 0;
43782
+ case 33:
43783
+ if (!(_i14 < accessoriesMoved.length)) {
43784
+ _context8.next = 43;
43785
+ break;
43786
+ }
43787
+ result = this.tryFitOnShelf(accessoriesMoved[_i14].article, accessoriesMoved[_i14].index, accessoriesMoved[_i14].article.shelfPlanner, true);
43788
+ if (!(result && result.type === 'fitsOnParentRule' && result.index === accessoriesMoved[_i14].index)) {
43789
+ _context8.next = 38;
43790
+ break;
43791
+ }
43792
+ _context8.next = 40;
43793
+ break;
43794
+ case 38:
43795
+ resetCells = true;
43796
+ return _context8.abrupt("break", 43);
43797
+ case 40:
43798
+ _i14++;
43799
+ _context8.next = 33;
43800
+ break;
43801
+ case 43:
43802
+ if (resetCells) {
43803
+ this.cells = oldCells;
43804
+ for (_i15 = 0; _i15 < this.cells.length; _i15++) {
43805
+ this.cells[_i15].moveCellToIndex(_i15);
43806
+ }
43807
+ }
43808
+ this.updateRequredCells();
43809
+ _context8.next = 47;
43810
+ return this.updateMontageOption();
43811
+ case 47:
43812
+ return _context8.abrupt("return", resetCells ? 'RESETTED_CELLS' : 'SUCCESS');
43813
+ case 48:
43814
+ case "end":
43815
+ return _context8.stop();
43816
+ }
43817
+ }, _callee6, this);
43818
+ }));
43819
+ function moveCell(_x11, _x12) {
43820
+ return _moveCell.apply(this, arguments);
43668
43821
  }
43669
- this.updateRequredCells();
43670
- return resetCells ? 'RESETTED_CELLS' : 'SUCCESS';
43671
- }
43672
-
43822
+ return moveCell;
43823
+ }()
43673
43824
  /**
43674
43825
  *
43675
43826
  * @returns if one or more cells a still required return true
43676
43827
  */
43828
+ )
43677
43829
  }, {
43678
43830
  key: "areCellsStillRequired",
43679
43831
  value: function areCellsStillRequired() {
@@ -43885,6 +44037,28 @@ var Grid = /*#__PURE__*/function () {
43885
44037
  }
43886
44038
  return true;
43887
44039
  }
44040
+ }, {
44041
+ key: "getCellCount",
44042
+ value: function getCellCount(dp) {
44043
+ var count = this.cells.length;
44044
+ if (this.DisableCellsByMeasures) {
44045
+ var lowestMeasure = undefined;
44046
+ var options = this.DisableCellsByMeasures.options;
44047
+ for (var i = 0; i < options.length; i++) {
44048
+ if (options[i].dp && dp && dp == options[i].dp) continue;
44049
+ var o = options[i].opt;
44050
+ var ops = this.article.getArticleOptionState('OPT' + o);
44051
+ if (!ops) continue;
44052
+ if (!isNaN(Number(ops.freeText)) && (lowestMeasure === undefined || lowestMeasure > Number(ops.freeText))) lowestMeasure = Number(ops.freeText);
44053
+ }
44054
+ if (lowestMeasure) {
44055
+ var ratio = this.DisableCellsByMeasures.maxMeasure / this.cells.length;
44056
+ var rest = this.DisableCellsByMeasures.maxMeasure - lowestMeasure;
44057
+ count = this.cells.length - Math.round(rest / ratio);
44058
+ }
44059
+ }
44060
+ return count;
44061
+ }
43888
44062
  }, {
43889
44063
  key: "ShelfId",
43890
44064
  get: function get() {
@@ -44036,6 +44210,11 @@ var Grid = /*#__PURE__*/function () {
44036
44210
  set: function set(val) {
44037
44211
  this.disabledByRule = val;
44038
44212
  }
44213
+ }, {
44214
+ key: "DisableCellsByMeasures",
44215
+ get: function get() {
44216
+ return this.disableCellsByMeasures;
44217
+ }
44039
44218
  }, {
44040
44219
  key: "ArticleRelationsForOtherGroups",
44041
44220
  get: function get() {