@crystaldesign/web-planner-logic 24.13.0-beta.11 → 24.13.0-beta.13

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 (50) hide show
  1. package/build/cjs/{DivaBoxPlanner-ed22c1dd.js → DivaBoxPlanner-8014a683.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-924415b0.js → DivaStandardPlanner-a31c4fcd.js} +2 -2
  3. package/build/cjs/{DoorPlanner-33fde902.js → DoorPlanner-8d079ddb.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-0a901365.js → Host3DSignalR-7b21d1e9.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-cf967a4d.js → LiviqueWWSHandler-4136ccdd.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-3ab783ab.js → PfisterWWSHandler-2dfc936a.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-6b3a6722.js → PlannerHandler2D-aec63404.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-88cac4bb.js → SeriousBasketHandler-64d5e5ac.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-cf726af7.js → ShelfPlanner-87ddb7cf.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-26ce5152.js → StandardWWSHandler-f7f0f838.js} +1 -1
  11. package/build/cjs/{index-99fd2c34.js → index-f7ce608d.js} +255 -152
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-acb7342c.js → DivaBoxPlanner-256f6673.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-f4ce0bf9.js → DivaStandardPlanner-15069451.js} +2 -2
  15. package/build/esm/{DoorPlanner-c8958dcc.js → DoorPlanner-b9f3c272.js} +1 -1
  16. package/build/esm/{Host3DSignalR-f4620464.js → Host3DSignalR-45e86f11.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-05983499.js → LiviqueWWSHandler-7aae2b64.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-e824a225.js → PfisterWWSHandler-1affb9d8.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-a60954a4.js → PlannerHandler2D-87d42a9b.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-d0103e1a.js → SeriousBasketHandler-928f3aac.js} +1 -1
  21. package/build/esm/{ShelfPlanner-65d91874.js → ShelfPlanner-48c3e993.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-539b9b15.js → StandardWWSHandler-56b87098.js} +1 -1
  23. package/build/esm/{index-c8ee8c9a.js → index-8f2db083.js} +255 -152
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/Basket/BasketEvent.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/interface/Basket/BasketEvent.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +2 -2
  28. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +0 -1
  30. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
  32. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -4
  34. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +1 -1
  36. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +6 -5
  38. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts +5 -0
  40. package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +3 -0
  42. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +2 -0
  47. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +2 -0
  49. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  50. package/package.json +2 -2
@@ -900,8 +900,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
900
900
  return '/v1/products/' + productId + '/list';
901
901
  }
902
902
  }, {
903
- key: "getProductBasketUrl",
904
- value: function getProductBasketUrl(key, value) {
903
+ key: "getProductByKeyValueUrl",
904
+ value: function getProductByKeyValueUrl(key, value) {
905
905
  return "/v1/products/basket?key=".concat(key, "&value=").concat(value);
906
906
  }
907
907
  }, {
@@ -1614,6 +1614,16 @@ var ArticleOptionData = /*#__PURE__*/function () {
1614
1614
  get: function get() {
1615
1615
  return this.opt.catalogOPT.contentItemId;
1616
1616
  }
1617
+ }, {
1618
+ key: "showSearchbar",
1619
+ get: function get() {
1620
+ return this.opt.catalogOPT.showSearchbar;
1621
+ }
1622
+ }, {
1623
+ key: "showFilter",
1624
+ get: function get() {
1625
+ return this.opt.catalogOPT.showFilter;
1626
+ }
1617
1627
  }, {
1618
1628
  key: "pdfUrl",
1619
1629
  get: function get() {
@@ -17847,6 +17857,12 @@ var OptionCatalogData = /*#__PURE__*/function () {
17847
17857
  case 'INFO_URL':
17848
17858
  this.opt.url = prop.Value;
17849
17859
  break;
17860
+ case 'SHOW_SEARCHBAR':
17861
+ this.opt.showSearchbar = prop.Value;
17862
+ break;
17863
+ case 'SHOW_FILTER':
17864
+ this.opt.showFilter = prop.Value;
17865
+ break;
17850
17866
  case 'INFO_PDF':
17851
17867
  this.opt.pdfUrl = prop.Value;
17852
17868
  break;
@@ -18047,6 +18063,16 @@ var OptionCatalogData = /*#__PURE__*/function () {
18047
18063
  get: function get() {
18048
18064
  return this.opt.url;
18049
18065
  }
18066
+ }, {
18067
+ key: "showSearchbar",
18068
+ get: function get() {
18069
+ return this.opt.showSearchbar;
18070
+ }
18071
+ }, {
18072
+ key: "showFilter",
18073
+ get: function get() {
18074
+ return this.opt.showFilter;
18075
+ }
18050
18076
  }, {
18051
18077
  key: "pdfUrl",
18052
18078
  get: function get() {
@@ -18143,7 +18169,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
18143
18169
  brandName: json.Brandname,
18144
18170
  mediaUrl: '',
18145
18171
  // https://retail.diva-portal.de/files/33/9680c4a3-fc60-4541-8738-4859d9b24e9d/";
18146
- imageBaseUrl: '',
18147
18172
  subFolder: json.SubFolder,
18148
18173
  longDescription: json.LongDescription,
18149
18174
  longDescription_locales: json.LongDescription_locales,
@@ -18345,9 +18370,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
18345
18370
  key: "getMediaURL",
18346
18371
  value: function getMediaURL(subFolder) {
18347
18372
  var retval = '';
18348
- if (this.catalogData.imageBaseUrl != '') {
18349
- retval = this.catalogData.imageBaseUrl;
18350
- } else if (this.api.getBaseUrl().substring(0, 4) == 'http') {
18373
+ if (this.api.getBaseUrl().substring(0, 4) == 'http') {
18351
18374
  retval = this.api.getBaseUrl() + '/' + this.api.getServerId() + '/';
18352
18375
  }
18353
18376
  if (subFolder != '') retval += subFolder + '/';
@@ -23578,7 +23601,7 @@ var DivaArticle = /*#__PURE__*/function () {
23578
23601
  break;
23579
23602
  }
23580
23603
  _context.next = 4;
23581
- return Promise.resolve().then(function () { return require('./ShelfPlanner-cf726af7.js'); });
23604
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-87ddb7cf.js'); });
23582
23605
  case 4:
23583
23606
  _yield$import = _context.sent;
23584
23607
  ShelfPlanner = _yield$import["default"];
@@ -26921,6 +26944,7 @@ var DivaSet = /*#__PURE__*/function () {
26921
26944
  _defineProperty__default["default"](this, "setId", void 0);
26922
26945
  _defineProperty__default["default"](this, "_isActSet", false);
26923
26946
  _defineProperty__default["default"](this, "setData", void 0);
26947
+ _defineProperty__default["default"](this, "_onlyCalcVariants", void 0);
26924
26948
  _defineProperty__default["default"](this, "divaArticles", void 0);
26925
26949
  //Schlüssel ist basketId
26926
26950
  _defineProperty__default["default"](this, "configSingleData", void 0);
@@ -28110,7 +28134,7 @@ var DivaSet = /*#__PURE__*/function () {
28110
28134
  break;
28111
28135
  }
28112
28136
  _context4.next = 3;
28113
- return Promise.resolve().then(function () { return require('./DoorPlanner-33fde902.js'); });
28137
+ return Promise.resolve().then(function () { return require('./DoorPlanner-8d079ddb.js'); });
28114
28138
  case 3:
28115
28139
  _yield$import = _context4.sent;
28116
28140
  DoorPlanner = _yield$import["default"];
@@ -28175,6 +28199,14 @@ var DivaSet = /*#__PURE__*/function () {
28175
28199
  get: function get() {
28176
28200
  return this.setState;
28177
28201
  }
28202
+ }, {
28203
+ key: "onlyCalcVariants",
28204
+ get: function get() {
28205
+ return this._onlyCalcVariants;
28206
+ },
28207
+ set: function set(val) {
28208
+ this._onlyCalcVariants = val;
28209
+ }
28178
28210
 
28179
28211
  /**
28180
28212
  *
@@ -29615,7 +29647,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29615
29647
  key: "getValidVariants",
29616
29648
  value: function () {
29617
29649
  var _getValidVariants = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(set, useCache) {
29618
- var allvariants, validVariants, i;
29650
+ var allvariants, validVariants, i, _set$onlyCalcVariants;
29619
29651
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
29620
29652
  while (1) switch (_context4.prev = _context4.next) {
29621
29653
  case 0:
@@ -29636,7 +29668,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29636
29668
  validVariants = [];
29637
29669
  for (i = 0; i < allvariants.length; i++) {
29638
29670
  if (!set.disabledVariants.includes(allvariants[i].id)) {
29639
- validVariants.push(allvariants[i]);
29671
+ if (!((_set$onlyCalcVariants = set.onlyCalcVariants) !== null && _set$onlyCalcVariants !== void 0 && _set$onlyCalcVariants.length) || set.onlyCalcVariants.includes(allvariants[i].id)) {
29672
+ validVariants.push(allvariants[i]);
29673
+ }
29640
29674
  }
29641
29675
  }
29642
29676
  return _context4.abrupt("return", validVariants);
@@ -30741,6 +30775,34 @@ var DivaProductHandler = /*#__PURE__*/function () {
30741
30775
  }
30742
30776
  return updateProducts;
30743
30777
  }()
30778
+ }, {
30779
+ key: "getBestMatch",
30780
+ value: function getBestMatch(articles, products) {
30781
+ var OPTION_CODEX = 'KOPFTEIL';
30782
+ if (!articles) return;
30783
+ for (var key in articles) {
30784
+ var _article$VariantValue;
30785
+ var article = articles[key];
30786
+ var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
30787
+ if (!products || !opv) continue;
30788
+ for (var i = 0; i < products.length; i++) {
30789
+ var _products$i$affiliate;
30790
+ if ((_products$i$affiliate = products[i].affiliate) !== null && _products$i$affiliate !== void 0 && _products$i$affiliate.length) if (this.findOPVCodexInVariantValues(products[i], OPTION_CODEX, opv)) {
30791
+ return products[i];
30792
+ }
30793
+ }
30794
+ }
30795
+ return undefined;
30796
+ }
30797
+ }, {
30798
+ key: "findOPVCodexInVariantValues",
30799
+ value: function findOPVCodexInVariantValues(product, opt, opv) {
30800
+ return product.articles.find(function (article) {
30801
+ return article.variantValues.find(function (variant) {
30802
+ return variant.OPT === opt && variant.OPV === opv;
30803
+ });
30804
+ });
30805
+ }
30744
30806
  }]);
30745
30807
  }();
30746
30808
  var productHandlerInstance = new DivaProductHandler();
@@ -32565,7 +32627,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32565
32627
  value: (function () {
32566
32628
  var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
32567
32629
  var _set$ViewConfig, _configItems$;
32568
- var opt, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
32630
+ var opt, calcVariantsForPricePreview, previewType, _set$api$ReturnToFrom, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
32569
32631
  return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
32570
32632
  while (1) switch (_context25.prev = _context25.next) {
32571
32633
  case 0:
@@ -32579,7 +32641,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32579
32641
  calcVariantsForPricePreview = false;
32580
32642
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
32581
32643
  if (previewType) {
32582
- calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
32644
+ calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR')) && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
32583
32645
  }
32584
32646
  if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
32585
32647
  if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
@@ -34069,7 +34131,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34069
34131
  key: "initProductId",
34070
34132
  value: function () {
34071
34133
  var _initProductId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(api, productId) {
34072
- var result;
34134
+ var result, successful;
34073
34135
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
34074
34136
  while (1) switch (_context2.prev = _context2.next) {
34075
34137
  case 0:
@@ -34081,10 +34143,17 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34081
34143
  _context2.next = 6;
34082
34144
  return this.initBasket(api, result.divaNr, {
34083
34145
  basket: result.configuration
34084
- }, false);
34146
+ }, false, productId);
34085
34147
  case 6:
34086
- return _context2.abrupt("return", _context2.sent);
34087
- case 7:
34148
+ successful = _context2.sent;
34149
+ if (!successful) {
34150
+ _context2.next = 9;
34151
+ break;
34152
+ }
34153
+ return _context2.abrupt("return", result);
34154
+ case 9:
34155
+ return _context2.abrupt("return", false);
34156
+ case 10:
34088
34157
  case "end":
34089
34158
  return _context2.stop();
34090
34159
  }
@@ -34431,7 +34500,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34431
34500
  case 0:
34432
34501
  _context8.prev = 0;
34433
34502
  _context8.next = 3;
34434
- return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34503
+ return api.getDataCache(api.getProductByKeyValueUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34435
34504
  fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
34436
34505
  });
34437
34506
  case 3:
@@ -34652,26 +34721,39 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34652
34721
  var _ops$ocd, _ops$valCodex;
34653
34722
  var ops = article.articleOptionStates[key];
34654
34723
  if (ops.option.sendToSAP && ops.val && ops.isDoShow && (!ops.isFreeText || !!ops.freeText) && !((_ops$ocd = ops.ocd) !== null && _ops$ocd !== void 0 && _ops$ocd.startsWith('OPVOPV_NICHT_RELEVANT')) && !((_ops$valCodex = ops.valCodex) !== null && _ops$valCodex !== void 0 && _ops$valCodex.startsWith('OPVOPV_NICHT_RELEVANT'))) {
34655
- var _ops$optionOcd;
34656
- sendToSap.push({
34657
- ID: sapCount++,
34658
- SAP_AUSP_ATNAM: ops.option.sendToSAP,
34659
- SAP_AUSP_ATWRT: ops.val.name,
34660
- opt: (_ops$optionOcd = ops.optionOcd) !== null && _ops$optionOcd !== void 0 ? _ops$optionOcd : ops.optionCodex
34661
- });
34724
+ var _ops$multiSelects;
34725
+ if (ops.isMultiselect && (_ops$multiSelects = ops.multiSelects) !== null && _ops$multiSelects !== void 0 && _ops$multiSelects.length) {
34726
+ for (var i = 0; i < ops.multiSelects.length; i++) {
34727
+ var _ops$optionOcd;
34728
+ sendToSap.push({
34729
+ ID: sapCount++,
34730
+ SAP_AUSP_ATNAM: ops.option.sendToSAP,
34731
+ SAP_AUSP_ATWRT: ops.multiSelects[i].name,
34732
+ opt: (_ops$optionOcd = ops.optionOcd) !== null && _ops$optionOcd !== void 0 ? _ops$optionOcd : ops.optionCodex
34733
+ });
34734
+ }
34735
+ } else {
34736
+ var _ops$optionOcd2;
34737
+ sendToSap.push({
34738
+ ID: sapCount++,
34739
+ SAP_AUSP_ATNAM: ops.option.sendToSAP,
34740
+ SAP_AUSP_ATWRT: ops.val.name,
34741
+ opt: (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex
34742
+ });
34743
+ }
34662
34744
  }
34663
34745
  }
34664
34746
  var _loop2 = function _loop2() {
34665
- var _opt$codex, _ops$optionOcd2, _ops$multiSelects;
34666
- var _article$parentOption = article.parentOptionCodex(options[i]),
34747
+ var _opt$codex, _ops$optionOcd3, _ops$multiSelects2;
34748
+ var _article$parentOption = article.parentOptionCodex(options[_i2]),
34667
34749
  codex = _article$parentOption.optionCodex,
34668
34750
  partenOptionCodex = _article$parentOption.partenOptionCodex;
34669
34751
  var _article$checkOptionA = article.checkOptionAndOptionValue(codex, '', partenOptionCodex),
34670
34752
  opt = _article$checkOptionA.opt;
34671
34753
  var ops = article.getArticleOptionState((_opt$codex = opt.codex) !== null && _opt$codex !== void 0 ? _opt$codex : codex);
34672
34754
  if (!(ops !== null && ops !== void 0 && ops.val)) return 1; // continue
34673
- var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.option.codex);
34674
- changedValues[optionCodex] = ((_ops$multiSelects = ops.multiSelects) !== null && _ops$multiSelects !== void 0 && _ops$multiSelects.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
34755
+ var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd3 = ops.optionOcd) !== null && _ops$optionOcd3 !== void 0 ? _ops$optionOcd3 : ops.option.codex);
34756
+ changedValues[optionCodex] = ((_ops$multiSelects2 = ops.multiSelects) !== null && _ops$multiSelects2 !== void 0 && _ops$multiSelects2.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
34675
34757
  var _val$ocd, _ops$freeTextLang3, _ops$freeTextLang4, _ops$option$ocd, _ops$val, _ops$val2;
34676
34758
  var attributeValue = (_val$ocd = val.ocd) !== null && _val$ocd !== void 0 ? _val$ocd : val.codex;
34677
34759
  if (ops.isFreeText) {
@@ -34722,7 +34804,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34722
34804
  };
34723
34805
  });
34724
34806
  };
34725
- for (var i = 0; i < options.length; i++) {
34807
+ for (var _i2 = 0; _i2 < options.length; _i2++) {
34726
34808
  if (_loop2()) continue;
34727
34809
  }
34728
34810
  var variantValues = article.VariantValuesParentOption;
@@ -34751,7 +34833,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34751
34833
  break;
34752
34834
  case 3:
34753
34835
  _context12.next = 5;
34754
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-3ab783ab.js'); });
34836
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-2dfc936a.js'); });
34755
34837
  case 5:
34756
34838
  _yield$import = _context12.sent;
34757
34839
  PfisterWWSHandler = _yield$import["default"];
@@ -34759,7 +34841,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34759
34841
  return _context12.abrupt("break", 27);
34760
34842
  case 9:
34761
34843
  _context12.next = 11;
34762
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-cf967a4d.js'); });
34844
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-4136ccdd.js'); });
34763
34845
  case 11:
34764
34846
  _yield$import2 = _context12.sent;
34765
34847
  LiviqueWWSHandler = _yield$import2["default"];
@@ -34767,7 +34849,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34767
34849
  return _context12.abrupt("break", 27);
34768
34850
  case 15:
34769
34851
  _context12.next = 17;
34770
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-88cac4bb.js'); });
34852
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-64d5e5ac.js'); });
34771
34853
  case 17:
34772
34854
  _yield$import3 = _context12.sent;
34773
34855
  SeriousWWSHandler = _yield$import3["default"];
@@ -34775,7 +34857,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34775
34857
  return _context12.abrupt("break", 27);
34776
34858
  case 21:
34777
34859
  _context12.next = 23;
34778
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-26ce5152.js'); });
34860
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-f7f0f838.js'); });
34779
34861
  case 23:
34780
34862
  _yield$import4 = _context12.sent;
34781
34863
  StandardWWSHandler = _yield$import4["default"];
@@ -36165,7 +36247,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36165
36247
  while (1) switch (_context3.prev = _context3.next) {
36166
36248
  case 0:
36167
36249
  _context3.next = 2;
36168
- return Promise.resolve().then(function () { return require('./Host3DSignalR-0a901365.js'); });
36250
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-7b21d1e9.js'); });
36169
36251
  case 2:
36170
36252
  _yield$import = _context3.sent;
36171
36253
  Host3DSignalR = _yield$import["default"];
@@ -37717,7 +37799,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37717
37799
  break;
37718
37800
  case 8:
37719
37801
  _context4.next = 10;
37720
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-924415b0.js'); });
37802
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-a31c4fcd.js'); });
37721
37803
  case 10:
37722
37804
  _yield$import = _context4.sent;
37723
37805
  DivaStandardPlanner = _yield$import["default"];
@@ -37728,7 +37810,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37728
37810
  return _context4.abrupt("break", 21);
37729
37811
  case 15:
37730
37812
  _context4.next = 17;
37731
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-ed22c1dd.js'); });
37813
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-8014a683.js'); });
37732
37814
  case 17:
37733
37815
  _yield$import2 = _context4.sent;
37734
37816
  DivaBoxPlanner = _yield$import2["default"];
@@ -40405,76 +40487,90 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40405
40487
  key: "saveToBasketWrapper",
40406
40488
  value: function () {
40407
40489
  var _saveToBasketWrapper = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee25(event, repairOnly, force) {
40408
- var _this$actions25,
40409
- _this$actions25$toggl,
40410
- _this$actions26,
40490
+ var _this$actions26,
40411
40491
  _this$actions26$toggl,
40492
+ _this$actions27,
40493
+ _this$actions27$toggl,
40412
40494
  _this2 = this,
40413
- _this$actions30,
40495
+ _this$actions31,
40414
40496
  _this$i18n14;
40415
- var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
40497
+ var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions25, result, _this$actions28, _this$i18n8, _this$i18n9, _this$actions29, _this$i18n10, _this$i18n11, _this$actions30, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
40416
40498
  return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
40417
40499
  while (1) switch (_context25.prev = _context25.next) {
40418
40500
  case 0:
40419
40501
  returnTo = this.getReturnTo(event);
40420
- finalEvent = event;
40502
+ finalEvent = {
40503
+ event: event,
40504
+ saveBasket: true
40505
+ };
40421
40506
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
40422
- _context25.next = 14;
40507
+ _context25.next = 21;
40423
40508
  break;
40424
40509
  }
40425
40510
  product = undefined;
40426
40511
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
40427
- _context25.next = 8;
40512
+ _context25.next = 10;
40428
40513
  break;
40429
40514
  }
40430
- _context25.next = 7;
40431
- return this.api.getDataCache(this.api.getCatalogProductUrl(this.actSet().getCatalogCodex()), undefined, undefined, 'catalog');
40432
- case 7:
40433
- _context25.sent;
40515
+ url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
40516
+ _context25.next = 8;
40517
+ return this.api.getDataCache(url, url, undefined, 'catalog');
40434
40518
  case 8:
40435
- _context25.next = 10;
40436
- return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40519
+ _result = _context25.sent;
40520
+ product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
40437
40521
  case 10:
40522
+ _context25.next = 12;
40523
+ return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40524
+ case 12:
40438
40525
  finalEvent = _context25.sent;
40439
40526
  if (finalEvent) {
40440
- _context25.next = 13;
40527
+ _context25.next = 17;
40441
40528
  break;
40442
40529
  }
40443
40530
  return _context25.abrupt("return", 'canceled');
40444
- case 13:
40445
- returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40446
- case 14:
40447
- (_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);
40448
- _context25.next = 17;
40449
- return this.saveToBasket(finalEvent, repairOnly, force);
40450
40531
  case 17:
40532
+ if (!(!finalEvent.saveBasket && finalEvent.event)) {
40533
+ _context25.next = 20;
40534
+ break;
40535
+ }
40536
+ (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.onEvent({
40537
+ type: finalEvent.event
40538
+ });
40539
+ return _context25.abrupt("return", 'canceled');
40540
+ case 20:
40541
+ returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40542
+ case 21:
40543
+ (_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, true);
40544
+ _context25.next = 24;
40545
+ return this.saveToBasket(finalEvent.event, repairOnly, force);
40546
+ case 24:
40451
40547
  result = _context25.sent;
40452
- (_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);
40548
+ (_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, false);
40453
40549
  if (!(result === 'canceled')) {
40454
- _context25.next = 23;
40550
+ _context25.next = 30;
40455
40551
  break;
40456
40552
  }
40457
40553
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
40458
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
40554
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
40459
40555
  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() : '',
40460
40556
  accept: true
40461
40557
  });
40462
40558
  return _context25.abrupt("return", result);
40463
- case 23:
40559
+ case 30:
40464
40560
  _context25.t0 = returnTo;
40465
- _context25.next = _context25.t0 === 'OPEN_PDF' ? 26 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 28 : 29;
40561
+ _context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
40466
40562
  break;
40467
- case 26:
40563
+ case 33:
40468
40564
  if (!this.getBasket().PDFDocumentURL) {
40469
40565
  LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
40470
40566
  code: 'WC_0010'
40471
40567
  }));
40472
- (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
40568
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
40473
40569
  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() : '',
40474
40570
  accept: true
40475
40571
  });
40476
40572
  } else {
40477
- (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
40573
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
40478
40574
  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'),
40479
40575
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
40480
40576
  callback: function callback() {
@@ -40482,22 +40578,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40482
40578
  }
40483
40579
  });
40484
40580
  }
40485
- return _context25.abrupt("break", 29);
40486
- case 28:
40487
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
40581
+ return _context25.abrupt("break", 36);
40582
+ case 35:
40583
+ (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
40488
40584
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
40489
40585
  accept: true
40490
40586
  });
40491
- case 29:
40587
+ case 36:
40492
40588
  if (!(result == 'noArticleToSave')) {
40493
- _context25.next = 32;
40589
+ _context25.next = 39;
40494
40590
  break;
40495
40591
  }
40496
40592
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
40497
40593
  return _context25.abrupt("return", 'canceled');
40498
- case 32:
40594
+ case 39:
40499
40595
  return _context25.abrupt("return", result);
40500
- case 33:
40596
+ case 40:
40501
40597
  case "end":
40502
40598
  return _context25.stop();
40503
40599
  }
@@ -40512,7 +40608,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40512
40608
  key: "saveToBasket",
40513
40609
  value: function () {
40514
40610
  var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
40515
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions31, _this$actions32, _this$actions33;
40611
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
40516
40612
  var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, _event4, product;
40517
40613
  return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
40518
40614
  while (1) switch (_context26.prev = _context26.next) {
@@ -40584,8 +40680,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40584
40680
  _context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 30 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 33 : _context26.t3 === 'OPEN_PDF' ? 35 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t3 === 'SAVE_BASKET' ? 35 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 35 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 35 : 55;
40585
40681
  break;
40586
40682
  case 30:
40587
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.toggleLoading('buildScene', false, false);
40588
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
40683
+ (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
40684
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
40589
40685
  type: 'SELLER',
40590
40686
  parameters: {
40591
40687
  module: 'PCreator',
@@ -40597,7 +40693,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40597
40693
  });
40598
40694
  return _context26.abrupt("break", 55);
40599
40695
  case 33:
40600
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
40696
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
40601
40697
  type: 'SELLER',
40602
40698
  parameters: {
40603
40699
  module: 'Basket',
@@ -40711,8 +40807,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40711
40807
 
40712
40808
  //if planner is hidden by config but nothing is planned initially
40713
40809
  if (plannerType === 'NONE') {
40714
- var _this$plannerConfig$a7, _this$actSet9;
40715
- if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && (_this$actSet9 = _this$actSet9.CatalogData.startPlannerArticle) !== null && _this$actSet9 !== void 0 && _this$actSet9.length)) {
40810
+ var _this$plannerConfig$a7, _this$actSet10;
40811
+ if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && (_this$actSet10 = _this$actSet10.CatalogData.startPlannerArticle) !== null && _this$actSet10 !== void 0 && _this$actSet10.length)) {
40716
40812
  plannerType = 'PLANNER';
40717
40813
  }
40718
40814
  }
@@ -40752,38 +40848,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40752
40848
  }, {
40753
40849
  key: "getCurCatalogCodex",
40754
40850
  value: function getCurCatalogCodex() {
40755
- var _this$actSet10;
40756
- return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
40851
+ var _this$actSet11;
40852
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogCodex();
40757
40853
  }
40758
40854
  }, {
40759
40855
  key: "getCurCatalogName",
40760
40856
  value: function getCurCatalogName() {
40761
- var _this$actSet11;
40762
- return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
40857
+ var _this$actSet12;
40858
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogName();
40763
40859
  }
40764
40860
  }, {
40765
40861
  key: "getCurAccountName",
40766
40862
  value: function getCurAccountName() {
40767
- var _this$actSet12;
40768
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
40863
+ var _this$actSet13;
40864
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getAccountName();
40769
40865
  }
40770
40866
  }, {
40771
40867
  key: "getCurSupplierGuid",
40772
40868
  value: function getCurSupplierGuid() {
40773
- var _this$actSet13;
40774
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
40869
+ var _this$actSet14;
40870
+ return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSupplierGuid();
40775
40871
  }
40776
40872
  }, {
40777
40873
  key: "getCurSetPrice",
40778
40874
  value: function getCurSetPrice() {
40779
- var _this$actSet$getSetPr, _this$actSet14;
40780
- return (_this$actSet$getSetPr = (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
40875
+ var _this$actSet$getSetPr, _this$actSet15;
40876
+ return (_this$actSet$getSetPr = (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
40781
40877
  }
40782
40878
  }, {
40783
40879
  key: "getCurImageMode",
40784
40880
  value: function getCurImageMode() {
40785
- var _this$actSet15;
40786
- return (_this$actSet15 = this.actSet()) !== null && _this$actSet15 !== void 0 && (_this$actSet15 = _this$actSet15.CatalogData) !== null && _this$actSet15 !== void 0 && _this$actSet15.has3dModels ? '3D' : '2D';
40881
+ var _this$actSet16;
40882
+ return (_this$actSet16 = this.actSet()) !== null && _this$actSet16 !== void 0 && (_this$actSet16 = _this$actSet16.CatalogData) !== null && _this$actSet16 !== void 0 && _this$actSet16.has3dModels ? '3D' : '2D';
40787
40883
  }
40788
40884
  }, {
40789
40885
  key: "getViewConfig",
@@ -40814,65 +40910,65 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40814
40910
  }, {
40815
40911
  key: "doShow3DDimensionLines",
40816
40912
  value: function doShow3DDimensionLines() {
40817
- var _this$actSet16;
40818
- return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 || (_this$actSet16 = _this$actSet16.CatalogData) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.doShow3DDimensionLines;
40913
+ var _this$actSet17;
40914
+ return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.doShow3DDimensionLines;
40819
40915
  }
40820
40916
  }, {
40821
40917
  key: "hidePlannerUiIcons",
40822
40918
  value: function hidePlannerUiIcons() {
40823
- var _this$actSet17;
40824
- return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.hidePlannerUiIcons;
40919
+ var _this$actSet18;
40920
+ return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 || (_this$actSet18 = _this$actSet18.CatalogData) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.hidePlannerUiIcons;
40825
40921
  }
40826
40922
  }, {
40827
40923
  key: "doShowPlannerReplaceMode",
40828
40924
  value: function doShowPlannerReplaceMode() {
40829
- var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40830
- var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
40925
+ var _this$actSet19, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40926
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40831
40927
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
40832
40928
  }
40833
40929
  }, {
40834
40930
  key: "doPlannerReplaceAutoSwitch",
40835
40931
  value: function doPlannerReplaceAutoSwitch() {
40836
- var _this$actSet19, _this$api$getViewConf3;
40837
- var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40932
+ var _this$actSet20, _this$api$getViewConf3;
40933
+ var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
40838
40934
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
40839
40935
  }
40840
40936
  }, {
40841
40937
  key: "getHidePlanner",
40842
40938
  value: function getHidePlanner() {
40843
- var _this$actSet20;
40844
- return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
40939
+ var _this$actSet21;
40940
+ return this.api.getHidePlanner() || !!((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.useBoxPlanner);
40845
40941
  }
40846
40942
  }, {
40847
40943
  key: "getAllowRTV",
40848
40944
  value: function getAllowRTV() {
40849
- var _this$actSet21, _this$actSet22;
40945
+ var _this$actSet22, _this$actSet23;
40850
40946
  if (this.getEnableUnityRtvKombi()) return false;
40851
40947
  if (this.api.forceShowRTV()) return true;
40852
- if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
40853
- if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
40948
+ if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
40949
+ if (this.api.getDoShowRTV() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40854
40950
  return false;
40855
40951
  }
40856
40952
  }, {
40857
40953
  key: "geAllowQRCodeAR",
40858
40954
  value: function geAllowQRCodeAR() {
40859
- var _this$actSet23;
40860
- if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40955
+ var _this$actSet24;
40956
+ if (this.api.getDoShowAR() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
40861
40957
  return false;
40862
40958
  }
40863
40959
  }, {
40864
40960
  key: "getEnableUnityRtvKombi",
40865
40961
  value: function getEnableUnityRtvKombi() {
40866
- var _this$actSet24, _this$actSet25;
40962
+ var _this$actSet25, _this$actSet26;
40867
40963
  // if force rtv disable unity kombi - biohort
40868
- if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
40869
- return ((_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40964
+ if ((_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaForceRTV) return false;
40965
+ return ((_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40870
40966
  }
40871
40967
  }, {
40872
40968
  key: "getShelfPlannerRTV",
40873
40969
  value: function getShelfPlannerRTV() {
40874
- var _this$actSet26;
40875
- return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.useShelfPlannerRTV;
40970
+ var _this$actSet27;
40971
+ return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
40876
40972
  }
40877
40973
  }, {
40878
40974
  key: "getBasketData",
@@ -40913,8 +41009,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40913
41009
  }, {
40914
41010
  key: "getCatalogData",
40915
41011
  value: function getCatalogData() {
40916
- var _this$actSet27;
40917
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
41012
+ var _this$actSet28;
41013
+ return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
40918
41014
  }
40919
41015
  }, {
40920
41016
  key: "ReturnTo",
@@ -40930,16 +41026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40930
41026
  key: "addToBasket",
40931
41027
  value: function () {
40932
41028
  var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(actBasket) {
40933
- var _this$actions34,
40934
- _this$actions35,
41029
+ var _this$actions35,
40935
41030
  _this$actions36,
40936
41031
  _this$actions37,
40937
41032
  _this$actions38,
41033
+ _this$actions39,
40938
41034
  _this$divaBasketHandl3,
40939
41035
  _this3 = this,
40940
- _this$actions39,
40941
41036
  _this$actions40,
40942
- _this$actions41;
41037
+ _this$actions41,
41038
+ _this$actions42,
41039
+ _this$actions43;
40943
41040
  var event,
40944
41041
  addToBasketLog,
40945
41042
  emailConfig,
@@ -40955,43 +41052,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40955
41052
  event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
40956
41053
  addToBasketLog = true;
40957
41054
  _context28.t0 = event;
40958
- _context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 8 : _context28.t0 === 'onWebPlanerShare' ? 11 : _context28.t0 === 'onRequestConsulation' ? 14 : _context28.t0 === 'onSave' ? 17 : _context28.t0 === 'onSendEmail' ? 20 : _context28.t0 === 'onSaveProduct' ? 25 : _context28.t0 === 'dontSaveBasket' ? 33 : _context28.t0 === 'onAddToBasket' ? 35 : 35;
41055
+ _context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 8 : _context28.t0 === 'onWebPlanerShare' ? 11 : _context28.t0 === 'onRequestConsulation' ? 14 : _context28.t0 === 'onSave' ? 17 : _context28.t0 === 'onSendEmail' ? 20 : _context28.t0 === 'onSaveProduct' ? 25 : _context28.t0 === 'dontSaveBasket' ? 33 : _context28.t0 === 'onAddToBasket' ? 35 : 38;
40959
41056
  break;
40960
41057
  case 5:
40961
41058
  this.handleSuccessTransaction('onPrintBasket', actBasket);
40962
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41059
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
40963
41060
  type: 'onWebPlanerPrint',
40964
41061
  data: actBasket.getAsJson()
40965
41062
  });
40966
- return _context28.abrupt("break", 38);
41063
+ return _context28.abrupt("break", 40);
40967
41064
  case 8:
40968
41065
  this.handleSuccessTransaction('onSaveBasket', actBasket);
40969
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41066
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
40970
41067
  type: 'onWebPlanerSave',
40971
41068
  data: actBasket.getAsJson()
40972
41069
  });
40973
- return _context28.abrupt("break", 38);
41070
+ return _context28.abrupt("break", 40);
40974
41071
  case 11:
40975
41072
  this.handleSuccessTransaction('onShareBasket', actBasket);
40976
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41073
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
40977
41074
  type: 'onWebPlanerShare',
40978
41075
  data: actBasket.getAsJson()
40979
41076
  });
40980
- return _context28.abrupt("break", 38);
41077
+ return _context28.abrupt("break", 40);
40981
41078
  case 14:
40982
41079
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
40983
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41080
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
40984
41081
  type: 'onRequestConsulation',
40985
41082
  data: actBasket.getAsJson()
40986
41083
  });
40987
- return _context28.abrupt("break", 38);
41084
+ return _context28.abrupt("break", 40);
40988
41085
  case 17:
40989
41086
  this.handleSuccessTransaction('onSave', actBasket);
40990
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41087
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
40991
41088
  type: 'onSave',
40992
41089
  data: actBasket.getAsJson()
40993
41090
  });
40994
- return _context28.abrupt("break", 38);
41091
+ return _context28.abrupt("break", 40);
40995
41092
  case 20:
40996
41093
  emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
40997
41094
  this.divaBasketHandler.emailConfig = undefined;
@@ -41023,11 +41120,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41023
41120
  });
41024
41121
  this.handleSuccessTransaction('onSendEmail', actBasket);
41025
41122
  }
41026
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41123
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41027
41124
  type: 'onAddToBasket',
41028
41125
  data: actBasket.getAsJson()
41029
41126
  });
41030
- return _context28.abrupt("break", 38);
41127
+ return _context28.abrupt("break", 40);
41031
41128
  case 25:
41032
41129
  this.actSet().CatalogData;
41033
41130
  _context28.next = 28;
@@ -41035,7 +41132,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41035
41132
  case 28:
41036
41133
  products = _context28.sent;
41037
41134
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41038
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41135
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41039
41136
  type: 'onAddToBasket',
41040
41137
  data: actBasket.getAsJson()
41041
41138
  });
@@ -41049,14 +41146,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41049
41146
  addToBasketLog = false;
41050
41147
  case 35:
41051
41148
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41052
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41149
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
41053
41150
  type: 'onAddToBasket',
41054
41151
  data: actBasket.getAsJson()
41055
41152
  });
41056
- return _context28.abrupt("break", 38);
41153
+ return _context28.abrupt("break", 40);
41057
41154
  case 38:
41155
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
41156
+ type: event,
41157
+ data: actBasket.getAsJson()
41158
+ });
41159
+ return _context28.abrupt("break", 40);
41160
+ case 40:
41058
41161
  return _context28.abrupt("return");
41059
- case 39:
41162
+ case 41:
41060
41163
  case "end":
41061
41164
  return _context28.stop();
41062
41165
  }
@@ -41081,8 +41184,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41081
41184
  }, {
41082
41185
  key: "openPDFpostAsEvent",
41083
41186
  value: function openPDFpostAsEvent(mongoDBId) {
41084
- var _this$actions42, _this$actions43, _this$actions44;
41085
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
41187
+ var _this$actions44, _this$actions45, _this$actions46;
41188
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.updateBreadcrumbs({
41086
41189
  type: 'update',
41087
41190
  param: {
41088
41191
  groupId: 'SHOWROOM',
@@ -41096,7 +41199,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41096
41199
  }
41097
41200
  }
41098
41201
  });
41099
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
41202
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.updateBreadcrumbs({
41100
41203
  type: 'update',
41101
41204
  param: {
41102
41205
  groupId: 'SHOWROOM',
@@ -41110,7 +41213,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41110
41213
  }
41111
41214
  }
41112
41215
  });
41113
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
41216
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.openComponent({
41114
41217
  type: 'REPORT',
41115
41218
  parameters: {
41116
41219
  id: mongoDBId
@@ -41330,14 +41433,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41330
41433
  }, {
41331
41434
  key: "subscribeToWebPlannerEvents",
41332
41435
  value: function subscribeToWebPlannerEvents() {
41333
- var _this$actions45;
41334
- (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
41436
+ var _this$actions47;
41437
+ (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.subscribeEvents(this.addToBasketEventFunction);
41335
41438
  }
41336
41439
  }, {
41337
41440
  key: "unsubscribeFromWebPlannerEvents",
41338
41441
  value: function unsubscribeFromWebPlannerEvents() {
41339
- var _this$actions46;
41340
- (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
41442
+ var _this$actions48;
41443
+ (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.unSubscribeEvents(this.addToBasketEventFunction);
41341
41444
  }
41342
41445
  }, {
41343
41446
  key: "initApiForLogicOnly",
@@ -41405,7 +41508,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41405
41508
  }, {
41406
41509
  key: "initBasket",
41407
41510
  value: function () {
41408
- var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites) {
41511
+ var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites, onlyCalcVariants) {
41409
41512
  var _initSetState$api$web2;
41410
41513
  var initSetState, sets, result, _sets$, set, basket;
41411
41514
  return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
@@ -41434,28 +41537,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41434
41537
  (_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
41435
41538
  }
41436
41539
  case 12:
41437
- //TODO: GLOBAL STUFF
41438
41540
  set = this.actSet();
41541
+ if (set) set.onlyCalcVariants = onlyCalcVariants;
41439
41542
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
41440
41543
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
41441
- _context31.next = 17;
41544
+ _context31.next = 18;
41442
41545
  break;
41443
41546
  }
41444
- _context31.next = 17;
41547
+ _context31.next = 18;
41445
41548
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
41446
- case 17:
41447
- _context31.next = 19;
41549
+ case 18:
41550
+ _context31.next = 20;
41448
41551
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
41449
- case 19:
41552
+ case 20:
41450
41553
  basket = _context31.sent;
41451
41554
  return _context31.abrupt("return", basket);
41452
- case 21:
41555
+ case 22:
41453
41556
  case "end":
41454
41557
  return _context31.stop();
41455
41558
  }
41456
41559
  }, _callee31, this);
41457
41560
  }));
41458
- function initBasket(_x78, _x79) {
41561
+ function initBasket(_x78, _x79, _x80) {
41459
41562
  return _initBasket.apply(this, arguments);
41460
41563
  }
41461
41564
  return initBasket;
@@ -41532,7 +41635,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41532
41635
  }
41533
41636
  }, _callee33, this);
41534
41637
  }));
41535
- function handleFavorites(_x80) {
41638
+ function handleFavorites(_x81) {
41536
41639
  return _handleFavorites.apply(this, arguments);
41537
41640
  }
41538
41641
  return handleFavorites;
@@ -41586,7 +41689,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41586
41689
  }
41587
41690
  }, _callee34, this);
41588
41691
  }));
41589
- function initSapOrderLinesFromBasket(_x81, _x82, _x83) {
41692
+ function initSapOrderLinesFromBasket(_x82, _x83, _x84) {
41590
41693
  return _initSapOrderLinesFromBasket.apply(this, arguments);
41591
41694
  }
41592
41695
  return initSapOrderLinesFromBasket;