@crystaldesign/web-planner-logic 26.12.0-beta.11 → 26.12.0-beta.13

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 (33) hide show
  1. package/build/cjs/{DivaBoxPlanner-1c01e711.js → DivaBoxPlanner-f6d00723.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-8186e18f.js → DivaStandardPlanner-83dd40b9.js} +2 -2
  3. package/build/cjs/{DoorPlanner-56c070ff.js → DoorPlanner-45d9a58b.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-76ed7e62.js → Host3DSignalR-4d5a723a.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-e8470fb7.js → LiviqueWWSHandler-406442aa.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-58d3fbc9.js → PfisterWWSHandler-b0f905a4.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-4744a5af.js → PlannerHandler2D-f584ba93.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-0cd54ef6.js → SeriousBasketHandler-9d489f71.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-e21f566f.js → ShelfPlanner-4535d476.js} +104 -76
  10. package/build/cjs/{StandardWWSHandler-81967097.js → StandardWWSHandler-7cc90edd.js} +1 -1
  11. package/build/cjs/{index-b092b563.js → index-ce1d1394.js} +37 -18
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-9a3d5bfa.js → DivaBoxPlanner-6b6e11c5.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-319631e3.js → DivaStandardPlanner-1fee34d7.js} +2 -2
  15. package/build/esm/{DoorPlanner-240561e1.js → DoorPlanner-a5396856.js} +1 -1
  16. package/build/esm/{Host3DSignalR-bfe160de.js → Host3DSignalR-76ec4fce.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-86dc5c10.js → LiviqueWWSHandler-dfb7c838.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-79f2209b.js → PfisterWWSHandler-1e9f7c66.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-58aa45d2.js → PlannerHandler2D-3fc04d8a.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-1f4342db.js → SeriousBasketHandler-c82b7e7c.js} +1 -1
  21. package/build/esm/{ShelfPlanner-3a609e86.js → ShelfPlanner-d937ab7a.js} +104 -76
  22. package/build/esm/{StandardWWSHandler-e388f4e3.js → StandardWWSHandler-45b62000.js} +1 -1
  23. package/build/esm/{index-9fae6c7a.js → index-bb2aeeee.js} +37 -18
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +8 -2
  26. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -2
  28. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +6 -3
  30. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  32. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  33. package/package.json +3 -3
@@ -3,11 +3,11 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-9fae6c7a.js';
6
+ import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-bb2aeeee.js';
7
7
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
9
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
10
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-58aa45d2.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-3fc04d8a.js';
11
11
  import '@babel/runtime/helpers/objectWithoutProperties';
12
12
  import 'axios';
13
13
  import '@crystaldesign/basket-model';
@@ -4,10 +4,10 @@ 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 { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-9fae6c7a.js';
7
+ import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-bb2aeeee.js';
8
8
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
9
9
  import { computeDockedTransform } from '@crystaldesign/planner-2d-core';
10
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-58aa45d2.js';
10
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-3fc04d8a.js';
11
11
  import '@babel/runtime/helpers/slicedToArray';
12
12
  import '@babel/runtime/helpers/objectWithoutProperties';
13
13
  import 'axios';
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import './index-9fae6c7a.js';
4
+ import './index-bb2aeeee.js';
5
5
  import DivaUtils from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
7
7
  import '@babel/runtime/helpers/asyncToGenerator';
@@ -3,7 +3,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-9fae6c7a.js';
6
+ import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-bb2aeeee.js';
7
7
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
8
8
  import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
9
9
  import io from 'socket.io-client';
@@ -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-9fae6c7a.js';
3
+ import './index-bb2aeeee.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';
@@ -1,6 +1,6 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import { a as articleHandlerInstance } from './index-9fae6c7a.js';
3
+ import { a as articleHandlerInstance } from './index-bb2aeeee.js';
4
4
  import { SAPOrderLineData } from '@crystaldesign/basket-model';
5
5
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
@@ -3,7 +3,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { c as Vector2 } from './index-9fae6c7a.js';
6
+ import { c as Vector2 } from './index-bb2aeeee.js';
7
7
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
9
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import { s as summaryHandlerInstance } from './index-9fae6c7a.js';
4
+ import { s as summaryHandlerInstance } from './index-bb2aeeee.js';
5
5
  import DivaUtils from '@crystaldesign/diva-utils';
6
6
  import '@babel/runtime/helpers/slicedToArray';
7
7
  import '@babel/runtime/helpers/asyncToGenerator';
@@ -4,7 +4,7 @@ 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-9fae6c7a.js';
7
+ import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-bb2aeeee.js';
8
8
  import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -53,9 +53,6 @@ var ShelfPlanner = /*#__PURE__*/function () {
53
53
  //true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
54
54
  //until then no initAcc may be placed, they would occupy the cells of the saved accessoires
55
55
  _defineProperty(this, "restorePending", void 0);
56
- //accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
57
- //becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
58
- _defineProperty(this, "stashedAccessoires", {});
59
56
  /**
60
57
  * Debug trail of shelf-planner mutations (the shelf equivalent of the box
61
58
  * planner's constructionDebugStack): one entry per visibility flip, grid
@@ -65,6 +62,10 @@ var ShelfPlanner = /*#__PURE__*/function () {
65
62
  */
66
63
  _defineProperty(this, "shelfDebugStack", []);
67
64
  _defineProperty(this, "shelfDebugSeq", 0);
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
68
+ _defineProperty(this, "stashedAccessoires", {});
68
69
  this.article = article;
69
70
  this.restorePending = !!article.shelfPlanData;
70
71
  this.disableCellsByElement = data.DisableCells;
@@ -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-9fae6c7a.js';
3
+ import './index-bb2aeeee.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';
@@ -19573,8 +19573,11 @@ var ArticleOptionData = /*#__PURE__*/function () {
19573
19573
 
19574
19574
  var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
19575
19575
  function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
19576
+ var lang = catalog.api.getLanguage();
19577
+ // the palette group shows "<GroupName> (<OPG name>)", so both carry the same translated label
19578
+ var groupName = lang === 'FR' ? 'Couleurs fournisseurs' : lang === 'IT' ? 'Colori fornitori' : 'Lieferantenfarben';
19576
19579
  var catalogOPG = new OptionValueCatalogData(getCatalogOptionValueDataType('OPVSUPPLIER_COLORS', {
19577
- Name: 'Lieferantenfarben',
19580
+ Name: groupName,
19578
19581
  IsOPVG: '1'
19579
19582
  }, catalog), catalog);
19580
19583
  var articleOPG = new ArticleOptionValueData(getArticleOptionValueType(set, 'OPVSUPPLIER_COLORS', {
@@ -19584,11 +19587,18 @@ function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors
19584
19587
  var supplierColorsOpvs = new Map();
19585
19588
  for (var i = 0; i < supplierColors.length; i++) {
19586
19589
  var col = supplierColors[i];
19590
+ // shown in the catalog language; classification reads the Fr/It value names from name_locales (see DivaBasketHandler)
19591
+ var nameLocales = {
19592
+ DE: col.OptionValueName_DE,
19593
+ FR: col.OptionValueName_FR,
19594
+ IT: col.OptionValueName_IT
19595
+ };
19587
19596
  var colorCatalogOpv = new OptionValueCatalogData(getCatalogOptionValueDataType('OPV' + col.OptionValueCodex, {
19588
- Name: col.OptionValueName_DE,
19597
+ Name: nameLocales[lang] || col.OptionValueName_DE,
19598
+ Name_locales: nameLocales,
19589
19599
  IsCustomAttribute: true,
19590
19600
  HexColor: col.HexColor,
19591
- GroupName: 'Lieferantenfarben'
19601
+ GroupName: groupName
19592
19602
  }, catalog), catalog);
19593
19603
  supplierColorsOpvs.set('OPV' + col.OptionValueCodex, new ArticleOptionValueData(getArticleOptionValueType(set, 'OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions), catalog));
19594
19604
  }
@@ -31685,7 +31695,7 @@ var DivaArticle = /*#__PURE__*/function () {
31685
31695
  break;
31686
31696
  }
31687
31697
  _context.next = 4;
31688
- return import('./ShelfPlanner-3a609e86.js');
31698
+ return import('./ShelfPlanner-d937ab7a.js');
31689
31699
  case 4:
31690
31700
  _yield$import = _context.sent;
31691
31701
  ShelfPlanner = _yield$import["default"];
@@ -40219,7 +40229,7 @@ var DivaSet = /*#__PURE__*/function () {
40219
40229
  break;
40220
40230
  }
40221
40231
  _context5.next = 3;
40222
- return import('./DoorPlanner-240561e1.js');
40232
+ return import('./DoorPlanner-a5396856.js');
40223
40233
  case 3:
40224
40234
  _yield$import = _context5.sent;
40225
40235
  DoorPlanner = _yield$import["default"];
@@ -47911,9 +47921,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
47911
47921
  }
47912
47922
  }, {
47913
47923
  key: "fillBaksetforOnWebPlanerConfigChange",
47914
- value: function fillBaksetforOnWebPlanerConfigChange(set, newBasket, options, isInit, eventKey) {
47924
+ value: function fillBaksetforOnWebPlanerConfigChange(set, newBasket, options, isInit, eventKey, lang) {
47915
47925
  var _this$plannerConfig$a6;
47916
47926
  this.setBasketData(this.actDivaNr, newBasket);
47927
+ // language the catalog was loaded in: `name` of options/values is in this language
47928
+ var loadedLang = lang !== null && lang !== void 0 ? lang : 'DE';
47917
47929
  var changedValues = {};
47918
47930
  var sendToSap = [];
47919
47931
  var article = set.getDivaArticles()[Object.keys(set.getDivaArticles())[0]];
@@ -48004,12 +48016,18 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48004
48016
  attributeValue = name;
48005
48017
  }
48006
48018
  }
48019
+ // `name` is only the loaded catalog language; the other languages come from name_locales
48020
+ // (API2 keys them lowercase, IDM masks uppercase). Free text keeps its per-language input instead.
48021
+ var valueName = function valueName(valueLang) {
48022
+ var _val$name_locales$val, _val$name_locales, _val$name_locales2;
48023
+ return valueLang === loadedLang ? name : (_val$name_locales$val = (_val$name_locales = val.name_locales) === null || _val$name_locales === void 0 ? void 0 : _val$name_locales[valueLang]) !== null && _val$name_locales$val !== void 0 ? _val$name_locales$val : (_val$name_locales2 = val.name_locales) === null || _val$name_locales2 === void 0 ? void 0 : _val$name_locales2[valueLang.toLowerCase()];
48024
+ };
48007
48025
  return {
48008
48026
  attributeValue: attributeValue,
48009
48027
  hexColor: val.hexColor,
48010
- attributeValueNameDe: name,
48011
- attributeValueNameFr: (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['FR'],
48012
- attributeValueNameIt: (_ops$freeTextLang4 = ops.freeTextLang) === null || _ops$freeTextLang4 === void 0 ? void 0 : _ops$freeTextLang4['IT'],
48028
+ attributeValueNameDe: ops.isFreeText ? name : valueName('DE'),
48029
+ attributeValueNameFr: ops.isFreeText ? (_ops$freeTextLang3 = ops.freeTextLang) === null || _ops$freeTextLang3 === void 0 ? void 0 : _ops$freeTextLang3['FR'] : valueName('FR'),
48030
+ attributeValueNameIt: ops.isFreeText ? (_ops$freeTextLang4 = ops.freeTextLang) === null || _ops$freeTextLang4 === void 0 ? void 0 : _ops$freeTextLang4['IT'] : valueName('IT'),
48013
48031
  attributeValueVCodex: (_val$vCodex = val === null || val === void 0 ? void 0 : val.vCodex) !== null && _val$vCodex !== void 0 ? _val$vCodex : undefined,
48014
48032
  position: opsKeys.indexOf(ops.option.codex),
48015
48033
  attributeName: ops.option.name,
@@ -48055,7 +48073,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48055
48073
  break;
48056
48074
  case 3:
48057
48075
  _context12.next = 5;
48058
- return import('./PfisterWWSHandler-79f2209b.js');
48076
+ return import('./PfisterWWSHandler-1e9f7c66.js');
48059
48077
  case 5:
48060
48078
  _yield$import = _context12.sent;
48061
48079
  PfisterWWSHandler = _yield$import["default"];
@@ -48063,7 +48081,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48063
48081
  return _context12.abrupt("break", 27);
48064
48082
  case 9:
48065
48083
  _context12.next = 11;
48066
- return import('./LiviqueWWSHandler-86dc5c10.js');
48084
+ return import('./LiviqueWWSHandler-dfb7c838.js');
48067
48085
  case 11:
48068
48086
  _yield$import2 = _context12.sent;
48069
48087
  LiviqueWWSHandler = _yield$import2["default"];
@@ -48071,7 +48089,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48071
48089
  return _context12.abrupt("break", 27);
48072
48090
  case 15:
48073
48091
  _context12.next = 17;
48074
- return import('./SeriousBasketHandler-1f4342db.js');
48092
+ return import('./SeriousBasketHandler-c82b7e7c.js');
48075
48093
  case 17:
48076
48094
  _yield$import3 = _context12.sent;
48077
48095
  SeriousWWSHandler = _yield$import3["default"];
@@ -48079,7 +48097,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48079
48097
  return _context12.abrupt("break", 27);
48080
48098
  case 21:
48081
48099
  _context12.next = 23;
48082
- return import('./StandardWWSHandler-e388f4e3.js');
48100
+ return import('./StandardWWSHandler-45b62000.js');
48083
48101
  case 23:
48084
48102
  _yield$import4 = _context12.sent;
48085
48103
  StandardWWSHandler = _yield$import4["default"];
@@ -49466,7 +49484,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
49466
49484
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
49467
49485
  bootMark('signalr: chunk import start');
49468
49486
  _context3.next = 3;
49469
- return import('./Host3DSignalR-bfe160de.js');
49487
+ return import('./Host3DSignalR-76ec4fce.js');
49470
49488
  case 3:
49471
49489
  _yield$import = _context3.sent;
49472
49490
  Host3DSignalR = _yield$import["default"];
@@ -51198,7 +51216,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51198
51216
  break;
51199
51217
  case 8:
51200
51218
  _context5.next = 10;
51201
- return import('./DivaStandardPlanner-319631e3.js');
51219
+ return import('./DivaStandardPlanner-1fee34d7.js');
51202
51220
  case 10:
51203
51221
  _yield$import = _context5.sent;
51204
51222
  DivaStandardPlanner = _yield$import["default"];
@@ -51209,7 +51227,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51209
51227
  return _context5.abrupt("break", 21);
51210
51228
  case 15:
51211
51229
  _context5.next = 17;
51212
- return import('./DivaBoxPlanner-9a3d5bfa.js');
51230
+ return import('./DivaBoxPlanner-6b6e11c5.js');
51213
51231
  case 17:
51214
51232
  _yield$import2 = _context5.sent;
51215
51233
  DivaBoxPlanner = _yield$import2["default"];
@@ -53222,8 +53240,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
53222
53240
  _context16.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
53223
53241
  _context16.t4 = isInit;
53224
53242
  _context16.t5 = eventKey;
53225
- return _context16.abrupt("return", _context16.t0.fillBaksetforOnWebPlanerConfigChange.call(_context16.t0, _context16.t1, _context16.t2, _context16.t3, _context16.t4, _context16.t5));
53226
- case 20:
53243
+ _context16.t6 = _this.api.getLanguage();
53244
+ return _context16.abrupt("return", _context16.t0.fillBaksetforOnWebPlanerConfigChange.call(_context16.t0, _context16.t1, _context16.t2, _context16.t3, _context16.t4, _context16.t5, _context16.t6));
53245
+ case 21:
53227
53246
  case "end":
53228
53247
  return _context16.stop();
53229
53248
  }
@@ -1,4 +1,4 @@
1
- export { I as ArtifactGenerationError, h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, a as DivaArticleHandler, g as DivaBasketHandler, f as DivaCatalogData, b as DivaSetHandler, G as Grid, J as JsonDataCache, O as OptionCatalogData, i as PROPERTY_SCHEMAS, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, w as Vector4, d as bootMark, q as bootMarksEnabled, t as bootNetworkMark, u as bootNow, v as bootRequestName, A as collectStructureStepKeys, x as creatRenderOrders, j as decodePropertyValue, D as default, n as editorKindOf, k as encodePropertyValue, y as getOrigProductId, o as getSeriousSetNamePlaceholder, z as headlessSession, l as loadAndRepairBasket, p as propertyEncodingOf, m as propertyValueProblem, r as rawStringOf, E as runHeadlessArtifactPass, F as runHeadlessArtifactPassBatch } from './index-9fae6c7a.js';
1
+ export { I as ArtifactGenerationError, h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, a as DivaArticleHandler, g as DivaBasketHandler, f as DivaCatalogData, b as DivaSetHandler, G as Grid, J as JsonDataCache, O as OptionCatalogData, i as PROPERTY_SCHEMAS, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, w as Vector4, d as bootMark, q as bootMarksEnabled, t as bootNetworkMark, u as bootNow, v as bootRequestName, A as collectStructureStepKeys, x as creatRenderOrders, j as decodePropertyValue, D as default, n as editorKindOf, k as encodePropertyValue, y as getOrigProductId, o as getSeriousSetNamePlaceholder, z as headlessSession, l as loadAndRepairBasket, p as propertyEncodingOf, m as propertyValueProblem, r as rawStringOf, E as runHeadlessArtifactPass, F as runHeadlessArtifactPassBatch } from './index-bb2aeeee.js';
2
2
  export { DockingPoint } from '@crystaldesign/planner-2d-core';
3
3
  import '@babel/runtime/helpers/slicedToArray';
4
4
  import '@babel/runtime/helpers/asyncToGenerator';