@crystaldesign/web-planner-logic 24.11.0-rc.5 → 24.12.0-beta.2

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 (31) hide show
  1. package/build/cjs/{DivaBoxPlanner-92d6249f.js → DivaBoxPlanner-c59ee416.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-f087a60f.js → DivaStandardPlanner-e0c04f0c.js} +2 -2
  3. package/build/cjs/{DoorPlanner-a4ca5951.js → DoorPlanner-2b3e1289.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-a9adc075.js → Host3DSignalR-22e2b075.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-316cece4.js → LiviqueWWSHandler-22b25127.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-6e08146b.js → PfisterWWSHandler-cb1313d4.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-2d461e53.js → PlannerHandler2D-b8f77cca.js} +1 -1
  8. package/build/cjs/{ProductBasketHandler-8e36ff91.js → ProductBasketHandler-2e320139.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-04124f62.js → SeriousBasketHandler-0c288b72.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-2f53a82d.js → ShelfPlanner-e68dfee7.js} +1 -1
  11. package/build/cjs/{StandardWWSHandler-fba7941f.js → StandardWWSHandler-ac69df0a.js} +1 -1
  12. package/build/cjs/{index-3d16dede.js → index-696ee323.js} +158 -156
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-8f25edcf.js → DivaBoxPlanner-de566659.js} +2 -2
  15. package/build/esm/{DivaStandardPlanner-62388b41.js → DivaStandardPlanner-2154eb2b.js} +2 -2
  16. package/build/esm/{DoorPlanner-38549ddd.js → DoorPlanner-d1ab5366.js} +1 -1
  17. package/build/esm/{Host3DSignalR-0e4a7213.js → Host3DSignalR-0538553d.js} +1 -1
  18. package/build/esm/{LiviqueWWSHandler-2e468114.js → LiviqueWWSHandler-89e77291.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-03b40f37.js → PfisterWWSHandler-8ca6de55.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-16671325.js → PlannerHandler2D-66c2e087.js} +1 -1
  21. package/build/esm/{ProductBasketHandler-0890fc13.js → ProductBasketHandler-68a38a6d.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-3d6ac698.js → SeriousBasketHandler-3edc7e16.js} +1 -1
  23. package/build/esm/{ShelfPlanner-bf576f58.js → ShelfPlanner-e1e803b9.js} +1 -1
  24. package/build/esm/{StandardWWSHandler-223a1636.js → StandardWWSHandler-b84368c1.js} +1 -1
  25. package/build/esm/{index-85746c10.js → index-2bc7b211.js} +158 -156
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -1
  28. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  30. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  31. 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-3d16dede.js');
8
+ var index = require('./index-696ee323.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
11
- var PlannerHandler2D = require('./PlannerHandler2D-2d461e53.js');
11
+ var PlannerHandler2D = require('./PlannerHandler2D-b8f77cca.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-3d16dede.js');
9
- var PlannerHandler2D = require('./PlannerHandler2D-2d461e53.js');
8
+ var index = require('./index-696ee323.js');
9
+ var PlannerHandler2D = require('./PlannerHandler2D-b8f77cca.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-3d16dede.js');
6
+ require('./index-696ee323.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-3d16dede.js');
8
+ var index = require('./index-696ee323.js');
9
9
  var DivaUtils = require('@crystaldesign/diva-utils');
10
10
  var signalR = require('@microsoft/signalr');
11
11
  var io = require('socket.io-client');
@@ -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-3d16dede.js');
5
+ require('./index-696ee323.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-3d16dede.js');
5
+ require('./index-696ee323.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-3d16dede.js');
6
+ var index = require('./index-696ee323.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');
@@ -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
- var index = require('./index-3d16dede.js');
5
+ var index = require('./index-696ee323.js');
6
6
  require('@babel/runtime/helpers/asyncToGenerator');
7
7
  require('@babel/runtime/helpers/defineProperty');
8
8
  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-3d16dede.js');
6
+ var index = require('./index-696ee323.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-3d16dede.js');
9
+ var index = require('./index-696ee323.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-3d16dede.js');
5
+ require('./index-696ee323.js');
6
6
  require('@babel/runtime/helpers/asyncToGenerator');
7
7
  require('@babel/runtime/helpers/defineProperty');
8
8
  require('@babel/runtime/regenerator');
@@ -22574,7 +22574,6 @@ var DivaArticle = /*#__PURE__*/function () {
22574
22574
  }, {
22575
22575
  key: "updateIDMSpecificFeature",
22576
22576
  value: function updateIDMSpecificFeature(myArtOPS) {
22577
- if (!this.parentHasSameOption(myArtOPS.optionCodex)) return;
22578
22577
  if (myArtOPS.option.idmVariantenArt == 90) {
22579
22578
  //R (Anschlusstyp R) - AVR
22580
22579
  var newAVRFilter = [],
@@ -23560,7 +23559,7 @@ var DivaArticle = /*#__PURE__*/function () {
23560
23559
  break;
23561
23560
  }
23562
23561
  _context.next = 4;
23563
- return Promise.resolve().then(function () { return require('./ShelfPlanner-2f53a82d.js'); });
23562
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-e68dfee7.js'); });
23564
23563
  case 4:
23565
23564
  _yield$import = _context.sent;
23566
23565
  ShelfPlanner = _yield$import["default"];
@@ -23624,6 +23623,7 @@ var DivaArticle = /*#__PURE__*/function () {
23624
23623
  calcUnitPrice = 0,
23625
23624
  calcUnit2Price = 0,
23626
23625
  firstUnit2Param = 0,
23626
+ secondUnit2Param = 0,
23627
23627
  idmPriceMeasureFactor = 1;
23628
23628
  //CalcPreise berechnen
23629
23629
  for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
@@ -23657,70 +23657,75 @@ var DivaArticle = /*#__PURE__*/function () {
23657
23657
  if (!tmpOPT.useMaxPriceOfGroup) {
23658
23658
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23659
23659
  }
23660
- switch (pUnit) {
23661
- case 'm':
23662
- calcUnitPrice += myArtOPS.calcPrice / 100;
23663
- break;
23664
- case 'cm':
23665
- calcUnitPrice += myArtOPS.calcPrice;
23666
- break;
23667
- case 'm2':
23668
- calcUnit2Price += myArtOPS.calcPrice / 10000;
23669
- break;
23670
- case 'cm2':
23671
- calcUnit2Price += myArtOPS.calcPrice;
23672
- break;
23673
- default:
23674
- if (myArtOPS.isPercentage) {
23675
- //hier myArtOPS.TargetOption auswerten
23676
- if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23677
- myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23678
- }
23679
- } else {
23680
- myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
23681
- }
23682
- break;
23683
- }
23684
- if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
23685
- var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23686
- if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23687
- if (calcUnitPrice != 0) {
23688
- var quantity = 0;
23689
- if (OP == 'OPTUMFANG') {
23690
- mUnit = 'cm';
23691
- quantity = this.calcWidth * 2 + this.calcDepth * 2;
23692
- } else if (OP == 'OPTUMFANG_KREIS') {
23693
- mUnit = 'cm';
23694
- quantity = this.calcWidth * Math.PI;
23660
+ if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
23661
+ var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
23662
+ myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
23663
+ } else {
23664
+ switch (pUnit) {
23665
+ case 'm':
23666
+ calcUnitPrice += myArtOPS.calcPrice / 100;
23667
+ break;
23668
+ case 'cm':
23669
+ calcUnitPrice += myArtOPS.calcPrice;
23670
+ break;
23671
+ case 'm2':
23672
+ calcUnit2Price += myArtOPS.calcPrice / 10000;
23673
+ break;
23674
+ case 'cm2':
23675
+ calcUnit2Price += myArtOPS.calcPrice;
23676
+ break;
23677
+ default:
23678
+ if (myArtOPS.isPercentage) {
23679
+ //hier myArtOPS.TargetOption auswerten
23680
+ if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23681
+ myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23682
+ }
23695
23683
  } else {
23696
- quantity = freeTextMeasure;
23684
+ myArtOPS.usedCalcPrice = DivaUtils__default["default"].decimalAdjust('round', myArtOPS.calcPrice, digits);
23697
23685
  }
23698
- if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23699
- } else if (calcUnit2Price != 0) {
23700
- //for diamter option
23701
- if (myArtOPS.option.diameter) {
23702
- myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23703
- } else {
23704
- if (firstUnit2Param == 0) {
23705
- firstUnit2Param = freeTextMeasure;
23706
- if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23686
+ break;
23687
+ }
23688
+ if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23689
+ var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23690
+ if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
23691
+ if (calcUnitPrice != 0) {
23692
+ var quantity = 0;
23693
+ if (OP == 'OPTUMFANG') {
23694
+ mUnit = 'cm';
23695
+ quantity = this.calcWidth * 2 + this.calcDepth * 2;
23696
+ } else if (OP == 'OPTUMFANG_KREIS') {
23697
+ mUnit = 'cm';
23698
+ quantity = this.calcWidth * Math.PI;
23699
+ } else {
23700
+ quantity = freeTextMeasure;
23701
+ }
23702
+ if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23703
+ } else if (calcUnit2Price != 0) {
23704
+ //for diamter option
23705
+ if (myArtOPS.option.diameter) {
23706
+ myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23707
23707
  } else {
23708
- var secondUnit2Param = freeTextMeasure;
23709
- if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23710
- myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23708
+ if (firstUnit2Param == 0) {
23709
+ firstUnit2Param = freeTextMeasure;
23710
+ if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23711
+ } else {
23712
+ secondUnit2Param = freeTextMeasure;
23713
+ if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23714
+ myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23715
+ }
23711
23716
  }
23712
23717
  }
23713
23718
  }
23714
23719
  }
23715
- }
23716
- if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23717
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23718
- }
23719
- if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23720
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23721
- }
23722
- if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23723
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23720
+ if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23721
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23722
+ }
23723
+ if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23724
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23725
+ }
23726
+ if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23727
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23728
+ }
23724
23729
  }
23725
23730
  }
23726
23731
  //jetzt nochmal prozentuelle Preise mit TargetOption berechnen
@@ -23819,10 +23824,19 @@ var DivaArticle = /*#__PURE__*/function () {
23819
23824
  this.article.price = articleUsedCalcPrice;
23820
23825
  }
23821
23826
  }, {
23822
- key: "parentHasSameOption",
23823
- value: function parentHasSameOption(opt) {
23824
- if (!this.partListParentArticle) return true;
23825
- return !!this.partListParentArticle.articleOptionStates[opt] || this.partlistArticleVisibleInTree;
23827
+ key: "getCalcPerUnit",
23828
+ value: function getCalcPerUnit(unit, calcPrice) {
23829
+ switch (unit) {
23830
+ case 'm':
23831
+ return calcPrice / 100;
23832
+ case 'cm':
23833
+ return calcPrice;
23834
+ case 'm2':
23835
+ return calcPrice / 10000;
23836
+ case 'cm2':
23837
+ return calcPrice;
23838
+ }
23839
+ return 0;
23826
23840
  }
23827
23841
  }, {
23828
23842
  key: "getOptionPrice",
@@ -24974,89 +24988,72 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24974
24988
  }
24975
24989
  }
24976
24990
  }
24977
- if (Object.keys(article.articleOptionStates).length === 0) {
24978
- _context8.next = 19;
24979
- break;
24980
- }
24981
- //infos eines Basisconfigurats initialisieren
24982
- if (!(Object.keys(variantValues).length === 0)) {
24983
- //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
24984
- for (attr in variantValues) {
24985
- foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
24986
- if (foundItem.opt) {
24987
- if (foundItem.opv instanceof ArticleOptionValueData) {
24988
- freeText = variantValues[attr + '_val'];
24989
- article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
24990
- if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
24991
- //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
24992
- article.checkDefaultGlobalOpt(_defineProperty__default["default"]({}, foundItem.opt.codex, foundItem.opv.codex), true);
24991
+ if (!(Object.keys(article.articleOptionStates).length === 0)) {
24992
+ //infos eines Basisconfigurats initialisieren
24993
+ if (!(Object.keys(variantValues).length === 0)) {
24994
+ //Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
24995
+ for (attr in variantValues) {
24996
+ foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
24997
+ if (foundItem.opt) {
24998
+ if (foundItem.opv instanceof ArticleOptionValueData) {
24999
+ freeText = variantValues[attr + '_val'];
25000
+ article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
25001
+ if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
25002
+ //falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
25003
+ article.checkDefaultGlobalOpt(_defineProperty__default["default"]({}, foundItem.opt.codex, foundItem.opv.codex), true);
25004
+ }
24993
25005
  }
24994
25006
  }
24995
25007
  }
24996
25008
  }
24997
- }
24998
25009
 
24999
- //defaultValues for FreeText
25000
- if (!article.articleOptionStates) {
25001
- _context8.next = 19;
25002
- break;
25003
- }
25004
- _context8.t0 = _regeneratorRuntime__default["default"].keys(article.articleOptionStates);
25005
- case 7:
25006
- if ((_context8.t1 = _context8.t0()).done) {
25007
- _context8.next = 19;
25008
- break;
25009
- }
25010
- _key = _context8.t1.value;
25011
- myArtOPS = article.articleOptionStates[_key];
25012
- if (!variantValues[_key + '_val']) {
25013
- _context8.next = 12;
25014
- break;
25015
- }
25016
- return _context8.abrupt("continue", 7);
25017
- case 12:
25018
- value = undefined;
25019
- optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
25020
- if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25021
- for (i = 0; i < variantItems.length && value == undefined; i++) {
25022
- variantItem = variantItems[i];
25023
- if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25024
- if (variantItem.MeasureValue) {
25025
- //measureValue from new Bakset
25026
- value = variantItem.MeasureValue;
25027
- optionValueCodex = 'OPV' + variantItem.OPV;
25028
- } else {
25029
- //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25030
- possibleValues = variantItem.OPVName.split(': ');
25031
- for (j = 0; j < possibleValues.length && value == undefined; j++) {
25032
- possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25033
- if (!isNaN(Number(possibleValue))) {
25034
- value = possibleValue;
25010
+ //defaultValues for FreeText
25011
+ if (article.articleOptionStates) {
25012
+ for (_key in article.articleOptionStates) {
25013
+ myArtOPS = article.articleOptionStates[_key];
25014
+ value = undefined;
25015
+ optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
25016
+ if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
25017
+ for (i = 0; i < variantItems.length && value == undefined; i++) {
25018
+ variantItem = variantItems[i];
25019
+ if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
25020
+ if (variantItem.MeasureValue) {
25021
+ //measureValue from new Bakset
25022
+ value = variantItem.MeasureValue;
25023
+ optionValueCodex = 'OPV' + variantItem.OPV;
25024
+ } else {
25025
+ //measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
25026
+ possibleValues = variantItem.OPVName.split(': ');
25027
+ for (j = 0; j < possibleValues.length && value == undefined; j++) {
25028
+ possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
25029
+ if (!isNaN(Number(possibleValue))) {
25030
+ value = possibleValue;
25031
+ }
25032
+ }
25033
+ }
25034
+ }
25035
+ }
25036
+ } else if (variantItems && myArtOPS.isFreeText) {
25037
+ for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25038
+ _variantItem = variantItems[_i2];
25039
+ if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25040
+ value = _variantItem.FreeText;
25041
+ optionValueCodex = 'OPV' + _variantItem.OPV;
25035
25042
  }
25036
25043
  }
25037
25044
  }
25038
- }
25039
- }
25040
- } else if (variantItems && myArtOPS.isFreeText) {
25041
- for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
25042
- _variantItem = variantItems[_i2];
25043
- if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
25044
- value = _variantItem.FreeText;
25045
- optionValueCodex = 'OPV' + _variantItem.OPV;
25045
+ if (value == undefined) {
25046
+ val = myArtOPS.option.freetextDefaultValue;
25047
+ if (val) {
25048
+ value = val;
25049
+ myArtOPS.freeText = val;
25050
+ }
25051
+ }
25052
+ if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25046
25053
  }
25047
25054
  }
25048
25055
  }
25049
- if (value == undefined) {
25050
- val = myArtOPS.option.freetextDefaultValue;
25051
- if (val) {
25052
- value = val;
25053
- myArtOPS.freeText = val;
25054
- }
25055
- }
25056
- if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
25057
- _context8.next = 7;
25058
- break;
25059
- case 19:
25056
+ case 4:
25060
25057
  case "end":
25061
25058
  return _context8.stop();
25062
25059
  }
@@ -28080,7 +28077,7 @@ var DivaSet = /*#__PURE__*/function () {
28080
28077
  break;
28081
28078
  }
28082
28079
  _context4.next = 3;
28083
- return Promise.resolve().then(function () { return require('./DoorPlanner-a4ca5951.js'); });
28080
+ return Promise.resolve().then(function () { return require('./DoorPlanner-2b3e1289.js'); });
28084
28081
  case 3:
28085
28082
  _yield$import = _context4.sent;
28086
28083
  DoorPlanner = _yield$import["default"];
@@ -33101,33 +33098,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
33101
33098
  key: "variantsEvaluator",
33102
33099
  value: (function () {
33103
33100
  var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
33104
- var _set$WebConfig, _set$CatalogData$getO, _set$ViewConfig, _configItems$;
33105
- var calcVariantsForPricePreview, checkForProductsInStock, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33101
+ var _set$WebConfig, _set$ViewConfig, _configItems$;
33102
+ var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
33106
33103
  return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
33107
33104
  while (1) switch (_context25.prev = _context25.next) {
33108
33105
  case 0:
33106
+ opt = set.CatalogData.getOption(configItems[0].op);
33107
+ if (opt) {
33108
+ _context25.next = 3;
33109
+ break;
33110
+ }
33111
+ return _context25.abrupt("return", configItems);
33112
+ case 3:
33113
+ checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
33109
33114
  calcVariantsForPricePreview = false;
33110
- checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !((_set$CatalogData$getO = set.CatalogData.getOption(configItems[0].op)) !== null && _set$CatalogData$getO !== void 0 && _set$CatalogData$getO.isDescribingState);
33111
33115
  previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
33112
33116
  if (previewType) {
33113
- calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
33114
- if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
33115
- calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
33116
- }
33117
+ 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));
33117
33118
  }
33118
33119
  if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
33119
33120
  if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
33120
33121
  calcVariantsForPricePreview = false;
33121
33122
  }
33122
33123
  if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
33123
- _context25.next = 16;
33124
+ _context25.next = 19;
33124
33125
  break;
33125
33126
  }
33126
33127
  targetArticles = set.configTree.getTargetArticles(configStepKey);
33127
33128
  startTime = new Date();
33128
- _context25.next = 11;
33129
+ _context25.next = 14;
33129
33130
  return this.calcVariants(set, configItems, targetArticles);
33130
- case 11:
33131
+ case 14:
33131
33132
  variants = _context25.sent;
33132
33133
  endTime = new Date();
33133
33134
  if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
@@ -33137,9 +33138,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33137
33138
  if (checkForProductsInStock) {
33138
33139
  configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
33139
33140
  }
33140
- case 16:
33141
+ case 19:
33141
33142
  return _context25.abrupt("return", configItems);
33142
- case 17:
33143
+ case 20:
33143
33144
  case "end":
33144
33145
  return _context25.stop();
33145
33146
  }
@@ -33407,6 +33408,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33407
33408
  value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
33408
33409
  var _set$CatalogData$noti;
33409
33410
  if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
33411
+ console.log('checking');
33410
33412
  var allArticles = set.getDivaArticles(true);
33411
33413
  var articles = {};
33412
33414
  for (var i = 0; i < targetArticles.length; i++) {
@@ -35296,7 +35298,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35296
35298
  break;
35297
35299
  case 3:
35298
35300
  _context13.next = 5;
35299
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-6e08146b.js'); });
35301
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-cb1313d4.js'); });
35300
35302
  case 5:
35301
35303
  _yield$import = _context13.sent;
35302
35304
  PfisterWWSHandler = _yield$import["default"];
@@ -35304,7 +35306,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35304
35306
  return _context13.abrupt("break", 33);
35305
35307
  case 9:
35306
35308
  _context13.next = 11;
35307
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-316cece4.js'); });
35309
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-22b25127.js'); });
35308
35310
  case 11:
35309
35311
  _yield$import2 = _context13.sent;
35310
35312
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35312,7 +35314,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35312
35314
  return _context13.abrupt("break", 33);
35313
35315
  case 15:
35314
35316
  _context13.next = 17;
35315
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-04124f62.js'); });
35317
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-0c288b72.js'); });
35316
35318
  case 17:
35317
35319
  _yield$import3 = _context13.sent;
35318
35320
  SeriousWWSHandler = _yield$import3["default"];
@@ -35320,7 +35322,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35320
35322
  return _context13.abrupt("break", 33);
35321
35323
  case 21:
35322
35324
  _context13.next = 23;
35323
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-8e36ff91.js'); });
35325
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-2e320139.js'); });
35324
35326
  case 23:
35325
35327
  _yield$import4 = _context13.sent;
35326
35328
  ProductWWSHandler = _yield$import4["default"];
@@ -35328,7 +35330,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35328
35330
  return _context13.abrupt("break", 33);
35329
35331
  case 27:
35330
35332
  _context13.next = 29;
35331
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-fba7941f.js'); });
35333
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-ac69df0a.js'); });
35332
35334
  case 29:
35333
35335
  _yield$import5 = _context13.sent;
35334
35336
  StandardWWSHandler = _yield$import5["default"];
@@ -36713,7 +36715,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36713
36715
  while (1) switch (_context3.prev = _context3.next) {
36714
36716
  case 0:
36715
36717
  _context3.next = 2;
36716
- return Promise.resolve().then(function () { return require('./Host3DSignalR-a9adc075.js'); });
36718
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-22e2b075.js'); });
36717
36719
  case 2:
36718
36720
  _yield$import = _context3.sent;
36719
36721
  Host3DSignalR = _yield$import["default"];
@@ -38262,7 +38264,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38262
38264
  break;
38263
38265
  case 8:
38264
38266
  _context4.next = 10;
38265
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-f087a60f.js'); });
38267
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-e0c04f0c.js'); });
38266
38268
  case 10:
38267
38269
  _yield$import = _context4.sent;
38268
38270
  DivaStandardPlanner = _yield$import["default"];
@@ -38273,7 +38275,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38273
38275
  return _context4.abrupt("break", 21);
38274
38276
  case 15:
38275
38277
  _context4.next = 17;
38276
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-92d6249f.js'); });
38278
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-c59ee416.js'); });
38277
38279
  case 17:
38278
38280
  _yield$import2 = _context4.sent;
38279
38281
  DivaBoxPlanner = _yield$import2["default"];
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-3d16dede.js');
5
+ var index = require('./index-696ee323.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-85746c10.js';
6
+ import { V as Vector3, B as BoundingBox } from './index-2bc7b211.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-16671325.js';
9
+ import { d as dockingPointHandlerInst, P as PlannerElementData, h as handler2D } from './PlannerHandler2D-66c2e087.js';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
11
11
  import '@babel/runtime/helpers/slicedToArray';
12
12
  import 'axios';