@crystaldesign/web-planner-logic 24.12.0-beta.6 → 24.12.0-beta.8

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-24c3effa.js → DivaBoxPlanner-7b508f32.js} +3 -3
  2. package/build/cjs/{DivaStandardPlanner-b62c0304.js → DivaStandardPlanner-c73e6e57.js} +17 -81
  3. package/build/cjs/{DoorPlanner-27606bf5.js → DoorPlanner-ffa7af62.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-0ac712b7.js → Host3DSignalR-d3830717.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-cfdd098a.js → LiviqueWWSHandler-85a1dc89.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-e8efc3dc.js → PfisterWWSHandler-b47dba23.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-5330f8e0.js → PlannerHandler2D-9d9d1af9.js} +27 -37
  8. package/build/cjs/{ProductBasketHandler-0748483c.js → ProductBasketHandler-22cb7ee4.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-899cfde8.js → SeriousBasketHandler-28f031fa.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-3b246a69.js → ShelfPlanner-4b697826.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-7468715d.js → StandardWWSHandler-ab0c107b.js} +1 -1
  12. package/build/cjs/{index-3f62a309.js → index-bceec53b.js} +297 -205
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-4071a7c8.js → DivaBoxPlanner-81bbe89c.js} +3 -3
  15. package/build/esm/{DivaStandardPlanner-70df13db.js → DivaStandardPlanner-c3f7e518.js} +17 -81
  16. package/build/esm/{DoorPlanner-982053c8.js → DoorPlanner-f4b338c4.js} +1 -1
  17. package/build/esm/{Host3DSignalR-4c56ff5e.js → Host3DSignalR-45bb9e24.js} +1 -1
  18. package/build/esm/{LiviqueWWSHandler-b692f264.js → LiviqueWWSHandler-d401b8c4.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-ecfa8cb2.js → PfisterWWSHandler-ebfad71d.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-b2a7194e.js → PlannerHandler2D-fb755d99.js} +27 -37
  21. package/build/esm/{ProductBasketHandler-5f1f22c2.js → ProductBasketHandler-68443648.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-ec280d69.js → SeriousBasketHandler-53ff90b8.js} +1 -1
  23. package/build/esm/{ShelfPlanner-e134bcd0.js → ShelfPlanner-569fe7f0.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-9df76d79.js → StandardWWSHandler-b903e37c.js} +1 -1
  25. package/build/esm/{index-d4e4c9f2.js → index-3bbc6483.js} +297 -205
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/index.d.ts +1 -1
  28. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +3 -2
  30. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -1
  32. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -2
  34. package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts +15 -7
  36. package/build/types/web-planner-logic/src/interface/Rules/NotificationRule.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +7 -3
  38. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +10 -2
  40. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +8 -1
  42. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  45. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +26 -5
  47. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +3 -2
  49. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +1 -3
  51. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  52. package/package.json +2 -2
@@ -18310,7 +18310,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18310
18310
  DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
18311
18311
  }
18312
18312
  }],
18313
- warningRule: [],
18313
+ warningRules: [],
18314
+ bannerRules: [],
18314
18315
  summaryTabGroupPosition: undefined,
18315
18316
  onConfigSingleDontGeneralize: false,
18316
18317
  ignoreMaxPriceAsBP: false,
@@ -18615,7 +18616,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
18615
18616
  } else if (item.Codex == 'NOTIFICATIONS') {
18616
18617
  _this.catalogData.notificationsRules = JSON.parse(item.Value);
18617
18618
  } else if (item.Codex == 'WARNINGS') {
18618
- _this.catalogData.warningRule = JSON.parse(item.Value);
18619
+ _this.catalogData.warningRules = JSON.parse(item.Value);
18620
+ } else if (item.Codex == 'BANNER') {
18621
+ _this.catalogData.bannerRules = JSON.parse(item.Value);
18619
18622
  } else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
18620
18623
  _this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
18621
18624
  } else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
@@ -19483,9 +19486,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
19483
19486
  return this.catalogData.notificationsRules;
19484
19487
  }
19485
19488
  }, {
19486
- key: "warningRule",
19489
+ key: "warningRules",
19487
19490
  get: function get() {
19488
- return this.catalogData.warningRule;
19491
+ return this.catalogData.warningRules;
19492
+ }
19493
+ }, {
19494
+ key: "bannerRules",
19495
+ get: function get() {
19496
+ return this.catalogData.bannerRules;
19489
19497
  }
19490
19498
  }, {
19491
19499
  key: "dontSaveAlternativeRenderings",
@@ -23568,7 +23576,7 @@ var DivaArticle = /*#__PURE__*/function () {
23568
23576
  break;
23569
23577
  }
23570
23578
  _context.next = 4;
23571
- return Promise.resolve().then(function () { return require('./ShelfPlanner-3b246a69.js'); });
23579
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-4b697826.js'); });
23572
23580
  case 4:
23573
23581
  _yield$import = _context.sent;
23574
23582
  ShelfPlanner = _yield$import["default"];
@@ -25432,6 +25440,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25432
25440
  }, {
25433
25441
  key: "evalOpvsOnOpvsConstructionRules",
25434
25442
  value: function evalOpvsOnOpvsConstructionRules(article) {
25443
+ var _article$CatalogData$;
25435
25444
  var somethingChanged = false;
25436
25445
  var previousRules = {};
25437
25446
  if (article.updatedOPVbyOPVConstructionRules) {
@@ -25495,19 +25504,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25495
25504
  }
25496
25505
  }
25497
25506
  }
25498
- var notifications = this.checkNotificationRules(article.CatalogData.warningRule, _defineProperty__default["default"]({}, article.basketId, article), {});
25499
- if (notifications !== null && notifications !== void 0 && notifications.length) {
25500
- for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25501
- var _item = notifications[_i3];
25502
- if (!_item.showAsWarning) continue;
25503
- article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25504
- message: _item.message,
25505
- type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25506
- }));
25507
+ if ((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length) {
25508
+ var notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty__default["default"]({}, article.basketId, article), {});
25509
+ if (notifications !== null && notifications !== void 0 && notifications.length) {
25510
+ for (var _i3 = 0; _i3 < notifications.length; _i3++) {
25511
+ var _item = notifications[_i3];
25512
+ if (!_item.showAsWarning) continue;
25513
+ article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction('OPT' + _item.showAsWarning.option, 'OPV' + _item.showAsWarning.optionValue, {
25514
+ message: _item.message,
25515
+ type: _item.type == 'error' ? 'DISABLE' : 'WARNING'
25516
+ }));
25517
+ }
25518
+ somethingChanged = true;
25507
25519
  }
25508
- somethingChanged = true;
25509
25520
  }
25510
-
25511
25521
  //falls die vorherigen reglen anders sind wie die neuen, artiklekonfiguration neu laden
25512
25522
  if (somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules)) {
25513
25523
  this.updateCfgValues(article, {}, {});
@@ -25523,7 +25533,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25523
25533
  }, {
25524
25534
  key: "checkNotificationRules",
25525
25535
  value: function checkNotificationRules(toCheckRules, articles, visitedOptions, event) {
25526
- if (!(toCheckRules !== null && toCheckRules !== void 0 && toCheckRules.length)) return;
25527
25536
  var returnValue = [];
25528
25537
  for (var i = 0; i < toCheckRules.length; i++) {
25529
25538
  var entry = toCheckRules[i];
@@ -25531,27 +25540,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25531
25540
  var ruleValid = false;
25532
25541
  for (var j = 0; j < rules.length; j++) {
25533
25542
  for (var basketId in articles) {
25534
- var _rule$articles;
25535
25543
  ruleValid = false;
25536
25544
  var rule = rules[j];
25537
25545
  var article = articles[basketId];
25538
- if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) continue;
25539
- if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) continue;
25540
- if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[basketId])) continue;
25541
- if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) continue;
25542
- if (rule.sizes) console.error('size logic not jet implemented');
25546
+ if (!this.checkRule(rule, article, visitedOptions)) continue;
25543
25547
  if ((event === null || event === void 0 ? void 0 : event.type) == 'config' && entry.type == 'notification') {
25544
- var _entry$checkOnEvents, _entry$checkOnEvents2, _entry$checkOnEvents3, _entry$checkOnEvents4;
25545
- var checkOPT = (_entry$checkOnEvents = entry.checkOnEvents) !== null && _entry$checkOnEvents !== void 0 && _entry$checkOnEvents.option ? 'OPT' + ((_entry$checkOnEvents2 = entry.checkOnEvents) === null || _entry$checkOnEvents2 === void 0 ? void 0 : _entry$checkOnEvents2.option) : undefined;
25546
- var checkOPV = (_entry$checkOnEvents3 = entry.checkOnEvents) !== null && _entry$checkOnEvents3 !== void 0 && _entry$checkOnEvents3.optionValue ? 'OPV' + ((_entry$checkOnEvents4 = entry.checkOnEvents) === null || _entry$checkOnEvents4 === void 0 ? void 0 : _entry$checkOnEvents4.optionValue) : undefined;
25547
- if (checkOPT) {
25548
- if (Array.isArray(checkOPT) && !checkOPT.includes(event.data.optionCodex)) continue;
25549
- if (!Array.isArray(checkOPT) && checkOPT !== event.data.optionCodex) continue;
25550
- }
25551
- if (checkOPV) {
25552
- if (Array.isArray(checkOPV) && !checkOPV.includes(event.data.optionValueCodex)) continue;
25553
- if (!Array.isArray(checkOPV) && checkOPV !== event.data.optionValueCodex) continue;
25554
- }
25548
+ if (!this.checkOnEvent(event.checkOnEvents, event.data)) continue;
25555
25549
  }
25556
25550
  ruleValid = true;
25557
25551
  break;
@@ -25567,6 +25561,35 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25567
25561
  }
25568
25562
  return returnValue;
25569
25563
  }
25564
+ }, {
25565
+ key: "checkRule",
25566
+ value: function checkRule(rule, article, visitedOptions) {
25567
+ var _rule$articles;
25568
+ if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
25569
+ if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
25570
+ if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
25571
+ if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) return false;
25572
+ if (rule.sizes) {
25573
+ console.error('size logic not jet implemented');
25574
+ return false;
25575
+ }
25576
+ return true;
25577
+ }
25578
+ }, {
25579
+ key: "checkOnEvent",
25580
+ value: function checkOnEvent(event, data) {
25581
+ var checkOPT = event !== null && event !== void 0 && event.option ? 'OPT' + (event === null || event === void 0 ? void 0 : event.option) : undefined;
25582
+ var checkOPV = event !== null && event !== void 0 && event.optionValue ? 'OPV' + (event === null || event === void 0 ? void 0 : event.optionValue) : undefined;
25583
+ if (checkOPT) {
25584
+ if (Array.isArray(checkOPT) && !checkOPT.includes(data.optionCodex)) return false;
25585
+ if (!Array.isArray(checkOPT) && checkOPT !== data.optionCodex) return false;
25586
+ }
25587
+ if (checkOPV) {
25588
+ if (Array.isArray(checkOPV) && !checkOPV.includes(data.optionValueCodex)) return false;
25589
+ if (!Array.isArray(checkOPV) && checkOPV !== data.optionValueCodex) return false;
25590
+ }
25591
+ return true;
25592
+ }
25570
25593
  }, {
25571
25594
  key: "objectIncudesObject",
25572
25595
  value: function objectIncudesObject(smallerObject, biggerObject) {
@@ -27029,14 +27052,9 @@ var DivaSet = /*#__PURE__*/function () {
27029
27052
  return _ref.apply(this, arguments);
27030
27053
  };
27031
27054
  }());
27032
- _defineProperty__default["default"](this, "setPosNr", function (elementId, posNr, accNr) {
27055
+ _defineProperty__default["default"](this, "setPosNr", function (elementId, posNr) {
27033
27056
  var article = _this.getArticleByElementId(elementId);
27034
- if (article) {
27035
- article.posNr = posNr;
27036
- if (accNr != undefined) {
27037
- article.posNr = Number(posNr + '.' + (accNr < 10 ? '0' : '') + accNr.toString());
27038
- }
27039
- }
27057
+ if (article) article.posNr = posNr;
27040
27058
  _this.sortDivaArticlesByArticlePosNr();
27041
27059
  });
27042
27060
  _defineProperty__default["default"](this, "setElementId", function (basketID, elementId) {
@@ -27287,54 +27305,56 @@ var DivaSet = /*#__PURE__*/function () {
27287
27305
  }, {
27288
27306
  key: "giveAccNewPosNrByBasketId",
27289
27307
  value: function giveAccNewPosNrByBasketId(BasketIdParent) {
27290
- var curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent);
27308
+ var curNum = this.giveAccPosNrByBasketId(BasketIdParent);
27291
27309
  this.givePartlistAccPosNrByBasketId(BasketIdParent, curNum);
27292
27310
  this.sortDivaArticlesByArticlePosNr();
27293
27311
  }
27294
27312
  }, {
27295
- key: "giveNotPlannedAccPosNrByBasketId",
27296
- value: function giveNotPlannedAccPosNrByBasketId(BasketIdParent, BasketId, curNum) {
27313
+ key: "giveAccPosNrByBasketId",
27314
+ value: function giveAccPosNrByBasketId(basketId) {
27315
+ var curNum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
27297
27316
  var allAccs = [];
27298
27317
  var articles = this.getDivaArticles();
27299
- if (!BasketId) BasketId = BasketIdParent;
27300
- var myParentArticle = articles[BasketIdParent];
27301
- var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(BasketId),
27318
+ var article = articles[basketId];
27319
+ if (!article) throw new Error('article ' + basketId + ' does not exist');
27320
+ var myParentArticle = article.getBaseParent();
27321
+ var _this$getSplitPlanned = this.getSplitPlannedAccessoiresOfBasketId(basketId),
27302
27322
  notPlannedAcc = _this$getSplitPlanned.notPlannedAcc,
27303
27323
  plannedAcc = _this$getSplitPlanned.plannedAcc;
27304
- if (curNum === undefined) curNum = this.getStartingPosNr(BasketIdParent);
27305
- for (var key in notPlannedAcc) {
27306
- allAccs.push(notPlannedAcc[key]);
27324
+ for (var key in plannedAcc) {
27325
+ allAccs.push(plannedAcc[key]);
27326
+ }
27327
+ for (var _key3 in notPlannedAcc) {
27328
+ allAccs.push(notPlannedAcc[_key3]);
27307
27329
  }
27308
27330
  for (var i = 0; i < allAccs.length; i++) {
27331
+ var accessoire = allAccs[i];
27309
27332
  curNum++;
27310
- allAccs[i].posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27311
- if (allAccs[i].shelfAccessoires || Object.keys(allAccs[i].accessoires).length !== 0) {
27312
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, allAccs[i].basketId, curNum);
27333
+ accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27334
+ if (accessoire.shelfAccessoires || Object.keys(accessoire.accessoires).length !== 0) {
27335
+ curNum = this.giveAccPosNrByBasketId(accessoire.basketId, curNum);
27336
+ }
27337
+ if (accessoire.hasPartlistArticle) {
27338
+ curNum = this.givePartlistAccPosNrByBasketId(accessoire.basketId, curNum);
27313
27339
  }
27314
- }
27315
- for (var _key3 in plannedAcc) {
27316
- curNum = this.giveNotPlannedAccPosNrByBasketId(BasketIdParent, _key3, curNum);
27317
27340
  }
27318
27341
  return curNum;
27319
27342
  }
27320
27343
  }, {
27321
27344
  key: "givePartlistAccPosNrByBasketId",
27322
- value: function givePartlistAccPosNrByBasketId(BasketIdParent, curNum) {
27323
- var articles = this.getDivaArticles();
27324
- if (!Object.entries(articles).length) return;
27325
- var myParentArticle = articles[BasketIdParent];
27326
- var allAcc = [myParentArticle];
27327
- allAcc = allAcc.concat(this.getAccessoiresOfArticleRecursive(BasketIdParent));
27328
- for (var i = 0; i < allAcc.length; i++) {
27329
- var partlistArticles = this.getPartlistArticlesOfArticle(allAcc[i]);
27330
- if (!(partlistArticles !== null && partlistArticles !== void 0 && partlistArticles.length)) continue;
27331
- for (var j = 0; j < partlistArticles.length; j++) {
27332
- var accessoire = partlistArticles[j];
27333
- if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27334
- curNum++;
27335
- accessoire.posNr = Number(parseFloat((myParentArticle.posNr + curNum / 100).toString()).toFixed(2));
27336
- }
27345
+ value: function givePartlistAccPosNrByBasketId(basketId, curNum) {
27346
+ var article = this.getArticleByBasketId(basketId);
27347
+ if (!article) return curNum;
27348
+ var baseParent = article.getBaseParent();
27349
+ var partlistArticles = this.getPartlistArticlesOfArticle(article);
27350
+ for (var j = 0; j < ((_partlistArticles$len = partlistArticles === null || partlistArticles === void 0 ? void 0 : partlistArticles.length) !== null && _partlistArticles$len !== void 0 ? _partlistArticles$len : 0); j++) {
27351
+ var _partlistArticles$len;
27352
+ var accessoire = partlistArticles[j];
27353
+ if (accessoire.hasPartlistArticle && accessoire.isPartListArticle && !accessoire.partlistArticleVisibleInTree) continue;
27354
+ curNum++;
27355
+ accessoire.posNr = Number(parseFloat((baseParent.posNr + curNum / 100).toString()).toFixed(2));
27337
27356
  }
27357
+ return curNum;
27338
27358
  }
27339
27359
  }, {
27340
27360
  key: "getAccessoiresOfBasketId",
@@ -27366,11 +27386,6 @@ var DivaSet = /*#__PURE__*/function () {
27366
27386
  notPlannedAcc: notPlannedAcc
27367
27387
  };
27368
27388
  }
27369
- }, {
27370
- key: "getStartingPosNr",
27371
- value: function getStartingPosNr(basketid) {
27372
- return this.getAccessoiresOfArticleRecursive(basketid, 'onlyPlanner').length;
27373
- }
27374
27389
  }, {
27375
27390
  key: "getAccessoiresOfBasketIdAsArray",
27376
27391
  value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
@@ -27691,7 +27706,9 @@ var DivaSet = /*#__PURE__*/function () {
27691
27706
  value: function getArticleByBasketId(basketId) {
27692
27707
  if (this.divaArticles[basketId]) return this.divaArticles[basketId];
27693
27708
  for (var key in this.divaArticles) {
27694
- if (this.divaArticles[key].partlistArticles[basketId]) return this.divaArticles[key].partlistArticles[basketId];
27709
+ var article = this.divaArticles[key];
27710
+ var plArticles = article.getRecursivePartlistArticles();
27711
+ if (plArticles[basketId]) return plArticles[basketId];
27695
27712
  }
27696
27713
  return undefined;
27697
27714
  }
@@ -28089,7 +28106,7 @@ var DivaSet = /*#__PURE__*/function () {
28089
28106
  break;
28090
28107
  }
28091
28108
  _context4.next = 3;
28092
- return Promise.resolve().then(function () { return require('./DoorPlanner-27606bf5.js'); });
28109
+ return Promise.resolve().then(function () { return require('./DoorPlanner-ffa7af62.js'); });
28093
28110
  case 3:
28094
28111
  _yield$import = _context4.sent;
28095
28112
  DoorPlanner = _yield$import["default"];
@@ -30353,46 +30370,49 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30353
30370
  value: function () {
30354
30371
  var _saveConfigVariantsInBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(set, basket, variant, repairOnly) {
30355
30372
  var _hQRenderScript, _basket$OrderSets$set, _basket$OrderSets$set2;
30356
- var setindex, setImage, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
30373
+ var setindex, setImage, dimensions, urlToPlanning2D, hQRenderScript, plannerData, promises, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, i, optionsSorted, variantValues, _i3, opt, key, targetArticle, configVariant;
30357
30374
  return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context6) {
30358
30375
  while (1) switch (_context6.prev = _context6.next) {
30359
30376
  case 0:
30360
30377
  setindex = -1;
30361
30378
  setImage = undefined;
30379
+ dimensions = {};
30362
30380
  urlToPlanning2D = undefined;
30363
30381
  hQRenderScript = undefined;
30364
30382
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
30365
30383
  if (repairOnly) {
30366
- _context6.next = 14;
30384
+ _context6.next = 17;
30367
30385
  break;
30368
30386
  }
30369
30387
  promises = [setHandlerInstance.getSetImage(set, true), setHandlerInstance.get2DSetImage(set), setHandlerInstance.getHQRenderScript(set, basket.DivaNr)];
30370
- _context6.next = 9;
30388
+ _context6.next = 10;
30371
30389
  return Promise.all(promises);
30372
- case 9:
30390
+ case 10:
30373
30391
  _yield$Promise$all = _context6.sent;
30374
30392
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
30375
- setImage = _yield$Promise$all2[0];
30393
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
30394
+ setImage = _yield$Promise$all2$.url;
30395
+ dimensions = _yield$Promise$all2$.dimensions;
30376
30396
  urlToPlanning2D = _yield$Promise$all2[1];
30377
30397
  hQRenderScript = _yield$Promise$all2[2];
30378
- case 14:
30398
+ case 17:
30379
30399
  i = 0;
30380
- case 15:
30400
+ case 18:
30381
30401
  if (!(i < basket.OrderSets.length)) {
30382
- _context6.next = 22;
30402
+ _context6.next = 25;
30383
30403
  break;
30384
30404
  }
30385
30405
  if (!(set.getSetId() == basket.OrderSets[i].SetID)) {
30386
- _context6.next = 19;
30406
+ _context6.next = 22;
30387
30407
  break;
30388
30408
  }
30389
30409
  setindex = i;
30390
- return _context6.abrupt("break", 22);
30391
- case 19:
30410
+ return _context6.abrupt("break", 25);
30411
+ case 22:
30392
30412
  i++;
30393
- _context6.next = 15;
30413
+ _context6.next = 18;
30394
30414
  break;
30395
- case 22:
30415
+ case 25:
30396
30416
  if (!basket.OrderSets[setindex].ConfigVariants) basket.OrderSets[setindex].ConfigVariants = [];
30397
30417
  optionsSorted = set.CatalogData.getOptionsPosition();
30398
30418
  variantValues = {};
@@ -30403,9 +30423,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30403
30423
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30404
30424
  }
30405
30425
  }
30406
- configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30426
+ configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30407
30427
  set.basketConfigVariants.push(configVariant);
30408
- case 28:
30428
+ case 31:
30409
30429
  case "end":
30410
30430
  return _context6.stop();
30411
30431
  }
@@ -33167,21 +33187,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
33167
33187
  key: "calcVariants",
33168
33188
  value: function () {
33169
33189
  var _calcVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(set, configItems, targetArticles) {
33170
- var variantInfo, origConfig, i, item, variantValues, doUseConfigs, key;
33190
+ var variantInfo, articles, origConfigs, i, item, variantValues, doUseConfigs, targetIndex, origConfig, key, _targetIndex;
33171
33191
  return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context26) {
33172
33192
  while (1) switch (_context26.prev = _context26.next) {
33173
33193
  case 0:
33174
33194
  variantInfo = [];
33175
- origConfig = set.getDivaArticles()[targetArticles[0]].VariantValues;
33195
+ articles = set.getDivaArticles();
33196
+ origConfigs = targetArticles.map(function (basketId) {
33197
+ return articles[basketId].VariantValues;
33198
+ });
33176
33199
  i = 0;
33177
- case 3:
33200
+ case 4:
33178
33201
  if (!(i < configItems.length)) {
33179
- _context26.next = 16;
33202
+ _context26.next = 23;
33180
33203
  break;
33181
33204
  }
33182
33205
  item = configItems[i];
33183
33206
  variantValues = {};
33184
33207
  doUseConfigs = false;
33208
+ targetIndex = 0;
33209
+ case 9:
33210
+ if (!(targetIndex < origConfigs.length)) {
33211
+ _context26.next = 19;
33212
+ break;
33213
+ }
33214
+ origConfig = origConfigs[targetIndex];
33185
33215
  for (key in origConfig) {
33186
33216
  if (key == item.op || key == item.idmOpgOptionCodex) {
33187
33217
  doUseConfigs = true;
@@ -33189,24 +33219,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
33189
33219
  }
33190
33220
  variantValues[item.op] = item.codex;
33191
33221
  if (item.idmOpgOptionCodex) variantValues[item.idmOpgOptionCodex] = item.idmOpgValCodex;
33192
- _context26.next = 12;
33193
- return this.updateArticlesOptionStatesOfActSet(set, variantValues, targetArticles, true, 'calcVariant');
33194
- case 12:
33222
+ _context26.next = 16;
33223
+ return this.updateArticlesOptionStatesOfActSet(set, variantValues, [targetArticles[targetIndex]], true, 'calcVariant');
33224
+ case 16:
33225
+ targetIndex++;
33226
+ _context26.next = 9;
33227
+ break;
33228
+ case 19:
33195
33229
  variantInfo.push({
33196
33230
  price: set.getSetPrice(),
33197
33231
  variants: set.getGeneralVariantValues(targetArticles),
33198
33232
  opt: item.op
33199
33233
  });
33200
- case 13:
33234
+ case 20:
33201
33235
  i++;
33202
- _context26.next = 3;
33236
+ _context26.next = 4;
33203
33237
  break;
33204
- case 16:
33205
- _context26.next = 18;
33206
- return this.updateArticlesOptionStatesOfActSet(set, origConfig, targetArticles, true);
33207
- case 18:
33238
+ case 23:
33239
+ _targetIndex = 0;
33240
+ case 24:
33241
+ if (!(_targetIndex < origConfigs.length)) {
33242
+ _context26.next = 30;
33243
+ break;
33244
+ }
33245
+ _context26.next = 27;
33246
+ return this.updateArticlesOptionStatesOfActSet(set, origConfigs[_targetIndex], [targetArticles[_targetIndex]], true);
33247
+ case 27:
33248
+ _targetIndex++;
33249
+ _context26.next = 24;
33250
+ break;
33251
+ case 30:
33208
33252
  return _context26.abrupt("return", variantInfo);
33209
- case 19:
33253
+ case 31:
33210
33254
  case "end":
33211
33255
  return _context26.stop();
33212
33256
  }
@@ -33415,6 +33459,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
33415
33459
  _loop3();
33416
33460
  }
33417
33461
  }
33462
+ }, {
33463
+ key: "checkBannerRules",
33464
+ value: function checkBannerRules(set, visitedOptions, event) {
33465
+ var bannerRules = set.CatalogData.bannerRules;
33466
+ if (!bannerRules) return;
33467
+ var rules = articleHandlerInstance.checkNotificationRules(bannerRules, set.getDivaArticles(), visitedOptions, event);
33468
+ return rules === null || rules === void 0 ? void 0 : rules[0];
33469
+ }
33418
33470
  }, {
33419
33471
  key: "checkNotificationRules",
33420
33472
  value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
@@ -33903,7 +33955,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33903
33955
  value: function () {
33904
33956
  var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
33905
33957
  var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
33906
- var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
33958
+ 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;
33907
33959
  return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context31) {
33908
33960
  while (1) switch (_context31.prev = _context31.next) {
33909
33961
  case 0:
@@ -33915,8 +33967,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33915
33967
  urlToPlanning2D = undefined;
33916
33968
  alternateSetImages = undefined;
33917
33969
  hqRenderScript = undefined;
33970
+ dimensions = {};
33918
33971
  if (dontGenerateImages) {
33919
- _context31.next = 25;
33972
+ _context31.next = 28;
33920
33973
  break;
33921
33974
  }
33922
33975
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33924,22 +33977,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
33924
33977
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33925
33978
  promise3DAlternate = this.getAlternateSetImages(set);
33926
33979
  }
33927
- _context31.next = 14;
33980
+ _context31.next = 15;
33928
33981
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33929
- case 14:
33982
+ case 15:
33930
33983
  _yield$Promise$all = _context31.sent;
33931
33984
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
33932
- setImage = _yield$Promise$all2[0];
33985
+ _yield$Promise$all2$ = _yield$Promise$all2[0];
33986
+ setImage = _yield$Promise$all2$.url;
33987
+ dimensions = _yield$Promise$all2$.dimensions;
33933
33988
  urlToPlanning2D = _yield$Promise$all2[1];
33934
33989
  alternateSetImages = _yield$Promise$all2[2];
33935
33990
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33936
- _context31.next = 22;
33991
+ _context31.next = 25;
33937
33992
  return Promise.all([promiseHQRenderScript]);
33938
- case 22:
33993
+ case 25:
33939
33994
  _yield$Promise$all3 = _context31.sent;
33940
33995
  _yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
33941
33996
  hqRenderScript = _yield$Promise$all4[0];
33942
- case 25:
33997
+ case 28:
33943
33998
  LOG$8.startTransaction({
33944
33999
  event: 'FillBakset',
33945
34000
  eventId: 'FILL_BASKET',
@@ -33971,7 +34026,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33971
34026
  OfflineData: catalogData.offlineData,
33972
34027
  SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
33973
34028
  SetArticleNrPrefix: set.SetArticleNrPrefix,
33974
- BBox: this.getBBoxObject(set),
34029
+ BBox: this.getBBoxObject(set, dimensions),
33975
34030
  SetVariantBasketDatas: set.getVariantBasketData(),
33976
34031
  SetImage: setImage,
33977
34032
  //Add url string of current rendering.
@@ -34005,7 +34060,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
34005
34060
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
34006
34061
  });
34007
34062
  return _context31.abrupt("return", orderSet);
34008
- case 32:
34063
+ case 35:
34009
34064
  case "end":
34010
34065
  return _context31.stop();
34011
34066
  }
@@ -34025,14 +34080,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
34025
34080
  key: "getSetImage",
34026
34081
  value: (function () {
34027
34082
  var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, overwriteLastSavedRendering) {
34028
- var setImage, is3D;
34083
+ var is3D, _yield$set$plannerHan, dimensions, url;
34029
34084
  return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
34030
34085
  while (1) switch (_context32.prev = _context32.next) {
34031
34086
  case 0:
34032
- setImage = undefined;
34033
34087
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
34034
34088
  if (!is3D) {
34035
- _context32.next = 10;
34089
+ _context32.next = 12;
34036
34090
  break;
34037
34091
  }
34038
34092
  LOG$8.startTransaction({
@@ -34040,17 +34094,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
34040
34094
  message: 'render 3D Image',
34041
34095
  eventId: 'RENDER_3D_IMAGE'
34042
34096
  });
34043
- _context32.next = 6;
34097
+ _context32.next = 5;
34044
34098
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
34045
- case 6:
34046
- _context32.next = 8;
34099
+ case 5:
34100
+ _context32.next = 7;
34047
34101
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34048
- case 8:
34049
- setImage = _context32.sent;
34102
+ case 7:
34103
+ _yield$set$plannerHan = _context32.sent;
34104
+ dimensions = _yield$set$plannerHan.dimensions;
34105
+ url = _yield$set$plannerHan.url;
34050
34106
  LOG$8.successTransaction('RENDER_3D_IMAGE');
34051
- case 10:
34052
- return _context32.abrupt("return", setImage);
34053
- case 11:
34107
+ return _context32.abrupt("return", {
34108
+ dimensions: dimensions,
34109
+ url: url
34110
+ });
34111
+ case 12:
34112
+ return _context32.abrupt("return", {
34113
+ dimensions: {
34114
+ w: undefined,
34115
+ h: undefined,
34116
+ d: undefined
34117
+ }
34118
+ });
34119
+ case 13:
34054
34120
  case "end":
34055
34121
  return _context32.stop();
34056
34122
  }
@@ -34193,14 +34259,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
34193
34259
  }()
34194
34260
  }, {
34195
34261
  key: "getBBoxObject",
34196
- value: function getBBoxObject(set) {
34262
+ value: function getBBoxObject(set, dimensions) {
34263
+ var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n$t, _set$api$getI18n, _set$api$getI18n$t2, _set$api$getI18n$t3, _set$api$getI18n2, _set$api$getI18n2$t, _set$api$getI18n$t4, _set$api$getI18n3, _set$api$getI18n3$t;
34197
34264
  var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
34198
- return {
34199
- X: bbox.width,
34200
- Y: bbox.depth,
34201
- Z: bbox.height,
34202
- Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34265
+ var dim = {
34266
+ X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
34267
+ Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
34268
+ Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
34203
34269
  };
34270
+ return _objectSpread$8(_objectSpread$8({}, dim), {}, {
34271
+ Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
34272
+ });
34204
34273
  }
34205
34274
  }, {
34206
34275
  key: "loadProductsOfSets",
@@ -35309,7 +35378,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35309
35378
  break;
35310
35379
  case 3:
35311
35380
  _context13.next = 5;
35312
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-e8efc3dc.js'); });
35381
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-b47dba23.js'); });
35313
35382
  case 5:
35314
35383
  _yield$import = _context13.sent;
35315
35384
  PfisterWWSHandler = _yield$import["default"];
@@ -35317,7 +35386,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35317
35386
  return _context13.abrupt("break", 33);
35318
35387
  case 9:
35319
35388
  _context13.next = 11;
35320
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-cfdd098a.js'); });
35389
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-85a1dc89.js'); });
35321
35390
  case 11:
35322
35391
  _yield$import2 = _context13.sent;
35323
35392
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35325,7 +35394,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35325
35394
  return _context13.abrupt("break", 33);
35326
35395
  case 15:
35327
35396
  _context13.next = 17;
35328
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-899cfde8.js'); });
35397
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-28f031fa.js'); });
35329
35398
  case 17:
35330
35399
  _yield$import3 = _context13.sent;
35331
35400
  SeriousWWSHandler = _yield$import3["default"];
@@ -35333,7 +35402,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35333
35402
  return _context13.abrupt("break", 33);
35334
35403
  case 21:
35335
35404
  _context13.next = 23;
35336
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-0748483c.js'); });
35405
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-22cb7ee4.js'); });
35337
35406
  case 23:
35338
35407
  _yield$import4 = _context13.sent;
35339
35408
  ProductWWSHandler = _yield$import4["default"];
@@ -35341,7 +35410,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35341
35410
  return _context13.abrupt("break", 33);
35342
35411
  case 27:
35343
35412
  _context13.next = 29;
35344
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-7468715d.js'); });
35413
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-ab0c107b.js'); });
35345
35414
  case 29:
35346
35415
  _yield$import5 = _context13.sent;
35347
35416
  StandardWWSHandler = _yield$import5["default"];
@@ -36726,7 +36795,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36726
36795
  while (1) switch (_context3.prev = _context3.next) {
36727
36796
  case 0:
36728
36797
  _context3.next = 2;
36729
- return Promise.resolve().then(function () { return require('./Host3DSignalR-0ac712b7.js'); });
36798
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-d3830717.js'); });
36730
36799
  case 2:
36731
36800
  _yield$import = _context3.sent;
36732
36801
  Host3DSignalR = _yield$import["default"];
@@ -37207,7 +37276,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37207
37276
  if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
37208
37277
  camera = params.camera ? params.camera : params.useLatestCamera ? this.latestCamera : undefined;
37209
37278
  planningHash = DivaUtils.md5(JSON.stringify(params.planningData) + JSON.stringify(camera));
37210
- if (planningHash) doReloadWholePlanning = false;
37279
+ if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
37211
37280
  if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
37212
37281
  this.lastFramePlanningHash = planningHash;
37213
37282
  requestRenderingFrom3DHost = false;
@@ -38278,7 +38347,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38278
38347
  break;
38279
38348
  case 8:
38280
38349
  _context4.next = 10;
38281
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-b62c0304.js'); });
38350
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-c73e6e57.js'); });
38282
38351
  case 10:
38283
38352
  _yield$import = _context4.sent;
38284
38353
  DivaStandardPlanner = _yield$import["default"];
@@ -38289,7 +38358,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38289
38358
  return _context4.abrupt("break", 21);
38290
38359
  case 15:
38291
38360
  _context4.next = 17;
38292
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-24c3effa.js'); });
38361
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-7b508f32.js'); });
38293
38362
  case 17:
38294
38363
  _yield$import2 = _context4.sent;
38295
38364
  DivaBoxPlanner = _yield$import2["default"];
@@ -38432,7 +38501,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38432
38501
  case 2:
38433
38502
  rendering = _context6.sent;
38434
38503
  LOG$2.debug('SAVE SET IMAGE DIM3D width: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w) + ', height: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h) + ', depth: ' + (rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d));
38435
- return _context6.abrupt("return", rendering != undefined ? rendering.UrlToSavedRendering : '');
38504
+ return _context6.abrupt("return", {
38505
+ url: rendering === null || rendering === void 0 ? void 0 : rendering.UrlToSavedRendering,
38506
+ dimensions: {
38507
+ w: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().w,
38508
+ h: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().h,
38509
+ d: rendering === null || rendering === void 0 ? void 0 : rendering.get3DDimInfo().d
38510
+ }
38511
+ });
38436
38512
  case 5:
38437
38513
  case "end":
38438
38514
  return _context6.stop();
@@ -39813,19 +39889,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39813
39889
  //onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
39814
39890
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
39815
39891
  var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
39892
+ var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
39816
39893
  var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
39817
39894
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
39818
39895
  while (1) switch (_context11.prev = _context11.next) {
39819
39896
  case 0:
39820
39897
  set = _this.actSet();
39821
- _context11.next = 3;
39898
+ (_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);
39899
+ _context11.next = 4;
39822
39900
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
39823
- case 3:
39901
+ case 4:
39824
39902
  returnValues = _context11.sent;
39903
+ (_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);
39825
39904
  structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
39826
39905
  _this.checkVariantData();
39827
39906
  if (dontUpdatePlannerView) {
39828
- _context11.next = 16;
39907
+ _context11.next = 18;
39829
39908
  break;
39830
39909
  }
39831
39910
  _this.updateConfiguratorStructure(structure);
@@ -39839,16 +39918,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39839
39918
  _this.updateViewButtonsDependigOnConfigStructure();
39840
39919
  _this.updatePlannerView('DO_CONFIGURE', myValues);
39841
39920
  _this.updateWebConfiguratorTitle();
39842
- _context11.next = 16;
39921
+ _context11.next = 18;
39843
39922
  return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
39844
- case 16:
39923
+ case 18:
39845
39924
  if (dontCallEvents) {
39846
- _context11.next = 19;
39925
+ _context11.next = 21;
39847
39926
  break;
39848
39927
  }
39849
- _context11.next = 19;
39928
+ _context11.next = 21;
39850
39929
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
39851
- case 19:
39930
+ case 21:
39852
39931
  case "end":
39853
39932
  return _context11.stop();
39854
39933
  }
@@ -39912,6 +39991,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39912
39991
  return _ref12.apply(this, arguments);
39913
39992
  };
39914
39993
  }());
39994
+ _defineProperty__default["default"](this, "getPosNr", function (basketId) {
39995
+ var _set$getArticleByBask;
39996
+ var set = _this.actSet();
39997
+ if (!set) throw new Error('set undefined');
39998
+ return (_set$getArticleByBask = set.getArticleByBasketId(basketId)) === null || _set$getArticleByBask === void 0 ? void 0 : _set$getArticleByBask.posNr;
39999
+ });
39915
40000
  _defineProperty__default["default"](this, "getReturnTo", function (event) {
39916
40001
  var returnTo = _this.ReturnTo;
39917
40002
  if (returnTo == undefined) {
@@ -39942,7 +40027,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39942
40027
  key: "initialize",
39943
40028
  value: function () {
39944
40029
  var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
39945
- var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions14, _set$getDivaArticles, _set$getSetPrice, _this$actions13, _this$actions13$toggl, initSetState, set, products, result, _this$actions15, basket, catalogData;
40030
+ var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions16, _set$getDivaArticles, _set$getSetPrice, _this$actions15, _this$actions15$toggl, initSetState, set, products, result, _this$actions17, basket, catalogData;
39946
40031
  return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
39947
40032
  while (1) switch (_context13.prev = _context13.next) {
39948
40033
  case 0:
@@ -39986,7 +40071,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39986
40071
  return this.initView();
39987
40072
  case 20:
39988
40073
  this.subscribeToWebPlannerEvents();
39989
- (_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, 'Planner_Loading', false, false);
40074
+ (_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);
39990
40075
  return _context13.abrupt("return", true);
39991
40076
  case 23:
39992
40077
  //TODO: get prices of matching product with more than one element
@@ -40036,11 +40121,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40036
40121
  _context13.next = 44;
40037
40122
  return this.initView();
40038
40123
  case 44:
40039
- (_this$actions14 = this.actions) === null || _this$actions14 === void 0 || _this$actions14.onEvent({
40124
+ (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
40040
40125
  type: 'onConfiguratorReady'
40041
40126
  });
40042
40127
  if (Object.keys((_set$getDivaArticles = set === null || set === void 0 ? void 0 : set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {}).length) {
40043
- (_this$actions15 = this.actions) === null || _this$actions15 === void 0 || _this$actions15.onEvent({
40128
+ (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || _this$actions17.onEvent({
40044
40129
  type: 'onArticleInitialized'
40045
40130
  });
40046
40131
  }
@@ -40135,11 +40220,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40135
40220
  }, {
40136
40221
  key: "onInitializationError",
40137
40222
  value: function onInitializationError() {
40138
- var _this$state2, _this$actions17, _this$actions17$toggl;
40223
+ var _this$state2, _this$actions19, _this$actions19$toggl;
40139
40224
  var onErrorHandling = this.api.onErrorHandling();
40140
40225
  if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
40141
- var _this$actions16;
40142
- (_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.closeComponentInFullscreen();
40226
+ var _this$actions18;
40227
+ (_this$actions18 = this.actions) === null || _this$actions18 === void 0 || _this$actions18.closeComponentInFullscreen();
40143
40228
  return;
40144
40229
  }
40145
40230
  if (onErrorHandling) {
@@ -40180,7 +40265,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40180
40265
  });
40181
40266
  }
40182
40267
  }
40183
- (_this$actions17 = this.actions) === null || _this$actions17 === void 0 || (_this$actions17$toggl = _this$actions17.toggleLoading) === null || _this$actions17$toggl === void 0 || _this$actions17$toggl.call(_this$actions17, 'Planner_Loading', false, false);
40268
+ (_this$actions19 = this.actions) === null || _this$actions19 === void 0 || (_this$actions19$toggl = _this$actions19.toggleLoading) === null || _this$actions19$toggl === void 0 || _this$actions19$toggl.call(_this$actions19, 'Planner_Loading', false, false);
40184
40269
  }
40185
40270
  }, {
40186
40271
  key: "getDivaArticles",
@@ -40894,8 +40979,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40894
40979
  }, {
40895
40980
  key: "changeOnFavorites",
40896
40981
  value: function changeOnFavorites(opt, opvs, targetArticles, remove) {
40897
- var _this$actions18;
40898
- favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions18 = this.actions) === null || _this$actions18 === void 0 ? void 0 : _this$actions18.openModal);
40982
+ var _this$actions20;
40983
+ favoritesHandlerInstance.changeOnFavorites(this.actSet(), opt, opvs, targetArticles, remove, (_this$actions20 = this.actions) === null || _this$actions20 === void 0 ? void 0 : _this$actions20.openModal);
40899
40984
  }
40900
40985
  }, {
40901
40986
  key: "setDifferentOptions",
@@ -40942,25 +41027,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40942
41027
  }, {
40943
41028
  key: "callEvent",
40944
41029
  value: function callEvent(event, param) {
40945
- var _this$actions19, _this$actions20, _this$actions21, _this$actions22;
41030
+ var _this$actions21, _this$actions22, _this$actions23, _this$actions24;
40946
41031
  switch (event) {
40947
41032
  case 'onFullscreenClose':
40948
- (_this$actions19 = this.actions) === null || _this$actions19 === void 0 || _this$actions19.onEvent({
41033
+ (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
40949
41034
  type: 'onFullscreenClose'
40950
41035
  });
40951
41036
  break;
40952
41037
  case 'onWebPlanerClose':
40953
- (_this$actions20 = this.actions) === null || _this$actions20 === void 0 || _this$actions20.onEvent({
41038
+ (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
40954
41039
  type: 'onWebPlanerClose'
40955
41040
  });
40956
41041
  break;
40957
41042
  case 'onWebPlanerHelp':
40958
- (_this$actions21 = this.actions) === null || _this$actions21 === void 0 || _this$actions21.onEvent({
41043
+ (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || _this$actions23.onEvent({
40959
41044
  type: 'onWebPlanerHelp'
40960
41045
  });
40961
41046
  break;
40962
41047
  case 'onWebPlanerZoomClick':
40963
- (_this$actions22 = this.actions) === null || _this$actions22 === void 0 || _this$actions22.onEvent({
41048
+ (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || _this$actions24.onEvent({
40964
41049
  type: 'onWebPlanerZoomClick',
40965
41050
  data: param
40966
41051
  });
@@ -40971,14 +41056,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40971
41056
  key: "saveToBasketWrapper",
40972
41057
  value: function () {
40973
41058
  var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
40974
- var _this$actions23,
40975
- _this$actions23$toggl,
40976
- _this$actions24,
40977
- _this$actions24$toggl,
41059
+ var _this$actions25,
41060
+ _this$actions25$toggl,
41061
+ _this$actions26,
41062
+ _this$actions26$toggl,
40978
41063
  _this2 = this,
40979
- _this$actions28,
41064
+ _this$actions30,
40980
41065
  _this$i18n14;
40981
- var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$actions25, _this$i18n8, _this$i18n9, _this$actions26, _this$i18n10, _this$i18n11, _this$actions27, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions29, _this$i18n15;
41066
+ var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _result, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions31, _this$i18n15;
40982
41067
  return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
40983
41068
  while (1) switch (_context26.prev = _context26.next) {
40984
41069
  case 0:
@@ -41012,18 +41097,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41012
41097
  case 15:
41013
41098
  returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
41014
41099
  case 16:
41015
- (_this$actions23 = this.actions) === null || _this$actions23 === void 0 || (_this$actions23$toggl = _this$actions23.toggleLoading) === null || _this$actions23$toggl === void 0 || _this$actions23$toggl.call(_this$actions23, 'Planner_Saving', false, true);
41100
+ (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || (_this$actions25$toggl = _this$actions25.toggleLoading) === null || _this$actions25$toggl === void 0 || _this$actions25$toggl.call(_this$actions25, 'Planner_Saving', false, true);
41016
41101
  _context26.next = 19;
41017
41102
  return this.saveToBasket(finalEvent, repairOnly, force);
41018
41103
  case 19:
41019
41104
  result = _context26.sent;
41020
- (_this$actions24 = this.actions) === null || _this$actions24 === void 0 || (_this$actions24$toggl = _this$actions24.toggleLoading) === null || _this$actions24$toggl === void 0 || _this$actions24$toggl.call(_this$actions24, 'Planner_Saving', false, false);
41105
+ (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || (_this$actions26$toggl = _this$actions26.toggleLoading) === null || _this$actions26$toggl === void 0 || _this$actions26$toggl.call(_this$actions26, 'Planner_Saving', false, false);
41021
41106
  if (!(result === 'canceled')) {
41022
41107
  _context26.next = 25;
41023
41108
  break;
41024
41109
  }
41025
41110
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
41026
- (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.openModal({
41111
+ (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
41027
41112
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
41028
41113
  accept: true
41029
41114
  });
@@ -41037,12 +41122,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41037
41122
  LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
41038
41123
  code: 'WC_0010'
41039
41124
  }));
41040
- (_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.openModal({
41125
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41041
41126
  text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils__default["default"].formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils__default["default"].getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils__default["default"].getCurrentTraceId() : '',
41042
41127
  accept: true
41043
41128
  });
41044
41129
  } else {
41045
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
41130
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41046
41131
  text: (_this$i18n12 = this.i18n()) === null || _this$i18n12 === void 0 ? void 0 : _this$i18n12.t(this.divaBasketHandler.actBasket.Status === 'ORDER' ? 'modal.open_order_pdf_now' : 'modal.open_leaflet_pdf_now'),
41047
41132
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
41048
41133
  callback: function callback() {
@@ -41052,7 +41137,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41052
41137
  }
41053
41138
  return _context26.abrupt("break", 31);
41054
41139
  case 30:
41055
- (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
41140
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
41056
41141
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
41057
41142
  accept: true
41058
41143
  });
@@ -41068,7 +41153,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41068
41153
  _context26.next = 37;
41069
41154
  break;
41070
41155
  }
41071
- (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
41156
+ (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
41072
41157
  accept: true,
41073
41158
  text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
41074
41159
  title: 'modals.error_saving'
@@ -41091,7 +41176,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41091
41176
  key: "saveToBasket",
41092
41177
  value: function () {
41093
41178
  var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(event, repairOnly, force) {
41094
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions30, _this$actions31;
41179
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
41095
41180
  var set, actBasket, returnTo, oldReturnTo, count, basketData, bytes, result, newDivaNr, _result2, _event4, product;
41096
41181
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context27) {
41097
41182
  while (1) switch (_context27.prev = _context27.next) {
@@ -41178,7 +41263,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41178
41263
  _context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 39 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 41 : _context27.t3 === 'OPEN_PDF' ? 43 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 43 : _context27.t3 === 'SAVE_BASKET' ? 43 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 43 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 43 : 63;
41179
41264
  break;
41180
41265
  case 39:
41181
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openComponent({
41266
+ (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
41182
41267
  type: 'SELLER',
41183
41268
  parameters: {
41184
41269
  module: 'PCreator',
@@ -41191,7 +41276,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41191
41276
  });
41192
41277
  return _context27.abrupt("break", 63);
41193
41278
  case 41:
41194
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openComponent({
41279
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
41195
41280
  type: 'SELLER',
41196
41281
  parameters: {
41197
41282
  module: 'Basket',
@@ -41273,6 +41358,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41273
41358
  if (!set) return;
41274
41359
  return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
41275
41360
  }
41361
+ }, {
41362
+ key: "checkBannerRules",
41363
+ value: function checkBannerRules(visitedOptions, event) {
41364
+ var set = this.actSet();
41365
+ if (!set) return;
41366
+ return setHandlerInstance.checkBannerRules(set, visitedOptions, event);
41367
+ }
41276
41368
 
41277
41369
  /**
41278
41370
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
@@ -41517,16 +41609,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41517
41609
  key: "addToBasket",
41518
41610
  value: function () {
41519
41611
  var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
41520
- var _this$actions32,
41521
- _this$actions33,
41522
- _this$actions34,
41612
+ var _this$actions34,
41523
41613
  _this$actions35,
41524
41614
  _this$actions36,
41525
- _this$divaBasketHandl3,
41526
- _this3 = this,
41527
41615
  _this$actions37,
41528
41616
  _this$actions38,
41529
- _this$actions39;
41617
+ _this$divaBasketHandl3,
41618
+ _this3 = this,
41619
+ _this$actions39,
41620
+ _this$actions40,
41621
+ _this$actions41;
41530
41622
  var event,
41531
41623
  addToBasketLog,
41532
41624
  emailConfig,
@@ -41546,35 +41638,35 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41546
41638
  break;
41547
41639
  case 5:
41548
41640
  this.handleSuccessTransaction('onPrintBasket', actBasket);
41549
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.onEvent({
41641
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41550
41642
  type: 'onWebPlanerPrint',
41551
41643
  data: actBasket.getAsJson()
41552
41644
  });
41553
41645
  return _context29.abrupt("break", 38);
41554
41646
  case 8:
41555
41647
  this.handleSuccessTransaction('onSaveBasket', actBasket);
41556
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.onEvent({
41648
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41557
41649
  type: 'onWebPlanerSave',
41558
41650
  data: actBasket.getAsJson()
41559
41651
  });
41560
41652
  return _context29.abrupt("break", 38);
41561
41653
  case 11:
41562
41654
  this.handleSuccessTransaction('onShareBasket', actBasket);
41563
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41655
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41564
41656
  type: 'onWebPlanerShare',
41565
41657
  data: actBasket.getAsJson()
41566
41658
  });
41567
41659
  return _context29.abrupt("break", 38);
41568
41660
  case 14:
41569
41661
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
41570
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41662
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41571
41663
  type: 'onRequestConsulation',
41572
41664
  data: actBasket.getAsJson()
41573
41665
  });
41574
41666
  return _context29.abrupt("break", 38);
41575
41667
  case 17:
41576
41668
  this.handleSuccessTransaction('onSave', actBasket);
41577
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41669
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41578
41670
  type: 'onSave',
41579
41671
  data: actBasket.getAsJson()
41580
41672
  });
@@ -41610,7 +41702,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41610
41702
  });
41611
41703
  this.handleSuccessTransaction('onSendEmail', actBasket);
41612
41704
  }
41613
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41705
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41614
41706
  type: 'onAddToBasket',
41615
41707
  data: actBasket.getAsJson()
41616
41708
  });
@@ -41622,7 +41714,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41622
41714
  case 28:
41623
41715
  products = _context29.sent;
41624
41716
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41625
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41717
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41626
41718
  type: 'onAddToBasket',
41627
41719
  data: actBasket.getAsJson()
41628
41720
  });
@@ -41636,7 +41728,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41636
41728
  addToBasketLog = false;
41637
41729
  case 35:
41638
41730
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41639
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41731
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41640
41732
  type: 'onAddToBasket',
41641
41733
  data: actBasket.getAsJson()
41642
41734
  });
@@ -41668,8 +41760,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41668
41760
  }, {
41669
41761
  key: "openPDFpostAsEvent",
41670
41762
  value: function openPDFpostAsEvent(mongoDBId) {
41671
- var _this$actions40, _this$actions41, _this$actions42;
41672
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.updateBreadcrumbs({
41763
+ var _this$actions42, _this$actions43, _this$actions44;
41764
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
41673
41765
  type: 'update',
41674
41766
  param: {
41675
41767
  groupId: 'SHOWROOM',
@@ -41683,7 +41775,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41683
41775
  }
41684
41776
  }
41685
41777
  });
41686
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.updateBreadcrumbs({
41778
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
41687
41779
  type: 'update',
41688
41780
  param: {
41689
41781
  groupId: 'SHOWROOM',
@@ -41697,7 +41789,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41697
41789
  }
41698
41790
  }
41699
41791
  });
41700
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.openComponent({
41792
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
41701
41793
  type: 'REPORT',
41702
41794
  parameters: {
41703
41795
  id: mongoDBId
@@ -41917,14 +42009,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41917
42009
  }, {
41918
42010
  key: "subscribeToWebPlannerEvents",
41919
42011
  value: function subscribeToWebPlannerEvents() {
41920
- var _this$actions43;
41921
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.subscribeEvents(this.addToBasketEventFunction);
42012
+ var _this$actions45;
42013
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
41922
42014
  }
41923
42015
  }, {
41924
42016
  key: "unsubscribeFromWebPlannerEvents",
41925
42017
  value: function unsubscribeFromWebPlannerEvents() {
41926
- var _this$actions44;
41927
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.unSubscribeEvents(this.addToBasketEventFunction);
42018
+ var _this$actions46;
42019
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
41928
42020
  }
41929
42021
  }, {
41930
42022
  key: "initApiForLogicOnly",