@crystaldesign/web-planner-logic 26.13.0-beta.25 → 26.13.0-beta.27

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 (54) hide show
  1. package/build/cjs/{DivaBoxPlanner-cf785c8e.js → DivaBoxPlanner-6c5ae2d0.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-76758261.js → DivaStandardPlanner-7045ce9f.js} +50 -41
  3. package/build/cjs/{DoorPlanner-322b433f.js → DoorPlanner-87dc0b5f.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-720088d4.js → Host3DSignalR-33b81ac2.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-ea49263b.js → LiviqueWWSHandler-da46fa9b.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-61d7dc26.js → PfisterWWSHandler-51dfaec3.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-cd71fcd3.js → PlannerHandler2D-b0874113.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-966ca145.js → SeriousBasketHandler-a42a4a83.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-3a790d65.js → ShelfPlanner-fb32d93b.js} +125 -35
  10. package/build/cjs/{StandardWWSHandler-b565c684.js → StandardWWSHandler-8e6d457c.js} +1 -1
  11. package/build/cjs/{index-dfe2c0e3.js → index-b4ba898f.js} +240 -98
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-570bd517.js → DivaBoxPlanner-cd23c571.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-712385df.js → DivaStandardPlanner-5c0a391a.js} +50 -41
  15. package/build/esm/{DoorPlanner-3670fee0.js → DoorPlanner-059569a8.js} +1 -1
  16. package/build/esm/{Host3DSignalR-68938df9.js → Host3DSignalR-b9407002.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-2cd9654b.js → LiviqueWWSHandler-4135bbe1.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-7593c211.js → PfisterWWSHandler-d66b4d8d.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-487406e6.js → PlannerHandler2D-8527ab43.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-b13a4be4.js → SeriousBasketHandler-71988cad.js} +1 -1
  21. package/build/esm/{ShelfPlanner-8eeb52df.js → ShelfPlanner-603c60f4.js} +125 -35
  22. package/build/esm/{StandardWWSHandler-33aac025.js → StandardWWSHandler-c4076650.js} +1 -1
  23. package/build/esm/{index-0d6a39cb.js → index-f6b2e2f4.js} +240 -98
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
  26. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -0
  28. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  30. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +5 -0
  31. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  32. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +7 -0
  33. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  34. package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts +2 -0
  35. package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts.map +1 -1
  36. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +21 -0
  38. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  40. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +12 -0
  41. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts +2 -1
  43. package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts +2 -0
  45. package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts.map +1 -0
  46. package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts +2 -0
  47. package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts.map +1 -0
  48. package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts +2 -0
  49. package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts.map +1 -0
  50. package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts +2 -0
  51. package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts.map +1 -0
  52. package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts +2 -0
  53. package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts.map +1 -0
  54. package/package.json +3 -3
@@ -2536,18 +2536,27 @@ var jsonOf = function jsonOf(value) {
2536
2536
  return _typeof__default["default"](value) === 'object' ? value : undefined;
2537
2537
  };
2538
2538
 
2539
+ /** A flag '1' or '0', any other plain value its text - the legacy text the enricher renders for it. */
2540
+ var plainText = function plainText(value) {
2541
+ return typeof value === 'boolean' ? value ? '1' : '0' : String(value);
2542
+ };
2543
+ var isPlain = function isPlain(value) {
2544
+ return ['string', 'number', 'boolean'].includes(_typeof__default["default"](value));
2545
+ };
2546
+
2539
2547
  /**
2540
2548
  * The texts the basket's MetaData carries for a property the planner does not parse (`values: string[]`): a text split
2541
- * at ';' as before, a list its entries, a flag '1' or '0', a number its text, a JSON value its JSON text.
2549
+ * at ';' as before, a list of plain values its entries (a list's schema may make them numbers or flags), a flag '1' or
2550
+ * '0', a number its text, a JSON value its JSON text.
2542
2551
  */
2543
2552
  function propertyTexts(value) {
2544
2553
  if (value === undefined) return [];
2545
2554
  if (typeof value === 'string') return value.split(';');
2546
- if (typeof value === 'boolean') return [value ? '1' : '0'];
2547
- if (typeof value === 'number') return [String(value)];
2548
- if (Array.isArray(value) && value.every(function (entry) {
2549
- return typeof entry === 'string';
2550
- })) return value.map(String);
2555
+ if (isPlain(value)) return [plainText(value)];
2556
+ if (Array.isArray(value)) {
2557
+ var entries = value;
2558
+ if (entries.every(isPlain)) return entries.map(plainText);
2559
+ }
2551
2560
  return [JSON.stringify(value)];
2552
2561
  }
2553
2562
 
@@ -17311,6 +17320,12 @@ function measureInCentimeters(value, unit) {
17311
17320
  return TO_CENTIMETERS[unit](value);
17312
17321
  }
17313
17322
 
17323
+ /** A measure in centimetres in an option's unit, the inverse of measureInCentimeters (rounded to drop float noise). */
17324
+ function measureInUnit(centimeters, unit) {
17325
+ if (!unit || !Object.prototype.hasOwnProperty.call(TO_CENTIMETERS, unit)) return centimeters;
17326
+ return Math.round(centimeters / TO_CENTIMETERS[unit](1) * 1e6) / 1e6;
17327
+ }
17328
+
17314
17329
  var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
17315
17330
  var OptionValueCatalogData = /*#__PURE__*/function () {
17316
17331
  function OptionValueCatalogData(opv, catalogData) {
@@ -28519,17 +28534,17 @@ var IDMEngine = /*#__PURE__*/function () {
28519
28534
  var optionSetRef = combination.projectOptionsSetRefs.find(function (p) {
28520
28535
  return p.featureNo == Number(featureNo);
28521
28536
  });
28522
- var ref = _this4.getOptionListOfRef(optionSetRef);
28523
- if (optionSetRef && !ref) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28524
- var doUseDoc = true;
28537
+ var ref = _this4.getRowOptionListOfRef(optionSetRef);
28538
+ if (optionSetRef && ref === undefined) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28539
+ var doUseDoc = ref !== null;
28525
28540
  if (doAlsoCheckFeatureNos.length > 0) {
28526
28541
  var _loop3 = function _loop3() {
28527
28542
  var checkFeatureNo = doAlsoCheckFeatureNos[f];
28528
28543
  var ops = _this4.article.getArticleOptionState(checkFeatureNo);
28529
- var checkRefs = _this4.getOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28544
+ var checkRefs = _this4.getRowOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28530
28545
  return p.featureNo == Number(checkFeatureNo);
28531
28546
  }));
28532
- if (ops && checkRefs && ops.valCodex && !_this4.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28547
+ if (checkRefs === null || ops && checkRefs && ops.valCodex && !_this4.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28533
28548
  doUseDoc = false;
28534
28549
  return 1; // break
28535
28550
  }
@@ -28630,7 +28645,7 @@ var IDMEngine = /*#__PURE__*/function () {
28630
28645
  var possibleOPVs = ops.visibleOptionValues;
28631
28646
  //Erste Option ist immer eine Bedingung!
28632
28647
  if (p === sortedDeatureRefs.length - 1) {
28633
- for (var j = 0; j < decision.optionCombinations.length; j++) {
28648
+ var _loop5 = function _loop5() {
28634
28649
  //DecisionOptionCombination
28635
28650
  //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
28636
28651
  // z.B. bei OPT2 muss OPT1 stimmen
@@ -28639,28 +28654,33 @@ var IDMEngine = /*#__PURE__*/function () {
28639
28654
  var optionSetRef = combination.projectOptionsSetRefs.find(function (p) {
28640
28655
  return p.featureNo == Number(featureNo);
28641
28656
  });
28642
- var ref = _this5.getOptionListOfRef(optionSetRef);
28643
- if (optionSetRef && !ref) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28644
- var doUseDoc = true;
28657
+ var ref = _this5.getRowOptionListOfRef(optionSetRef);
28658
+ if (optionSetRef && ref === undefined) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28659
+ var doUseDoc = ref !== null;
28645
28660
  if (doAlsoCheckFeature.length > 0) {
28646
- var _loop5 = function _loop5() {
28661
+ var _loop6 = function _loop6() {
28647
28662
  var checkFeatureNo = doAlsoCheckFeature[f];
28648
28663
  var ops = _this5.article.getArticleOptionState(checkFeatureNo);
28649
- var checkRefs = _this5.getOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28664
+ var checkRefs = _this5.getRowOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28650
28665
  return p.featureNo == Number(checkFeatureNo);
28651
28666
  }));
28652
- if (ops && checkRefs && ops.valCodex && !_this5.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28667
+ if (checkRefs === null || ops && checkRefs && ops.valCodex && !_this5.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28653
28668
  doUseDoc = false;
28654
28669
  return 1; // break
28655
28670
  }
28656
28671
  };
28657
28672
  for (var f = 0; f < doAlsoCheckFeature.length; f++) {
28658
- if (_loop5()) break;
28673
+ if (_loop6()) break;
28659
28674
  }
28660
28675
  }
28661
28676
  if (doUseDoc && combination) {
28662
28677
  decision.activeCombination = combination.sequence;
28663
- if (ref) {
28678
+ if (ref && optionSetRef !== null && optionSetRef !== void 0 && optionSetRef.featureRefOp) {
28679
+ // FEATURE_REF_OP: exclude every value the operator matches (ne# excludes all but the compared value)
28680
+ possibleOPVs.forEach(function (opv, optionNo) {
28681
+ if (_this5.evalValueWithOperator(ref.operator, ref.options, optionNo)) invalidOptions[featureNo].set(optionNo, opv);
28682
+ });
28683
+ } else if (ref) {
28664
28684
  for (var i = 0; i < ref.options.length; i++) {
28665
28685
  var optionNo = ref.options[i];
28666
28686
  var myOPVData = possibleOPVs.get(optionNo);
@@ -28670,6 +28690,9 @@ var IDMEngine = /*#__PURE__*/function () {
28670
28690
  }
28671
28691
  }
28672
28692
  }
28693
+ };
28694
+ for (var j = 0; j < decision.optionCombinations.length; j++) {
28695
+ _loop5();
28673
28696
  }
28674
28697
  var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref3) {
28675
28698
  var _ref4 = _slicedToArray__default["default"](_ref3, 1),
@@ -28714,6 +28737,31 @@ var IDMEngine = /*#__PURE__*/function () {
28714
28737
  }]
28715
28738
  };
28716
28739
  }
28740
+
28741
+ /**
28742
+ * The option condition of a type 0/1 decision cell. A FEATURE_REF_OP cell compares against the current value of
28743
+ * another feature (read at the cell's refLevel, like evalCombi), so it resolves to a one-option list of that value.
28744
+ * @returns null when the compared feature has no value - the comparison cannot hold, so the row must not apply;
28745
+ * undefined when the cell has no condition this engine understands
28746
+ */
28747
+ }, {
28748
+ key: "getRowOptionListOfRef",
28749
+ value: function getRowOptionListOfRef(optionSetRef) {
28750
+ var _optionSetRef$refLeve, _article$getArticleOp;
28751
+ var featureRefOp = optionSetRef === null || optionSetRef === void 0 ? void 0 : optionSetRef.featureRefOp;
28752
+ if (!featureRefOp) return this.getOptionListOfRef(optionSetRef);
28753
+ var refLevel = (_optionSetRef$refLeve = optionSetRef.refLevel) !== null && _optionSetRef$refLeve !== void 0 ? _optionSetRef$refLeve : 3;
28754
+ var article = refLevel > 1 ? this.article.getRefLevelArticle(refLevel) : this.article;
28755
+ var comparedValue = (_article$getArticleOp = article.getArticleOptionState(featureRefOp.featureNo.toString())) === null || _article$getArticleOp === void 0 ? void 0 : _article$getArticleOp.valCodex;
28756
+ if (!comparedValue) return null;
28757
+ return {
28758
+ operator: featureRefOp.operator,
28759
+ options: [comparedValue],
28760
+ optionRef: [{
28761
+ optionKey: comparedValue
28762
+ }]
28763
+ };
28764
+ }
28717
28765
  }, {
28718
28766
  key: "evalValueWithOperator",
28719
28767
  value: function evalValueWithOperator(op, value, check) {
@@ -28762,7 +28810,7 @@ var IDMEngine = /*#__PURE__*/function () {
28762
28810
  var _iterator16 = _createForOfIteratorHelper$g(actions),
28763
28811
  _step16;
28764
28812
  try {
28765
- var _loop6 = function _loop6() {
28813
+ var _loop7 = function _loop7() {
28766
28814
  var _dec$disableHistory;
28767
28815
  var action = _step16.value;
28768
28816
  var dec = allDecisions.find(function (d) {
@@ -28776,7 +28824,7 @@ var IDMEngine = /*#__PURE__*/function () {
28776
28824
  (_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push(verb + ' By ' + decision.decisionNo);
28777
28825
  };
28778
28826
  for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
28779
- if (_loop6()) continue;
28827
+ if (_loop7()) continue;
28780
28828
  }
28781
28829
  } catch (err) {
28782
28830
  _iterator16.e(err);
@@ -28890,14 +28938,17 @@ var IDMEngine = /*#__PURE__*/function () {
28890
28938
  var formula = (_this$article$Catalog = this.article.CatalogData.idmFormulas) === null || _this$article$Catalog === void 0 ? void 0 : _this$article$Catalog[formulaKey];
28891
28939
  if (!formula) throw new Error('formula ' + formulaKey + ' not found in catalog but used in decision: ' + decision.decisionNo);
28892
28940
  var ops = this.article.getArticleOptionState(featureNo);
28893
- var freeText = this.evalMeasureFormula(formula);
28941
+ var result = this.evalMeasureFormula(formula);
28894
28942
  var option = ops === null || ops === void 0 ? void 0 : ops.val;
28895
28943
  var isThisWarning = function isThisWarning(error) {
28896
28944
  var _error$custom, _error$custom2;
28897
28945
  return error.code === 'WC_0020' && ((_error$custom = error.custom) === null || _error$custom === void 0 ? void 0 : _error$custom.decisionNo) === decision.decisionNo && ((_error$custom2 = error.custom) === null || _error$custom2 === void 0 ? void 0 : _error$custom2.featureNo) === featureNo;
28898
28946
  };
28899
28947
  if (option) {
28900
- this.updateArtOPV(option, featureNo, ops, freeText, freeText ? Number(freeText) : undefined);
28948
+ // the formula computes centimetres; the free text is read as text in the option's unit, like a typed value
28949
+ var measure = Number.isFinite(Number(result)) ? Number(result) : undefined;
28950
+ var freeText = measure === undefined ? undefined : String(measureInUnit(measure, ops === null || ops === void 0 ? void 0 : ops.measureUnitCode));
28951
+ this.updateArtOPV(option, featureNo, ops, freeText, measure || undefined);
28901
28952
  // an earlier convergence pass may have reported it before the feature got its option
28902
28953
  var reported = this.article.dataCreationErrors.findIndex(isThisWarning);
28903
28954
  if (reported >= 0) this.article.dataCreationErrors.splice(reported, 1);
@@ -28906,13 +28957,13 @@ var IDMEngine = /*#__PURE__*/function () {
28906
28957
  if (this.article.dataCreationErrors.some(isThisWarning)) return;
28907
28958
  this.article.pushDataCreationError({
28908
28959
  code: 'WC_0020',
28909
- message: "Formula '".concat(formulaKey, "' of decision ").concat(decision.decisionNo, " computed ").concat(freeText, ", but feature ").concat(featureNo, " has no selected value to hold it - the result is dropped (give the feature an option value)"),
28960
+ message: "Formula '".concat(formulaKey, "' of decision ").concat(decision.decisionNo, " computed ").concat(result, ", but feature ").concat(featureNo, " has no selected value to hold it - the result is dropped (give the feature an option value)"),
28910
28961
  severity: 'warning',
28911
28962
  custom: {
28912
28963
  decisionNo: decision.decisionNo,
28913
28964
  featureNo: featureNo,
28914
28965
  formulaKey: formulaKey,
28915
- result: freeText,
28966
+ result: result,
28916
28967
  catalogCodex: this.article.catalogCodex,
28917
28968
  articleCodex: this.article.articleCodex
28918
28969
  }
@@ -29047,7 +29098,7 @@ var IDMEngine = /*#__PURE__*/function () {
29047
29098
  this.priceDebugStack[_i].percentageValue = percentageValue;
29048
29099
  }
29049
29100
  if ((_percentageSurcharge$ = percentageSurcharge.priceFeatureGroupRef) !== null && _percentageSurcharge$ !== void 0 && _percentageSurcharge$.length) {
29050
- var _loop7 = function _loop7() {
29101
+ var _loop8 = function _loop8() {
29051
29102
  var ref = percentageSurcharge.priceFeatureGroupRef[j].priceFeatureGroupNo;
29052
29103
  var refPrice = _this6.article.priceRefs.find(function (p) {
29053
29104
  return p.PriceFeatureGroupNo == ref;
@@ -29072,7 +29123,7 @@ var IDMEngine = /*#__PURE__*/function () {
29072
29123
  }
29073
29124
  };
29074
29125
  for (var j = 0; j < percentageSurcharge.priceFeatureGroupRef.length; j++) {
29075
- _loop7();
29126
+ _loop8();
29076
29127
  }
29077
29128
  }
29078
29129
  }
@@ -29197,6 +29248,8 @@ var IDMEngine = /*#__PURE__*/function () {
29197
29248
  myArtOPS.freeText = undefined;
29198
29249
  } else if (freeText != undefined) {
29199
29250
  myArtOPS.freeText = freeText;
29251
+ // a text without a measure is a typed entry: it replaces what a formula measured before
29252
+ if (measureValue === undefined) myArtOPS.measureValue = undefined;
29200
29253
  } else if (myArtOPS.freeText == undefined || oldCodex !== myArtOPS.valCodex) {
29201
29254
  var _myArtOPS$val;
29202
29255
  //another option means another measure range, so the previous freetext must not carry over
@@ -29395,7 +29448,7 @@ var IDMEngine = /*#__PURE__*/function () {
29395
29448
  });
29396
29449
  }
29397
29450
  var initDecisionsFiltered = [];
29398
- var _loop8 = function _loop8(i) {
29451
+ var _loop9 = function _loop9(i) {
29399
29452
  if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
29400
29453
  return d.decisionNo == initDecisions[i].decisionNo;
29401
29454
  })) {
@@ -29403,7 +29456,7 @@ var IDMEngine = /*#__PURE__*/function () {
29403
29456
  }
29404
29457
  };
29405
29458
  for (var i = 0; i < initDecisions.length; i++) {
29406
- _loop8(i);
29459
+ _loop9(i);
29407
29460
  }
29408
29461
  if (quanitity >= 1) {
29409
29462
  var _ref7;
@@ -32244,8 +32297,13 @@ var DivaArticle = /*#__PURE__*/function () {
32244
32297
  _step12;
32245
32298
  try {
32246
32299
  for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
32300
+ var _ops$freeTextLang;
32247
32301
  var ops = _step12.value;
32248
- if (ops.valCodex && (!ops.isFreeText || ops.freeText !== undefined)) {
32302
+ // free text entered per language (classification) lives in freeTextLang only, in any of its languages; 'OPV_TEXT_FREI' is the codex, not a text
32303
+ var hasFreeTextLang = Object.values((_ops$freeTextLang = ops.freeTextLang) !== null && _ops$freeTextLang !== void 0 ? _ops$freeTextLang : {}).some(function (text) {
32304
+ return !!text && text !== 'OPV_TEXT_FREI';
32305
+ });
32306
+ if (ops.valCodex && (!ops.isFreeText || ops.freeText !== undefined || hasFreeTextLang)) {
32249
32307
  ret[ops.optionCodex] = ops.valCodex;
32250
32308
  }
32251
32309
  }
@@ -32757,6 +32815,7 @@ var DivaArticle = /*#__PURE__*/function () {
32757
32815
  }
32758
32816
  var articles = [].concat(_toConsumableArray__default["default"](this.getAccessoireByArticleCodex(undefined, true)), _toConsumableArray__default["default"](Object.values(this.partlistArticles)), _toConsumableArray__default["default"](this.partListParentArticle ? [this.partListParentArticle] : []));
32759
32817
  for (var _i2 = 0; _i2 < articles.length; _i2++) {
32818
+ var _accessoiresToUpdate$;
32760
32819
  var variantValues = {};
32761
32820
  var accessoire = articles[_i2];
32762
32821
  var _iterator23 = _createForOfIteratorHelper$e(accessoire.articleOptionStates.values()),
@@ -32772,6 +32831,7 @@ var DivaArticle = /*#__PURE__*/function () {
32772
32831
  }
32773
32832
  }
32774
32833
  }
32834
+ //an accessoire can get values of several global options, the ones of the previous options must stay
32775
32835
  } catch (err) {
32776
32836
  _iterator23.e(err);
32777
32837
  } finally {
@@ -32779,7 +32839,7 @@ var DivaArticle = /*#__PURE__*/function () {
32779
32839
  }
32780
32840
  if (Object.entries(variantValues).length > 0) accessoiresToUpdate[accessoire.basketId] = {
32781
32841
  accessoire: accessoire,
32782
- variantValues: variantValues
32842
+ variantValues: _objectSpread$j(_objectSpread$j({}, (_accessoiresToUpdate$ = accessoiresToUpdate[accessoire.basketId]) === null || _accessoiresToUpdate$ === void 0 ? void 0 : _accessoiresToUpdate$.variantValues), variantValues)
32783
32843
  };
32784
32844
  }
32785
32845
  }
@@ -33274,7 +33334,7 @@ var DivaArticle = /*#__PURE__*/function () {
33274
33334
  break;
33275
33335
  }
33276
33336
  _context.next = 4;
33277
- return Promise.resolve().then(function () { return require('./ShelfPlanner-3a790d65.js'); });
33337
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-fb32d93b.js'); });
33278
33338
  case 4:
33279
33339
  _yield$import = _context.sent;
33280
33340
  ShelfPlanner = _yield$import["default"];
@@ -34889,7 +34949,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34889
34949
  key: "updateCfgValues",
34890
34950
  value: (function () {
34891
34951
  var _updateCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
34892
- var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
34952
+ var maxPriceOfGroupCodex, setByFeatureVariantValues, key, reevaluateOnPartlistChange, partlistBefore, partlistArticlesToLoad, round, valuesBefore;
34893
34953
  return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context11) {
34894
34954
  while (1) switch (_context11.prev = _context11.next) {
34895
34955
  case 0:
@@ -34930,13 +34990,44 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34930
34990
  _context11.next = 12;
34931
34991
  return this.updateLastElement(article);
34932
34992
  case 12:
34933
- _context11.next = 14;
34993
+ reevaluateOnPartlistChange = !dontLoadPartlist && !calcVariantPrice && !article.hasType1Dependencies && !article.CatalogData.isIDMFormat;
34994
+ partlistBefore = reevaluateOnPartlistChange ? this.partlistState(article) : '';
34995
+ _context11.next = 16;
34934
34996
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
34935
- case 14:
34997
+ case 16:
34998
+ partlistArticlesToLoad = _context11.sent;
34999
+ if (!reevaluateOnPartlistChange) {
35000
+ _context11.next = 32;
35001
+ break;
35002
+ }
35003
+ round = 0;
35004
+ case 19:
35005
+ if (!(round < 3 && this.partlistState(article) !== partlistBefore)) {
35006
+ _context11.next = 32;
35007
+ break;
35008
+ }
35009
+ valuesBefore = JSON.stringify(article.VariantValues);
35010
+ maxPriceOfGroupCodex = article.engine.updateArticleOptionTree();
35011
+ article.engine.evalDecisions(onlyUpdateOnce);
35012
+ if (!(JSON.stringify(article.VariantValues) === valuesBefore)) {
35013
+ _context11.next = 25;
35014
+ break;
35015
+ }
35016
+ return _context11.abrupt("break", 32);
35017
+ case 25:
35018
+ partlistBefore = this.partlistState(article);
35019
+ _context11.next = 28;
35020
+ return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
35021
+ case 28:
34936
35022
  partlistArticlesToLoad = _context11.sent;
34937
- _context11.next = 17;
35023
+ case 29:
35024
+ round++;
35025
+ _context11.next = 19;
35026
+ break;
35027
+ case 32:
35028
+ _context11.next = 34;
34938
35029
  return this.evalOpvsOnOpvsConstructionRules(article);
34939
- case 17:
35030
+ case 34:
34940
35031
  //danach Preise berechnen
34941
35032
  if (!dontCalcPrice) {
34942
35033
  article.engine.calcConfigPrice(maxPriceOfGroupCodex, 2);
@@ -34946,7 +35037,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34946
35037
  }
34947
35038
  }
34948
35039
  return _context11.abrupt("return", partlistArticlesToLoad);
34949
- case 19:
35040
+ case 36:
34950
35041
  case "end":
34951
35042
  return _context11.stop();
34952
35043
  }
@@ -34956,7 +35047,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34956
35047
  return _updateCfgValues.apply(this, arguments);
34957
35048
  }
34958
35049
  return updateCfgValues;
34959
- }())
35050
+ }()
35051
+ /**
35052
+ * The partlist children with the values of their own options - what option rules of the parent can read through
35053
+ * them. Options the parent has itself are left out: the children get them from the parent, the tree saw them already.
35054
+ */
35055
+ )
35056
+ }, {
35057
+ key: "partlistState",
35058
+ value: function partlistState(article) {
35059
+ var _article$partlistArti;
35060
+ var parentOptions = new Set(article.articleOptionStatesKeys);
35061
+ return JSON.stringify(Object.values((_article$partlistArti = article.partlistArticles) !== null && _article$partlistArti !== void 0 ? _article$partlistArti : {}).map(function (partlistArticle) {
35062
+ return [partlistArticle.articleCodex, Object.entries(partlistArticle.VariantValues).filter(function (_ref) {
35063
+ var _ref2 = _slicedToArray__default["default"](_ref, 1),
35064
+ optionCodex = _ref2[0];
35065
+ return !parentOptions.has(optionCodex);
35066
+ })];
35067
+ }));
35068
+ }
34960
35069
  }, {
34961
35070
  key: "updateLastElement",
34962
35071
  value: function () {
@@ -42056,7 +42165,7 @@ var DivaSet = /*#__PURE__*/function () {
42056
42165
  break;
42057
42166
  }
42058
42167
  _context5.next = 3;
42059
- return Promise.resolve().then(function () { return require('./DoorPlanner-322b433f.js'); });
42168
+ return Promise.resolve().then(function () { return require('./DoorPlanner-87dc0b5f.js'); });
42060
42169
  case 3:
42061
42170
  _yield$import = _context5.sent;
42062
42171
  DoorPlanner = _yield$import["default"];
@@ -49939,19 +50048,21 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49939
50048
  if (!(ops !== null && ops !== void 0 && ops.val)) return 1; // continue
49940
50049
  var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd4 = ops.optionOcd) !== null && _ops$optionOcd4 !== void 0 ? _ops$optionOcd4 : ops.option.codex);
49941
50050
  changedValues[optionCodex] = ((_ops$multiSelects2 = ops.multiSelects) !== null && _ops$multiSelects2 !== void 0 && _ops$multiSelects2.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
49942
- var _val$ocd, _ops$freeTextLang3, _ops$freeTextLang4, _val$vCodex, _ops$option$ocd, _ops$val, _ops$val2;
50051
+ var _val$ocd, _ops$freeTextLang2, _ops$freeTextLang3, _val$vCodex, _ops$option$ocd, _ops$val, _ops$val2;
49943
50052
  var attributeValue = (_val$ocd = val.ocd) !== null && _val$ocd !== void 0 ? _val$ocd : val.codex;
49944
50053
  if (ops.isFreeText) {
49945
- var _ops$freeTextLang;
49946
50054
  if (ops.measureUnit && ops.freeText) {
49947
50055
  if (isNaN(Number(ops.freeText.replace('.', '')))) {
49948
50056
  attributeValue = '';
49949
50057
  } else {
49950
50058
  attributeValue = ops.freeText;
49951
50059
  }
49952
- } else if ((_ops$freeTextLang = ops.freeTextLang) !== null && _ops$freeTextLang !== void 0 && _ops$freeTextLang['DE'] && 'OPV_TEXT_FREI' !== ops.freeTextLang['DE']) {
49953
- var _ops$freeTextLang$FR, _ops$freeTextLang$IT;
49954
- attributeValue = ops.freeTextLang['DE'] + '##' + ((_ops$freeTextLang$FR = ops.freeTextLang['FR']) !== null && _ops$freeTextLang$FR !== void 0 ? _ops$freeTextLang$FR : '') + '##' + ((_ops$freeTextLang$IT = ops.freeTextLang['IT']) !== null && _ops$freeTextLang$IT !== void 0 ? _ops$freeTextLang$IT : '');
50060
+ } else if (ops.freeTextLang && Object.values(ops.freeTextLang).some(function (text) {
50061
+ return !!text && text !== 'OPV_TEXT_FREI';
50062
+ })) {
50063
+ var _ops$freeTextLang$DE, _ops$freeTextLang$FR, _ops$freeTextLang$IT;
50064
+ // the value carries every language, so a text without German must still be kept
50065
+ attributeValue = ((_ops$freeTextLang$DE = ops.freeTextLang['DE']) !== null && _ops$freeTextLang$DE !== void 0 ? _ops$freeTextLang$DE : '') + '##' + ((_ops$freeTextLang$FR = ops.freeTextLang['FR']) !== null && _ops$freeTextLang$FR !== void 0 ? _ops$freeTextLang$FR : '') + '##' + ((_ops$freeTextLang$IT = ops.freeTextLang['IT']) !== null && _ops$freeTextLang$IT !== void 0 ? _ops$freeTextLang$IT : '');
49955
50066
  } else if (ops.freeText) {
49956
50067
  attributeValue = ops.freeText;
49957
50068
  } else {
@@ -49963,8 +50074,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49963
50074
  }
49964
50075
  var name = val.name;
49965
50076
  if (ops.isFreeText) {
49966
- var _ref, _ops$freeTextLang$DE, _ops$freeTextLang2;
49967
- name = (_ref = (_ops$freeTextLang$DE = (_ops$freeTextLang2 = ops.freeTextLang) === null || _ops$freeTextLang2 === void 0 ? void 0 : _ops$freeTextLang2['DE']) !== null && _ops$freeTextLang$DE !== void 0 ? _ops$freeTextLang$DE : ops.freeText) !== null && _ref !== void 0 ? _ref : '';
50077
+ var _ref, _ops$freeTextLang$DE2, _ops$freeTextLang;
50078
+ name = (_ref = (_ops$freeTextLang$DE2 = (_ops$freeTextLang = ops.freeTextLang) === null || _ops$freeTextLang === void 0 ? void 0 : _ops$freeTextLang['DE']) !== null && _ops$freeTextLang$DE2 !== void 0 ? _ops$freeTextLang$DE2 : ops.freeText) !== null && _ref !== void 0 ? _ref : '';
49968
50079
  if (ops.measureUnit && name !== '') {
49969
50080
  name = isNaN(Number(name)) ? '' : Number(name).toString();
49970
50081
  attributeValue = name;
@@ -49980,8 +50091,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49980
50091
  attributeValue: attributeValue,
49981
50092
  hexColor: val.hexColor,
49982
50093
  attributeValueNameDe: ops.isFreeText ? name : valueName('DE'),
49983
- attributeValueNameFr: ops.isFreeText ? (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['FR'] : valueName('FR'),
49984
- attributeValueNameIt: ops.isFreeText ? (_ops$freeTextLang4 = ops.freeTextLang) === null || _ops$freeTextLang4 === void 0 ? void 0 : _ops$freeTextLang4['IT'] : valueName('IT'),
50094
+ attributeValueNameFr: ops.isFreeText ? (_ops$freeTextLang2 = ops.freeTextLang) === null || _ops$freeTextLang2 === void 0 ? void 0 : _ops$freeTextLang2['FR'] : valueName('FR'),
50095
+ attributeValueNameIt: ops.isFreeText ? (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['IT'] : valueName('IT'),
49985
50096
  attributeValueVCodex: (_val$vCodex = val === null || val === void 0 ? void 0 : val.vCodex) !== null && _val$vCodex !== void 0 ? _val$vCodex : undefined,
49986
50097
  position: opsKeys.indexOf(ops.option.codex),
49987
50098
  attributeName: ops.option.name,
@@ -50027,7 +50138,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50027
50138
  break;
50028
50139
  case 3:
50029
50140
  _context12.next = 5;
50030
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-61d7dc26.js'); });
50141
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-51dfaec3.js'); });
50031
50142
  case 5:
50032
50143
  _yield$import = _context12.sent;
50033
50144
  PfisterWWSHandler = _yield$import["default"];
@@ -50035,7 +50146,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50035
50146
  return _context12.abrupt("break", 27);
50036
50147
  case 9:
50037
50148
  _context12.next = 11;
50038
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-ea49263b.js'); });
50149
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-da46fa9b.js'); });
50039
50150
  case 11:
50040
50151
  _yield$import2 = _context12.sent;
50041
50152
  LiviqueWWSHandler = _yield$import2["default"];
@@ -50043,7 +50154,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50043
50154
  return _context12.abrupt("break", 27);
50044
50155
  case 15:
50045
50156
  _context12.next = 17;
50046
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-966ca145.js'); });
50157
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-a42a4a83.js'); });
50047
50158
  case 17:
50048
50159
  _yield$import3 = _context12.sent;
50049
50160
  SeriousWWSHandler = _yield$import3["default"];
@@ -50051,7 +50162,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50051
50162
  return _context12.abrupt("break", 27);
50052
50163
  case 21:
50053
50164
  _context12.next = 23;
50054
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-b565c684.js'); });
50165
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-8e6d457c.js'); });
50055
50166
  case 23:
50056
50167
  _yield$import4 = _context12.sent;
50057
50168
  StandardWWSHandler = _yield$import4["default"];
@@ -51438,7 +51549,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
51438
51549
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
51439
51550
  bootMark('signalr: chunk import start');
51440
51551
  _context3.next = 3;
51441
- return Promise.resolve().then(function () { return require('./Host3DSignalR-720088d4.js'); });
51552
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-33b81ac2.js'); });
51442
51553
  case 3:
51443
51554
  _yield$import = _context3.sent;
51444
51555
  Host3DSignalR = _yield$import["default"];
@@ -53183,7 +53294,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
53183
53294
  break;
53184
53295
  case 8:
53185
53296
  _context5.next = 10;
53186
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-76758261.js'); });
53297
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-7045ce9f.js'); });
53187
53298
  case 10:
53188
53299
  _yield$import = _context5.sent;
53189
53300
  DivaStandardPlanner = _yield$import["default"];
@@ -53194,7 +53305,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
53194
53305
  return _context5.abrupt("break", 21);
53195
53306
  case 15:
53196
53307
  _context5.next = 17;
53197
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-cf785c8e.js'); });
53308
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-6c5ae2d0.js'); });
53198
53309
  case 17:
53199
53310
  _yield$import2 = _context5.sent;
53200
53311
  DivaBoxPlanner = _yield$import2["default"];
@@ -58983,6 +59094,8 @@ function _loadAndRepairBasket() {
58983
59094
  function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
58984
59095
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
58985
59096
  var PlannerElementData = /*#__PURE__*/function () {
59097
+ //height the element had when its worldPosCenter was set - the configurator changes plannerData in place
59098
+
58986
59099
  function PlannerElementData(setId, basketId, _elementId, plannerType) {
58987
59100
  _classCallCheck__default["default"](this, PlannerElementData);
58988
59101
  _defineProperty__default["default"](this, "planElement", void 0);
@@ -58995,6 +59108,7 @@ var PlannerElementData = /*#__PURE__*/function () {
58995
59108
  //When reloading the element this array saves the previous docking points for redocking
58996
59109
  _defineProperty__default["default"](this, "plannerType", void 0);
58997
59110
  _defineProperty__default["default"](this, "basketId", void 0);
59111
+ _defineProperty__default["default"](this, "placedHeight", void 0);
58998
59112
  this.basketId = basketId;
58999
59113
  this.planElement = {
59000
59114
  elementId: _elementId,
@@ -59222,8 +59336,16 @@ var PlannerElementData = /*#__PURE__*/function () {
59222
59336
  return this.planElement.worldPosCenter;
59223
59337
  },
59224
59338
  set: function set(pos) {
59339
+ var _this$planElement$pla6;
59225
59340
  this.planElement.worldPosCenter = pos;
59341
+ this.placedHeight = (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.height;
59226
59342
  }
59343
+
59344
+ /**
59345
+ * Keeps an element that stands on the floor (worldPosCenter.y == height / 2) on the floor after its height changed,
59346
+ * e.g. a bed configured without headboard: the 3D host centers the article on worldPosCenter.y. Elements placed
59347
+ * otherwise keep their y.
59348
+ */
59227
59349
  }, {
59228
59350
  key: "WorldPosCenterIgnoreOLF",
59229
59351
  get: function get() {
@@ -59251,7 +59373,7 @@ var PlannerElementData = /*#__PURE__*/function () {
59251
59373
  if (!this.planElement.plannerData) return;
59252
59374
  var centerDir = new Vector2(this.planElement.plannerData.width / 2, this.planElement.plannerData.depth / 2);
59253
59375
  centerDir = Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
59254
- this.planElement.worldPosCenter = new Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
59376
+ this.WorldPosCenter = new Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
59255
59377
  }
59256
59378
 
59257
59379
  /**
@@ -59300,11 +59422,26 @@ var PlannerElementData = /*#__PURE__*/function () {
59300
59422
  var oltOffsetFromOlfCorner = new Vector2(this.planElement.oltLeft + this.planElement.oltWidth / 2, this.planElement.oltTop + this.planElement.oltDepth / 2);
59301
59423
  var olfCenterOffset = new Vector2(oltOffsetFromOlfCorner.x - olfW / 2, oltOffsetFromOlfCorner.y - olfD / 2);
59302
59424
  var olfCenterOffsetRot = Vector2.rotateOrigin(olfCenterOffset, this.planElement.rotDeg);
59303
- this.planElement.worldPosCenter = new Vector3(oltCenter.x - olfCenterOffsetRot.x, oltCenter.y, oltCenter.z - olfCenterOffsetRot.y);
59425
+ this.WorldPosCenter = new Vector3(oltCenter.x - olfCenterOffsetRot.x, oltCenter.y, oltCenter.z - olfCenterOffsetRot.y);
59304
59426
  } else {
59305
- this.planElement.worldPosCenter = oltCenter;
59427
+ this.WorldPosCenter = oltCenter;
59306
59428
  }
59307
59429
  }
59430
+ }, {
59431
+ key: "keepOnFloorOnHeightChange",
59432
+ value: function keepOnFloorOnHeightChange() {
59433
+ var _this$planElement$pla7;
59434
+ var height = (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.height;
59435
+ if (!Number.isFinite(height) || !Number.isFinite(this.placedHeight) || height == this.placedHeight) return;
59436
+ var center = this.planElement.worldPosCenter;
59437
+ if (!PlannerElementData.standsOnFloor(center.y, this.placedHeight)) return;
59438
+ this.WorldPosCenter = new Vector3(center.x, height / 2, center.z);
59439
+ }
59440
+
59441
+ /**
59442
+ * Whether an element whose center is at centerY and that is height high stands on the floor (centerY == height / 2).
59443
+ * The one rule for height changes and article switches, so both keep the same elements on the floor.
59444
+ */
59308
59445
  }, {
59309
59446
  key: "updateDeltaTrans",
59310
59447
  value: function updateDeltaTrans(deltaMove, deltaRotDeg, rotCorrection, correctAngle, turningPoint) {
@@ -59443,18 +59580,18 @@ var PlannerElementData = /*#__PURE__*/function () {
59443
59580
  }, {
59444
59581
  key: "DoSetWidthFromSVG",
59445
59582
  get: function get() {
59446
- var _this$planElement$pla6, _this$planElement$pla7;
59447
- var width = (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.width;
59448
- return !(width != undefined && width > 0) || !!((_this$planElement$pla7 = this.planElement.plannerData) !== null && _this$planElement$pla7 !== void 0 && _this$planElement$pla7.widthFromSVG);
59583
+ var _this$planElement$pla8, _this$planElement$pla9;
59584
+ var width = (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.width;
59585
+ return !(width != undefined && width > 0) || !!((_this$planElement$pla9 = this.planElement.plannerData) !== null && _this$planElement$pla9 !== void 0 && _this$planElement$pla9.widthFromSVG);
59449
59586
  }
59450
59587
 
59451
59588
  /** True while the depth is no measure of the article, see DoSetWidthFromSVG. */
59452
59589
  }, {
59453
59590
  key: "DoSetDepthFromSVG",
59454
59591
  get: function get() {
59455
- var _this$planElement$pla8, _this$planElement$pla9;
59456
- var depth = (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.depth;
59457
- return !(depth != undefined && depth > 0) || !!((_this$planElement$pla9 = this.planElement.plannerData) !== null && _this$planElement$pla9 !== void 0 && _this$planElement$pla9.depthFromSVG);
59592
+ var _this$planElement$pla10, _this$planElement$pla11;
59593
+ var depth = (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.depth;
59594
+ return !(depth != undefined && depth > 0) || !!((_this$planElement$pla11 = this.planElement.plannerData) !== null && _this$planElement$pla11 !== void 0 && _this$planElement$pla11.depthFromSVG);
59458
59595
  }
59459
59596
  }, {
59460
59597
  key: "WidthFromSVG",
@@ -59478,38 +59615,38 @@ var PlannerElementData = /*#__PURE__*/function () {
59478
59615
  }, {
59479
59616
  key: "SvgFileName",
59480
59617
  get: function get() {
59481
- var _this$planElement$pla10;
59482
- return (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.curSVG;
59618
+ var _this$planElement$pla12;
59619
+ return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.curSVG;
59483
59620
  }
59484
59621
  }, {
59485
59622
  key: "Width",
59486
59623
  get: function get() {
59487
- var _this$planElement$pla11;
59488
- return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.width;
59624
+ var _this$planElement$pla13;
59625
+ return (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.width;
59489
59626
  }
59490
59627
  }, {
59491
59628
  key: "Height",
59492
59629
  get: function get() {
59493
- var _this$planElement$pla12;
59494
- return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.height;
59630
+ var _this$planElement$pla14;
59631
+ return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.height;
59495
59632
  }
59496
59633
  }, {
59497
59634
  key: "Depth",
59498
59635
  get: function get() {
59499
- var _this$planElement$pla13;
59500
- return (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.depth;
59636
+ var _this$planElement$pla15;
59637
+ return (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.depth;
59501
59638
  }
59502
59639
  }, {
59503
59640
  key: "HasAVL",
59504
59641
  get: function get() {
59505
- var _this$planElement$pla14;
59506
- return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.hasAVL;
59642
+ var _this$planElement$pla16;
59643
+ return (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.hasAVL;
59507
59644
  }
59508
59645
  }, {
59509
59646
  key: "HasAVR",
59510
59647
  get: function get() {
59511
- var _this$planElement$pla15;
59512
- return (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.hasAVR;
59648
+ var _this$planElement$pla17;
59649
+ return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.hasAVR;
59513
59650
  }
59514
59651
  }, {
59515
59652
  key: "HasAVO",
@@ -59633,8 +59770,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59633
59770
  }, {
59634
59771
  key: "svgBefore",
59635
59772
  get: function get() {
59636
- var _this$planElement$pla16;
59637
- return (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.svgBefore;
59773
+ var _this$planElement$pla18;
59774
+ return (_this$planElement$pla18 = this.planElement.plannerData) === null || _this$planElement$pla18 === void 0 ? void 0 : _this$planElement$pla18.svgBefore;
59638
59775
  },
59639
59776
  set: function set(svg) {
59640
59777
  if (this.planElement.plannerData) this.planElement.plannerData.svgBefore = svg;
@@ -59642,8 +59779,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59642
59779
  }, {
59643
59780
  key: "svgAfter",
59644
59781
  get: function get() {
59645
- var _this$planElement$pla17;
59646
- return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.svgAfter;
59782
+ var _this$planElement$pla19;
59783
+ return (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.svgAfter;
59647
59784
  },
59648
59785
  set: function set(svg) {
59649
59786
  if (this.planElement.plannerData) this.planElement.plannerData.svgAfter = svg;
@@ -59725,14 +59862,14 @@ var PlannerElementData = /*#__PURE__*/function () {
59725
59862
  }, {
59726
59863
  key: "getIsNotDockedAccessoire",
59727
59864
  value: function getIsNotDockedAccessoire() {
59728
- var _this$planElement$pla18;
59729
- return !!((_this$planElement$pla18 = this.planElement.plannerData) !== null && _this$planElement$pla18 !== void 0 && _this$planElement$pla18.isNotDockedAccessoire);
59865
+ var _this$planElement$pla20;
59866
+ return !!((_this$planElement$pla20 = this.planElement.plannerData) !== null && _this$planElement$pla20 !== void 0 && _this$planElement$pla20.isNotDockedAccessoire);
59730
59867
  }
59731
59868
  }, {
59732
59869
  key: "getParentElementId",
59733
59870
  value: function getParentElementId() {
59734
- var _this$planElement$pla19;
59735
- return (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.parentElementId;
59871
+ var _this$planElement$pla21;
59872
+ return (_this$planElement$pla21 = this.planElement.plannerData) === null || _this$planElement$pla21 === void 0 ? void 0 : _this$planElement$pla21.parentElementId;
59736
59873
  }
59737
59874
  }, {
59738
59875
  key: "getElementId",
@@ -59764,12 +59901,12 @@ var PlannerElementData = /*#__PURE__*/function () {
59764
59901
  key: "getWorldPosCornerOLF",
59765
59902
  value: function getWorldPosCornerOLF() {
59766
59903
  if (this.HasOLFPolygon && this.planElement.olfWidth != null && this.planElement.olfDepth != null) {
59767
- var _this$planElement$pla20, _this$planElement$pla21;
59904
+ var _this$planElement$pla22, _this$planElement$pla23;
59768
59905
  var olfW = this.planElement.olfWidth / DivaUtils__default["default"].UnitRecalc;
59769
59906
  var olfD = this.planElement.olfDepth / DivaUtils__default["default"].UnitRecalc;
59770
59907
  var olfCornerDir = new Vector2(-olfW / 2, -olfD / 2);
59771
59908
  olfCornerDir = Vector2.rotateOrigin(olfCornerDir, this.planElement.rotDeg);
59772
- return new Vector3(this.planElement.worldPosCenter.x + olfCornerDir.x, this.planElement.worldPosCenter.y - ((_this$planElement$pla20 = (_this$planElement$pla21 = this.planElement.plannerData) === null || _this$planElement$pla21 === void 0 ? void 0 : _this$planElement$pla21.height) !== null && _this$planElement$pla20 !== void 0 ? _this$planElement$pla20 : 0) / 2, this.planElement.worldPosCenter.z + olfCornerDir.y);
59909
+ return new Vector3(this.planElement.worldPosCenter.x + olfCornerDir.x, this.planElement.worldPosCenter.y - ((_this$planElement$pla22 = (_this$planElement$pla23 = this.planElement.plannerData) === null || _this$planElement$pla23 === void 0 ? void 0 : _this$planElement$pla23.height) !== null && _this$planElement$pla22 !== void 0 ? _this$planElement$pla22 : 0) / 2, this.planElement.worldPosCenter.z + olfCornerDir.y);
59773
59910
  }
59774
59911
  return this.WorldPosCorner;
59775
59912
  }
@@ -59830,8 +59967,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59830
59967
  }, {
59831
59968
  key: "getFilterAVL",
59832
59969
  value: function getFilterAVL() {
59833
- var _this$planElement$pla22;
59834
- return this.planElement.plannerData ? (_this$planElement$pla22 = this.planElement.plannerData) === null || _this$planElement$pla22 === void 0 ? void 0 : _this$planElement$pla22.AVLFilter : [];
59970
+ var _this$planElement$pla24;
59971
+ return this.planElement.plannerData ? (_this$planElement$pla24 = this.planElement.plannerData) === null || _this$planElement$pla24 === void 0 ? void 0 : _this$planElement$pla24.AVLFilter : [];
59835
59972
  }
59836
59973
  }, {
59837
59974
  key: "getFilterAVR",
@@ -59915,14 +60052,14 @@ var PlannerElementData = /*#__PURE__*/function () {
59915
60052
  }, {
59916
60053
  key: "getAccessoires",
59917
60054
  value: function getAccessoires() {
59918
- var _this$planElement$pla23;
59919
- return this.planElement.plannerData ? (_this$planElement$pla23 = this.planElement.plannerData) === null || _this$planElement$pla23 === void 0 ? void 0 : _this$planElement$pla23.accessoireList : [];
60055
+ var _this$planElement$pla25;
60056
+ return this.planElement.plannerData ? (_this$planElement$pla25 = this.planElement.plannerData) === null || _this$planElement$pla25 === void 0 ? void 0 : _this$planElement$pla25.accessoireList : [];
59920
60057
  }
59921
60058
  }, {
59922
60059
  key: "getSVGsWithFormula",
59923
60060
  value: function getSVGsWithFormula() {
59924
- var _this$planElement$pla24;
59925
- return (_this$planElement$pla24 = this.planElement.plannerData) === null || _this$planElement$pla24 === void 0 ? void 0 : _this$planElement$pla24.svgsWithFormula;
60061
+ var _this$planElement$pla26;
60062
+ return (_this$planElement$pla26 = this.planElement.plannerData) === null || _this$planElement$pla26 === void 0 ? void 0 : _this$planElement$pla26.svgsWithFormula;
59926
60063
  }
59927
60064
  /** OLT offset from OLF corner (cm). When HasOLFPolygon, DP LocalWorldPos is OLF-relative; subtract this to get OLT-relative. */
59928
60065
  }, {
@@ -59940,14 +60077,19 @@ var PlannerElementData = /*#__PURE__*/function () {
59940
60077
  }, {
59941
60078
  key: "getVaraintValuesInfluencingAVLAVRFilter",
59942
60079
  value: function getVaraintValuesInfluencingAVLAVRFilter() {
59943
- var _this$planElement$pla25;
59944
- return (_this$planElement$pla25 = this.planElement.plannerData) === null || _this$planElement$pla25 === void 0 ? void 0 : _this$planElement$pla25.varaintValuesInfluencingAVLAVRFilter;
60080
+ var _this$planElement$pla27;
60081
+ return (_this$planElement$pla27 = this.planElement.plannerData) === null || _this$planElement$pla27 === void 0 ? void 0 : _this$planElement$pla27.varaintValuesInfluencingAVLAVRFilter;
59945
60082
  }
59946
60083
  }, {
59947
60084
  key: "getCurrentAccessorires",
59948
60085
  value: function getCurrentAccessorires() {
59949
- var _this$planElement$pla26;
59950
- return this.planElement.plannerData ? (_this$planElement$pla26 = this.planElement.plannerData) === null || _this$planElement$pla26 === void 0 ? void 0 : _this$planElement$pla26.currentAccessorires : [];
60086
+ var _this$planElement$pla28;
60087
+ return this.planElement.plannerData ? (_this$planElement$pla28 = this.planElement.plannerData) === null || _this$planElement$pla28 === void 0 ? void 0 : _this$planElement$pla28.currentAccessorires : [];
60088
+ }
60089
+ }], [{
60090
+ key: "standsOnFloor",
60091
+ value: function standsOnFloor(centerY, height) {
60092
+ return Number.isFinite(height) && Math.abs(centerY - height / 2) <= 0.01;
59951
60093
  }
59952
60094
  }]);
59953
60095
  }();