@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
@@ -883,8 +883,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
883
883
  return '/v1/products/' + productId + '/list';
884
884
  }
885
885
  }, {
886
- key: "getProductBasketUrl",
887
- value: function getProductBasketUrl(key, value) {
886
+ key: "getProductByKeyValueUrl",
887
+ value: function getProductByKeyValueUrl(key, value) {
888
888
  return "/v1/products/basket?key=".concat(key, "&value=").concat(value);
889
889
  }
890
890
  }, {
@@ -1597,6 +1597,16 @@ var ArticleOptionData = /*#__PURE__*/function () {
1597
1597
  get: function get() {
1598
1598
  return this.opt.catalogOPT.contentItemId;
1599
1599
  }
1600
+ }, {
1601
+ key: "showSearchbar",
1602
+ get: function get() {
1603
+ return this.opt.catalogOPT.showSearchbar;
1604
+ }
1605
+ }, {
1606
+ key: "showFilter",
1607
+ get: function get() {
1608
+ return this.opt.catalogOPT.showFilter;
1609
+ }
1600
1610
  }, {
1601
1611
  key: "pdfUrl",
1602
1612
  get: function get() {
@@ -17830,6 +17840,12 @@ var OptionCatalogData = /*#__PURE__*/function () {
17830
17840
  case 'INFO_URL':
17831
17841
  this.opt.url = prop.Value;
17832
17842
  break;
17843
+ case 'SHOW_SEARCHBAR':
17844
+ this.opt.showSearchbar = prop.Value;
17845
+ break;
17846
+ case 'SHOW_FILTER':
17847
+ this.opt.showFilter = prop.Value;
17848
+ break;
17833
17849
  case 'INFO_PDF':
17834
17850
  this.opt.pdfUrl = prop.Value;
17835
17851
  break;
@@ -18030,6 +18046,16 @@ var OptionCatalogData = /*#__PURE__*/function () {
18030
18046
  get: function get() {
18031
18047
  return this.opt.url;
18032
18048
  }
18049
+ }, {
18050
+ key: "showSearchbar",
18051
+ get: function get() {
18052
+ return this.opt.showSearchbar;
18053
+ }
18054
+ }, {
18055
+ key: "showFilter",
18056
+ get: function get() {
18057
+ return this.opt.showFilter;
18058
+ }
18033
18059
  }, {
18034
18060
  key: "pdfUrl",
18035
18061
  get: function get() {
@@ -18126,7 +18152,6 @@ var DivaCatalogData = /*#__PURE__*/function () {
18126
18152
  brandName: json.Brandname,
18127
18153
  mediaUrl: '',
18128
18154
  // https://retail.diva-portal.de/files/33/9680c4a3-fc60-4541-8738-4859d9b24e9d/";
18129
- imageBaseUrl: '',
18130
18155
  subFolder: json.SubFolder,
18131
18156
  longDescription: json.LongDescription,
18132
18157
  longDescription_locales: json.LongDescription_locales,
@@ -18328,9 +18353,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
18328
18353
  key: "getMediaURL",
18329
18354
  value: function getMediaURL(subFolder) {
18330
18355
  var retval = '';
18331
- if (this.catalogData.imageBaseUrl != '') {
18332
- retval = this.catalogData.imageBaseUrl;
18333
- } else if (this.api.getBaseUrl().substring(0, 4) == 'http') {
18356
+ if (this.api.getBaseUrl().substring(0, 4) == 'http') {
18334
18357
  retval = this.api.getBaseUrl() + '/' + this.api.getServerId() + '/';
18335
18358
  }
18336
18359
  if (subFolder != '') retval += subFolder + '/';
@@ -23561,7 +23584,7 @@ var DivaArticle = /*#__PURE__*/function () {
23561
23584
  break;
23562
23585
  }
23563
23586
  _context.next = 4;
23564
- return import('./ShelfPlanner-65d91874.js');
23587
+ return import('./ShelfPlanner-48c3e993.js');
23565
23588
  case 4:
23566
23589
  _yield$import = _context.sent;
23567
23590
  ShelfPlanner = _yield$import["default"];
@@ -26904,6 +26927,7 @@ var DivaSet = /*#__PURE__*/function () {
26904
26927
  _defineProperty(this, "setId", void 0);
26905
26928
  _defineProperty(this, "_isActSet", false);
26906
26929
  _defineProperty(this, "setData", void 0);
26930
+ _defineProperty(this, "_onlyCalcVariants", void 0);
26907
26931
  _defineProperty(this, "divaArticles", void 0);
26908
26932
  //Schlüssel ist basketId
26909
26933
  _defineProperty(this, "configSingleData", void 0);
@@ -28093,7 +28117,7 @@ var DivaSet = /*#__PURE__*/function () {
28093
28117
  break;
28094
28118
  }
28095
28119
  _context4.next = 3;
28096
- return import('./DoorPlanner-c8958dcc.js');
28120
+ return import('./DoorPlanner-b9f3c272.js');
28097
28121
  case 3:
28098
28122
  _yield$import = _context4.sent;
28099
28123
  DoorPlanner = _yield$import["default"];
@@ -28158,6 +28182,14 @@ var DivaSet = /*#__PURE__*/function () {
28158
28182
  get: function get() {
28159
28183
  return this.setState;
28160
28184
  }
28185
+ }, {
28186
+ key: "onlyCalcVariants",
28187
+ get: function get() {
28188
+ return this._onlyCalcVariants;
28189
+ },
28190
+ set: function set(val) {
28191
+ this._onlyCalcVariants = val;
28192
+ }
28161
28193
 
28162
28194
  /**
28163
28195
  *
@@ -29598,7 +29630,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29598
29630
  key: "getValidVariants",
29599
29631
  value: function () {
29600
29632
  var _getValidVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(set, useCache) {
29601
- var allvariants, validVariants, i;
29633
+ var allvariants, validVariants, i, _set$onlyCalcVariants;
29602
29634
  return _regeneratorRuntime.wrap(function _callee3$(_context4) {
29603
29635
  while (1) switch (_context4.prev = _context4.next) {
29604
29636
  case 0:
@@ -29619,7 +29651,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29619
29651
  validVariants = [];
29620
29652
  for (i = 0; i < allvariants.length; i++) {
29621
29653
  if (!set.disabledVariants.includes(allvariants[i].id)) {
29622
- validVariants.push(allvariants[i]);
29654
+ if (!((_set$onlyCalcVariants = set.onlyCalcVariants) !== null && _set$onlyCalcVariants !== void 0 && _set$onlyCalcVariants.length) || set.onlyCalcVariants.includes(allvariants[i].id)) {
29655
+ validVariants.push(allvariants[i]);
29656
+ }
29623
29657
  }
29624
29658
  }
29625
29659
  return _context4.abrupt("return", validVariants);
@@ -30724,6 +30758,34 @@ var DivaProductHandler = /*#__PURE__*/function () {
30724
30758
  }
30725
30759
  return updateProducts;
30726
30760
  }()
30761
+ }, {
30762
+ key: "getBestMatch",
30763
+ value: function getBestMatch(articles, products) {
30764
+ var OPTION_CODEX = 'KOPFTEIL';
30765
+ if (!articles) return;
30766
+ for (var key in articles) {
30767
+ var _article$VariantValue;
30768
+ var article = articles[key];
30769
+ var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
30770
+ if (!products || !opv) continue;
30771
+ for (var i = 0; i < products.length; i++) {
30772
+ var _products$i$affiliate;
30773
+ 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)) {
30774
+ return products[i];
30775
+ }
30776
+ }
30777
+ }
30778
+ return undefined;
30779
+ }
30780
+ }, {
30781
+ key: "findOPVCodexInVariantValues",
30782
+ value: function findOPVCodexInVariantValues(product, opt, opv) {
30783
+ return product.articles.find(function (article) {
30784
+ return article.variantValues.find(function (variant) {
30785
+ return variant.OPT === opt && variant.OPV === opv;
30786
+ });
30787
+ });
30788
+ }
30727
30789
  }]);
30728
30790
  }();
30729
30791
  var productHandlerInstance = new DivaProductHandler();
@@ -32548,7 +32610,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32548
32610
  value: (function () {
32549
32611
  var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
32550
32612
  var _set$ViewConfig, _configItems$;
32551
- var opt, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
32613
+ var opt, calcVariantsForPricePreview, previewType, _set$api$ReturnToFrom, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
32552
32614
  return _regeneratorRuntime.wrap(function _callee23$(_context25) {
32553
32615
  while (1) switch (_context25.prev = _context25.next) {
32554
32616
  case 0:
@@ -32562,7 +32624,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32562
32624
  calcVariantsForPricePreview = false;
32563
32625
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
32564
32626
  if (previewType) {
32565
- 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));
32627
+ 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));
32566
32628
  }
32567
32629
  if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
32568
32630
  if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
@@ -34052,7 +34114,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34052
34114
  key: "initProductId",
34053
34115
  value: function () {
34054
34116
  var _initProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(api, productId) {
34055
- var result;
34117
+ var result, successful;
34056
34118
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
34057
34119
  while (1) switch (_context2.prev = _context2.next) {
34058
34120
  case 0:
@@ -34064,10 +34126,17 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34064
34126
  _context2.next = 6;
34065
34127
  return this.initBasket(api, result.divaNr, {
34066
34128
  basket: result.configuration
34067
- }, false);
34129
+ }, false, productId);
34068
34130
  case 6:
34069
- return _context2.abrupt("return", _context2.sent);
34070
- case 7:
34131
+ successful = _context2.sent;
34132
+ if (!successful) {
34133
+ _context2.next = 9;
34134
+ break;
34135
+ }
34136
+ return _context2.abrupt("return", result);
34137
+ case 9:
34138
+ return _context2.abrupt("return", false);
34139
+ case 10:
34071
34140
  case "end":
34072
34141
  return _context2.stop();
34073
34142
  }
@@ -34414,7 +34483,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34414
34483
  case 0:
34415
34484
  _context8.prev = 0;
34416
34485
  _context8.next = 3;
34417
- return api.getDataCache(api.getProductBasketUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34486
+ return api.getDataCache(api.getProductByKeyValueUrl(key, productId), undefined, undefined, 'catalog', 'POST', {
34418
34487
  fields: fields !== null && fields !== void 0 && fields.length ? fields : undefined
34419
34488
  });
34420
34489
  case 3:
@@ -34635,26 +34704,39 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34635
34704
  var _ops$ocd, _ops$valCodex;
34636
34705
  var ops = article.articleOptionStates[key];
34637
34706
  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'))) {
34638
- var _ops$optionOcd;
34639
- sendToSap.push({
34640
- ID: sapCount++,
34641
- SAP_AUSP_ATNAM: ops.option.sendToSAP,
34642
- SAP_AUSP_ATWRT: ops.val.name,
34643
- opt: (_ops$optionOcd = ops.optionOcd) !== null && _ops$optionOcd !== void 0 ? _ops$optionOcd : ops.optionCodex
34644
- });
34707
+ var _ops$multiSelects;
34708
+ if (ops.isMultiselect && (_ops$multiSelects = ops.multiSelects) !== null && _ops$multiSelects !== void 0 && _ops$multiSelects.length) {
34709
+ for (var i = 0; i < ops.multiSelects.length; i++) {
34710
+ var _ops$optionOcd;
34711
+ sendToSap.push({
34712
+ ID: sapCount++,
34713
+ SAP_AUSP_ATNAM: ops.option.sendToSAP,
34714
+ SAP_AUSP_ATWRT: ops.multiSelects[i].name,
34715
+ opt: (_ops$optionOcd = ops.optionOcd) !== null && _ops$optionOcd !== void 0 ? _ops$optionOcd : ops.optionCodex
34716
+ });
34717
+ }
34718
+ } else {
34719
+ var _ops$optionOcd2;
34720
+ sendToSap.push({
34721
+ ID: sapCount++,
34722
+ SAP_AUSP_ATNAM: ops.option.sendToSAP,
34723
+ SAP_AUSP_ATWRT: ops.val.name,
34724
+ opt: (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex
34725
+ });
34726
+ }
34645
34727
  }
34646
34728
  }
34647
34729
  var _loop2 = function _loop2() {
34648
- var _opt$codex, _ops$optionOcd2, _ops$multiSelects;
34649
- var _article$parentOption = article.parentOptionCodex(options[i]),
34730
+ var _opt$codex, _ops$optionOcd3, _ops$multiSelects2;
34731
+ var _article$parentOption = article.parentOptionCodex(options[_i2]),
34650
34732
  codex = _article$parentOption.optionCodex,
34651
34733
  partenOptionCodex = _article$parentOption.partenOptionCodex;
34652
34734
  var _article$checkOptionA = article.checkOptionAndOptionValue(codex, '', partenOptionCodex),
34653
34735
  opt = _article$checkOptionA.opt;
34654
34736
  var ops = article.getArticleOptionState((_opt$codex = opt.codex) !== null && _opt$codex !== void 0 ? _opt$codex : codex);
34655
34737
  if (!(ops !== null && ops !== void 0 && ops.val)) return 1; // continue
34656
- var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.option.codex);
34657
- changedValues[optionCodex] = ((_ops$multiSelects = ops.multiSelects) !== null && _ops$multiSelects !== void 0 && _ops$multiSelects.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
34738
+ var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd3 = ops.optionOcd) !== null && _ops$optionOcd3 !== void 0 ? _ops$optionOcd3 : ops.option.codex);
34739
+ changedValues[optionCodex] = ((_ops$multiSelects2 = ops.multiSelects) !== null && _ops$multiSelects2 !== void 0 && _ops$multiSelects2.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
34658
34740
  var _val$ocd, _ops$freeTextLang3, _ops$freeTextLang4, _ops$option$ocd, _ops$val, _ops$val2;
34659
34741
  var attributeValue = (_val$ocd = val.ocd) !== null && _val$ocd !== void 0 ? _val$ocd : val.codex;
34660
34742
  if (ops.isFreeText) {
@@ -34705,7 +34787,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34705
34787
  };
34706
34788
  });
34707
34789
  };
34708
- for (var i = 0; i < options.length; i++) {
34790
+ for (var _i2 = 0; _i2 < options.length; _i2++) {
34709
34791
  if (_loop2()) continue;
34710
34792
  }
34711
34793
  var variantValues = article.VariantValuesParentOption;
@@ -34734,7 +34816,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34734
34816
  break;
34735
34817
  case 3:
34736
34818
  _context12.next = 5;
34737
- return import('./PfisterWWSHandler-e824a225.js');
34819
+ return import('./PfisterWWSHandler-1affb9d8.js');
34738
34820
  case 5:
34739
34821
  _yield$import = _context12.sent;
34740
34822
  PfisterWWSHandler = _yield$import["default"];
@@ -34742,7 +34824,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34742
34824
  return _context12.abrupt("break", 27);
34743
34825
  case 9:
34744
34826
  _context12.next = 11;
34745
- return import('./LiviqueWWSHandler-05983499.js');
34827
+ return import('./LiviqueWWSHandler-7aae2b64.js');
34746
34828
  case 11:
34747
34829
  _yield$import2 = _context12.sent;
34748
34830
  LiviqueWWSHandler = _yield$import2["default"];
@@ -34750,7 +34832,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34750
34832
  return _context12.abrupt("break", 27);
34751
34833
  case 15:
34752
34834
  _context12.next = 17;
34753
- return import('./SeriousBasketHandler-d0103e1a.js');
34835
+ return import('./SeriousBasketHandler-928f3aac.js');
34754
34836
  case 17:
34755
34837
  _yield$import3 = _context12.sent;
34756
34838
  SeriousWWSHandler = _yield$import3["default"];
@@ -34758,7 +34840,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34758
34840
  return _context12.abrupt("break", 27);
34759
34841
  case 21:
34760
34842
  _context12.next = 23;
34761
- return import('./StandardWWSHandler-539b9b15.js');
34843
+ return import('./StandardWWSHandler-56b87098.js');
34762
34844
  case 23:
34763
34845
  _yield$import4 = _context12.sent;
34764
34846
  StandardWWSHandler = _yield$import4["default"];
@@ -36148,7 +36230,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36148
36230
  while (1) switch (_context3.prev = _context3.next) {
36149
36231
  case 0:
36150
36232
  _context3.next = 2;
36151
- return import('./Host3DSignalR-f4620464.js');
36233
+ return import('./Host3DSignalR-45e86f11.js');
36152
36234
  case 2:
36153
36235
  _yield$import = _context3.sent;
36154
36236
  Host3DSignalR = _yield$import["default"];
@@ -37700,7 +37782,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37700
37782
  break;
37701
37783
  case 8:
37702
37784
  _context4.next = 10;
37703
- return import('./DivaStandardPlanner-f4ce0bf9.js');
37785
+ return import('./DivaStandardPlanner-15069451.js');
37704
37786
  case 10:
37705
37787
  _yield$import = _context4.sent;
37706
37788
  DivaStandardPlanner = _yield$import["default"];
@@ -37711,7 +37793,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37711
37793
  return _context4.abrupt("break", 21);
37712
37794
  case 15:
37713
37795
  _context4.next = 17;
37714
- return import('./DivaBoxPlanner-acb7342c.js');
37796
+ return import('./DivaBoxPlanner-256f6673.js');
37715
37797
  case 17:
37716
37798
  _yield$import2 = _context4.sent;
37717
37799
  DivaBoxPlanner = _yield$import2["default"];
@@ -40388,76 +40470,90 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40388
40470
  key: "saveToBasketWrapper",
40389
40471
  value: function () {
40390
40472
  var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
40391
- var _this$actions25,
40392
- _this$actions25$toggl,
40393
- _this$actions26,
40473
+ var _this$actions26,
40394
40474
  _this$actions26$toggl,
40475
+ _this$actions27,
40476
+ _this$actions27$toggl,
40395
40477
  _this2 = this,
40396
- _this$actions30,
40478
+ _this$actions31,
40397
40479
  _this$i18n14;
40398
- 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;
40480
+ 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;
40399
40481
  return _regeneratorRuntime.wrap(function _callee25$(_context25) {
40400
40482
  while (1) switch (_context25.prev = _context25.next) {
40401
40483
  case 0:
40402
40484
  returnTo = this.getReturnTo(event);
40403
- finalEvent = event;
40485
+ finalEvent = {
40486
+ event: event,
40487
+ saveBasket: true
40488
+ };
40404
40489
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
40405
- _context25.next = 14;
40490
+ _context25.next = 21;
40406
40491
  break;
40407
40492
  }
40408
40493
  product = undefined;
40409
40494
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
40410
- _context25.next = 8;
40495
+ _context25.next = 10;
40411
40496
  break;
40412
40497
  }
40413
- _context25.next = 7;
40414
- return this.api.getDataCache(this.api.getCatalogProductUrl(this.actSet().getCatalogCodex()), undefined, undefined, 'catalog');
40415
- case 7:
40416
- _context25.sent;
40498
+ url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
40499
+ _context25.next = 8;
40500
+ return this.api.getDataCache(url, url, undefined, 'catalog');
40417
40501
  case 8:
40418
- _context25.next = 10;
40419
- return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40502
+ _result = _context25.sent;
40503
+ product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
40420
40504
  case 10:
40505
+ _context25.next = 12;
40506
+ return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40507
+ case 12:
40421
40508
  finalEvent = _context25.sent;
40422
40509
  if (finalEvent) {
40423
- _context25.next = 13;
40510
+ _context25.next = 17;
40424
40511
  break;
40425
40512
  }
40426
40513
  return _context25.abrupt("return", 'canceled');
40427
- case 13:
40428
- returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40429
- case 14:
40430
- (_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);
40431
- _context25.next = 17;
40432
- return this.saveToBasket(finalEvent, repairOnly, force);
40433
40514
  case 17:
40515
+ if (!(!finalEvent.saveBasket && finalEvent.event)) {
40516
+ _context25.next = 20;
40517
+ break;
40518
+ }
40519
+ (_this$actions25 = this.actions) === null || _this$actions25 === void 0 || _this$actions25.onEvent({
40520
+ type: finalEvent.event
40521
+ });
40522
+ return _context25.abrupt("return", 'canceled');
40523
+ case 20:
40524
+ returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40525
+ case 21:
40526
+ (_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);
40527
+ _context25.next = 24;
40528
+ return this.saveToBasket(finalEvent.event, repairOnly, force);
40529
+ case 24:
40434
40530
  result = _context25.sent;
40435
- (_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);
40531
+ (_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);
40436
40532
  if (!(result === 'canceled')) {
40437
- _context25.next = 23;
40533
+ _context25.next = 30;
40438
40534
  break;
40439
40535
  }
40440
40536
  LOG$1.error(new DivaError('failed to save Basket'));
40441
- (_this$actions27 = this.actions) === null || _this$actions27 === void 0 || _this$actions27.openModal({
40537
+ (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
40442
40538
  text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
40443
40539
  accept: true
40444
40540
  });
40445
40541
  return _context25.abrupt("return", result);
40446
- case 23:
40542
+ case 30:
40447
40543
  _context25.t0 = returnTo;
40448
- _context25.next = _context25.t0 === 'OPEN_PDF' ? 26 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 28 : 29;
40544
+ _context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
40449
40545
  break;
40450
- case 26:
40546
+ case 33:
40451
40547
  if (!this.getBasket().PDFDocumentURL) {
40452
40548
  LOG$1.error(new DivaError('PDF url is missing in basket', {
40453
40549
  code: 'WC_0010'
40454
40550
  }));
40455
- (_this$actions28 = this.actions) === null || _this$actions28 === void 0 || _this$actions28.openModal({
40551
+ (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
40456
40552
  text: ((_this$i18n10 = this.i18n()) === null || _this$i18n10 === void 0 ? void 0 : _this$i18n10.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n11 = this.i18n()) === null || _this$i18n11 === void 0 ? void 0 : _this$i18n11.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
40457
40553
  accept: true
40458
40554
  });
40459
40555
  } else {
40460
- (_this$actions29 = this.actions) === null || _this$actions29 === void 0 || _this$actions29.openModal({
40556
+ (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
40461
40557
  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'),
40462
40558
  accept: (_this$i18n13 = this.i18n()) === null || _this$i18n13 === void 0 ? void 0 : _this$i18n13.t('modals.open_now'),
40463
40559
  callback: function callback() {
@@ -40465,22 +40561,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40465
40561
  }
40466
40562
  });
40467
40563
  }
40468
- return _context25.abrupt("break", 29);
40469
- case 28:
40470
- (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
40564
+ return _context25.abrupt("break", 36);
40565
+ case 35:
40566
+ (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
40471
40567
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
40472
40568
  accept: true
40473
40569
  });
40474
- case 29:
40570
+ case 36:
40475
40571
  if (!(result == 'noArticleToSave')) {
40476
- _context25.next = 32;
40572
+ _context25.next = 39;
40477
40573
  break;
40478
40574
  }
40479
40575
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
40480
40576
  return _context25.abrupt("return", 'canceled');
40481
- case 32:
40577
+ case 39:
40482
40578
  return _context25.abrupt("return", result);
40483
- case 33:
40579
+ case 40:
40484
40580
  case "end":
40485
40581
  return _context25.stop();
40486
40582
  }
@@ -40495,7 +40591,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40495
40591
  key: "saveToBasket",
40496
40592
  value: function () {
40497
40593
  var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
40498
- var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions31, _this$actions32, _this$actions33;
40594
+ var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
40499
40595
  var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, _event4, product;
40500
40596
  return _regeneratorRuntime.wrap(function _callee26$(_context26) {
40501
40597
  while (1) switch (_context26.prev = _context26.next) {
@@ -40567,8 +40663,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40567
40663
  _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;
40568
40664
  break;
40569
40665
  case 30:
40570
- (_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.toggleLoading('buildScene', false, false);
40571
- (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openComponent({
40666
+ (_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
40667
+ (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
40572
40668
  type: 'SELLER',
40573
40669
  parameters: {
40574
40670
  module: 'PCreator',
@@ -40580,7 +40676,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40580
40676
  });
40581
40677
  return _context26.abrupt("break", 55);
40582
40678
  case 33:
40583
- (_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
40679
+ (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
40584
40680
  type: 'SELLER',
40585
40681
  parameters: {
40586
40682
  module: 'Basket',
@@ -40694,8 +40790,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40694
40790
 
40695
40791
  //if planner is hidden by config but nothing is planned initially
40696
40792
  if (plannerType === 'NONE') {
40697
- var _this$plannerConfig$a7, _this$actSet9;
40698
- 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)) {
40793
+ var _this$plannerConfig$a7, _this$actSet10;
40794
+ 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)) {
40699
40795
  plannerType = 'PLANNER';
40700
40796
  }
40701
40797
  }
@@ -40735,38 +40831,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40735
40831
  }, {
40736
40832
  key: "getCurCatalogCodex",
40737
40833
  value: function getCurCatalogCodex() {
40738
- var _this$actSet10;
40739
- return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
40834
+ var _this$actSet11;
40835
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogCodex();
40740
40836
  }
40741
40837
  }, {
40742
40838
  key: "getCurCatalogName",
40743
40839
  value: function getCurCatalogName() {
40744
- var _this$actSet11;
40745
- return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
40840
+ var _this$actSet12;
40841
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogName();
40746
40842
  }
40747
40843
  }, {
40748
40844
  key: "getCurAccountName",
40749
40845
  value: function getCurAccountName() {
40750
- var _this$actSet12;
40751
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
40846
+ var _this$actSet13;
40847
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getAccountName();
40752
40848
  }
40753
40849
  }, {
40754
40850
  key: "getCurSupplierGuid",
40755
40851
  value: function getCurSupplierGuid() {
40756
- var _this$actSet13;
40757
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
40852
+ var _this$actSet14;
40853
+ return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSupplierGuid();
40758
40854
  }
40759
40855
  }, {
40760
40856
  key: "getCurSetPrice",
40761
40857
  value: function getCurSetPrice() {
40762
- var _this$actSet$getSetPr, _this$actSet14;
40763
- 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;
40858
+ var _this$actSet$getSetPr, _this$actSet15;
40859
+ 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;
40764
40860
  }
40765
40861
  }, {
40766
40862
  key: "getCurImageMode",
40767
40863
  value: function getCurImageMode() {
40768
- var _this$actSet15;
40769
- 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';
40864
+ var _this$actSet16;
40865
+ 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';
40770
40866
  }
40771
40867
  }, {
40772
40868
  key: "getViewConfig",
@@ -40797,65 +40893,65 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40797
40893
  }, {
40798
40894
  key: "doShow3DDimensionLines",
40799
40895
  value: function doShow3DDimensionLines() {
40800
- var _this$actSet16;
40801
- 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;
40896
+ var _this$actSet17;
40897
+ 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;
40802
40898
  }
40803
40899
  }, {
40804
40900
  key: "hidePlannerUiIcons",
40805
40901
  value: function hidePlannerUiIcons() {
40806
- var _this$actSet17;
40807
- 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;
40902
+ var _this$actSet18;
40903
+ 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;
40808
40904
  }
40809
40905
  }, {
40810
40906
  key: "doShowPlannerReplaceMode",
40811
40907
  value: function doShowPlannerReplaceMode() {
40812
- var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40813
- var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
40908
+ var _this$actSet19, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40909
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40814
40910
  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;
40815
40911
  }
40816
40912
  }, {
40817
40913
  key: "doPlannerReplaceAutoSwitch",
40818
40914
  value: function doPlannerReplaceAutoSwitch() {
40819
- var _this$actSet19, _this$api$getViewConf3;
40820
- var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40915
+ var _this$actSet20, _this$api$getViewConf3;
40916
+ var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
40821
40917
  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);
40822
40918
  }
40823
40919
  }, {
40824
40920
  key: "getHidePlanner",
40825
40921
  value: function getHidePlanner() {
40826
- var _this$actSet20;
40827
- return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
40922
+ var _this$actSet21;
40923
+ return this.api.getHidePlanner() || !!((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.useBoxPlanner);
40828
40924
  }
40829
40925
  }, {
40830
40926
  key: "getAllowRTV",
40831
40927
  value: function getAllowRTV() {
40832
- var _this$actSet21, _this$actSet22;
40928
+ var _this$actSet22, _this$actSet23;
40833
40929
  if (this.getEnableUnityRtvKombi()) return false;
40834
40930
  if (this.api.forceShowRTV()) return true;
40835
- if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
40836
- if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
40931
+ if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
40932
+ if (this.api.getDoShowRTV() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40837
40933
  return false;
40838
40934
  }
40839
40935
  }, {
40840
40936
  key: "geAllowQRCodeAR",
40841
40937
  value: function geAllowQRCodeAR() {
40842
- var _this$actSet23;
40843
- if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40938
+ var _this$actSet24;
40939
+ if (this.api.getDoShowAR() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
40844
40940
  return false;
40845
40941
  }
40846
40942
  }, {
40847
40943
  key: "getEnableUnityRtvKombi",
40848
40944
  value: function getEnableUnityRtvKombi() {
40849
- var _this$actSet24, _this$actSet25;
40945
+ var _this$actSet25, _this$actSet26;
40850
40946
  // if force rtv disable unity kombi - biohort
40851
- if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
40852
- return ((_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40947
+ if ((_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaForceRTV) return false;
40948
+ return ((_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40853
40949
  }
40854
40950
  }, {
40855
40951
  key: "getShelfPlannerRTV",
40856
40952
  value: function getShelfPlannerRTV() {
40857
- var _this$actSet26;
40858
- return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.useShelfPlannerRTV;
40953
+ var _this$actSet27;
40954
+ return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
40859
40955
  }
40860
40956
  }, {
40861
40957
  key: "getBasketData",
@@ -40896,8 +40992,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40896
40992
  }, {
40897
40993
  key: "getCatalogData",
40898
40994
  value: function getCatalogData() {
40899
- var _this$actSet27;
40900
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
40995
+ var _this$actSet28;
40996
+ return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
40901
40997
  }
40902
40998
  }, {
40903
40999
  key: "ReturnTo",
@@ -40913,16 +41009,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40913
41009
  key: "addToBasket",
40914
41010
  value: function () {
40915
41011
  var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(actBasket) {
40916
- var _this$actions34,
40917
- _this$actions35,
41012
+ var _this$actions35,
40918
41013
  _this$actions36,
40919
41014
  _this$actions37,
40920
41015
  _this$actions38,
41016
+ _this$actions39,
40921
41017
  _this$divaBasketHandl3,
40922
41018
  _this3 = this,
40923
- _this$actions39,
40924
41019
  _this$actions40,
40925
- _this$actions41;
41020
+ _this$actions41,
41021
+ _this$actions42,
41022
+ _this$actions43;
40926
41023
  var event,
40927
41024
  addToBasketLog,
40928
41025
  emailConfig,
@@ -40938,43 +41035,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40938
41035
  event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
40939
41036
  addToBasketLog = true;
40940
41037
  _context28.t0 = event;
40941
- _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;
41038
+ _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;
40942
41039
  break;
40943
41040
  case 5:
40944
41041
  this.handleSuccessTransaction('onPrintBasket', actBasket);
40945
- (_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.onEvent({
41042
+ (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
40946
41043
  type: 'onWebPlanerPrint',
40947
41044
  data: actBasket.getAsJson()
40948
41045
  });
40949
- return _context28.abrupt("break", 38);
41046
+ return _context28.abrupt("break", 40);
40950
41047
  case 8:
40951
41048
  this.handleSuccessTransaction('onSaveBasket', actBasket);
40952
- (_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
41049
+ (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
40953
41050
  type: 'onWebPlanerSave',
40954
41051
  data: actBasket.getAsJson()
40955
41052
  });
40956
- return _context28.abrupt("break", 38);
41053
+ return _context28.abrupt("break", 40);
40957
41054
  case 11:
40958
41055
  this.handleSuccessTransaction('onShareBasket', actBasket);
40959
- (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
41056
+ (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
40960
41057
  type: 'onWebPlanerShare',
40961
41058
  data: actBasket.getAsJson()
40962
41059
  });
40963
- return _context28.abrupt("break", 38);
41060
+ return _context28.abrupt("break", 40);
40964
41061
  case 14:
40965
41062
  this.handleSuccessTransaction('onRequestConsulation', actBasket);
40966
- (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
41063
+ (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
40967
41064
  type: 'onRequestConsulation',
40968
41065
  data: actBasket.getAsJson()
40969
41066
  });
40970
- return _context28.abrupt("break", 38);
41067
+ return _context28.abrupt("break", 40);
40971
41068
  case 17:
40972
41069
  this.handleSuccessTransaction('onSave', actBasket);
40973
- (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
41070
+ (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
40974
41071
  type: 'onSave',
40975
41072
  data: actBasket.getAsJson()
40976
41073
  });
40977
- return _context28.abrupt("break", 38);
41074
+ return _context28.abrupt("break", 40);
40978
41075
  case 20:
40979
41076
  emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
40980
41077
  this.divaBasketHandler.emailConfig = undefined;
@@ -41006,11 +41103,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41006
41103
  });
41007
41104
  this.handleSuccessTransaction('onSendEmail', actBasket);
41008
41105
  }
41009
- (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
41106
+ (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41010
41107
  type: 'onAddToBasket',
41011
41108
  data: actBasket.getAsJson()
41012
41109
  });
41013
- return _context28.abrupt("break", 38);
41110
+ return _context28.abrupt("break", 40);
41014
41111
  case 25:
41015
41112
  this.actSet().CatalogData;
41016
41113
  _context28.next = 28;
@@ -41018,7 +41115,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41018
41115
  case 28:
41019
41116
  products = _context28.sent;
41020
41117
  this.handleSuccessTransaction('onSaveProduct', actBasket);
41021
- (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
41118
+ (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41022
41119
  type: 'onAddToBasket',
41023
41120
  data: actBasket.getAsJson()
41024
41121
  });
@@ -41032,14 +41129,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41032
41129
  addToBasketLog = false;
41033
41130
  case 35:
41034
41131
  if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
41035
- (_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
41132
+ (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
41036
41133
  type: 'onAddToBasket',
41037
41134
  data: actBasket.getAsJson()
41038
41135
  });
41039
- return _context28.abrupt("break", 38);
41136
+ return _context28.abrupt("break", 40);
41040
41137
  case 38:
41138
+ (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
41139
+ type: event,
41140
+ data: actBasket.getAsJson()
41141
+ });
41142
+ return _context28.abrupt("break", 40);
41143
+ case 40:
41041
41144
  return _context28.abrupt("return");
41042
- case 39:
41145
+ case 41:
41043
41146
  case "end":
41044
41147
  return _context28.stop();
41045
41148
  }
@@ -41064,8 +41167,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41064
41167
  }, {
41065
41168
  key: "openPDFpostAsEvent",
41066
41169
  value: function openPDFpostAsEvent(mongoDBId) {
41067
- var _this$actions42, _this$actions43, _this$actions44;
41068
- (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.updateBreadcrumbs({
41170
+ var _this$actions44, _this$actions45, _this$actions46;
41171
+ (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.updateBreadcrumbs({
41069
41172
  type: 'update',
41070
41173
  param: {
41071
41174
  groupId: 'SHOWROOM',
@@ -41079,7 +41182,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41079
41182
  }
41080
41183
  }
41081
41184
  });
41082
- (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
41185
+ (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.updateBreadcrumbs({
41083
41186
  type: 'update',
41084
41187
  param: {
41085
41188
  groupId: 'SHOWROOM',
@@ -41093,7 +41196,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41093
41196
  }
41094
41197
  }
41095
41198
  });
41096
- (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.openComponent({
41199
+ (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.openComponent({
41097
41200
  type: 'REPORT',
41098
41201
  parameters: {
41099
41202
  id: mongoDBId
@@ -41313,14 +41416,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41313
41416
  }, {
41314
41417
  key: "subscribeToWebPlannerEvents",
41315
41418
  value: function subscribeToWebPlannerEvents() {
41316
- var _this$actions45;
41317
- (_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.subscribeEvents(this.addToBasketEventFunction);
41419
+ var _this$actions47;
41420
+ (_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.subscribeEvents(this.addToBasketEventFunction);
41318
41421
  }
41319
41422
  }, {
41320
41423
  key: "unsubscribeFromWebPlannerEvents",
41321
41424
  value: function unsubscribeFromWebPlannerEvents() {
41322
- var _this$actions46;
41323
- (_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.unSubscribeEvents(this.addToBasketEventFunction);
41425
+ var _this$actions48;
41426
+ (_this$actions48 = this.actions) === null || _this$actions48 === void 0 || _this$actions48.unSubscribeEvents(this.addToBasketEventFunction);
41324
41427
  }
41325
41428
  }, {
41326
41429
  key: "initApiForLogicOnly",
@@ -41388,7 +41491,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41388
41491
  }, {
41389
41492
  key: "initBasket",
41390
41493
  value: function () {
41391
- var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites) {
41494
+ var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites, onlyCalcVariants) {
41392
41495
  var _initSetState$api$web2;
41393
41496
  var initSetState, sets, result, _sets$, set, basket;
41394
41497
  return _regeneratorRuntime.wrap(function _callee31$(_context31) {
@@ -41417,28 +41520,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41417
41520
  (_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
41418
41521
  }
41419
41522
  case 12:
41420
- //TODO: GLOBAL STUFF
41421
41523
  set = this.actSet();
41524
+ if (set) set.onlyCalcVariants = onlyCalcVariants;
41422
41525
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
41423
41526
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
41424
- _context31.next = 17;
41527
+ _context31.next = 18;
41425
41528
  break;
41426
41529
  }
41427
- _context31.next = 17;
41530
+ _context31.next = 18;
41428
41531
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
41429
- case 17:
41430
- _context31.next = 19;
41532
+ case 18:
41533
+ _context31.next = 20;
41431
41534
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
41432
- case 19:
41535
+ case 20:
41433
41536
  basket = _context31.sent;
41434
41537
  return _context31.abrupt("return", basket);
41435
- case 21:
41538
+ case 22:
41436
41539
  case "end":
41437
41540
  return _context31.stop();
41438
41541
  }
41439
41542
  }, _callee31, this);
41440
41543
  }));
41441
- function initBasket(_x78, _x79) {
41544
+ function initBasket(_x78, _x79, _x80) {
41442
41545
  return _initBasket.apply(this, arguments);
41443
41546
  }
41444
41547
  return initBasket;
@@ -41515,7 +41618,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41515
41618
  }
41516
41619
  }, _callee33, this);
41517
41620
  }));
41518
- function handleFavorites(_x80) {
41621
+ function handleFavorites(_x81) {
41519
41622
  return _handleFavorites.apply(this, arguments);
41520
41623
  }
41521
41624
  return handleFavorites;
@@ -41569,7 +41672,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41569
41672
  }
41570
41673
  }, _callee34, this);
41571
41674
  }));
41572
- function initSapOrderLinesFromBasket(_x81, _x82, _x83) {
41675
+ function initSapOrderLinesFromBasket(_x82, _x83, _x84) {
41573
41676
  return _initSapOrderLinesFromBasket.apply(this, arguments);
41574
41677
  }
41575
41678
  return initSapOrderLinesFromBasket;