@crystaldesign/web-planner-logic 26.11.0-beta.2 → 26.11.0-beta.21

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 (108) hide show
  1. package/build/cjs/{DivaBoxPlanner-68cc1bd1.js → DivaBoxPlanner-051e3b01.js} +134 -47
  2. package/build/cjs/{DivaStandardPlanner-d44ae0e7.js → DivaStandardPlanner-40846a4f.js} +340 -190
  3. package/build/cjs/{DoorPlanner-1719cbe1.js → DoorPlanner-51477bb2.js} +3 -1
  4. package/build/cjs/{Host3DSignalR-a456221e.js → Host3DSignalR-72511b72.js} +41 -24
  5. package/build/cjs/{LiviqueWWSHandler-f2afb4eb.js → LiviqueWWSHandler-fbfeeb05.js} +3 -1
  6. package/build/cjs/{PfisterWWSHandler-8f522ab6.js → PfisterWWSHandler-a7ac983b.js} +3 -1
  7. package/build/cjs/PlannerHandler2D-e2c83aec.js +544 -0
  8. package/build/cjs/{SeriousBasketHandler-b39f0556.js → SeriousBasketHandler-60853c54.js} +3 -1
  9. package/build/cjs/{ShelfPlanner-1dde2d7c.js → ShelfPlanner-a901f6da.js} +262 -148
  10. package/build/cjs/{StandardWWSHandler-62ec343d.js → StandardWWSHandler-3a8a3685.js} +3 -1
  11. package/build/cjs/{index-d63749e4.js → index-7d87a838.js} +15132 -13899
  12. package/build/cjs/index.js +13 -2
  13. package/build/esm/{DivaBoxPlanner-a347ef5d.js → DivaBoxPlanner-a76550ee.js} +134 -47
  14. package/build/esm/{DivaStandardPlanner-a8f0d722.js → DivaStandardPlanner-56c260dc.js} +339 -190
  15. package/build/esm/{DoorPlanner-60c065e5.js → DoorPlanner-a40a4342.js} +3 -1
  16. package/build/esm/{Host3DSignalR-0c7e84a7.js → Host3DSignalR-6f824d99.js} +41 -24
  17. package/build/esm/{LiviqueWWSHandler-3df03404.js → LiviqueWWSHandler-2f1189d0.js} +3 -1
  18. package/build/esm/{PfisterWWSHandler-28b609ef.js → PfisterWWSHandler-81238c20.js} +3 -1
  19. package/build/esm/PlannerHandler2D-d93ae013.js +526 -0
  20. package/build/esm/{SeriousBasketHandler-276a8035.js → SeriousBasketHandler-bca9210d.js} +3 -1
  21. package/build/esm/{ShelfPlanner-7380b831.js → ShelfPlanner-539f1b08.js} +262 -148
  22. package/build/esm/{StandardWWSHandler-1d13f6a3.js → StandardWWSHandler-cdc4c837.js} +3 -1
  23. package/build/esm/{index-358c0a3c.js → index-b755400a.js} +15128 -13899
  24. package/build/esm/index.js +3 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +8 -3
  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 +13 -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/ArticleInfoType.d.ts +13 -0
  30. package/build/types/web-planner-logic/src/interface/Articles/ArticleInfoType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +3 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +5 -0
  34. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +19 -18
  36. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts +37 -0
  38. package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts +5 -0
  40. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +46 -2
  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.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +4 -0
  45. package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +12 -2
  47. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +20 -0
  49. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +31 -1
  51. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +25 -0
  53. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts +1 -0
  55. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +149 -95
  57. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +19 -0
  59. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +15 -1
  61. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +11 -1
  63. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +28 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts +9 -114
  67. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
  68. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts +5 -7
  69. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +5 -6
  71. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +17 -1
  74. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -2
  76. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  77. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +31 -3
  78. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  79. package/build/types/web-planner-logic/src/logic/Set/catalogXml/articleGeo.d.ts +9 -0
  80. package/build/types/web-planner-logic/src/logic/Set/catalogXml/articleGeo.d.ts.map +1 -0
  81. package/build/types/web-planner-logic/src/logic/Set/catalogXml/parseCatalogXml.d.ts +12 -0
  82. package/build/types/web-planner-logic/src/logic/Set/catalogXml/parseCatalogXml.d.ts.map +1 -0
  83. package/build/types/web-planner-logic/src/logic/Set/catalogXml/types.d.ts +66 -0
  84. package/build/types/web-planner-logic/src/logic/Set/catalogXml/types.d.ts.map +1 -0
  85. package/build/types/web-planner-logic/src/logic/bootMark.d.ts +71 -0
  86. package/build/types/web-planner-logic/src/logic/bootMark.d.ts.map +1 -0
  87. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +1 -0
  88. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
  89. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +11 -0
  90. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  91. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +13 -0
  92. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  93. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
  94. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts +1 -44
  95. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts.map +1 -1
  96. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +6 -1
  97. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  98. package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts +2 -0
  99. package/build/types/web-planner-logic/src/test/engineFeatureDefaults.test.d.ts.map +1 -0
  100. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts +2 -0
  101. package/build/types/web-planner-logic/src/test/idmPlannerPaletteView.test.d.ts.map +1 -0
  102. package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts +2 -0
  103. package/build/types/web-planner-logic/src/test/parseSvgOltGeometry.test.d.ts.map +1 -0
  104. package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts +2 -0
  105. package/build/types/web-planner-logic/src/test/stretchGoldenMaster.test.d.ts.map +1 -0
  106. package/package.json +5 -5
  107. package/build/cjs/PlannerHandler2D-dbe1d858.js +0 -2470
  108. package/build/esm/PlannerHandler2D-f8657005.js +0 -2455
@@ -4,20 +4,24 @@ 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-358c0a3c.js';
7
+ import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-b755400a.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
12
  import '@crystaldesign/basket-model';
13
13
  import '@babel/runtime/helpers/typeof';
14
+ import 'fast-xml-parser';
14
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
15
16
  import '@babel/runtime/helpers/getPrototypeOf';
16
17
  import '@babel/runtime/helpers/inherits';
17
18
  import '@babel/runtime/helpers/wrapNativeSuper';
18
19
  import '@crystaldesign/basket-handler';
19
20
  import 'socket.io-client';
21
+ import '@crystaldesign/planner-2d-core';
20
22
 
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
+ 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; }
21
25
  var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
22
26
  var ShelfPlanner = /*#__PURE__*/function () {
23
27
  function ShelfPlanner(data, article) {
@@ -46,6 +50,15 @@ var ShelfPlanner = /*#__PURE__*/function () {
46
50
  //rule so the shelfplanner cells get disabled when the neighbour (AVL or AVR) is smaller. eg: Ben sulvag
47
51
  _defineProperty(this, "disableCellsByElement", void 0);
48
52
  _defineProperty(this, "montageOptions", []);
53
+ /**
54
+ * Debug trail of shelf-planner mutations (the shelf equivalent of the box
55
+ * planner's constructionDebugStack): one entry per visibility flip, grid
56
+ * disable/enable/recreate, accessory placement/deletion and cell-disabling
57
+ * run — so "why did my accessory disappear" is answerable from history.
58
+ * Append-only (capped), NOT reset per configure.
59
+ */
60
+ _defineProperty(this, "shelfDebugStack", []);
61
+ _defineProperty(this, "shelfDebugSeq", 0);
49
62
  //true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
50
63
  //until then no initAcc may be placed, they would occupy the cells of the saved accessoires
51
64
  _defineProperty(this, "restorePending", void 0);
@@ -78,6 +91,14 @@ var ShelfPlanner = /*#__PURE__*/function () {
78
91
  * init dictionary of all the accessoires that which can be free in theory
79
92
  */
80
93
  return _createClass(ShelfPlanner, [{
94
+ key: "logShelfDebug",
95
+ value: function logShelfDebug(entry) {
96
+ this.shelfDebugStack.push(_objectSpread({
97
+ seq: this.shelfDebugSeq++
98
+ }, entry));
99
+ if (this.shelfDebugStack.length > 500) this.shelfDebugStack.splice(0, this.shelfDebugStack.length - 500);
100
+ }
101
+ }, {
81
102
  key: "initFreeArticles",
82
103
  value: function initFreeArticles() {
83
104
  if (!this.data.ShelfPlanner) return;
@@ -119,32 +140,37 @@ var ShelfPlanner = /*#__PURE__*/function () {
119
140
  while (1) switch (_context.prev = _context.next) {
120
141
  case 0:
121
142
  if (!(this.isVisible != isVisible)) {
122
- _context.next = 12;
143
+ _context.next = 13;
123
144
  break;
124
145
  }
146
+ this.logShelfDebug({
147
+ phase: 'visibility',
148
+ action: isVisible ? 'plannerShown' : 'plannerHidden',
149
+ detail: isVisible ? undefined : 'showOnRule/visibility turned false — all placed accessories are deleted'
150
+ });
125
151
  if (!isVisible) {
126
- _context.next = 10;
152
+ _context.next = 11;
127
153
  break;
128
154
  }
129
155
  this.isVisible = isVisible;
130
156
  if (this.article.shelfPlanData) {
131
- _context.next = 8;
157
+ _context.next = 9;
132
158
  break;
133
159
  }
134
- _context.next = 6;
160
+ _context.next = 7;
135
161
  return this.onConfigChanged({});
136
- case 6:
137
- _context.next = 8;
162
+ case 7:
163
+ _context.next = 9;
138
164
  return this.initAccList();
139
- case 8:
140
- _context.next = 12;
165
+ case 9:
166
+ _context.next = 13;
141
167
  break;
142
- case 10:
143
- _context.next = 12;
168
+ case 11:
169
+ _context.next = 13;
144
170
  return this.deleteAllAcc();
145
- case 12:
146
- this.isVisible = isVisible;
147
171
  case 13:
172
+ this.isVisible = isVisible;
173
+ case 14:
148
174
  case "end":
149
175
  return _context.stop();
150
176
  }
@@ -163,7 +189,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
163
189
  key: "onConfigChanged",
164
190
  value: (function () {
165
191
  var _onConfigChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(variantValues) {
166
- var newHeightSet, gridsTodos, i, _i, _i2, grid, grids, _i3, _grid$DisableCellsByM, _grid;
192
+ var newHeightSet, gridsTodos, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
167
193
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
168
194
  while (1) switch (_context2.prev = _context2.next) {
169
195
  case 0:
@@ -172,7 +198,6 @@ var ShelfPlanner = /*#__PURE__*/function () {
172
198
  for (i = 0; i < this.grids.length; i++) {
173
199
  gridsTodos.push(this.grids[i].onConfigChanged());
174
200
  }
175
- //first delete all disables grids then init all the new ones
176
201
  _i = 0;
177
202
  case 4:
178
203
  if (!(_i < gridsTodos.length)) {
@@ -185,10 +210,19 @@ var ShelfPlanner = /*#__PURE__*/function () {
185
210
  }
186
211
  return _context2.abrupt("continue", 10);
187
212
  case 7:
188
- //remember the accessoires before they get deleted, so they can be placed again when the grid becomes active again
189
- this.stashAccessoiresOfGrid(_i);
190
- _context2.next = 10;
191
- return this.grids[_i].deleteAllAccOfGrid();
213
+ grid = this.grids[_i];
214
+ if (gridsTodos[_i].includes('disableGridRule')) this.logShelfDebug({
215
+ phase: 'configChanged',
216
+ action: grid.DisabledByRule ? 'gridDisabledByRule' : 'gridEnabledByRule',
217
+ gridIndex: grid.ShelfIndex,
218
+ detail: grid.ShowOnRule
219
+ });
220
+ if (gridsTodos[_i].includes('heightGridRule')) this.logShelfDebug({
221
+ phase: 'configChanged',
222
+ action: 'gridRecreated',
223
+ gridIndex: grid.ShelfIndex,
224
+ detail: 'HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted'
225
+ });
192
226
  case 10:
193
227
  _i++;
194
228
  _context2.next = 4;
@@ -197,74 +231,95 @@ var ShelfPlanner = /*#__PURE__*/function () {
197
231
  _i2 = 0;
198
232
  case 14:
199
233
  if (!(_i2 < gridsTodos.length)) {
200
- _context2.next = 30;
234
+ _context2.next = 23;
201
235
  break;
202
236
  }
203
237
  if (gridsTodos[_i2].length) {
204
238
  _context2.next = 17;
205
239
  break;
206
240
  }
207
- return _context2.abrupt("continue", 27);
241
+ return _context2.abrupt("continue", 20);
208
242
  case 17:
209
- if (gridsTodos[_i2].includes('heightGridRule')) {
210
- this.creatNewGrid(_i2);
243
+ //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;
246
+ return this.grids[_i2].deleteAllAccOfGrid();
247
+ case 20:
248
+ _i2++;
249
+ _context2.next = 14;
250
+ break;
251
+ case 23:
252
+ _i3 = 0;
253
+ case 24:
254
+ if (!(_i3 < gridsTodos.length)) {
255
+ _context2.next = 40;
256
+ break;
257
+ }
258
+ if (gridsTodos[_i3].length) {
259
+ _context2.next = 27;
260
+ break;
261
+ }
262
+ return _context2.abrupt("continue", 37);
263
+ case 27:
264
+ if (gridsTodos[_i3].includes('heightGridRule')) {
265
+ this.creatNewGrid(_i3);
211
266
  newHeightSet = true;
212
267
  }
213
268
  //read the grid after a possible recreate, the replaced one is not the grid that gets filled
214
- grid = this.grids[_i2];
215
- if (!((gridsTodos[_i2].includes('heightGridRule') || gridsTodos[_i2].includes('disableGridRule')) && !grid.DisabledByRule)) {
216
- _context2.next = 27;
269
+ _grid = this.grids[_i3];
270
+ if (!((gridsTodos[_i3].includes('heightGridRule') || gridsTodos[_i3].includes('disableGridRule')) && !_grid.DisabledByRule)) {
271
+ _context2.next = 37;
217
272
  break;
218
273
  }
219
274
  if (!this.restorePending) {
220
- _context2.next = 22;
275
+ _context2.next = 32;
221
276
  break;
222
277
  }
223
- return _context2.abrupt("continue", 27);
224
- case 22:
225
- _context2.next = 24;
226
- return this.placeStashedAccessoiresOfGrid(_i2);
227
- case 24:
278
+ return _context2.abrupt("continue", 37);
279
+ case 32:
280
+ _context2.next = 34;
281
+ return this.placeStashedAccessoiresOfGrid(_i3);
282
+ case 34:
228
283
  if (_context2.sent) {
229
- _context2.next = 27;
284
+ _context2.next = 37;
230
285
  break;
231
286
  }
232
- _context2.next = 27;
233
- return this.initAccList(_i2);
234
- case 27:
235
- _i2++;
236
- _context2.next = 14;
287
+ _context2.next = 37;
288
+ return this.initAccList(_i3);
289
+ case 37:
290
+ _i3++;
291
+ _context2.next = 24;
237
292
  break;
238
- case 30:
293
+ case 40:
239
294
  if (!(!newHeightSet && Object.keys(variantValues).length)) {
240
- _context2.next = 41;
295
+ _context2.next = 51;
241
296
  break;
242
297
  }
243
298
  grids = this.activeGrids;
244
- _i3 = 0;
245
- case 33:
246
- if (!(_i3 < grids.length)) {
247
- _context2.next = 41;
299
+ _i4 = 0;
300
+ case 43:
301
+ if (!(_i4 < grids.length)) {
302
+ _context2.next = 51;
248
303
  break;
249
304
  }
250
- _grid = grids[_i3];
251
- if (!((_grid$DisableCellsByM = _grid.DisableCellsByMeasures) !== null && _grid$DisableCellsByM !== void 0 && _grid$DisableCellsByM.options.find(function (o) {
305
+ _grid2 = grids[_i4];
306
+ if (!((_grid2$DisableCellsBy = _grid2.DisableCellsByMeasures) !== null && _grid2$DisableCellsBy !== void 0 && _grid2$DisableCellsBy.options.find(function (o) {
252
307
  return Object.keys(variantValues).includes('OPT' + o.opt);
253
- }) || !!_grid.disableCellsByRules)) {
254
- _context2.next = 38;
308
+ }) || !!_grid2.disableCellsByRules)) {
309
+ _context2.next = 48;
255
310
  break;
256
311
  }
257
312
  newHeightSet = true;
258
- return _context2.abrupt("break", 41);
259
- case 38:
260
- _i3++;
261
- _context2.next = 33;
313
+ return _context2.abrupt("break", 51);
314
+ case 48:
315
+ _i4++;
316
+ _context2.next = 43;
262
317
  break;
263
- case 41:
318
+ case 51:
264
319
  if (newHeightSet) {
265
320
  this.updateDisabledCells();
266
321
  }
267
- case 42:
322
+ case 52:
268
323
  case "end":
269
324
  return _context2.stop();
270
325
  }
@@ -511,7 +566,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
511
566
  i = 0;
512
567
  case 2:
513
568
  if (!(i < grids.length)) {
514
- _context6.next = 36;
569
+ _context6.next = 37;
515
570
  break;
516
571
  }
517
572
  grid = grids[i];
@@ -519,72 +574,80 @@ var ShelfPlanner = /*#__PURE__*/function () {
519
574
  _context6.next = 6;
520
575
  break;
521
576
  }
522
- return _context6.abrupt("continue", 33);
577
+ return _context6.abrupt("continue", 34);
523
578
  case 6:
524
579
  if (grid.InitAccArr) {
525
580
  _context6.next = 8;
526
581
  break;
527
582
  }
528
- return _context6.abrupt("continue", 33);
583
+ return _context6.abrupt("continue", 34);
529
584
  case 8:
530
585
  j = 0;
531
586
  case 9:
532
587
  if (!(j < grid.InitAccArr.length)) {
533
- _context6.next = 33;
588
+ _context6.next = 34;
534
589
  break;
535
590
  }
536
591
  initAcc = grid.InitAccArr[j];
537
592
  k = 0;
538
593
  case 12:
539
594
  if (!(k < initAcc.initRH.length)) {
540
- _context6.next = 30;
595
+ _context6.next = 31;
541
596
  break;
542
597
  }
543
598
  grid.ActAccessoire = initAcc.Codex;
544
- _context6.next = 16;
599
+ this.logShelfDebug({
600
+ phase: 'initAccessories',
601
+ action: 'initAccessoryRequested',
602
+ gridIndex: grid.ShelfIndex,
603
+ cellIndex: initAcc.initRH[k],
604
+ articleCodex: initAcc.Codex,
605
+ detail: 'from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed'
606
+ });
607
+ _context6.next = 17;
545
608
  return setHandlerInstance.addAccessorieOnShelfPlanner(this.article.set, grid.ShelfIndex, initAcc.initRH[k], grid.basketId, {
546
609
  noMove: initAcc.noMove,
547
610
  noDelete: initAcc.noDelete,
548
611
  byInit: true
549
612
  });
550
- case 16:
613
+ case 17:
551
614
  if (!initAcc.replaceFromParent) {
552
- _context6.next = 26;
615
+ _context6.next = 27;
553
616
  break;
554
617
  }
555
618
  shelfId = this.getShelfParentShelfId();
556
619
  if (!(shelfId && (_this$article$accesso = this.article.accessoireParentArticle) !== null && _this$article$accesso !== void 0 && _this$article$accesso.shelfPlanner)) {
557
- _context6.next = 26;
620
+ _context6.next = 27;
558
621
  break;
559
622
  }
560
623
  accessoires = this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(shelfId, initAcc.Codex);
561
624
  if (!(accessoires && accessoires.length > 0)) {
562
- _context6.next = 26;
625
+ _context6.next = 27;
563
626
  break;
564
627
  }
565
628
  accessoireToDelete = accessoires[0];
566
629
  rh = (_accessoireToDelete$s = accessoireToDelete.shelfPlanner) === null || _accessoireToDelete$s === void 0 ? void 0 : _accessoireToDelete$s.getRHOnParentArticle();
567
630
  if (!(rh !== undefined && accessoireToDelete.relatedToShelfGrid !== undefined)) {
568
- _context6.next = 26;
631
+ _context6.next = 27;
569
632
  break;
570
633
  }
571
- _context6.next = 26;
634
+ _context6.next = 27;
572
635
  return setHandlerInstance.deleteAccessorieOnShelfPlanner(this.article.set, accessoireToDelete.relatedToShelfGrid, rh, this.article.accessoireParentArticle.basketId);
573
- case 26:
574
- grid.ActAccessoire = undefined;
575
636
  case 27:
637
+ grid.ActAccessoire = undefined;
638
+ case 28:
576
639
  k++;
577
640
  _context6.next = 12;
578
641
  break;
579
- case 30:
642
+ case 31:
580
643
  j++;
581
644
  _context6.next = 9;
582
645
  break;
583
- case 33:
646
+ case 34:
584
647
  i++;
585
648
  _context6.next = 2;
586
649
  break;
587
- case 36:
650
+ case 37:
588
651
  case "end":
589
652
  return _context6.stop();
590
653
  }
@@ -620,7 +683,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
620
683
  key: "triggerVisibility",
621
684
  value: function () {
622
685
  var _triggerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(gridGroup) {
623
- var toCleanOptions, toUpdateOptions, i, grid, _i4, option, visitOptionState;
686
+ var toCleanOptions, toUpdateOptions, i, grid, _i5, option, visitOptionState;
624
687
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
625
688
  while (1) switch (_context7.prev = _context7.next) {
626
689
  case 0:
@@ -656,13 +719,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
656
719
  _context7.next = 3;
657
720
  break;
658
721
  case 13:
659
- _i4 = 0;
722
+ _i5 = 0;
660
723
  case 14:
661
- if (!(_i4 < [].concat(toUpdateOptions, toCleanOptions).length)) {
724
+ if (!(_i5 < [].concat(toUpdateOptions, toCleanOptions).length)) {
662
725
  _context7.next = 23;
663
726
  break;
664
727
  }
665
- option = [].concat(toUpdateOptions, toCleanOptions)[_i4];
728
+ option = [].concat(toUpdateOptions, toCleanOptions)[_i5];
666
729
  visitOptionState = this.article.getArticleOptionState((!this.article.CatalogData.isIDMFormat ? 'OPT' : '') + option);
667
730
  if (!visitOptionState) {
668
731
  _context7.next = 20;
@@ -671,7 +734,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
671
734
  _context7.next = 20;
672
735
  return articleHandlerInstance.updateOption(this.article, visitOptionState.optionCodex, toUpdateOptions.includes(option) ? 'OPVMIT' : 'OPVOHNE');
673
736
  case 20:
674
- _i4++;
737
+ _i5++;
675
738
  _context7.next = 14;
676
739
  break;
677
740
  case 23:
@@ -816,7 +879,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
816
879
  key: "deleteAccessoireOfCellInGrid",
817
880
  value: (function () {
818
881
  var _deleteAccessoireOfCellInGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(gridIndex, cellIndex) {
819
- var grid, inUse, deleteIndex, onBoardCell, accessoire;
882
+ var grid, inUse, deleteIndex, onBoardCell, accessoire, deleted;
820
883
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
821
884
  while (1) switch (_context9.prev = _context9.next) {
822
885
  case 0:
@@ -843,8 +906,17 @@ var ShelfPlanner = /*#__PURE__*/function () {
843
906
  _context9.next = 10;
844
907
  return grid.deleteAccessoireInCells(deleteIndex);
845
908
  case 10:
846
- return _context9.abrupt("return", _context9.sent);
847
- case 11:
909
+ deleted = _context9.sent;
910
+ if (deleted) this.logShelfDebug({
911
+ phase: 'placement',
912
+ action: 'accessoryDeleted',
913
+ gridIndex: gridIndex,
914
+ cellIndex: deleteIndex,
915
+ articleCodex: deleted.articleCodex,
916
+ articleName: deleted.name
917
+ });
918
+ return _context9.abrupt("return", deleted);
919
+ case 13:
848
920
  case "end":
849
921
  return _context9.stop();
850
922
  }
@@ -886,7 +958,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
886
958
  key: "handleDeleteTakePlaceOnOtherGrids",
887
959
  value: (function () {
888
960
  var _handleDeleteTakePlaceOnOtherGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(gridIndex, cellIndex, accessoire) {
889
- var i, _cell$Article, cell, _i5, _cell$Article2, _cell, _i6;
961
+ var i, _cell$Article, cell, _i6, _cell$Article2, _cell, _i7;
890
962
  return _regeneratorRuntime.wrap(function _callee10$(_context10) {
891
963
  while (1) switch (_context10.prev = _context10.next) {
892
964
  case 0:
@@ -905,8 +977,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
905
977
  }
906
978
  }
907
979
  if (accessoire.shelfHeightBelow) {
908
- for (_i5 = 0; _i5 < accessoire.shelfHeightBelow; _i5++) {
909
- _cell = this.grids[gridIndex].Cells[cellIndex - (_i5 + 1)];
980
+ for (_i6 = 0; _i6 < accessoire.shelfHeightBelow; _i6++) {
981
+ _cell = this.grids[gridIndex].Cells[cellIndex - (_i6 + 1)];
910
982
  if ((_cell === null || _cell === void 0 || (_cell$Article2 = _cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) === accessoire.basketId) {
911
983
  _cell.ClearInUse();
912
984
  }
@@ -916,22 +988,22 @@ var ShelfPlanner = /*#__PURE__*/function () {
916
988
  _context10.next = 14;
917
989
  break;
918
990
  }
919
- _i6 = 0;
991
+ _i7 = 0;
920
992
  case 6:
921
- if (!(_i6 < this.grids.length)) {
993
+ if (!(_i7 < this.grids.length)) {
922
994
  _context10.next = 14;
923
995
  break;
924
996
  }
925
- if (!(_i6 === gridIndex)) {
997
+ if (!(_i7 === gridIndex)) {
926
998
  _context10.next = 9;
927
999
  break;
928
1000
  }
929
1001
  return _context10.abrupt("continue", 11);
930
1002
  case 9:
931
1003
  _context10.next = 11;
932
- return this.grids[_i6].deleteAccessoireInCells(cellIndex);
1004
+ return this.grids[_i7].deleteAccessoireInCells(cellIndex);
933
1005
  case 11:
934
- _i6++;
1006
+ _i7++;
935
1007
  _context10.next = 6;
936
1008
  break;
937
1009
  case 14:
@@ -965,25 +1037,41 @@ var ShelfPlanner = /*#__PURE__*/function () {
965
1037
  i = 0;
966
1038
  case 2:
967
1039
  if (!(i < grids.length)) {
968
- _context11.next = 11;
1040
+ _context11.next = 13;
969
1041
  break;
970
1042
  }
971
1043
  grid = grids[i];
972
1044
  if (!grid.DisabledByRule) {
973
- _context11.next = 6;
1045
+ _context11.next = 7;
974
1046
  break;
975
1047
  }
976
- return _context11.abrupt("continue", 8);
977
- case 6:
978
- _context11.next = 8;
1048
+ this.logShelfDebug({
1049
+ phase: 'placement',
1050
+ action: 'placementSkippedGridDisabled',
1051
+ gridIndex: grid.ShelfIndex,
1052
+ cellIndex: cellIndex,
1053
+ articleCodex: accessoire.articleCodex
1054
+ });
1055
+ return _context11.abrupt("continue", 10);
1056
+ case 7:
1057
+ this.logShelfDebug({
1058
+ phase: 'placement',
1059
+ action: 'accessoryPlaced',
1060
+ gridIndex: grid.ShelfIndex,
1061
+ cellIndex: cellIndex,
1062
+ articleCodex: accessoire.articleCodex,
1063
+ articleName: accessoire.name,
1064
+ detail: type + (grid.ShelfIndex !== gridIndex ? ' (placeholder via TakePlaceOnOtherGrids)' : '')
1065
+ });
1066
+ _context11.next = 10;
979
1067
  return grids[i].addAccessoireInCells(cellIndex, accessoire, type, grid.ShelfIndex !== gridIndex ? true : params === null || params === void 0 ? void 0 : params.noMove, grid.ShelfIndex !== gridIndex ? true : params === null || params === void 0 ? void 0 : params.noDelete, grid.ShelfIndex !== gridIndex ? true : undefined);
980
- case 8:
1068
+ case 10:
981
1069
  i++;
982
1070
  _context11.next = 2;
983
1071
  break;
984
- case 11:
1072
+ case 13:
985
1073
  this.checkForFreeAccessoire(accessoire);
986
- case 12:
1074
+ case 14:
987
1075
  case "end":
988
1076
  return _context11.stop();
989
1077
  }
@@ -1212,6 +1300,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
1212
1300
  depth: catalogArticle.depth,
1213
1301
  cellSize: catalogArticle.shelfHeight,
1214
1302
  metaData: catalogArticle.metaDataView,
1303
+ accessoireFamily: catalogArticle.accessoireFamily,
1215
1304
  contentItemId: catalogArticle.contentItemId,
1216
1305
  groupContentItemId: catalogArticle.groupContentItemId,
1217
1306
  partlistcodexes: catalogArticle.possiblePartlistCodexes
@@ -1296,68 +1385,93 @@ var ShelfPlanner = /*#__PURE__*/function () {
1296
1385
  key: "disableCellsByDockedShelfs",
1297
1386
  value: (function () {
1298
1387
  var _disableCellsByDockedShelfs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(count) {
1299
- var grids, i, grid, gridCount, toDisableCells, useCount, j, _j, cell, _j2;
1300
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
1301
- while (1) switch (_context12.prev = _context12.next) {
1388
+ var _this2 = this;
1389
+ var grids, _loop2, i;
1390
+ return _regeneratorRuntime.wrap(function _callee12$(_context13) {
1391
+ while (1) switch (_context13.prev = _context13.next) {
1302
1392
  case 0:
1303
1393
  grids = this.activeGrids;
1394
+ _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
1395
+ var grid, gridCount, toDisableCells, useCount, j, newlyDisabled, newlyEnabled, _j, cell, _j2;
1396
+ return _regeneratorRuntime.wrap(function _loop2$(_context12) {
1397
+ while (1) switch (_context12.prev = _context12.next) {
1398
+ case 0:
1399
+ grid = grids[i];
1400
+ gridCount = grid.getCellCount();
1401
+ toDisableCells = grid.getDisabledCellsByRule();
1402
+ useCount = count == undefined || count > gridCount ? gridCount : count;
1403
+ for (j = useCount; j < grid.Cells.length; j++) {
1404
+ toDisableCells.push(j);
1405
+ }
1406
+ newlyDisabled = toDisableCells.filter(function (idx) {
1407
+ return grid.Cells[idx] && !grid.Cells[idx].IsDisabled;
1408
+ });
1409
+ newlyEnabled = grid.Cells.filter(function (cell, j) {
1410
+ return cell.IsDisabled && !toDisableCells.includes(j);
1411
+ }).length;
1412
+ if (newlyDisabled.length || newlyEnabled) _this2.logShelfDebug({
1413
+ phase: 'docking',
1414
+ action: 'disabledCellsUpdated',
1415
+ gridIndex: grid.ShelfIndex,
1416
+ detail: "newlyDisabled=[".concat(newlyDisabled.slice(0, 30).join(','), "] reEnabled=").concat(newlyEnabled, " ") + "(sources: DisableCellsByRules/measures=".concat(grid.getDisabledCellsByRule().length, ", beyond cellCount/docking cap=").concat(grid.Cells.length - useCount, "); ") + 'an occupied cell that gets disabled deletes its accessory'
1417
+ });
1418
+ _j = 0;
1419
+ case 9:
1420
+ if (!(_j < toDisableCells.length)) {
1421
+ _context12.next = 18;
1422
+ break;
1423
+ }
1424
+ cell = grid.Cells[toDisableCells[_j]];
1425
+ if (!(cell.InUse == toDisableCells[_j])) {
1426
+ _context12.next = 14;
1427
+ break;
1428
+ }
1429
+ _context12.next = 14;
1430
+ return setHandlerInstance.deleteAccessorieOnShelfPlanner(_this2.article.set, grid.ShelfIndex, cell.InUse, grid.basketId);
1431
+ case 14:
1432
+ cell.IsDisabled = true;
1433
+ case 15:
1434
+ _j++;
1435
+ _context12.next = 9;
1436
+ break;
1437
+ case 18:
1438
+ _j2 = 0;
1439
+ case 19:
1440
+ if (!(_j2 < grid.Cells.length)) {
1441
+ _context12.next = 26;
1442
+ break;
1443
+ }
1444
+ if (!toDisableCells.includes(_j2)) {
1445
+ _context12.next = 22;
1446
+ break;
1447
+ }
1448
+ return _context12.abrupt("continue", 23);
1449
+ case 22:
1450
+ grid.Cells[_j2].IsDisabled = false;
1451
+ case 23:
1452
+ _j2++;
1453
+ _context12.next = 19;
1454
+ break;
1455
+ case 26:
1456
+ case "end":
1457
+ return _context12.stop();
1458
+ }
1459
+ }, _loop2);
1460
+ });
1304
1461
  i = 0;
1305
- case 2:
1462
+ case 3:
1306
1463
  if (!(i < grids.length)) {
1307
- _context12.next = 29;
1308
- break;
1309
- }
1310
- grid = grids[i];
1311
- gridCount = grid.getCellCount();
1312
- toDisableCells = grid.getDisabledCellsByRule();
1313
- useCount = count == undefined || count > gridCount ? gridCount : count;
1314
- for (j = useCount; j < grid.Cells.length; j++) {
1315
- toDisableCells.push(j);
1316
- }
1317
- _j = 0;
1318
- case 9:
1319
- if (!(_j < toDisableCells.length)) {
1320
- _context12.next = 18;
1321
- break;
1322
- }
1323
- cell = grid.Cells[toDisableCells[_j]];
1324
- if (!(cell.InUse == toDisableCells[_j])) {
1325
- _context12.next = 14;
1326
- break;
1327
- }
1328
- _context12.next = 14;
1329
- return setHandlerInstance.deleteAccessorieOnShelfPlanner(this.article.set, grid.ShelfIndex, cell.InUse, grid.basketId);
1330
- case 14:
1331
- cell.IsDisabled = true;
1332
- case 15:
1333
- _j++;
1334
- _context12.next = 9;
1335
- break;
1336
- case 18:
1337
- _j2 = 0;
1338
- case 19:
1339
- if (!(_j2 < grid.Cells.length)) {
1340
- _context12.next = 26;
1464
+ _context13.next = 8;
1341
1465
  break;
1342
1466
  }
1343
- if (!toDisableCells.includes(_j2)) {
1344
- _context12.next = 22;
1345
- break;
1346
- }
1347
- return _context12.abrupt("continue", 23);
1348
- case 22:
1349
- grid.Cells[_j2].IsDisabled = false;
1350
- case 23:
1351
- _j2++;
1352
- _context12.next = 19;
1353
- break;
1354
- case 26:
1467
+ return _context13.delegateYield(_loop2(), "t0", 5);
1468
+ case 5:
1355
1469
  i++;
1356
- _context12.next = 2;
1470
+ _context13.next = 3;
1357
1471
  break;
1358
- case 29:
1472
+ case 8:
1359
1473
  case "end":
1360
- return _context12.stop();
1474
+ return _context13.stop();
1361
1475
  }
1362
1476
  }, _callee12, this);
1363
1477
  }));