@crystaldesign/web-planner-logic 25.1.0-beta.8 → 25.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/build/cjs/{DivaBoxPlanner-57bdc557.js → DivaBoxPlanner-419deff0.js} +1756 -896
  2. package/build/cjs/{DivaStandardPlanner-61b70e1a.js → DivaStandardPlanner-452a7c54.js} +17 -6
  3. package/build/cjs/{DoorPlanner-a7d48a7a.js → DoorPlanner-f3f26c1d.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-fa0154b6.js → Host3DSignalR-97efb5ee.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-00b6d2e3.js → LiviqueWWSHandler-dc0bf512.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-f7c657da.js → PfisterWWSHandler-9a9e6041.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-b6e95cb1.js → PlannerHandler2D-f63a421a.js} +53 -6
  8. package/build/cjs/{SeriousBasketHandler-4f9f6746.js → SeriousBasketHandler-f21d468a.js} +17 -13
  9. package/build/cjs/{ShelfPlanner-0ee99038.js → ShelfPlanner-1165e6f2.js} +5 -5
  10. package/build/cjs/{StandardWWSHandler-2adead07.js → StandardWWSHandler-899f51d5.js} +1 -1
  11. package/build/cjs/{index-33b7d8f6.js → index-eb6ae406.js} +196 -117
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-ae772099.js → DivaBoxPlanner-ecd0e7d9.js} +1755 -895
  14. package/build/esm/{DivaStandardPlanner-74a7a303.js → DivaStandardPlanner-fd494faa.js} +17 -6
  15. package/build/esm/{DoorPlanner-3d5c6695.js → DoorPlanner-c811330f.js} +1 -1
  16. package/build/esm/{Host3DSignalR-b6bc8b77.js → Host3DSignalR-2bfc7356.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-4fad5328.js → LiviqueWWSHandler-2f2c63a7.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-9ab4947e.js → PfisterWWSHandler-b7dd5d62.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-cd1b49dc.js → PlannerHandler2D-de8dd1f2.js} +53 -6
  20. package/build/esm/{SeriousBasketHandler-cfa3acb7.js → SeriousBasketHandler-a0a3258f.js} +17 -13
  21. package/build/esm/{ShelfPlanner-9db5a7d8.js → ShelfPlanner-f47cd0f7.js} +5 -5
  22. package/build/esm/{StandardWWSHandler-daabaf26.js → StandardWWSHandler-8b675fe0.js} +1 -1
  23. package/build/esm/{index-d11d5210.js → index-14b412d8.js} +196 -117
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +3 -1
  26. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +3 -1
  28. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +5 -0
  30. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +4 -2
  32. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts +2 -0
  34. package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +3 -1
  36. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Planner/PlannerElementDataType.d.ts +4 -0
  38. package/build/types/web-planner-logic/src/interface/Planner/PlannerElementDataType.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/ReturnTypes/index.d.ts +1 -0
  40. package/build/types/web-planner-logic/src/interface/ReturnTypes/index.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
  42. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +13 -1
  44. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +0 -1
  48. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts +148 -33
  50. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerPartlistHelper.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +2 -2
  53. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +3 -1
  55. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +3 -1
  57. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +4 -2
  59. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +7 -0
  62. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -1
  65. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/model/Planner/BoxPlannerData.d.ts +28 -0
  67. package/build/types/web-planner-logic/src/model/Planner/BoxPlannerData.d.ts.map +1 -0
  68. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +5 -0
  69. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/model/Planner/PlannerInteractionData.d.ts +29 -0
  71. package/build/types/web-planner-logic/src/model/Planner/PlannerInteractionData.d.ts.map +1 -0
  72. package/build/types/web-planner-logic/src/test/datas/idm_text_routine.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/test/datas/pfister_test_routine.d.ts.map +1 -1
  74. package/package.json +2 -2
@@ -17085,11 +17085,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
17085
17085
  }, {
17086
17086
  key: "getOPTDefaultInVisible",
17087
17087
  value: function getOPTDefaultInVisible(optionCodex) {
17088
- return this.catalogArticle.articleOptions[optionCodex].isInvisible;
17089
- /*if (this.catalogArticle.articleOptions[optionCodex]) {
17090
- return this.catalogArticle.articleOptions[optionCodex].isInvisible;
17091
- }
17092
- return false;*/
17088
+ var _this$catalogArticle$4;
17089
+ return (_this$catalogArticle$4 = this.catalogArticle.articleOptions[optionCodex]) === null || _this$catalogArticle$4 === void 0 ? void 0 : _this$catalogArticle$4.isInvisible;
17093
17090
  }
17094
17091
 
17095
17092
  /*following functions contain Loadingprocess of the ArticleData recived by the API. It includes
@@ -17390,7 +17387,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
17390
17387
  var optionsDeletedCount = 0;
17391
17388
  for (var m = 0; m < myDecision.Options.length; m++) {
17392
17389
  if (!myOptOrder.includes(myDecision.Options[m])) {
17393
- var text = 'Attention: a Decision refers to a Option that does not exist on the article';
17390
+ var text = 'Attention: a Decision refers to a Option that does not exist on the article. DecNr: ' + myDecision.Number + ' option: ' + myDecision.Options[m] + ' articleCodex: ' + this.articleCodex;
17394
17391
  var stack = {
17395
17392
  decisionNr: myDecision.Number,
17396
17393
  Option: myDecision.Options[m],
@@ -19227,7 +19224,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
19227
19224
  }
19228
19225
  }, {
19229
19226
  key: "repairVariantValues",
19230
- value: function repairVariantValues(variantValues) {
19227
+ value: function repairVariantValues(variantValues, articleCodex) {
19228
+ if (variantValues['OPTPLANNERSWITCH']) variantValues['OPTPLANNERSWITCH'] = 'OPV' + articleCodex;
19231
19229
  if (!this.catalogData.repairVariantValues) return variantValues;
19232
19230
  for (var key in variantValues) {
19233
19231
  var opt_opv = key + ':' + variantValues[key];
@@ -20671,8 +20669,6 @@ function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
20671
20669
  function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20672
20670
  var LOG$d = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
20673
20671
  var DivaArticle = /*#__PURE__*/function () {
20674
- //Hier steht die aktuelle Konfiguration
20675
-
20676
20672
  function DivaArticle(set, _basketId, initParams, articleData, catalogData) {
20677
20673
  var _this = this,
20678
20674
  _initParams$noPrice,
@@ -20683,6 +20679,8 @@ var DivaArticle = /*#__PURE__*/function () {
20683
20679
  _defineProperty__default["default"](this, "articleOptionStatesData", void 0);
20684
20680
  //Dieses Objekt speichert den aktuellen Werte, Zustand eines Optionsbaumes und Preise
20685
20681
  _defineProperty__default["default"](this, "actPlannerData", void 0);
20682
+ //Hier steht die aktuelle Konfiguration
20683
+ _defineProperty__default["default"](this, "decisionDebugStacks", []);
20686
20684
  _defineProperty__default["default"](this, "getPreviousPartlistArticle", function (articleCodex) {
20687
20685
  var _this$article$previou;
20688
20686
  var prevPartlistArticles = (_this$article$previou = _this.article.previousPartlistArticles) !== null && _this$article$previou !== void 0 ? _this$article$previou : {};
@@ -22995,8 +22993,7 @@ var DivaArticle = /*#__PURE__*/function () {
22995
22993
  }, {
22996
22994
  key: "setOP",
22997
22995
  value: function setOP(OptionCodex, myOPVItem, freeText, doDefine) {
22998
- var myOptionStates = this.articleOptionStates;
22999
- var myArtOPS = myOptionStates[OptionCodex];
22996
+ var myArtOPS = this.getArticleOptionState(OptionCodex);
23000
22997
  if (!myArtOPS) {
23001
22998
  LOG$d.error(new DivaUtils.DivaError('OptionCodex: ' + OptionCodex + ' in articleCodex: ' + this.articleCodex + ' not found!'));
23002
22999
  return;
@@ -23104,13 +23101,13 @@ var DivaArticle = /*#__PURE__*/function () {
23104
23101
  if (myPartListPos.ItemRefArticles) {
23105
23102
  var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
23106
23103
  if (decisions) {
23107
- var _decisions$;
23108
- var relationTypeNone = ((_decisions$ = decisions[0]) === null || _decisions$ === void 0 ? void 0 : _decisions$.RelationType) !== 'PosCount';
23109
23104
  var partlistAdded = false;
23110
23105
  for (var c = 0; c < decisions.length; c++) {
23106
+ var _decisions$c, _myDecisionVal;
23107
+ var relationTypeNone = ((_decisions$c = decisions[c]) === null || _decisions$c === void 0 ? void 0 : _decisions$c.RelationType) !== 'PosCount';
23111
23108
  var myDecisionNumber = decisions[c].DecisionNumber;
23112
- var myDecisionVal = this.checkDecisionNumber(myDecisionNumber);
23113
- if (myDecisionVal.isValidDOC || relationTypeNone) {
23109
+ var myDecisionVal = relationTypeNone ? undefined : this.checkDecisionNumber(myDecisionNumber);
23110
+ if ((_myDecisionVal = myDecisionVal) !== null && _myDecisionVal !== void 0 && _myDecisionVal.isValidDOC || relationTypeNone) {
23114
23111
  // wenn die Decision gültig, gelten die ItemRefArticles
23115
23112
  partlistAdded = true;
23116
23113
  partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, myDecisionNumber);
@@ -23134,22 +23131,23 @@ var DivaArticle = /*#__PURE__*/function () {
23134
23131
  }, {
23135
23132
  key: "addPartilstToPartlistArticlesToLoad",
23136
23133
  value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
23137
- var _myPartListPos$Option;
23134
+ var _myPartListPos$Option,
23135
+ _this3 = this;
23138
23136
  var allDecisions = this.article.catalogArticle.articleDecisions;
23139
23137
  var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
23140
23138
  var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';').map(function (o) {
23141
23139
  return 'OPT' + o;
23142
23140
  });
23143
23141
  var optionImgForPrint = myPartListPos.OptionImgForPrint ? 'OPT' + myPartListPos.OptionImgForPrint : undefined;
23144
- for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
23142
+ var _loop = function _loop() {
23145
23143
  var myRuleDesc = '';
23146
23144
  var myRuleDesc_locales = undefined;
23147
23145
  var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
23148
23146
  var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
23149
23147
  var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
23150
- if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && this.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
23151
- myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule, this.articleOptionStates, this.set.api.ruleDescSeperator());
23152
- myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule, this.articleOptionStates, this.set.api.ruleDescSeperator());
23148
+ if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this3.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
23149
+ myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule, _this3.articleOptionStates, _this3.set.api.ruleDescSeperator());
23150
+ myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule, _this3.articleOptionStates, _this3.set.api.ruleDescSeperator());
23153
23151
  }
23154
23152
  var initDecisions = decisions.filter(function (decision) {
23155
23153
  return decision.RelationType !== 'PosCount';
@@ -23158,8 +23156,19 @@ var DivaArticle = /*#__PURE__*/function () {
23158
23156
  return dec.Number == decision.DecisionNumber.toString();
23159
23157
  });
23160
23158
  });
23159
+ var initDecisionsFiltered = [];
23160
+ var _loop2 = function _loop2(i) {
23161
+ if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
23162
+ return d.Number == initDecisions[i].Number;
23163
+ })) {
23164
+ initDecisionsFiltered.push(initDecisions[i]);
23165
+ }
23166
+ };
23167
+ for (var i = 0; i < initDecisions.length; i++) {
23168
+ _loop2(i);
23169
+ }
23161
23170
  var quanitity = 1;
23162
- if (this.CatalogData.useDecisionPosCountValue) {
23171
+ if (_this3.CatalogData.useDecisionPosCountValue) {
23163
23172
  var _decision$DOC;
23164
23173
  // get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
23165
23174
  var decision = decisionNumber ? allDecisions.find(function (d) {
@@ -23174,24 +23183,24 @@ var DivaArticle = /*#__PURE__*/function () {
23174
23183
  return a.SetPosCountValue !== undefined;
23175
23184
  })) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
23176
23185
  quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
23177
- } else if (this.CatalogData.usePosCountValue) {
23186
+ } else if (_this3.CatalogData.usePosCountValue) {
23178
23187
  quanitity = myPartListPos.PosCountValue;
23179
23188
  }
23180
- quanitity = quanitity * this.quantity;
23181
- var previousPartlistArticle = this.getPreviousPartlistArticle(articleCodex);
23189
+ quanitity = quanitity * _this3.quantity;
23190
+ var previousPartlistArticle = _this3.getPreviousPartlistArticle(articleCodex);
23182
23191
  if (quanitity >= 1) {
23183
- var _previousPartlistArti;
23192
+ var _myDecisionVal$Rule, _previousPartlistArti;
23184
23193
  partlistArticlesToLoad.push({
23185
- CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : this.catalogCodex,
23194
+ CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this3.catalogCodex,
23186
23195
  BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
23187
23196
  ArticleCodex: articleCodex,
23188
23197
  RefLevel: myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.RefLevel,
23189
23198
  RetailArticleNr: retailArticleNr,
23190
23199
  RetailPrefix: myPartListPos.RetailPrefix,
23191
23200
  Quantity: quanitity,
23192
- PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule : '',
23201
+ PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils__default["default"].getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this3.VariantValues) : undefined,
23193
23202
  SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
23194
- initDecisions: initDecisions,
23203
+ initDecisions: initDecisionsFiltered,
23195
23204
  RuleDesc: myRuleDesc,
23196
23205
  RuleDesc_locales: myRuleDesc_locales,
23197
23206
  PosInvisibility: myPartListPos.PosInvisibility,
@@ -23203,6 +23212,9 @@ var DivaArticle = /*#__PURE__*/function () {
23203
23212
  } else {
23204
23213
  LOG$d.debug('not loading partlistarticle: ' + articleCodex + ' cause quantity is zero');
23205
23214
  }
23215
+ };
23216
+ for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
23217
+ _loop();
23206
23218
  }
23207
23219
  return partlistArticlesToLoad;
23208
23220
  }
@@ -23263,11 +23275,15 @@ var DivaArticle = /*#__PURE__*/function () {
23263
23275
  }, {
23264
23276
  key: "evalAllDecisions",
23265
23277
  value: function evalAllDecisions() {
23278
+ var _myDecision$DisableHi, _myDecision$DisableHi2, _myDecision$DisableHi3;
23266
23279
  var myDecisions = this.article.catalogArticle.articleDecisions;
23280
+
23267
23281
  //add the partlist spesific decisions to the normal decisions
23268
23282
  if (this.article.initDecisions) myDecisions = myDecisions.concat(this.article.initDecisions);
23269
23283
  for (var i = 0; i < myDecisions.length; i++) {
23270
- myDecisions[i]['Enabled'] = true;
23284
+ myDecisions[i].Enabled = true;
23285
+ myDecisions[i].DisableHistory = [];
23286
+ myDecisions[i].ActiveCombination = undefined;
23271
23287
  }
23272
23288
  for (var key in this.articleOptionStates) {
23273
23289
  var myOPS = this.articleOptionStates[key];
@@ -23275,6 +23291,7 @@ var DivaArticle = /*#__PURE__*/function () {
23275
23291
  myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
23276
23292
  myOPS.definedBySetFeatureFixed = false;
23277
23293
  }
23294
+ var decisionDebugStack = [];
23278
23295
  for (var m = 0; m < myDecisions.length; m++) {
23279
23296
  //Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltet
23280
23297
  var myDecision = myDecisions[m];
@@ -23283,16 +23300,43 @@ var DivaArticle = /*#__PURE__*/function () {
23283
23300
  case '2':
23284
23301
  //Aktionsregel. Wenn das erste JsRule erfüllt ist muss man die restlichen DecisionOptionCombinations nicht mehr kontrollieren.
23285
23302
  this.evalType2Decision(myDecision, myDecisions);
23303
+ decisionDebugStack.push({
23304
+ text: myDecision.Number + ' type: 2 ' + ((_myDecision$DisableHi = myDecision.DisableHistory) === null || _myDecision$DisableHi === void 0 ? void 0 : _myDecision$DisableHi.join(',')),
23305
+ nr: myDecision.Number,
23306
+ decision: JSON.parse(JSON.stringify(myDecision))
23307
+ });
23286
23308
  break;
23287
23309
  case '1':
23288
23310
  this.evalType1Decision(myDecision);
23311
+ decisionDebugStack.push({
23312
+ text: myDecision.Number + ' type: 1 ' + ((_myDecision$DisableHi2 = myDecision.DisableHistory) === null || _myDecision$DisableHi2 === void 0 ? void 0 : _myDecision$DisableHi2.join(',')),
23313
+ nr: myDecision.Number,
23314
+ decision: JSON.parse(JSON.stringify(myDecision))
23315
+ });
23289
23316
  break;
23290
23317
  case '0':
23291
23318
  this.evalType0Decision(myDecision);
23319
+ decisionDebugStack.push({
23320
+ text: myDecision.Number + ' type: 0 ' + ((_myDecision$DisableHi3 = myDecision.DisableHistory) === null || _myDecision$DisableHi3 === void 0 ? void 0 : _myDecision$DisableHi3.join(',')),
23321
+ nr: myDecision.Number,
23322
+ decision: JSON.parse(JSON.stringify(myDecision))
23323
+ });
23292
23324
  break;
23293
23325
  }
23326
+ } else {
23327
+ var _myDecision$DisableHi4;
23328
+ decisionDebugStack.push({
23329
+ text: myDecision.Number + ' ' + ((_myDecision$DisableHi4 = myDecision.DisableHistory) === null || _myDecision$DisableHi4 === void 0 ? void 0 : _myDecision$DisableHi4.join(',')),
23330
+ nr: myDecision.Number,
23331
+ decision: JSON.parse(JSON.stringify(myDecision))
23332
+ });
23294
23333
  }
23295
23334
  }
23335
+ if (this.decisionDebugStacks.length > 6) this.decisionDebugStacks.shift();
23336
+ this.decisionDebugStacks.push({
23337
+ stack: decisionDebugStack,
23338
+ variantValues: this.VariantValues
23339
+ });
23296
23340
  this.evalShowOnlyWhenHasPrice();
23297
23341
  this.updateIDMSpecificFeatures();
23298
23342
  }
@@ -23336,6 +23380,9 @@ var DivaArticle = /*#__PURE__*/function () {
23336
23380
  for (var i = 0; i < myDoc.DA.length; i++) {
23337
23381
  var myDA = myDoc.DA[i];
23338
23382
  var myOptionCodex = myDA.OptionCodex ? 'OPT' + myDA.OptionCodex : '';
23383
+ if (!myDoc.JsFormula || myDoc.JsFormula == '' || this.evalRule(myDoc.JsFormula)) {
23384
+ myDecision.ActiveCombination = j;
23385
+ }
23339
23386
  if (this.getArticleOptionState(myOptionCodex) || myOptionCodex == '') {
23340
23387
  switch (myDA.Type) {
23341
23388
  case '0':
@@ -23390,7 +23437,9 @@ var DivaArticle = /*#__PURE__*/function () {
23390
23437
  }
23391
23438
  for (var _m = 0; _m < myDecisions.length; _m++) {
23392
23439
  if (SearchDecNumber.includes(Number(myDecisions[_m].Number))) {
23440
+ var _myDecisions$_m$Disab;
23393
23441
  myDecisions[_m].Enabled = false;
23442
+ (_myDecisions$_m$Disab = myDecisions[_m].DisableHistory) === null || _myDecisions$_m$Disab === void 0 || _myDecisions$_m$Disab.push('disabled By ' + myDecision.Number);
23394
23443
  }
23395
23444
  }
23396
23445
  }
@@ -23408,7 +23457,9 @@ var DivaArticle = /*#__PURE__*/function () {
23408
23457
  }
23409
23458
  for (var _m3 = 0; _m3 < myDecisions.length; _m3++) {
23410
23459
  if (_SearchDecNumber.includes(Number(myDecisions[_m3].Number))) {
23460
+ var _myDecisions$_m3$Disa;
23411
23461
  myDecisions[_m3].Enabled = true;
23462
+ (_myDecisions$_m3$Disa = myDecisions[_m3].DisableHistory) === null || _myDecisions$_m3$Disa === void 0 || _myDecisions$_m3$Disa.push('enabled By ' + myDecision.Number);
23412
23463
  }
23413
23464
  }
23414
23465
  }
@@ -23477,6 +23528,7 @@ var DivaArticle = /*#__PURE__*/function () {
23477
23528
  }
23478
23529
  if (doUseDoc) {
23479
23530
  var _myDoc$Row2;
23531
+ myDecision.ActiveCombination = j;
23480
23532
  if ((_myDoc$Row2 = myDoc.Row) !== null && _myDoc$Row2 !== void 0 && _myDoc$Row2[OPT]) {
23481
23533
  var ruleWasValidOnce = false;
23482
23534
  for (var m = 0; m < myDoc.Row[OPT].length; m++) {
@@ -23572,6 +23624,7 @@ var DivaArticle = /*#__PURE__*/function () {
23572
23624
  }
23573
23625
  }
23574
23626
  if (doUseDoc && myDoc.Row) {
23627
+ myDecision.ActiveCombination = j;
23575
23628
  if (myDoc.Row[OPT]) {
23576
23629
  for (var m = 0; m < myDoc.Row[OPT].length; m++) {
23577
23630
  var opvCodex = myDoc.Row[OPT][m];
@@ -23898,7 +23951,7 @@ var DivaArticle = /*#__PURE__*/function () {
23898
23951
  break;
23899
23952
  }
23900
23953
  _context.next = 4;
23901
- return Promise.resolve().then(function () { return require('./ShelfPlanner-0ee99038.js'); });
23954
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-1165e6f2.js'); });
23902
23955
  case 4:
23903
23956
  _yield$import = _context.sent;
23904
23957
  ShelfPlanner = _yield$import["default"];
@@ -23950,7 +24003,7 @@ var DivaArticle = /*#__PURE__*/function () {
23950
24003
  }, {
23951
24004
  key: "calcConfigPrice",
23952
24005
  value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
23953
- var _this3 = this,
24006
+ var _this4 = this,
23954
24007
  _this$catalogArticle$;
23955
24008
  //Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
23956
24009
  //wenn ja, hier neues shape übergeben
@@ -24066,9 +24119,9 @@ var DivaArticle = /*#__PURE__*/function () {
24066
24119
  var _myArtOPS = myArtOPSs[_iKey3];
24067
24120
  var targetPPGPrefixes = _myArtOPS.targetPPGPrefixes;
24068
24121
  if (!targetPPGPrefixes) continue;
24069
- var _loop = function _loop() {
24122
+ var _loop3 = function _loop3() {
24070
24123
  var targetPrefix = targetPPGPrefixes[_i5];
24071
- var priceRef = _this3.article.priceRefs.find(function (item) {
24124
+ var priceRef = _this4.article.priceRefs.find(function (item) {
24072
24125
  var _item$PPG;
24073
24126
  return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
24074
24127
  });
@@ -24079,21 +24132,21 @@ var DivaArticle = /*#__PURE__*/function () {
24079
24132
  }
24080
24133
  };
24081
24134
  for (var _i5 = 0; _i5 < targetPPGPrefixes.length; _i5++) {
24082
- _loop();
24135
+ _loop3();
24083
24136
  }
24084
24137
  }
24085
24138
  for (var _i6 = 0; _i6 < this.article.priceRefs.length; _i6++) {
24086
24139
  if (!this.article.priceRefs[_i6].TargetPPGPrefixes) continue;
24087
24140
  var basePriceRef = this.article.priceRefs[_i6];
24088
- var _loop2 = function _loop2() {
24141
+ var _loop4 = function _loop4() {
24089
24142
  var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
24090
24143
  var myArtOpv;
24091
- var priceRef = _this3.article.priceRefs.find(function (item) {
24144
+ var priceRef = _this4.article.priceRefs.find(function (item) {
24092
24145
  return item.PPG && item.PPG.split('_')[0] == targetPrefix;
24093
24146
  });
24094
24147
  if (!priceRef) {
24095
- for (var key in _this3.articleOptionStates) {
24096
- var artOPS = _this3.articleOptionStates[key];
24148
+ for (var key in _this4.articleOptionStates) {
24149
+ var artOPS = _this4.articleOptionStates[key];
24097
24150
  if (artOPS.ppg && artOPS.ppg.split('_')[0] == targetPrefix) {
24098
24151
  myArtOpv = artOPS;
24099
24152
  }
@@ -24112,7 +24165,7 @@ var DivaArticle = /*#__PURE__*/function () {
24112
24165
  }
24113
24166
  };
24114
24167
  for (var _j = 0; _j < basePriceRef.TargetPPGPrefixes.length; _j++) {
24115
- _loop2();
24168
+ _loop4();
24116
24169
  }
24117
24170
  }
24118
24171
  for (var _i7 = 0; _i7 < this.article.priceRefs.length; _i7++) {
@@ -24401,7 +24454,7 @@ var DivaArticle = /*#__PURE__*/function () {
24401
24454
  value: function updateArticleSVG() {
24402
24455
  var _this$article$catalog2,
24403
24456
  _this$article$catalog3,
24404
- _this4 = this;
24457
+ _this5 = this;
24405
24458
  var newSVGFile = null;
24406
24459
  var svgChangedViaSvgTausch = false;
24407
24460
  if (!this.hasCatalogPlannerArticle || ((_this$article$catalog2 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog2 === void 0 ? void 0 : _this$article$catalog2.topSvg) == undefined && ((_this$article$catalog3 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.topSvgsWithFormula) == undefined) {
@@ -24462,7 +24515,7 @@ var DivaArticle = /*#__PURE__*/function () {
24462
24515
  code: 'WC_0011',
24463
24516
  custom: {
24464
24517
  formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
24465
- return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this4.catalogCodex, _this4.CatalogData.multiselectOptions);
24518
+ return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this5.catalogCodex, _this5.CatalogData.multiselectOptions);
24466
24519
  }),
24467
24520
  catalogName: this.CatalogData.catalogName,
24468
24521
  catalogCodex: this.catalogCodex,
@@ -28471,15 +28524,15 @@ var DivaSet = /*#__PURE__*/function () {
28471
28524
  var ending = i !== variants.length - 1 ? ',\n' : '';
28472
28525
  if (variant.isFreeText) {
28473
28526
  if (variant.MeasureUnit) {
28474
- var _variant$OPTName_loca;
28475
- ret[lang] += ((_variant$OPTName_loca = variant.OPTName_locales) === null || _variant$OPTName_loca === void 0 ? void 0 : _variant$OPTName_loca[lang]) + ': ' + variant.FreeText + variant.MeasureUnit + ending;
28527
+ var _variant$OPTName_loca, _variant$OPTName_loca2;
28528
+ ret[lang] += ((_variant$OPTName_loca = (_variant$OPTName_loca2 = variant.OPTName_locales) === null || _variant$OPTName_loca2 === void 0 ? void 0 : _variant$OPTName_loca2[lang]) !== null && _variant$OPTName_loca !== void 0 ? _variant$OPTName_loca : variant.OPTName) + ': ' + variant.FreeText + variant.MeasureUnit + ending;
28476
28529
  } else {
28477
- var _variant$OPTName_loca2;
28478
- ret[lang] += ((_variant$OPTName_loca2 = variant.OPTName_locales) === null || _variant$OPTName_loca2 === void 0 ? void 0 : _variant$OPTName_loca2[lang]) + ': ' + variant.FreeText + ending;
28530
+ var _variant$OPTName_loca3, _variant$OPTName_loca4;
28531
+ ret[lang] += ((_variant$OPTName_loca3 = (_variant$OPTName_loca4 = variant.OPTName_locales) === null || _variant$OPTName_loca4 === void 0 ? void 0 : _variant$OPTName_loca4[lang]) !== null && _variant$OPTName_loca3 !== void 0 ? _variant$OPTName_loca3 : variant.OPTName) + ': ' + variant.FreeText + ending;
28479
28532
  }
28480
28533
  } else {
28481
- var _variant$OPTName_loca3, _variant$OPVName_loca;
28482
- ret[lang] += ((_variant$OPTName_loca3 = variant.OPTName_locales) === null || _variant$OPTName_loca3 === void 0 ? void 0 : _variant$OPTName_loca3[lang]) + ': ' + ((_variant$OPVName_loca = variant.OPVName_locales) === null || _variant$OPVName_loca === void 0 ? void 0 : _variant$OPVName_loca[lang]) + ending;
28534
+ var _variant$OPTName_loca5, _variant$OPTName_loca6, _variant$OPVName_loca, _variant$OPVName_loca2;
28535
+ ret[lang] += ((_variant$OPTName_loca5 = (_variant$OPTName_loca6 = variant.OPTName_locales) === null || _variant$OPTName_loca6 === void 0 ? void 0 : _variant$OPTName_loca6[lang]) !== null && _variant$OPTName_loca5 !== void 0 ? _variant$OPTName_loca5 : variant.OPTName) + ': ' + ((_variant$OPVName_loca = (_variant$OPVName_loca2 = variant.OPVName_locales) === null || _variant$OPVName_loca2 === void 0 ? void 0 : _variant$OPVName_loca2[lang]) !== null && _variant$OPVName_loca !== void 0 ? _variant$OPVName_loca : variant.OPVName) + ending;
28483
28536
  }
28484
28537
  }
28485
28538
  }
@@ -28575,7 +28628,7 @@ var DivaSet = /*#__PURE__*/function () {
28575
28628
  break;
28576
28629
  }
28577
28630
  _context5.next = 3;
28578
- return Promise.resolve().then(function () { return require('./DoorPlanner-a7d48a7a.js'); });
28631
+ return Promise.resolve().then(function () { return require('./DoorPlanner-f3f26c1d.js'); });
28579
28632
  case 3:
28580
28633
  _yield$import = _context5.sent;
28581
28634
  DoorPlanner = _yield$import["default"];
@@ -28749,7 +28802,7 @@ var DivaSet = /*#__PURE__*/function () {
28749
28802
  key: "cloneSet",
28750
28803
  value: function cloneSet() {
28751
28804
  var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
28752
- clonedSet.setData = this.setData;
28805
+ clonedSet.setData = _objectSpread$c({}, this.setData);
28753
28806
  clonedSet.configSingle = this.configSingle;
28754
28807
  var articles = this.getDivaArticles();
28755
28808
  //if boxplanner needs to be working, the planner needs to be cloned too
@@ -31280,7 +31333,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
31280
31333
  return _context2.abrupt("return", 1);
31281
31334
  case 3:
31282
31335
  if (!orderline.IsPartlistArticle) {
31283
- variantValues = catalogData.repairVariantValues(orderline.getVariantValues());
31336
+ variantValues = catalogData.repairVariantValues(orderline.getVariantValues(), orderline.ArticleCodex);
31284
31337
  toLoadArticles.push({
31285
31338
  catalogCodex: catalogData.catalogCodex,
31286
31339
  articleCodex: orderline.ArticleCodex,
@@ -32197,7 +32250,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32197
32250
  _context16.next = 15;
32198
32251
  break;
32199
32252
  }
32200
- allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId);
32253
+ allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId, deletionType);
32201
32254
  i = 0;
32202
32255
  case 8:
32203
32256
  if (!(i < allElementsToDelete.length)) {
@@ -32206,7 +32259,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32206
32259
  }
32207
32260
  art = set.getArticleByElementId(allElementsToDelete[i]);
32208
32261
  _context16.next = 12;
32209
- return this.deleteElementFromSet(set, art, undefined, undefined, true, true);
32262
+ return this.deleteElementFromSet(set, art, undefined, 'STD_DONTUPDATE', true, true);
32210
32263
  case 12:
32211
32264
  i++;
32212
32265
  _context16.next = 8;
@@ -32646,6 +32699,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
32646
32699
  }
32647
32700
  return groupedArticles;
32648
32701
  }
32702
+
32703
+ /**
32704
+ * This function returns all planner Interaction informations for a specific set
32705
+ * @param set
32706
+ * @returns
32707
+ */
32708
+ }, {
32709
+ key: "getPlannerInteractionInformation",
32710
+ value: function getPlannerInteractionInformation(set) {
32711
+ return set.plannerHandler.getPlannerInteractionInformation(set.getSetId());
32712
+ }
32649
32713
  }, {
32650
32714
  key: "getLastElementInGroup",
32651
32715
  value: function getLastElementInGroup(article) {
@@ -33331,7 +33395,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33331
33395
  value: (function () {
33332
33396
  var _updateArticlesOptionStatesOfActSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
33333
33397
  var _Object$keys, _resultPlannerUpdate;
33334
- var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, articleCopyRelation, newArticle;
33398
+ var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
33335
33399
  return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context29) {
33336
33400
  while (1) switch (_context29.prev = _context29.next) {
33337
33401
  case 0:
@@ -33381,7 +33445,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33381
33445
 
33382
33446
  //Update Planner - check if planner data changed
33383
33447
  if (!(!ignorePlanner && from != 'calcVariant')) {
33384
- _context29.next = 49;
33448
+ _context29.next = 55;
33385
33449
  break;
33386
33450
  }
33387
33451
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
@@ -33389,56 +33453,74 @@ var DivaSetHandler = /*#__PURE__*/function () {
33389
33453
  return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
33390
33454
  case 24:
33391
33455
  resultPlannerUpdate = _context29.sent;
33456
+ elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
33457
+ for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
33458
+ articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
33459
+ index = targetArticlesWithNewValues.indexOf(articleToDel.basketId, 0);
33460
+ if (index > -1) {
33461
+ targetArticlesWithNewValues.splice(index, 1);
33462
+ }
33463
+ }
33464
+ if (!resultPlannerUpdate.doDeleteBackGrid) {
33465
+ _context29.next = 34;
33466
+ break;
33467
+ }
33468
+ _context29.next = 30;
33469
+ return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
33470
+ case 30:
33471
+ result = _context29.sent;
33472
+ //Others are deleted recursive
33473
+ if (result.selectElementId) {
33474
+ resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
33475
+ }
33476
+ _context29.next = 41;
33477
+ break;
33478
+ case 34:
33392
33479
  i = 0;
33393
- case 26:
33480
+ case 35:
33394
33481
  if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
33395
- _context29.next = 35;
33482
+ _context29.next = 41;
33396
33483
  break;
33397
33484
  }
33398
- articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
33399
- index = targetArticlesWithNewValues.indexOf(articleToDel.basketId, 0);
33400
- if (index > -1) {
33401
- targetArticlesWithNewValues.splice(index, 1);
33402
- }
33403
- _context29.next = 32;
33485
+ _context29.next = 38;
33404
33486
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
33405
- case 32:
33487
+ case 38:
33406
33488
  i++;
33407
- _context29.next = 26;
33489
+ _context29.next = 35;
33408
33490
  break;
33409
- case 35:
33491
+ case 41:
33410
33492
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
33411
- _context29.next = 48;
33493
+ _context29.next = 54;
33412
33494
  break;
33413
33495
  }
33414
33496
  //Todo copy these elements
33415
33497
  articleCopyRelation = new Map();
33416
33498
  i = 0;
33417
- case 38:
33499
+ case 44:
33418
33500
  if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
33419
- _context29.next = 46;
33501
+ _context29.next = 52;
33420
33502
  break;
33421
33503
  }
33422
- _context29.next = 41;
33504
+ _context29.next = 47;
33423
33505
  return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
33424
- case 41:
33506
+ case 47:
33425
33507
  newArticle = _context29.sent;
33426
33508
  articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
33427
- case 43:
33509
+ case 49:
33428
33510
  i++;
33429
- _context29.next = 38;
33511
+ _context29.next = 44;
33430
33512
  break;
33431
- case 46:
33432
- _context29.next = 48;
33513
+ case 52:
33514
+ _context29.next = 54;
33433
33515
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
33434
33516
  dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
33435
33517
  copyType: resultPlannerUpdate.copyType,
33436
33518
  changedOPT: resultPlannerUpdate.changedOPT,
33437
33519
  targetElements: resultPlannerUpdate.targetElements
33438
33520
  });
33439
- case 48:
33521
+ case 54:
33440
33522
  this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
33441
- case 49:
33523
+ case 55:
33442
33524
  if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
33443
33525
  this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]);
33444
33526
  }
@@ -33447,7 +33529,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33447
33529
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
33448
33530
  setId: set.getSetId()
33449
33531
  });
33450
- case 51:
33532
+ case 57:
33451
33533
  case "end":
33452
33534
  return _context29.stop();
33453
33535
  }
@@ -34388,7 +34470,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34388
34470
  value: function () {
34389
34471
  var _initializeBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(api) {
34390
34472
  var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
34391
- var _this$plannerConfig$a4, returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a5, _api$getI18n, _api$getI18n2, successfully;
34473
+ var returnSuccessfully, divaNr, i, os, _this$plannerConfig$a4, params, _params$customFieldsT, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a5, _api$getI18n, _api$getI18n2, successfully;
34392
34474
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
34393
34475
  while (1) switch (_context.prev = _context.next) {
34394
34476
  case 0:
@@ -34467,15 +34549,15 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34467
34549
  divaNr: this.divaNr
34468
34550
  });
34469
34551
  }
34552
+ if (!returnSuccessfully) {
34553
+ _context.next = 37;
34554
+ break;
34555
+ }
34470
34556
  if ((_this$plannerConfig$a4 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a4 !== void 0 && _this$plannerConfig$a4.length) {
34471
34557
  this.initializationType = 'ARTICLELIST';
34472
34558
  } else {
34473
34559
  this.initializationType = 'MODELINFO';
34474
34560
  }
34475
- if (!returnSuccessfully) {
34476
- _context.next = 37;
34477
- break;
34478
- }
34479
34561
  return _context.abrupt("return", returnSuccessfully);
34480
34562
  case 37:
34481
34563
  if (!this.loadDivaNr) {
@@ -34495,15 +34577,15 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34495
34577
  this.assignNewDivaNr = true;
34496
34578
  params = api.getLoadProductBasketParams();
34497
34579
  if (!params) {
34498
- _context.next = 51;
34580
+ _context.next = 52;
34499
34581
  break;
34500
34582
  }
34501
- _context.next = 50;
34583
+ this.initializationType = 'CUSTOM_PRODUCT_ID';
34584
+ _context.next = 51;
34502
34585
  return this.loadBasketByCustomProductId(api, params.customProductField, this.plannerConfig.customProductId, (_params$customFieldsT = params.customFieldsToLoad) !== null && _params$customFieldsT !== void 0 && _params$customFieldsT.length ? params.customFieldsToLoad : []);
34503
- case 50:
34504
- return _context.abrupt("return", _context.sent);
34505
34586
  case 51:
34506
- this.initializationType = 'CUSTOM_PRODUCT_ID';
34587
+ return _context.abrupt("return", _context.sent);
34588
+ case 52:
34507
34589
  return _context.abrupt("return", false);
34508
34590
  case 55:
34509
34591
  if (!this.plannerConfig.productId) {
@@ -35311,7 +35393,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35311
35393
  break;
35312
35394
  case 3:
35313
35395
  _context12.next = 5;
35314
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-f7c657da.js'); });
35396
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-9a9e6041.js'); });
35315
35397
  case 5:
35316
35398
  _yield$import = _context12.sent;
35317
35399
  PfisterWWSHandler = _yield$import["default"];
@@ -35319,7 +35401,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35319
35401
  return _context12.abrupt("break", 27);
35320
35402
  case 9:
35321
35403
  _context12.next = 11;
35322
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-00b6d2e3.js'); });
35404
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-dc0bf512.js'); });
35323
35405
  case 11:
35324
35406
  _yield$import2 = _context12.sent;
35325
35407
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35327,7 +35409,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35327
35409
  return _context12.abrupt("break", 27);
35328
35410
  case 15:
35329
35411
  _context12.next = 17;
35330
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-4f9f6746.js'); });
35412
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-f21d468a.js'); });
35331
35413
  case 17:
35332
35414
  _yield$import3 = _context12.sent;
35333
35415
  SeriousWWSHandler = _yield$import3["default"];
@@ -35335,7 +35417,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35335
35417
  return _context12.abrupt("break", 27);
35336
35418
  case 21:
35337
35419
  _context12.next = 23;
35338
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-2adead07.js'); });
35420
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-899f51d5.js'); });
35339
35421
  case 23:
35340
35422
  _yield$import4 = _context12.sent;
35341
35423
  StandardWWSHandler = _yield$import4["default"];
@@ -36778,7 +36860,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36778
36860
  while (1) switch (_context3.prev = _context3.next) {
36779
36861
  case 0:
36780
36862
  _context3.next = 2;
36781
- return Promise.resolve().then(function () { return require('./Host3DSignalR-fa0154b6.js'); });
36863
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-97efb5ee.js'); });
36782
36864
  case 2:
36783
36865
  _yield$import = _context3.sent;
36784
36866
  Host3DSignalR = _yield$import["default"];
@@ -38220,7 +38302,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38220
38302
  break;
38221
38303
  }
38222
38304
  return _context2.abrupt("return", {
38223
- elemIdsToDelete: []
38305
+ elemIdsToDelete: [],
38306
+ doDeleteBackGrid: false
38224
38307
  });
38225
38308
  case 2:
38226
38309
  //Nothing changes, so do nothing
@@ -38342,7 +38425,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38342
38425
  break;
38343
38426
  case 8:
38344
38427
  _context4.next = 10;
38345
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-61b70e1a.js'); });
38428
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-452a7c54.js'); });
38346
38429
  case 10:
38347
38430
  _yield$import = _context4.sent;
38348
38431
  DivaStandardPlanner = _yield$import["default"];
@@ -38353,7 +38436,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38353
38436
  return _context4.abrupt("break", 21);
38354
38437
  case 15:
38355
38438
  _context4.next = 17;
38356
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-57bdc557.js'); });
38439
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-419deff0.js'); });
38357
38440
  case 17:
38358
38441
  _yield$import2 = _context4.sent;
38359
38442
  DivaBoxPlanner = _yield$import2["default"];
@@ -38976,11 +39059,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38976
39059
  */
38977
39060
  }, {
38978
39061
  key: "getPlannerElementsInfluencedByDeletion",
38979
- value: function getPlannerElementsInfluencedByDeletion(setId, elementId) {
39062
+ value: function getPlannerElementsInfluencedByDeletion(setId, elementId, deletionType) {
38980
39063
  if (!this.plannerList.has(setId)) {
38981
39064
  return [];
38982
39065
  }
38983
- return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId);
39066
+ return this.plannerList.get(setId).getPlannerElementsInfluencedByDeletion(elementId, deletionType);
38984
39067
  }
38985
39068
 
38986
39069
  /**
@@ -39092,6 +39175,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39092
39175
  }
39093
39176
  return [];
39094
39177
  }
39178
+ }, {
39179
+ key: "getPlannerInteractionInformation",
39180
+ value: function getPlannerInteractionInformation(setId) {
39181
+ if (this.plannerList.has(setId)) {
39182
+ return this.plannerList.get(setId).getPlannerInteractionInformation();
39183
+ }
39184
+ return undefined;
39185
+ }
39095
39186
  }, {
39096
39187
  key: "handle3DVisualizationChanged",
39097
39188
  value: function handle3DVisualizationChanged(mode, params, doShow3DDimensionLines, alternateRenderingsExist) {
@@ -39396,7 +39487,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39396
39487
  _defineProperty__default["default"](this, "api", void 0);
39397
39488
  _defineProperty__default["default"](this, "setHQRenderScript", void 0);
39398
39489
  _defineProperty__default["default"](this, "setCamInfo", void 0);
39399
- _defineProperty__default["default"](this, "initializationType", void 0);
39400
39490
  _defineProperty__default["default"](this, "getPlannerHandlerFunctions", function () {
39401
39491
  return {
39402
39492
  updateCamInfo: _this.setCamInfo,
@@ -39665,7 +39755,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39665
39755
  deletionResult = _context4.sent;
39666
39756
  (_this$actions7 = _this.actions) === null || _this$actions7 === void 0 || (_this$actions7$toggle = _this$actions7.toggleLoading) === null || _this$actions7$toggle === void 0 || _this$actions7$toggle.call(_this$actions7, 'plannerswitch' + articleCodex, false, true);
39667
39757
  initParams.oldPlannerTransform = deletionResult.oldTransform;
39668
- initParams.variantValues = variantValues;
39758
+ initParams.variantValues = _objectSpread$5(_objectSpread$5({}, variantValues), {}, {
39759
+ OPTPLANNERSWITCH: 'OPV' + articleCodex
39760
+ });
39669
39761
  _context4.next = 11;
39670
39762
  return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
39671
39763
  case 11:
@@ -39942,7 +40034,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39942
40034
  _defineProperty__default["default"](this, "doConfigure", /*#__PURE__*/function () {
39943
40035
  var _ref11 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
39944
40036
  var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
39945
- var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
40037
+ var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4, info;
39946
40038
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
39947
40039
  while (1) switch (_context11.prev = _context11.next) {
39948
40040
  case 0:
@@ -39981,7 +40073,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39981
40073
  return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
39982
40074
  case 21:
39983
40075
  _this.configuratorChangeLog('onConfiguratorStep', myValues);
39984
- case 22:
40076
+ info = setHandlerInstance.getPlannerInteractionInformation(set);
40077
+ if (info) LOG$1.debug(info.boxPlannerInteractionInformationPerElement.keys.length.toString());
40078
+ case 24:
39985
40079
  case "end":
39986
40080
  return _context11.stop();
39987
40081
  }
@@ -40106,7 +40200,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40106
40200
  return this.divaBasketHandler.initializeBasket(this.api);
40107
40201
  case 12:
40108
40202
  loadSuccessful = _context13.sent;
40109
- if (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils__default["default"].businessMetrics.getConfiguratorSessionId() == undefined) {
40203
+ if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils__default["default"].businessMetrics.getConfiguratorSessionId() === undefined)) {
40110
40204
  DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
40111
40205
  }
40112
40206
  if (!loadSuccessful) {
@@ -56450,16 +56544,6 @@ var a$9 = [{
56450
56544
  name: 'System 4',
56451
56545
  speciality: 'black border',
56452
56546
  url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-6870908-1-1662105883430.txt'
56453
- }, {
56454
- divaNr: 'DIVA-990926-1',
56455
- name: 'System 4',
56456
- speciality: 'doppelmodul einfach',
56457
- url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-990926-1-1662105885615.txt'
56458
- }, {
56459
- divaNr: 'DIVA-5371884-1',
56460
- name: 'System 4',
56461
- speciality: 'doppelmodul komplex',
56462
- url: 'https://cdn.diva-portal.com/media/9408e932-10ca-4a96-84e3-2aba07e52624/MOC/bc44222a-693c-4278-a977-d2899a97b6c5/catQUADRO_V2/DivaNrDIVA-5371884-1-1662105888677.txt'
56463
56547
  }];
56464
56548
 
56465
56549
  var a$8 = [{
@@ -56652,11 +56736,6 @@ var a$8 = [{
56652
56736
  name: 'Steinpol Poco VME Carolina XC',
56653
56737
  speciality: '',
56654
56738
  url: 'https://cdn.diva-portal.com/media/874b9f97-66bb-4ba5-9bcd-8044331c33f6/MOC/1fe5397e-9969-4baf-b891-bcb799e8c59d/cat6234/DivaNrDIVA-373156-1.txt'
56655
- }, {
56656
- divaNr: 'DIVA-83970-1',
56657
- name: 'Steinpol Poco VME Limone',
56658
- speciality: '',
56659
- url: 'https://cdn.diva-portal.com/media/874b9f97-66bb-4ba5-9bcd-8044331c33f6/MOC/1fe5397e-9969-4baf-b891-bcb799e8c59d/cat5936/DivaNrDIVA-83970-1.txt'
56660
56739
  }, {
56661
56740
  divaNr: 'DIVA-438941-1',
56662
56741
  name: 'Steinpol Poco VME Westpoint ',