@crystaldesign/web-planner-logic 26.13.0-beta.26 → 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
@@ -2514,18 +2514,27 @@ var jsonOf = function jsonOf(value) {
2514
2514
  return _typeof(value) === 'object' ? value : undefined;
2515
2515
  };
2516
2516
 
2517
+ /** A flag '1' or '0', any other plain value its text - the legacy text the enricher renders for it. */
2518
+ var plainText = function plainText(value) {
2519
+ return typeof value === 'boolean' ? value ? '1' : '0' : String(value);
2520
+ };
2521
+ var isPlain = function isPlain(value) {
2522
+ return ['string', 'number', 'boolean'].includes(_typeof(value));
2523
+ };
2524
+
2517
2525
  /**
2518
2526
  * The texts the basket's MetaData carries for a property the planner does not parse (`values: string[]`): a text split
2519
- * at ';' as before, a list its entries, a flag '1' or '0', a number its text, a JSON value its JSON text.
2527
+ * at ';' as before, a list of plain values its entries (a list's schema may make them numbers or flags), a flag '1' or
2528
+ * '0', a number its text, a JSON value its JSON text.
2520
2529
  */
2521
2530
  function propertyTexts(value) {
2522
2531
  if (value === undefined) return [];
2523
2532
  if (typeof value === 'string') return value.split(';');
2524
- if (typeof value === 'boolean') return [value ? '1' : '0'];
2525
- if (typeof value === 'number') return [String(value)];
2526
- if (Array.isArray(value) && value.every(function (entry) {
2527
- return typeof entry === 'string';
2528
- })) return value.map(String);
2533
+ if (isPlain(value)) return [plainText(value)];
2534
+ if (Array.isArray(value)) {
2535
+ var entries = value;
2536
+ if (entries.every(isPlain)) return entries.map(plainText);
2537
+ }
2529
2538
  return [JSON.stringify(value)];
2530
2539
  }
2531
2540
 
@@ -17289,6 +17298,12 @@ function measureInCentimeters(value, unit) {
17289
17298
  return TO_CENTIMETERS[unit](value);
17290
17299
  }
17291
17300
 
17301
+ /** A measure in centimetres in an option's unit, the inverse of measureInCentimeters (rounded to drop float noise). */
17302
+ function measureInUnit(centimeters, unit) {
17303
+ if (!unit || !Object.prototype.hasOwnProperty.call(TO_CENTIMETERS, unit)) return centimeters;
17304
+ return Math.round(centimeters / TO_CENTIMETERS[unit](1) * 1e6) / 1e6;
17305
+ }
17306
+
17292
17307
  var LOG$p = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
17293
17308
  var OptionValueCatalogData = /*#__PURE__*/function () {
17294
17309
  function OptionValueCatalogData(opv, catalogData) {
@@ -28497,17 +28512,17 @@ var IDMEngine = /*#__PURE__*/function () {
28497
28512
  var optionSetRef = combination.projectOptionsSetRefs.find(function (p) {
28498
28513
  return p.featureNo == Number(featureNo);
28499
28514
  });
28500
- var ref = _this4.getOptionListOfRef(optionSetRef);
28501
- if (optionSetRef && !ref) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28502
- var doUseDoc = true;
28515
+ var ref = _this4.getRowOptionListOfRef(optionSetRef);
28516
+ if (optionSetRef && ref === undefined) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28517
+ var doUseDoc = ref !== null;
28503
28518
  if (doAlsoCheckFeatureNos.length > 0) {
28504
28519
  var _loop3 = function _loop3() {
28505
28520
  var checkFeatureNo = doAlsoCheckFeatureNos[f];
28506
28521
  var ops = _this4.article.getArticleOptionState(checkFeatureNo);
28507
- var checkRefs = _this4.getOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28522
+ var checkRefs = _this4.getRowOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28508
28523
  return p.featureNo == Number(checkFeatureNo);
28509
28524
  }));
28510
- if (ops && checkRefs && ops.valCodex && !_this4.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28525
+ if (checkRefs === null || ops && checkRefs && ops.valCodex && !_this4.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28511
28526
  doUseDoc = false;
28512
28527
  return 1; // break
28513
28528
  }
@@ -28608,7 +28623,7 @@ var IDMEngine = /*#__PURE__*/function () {
28608
28623
  var possibleOPVs = ops.visibleOptionValues;
28609
28624
  //Erste Option ist immer eine Bedingung!
28610
28625
  if (p === sortedDeatureRefs.length - 1) {
28611
- for (var j = 0; j < decision.optionCombinations.length; j++) {
28626
+ var _loop5 = function _loop5() {
28612
28627
  //DecisionOptionCombination
28613
28628
  //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
28614
28629
  // z.B. bei OPT2 muss OPT1 stimmen
@@ -28617,28 +28632,33 @@ var IDMEngine = /*#__PURE__*/function () {
28617
28632
  var optionSetRef = combination.projectOptionsSetRefs.find(function (p) {
28618
28633
  return p.featureNo == Number(featureNo);
28619
28634
  });
28620
- var ref = _this5.getOptionListOfRef(optionSetRef);
28621
- if (optionSetRef && !ref) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28622
- var doUseDoc = true;
28635
+ var ref = _this5.getRowOptionListOfRef(optionSetRef);
28636
+ if (optionSetRef && ref === undefined) throw new Error('optionSetRef not implemented: ' + JSON.stringify(optionSetRef));
28637
+ var doUseDoc = ref !== null;
28623
28638
  if (doAlsoCheckFeature.length > 0) {
28624
- var _loop5 = function _loop5() {
28639
+ var _loop6 = function _loop6() {
28625
28640
  var checkFeatureNo = doAlsoCheckFeature[f];
28626
28641
  var ops = _this5.article.getArticleOptionState(checkFeatureNo);
28627
- var checkRefs = _this5.getOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28642
+ var checkRefs = _this5.getRowOptionListOfRef(combination.projectOptionsSetRefs.find(function (p) {
28628
28643
  return p.featureNo == Number(checkFeatureNo);
28629
28644
  }));
28630
- if (ops && checkRefs && ops.valCodex && !_this5.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28645
+ if (checkRefs === null || ops && checkRefs && ops.valCodex && !_this5.evalValueWithOperator(checkRefs.operator, checkRefs.options, ops.valCodex)) {
28631
28646
  doUseDoc = false;
28632
28647
  return 1; // break
28633
28648
  }
28634
28649
  };
28635
28650
  for (var f = 0; f < doAlsoCheckFeature.length; f++) {
28636
- if (_loop5()) break;
28651
+ if (_loop6()) break;
28637
28652
  }
28638
28653
  }
28639
28654
  if (doUseDoc && combination) {
28640
28655
  decision.activeCombination = combination.sequence;
28641
- if (ref) {
28656
+ if (ref && optionSetRef !== null && optionSetRef !== void 0 && optionSetRef.featureRefOp) {
28657
+ // FEATURE_REF_OP: exclude every value the operator matches (ne# excludes all but the compared value)
28658
+ possibleOPVs.forEach(function (opv, optionNo) {
28659
+ if (_this5.evalValueWithOperator(ref.operator, ref.options, optionNo)) invalidOptions[featureNo].set(optionNo, opv);
28660
+ });
28661
+ } else if (ref) {
28642
28662
  for (var i = 0; i < ref.options.length; i++) {
28643
28663
  var optionNo = ref.options[i];
28644
28664
  var myOPVData = possibleOPVs.get(optionNo);
@@ -28648,6 +28668,9 @@ var IDMEngine = /*#__PURE__*/function () {
28648
28668
  }
28649
28669
  }
28650
28670
  }
28671
+ };
28672
+ for (var j = 0; j < decision.optionCombinations.length; j++) {
28673
+ _loop5();
28651
28674
  }
28652
28675
  var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref3) {
28653
28676
  var _ref4 = _slicedToArray(_ref3, 1),
@@ -28692,6 +28715,31 @@ var IDMEngine = /*#__PURE__*/function () {
28692
28715
  }]
28693
28716
  };
28694
28717
  }
28718
+
28719
+ /**
28720
+ * The option condition of a type 0/1 decision cell. A FEATURE_REF_OP cell compares against the current value of
28721
+ * another feature (read at the cell's refLevel, like evalCombi), so it resolves to a one-option list of that value.
28722
+ * @returns null when the compared feature has no value - the comparison cannot hold, so the row must not apply;
28723
+ * undefined when the cell has no condition this engine understands
28724
+ */
28725
+ }, {
28726
+ key: "getRowOptionListOfRef",
28727
+ value: function getRowOptionListOfRef(optionSetRef) {
28728
+ var _optionSetRef$refLeve, _article$getArticleOp;
28729
+ var featureRefOp = optionSetRef === null || optionSetRef === void 0 ? void 0 : optionSetRef.featureRefOp;
28730
+ if (!featureRefOp) return this.getOptionListOfRef(optionSetRef);
28731
+ var refLevel = (_optionSetRef$refLeve = optionSetRef.refLevel) !== null && _optionSetRef$refLeve !== void 0 ? _optionSetRef$refLeve : 3;
28732
+ var article = refLevel > 1 ? this.article.getRefLevelArticle(refLevel) : this.article;
28733
+ var comparedValue = (_article$getArticleOp = article.getArticleOptionState(featureRefOp.featureNo.toString())) === null || _article$getArticleOp === void 0 ? void 0 : _article$getArticleOp.valCodex;
28734
+ if (!comparedValue) return null;
28735
+ return {
28736
+ operator: featureRefOp.operator,
28737
+ options: [comparedValue],
28738
+ optionRef: [{
28739
+ optionKey: comparedValue
28740
+ }]
28741
+ };
28742
+ }
28695
28743
  }, {
28696
28744
  key: "evalValueWithOperator",
28697
28745
  value: function evalValueWithOperator(op, value, check) {
@@ -28740,7 +28788,7 @@ var IDMEngine = /*#__PURE__*/function () {
28740
28788
  var _iterator16 = _createForOfIteratorHelper$g(actions),
28741
28789
  _step16;
28742
28790
  try {
28743
- var _loop6 = function _loop6() {
28791
+ var _loop7 = function _loop7() {
28744
28792
  var _dec$disableHistory;
28745
28793
  var action = _step16.value;
28746
28794
  var dec = allDecisions.find(function (d) {
@@ -28754,7 +28802,7 @@ var IDMEngine = /*#__PURE__*/function () {
28754
28802
  (_dec$disableHistory = dec.disableHistory) === null || _dec$disableHistory === void 0 || _dec$disableHistory.push(verb + ' By ' + decision.decisionNo);
28755
28803
  };
28756
28804
  for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
28757
- if (_loop6()) continue;
28805
+ if (_loop7()) continue;
28758
28806
  }
28759
28807
  } catch (err) {
28760
28808
  _iterator16.e(err);
@@ -28868,14 +28916,17 @@ var IDMEngine = /*#__PURE__*/function () {
28868
28916
  var formula = (_this$article$Catalog = this.article.CatalogData.idmFormulas) === null || _this$article$Catalog === void 0 ? void 0 : _this$article$Catalog[formulaKey];
28869
28917
  if (!formula) throw new Error('formula ' + formulaKey + ' not found in catalog but used in decision: ' + decision.decisionNo);
28870
28918
  var ops = this.article.getArticleOptionState(featureNo);
28871
- var freeText = this.evalMeasureFormula(formula);
28919
+ var result = this.evalMeasureFormula(formula);
28872
28920
  var option = ops === null || ops === void 0 ? void 0 : ops.val;
28873
28921
  var isThisWarning = function isThisWarning(error) {
28874
28922
  var _error$custom, _error$custom2;
28875
28923
  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;
28876
28924
  };
28877
28925
  if (option) {
28878
- this.updateArtOPV(option, featureNo, ops, freeText, freeText ? Number(freeText) : undefined);
28926
+ // the formula computes centimetres; the free text is read as text in the option's unit, like a typed value
28927
+ var measure = Number.isFinite(Number(result)) ? Number(result) : undefined;
28928
+ var freeText = measure === undefined ? undefined : String(measureInUnit(measure, ops === null || ops === void 0 ? void 0 : ops.measureUnitCode));
28929
+ this.updateArtOPV(option, featureNo, ops, freeText, measure || undefined);
28879
28930
  // an earlier convergence pass may have reported it before the feature got its option
28880
28931
  var reported = this.article.dataCreationErrors.findIndex(isThisWarning);
28881
28932
  if (reported >= 0) this.article.dataCreationErrors.splice(reported, 1);
@@ -28884,13 +28935,13 @@ var IDMEngine = /*#__PURE__*/function () {
28884
28935
  if (this.article.dataCreationErrors.some(isThisWarning)) return;
28885
28936
  this.article.pushDataCreationError({
28886
28937
  code: 'WC_0020',
28887
- 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)"),
28938
+ 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)"),
28888
28939
  severity: 'warning',
28889
28940
  custom: {
28890
28941
  decisionNo: decision.decisionNo,
28891
28942
  featureNo: featureNo,
28892
28943
  formulaKey: formulaKey,
28893
- result: freeText,
28944
+ result: result,
28894
28945
  catalogCodex: this.article.catalogCodex,
28895
28946
  articleCodex: this.article.articleCodex
28896
28947
  }
@@ -29025,7 +29076,7 @@ var IDMEngine = /*#__PURE__*/function () {
29025
29076
  this.priceDebugStack[_i].percentageValue = percentageValue;
29026
29077
  }
29027
29078
  if ((_percentageSurcharge$ = percentageSurcharge.priceFeatureGroupRef) !== null && _percentageSurcharge$ !== void 0 && _percentageSurcharge$.length) {
29028
- var _loop7 = function _loop7() {
29079
+ var _loop8 = function _loop8() {
29029
29080
  var ref = percentageSurcharge.priceFeatureGroupRef[j].priceFeatureGroupNo;
29030
29081
  var refPrice = _this6.article.priceRefs.find(function (p) {
29031
29082
  return p.PriceFeatureGroupNo == ref;
@@ -29050,7 +29101,7 @@ var IDMEngine = /*#__PURE__*/function () {
29050
29101
  }
29051
29102
  };
29052
29103
  for (var j = 0; j < percentageSurcharge.priceFeatureGroupRef.length; j++) {
29053
- _loop7();
29104
+ _loop8();
29054
29105
  }
29055
29106
  }
29056
29107
  }
@@ -29175,6 +29226,8 @@ var IDMEngine = /*#__PURE__*/function () {
29175
29226
  myArtOPS.freeText = undefined;
29176
29227
  } else if (freeText != undefined) {
29177
29228
  myArtOPS.freeText = freeText;
29229
+ // a text without a measure is a typed entry: it replaces what a formula measured before
29230
+ if (measureValue === undefined) myArtOPS.measureValue = undefined;
29178
29231
  } else if (myArtOPS.freeText == undefined || oldCodex !== myArtOPS.valCodex) {
29179
29232
  var _myArtOPS$val;
29180
29233
  //another option means another measure range, so the previous freetext must not carry over
@@ -29373,7 +29426,7 @@ var IDMEngine = /*#__PURE__*/function () {
29373
29426
  });
29374
29427
  }
29375
29428
  var initDecisionsFiltered = [];
29376
- var _loop8 = function _loop8(i) {
29429
+ var _loop9 = function _loop9(i) {
29377
29430
  if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
29378
29431
  return d.decisionNo == initDecisions[i].decisionNo;
29379
29432
  })) {
@@ -29381,7 +29434,7 @@ var IDMEngine = /*#__PURE__*/function () {
29381
29434
  }
29382
29435
  };
29383
29436
  for (var i = 0; i < initDecisions.length; i++) {
29384
- _loop8(i);
29437
+ _loop9(i);
29385
29438
  }
29386
29439
  if (quanitity >= 1) {
29387
29440
  var _ref7;
@@ -32222,8 +32275,13 @@ var DivaArticle = /*#__PURE__*/function () {
32222
32275
  _step12;
32223
32276
  try {
32224
32277
  for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
32278
+ var _ops$freeTextLang;
32225
32279
  var ops = _step12.value;
32226
- if (ops.valCodex && (!ops.isFreeText || ops.freeText !== undefined)) {
32280
+ // free text entered per language (classification) lives in freeTextLang only, in any of its languages; 'OPV_TEXT_FREI' is the codex, not a text
32281
+ var hasFreeTextLang = Object.values((_ops$freeTextLang = ops.freeTextLang) !== null && _ops$freeTextLang !== void 0 ? _ops$freeTextLang : {}).some(function (text) {
32282
+ return !!text && text !== 'OPV_TEXT_FREI';
32283
+ });
32284
+ if (ops.valCodex && (!ops.isFreeText || ops.freeText !== undefined || hasFreeTextLang)) {
32227
32285
  ret[ops.optionCodex] = ops.valCodex;
32228
32286
  }
32229
32287
  }
@@ -32735,6 +32793,7 @@ var DivaArticle = /*#__PURE__*/function () {
32735
32793
  }
32736
32794
  var articles = [].concat(_toConsumableArray(this.getAccessoireByArticleCodex(undefined, true)), _toConsumableArray(Object.values(this.partlistArticles)), _toConsumableArray(this.partListParentArticle ? [this.partListParentArticle] : []));
32737
32795
  for (var _i2 = 0; _i2 < articles.length; _i2++) {
32796
+ var _accessoiresToUpdate$;
32738
32797
  var variantValues = {};
32739
32798
  var accessoire = articles[_i2];
32740
32799
  var _iterator23 = _createForOfIteratorHelper$e(accessoire.articleOptionStates.values()),
@@ -32750,6 +32809,7 @@ var DivaArticle = /*#__PURE__*/function () {
32750
32809
  }
32751
32810
  }
32752
32811
  }
32812
+ //an accessoire can get values of several global options, the ones of the previous options must stay
32753
32813
  } catch (err) {
32754
32814
  _iterator23.e(err);
32755
32815
  } finally {
@@ -32757,7 +32817,7 @@ var DivaArticle = /*#__PURE__*/function () {
32757
32817
  }
32758
32818
  if (Object.entries(variantValues).length > 0) accessoiresToUpdate[accessoire.basketId] = {
32759
32819
  accessoire: accessoire,
32760
- variantValues: variantValues
32820
+ variantValues: _objectSpread$j(_objectSpread$j({}, (_accessoiresToUpdate$ = accessoiresToUpdate[accessoire.basketId]) === null || _accessoiresToUpdate$ === void 0 ? void 0 : _accessoiresToUpdate$.variantValues), variantValues)
32761
32821
  };
32762
32822
  }
32763
32823
  }
@@ -33252,7 +33312,7 @@ var DivaArticle = /*#__PURE__*/function () {
33252
33312
  break;
33253
33313
  }
33254
33314
  _context.next = 4;
33255
- return import('./ShelfPlanner-8eeb52df.js');
33315
+ return import('./ShelfPlanner-603c60f4.js');
33256
33316
  case 4:
33257
33317
  _yield$import = _context.sent;
33258
33318
  ShelfPlanner = _yield$import["default"];
@@ -34867,7 +34927,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34867
34927
  key: "updateCfgValues",
34868
34928
  value: (function () {
34869
34929
  var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
34870
- var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
34930
+ var maxPriceOfGroupCodex, setByFeatureVariantValues, key, reevaluateOnPartlistChange, partlistBefore, partlistArticlesToLoad, round, valuesBefore;
34871
34931
  return _regeneratorRuntime.wrap(function _callee10$(_context11) {
34872
34932
  while (1) switch (_context11.prev = _context11.next) {
34873
34933
  case 0:
@@ -34908,13 +34968,44 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34908
34968
  _context11.next = 12;
34909
34969
  return this.updateLastElement(article);
34910
34970
  case 12:
34911
- _context11.next = 14;
34971
+ reevaluateOnPartlistChange = !dontLoadPartlist && !calcVariantPrice && !article.hasType1Dependencies && !article.CatalogData.isIDMFormat;
34972
+ partlistBefore = reevaluateOnPartlistChange ? this.partlistState(article) : '';
34973
+ _context11.next = 16;
34912
34974
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
34913
- case 14:
34975
+ case 16:
34976
+ partlistArticlesToLoad = _context11.sent;
34977
+ if (!reevaluateOnPartlistChange) {
34978
+ _context11.next = 32;
34979
+ break;
34980
+ }
34981
+ round = 0;
34982
+ case 19:
34983
+ if (!(round < 3 && this.partlistState(article) !== partlistBefore)) {
34984
+ _context11.next = 32;
34985
+ break;
34986
+ }
34987
+ valuesBefore = JSON.stringify(article.VariantValues);
34988
+ maxPriceOfGroupCodex = article.engine.updateArticleOptionTree();
34989
+ article.engine.evalDecisions(onlyUpdateOnce);
34990
+ if (!(JSON.stringify(article.VariantValues) === valuesBefore)) {
34991
+ _context11.next = 25;
34992
+ break;
34993
+ }
34994
+ return _context11.abrupt("break", 32);
34995
+ case 25:
34996
+ partlistBefore = this.partlistState(article);
34997
+ _context11.next = 28;
34998
+ return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
34999
+ case 28:
34914
35000
  partlistArticlesToLoad = _context11.sent;
34915
- _context11.next = 17;
35001
+ case 29:
35002
+ round++;
35003
+ _context11.next = 19;
35004
+ break;
35005
+ case 32:
35006
+ _context11.next = 34;
34916
35007
  return this.evalOpvsOnOpvsConstructionRules(article);
34917
- case 17:
35008
+ case 34:
34918
35009
  //danach Preise berechnen
34919
35010
  if (!dontCalcPrice) {
34920
35011
  article.engine.calcConfigPrice(maxPriceOfGroupCodex, 2);
@@ -34924,7 +35015,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34924
35015
  }
34925
35016
  }
34926
35017
  return _context11.abrupt("return", partlistArticlesToLoad);
34927
- case 19:
35018
+ case 36:
34928
35019
  case "end":
34929
35020
  return _context11.stop();
34930
35021
  }
@@ -34934,7 +35025,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
34934
35025
  return _updateCfgValues.apply(this, arguments);
34935
35026
  }
34936
35027
  return updateCfgValues;
34937
- }())
35028
+ }()
35029
+ /**
35030
+ * The partlist children with the values of their own options - what option rules of the parent can read through
35031
+ * them. Options the parent has itself are left out: the children get them from the parent, the tree saw them already.
35032
+ */
35033
+ )
35034
+ }, {
35035
+ key: "partlistState",
35036
+ value: function partlistState(article) {
35037
+ var _article$partlistArti;
35038
+ var parentOptions = new Set(article.articleOptionStatesKeys);
35039
+ return JSON.stringify(Object.values((_article$partlistArti = article.partlistArticles) !== null && _article$partlistArti !== void 0 ? _article$partlistArti : {}).map(function (partlistArticle) {
35040
+ return [partlistArticle.articleCodex, Object.entries(partlistArticle.VariantValues).filter(function (_ref) {
35041
+ var _ref2 = _slicedToArray(_ref, 1),
35042
+ optionCodex = _ref2[0];
35043
+ return !parentOptions.has(optionCodex);
35044
+ })];
35045
+ }));
35046
+ }
34938
35047
  }, {
34939
35048
  key: "updateLastElement",
34940
35049
  value: function () {
@@ -42034,7 +42143,7 @@ var DivaSet = /*#__PURE__*/function () {
42034
42143
  break;
42035
42144
  }
42036
42145
  _context5.next = 3;
42037
- return import('./DoorPlanner-3670fee0.js');
42146
+ return import('./DoorPlanner-059569a8.js');
42038
42147
  case 3:
42039
42148
  _yield$import = _context5.sent;
42040
42149
  DoorPlanner = _yield$import["default"];
@@ -49917,19 +50026,21 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49917
50026
  if (!(ops !== null && ops !== void 0 && ops.val)) return 1; // continue
49918
50027
  var optionCodex = (ops.option.parentOptionCodex ? ops.option.parentOptionCodex + '.' : '') + ((_ops$optionOcd4 = ops.optionOcd) !== null && _ops$optionOcd4 !== void 0 ? _ops$optionOcd4 : ops.option.codex);
49919
50028
  changedValues[optionCodex] = ((_ops$multiSelects2 = ops.multiSelects) !== null && _ops$multiSelects2 !== void 0 && _ops$multiSelects2.length ? ops.multiselectSorted : [ops.val]).map(function (val) {
49920
- var _val$ocd, _ops$freeTextLang3, _ops$freeTextLang4, _val$vCodex, _ops$option$ocd, _ops$val, _ops$val2;
50029
+ var _val$ocd, _ops$freeTextLang2, _ops$freeTextLang3, _val$vCodex, _ops$option$ocd, _ops$val, _ops$val2;
49921
50030
  var attributeValue = (_val$ocd = val.ocd) !== null && _val$ocd !== void 0 ? _val$ocd : val.codex;
49922
50031
  if (ops.isFreeText) {
49923
- var _ops$freeTextLang;
49924
50032
  if (ops.measureUnit && ops.freeText) {
49925
50033
  if (isNaN(Number(ops.freeText.replace('.', '')))) {
49926
50034
  attributeValue = '';
49927
50035
  } else {
49928
50036
  attributeValue = ops.freeText;
49929
50037
  }
49930
- } else if ((_ops$freeTextLang = ops.freeTextLang) !== null && _ops$freeTextLang !== void 0 && _ops$freeTextLang['DE'] && 'OPV_TEXT_FREI' !== ops.freeTextLang['DE']) {
49931
- var _ops$freeTextLang$FR, _ops$freeTextLang$IT;
49932
- 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 : '');
50038
+ } else if (ops.freeTextLang && Object.values(ops.freeTextLang).some(function (text) {
50039
+ return !!text && text !== 'OPV_TEXT_FREI';
50040
+ })) {
50041
+ var _ops$freeTextLang$DE, _ops$freeTextLang$FR, _ops$freeTextLang$IT;
50042
+ // the value carries every language, so a text without German must still be kept
50043
+ 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 : '');
49933
50044
  } else if (ops.freeText) {
49934
50045
  attributeValue = ops.freeText;
49935
50046
  } else {
@@ -49941,8 +50052,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49941
50052
  }
49942
50053
  var name = val.name;
49943
50054
  if (ops.isFreeText) {
49944
- var _ref, _ops$freeTextLang$DE, _ops$freeTextLang2;
49945
- 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 : '';
50055
+ var _ref, _ops$freeTextLang$DE2, _ops$freeTextLang;
50056
+ 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 : '';
49946
50057
  if (ops.measureUnit && name !== '') {
49947
50058
  name = isNaN(Number(name)) ? '' : Number(name).toString();
49948
50059
  attributeValue = name;
@@ -49958,8 +50069,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
49958
50069
  attributeValue: attributeValue,
49959
50070
  hexColor: val.hexColor,
49960
50071
  attributeValueNameDe: ops.isFreeText ? name : valueName('DE'),
49961
- attributeValueNameFr: ops.isFreeText ? (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['FR'] : valueName('FR'),
49962
- attributeValueNameIt: ops.isFreeText ? (_ops$freeTextLang4 = ops.freeTextLang) === null || _ops$freeTextLang4 === void 0 ? void 0 : _ops$freeTextLang4['IT'] : valueName('IT'),
50072
+ attributeValueNameFr: ops.isFreeText ? (_ops$freeTextLang2 = ops.freeTextLang) === null || _ops$freeTextLang2 === void 0 ? void 0 : _ops$freeTextLang2['FR'] : valueName('FR'),
50073
+ attributeValueNameIt: ops.isFreeText ? (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['IT'] : valueName('IT'),
49963
50074
  attributeValueVCodex: (_val$vCodex = val === null || val === void 0 ? void 0 : val.vCodex) !== null && _val$vCodex !== void 0 ? _val$vCodex : undefined,
49964
50075
  position: opsKeys.indexOf(ops.option.codex),
49965
50076
  attributeName: ops.option.name,
@@ -50005,7 +50116,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50005
50116
  break;
50006
50117
  case 3:
50007
50118
  _context12.next = 5;
50008
- return import('./PfisterWWSHandler-7593c211.js');
50119
+ return import('./PfisterWWSHandler-d66b4d8d.js');
50009
50120
  case 5:
50010
50121
  _yield$import = _context12.sent;
50011
50122
  PfisterWWSHandler = _yield$import["default"];
@@ -50013,7 +50124,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50013
50124
  return _context12.abrupt("break", 27);
50014
50125
  case 9:
50015
50126
  _context12.next = 11;
50016
- return import('./LiviqueWWSHandler-2cd9654b.js');
50127
+ return import('./LiviqueWWSHandler-4135bbe1.js');
50017
50128
  case 11:
50018
50129
  _yield$import2 = _context12.sent;
50019
50130
  LiviqueWWSHandler = _yield$import2["default"];
@@ -50021,7 +50132,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50021
50132
  return _context12.abrupt("break", 27);
50022
50133
  case 15:
50023
50134
  _context12.next = 17;
50024
- return import('./SeriousBasketHandler-b13a4be4.js');
50135
+ return import('./SeriousBasketHandler-71988cad.js');
50025
50136
  case 17:
50026
50137
  _yield$import3 = _context12.sent;
50027
50138
  SeriousWWSHandler = _yield$import3["default"];
@@ -50029,7 +50140,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
50029
50140
  return _context12.abrupt("break", 27);
50030
50141
  case 21:
50031
50142
  _context12.next = 23;
50032
- return import('./StandardWWSHandler-33aac025.js');
50143
+ return import('./StandardWWSHandler-c4076650.js');
50033
50144
  case 23:
50034
50145
  _yield$import4 = _context12.sent;
50035
50146
  StandardWWSHandler = _yield$import4["default"];
@@ -51416,7 +51527,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
51416
51527
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
51417
51528
  bootMark('signalr: chunk import start');
51418
51529
  _context3.next = 3;
51419
- return import('./Host3DSignalR-68938df9.js');
51530
+ return import('./Host3DSignalR-b9407002.js');
51420
51531
  case 3:
51421
51532
  _yield$import = _context3.sent;
51422
51533
  Host3DSignalR = _yield$import["default"];
@@ -53161,7 +53272,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
53161
53272
  break;
53162
53273
  case 8:
53163
53274
  _context5.next = 10;
53164
- return import('./DivaStandardPlanner-712385df.js');
53275
+ return import('./DivaStandardPlanner-5c0a391a.js');
53165
53276
  case 10:
53166
53277
  _yield$import = _context5.sent;
53167
53278
  DivaStandardPlanner = _yield$import["default"];
@@ -53172,7 +53283,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
53172
53283
  return _context5.abrupt("break", 21);
53173
53284
  case 15:
53174
53285
  _context5.next = 17;
53175
- return import('./DivaBoxPlanner-570bd517.js');
53286
+ return import('./DivaBoxPlanner-cd23c571.js');
53176
53287
  case 17:
53177
53288
  _yield$import2 = _context5.sent;
53178
53289
  DivaBoxPlanner = _yield$import2["default"];
@@ -58961,6 +59072,8 @@ function _loadAndRepairBasket() {
58961
59072
  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; }
58962
59073
  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(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; }
58963
59074
  var PlannerElementData = /*#__PURE__*/function () {
59075
+ //height the element had when its worldPosCenter was set - the configurator changes plannerData in place
59076
+
58964
59077
  function PlannerElementData(setId, basketId, _elementId, plannerType) {
58965
59078
  _classCallCheck(this, PlannerElementData);
58966
59079
  _defineProperty(this, "planElement", void 0);
@@ -58973,6 +59086,7 @@ var PlannerElementData = /*#__PURE__*/function () {
58973
59086
  //When reloading the element this array saves the previous docking points for redocking
58974
59087
  _defineProperty(this, "plannerType", void 0);
58975
59088
  _defineProperty(this, "basketId", void 0);
59089
+ _defineProperty(this, "placedHeight", void 0);
58976
59090
  this.basketId = basketId;
58977
59091
  this.planElement = {
58978
59092
  elementId: _elementId,
@@ -59200,8 +59314,16 @@ var PlannerElementData = /*#__PURE__*/function () {
59200
59314
  return this.planElement.worldPosCenter;
59201
59315
  },
59202
59316
  set: function set(pos) {
59317
+ var _this$planElement$pla6;
59203
59318
  this.planElement.worldPosCenter = pos;
59319
+ this.placedHeight = (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.height;
59204
59320
  }
59321
+
59322
+ /**
59323
+ * Keeps an element that stands on the floor (worldPosCenter.y == height / 2) on the floor after its height changed,
59324
+ * e.g. a bed configured without headboard: the 3D host centers the article on worldPosCenter.y. Elements placed
59325
+ * otherwise keep their y.
59326
+ */
59205
59327
  }, {
59206
59328
  key: "WorldPosCenterIgnoreOLF",
59207
59329
  get: function get() {
@@ -59229,7 +59351,7 @@ var PlannerElementData = /*#__PURE__*/function () {
59229
59351
  if (!this.planElement.plannerData) return;
59230
59352
  var centerDir = new Vector2(this.planElement.plannerData.width / 2, this.planElement.plannerData.depth / 2);
59231
59353
  centerDir = Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
59232
- this.planElement.worldPosCenter = new Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
59354
+ this.WorldPosCenter = new Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
59233
59355
  }
59234
59356
 
59235
59357
  /**
@@ -59278,11 +59400,26 @@ var PlannerElementData = /*#__PURE__*/function () {
59278
59400
  var oltOffsetFromOlfCorner = new Vector2(this.planElement.oltLeft + this.planElement.oltWidth / 2, this.planElement.oltTop + this.planElement.oltDepth / 2);
59279
59401
  var olfCenterOffset = new Vector2(oltOffsetFromOlfCorner.x - olfW / 2, oltOffsetFromOlfCorner.y - olfD / 2);
59280
59402
  var olfCenterOffsetRot = Vector2.rotateOrigin(olfCenterOffset, this.planElement.rotDeg);
59281
- this.planElement.worldPosCenter = new Vector3(oltCenter.x - olfCenterOffsetRot.x, oltCenter.y, oltCenter.z - olfCenterOffsetRot.y);
59403
+ this.WorldPosCenter = new Vector3(oltCenter.x - olfCenterOffsetRot.x, oltCenter.y, oltCenter.z - olfCenterOffsetRot.y);
59282
59404
  } else {
59283
- this.planElement.worldPosCenter = oltCenter;
59405
+ this.WorldPosCenter = oltCenter;
59284
59406
  }
59285
59407
  }
59408
+ }, {
59409
+ key: "keepOnFloorOnHeightChange",
59410
+ value: function keepOnFloorOnHeightChange() {
59411
+ var _this$planElement$pla7;
59412
+ var height = (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.height;
59413
+ if (!Number.isFinite(height) || !Number.isFinite(this.placedHeight) || height == this.placedHeight) return;
59414
+ var center = this.planElement.worldPosCenter;
59415
+ if (!PlannerElementData.standsOnFloor(center.y, this.placedHeight)) return;
59416
+ this.WorldPosCenter = new Vector3(center.x, height / 2, center.z);
59417
+ }
59418
+
59419
+ /**
59420
+ * Whether an element whose center is at centerY and that is height high stands on the floor (centerY == height / 2).
59421
+ * The one rule for height changes and article switches, so both keep the same elements on the floor.
59422
+ */
59286
59423
  }, {
59287
59424
  key: "updateDeltaTrans",
59288
59425
  value: function updateDeltaTrans(deltaMove, deltaRotDeg, rotCorrection, correctAngle, turningPoint) {
@@ -59421,18 +59558,18 @@ var PlannerElementData = /*#__PURE__*/function () {
59421
59558
  }, {
59422
59559
  key: "DoSetWidthFromSVG",
59423
59560
  get: function get() {
59424
- var _this$planElement$pla6, _this$planElement$pla7;
59425
- var width = (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.width;
59426
- return !(width != undefined && width > 0) || !!((_this$planElement$pla7 = this.planElement.plannerData) !== null && _this$planElement$pla7 !== void 0 && _this$planElement$pla7.widthFromSVG);
59561
+ var _this$planElement$pla8, _this$planElement$pla9;
59562
+ var width = (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.width;
59563
+ return !(width != undefined && width > 0) || !!((_this$planElement$pla9 = this.planElement.plannerData) !== null && _this$planElement$pla9 !== void 0 && _this$planElement$pla9.widthFromSVG);
59427
59564
  }
59428
59565
 
59429
59566
  /** True while the depth is no measure of the article, see DoSetWidthFromSVG. */
59430
59567
  }, {
59431
59568
  key: "DoSetDepthFromSVG",
59432
59569
  get: function get() {
59433
- var _this$planElement$pla8, _this$planElement$pla9;
59434
- var depth = (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.depth;
59435
- return !(depth != undefined && depth > 0) || !!((_this$planElement$pla9 = this.planElement.plannerData) !== null && _this$planElement$pla9 !== void 0 && _this$planElement$pla9.depthFromSVG);
59570
+ var _this$planElement$pla10, _this$planElement$pla11;
59571
+ var depth = (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.depth;
59572
+ return !(depth != undefined && depth > 0) || !!((_this$planElement$pla11 = this.planElement.plannerData) !== null && _this$planElement$pla11 !== void 0 && _this$planElement$pla11.depthFromSVG);
59436
59573
  }
59437
59574
  }, {
59438
59575
  key: "WidthFromSVG",
@@ -59456,38 +59593,38 @@ var PlannerElementData = /*#__PURE__*/function () {
59456
59593
  }, {
59457
59594
  key: "SvgFileName",
59458
59595
  get: function get() {
59459
- var _this$planElement$pla10;
59460
- return (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.curSVG;
59596
+ var _this$planElement$pla12;
59597
+ return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.curSVG;
59461
59598
  }
59462
59599
  }, {
59463
59600
  key: "Width",
59464
59601
  get: function get() {
59465
- var _this$planElement$pla11;
59466
- return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.width;
59602
+ var _this$planElement$pla13;
59603
+ return (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.width;
59467
59604
  }
59468
59605
  }, {
59469
59606
  key: "Height",
59470
59607
  get: function get() {
59471
- var _this$planElement$pla12;
59472
- return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.height;
59608
+ var _this$planElement$pla14;
59609
+ return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.height;
59473
59610
  }
59474
59611
  }, {
59475
59612
  key: "Depth",
59476
59613
  get: function get() {
59477
- var _this$planElement$pla13;
59478
- return (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.depth;
59614
+ var _this$planElement$pla15;
59615
+ return (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.depth;
59479
59616
  }
59480
59617
  }, {
59481
59618
  key: "HasAVL",
59482
59619
  get: function get() {
59483
- var _this$planElement$pla14;
59484
- return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.hasAVL;
59620
+ var _this$planElement$pla16;
59621
+ return (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.hasAVL;
59485
59622
  }
59486
59623
  }, {
59487
59624
  key: "HasAVR",
59488
59625
  get: function get() {
59489
- var _this$planElement$pla15;
59490
- return (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.hasAVR;
59626
+ var _this$planElement$pla17;
59627
+ return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.hasAVR;
59491
59628
  }
59492
59629
  }, {
59493
59630
  key: "HasAVO",
@@ -59611,8 +59748,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59611
59748
  }, {
59612
59749
  key: "svgBefore",
59613
59750
  get: function get() {
59614
- var _this$planElement$pla16;
59615
- return (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.svgBefore;
59751
+ var _this$planElement$pla18;
59752
+ return (_this$planElement$pla18 = this.planElement.plannerData) === null || _this$planElement$pla18 === void 0 ? void 0 : _this$planElement$pla18.svgBefore;
59616
59753
  },
59617
59754
  set: function set(svg) {
59618
59755
  if (this.planElement.plannerData) this.planElement.plannerData.svgBefore = svg;
@@ -59620,8 +59757,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59620
59757
  }, {
59621
59758
  key: "svgAfter",
59622
59759
  get: function get() {
59623
- var _this$planElement$pla17;
59624
- return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.svgAfter;
59760
+ var _this$planElement$pla19;
59761
+ return (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.svgAfter;
59625
59762
  },
59626
59763
  set: function set(svg) {
59627
59764
  if (this.planElement.plannerData) this.planElement.plannerData.svgAfter = svg;
@@ -59703,14 +59840,14 @@ var PlannerElementData = /*#__PURE__*/function () {
59703
59840
  }, {
59704
59841
  key: "getIsNotDockedAccessoire",
59705
59842
  value: function getIsNotDockedAccessoire() {
59706
- var _this$planElement$pla18;
59707
- return !!((_this$planElement$pla18 = this.planElement.plannerData) !== null && _this$planElement$pla18 !== void 0 && _this$planElement$pla18.isNotDockedAccessoire);
59843
+ var _this$planElement$pla20;
59844
+ return !!((_this$planElement$pla20 = this.planElement.plannerData) !== null && _this$planElement$pla20 !== void 0 && _this$planElement$pla20.isNotDockedAccessoire);
59708
59845
  }
59709
59846
  }, {
59710
59847
  key: "getParentElementId",
59711
59848
  value: function getParentElementId() {
59712
- var _this$planElement$pla19;
59713
- return (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.parentElementId;
59849
+ var _this$planElement$pla21;
59850
+ return (_this$planElement$pla21 = this.planElement.plannerData) === null || _this$planElement$pla21 === void 0 ? void 0 : _this$planElement$pla21.parentElementId;
59714
59851
  }
59715
59852
  }, {
59716
59853
  key: "getElementId",
@@ -59742,12 +59879,12 @@ var PlannerElementData = /*#__PURE__*/function () {
59742
59879
  key: "getWorldPosCornerOLF",
59743
59880
  value: function getWorldPosCornerOLF() {
59744
59881
  if (this.HasOLFPolygon && this.planElement.olfWidth != null && this.planElement.olfDepth != null) {
59745
- var _this$planElement$pla20, _this$planElement$pla21;
59882
+ var _this$planElement$pla22, _this$planElement$pla23;
59746
59883
  var olfW = this.planElement.olfWidth / DivaUtils.UnitRecalc;
59747
59884
  var olfD = this.planElement.olfDepth / DivaUtils.UnitRecalc;
59748
59885
  var olfCornerDir = new Vector2(-olfW / 2, -olfD / 2);
59749
59886
  olfCornerDir = Vector2.rotateOrigin(olfCornerDir, this.planElement.rotDeg);
59750
- 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);
59887
+ 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);
59751
59888
  }
59752
59889
  return this.WorldPosCorner;
59753
59890
  }
@@ -59808,8 +59945,8 @@ var PlannerElementData = /*#__PURE__*/function () {
59808
59945
  }, {
59809
59946
  key: "getFilterAVL",
59810
59947
  value: function getFilterAVL() {
59811
- var _this$planElement$pla22;
59812
- return this.planElement.plannerData ? (_this$planElement$pla22 = this.planElement.plannerData) === null || _this$planElement$pla22 === void 0 ? void 0 : _this$planElement$pla22.AVLFilter : [];
59948
+ var _this$planElement$pla24;
59949
+ return this.planElement.plannerData ? (_this$planElement$pla24 = this.planElement.plannerData) === null || _this$planElement$pla24 === void 0 ? void 0 : _this$planElement$pla24.AVLFilter : [];
59813
59950
  }
59814
59951
  }, {
59815
59952
  key: "getFilterAVR",
@@ -59893,14 +60030,14 @@ var PlannerElementData = /*#__PURE__*/function () {
59893
60030
  }, {
59894
60031
  key: "getAccessoires",
59895
60032
  value: function getAccessoires() {
59896
- var _this$planElement$pla23;
59897
- return this.planElement.plannerData ? (_this$planElement$pla23 = this.planElement.plannerData) === null || _this$planElement$pla23 === void 0 ? void 0 : _this$planElement$pla23.accessoireList : [];
60033
+ var _this$planElement$pla25;
60034
+ return this.planElement.plannerData ? (_this$planElement$pla25 = this.planElement.plannerData) === null || _this$planElement$pla25 === void 0 ? void 0 : _this$planElement$pla25.accessoireList : [];
59898
60035
  }
59899
60036
  }, {
59900
60037
  key: "getSVGsWithFormula",
59901
60038
  value: function getSVGsWithFormula() {
59902
- var _this$planElement$pla24;
59903
- return (_this$planElement$pla24 = this.planElement.plannerData) === null || _this$planElement$pla24 === void 0 ? void 0 : _this$planElement$pla24.svgsWithFormula;
60039
+ var _this$planElement$pla26;
60040
+ return (_this$planElement$pla26 = this.planElement.plannerData) === null || _this$planElement$pla26 === void 0 ? void 0 : _this$planElement$pla26.svgsWithFormula;
59904
60041
  }
59905
60042
  /** OLT offset from OLF corner (cm). When HasOLFPolygon, DP LocalWorldPos is OLF-relative; subtract this to get OLT-relative. */
59906
60043
  }, {
@@ -59918,14 +60055,19 @@ var PlannerElementData = /*#__PURE__*/function () {
59918
60055
  }, {
59919
60056
  key: "getVaraintValuesInfluencingAVLAVRFilter",
59920
60057
  value: function getVaraintValuesInfluencingAVLAVRFilter() {
59921
- var _this$planElement$pla25;
59922
- return (_this$planElement$pla25 = this.planElement.plannerData) === null || _this$planElement$pla25 === void 0 ? void 0 : _this$planElement$pla25.varaintValuesInfluencingAVLAVRFilter;
60058
+ var _this$planElement$pla27;
60059
+ return (_this$planElement$pla27 = this.planElement.plannerData) === null || _this$planElement$pla27 === void 0 ? void 0 : _this$planElement$pla27.varaintValuesInfluencingAVLAVRFilter;
59923
60060
  }
59924
60061
  }, {
59925
60062
  key: "getCurrentAccessorires",
59926
60063
  value: function getCurrentAccessorires() {
59927
- var _this$planElement$pla26;
59928
- return this.planElement.plannerData ? (_this$planElement$pla26 = this.planElement.plannerData) === null || _this$planElement$pla26 === void 0 ? void 0 : _this$planElement$pla26.currentAccessorires : [];
60064
+ var _this$planElement$pla28;
60065
+ return this.planElement.plannerData ? (_this$planElement$pla28 = this.planElement.plannerData) === null || _this$planElement$pla28 === void 0 ? void 0 : _this$planElement$pla28.currentAccessorires : [];
60066
+ }
60067
+ }], [{
60068
+ key: "standsOnFloor",
60069
+ value: function standsOnFloor(centerY, height) {
60070
+ return Number.isFinite(height) && Math.abs(centerY - height / 2) <= 0.01;
59929
60071
  }
59930
60072
  }]);
59931
60073
  }();