@crystaldesign/web-planner-logic 24.12.0-rc.8 → 24.12.0

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 (28) hide show
  1. package/build/cjs/{DivaBoxPlanner-b7e55e06.js → DivaBoxPlanner-1c78ef85.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-ea3f2bef.js → DivaStandardPlanner-eb45e763.js} +2 -2
  3. package/build/cjs/{DoorPlanner-d413201e.js → DoorPlanner-3a199423.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-32992efe.js → Host3DSignalR-c52991a0.js} +11 -11
  5. package/build/cjs/{LiviqueWWSHandler-f836a820.js → LiviqueWWSHandler-6607e52f.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-dda11a4f.js → PfisterWWSHandler-2ea37e1d.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-8d7f9d8f.js → PlannerHandler2D-de64a752.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-c93a6fdb.js → SeriousBasketHandler-03648231.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-525f4f29.js → ShelfPlanner-4402bf3e.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-d46d5952.js → StandardWWSHandler-62bc3cc6.js} +1 -1
  11. package/build/cjs/{index-6e62b4f0.js → index-e86ab943.js} +99 -69
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-f2e768dd.js → DivaBoxPlanner-655a32f3.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-d1899ff9.js → DivaStandardPlanner-e1faf2c9.js} +2 -2
  15. package/build/esm/{DoorPlanner-6ee992d7.js → DoorPlanner-cfebaef8.js} +1 -1
  16. package/build/esm/{Host3DSignalR-f028ca78.js → Host3DSignalR-5d924d77.js} +11 -11
  17. package/build/esm/{LiviqueWWSHandler-bff29a8a.js → LiviqueWWSHandler-62ff852e.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-e5a11f30.js → PfisterWWSHandler-1cf1fce6.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-d4b88e85.js → PlannerHandler2D-ad96ee8d.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-e152241d.js → SeriousBasketHandler-9e031da4.js} +1 -1
  21. package/build/esm/{ShelfPlanner-75bc4ec2.js → ShelfPlanner-4f446e61.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-a918f7f0.js → StandardWWSHandler-e72ecb08.js} +1 -1
  23. package/build/esm/{index-06932812.js → index-84339e2f.js} +99 -69
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  26. package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts +5 -0
  27. package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts.map +1 -1
  28. package/package.json +2 -2
@@ -5,10 +5,10 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-6e62b4f0.js');
8
+ var index = require('./index-e86ab943.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
11
- var PlannerHandler2D = require('./PlannerHandler2D-8d7f9d8f.js');
11
+ var PlannerHandler2D = require('./PlannerHandler2D-de64a752.js');
12
12
  require('@babel/runtime/helpers/objectWithoutProperties');
13
13
  require('@babel/runtime/helpers/slicedToArray');
14
14
  require('axios');
@@ -5,8 +5,8 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-6e62b4f0.js');
9
- var PlannerHandler2D = require('./PlannerHandler2D-8d7f9d8f.js');
8
+ var index = require('./index-e86ab943.js');
9
+ var PlannerHandler2D = require('./PlannerHandler2D-de64a752.js');
10
10
  var DivaUtils = require('@crystaldesign/diva-utils');
11
11
  require('@babel/runtime/helpers/objectWithoutProperties');
12
12
  require('@babel/runtime/helpers/slicedToArray');
@@ -3,7 +3,7 @@
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('./index-6e62b4f0.js');
6
+ require('./index-e86ab943.js');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/asyncToGenerator');
9
9
  require('@babel/runtime/regenerator');
@@ -5,7 +5,7 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
5
5
  var _createClass = require('@babel/runtime/helpers/createClass');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
- var index = require('./index-6e62b4f0.js');
8
+ var index = require('./index-e86ab943.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var signalr = require('@microsoft/signalr');
11
11
  var io = require('socket.io-client');
@@ -433,10 +433,10 @@ var Host3DSignalR = /*#__PURE__*/function () {
433
433
  }, {
434
434
  key: "create3DHostRequestOption",
435
435
  value: function create3DHostRequestOption(params) {
436
- var _params$requestRender15, _params$requestRender16, _params$requestRender17, _params$requestRender18, _params$requestRender19, _params$requestRender20, _params$requestRender21, _params$requestRender22, _params$requestRender23, _params$requestRender24, _params$requestRender25, _params$requestRender26, _params$requestRender27, _params$requestRender28, _params$requestRender29;
436
+ var _params$requestRender15, _params$requestRender16, _params$requestRender17, _params$requestRender18, _params$requestRender19, _params$requestRender20, _params$requestRender21, _params$requestRender22, _params$requestRender23, _params$requestRender24, _params$requestRender25, _params$requestRender26, _params$requestRender27, _params$requestRender28, _params$requestRender29, _params$requestRender30, _params$requestRender31;
437
437
  var size = params.requestRenderingParams ? params.requestRenderingParams.width + ':' + params.requestRenderingParams.height : '';
438
438
  var bgMode = params !== null && params !== void 0 && params.doRequestRendering && (_params$requestRender15 = params.requestRenderingParams) !== null && _params$requestRender15 !== void 0 && _params$requestRender15.planner3DGridEnabled ? 'layermask' : '';
439
- var signalRSavingMode = params !== null && params !== void 0 && params.doRequestRendering ? params.requestRenderingParams.mediaServiceSaveMode == 'STREAM' ? 0 : params.requestRenderingParams.mediaServiceSaveMode == 'PERMANENT' ? 1 : -1 : -1;
439
+ var signalRSavingMode = params !== null && params !== void 0 && params.doRequestRendering ? ((_params$requestRender16 = params.requestRenderingParams) === null || _params$requestRender16 === void 0 ? void 0 : _params$requestRender16.mediaServiceSaveMode) == 'STREAM' ? 0 : ((_params$requestRender17 = params.requestRenderingParams) === null || _params$requestRender17 === void 0 ? void 0 : _params$requestRender17.mediaServiceSaveMode) == 'PERMANENT' ? 1 : -1 : -1;
440
440
  var functionType = '';
441
441
  if (params.requestRenderingParams && params.requestRenderingParams.functionType) functionType = params.requestRenderingParams.functionType;
442
442
  var articleCodices = '[]';
@@ -450,24 +450,24 @@ var Host3DSignalR = /*#__PURE__*/function () {
450
450
  var options = {
451
451
  rendering: params === null || params === void 0 ? void 0 : params.doRequestRendering,
452
452
  hqrenderscript: params.doRequestHqRenderScript,
453
- VPName: (_params$requestRender16 = (_params$requestRender17 = params.requestRenderingParams) === null || _params$requestRender17 === void 0 ? void 0 : _params$requestRender17.viewPointName) !== null && _params$requestRender16 !== void 0 ? _params$requestRender16 : '',
453
+ VPName: (_params$requestRender18 = (_params$requestRender19 = params.requestRenderingParams) === null || _params$requestRender19 === void 0 ? void 0 : _params$requestRender19.viewPointName) !== null && _params$requestRender18 !== void 0 ? _params$requestRender18 : '',
454
454
  VPSize: size,
455
455
  VPFilename: params.renderHash,
456
456
  PlanningHash: params.planningHash,
457
457
  RenderHash: params.renderHash,
458
- plannerMeasureDigits: (_params$requestRender18 = (_params$requestRender19 = params.requestRenderingParams) === null || _params$requestRender19 === void 0 ? void 0 : _params$requestRender19.plannerMeasureDigits) !== null && _params$requestRender18 !== void 0 ? _params$requestRender18 : 0,
458
+ plannerMeasureDigits: (_params$requestRender20 = (_params$requestRender21 = params.requestRenderingParams) === null || _params$requestRender21 === void 0 ? void 0 : _params$requestRender21.plannerMeasureDigits) !== null && _params$requestRender20 !== void 0 ? _params$requestRender20 : 0,
459
459
  Format: 'JPG',
460
460
  BG: bgMode,
461
461
  MSSM: signalRSavingMode,
462
462
  OrgId: this.renderSettings.OrganizationId,
463
463
  FunctionType: functionType,
464
- CatalogCodex: (_params$requestRender20 = (_params$requestRender21 = params.requestRenderingParams) === null || _params$requestRender21 === void 0 ? void 0 : _params$requestRender21.catalogData.catalogCodex) !== null && _params$requestRender20 !== void 0 ? _params$requestRender20 : '',
465
- CatalogGuid: (_params$requestRender22 = (_params$requestRender23 = params.requestRenderingParams) === null || _params$requestRender23 === void 0 ? void 0 : _params$requestRender23.catalogData.catalogGUID) !== null && _params$requestRender22 !== void 0 ? _params$requestRender22 : '',
466
- ArticleCodices: (_params$requestRender24 = (_params$requestRender25 = params.requestRenderingParams) === null || _params$requestRender25 === void 0 ? void 0 : _params$requestRender25.articleCodices) !== null && _params$requestRender24 !== void 0 ? _params$requestRender24 : [],
464
+ CatalogCodex: (_params$requestRender22 = (_params$requestRender23 = params.requestRenderingParams) === null || _params$requestRender23 === void 0 ? void 0 : _params$requestRender23.catalogData.catalogCodex) !== null && _params$requestRender22 !== void 0 ? _params$requestRender22 : '',
465
+ CatalogGuid: (_params$requestRender24 = (_params$requestRender25 = params.requestRenderingParams) === null || _params$requestRender25 === void 0 ? void 0 : _params$requestRender25.catalogData.catalogGUID) !== null && _params$requestRender24 !== void 0 ? _params$requestRender24 : '',
466
+ ArticleCodices: (_params$requestRender26 = (_params$requestRender27 = params.requestRenderingParams) === null || _params$requestRender27 === void 0 ? void 0 : _params$requestRender27.articleCodices) !== null && _params$requestRender26 !== void 0 ? _params$requestRender26 : [],
467
467
  UserSessionId: DivaUtils__default["default"].SessionId,
468
- v: (_params$requestRender26 = (_params$requestRender27 = params.requestRenderingParams) === null || _params$requestRender27 === void 0 ? void 0 : _params$requestRender27.catalogData.catalogGUID) !== null && _params$requestRender26 !== void 0 ? _params$requestRender26 : '',
469
- camera: (_params$requestRender28 = params.requestRenderingParams) === null || _params$requestRender28 === void 0 ? void 0 : _params$requestRender28.camera,
470
- forceUseCam: !!((_params$requestRender29 = params.requestRenderingParams) !== null && _params$requestRender29 !== void 0 && _params$requestRender29.forceUseCam)
468
+ v: (_params$requestRender28 = (_params$requestRender29 = params.requestRenderingParams) === null || _params$requestRender29 === void 0 ? void 0 : _params$requestRender29.catalogData.catalogGUID) !== null && _params$requestRender28 !== void 0 ? _params$requestRender28 : '',
469
+ camera: (_params$requestRender30 = params.requestRenderingParams) === null || _params$requestRender30 === void 0 ? void 0 : _params$requestRender30.camera,
470
+ forceUseCam: !!((_params$requestRender31 = params.requestRenderingParams) !== null && _params$requestRender31 !== void 0 && _params$requestRender31.forceUseCam)
471
471
  };
472
472
  return options;
473
473
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- require('./index-6e62b4f0.js');
5
+ require('./index-e86ab943.js');
6
6
  require('@babel/runtime/helpers/asyncToGenerator');
7
7
  require('@babel/runtime/helpers/defineProperty');
8
8
  require('@babel/runtime/regenerator');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- require('./index-6e62b4f0.js');
5
+ require('./index-e86ab943.js');
6
6
  var basketModel = require('@crystaldesign/basket-model');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/asyncToGenerator');
@@ -3,7 +3,7 @@
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var index = require('./index-6e62b4f0.js');
6
+ var index = require('./index-e86ab943.js');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
9
9
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
@@ -3,7 +3,7 @@
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var index = require('./index-6e62b4f0.js');
6
+ var index = require('./index-e86ab943.js');
7
7
  var DivaUtils = require('@crystaldesign/diva-utils');
8
8
  require('@babel/runtime/helpers/asyncToGenerator');
9
9
  require('@babel/runtime/regenerator');
@@ -6,7 +6,7 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime/helpers/createClass');
7
7
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
8
8
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
9
- var index = require('./index-6e62b4f0.js');
9
+ var index = require('./index-e86ab943.js');
10
10
  var DivaUtils = require('@crystaldesign/diva-utils');
11
11
  require('@babel/runtime/helpers/objectWithoutProperties');
12
12
  require('@babel/runtime/helpers/slicedToArray');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
4
4
  var _createClass = require('@babel/runtime/helpers/createClass');
5
- require('./index-6e62b4f0.js');
5
+ require('./index-e86ab943.js');
6
6
  require('@babel/runtime/helpers/asyncToGenerator');
7
7
  require('@babel/runtime/helpers/defineProperty');
8
8
  require('@babel/runtime/regenerator');
@@ -23601,7 +23601,7 @@ var DivaArticle = /*#__PURE__*/function () {
23601
23601
  break;
23602
23602
  }
23603
23603
  _context.next = 4;
23604
- return Promise.resolve().then(function () { return require('./ShelfPlanner-525f4f29.js'); });
23604
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-4402bf3e.js'); });
23605
23605
  case 4:
23606
23606
  _yield$import = _context.sent;
23607
23607
  ShelfPlanner = _yield$import["default"];
@@ -28134,7 +28134,7 @@ var DivaSet = /*#__PURE__*/function () {
28134
28134
  break;
28135
28135
  }
28136
28136
  _context4.next = 3;
28137
- return Promise.resolve().then(function () { return require('./DoorPlanner-d413201e.js'); });
28137
+ return Promise.resolve().then(function () { return require('./DoorPlanner-3a199423.js'); });
28138
28138
  case 3:
28139
28139
  _yield$import = _context4.sent;
28140
28140
  DoorPlanner = _yield$import["default"];
@@ -30775,6 +30775,34 @@ var DivaProductHandler = /*#__PURE__*/function () {
30775
30775
  }
30776
30776
  return updateProducts;
30777
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
+ }
30778
30806
  }]);
30779
30807
  }();
30780
30808
  var productHandlerInstance = new DivaProductHandler();
@@ -34792,7 +34820,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34792
34820
  break;
34793
34821
  case 3:
34794
34822
  _context12.next = 5;
34795
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-dda11a4f.js'); });
34823
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-2ea37e1d.js'); });
34796
34824
  case 5:
34797
34825
  _yield$import = _context12.sent;
34798
34826
  PfisterWWSHandler = _yield$import["default"];
@@ -34800,7 +34828,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34800
34828
  return _context12.abrupt("break", 27);
34801
34829
  case 9:
34802
34830
  _context12.next = 11;
34803
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-f836a820.js'); });
34831
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-6607e52f.js'); });
34804
34832
  case 11:
34805
34833
  _yield$import2 = _context12.sent;
34806
34834
  LiviqueWWSHandler = _yield$import2["default"];
@@ -34808,7 +34836,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34808
34836
  return _context12.abrupt("break", 27);
34809
34837
  case 15:
34810
34838
  _context12.next = 17;
34811
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-c93a6fdb.js'); });
34839
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-03648231.js'); });
34812
34840
  case 17:
34813
34841
  _yield$import3 = _context12.sent;
34814
34842
  SeriousWWSHandler = _yield$import3["default"];
@@ -34816,7 +34844,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34816
34844
  return _context12.abrupt("break", 27);
34817
34845
  case 21:
34818
34846
  _context12.next = 23;
34819
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-d46d5952.js'); });
34847
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-62bc3cc6.js'); });
34820
34848
  case 23:
34821
34849
  _yield$import4 = _context12.sent;
34822
34850
  StandardWWSHandler = _yield$import4["default"];
@@ -36206,7 +36234,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36206
36234
  while (1) switch (_context3.prev = _context3.next) {
36207
36235
  case 0:
36208
36236
  _context3.next = 2;
36209
- return Promise.resolve().then(function () { return require('./Host3DSignalR-32992efe.js'); });
36237
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-c52991a0.js'); });
36210
36238
  case 2:
36211
36239
  _yield$import = _context3.sent;
36212
36240
  Host3DSignalR = _yield$import["default"];
@@ -37758,7 +37786,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37758
37786
  break;
37759
37787
  case 8:
37760
37788
  _context4.next = 10;
37761
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-ea3f2bef.js'); });
37789
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-eb45e763.js'); });
37762
37790
  case 10:
37763
37791
  _yield$import = _context4.sent;
37764
37792
  DivaStandardPlanner = _yield$import["default"];
@@ -37769,7 +37797,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
37769
37797
  return _context4.abrupt("break", 21);
37770
37798
  case 15:
37771
37799
  _context4.next = 17;
37772
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-b7e55e06.js'); });
37800
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-1c78ef85.js'); });
37773
37801
  case 17:
37774
37802
  _yield$import2 = _context4.sent;
37775
37803
  DivaBoxPlanner = _yield$import2["default"];
@@ -40453,46 +40481,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40453
40481
  _this2 = this,
40454
40482
  _this$actions30,
40455
40483
  _this$i18n14;
40456
- 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;
40484
+ var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
40457
40485
  return _regeneratorRuntime__default["default"].wrap(function _callee25$(_context25) {
40458
40486
  while (1) switch (_context25.prev = _context25.next) {
40459
40487
  case 0:
40460
40488
  returnTo = this.getReturnTo(event);
40461
40489
  finalEvent = event;
40462
40490
  if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
40463
- _context25.next = 14;
40491
+ _context25.next = 16;
40464
40492
  break;
40465
40493
  }
40466
40494
  product = undefined;
40467
40495
  if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
40468
- _context25.next = 8;
40496
+ _context25.next = 10;
40469
40497
  break;
40470
40498
  }
40471
- _context25.next = 7;
40472
- return this.api.getDataCache(this.api.getCatalogProductUrl(this.actSet().getCatalogCodex()), undefined, undefined, 'catalog');
40473
- case 7:
40474
- _context25.sent;
40499
+ url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
40500
+ _context25.next = 8;
40501
+ return this.api.getDataCache(url, url, undefined, 'catalog');
40475
40502
  case 8:
40476
- _context25.next = 10;
40477
- return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40503
+ _result = _context25.sent;
40504
+ product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
40478
40505
  case 10:
40506
+ _context25.next = 12;
40507
+ return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
40508
+ case 12:
40479
40509
  finalEvent = _context25.sent;
40480
40510
  if (finalEvent) {
40481
- _context25.next = 13;
40511
+ _context25.next = 15;
40482
40512
  break;
40483
40513
  }
40484
40514
  return _context25.abrupt("return", 'canceled');
40485
- case 13:
40515
+ case 15:
40486
40516
  returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
40487
- case 14:
40517
+ case 16:
40488
40518
  (_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);
40489
- _context25.next = 17;
40519
+ _context25.next = 19;
40490
40520
  return this.saveToBasket(finalEvent, repairOnly, force);
40491
- case 17:
40521
+ case 19:
40492
40522
  result = _context25.sent;
40493
40523
  (_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);
40494
40524
  if (!(result === 'canceled')) {
40495
- _context25.next = 23;
40525
+ _context25.next = 25;
40496
40526
  break;
40497
40527
  }
40498
40528
  LOG$1.error(new DivaUtils.DivaError('failed to save Basket'));
@@ -40501,11 +40531,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40501
40531
  accept: true
40502
40532
  });
40503
40533
  return _context25.abrupt("return", result);
40504
- case 23:
40534
+ case 25:
40505
40535
  _context25.t0 = returnTo;
40506
- _context25.next = _context25.t0 === 'OPEN_PDF' ? 26 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 28 : 29;
40536
+ _context25.next = _context25.t0 === 'OPEN_PDF' ? 28 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 30 : 31;
40507
40537
  break;
40508
- case 26:
40538
+ case 28:
40509
40539
  if (!this.getBasket().PDFDocumentURL) {
40510
40540
  LOG$1.error(new DivaUtils.DivaError('PDF url is missing in basket', {
40511
40541
  code: 'WC_0010'
@@ -40523,22 +40553,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40523
40553
  }
40524
40554
  });
40525
40555
  }
40526
- return _context25.abrupt("break", 29);
40527
- case 28:
40556
+ return _context25.abrupt("break", 31);
40557
+ case 30:
40528
40558
  (_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
40529
40559
  text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
40530
40560
  accept: true
40531
40561
  });
40532
- case 29:
40562
+ case 31:
40533
40563
  if (!(result == 'noArticleToSave')) {
40534
- _context25.next = 32;
40564
+ _context25.next = 34;
40535
40565
  break;
40536
40566
  }
40537
40567
  (_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
40538
40568
  return _context25.abrupt("return", 'canceled');
40539
- case 32:
40569
+ case 34:
40540
40570
  return _context25.abrupt("return", result);
40541
- case 33:
40571
+ case 35:
40542
40572
  case "end":
40543
40573
  return _context25.stop();
40544
40574
  }
@@ -40752,8 +40782,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40752
40782
 
40753
40783
  //if planner is hidden by config but nothing is planned initially
40754
40784
  if (plannerType === 'NONE') {
40755
- var _this$plannerConfig$a7, _this$actSet9;
40756
- 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)) {
40785
+ var _this$plannerConfig$a7, _this$actSet10;
40786
+ 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)) {
40757
40787
  plannerType = 'PLANNER';
40758
40788
  }
40759
40789
  }
@@ -40793,38 +40823,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40793
40823
  }, {
40794
40824
  key: "getCurCatalogCodex",
40795
40825
  value: function getCurCatalogCodex() {
40796
- var _this$actSet10;
40797
- return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
40826
+ var _this$actSet11;
40827
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogCodex();
40798
40828
  }
40799
40829
  }, {
40800
40830
  key: "getCurCatalogName",
40801
40831
  value: function getCurCatalogName() {
40802
- var _this$actSet11;
40803
- return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
40832
+ var _this$actSet12;
40833
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogName();
40804
40834
  }
40805
40835
  }, {
40806
40836
  key: "getCurAccountName",
40807
40837
  value: function getCurAccountName() {
40808
- var _this$actSet12;
40809
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
40838
+ var _this$actSet13;
40839
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getAccountName();
40810
40840
  }
40811
40841
  }, {
40812
40842
  key: "getCurSupplierGuid",
40813
40843
  value: function getCurSupplierGuid() {
40814
- var _this$actSet13;
40815
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
40844
+ var _this$actSet14;
40845
+ return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSupplierGuid();
40816
40846
  }
40817
40847
  }, {
40818
40848
  key: "getCurSetPrice",
40819
40849
  value: function getCurSetPrice() {
40820
- var _this$actSet$getSetPr, _this$actSet14;
40821
- 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;
40850
+ var _this$actSet$getSetPr, _this$actSet15;
40851
+ 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;
40822
40852
  }
40823
40853
  }, {
40824
40854
  key: "getCurImageMode",
40825
40855
  value: function getCurImageMode() {
40826
- var _this$actSet15;
40827
- 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';
40856
+ var _this$actSet16;
40857
+ 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';
40828
40858
  }
40829
40859
  }, {
40830
40860
  key: "getViewConfig",
@@ -40855,65 +40885,65 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40855
40885
  }, {
40856
40886
  key: "doShow3DDimensionLines",
40857
40887
  value: function doShow3DDimensionLines() {
40858
- var _this$actSet16;
40859
- 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;
40888
+ var _this$actSet17;
40889
+ 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;
40860
40890
  }
40861
40891
  }, {
40862
40892
  key: "hidePlannerUiIcons",
40863
40893
  value: function hidePlannerUiIcons() {
40864
- var _this$actSet17;
40865
- 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;
40894
+ var _this$actSet18;
40895
+ 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;
40866
40896
  }
40867
40897
  }, {
40868
40898
  key: "doShowPlannerReplaceMode",
40869
40899
  value: function doShowPlannerReplaceMode() {
40870
- var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40871
- var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
40900
+ var _this$actSet19, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
40901
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40872
40902
  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;
40873
40903
  }
40874
40904
  }, {
40875
40905
  key: "doPlannerReplaceAutoSwitch",
40876
40906
  value: function doPlannerReplaceAutoSwitch() {
40877
- var _this$actSet19, _this$api$getViewConf3;
40878
- var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
40907
+ var _this$actSet20, _this$api$getViewConf3;
40908
+ var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
40879
40909
  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);
40880
40910
  }
40881
40911
  }, {
40882
40912
  key: "getHidePlanner",
40883
40913
  value: function getHidePlanner() {
40884
- var _this$actSet20;
40885
- return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
40914
+ var _this$actSet21;
40915
+ return this.api.getHidePlanner() || !!((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.useBoxPlanner);
40886
40916
  }
40887
40917
  }, {
40888
40918
  key: "getAllowRTV",
40889
40919
  value: function getAllowRTV() {
40890
- var _this$actSet21, _this$actSet22;
40920
+ var _this$actSet22, _this$actSet23;
40891
40921
  if (this.getEnableUnityRtvKombi()) return false;
40892
40922
  if (this.api.forceShowRTV()) return true;
40893
- if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
40894
- if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
40923
+ if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
40924
+ if (this.api.getDoShowRTV() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40895
40925
  return false;
40896
40926
  }
40897
40927
  }, {
40898
40928
  key: "geAllowQRCodeAR",
40899
40929
  value: function geAllowQRCodeAR() {
40900
- var _this$actSet23;
40901
- if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
40930
+ var _this$actSet24;
40931
+ if (this.api.getDoShowAR() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
40902
40932
  return false;
40903
40933
  }
40904
40934
  }, {
40905
40935
  key: "getEnableUnityRtvKombi",
40906
40936
  value: function getEnableUnityRtvKombi() {
40907
- var _this$actSet24, _this$actSet25;
40937
+ var _this$actSet25, _this$actSet26;
40908
40938
  // if force rtv disable unity kombi - biohort
40909
- if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
40910
- return ((_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40939
+ if ((_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaForceRTV) return false;
40940
+ return ((_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.divaArReady) == true && this.api.getEnableRTVUnityKombi();
40911
40941
  }
40912
40942
  }, {
40913
40943
  key: "getShelfPlannerRTV",
40914
40944
  value: function getShelfPlannerRTV() {
40915
- var _this$actSet26;
40916
- return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData.useShelfPlannerRTV;
40945
+ var _this$actSet27;
40946
+ return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
40917
40947
  }
40918
40948
  }, {
40919
40949
  key: "getBasketData",
@@ -40954,8 +40984,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40954
40984
  }, {
40955
40985
  key: "getCatalogData",
40956
40986
  value: function getCatalogData() {
40957
- var _this$actSet27;
40958
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData;
40987
+ var _this$actSet28;
40988
+ return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
40959
40989
  }
40960
40990
  }, {
40961
40991
  key: "ReturnTo",
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-6e62b4f0.js');
5
+ var index = require('./index-e86ab943.js');
6
6
  require('@babel/runtime/helpers/asyncToGenerator');
7
7
  require('@babel/runtime/helpers/classCallCheck');
8
8
  require('@babel/runtime/helpers/createClass');
@@ -3,10 +3,10 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { V as Vector3, B as BoundingBox } from './index-06932812.js';
6
+ import { V as Vector3, B as BoundingBox } from './index-84339e2f.js';
7
7
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
- import { d as dockingPointHandlerInst, P as PlannerElementData, h as handler2D } from './PlannerHandler2D-d4b88e85.js';
9
+ import { d as dockingPointHandlerInst, P as PlannerElementData, h as handler2D } from './PlannerHandler2D-ad96ee8d.js';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
11
11
  import '@babel/runtime/helpers/slicedToArray';
12
12
  import 'axios';
@@ -3,8 +3,8 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { V as Vector3, c as Vector2, B as BoundingBox } from './index-06932812.js';
7
- import { d as dockingPointHandlerInst, h as handler2D, P as PlannerElementData } from './PlannerHandler2D-d4b88e85.js';
6
+ import { V as Vector3, c as Vector2, B as BoundingBox } from './index-84339e2f.js';
7
+ import { d as dockingPointHandlerInst, h as handler2D, P as PlannerElementData } from './PlannerHandler2D-ad96ee8d.js';
8
8
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
9
9
  import '@babel/runtime/helpers/objectWithoutProperties';
10
10
  import '@babel/runtime/helpers/slicedToArray';
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import './index-06932812.js';
4
+ import './index-84339e2f.js';
5
5
  import DivaUtils from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/asyncToGenerator';
7
7
  import '@babel/runtime/regenerator';