@crystaldesign/web-planner-logic 26.12.0-beta.3 → 26.12.0-beta.31

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 (131) hide show
  1. package/build/cjs/{DivaBoxPlanner-2c699ee3.js → DivaBoxPlanner-484a325e.js} +13 -10
  2. package/build/cjs/{DivaStandardPlanner-3d6a05bc.js → DivaStandardPlanner-6dbf81c3.js} +9 -5
  3. package/build/cjs/{DoorPlanner-adda9c0d.js → DoorPlanner-87fac8b8.js} +2 -2
  4. package/build/cjs/{Host3DSignalR-6914541f.js → Host3DSignalR-2b5a6bae.js} +2 -2
  5. package/build/cjs/{LiviqueWWSHandler-635cffae.js → LiviqueWWSHandler-992fe2a1.js} +2 -2
  6. package/build/cjs/{PfisterWWSHandler-d95419db.js → PfisterWWSHandler-e95029c3.js} +2 -2
  7. package/build/cjs/{PlannerHandler2D-b76ba907.js → PlannerHandler2D-c74ff8ac.js} +5 -272
  8. package/build/cjs/{SeriousBasketHandler-777904e8.js → SeriousBasketHandler-a20bd057.js} +141 -79
  9. package/build/cjs/{ShelfPlanner-5ffd15a2.js → ShelfPlanner-c1de034e.js} +107 -79
  10. package/build/cjs/{StandardWWSHandler-e92acae6.js → StandardWWSHandler-e72d5813.js} +2 -2
  11. package/build/cjs/{index-d516d2b2.js → index-bd35eec6.js} +3150 -976
  12. package/build/cjs/index.js +9 -1
  13. package/build/esm/{DivaBoxPlanner-6f0727a3.js → DivaBoxPlanner-550c74ca.js} +13 -10
  14. package/build/esm/{DivaStandardPlanner-7188da61.js → DivaStandardPlanner-da5556ac.js} +9 -5
  15. package/build/esm/{DoorPlanner-74bcd21d.js → DoorPlanner-2f95bff9.js} +2 -2
  16. package/build/esm/{Host3DSignalR-bb6db8e6.js → Host3DSignalR-7588005e.js} +2 -2
  17. package/build/esm/{LiviqueWWSHandler-c4ba143d.js → LiviqueWWSHandler-22fe4525.js} +2 -2
  18. package/build/esm/{PfisterWWSHandler-41b7b1b7.js → PfisterWWSHandler-cc671647.js} +2 -2
  19. package/build/esm/{PlannerHandler2D-829ffceb.js → PlannerHandler2D-3ae7d185.js} +3 -268
  20. package/build/esm/{SeriousBasketHandler-0bb8ee55.js → SeriousBasketHandler-c8a94b84.js} +141 -79
  21. package/build/esm/{ShelfPlanner-1406888d.js → ShelfPlanner-62c2844a.js} +107 -79
  22. package/build/esm/{StandardWWSHandler-a8045129.js → StandardWWSHandler-f031a067.js} +2 -2
  23. package/build/esm/{index-16a1a540.js → index-ead00f31.js} +3142 -977
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +10 -0
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +3 -0
  30. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/ConfiguratorStructureDataType.d.ts +1 -0
  32. package/build/types/web-planner-logic/src/interface/ConfiguratorStructureDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -0
  34. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
  36. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -1
  38. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -0
  40. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts +10 -0
  42. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +8 -2
  44. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
  46. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +40 -0
  48. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +6 -0
  50. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +2 -0
  52. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +17 -1
  55. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -2
  57. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +12 -1
  59. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts +2 -0
  61. package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts.map +1 -0
  62. package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts +8 -0
  63. package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts.map +1 -0
  64. package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts +2 -0
  65. package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts.map +1 -0
  66. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +10 -0
  67. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  68. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +40 -1
  69. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +6 -3
  71. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +7 -1
  73. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
  74. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts +2 -0
  75. package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts.map +1 -0
  76. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +7 -0
  77. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  78. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts +2 -0
  79. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  80. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +22 -6
  81. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  82. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  83. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  84. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +8 -1
  85. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -1
  87. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  88. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  89. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  90. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +16 -2
  91. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  92. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts +6 -0
  93. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts.map +1 -1
  94. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  95. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +1 -0
  96. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  97. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  98. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +1 -0
  99. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  100. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  101. package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +31 -0
  102. package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -0
  103. package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +34 -0
  104. package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -0
  105. package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts +2 -0
  106. package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts.map +1 -0
  107. package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts +2 -0
  108. package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts.map +1 -0
  109. package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts +2 -0
  110. package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts.map +1 -0
  111. package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts +2 -0
  112. package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts.map +1 -0
  113. package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts +2 -0
  114. package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts.map +1 -0
  115. package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts +2 -0
  116. package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts.map +1 -0
  117. package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts +2 -0
  118. package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts.map +1 -0
  119. package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts +2 -0
  120. package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts.map +1 -0
  121. package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts +2 -0
  122. package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts.map +1 -0
  123. package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts +2 -0
  124. package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts.map +1 -0
  125. package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts +2 -0
  126. package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts.map +1 -0
  127. package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts +2 -0
  128. package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts.map +1 -0
  129. package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts +2 -0
  130. package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts.map +1 -0
  131. package/package.json +3 -3
@@ -4,11 +4,12 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
4
  import _createClass from '@babel/runtime/helpers/createClass';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _regeneratorRuntime from '@babel/runtime/regenerator';
7
- import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-16a1a540.js';
7
+ import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-ead00f31.js';
8
8
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
11
11
  import 'axios';
12
+ import '@crystaldesign/planner-2d-core';
12
13
  import '@crystaldesign/basket-model';
13
14
  import '@babel/runtime/helpers/typeof';
14
15
  import 'fast-xml-parser';
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
18
19
  import '@babel/runtime/helpers/wrapNativeSuper';
19
20
  import '@crystaldesign/basket-handler';
20
21
  import 'socket.io-client';
21
- import '@crystaldesign/planner-2d-core';
22
22
 
23
23
  function ownKeys(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; }
24
24
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -50,6 +50,9 @@ var ShelfPlanner = /*#__PURE__*/function () {
50
50
  //rule so the shelfplanner cells get disabled when the neighbour (AVL or AVR) is smaller. eg: Ben sulvag
51
51
  _defineProperty(this, "disableCellsByElement", void 0);
52
52
  _defineProperty(this, "montageOptions", []);
53
+ //true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
54
+ //until then no initAcc may be placed, they would occupy the cells of the saved accessoires
55
+ _defineProperty(this, "restorePending", void 0);
53
56
  /**
54
57
  * Debug trail of shelf-planner mutations (the shelf equivalent of the box
55
58
  * planner's constructionDebugStack): one entry per visibility flip, grid
@@ -59,11 +62,9 @@ var ShelfPlanner = /*#__PURE__*/function () {
59
62
  */
60
63
  _defineProperty(this, "shelfDebugStack", []);
61
64
  _defineProperty(this, "shelfDebugSeq", 0);
62
- //true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
63
- //until then no initAcc may be placed, they would occupy the cells of the saved accessoires
64
- _defineProperty(this, "restorePending", void 0);
65
- //accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
66
- //becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
65
+ //accessoires of grids that were cleared by a grid rule, per gridIndex and the HeightGridCellCountOnRule entry the grid
66
+ //ran as. They get placed again when the grid becomes active again under the same entry - eg a shelf that is configured
67
+ //from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's initAcc
67
68
  _defineProperty(this, "stashedAccessoires", {});
68
69
  this.article = article;
69
70
  this.restorePending = !!article.shelfPlanData;
@@ -189,27 +190,30 @@ var ShelfPlanner = /*#__PURE__*/function () {
189
190
  key: "onConfigChanged",
190
191
  value: (function () {
191
192
  var _onConfigChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(variantValues) {
192
- var newHeightSet, gridsTodos, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
193
+ var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
193
194
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
194
195
  while (1) switch (_context2.prev = _context2.next) {
195
196
  case 0:
196
197
  newHeightSet = false;
197
- gridsTodos = [];
198
+ gridsTodos = []; //onConfigChanged moves a grid to its new rule entry, the stash needs the entry the accessoires were planned under
199
+ ruleIndexesBefore = this.grids.map(function (grid) {
200
+ return grid.CurrentLoadedRuleIndex;
201
+ });
198
202
  for (i = 0; i < this.grids.length; i++) {
199
203
  gridsTodos.push(this.grids[i].onConfigChanged());
200
204
  }
201
205
  _i = 0;
202
- case 4:
206
+ case 5:
203
207
  if (!(_i < gridsTodos.length)) {
204
- _context2.next = 13;
208
+ _context2.next = 14;
205
209
  break;
206
210
  }
207
211
  if (gridsTodos[_i].length) {
208
- _context2.next = 7;
212
+ _context2.next = 8;
209
213
  break;
210
214
  }
211
- return _context2.abrupt("continue", 10);
212
- case 7:
215
+ return _context2.abrupt("continue", 11);
216
+ case 8:
213
217
  grid = this.grids[_i];
214
218
  if (gridsTodos[_i].includes('disableGridRule')) this.logShelfDebug({
215
219
  phase: 'configChanged',
@@ -223,44 +227,44 @@ var ShelfPlanner = /*#__PURE__*/function () {
223
227
  gridIndex: grid.ShelfIndex,
224
228
  detail: 'HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted'
225
229
  });
226
- case 10:
230
+ case 11:
227
231
  _i++;
228
- _context2.next = 4;
232
+ _context2.next = 5;
229
233
  break;
230
- case 13:
231
- _i2 = 0;
232
234
  case 14:
235
+ _i2 = 0;
236
+ case 15:
233
237
  if (!(_i2 < gridsTodos.length)) {
234
- _context2.next = 23;
238
+ _context2.next = 24;
235
239
  break;
236
240
  }
237
241
  if (gridsTodos[_i2].length) {
238
- _context2.next = 17;
242
+ _context2.next = 18;
239
243
  break;
240
244
  }
241
- return _context2.abrupt("continue", 20);
242
- case 17:
245
+ return _context2.abrupt("continue", 21);
246
+ case 18:
243
247
  //remember the accessoires before they get deleted, so they can be placed again when the grid becomes active again
244
- this.stashAccessoiresOfGrid(_i2);
245
- _context2.next = 20;
248
+ this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
249
+ _context2.next = 21;
246
250
  return this.grids[_i2].deleteAllAccOfGrid();
247
- case 20:
251
+ case 21:
248
252
  _i2++;
249
- _context2.next = 14;
253
+ _context2.next = 15;
250
254
  break;
251
- case 23:
252
- _i3 = 0;
253
255
  case 24:
256
+ _i3 = 0;
257
+ case 25:
254
258
  if (!(_i3 < gridsTodos.length)) {
255
- _context2.next = 40;
259
+ _context2.next = 41;
256
260
  break;
257
261
  }
258
262
  if (gridsTodos[_i3].length) {
259
- _context2.next = 27;
263
+ _context2.next = 28;
260
264
  break;
261
265
  }
262
- return _context2.abrupt("continue", 37);
263
- case 27:
266
+ return _context2.abrupt("continue", 38);
267
+ case 28:
264
268
  if (gridsTodos[_i3].includes('heightGridRule')) {
265
269
  this.creatNewGrid(_i3);
266
270
  newHeightSet = true;
@@ -268,58 +272,58 @@ var ShelfPlanner = /*#__PURE__*/function () {
268
272
  //read the grid after a possible recreate, the replaced one is not the grid that gets filled
269
273
  _grid = this.grids[_i3];
270
274
  if (!((gridsTodos[_i3].includes('heightGridRule') || gridsTodos[_i3].includes('disableGridRule')) && !_grid.DisabledByRule)) {
271
- _context2.next = 37;
275
+ _context2.next = 38;
272
276
  break;
273
277
  }
274
278
  if (!this.restorePending) {
275
- _context2.next = 32;
279
+ _context2.next = 33;
276
280
  break;
277
281
  }
278
- return _context2.abrupt("continue", 37);
279
- case 32:
280
- _context2.next = 34;
282
+ return _context2.abrupt("continue", 38);
283
+ case 33:
284
+ _context2.next = 35;
281
285
  return this.placeStashedAccessoiresOfGrid(_i3);
282
- case 34:
286
+ case 35:
283
287
  if (_context2.sent) {
284
- _context2.next = 37;
288
+ _context2.next = 38;
285
289
  break;
286
290
  }
287
- _context2.next = 37;
291
+ _context2.next = 38;
288
292
  return this.initAccList(_i3);
289
- case 37:
293
+ case 38:
290
294
  _i3++;
291
- _context2.next = 24;
295
+ _context2.next = 25;
292
296
  break;
293
- case 40:
297
+ case 41:
294
298
  if (!(!newHeightSet && Object.keys(variantValues).length)) {
295
- _context2.next = 51;
299
+ _context2.next = 52;
296
300
  break;
297
301
  }
298
302
  grids = this.activeGrids;
299
303
  _i4 = 0;
300
- case 43:
304
+ case 44:
301
305
  if (!(_i4 < grids.length)) {
302
- _context2.next = 51;
306
+ _context2.next = 52;
303
307
  break;
304
308
  }
305
309
  _grid2 = grids[_i4];
306
310
  if (!((_grid2$DisableCellsBy = _grid2.DisableCellsByMeasures) !== null && _grid2$DisableCellsBy !== void 0 && _grid2$DisableCellsBy.options.find(function (o) {
307
311
  return Object.keys(variantValues).includes('OPT' + o.opt);
308
312
  }) || !!_grid2.disableCellsByRules)) {
309
- _context2.next = 48;
313
+ _context2.next = 49;
310
314
  break;
311
315
  }
312
316
  newHeightSet = true;
313
- return _context2.abrupt("break", 51);
314
- case 48:
317
+ return _context2.abrupt("break", 52);
318
+ case 49:
315
319
  _i4++;
316
- _context2.next = 43;
320
+ _context2.next = 44;
317
321
  break;
318
- case 51:
322
+ case 52:
319
323
  if (newHeightSet) {
320
324
  this.updateDisabledCells();
321
325
  }
322
- case 52:
326
+ case 53:
323
327
  case "end":
324
328
  return _context2.stop();
325
329
  }
@@ -338,16 +342,24 @@ var ShelfPlanner = /*#__PURE__*/function () {
338
342
  }
339
343
 
340
344
  /**
341
- * Remembers the accessoires of a grid that is about to be cleared because a grid rule switched it off.
345
+ * Remembers the accessoires of a grid that is about to be cleared because a grid rule switched it off or rebuilt it.
342
346
  * An empty grid never overwrites an existing memory, so the accessoires survive further configuration changes.
343
347
  * @param gridIndex grid that gets cleared
348
+ * @param ruleIndex HeightGridCellCountOnRule entry the grid ran as while the accessoires were planned
344
349
  */
345
350
  }, {
346
351
  key: "stashAccessoiresOfGrid",
347
- value: function stashAccessoiresOfGrid(gridIndex) {
352
+ value: function stashAccessoiresOfGrid(gridIndex, ruleIndex) {
348
353
  var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex]);
349
354
  if (!stashedAccessoires.length) return;
350
- this.stashedAccessoires[gridIndex] = stashedAccessoires;
355
+ this.stashedAccessoires[this.stashKey(gridIndex, ruleIndex)] = stashedAccessoires;
356
+ }
357
+
358
+ /** The memory is per grid and per HeightGridCellCountOnRule entry, false when the grid runs without a matching entry. */
359
+ }, {
360
+ key: "stashKey",
361
+ value: function stashKey(gridIndex, ruleIndex) {
362
+ return gridIndex + '#' + ruleIndex;
351
363
  }
352
364
 
353
365
  /**
@@ -370,7 +382,12 @@ var ShelfPlanner = /*#__PURE__*/function () {
370
382
  var _accessoireShelfPlann;
371
383
  var accessoireGrid = accessoireShelfPlanner.grids[j];
372
384
  var accessoiresOfGrid = accessoireShelfPlanner.collectAccessoiresToStash(accessoireGrid);
373
- if (accessoiresOfGrid.length) accessoires[accessoireGrid.ShelfIndex] = accessoiresOfGrid;
385
+ if (accessoiresOfGrid.length) {
386
+ accessoires[accessoireGrid.ShelfIndex] = {
387
+ ruleIndex: accessoireGrid.CurrentLoadedRuleIndex,
388
+ accessoires: accessoiresOfGrid
389
+ };
390
+ }
374
391
  }
375
392
  stashedAccessoires.push({
376
393
  articleCodex: accessoire.articleCodex,
@@ -386,7 +403,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
386
403
  }
387
404
 
388
405
  /**
389
- * Places the remembered accessoires of a grid back into their cells.
406
+ * Places the accessoires remembered for the rule entry the grid runs now back into their cells.
390
407
  * @param gridIndex grid that became active again
391
408
  * @returns how many accessoires were placed - 0 means the grid is still empty and needs its initAcc
392
409
  */
@@ -394,24 +411,26 @@ var ShelfPlanner = /*#__PURE__*/function () {
394
411
  key: "placeStashedAccessoiresOfGrid",
395
412
  value: (function () {
396
413
  var _placeStashedAccessoiresOfGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(gridIndex) {
397
- var stashedAccessoires;
414
+ var stashKey, stashedAccessoires;
398
415
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
399
416
  while (1) switch (_context3.prev = _context3.next) {
400
417
  case 0:
401
- stashedAccessoires = this.stashedAccessoires[gridIndex];
418
+ //a recreated grid already runs its new rule entry, only accessoires planned under that entry belong into it
419
+ stashKey = this.stashKey(gridIndex, this.grids[gridIndex].CurrentLoadedRuleIndex);
420
+ stashedAccessoires = this.stashedAccessoires[stashKey];
402
421
  if (stashedAccessoires !== null && stashedAccessoires !== void 0 && stashedAccessoires.length) {
403
- _context3.next = 3;
422
+ _context3.next = 4;
404
423
  break;
405
424
  }
406
425
  return _context3.abrupt("return", 0);
407
- case 3:
426
+ case 4:
408
427
  //remove it first, a reconfiguration triggered by placing them must not place them a second time
409
- delete this.stashedAccessoires[gridIndex];
410
- _context3.next = 6;
428
+ delete this.stashedAccessoires[stashKey];
429
+ _context3.next = 7;
411
430
  return this.placeStashedAccessoiresInGrid(gridIndex, stashedAccessoires);
412
- case 6:
413
- return _context3.abrupt("return", _context3.sent);
414
431
  case 7:
432
+ return _context3.abrupt("return", _context3.sent);
433
+ case 8:
415
434
  case "end":
416
435
  return _context3.stop();
417
436
  }
@@ -426,7 +445,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
426
445
  key: "placeStashedAccessoiresByGrid",
427
446
  value: (function () {
428
447
  var _placeStashedAccessoiresByGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(stashedAccessoires) {
429
- var gridIndexes, i, _this$getGridByIndex, gridIndex;
448
+ var gridIndexes, i, gridIndex, grid, stashed;
430
449
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
431
450
  while (1) switch (_context4.prev = _context4.next) {
432
451
  case 0:
@@ -434,27 +453,36 @@ var ShelfPlanner = /*#__PURE__*/function () {
434
453
  i = 0;
435
454
  case 2:
436
455
  if (!(i < gridIndexes.length)) {
437
- _context4.next = 14;
456
+ _context4.next = 18;
438
457
  break;
439
458
  }
440
- gridIndex = Number(gridIndexes[i]); //the accessoire was created new, so its initAcc are already placed in the cells the remembered accessoires need
441
- _context4.next = 6;
442
- return (_this$getGridByIndex = this.getGridByIndex(gridIndex)) === null || _this$getGridByIndex === void 0 ? void 0 : _this$getGridByIndex.deleteAllAccOfGrid();
443
- case 6:
444
- _context4.next = 8;
445
- return this.placeStashedAccessoiresInGrid(gridIndex, stashedAccessoires[gridIndex]);
459
+ gridIndex = Number(gridIndexes[i]);
460
+ grid = this.getGridByIndex(gridIndex);
461
+ stashed = stashedAccessoires[gridIndex]; //the accessoire was created new, its grids run their own rule entry with that entry's initAcc in place. A grid that
462
+ //runs another entry than the remembered accessoires were planned under keeps them
463
+ if (!(!grid || grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
464
+ _context4.next = 8;
465
+ break;
466
+ }
467
+ return _context4.abrupt("continue", 15);
446
468
  case 8:
469
+ _context4.next = 10;
470
+ return grid.deleteAllAccOfGrid();
471
+ case 10:
472
+ _context4.next = 12;
473
+ return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires);
474
+ case 12:
447
475
  if (_context4.sent) {
448
- _context4.next = 11;
476
+ _context4.next = 15;
449
477
  break;
450
478
  }
451
- _context4.next = 11;
479
+ _context4.next = 15;
452
480
  return this.initAccList(gridIndex);
453
- case 11:
481
+ case 15:
454
482
  i++;
455
483
  _context4.next = 2;
456
484
  break;
457
- case 14:
485
+ case 18:
458
486
  case "end":
459
487
  return _context4.stop();
460
488
  }
@@ -1516,8 +1544,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
1516
1544
  }, {
1517
1545
  key: "getCellIndexOfBasketId",
1518
1546
  value: function getCellIndexOfBasketId(gridIndex, basketId) {
1519
- var _this$getGridByIndex2;
1520
- return (_this$getGridByIndex2 = this.getGridByIndex(gridIndex)) === null || _this$getGridByIndex2 === void 0 ? void 0 : _this$getGridByIndex2.getIndexOfBasketId(basketId);
1547
+ var _this$getGridByIndex;
1548
+ return (_this$getGridByIndex = this.getGridByIndex(gridIndex)) === null || _this$getGridByIndex === void 0 ? void 0 : _this$getGridByIndex.getIndexOfBasketId(basketId);
1521
1549
  }
1522
1550
  }, {
1523
1551
  key: "allGrids",
@@ -1,6 +1,6 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import './index-16a1a540.js';
3
+ import './index-ead00f31.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';
@@ -9,6 +9,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
9
9
  import '@babel/runtime/helpers/toConsumableArray';
10
10
  import 'axios';
11
11
  import '@crystaldesign/diva-utils';
12
+ import '@crystaldesign/planner-2d-core';
12
13
  import '@crystaldesign/basket-model';
13
14
  import '@babel/runtime/helpers/typeof';
14
15
  import 'fast-xml-parser';
@@ -18,7 +19,6 @@ import '@babel/runtime/helpers/inherits';
18
19
  import '@babel/runtime/helpers/wrapNativeSuper';
19
20
  import '@crystaldesign/basket-handler';
20
21
  import 'socket.io-client';
21
- import '@crystaldesign/planner-2d-core';
22
22
 
23
23
  //Der in einem Set gemergte Optionsbaum
24
24
  var StandardWWSHandler = /*#__PURE__*/function () {