@crystaldesign/web-planner-logic 25.11.0-beta.8 → 25.11.0-beta.9

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 (39) hide show
  1. package/build/cjs/{DivaBoxPlanner-9b908b19.js → DivaBoxPlanner-799e9a71.js} +60 -77
  2. package/build/cjs/{DivaStandardPlanner-fc5b6e71.js → DivaStandardPlanner-c7d1f0f9.js} +3 -3
  3. package/build/cjs/{DoorPlanner-7d363e3b.js → DoorPlanner-1b5c4238.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-09589f6f.js → Host3DSignalR-ff6d70af.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-73899dec.js → LiviqueWWSHandler-f89f29df.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-21fc0405.js → PfisterWWSHandler-0cc38bd6.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-b6d6d66c.js → PlannerHandler2D-7ed8c232.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-38942a5b.js → SeriousBasketHandler-05f58a75.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-b81aaa3b.js → ShelfPlanner-8548ea4a.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-678ea32e.js → StandardWWSHandler-afc66a49.js} +1 -1
  11. package/build/cjs/{index-c89f3375.js → index-e3014b32.js} +42 -51
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-28a692cd.js → DivaBoxPlanner-fc0dd76f.js} +60 -77
  14. package/build/esm/{DivaStandardPlanner-90620c78.js → DivaStandardPlanner-0fee420b.js} +3 -3
  15. package/build/esm/{DoorPlanner-54471e77.js → DoorPlanner-20e5f657.js} +1 -1
  16. package/build/esm/{Host3DSignalR-79df2488.js → Host3DSignalR-01931604.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-53a5195d.js → LiviqueWWSHandler-13bcb486.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-a5542a05.js → PfisterWWSHandler-27999564.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-0c96ec2e.js → PlannerHandler2D-fe777260.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-fed815e3.js → SeriousBasketHandler-9c60850c.js} +1 -1
  21. package/build/esm/{ShelfPlanner-d3568028.js → ShelfPlanner-ba315b80.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-38258f9c.js → StandardWWSHandler-ac9d3e80.js} +1 -1
  23. package/build/esm/{index-9836bc0f.js → index-cdc9af99.js} +42 -51
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -8
  28. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  30. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts +10 -2
  31. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
  32. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +3 -3
  34. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +3 -3
  36. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +3 -3
  37. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +2 -2
  38. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  39. package/package.json +2 -2
@@ -3,10 +3,10 @@ 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-9836bc0f.js';
6
+ import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-cdc9af99.js';
7
7
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-0c96ec2e.js';
9
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-fe777260.js';
10
10
  import '@babel/runtime/helpers/slicedToArray';
11
11
  import '@babel/runtime/helpers/objectWithoutProperties';
12
12
  import 'axios';
@@ -2361,7 +2361,6 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
2361
2361
  key: "correctSimpleOpt",
2362
2362
  value: function correctSimpleOpt(xIndex, yIndex, boxPlannerGrid, optionHandler, fromBackside) {
2363
2363
  var curElement = boxPlannerGrid.getPlannerElementAtGridPos(xIndex, yIndex, fromBackside);
2364
-
2365
2364
  //Schauen ob Element top Element hat.
2366
2365
  if (this.constructionRules.defaultConstructionRules.TOP) {
2367
2366
  var hasTopElement = boxPlannerGrid.getElementHasTopElement(curElement.ElementId);
@@ -4117,15 +4116,15 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
4117
4116
  }
4118
4117
  }, {
4119
4118
  key: "prepareGridForColCopy",
4120
- value: function prepareGridForColCopy(elementId, copyDir) {
4121
- if (copyDir == 'AVO') return;
4119
+ value: function prepareGridForColCopy(elementId, copyIndex) {
4120
+ if (copyIndex.y > 0) return;
4122
4121
  var elementToCopyPos = this.getCellsInGridByElementId(elementId);
4123
4122
  this.plannerElements.get(elementId);
4124
4123
  //Kopiere das Grid nach rechts abhängig von der Breite des aktuellen Elementes
4125
4124
  //now correct all indices in all cells:
4126
4125
 
4127
4126
  var copyStartIndex = 0;
4128
- if (copyDir == 'AVR') copyStartIndex = elementToCopyPos.endColIndex + 1;else if (copyDir == 'AVL') copyStartIndex = elementToCopyPos.startColIndex;
4127
+ if (copyIndex.x > 0) copyStartIndex = elementToCopyPos.endColIndex + 1;else if (copyIndex.x < 0) copyStartIndex = elementToCopyPos.startColIndex;
4129
4128
  var copyIndexCount = 1 + (elementToCopyPos.endColIndex - elementToCopyPos.startColIndex);
4130
4129
  var allUsedCellsFrontGrid = this.getAllUsedCellsInGrid(false);
4131
4130
  this.frontGrid = new Array();
@@ -4202,31 +4201,14 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
4202
4201
  */
4203
4202
  }, {
4204
4203
  key: "addElementAsCopy",
4205
- value: function addElementAsCopy(elementIDToCopy, newElement, copyDir) {
4206
- var curPos = this.getCellsInGridByElementId(elementIDToCopy);
4207
- var startColIndexForCopy = -1;
4208
- var startRowIndexForCopy = -1;
4209
- var backsideForCopy = copyDir == 'BACKSIDE' ? !curPos.backside : curPos.backside;
4210
- var cellCount = this.getCellCount(newElement);
4211
- switch (copyDir) {
4212
- case 'AVR':
4213
- startColIndexForCopy = curPos.endColIndex + 1;
4214
- startRowIndexForCopy = curPos.startRowIndex;
4215
- break;
4216
- case 'AVL':
4217
- startColIndexForCopy = curPos.startColIndex - cellCount.colCount;
4218
- startRowIndexForCopy = curPos.startRowIndex;
4219
- break;
4220
- case 'AVO':
4221
- startColIndexForCopy = curPos.startColIndex;
4222
- startRowIndexForCopy = curPos.endRowIndex + 1;
4223
- break;
4224
- case 'BACKSIDE':
4225
- startColIndexForCopy = curPos.startColIndex;
4226
- startRowIndexForCopy = curPos.startRowIndex;
4227
- break;
4228
- }
4229
- var newCellInfos = this.createNewCells(newElement, startColIndexForCopy, startRowIndexForCopy, backsideForCopy);
4204
+ value: function addElementAsCopy(copiedElementId, newElement, copyIndex) {
4205
+ var curPos = this.getCellsInGridByElementId(copiedElementId);
4206
+ var cellIndex = {
4207
+ x: curPos.endColIndex + copyIndex.x,
4208
+ y: curPos.endRowIndex + copyIndex.y
4209
+ };
4210
+ var backsideForCopy = copyIndex.z == -1 || curPos.backside == true;
4211
+ var newCellInfos = this.createNewCells(newElement, cellIndex.x, cellIndex.y, backsideForCopy);
4230
4212
  var curGrid = backsideForCopy ? this.backGrid : this.frontGrid;
4231
4213
  for (var i = 0; i < newCellInfos.cells.length; i++) {
4232
4214
  if (!curGrid[newCellInfos.cells[i].index.x]) curGrid[newCellInfos.cells[i].index.x] = [];
@@ -5221,7 +5203,7 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5221
5203
  value: (function () {
5222
5204
  var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(articleCopyRelation, copyInfo) {
5223
5205
  var _this = this;
5224
- var gridIsPrepared, plannerElementsToLoadSVG, that, copyType, i, cellPos, allDPs, j;
5206
+ var gridIsPrepared, plannerElementsToLoadSVG, that, i, cellPos, allDPs, j;
5225
5207
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
5226
5208
  while (1) switch (_context4.prev = _context4.next) {
5227
5209
  case 0:
@@ -5235,17 +5217,13 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5235
5217
  if (copyInfo.copyType == 'STD') copyInfo.targetElements = [];
5236
5218
  plannerElementsToLoadSVG = [];
5237
5219
  that = this;
5238
- copyType = 'AVR';
5239
- if (copyInfo.copyType == 'BoxPlanner_backside') copyType = 'BACKSIDE';else if (copyInfo.copyType == 'STD' || copyInfo.copyType == 'BoxPlanner_COL') {
5240
- if (copyInfo.dpType == 'AVR') copyType = 'AVR';else if (copyInfo.dpType == 'AVO') copyType = 'AVO';else if (copyInfo.dpType == 'AVL') copyType = 'AVL';
5241
- }
5242
5220
  articleCopyRelation.forEach(function (basketIDNewArticle, elementToCopyId) {
5243
5221
  var _copyInfo$targetEleme;
5244
5222
  if (!gridIsPrepared) {
5245
- if (copyInfo && (copyInfo.dpType == 'AVL' || copyInfo.dpType == 'AVR')) {
5246
- _this.boxPlannerGrid.prepareGridForColCopy(elementToCopyId, copyInfo.dpType);
5247
- } else if (copyInfo && copyInfo.copyType && copyInfo.copyType == 'BoxPlanner_backside') {
5223
+ if (copyInfo.copyIndex.z == -1) {
5248
5224
  if (!_this.boxPlannerGrid.getPlannerHasActiveBackside()) _this.boxPlannerGrid.prepareGridForBackSideCopy();
5225
+ } else {
5226
+ _this.boxPlannerGrid.prepareGridForColCopy(elementToCopyId, copyInfo.copyIndex);
5249
5227
  }
5250
5228
  }
5251
5229
  gridIsPrepared = true;
@@ -5256,22 +5234,22 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5256
5234
  _this.set.setElementId(basketIDNewArticle, plannerElement.ElementId);
5257
5235
  var data = _this.set.getPlannerData(plannerElement.ElementId);
5258
5236
  plannerElement.updatePlannerData(data);
5259
- _this.boxPlannerGrid.addElementAsCopy(elementToCopyId, plannerElement, copyType);
5237
+ _this.boxPlannerGrid.addElementAsCopy(elementToCopyId, plannerElement, copyInfo.copyIndex);
5260
5238
  _this.constructionRulesHandler.onElementCopy(elementToCopyId, plannerElement.getElementId());
5261
5239
  plannerElementsToLoadSVG.push(plannerElement);
5262
5240
  if (copyInfo.copyType == 'STD') (_copyInfo$targetEleme = copyInfo.targetElements) === null || _copyInfo$targetEleme === void 0 || _copyInfo$targetEleme.push(plannerElement.getElementId());
5263
5241
  });
5264
5242
  i = 0;
5265
- case 10:
5243
+ case 8:
5266
5244
  if (!(i < plannerElementsToLoadSVG.length)) {
5267
- _context4.next = 17;
5245
+ _context4.next = 15;
5268
5246
  break;
5269
5247
  }
5270
- _context4.next = 13;
5248
+ _context4.next = 11;
5271
5249
  return handler2D.loadSVG(plannerElementsToLoadSVG[i], this.set);
5272
- case 13:
5250
+ case 11:
5273
5251
  //Check if we have to prevent to build even higher in this col
5274
- if (copyType == 'AVO' && this.constructionRulesHandler.getHasMaxElemCountPerColumn()) {
5252
+ if (copyInfo.copyIndex.y == 1 && this.constructionRulesHandler.getHasMaxElemCountPerColumn()) {
5275
5253
  //The max height of col is reached
5276
5254
  cellPos = this.boxPlannerGrid.getCellsInGridByElementId(plannerElementsToLoadSVG[i].ElementId);
5277
5255
  if (cellPos.endRowIndex + 1 == that.constructionRulesHandler.getMaxElemCountPerColumn()) {
@@ -5281,15 +5259,15 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5281
5259
  }
5282
5260
  }
5283
5261
  }
5284
- case 14:
5262
+ case 12:
5285
5263
  i++;
5286
- _context4.next = 10;
5264
+ _context4.next = 8;
5287
5265
  break;
5288
- case 17:
5266
+ case 15:
5289
5267
  this.boxPlannerGrid.updateWorldPosOfElements();
5290
- _context4.next = 20;
5268
+ _context4.next = 18;
5291
5269
  return this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid, copyInfo.changedOPT, copyInfo.targetElements);
5292
- case 20:
5270
+ case 18:
5293
5271
  case "end":
5294
5272
  return _context4.stop();
5295
5273
  }
@@ -5349,7 +5327,7 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5349
5327
  key: "getPlannerElementsInfluencedByCopy",
5350
5328
  value: function getPlannerElementsInfluencedByCopy(elementId, copyInfo) {
5351
5329
  var allElementsToCopy = [];
5352
- if (copyInfo && (copyInfo === null || copyInfo === void 0 ? void 0 : copyInfo.dpType) == 'NO' && copyInfo.copyType == 'BoxPlanner_backside') {
5330
+ if (copyInfo && copyInfo.copyIndex.z == -1) {
5353
5331
  return this.boxPlannerGrid.getAllElementIdsInGrid();
5354
5332
  } else if (copyInfo && copyInfo.copyType == 'BoxPlanner_COL') {
5355
5333
  //Copy all col
@@ -5362,25 +5340,23 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5362
5340
  } else {
5363
5341
  allElementsToCopy.push(elementId);
5364
5342
  if (copyInfo) {
5365
- switch (copyInfo.dpType) {
5366
- case 'AVL':
5367
- case 'AVR':
5368
- if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
5369
- var result = this.boxPlannerGrid.getAllElementsInSameCol(elementId);
5370
- allElementsToCopy = result.elements;
5371
- result.backside;
5372
- } else {
5373
- var _result = this.boxPlannerGrid.getAllElementsDown(elementId);
5374
- allElementsToCopy = allElementsToCopy.concat(_result.elements);
5375
- _result.backside;
5376
- }
5377
- break;
5378
- case 'AVO':
5379
- if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
5380
- var resultCopyUp = this.boxPlannerGrid.getAllElementsInSameRowByElementId(elementId);
5381
- allElementsToCopy = resultCopyUp.elementIds;
5382
- resultCopyUp.backside;
5383
- }
5343
+ if (copyInfo.copyIndex.x != 0) {
5344
+ if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
5345
+ var result = this.boxPlannerGrid.getAllElementsInSameCol(elementId);
5346
+ allElementsToCopy = result.elements;
5347
+ result.backside;
5348
+ } else {
5349
+ var _result = this.boxPlannerGrid.getAllElementsDown(elementId);
5350
+ allElementsToCopy = allElementsToCopy.concat(_result.elements);
5351
+ _result.backside;
5352
+ }
5353
+ }
5354
+ if (copyInfo.copyIndex.y != 0) {
5355
+ if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
5356
+ var resultCopyUp = this.boxPlannerGrid.getAllElementsInSameRowByElementId(elementId);
5357
+ allElementsToCopy = resultCopyUp.elementIds;
5358
+ resultCopyUp.backside;
5359
+ }
5384
5360
  }
5385
5361
  if (this.boxPlannerGrid.getPlannerHasActiveBackside()) {
5386
5362
  allElementsToCopy = allElementsToCopy.concat(this.boxPlannerGrid.getOppositeElements(allElementsToCopy).map(function (element) {
@@ -5543,7 +5519,7 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5543
5519
  key: "updatePlanner",
5544
5520
  value: (function () {
5545
5521
  var _updatePlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(changedOPT, targetElements) {
5546
- var message, cellPos, elemToCheck, copyDir, allElementsToCopy, _allElementsToCopy, allElementsInBackGrid, _allElementsInBackGrid, _message;
5522
+ var message, cellPos, elemToCheck, copyIndex, allElementsToCopy, _allElementsToCopy, allElementsInBackGrid, _allElementsInBackGrid, _message;
5547
5523
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
5548
5524
  while (1) switch (_context6.prev = _context6.next) {
5549
5525
  case 0:
@@ -5586,24 +5562,27 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5586
5562
  break;
5587
5563
  }
5588
5564
  //Someone has changed Eck innen or aussen. If the current eselected Element has no neighbor left or right copy neighbor
5589
- copyDir = 'NO';
5565
+ copyIndex = {
5566
+ x: 0,
5567
+ y: 0,
5568
+ z: 0
5569
+ };
5590
5570
  if (!this.boxPlannerGrid.getElementHasLeftElement(elemToCheck)) {
5591
5571
  //Do copy to left Element
5592
- copyDir = 'AVL';
5572
+ copyIndex.x = -1;
5593
5573
  }
5594
5574
  if (!this.boxPlannerGrid.getElementHasRightElement(elemToCheck)) {
5595
5575
  //Do copy right element
5596
- copyDir = 'AVR';
5576
+ copyIndex.x = 1;
5597
5577
  }
5598
5578
  allElementsToCopy = this.getPlannerElementsInfluencedByCopy(elemToCheck, {
5599
- dpType: copyDir,
5579
+ copyIndex: copyIndex,
5600
5580
  copyType: 'BoxPlanner_COL'
5601
5581
  });
5602
5582
  return _context6.abrupt("return", {
5603
5583
  doDeleteBackGrid: false,
5604
5584
  elemIdsToDelete: [],
5605
5585
  elementIdToCopy: allElementsToCopy,
5606
- copyDPType: copyDir,
5607
5586
  copyType: 'BoxPlanner_COL',
5608
5587
  ignoreOptionsToCopy: ['OPTELEMENT'],
5609
5588
  changedOPT: changedOPT,
@@ -5623,7 +5602,11 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
5623
5602
  break;
5624
5603
  }
5625
5604
  _allElementsToCopy = this.getPlannerElementsInfluencedByCopy(-1, {
5626
- dpType: 'NO',
5605
+ copyIndex: {
5606
+ x: 0,
5607
+ y: 0,
5608
+ z: -1
5609
+ },
5627
5610
  copyType: 'BoxPlanner_backside'
5628
5611
  });
5629
5612
  return _context6.abrupt("return", {
@@ -3,9 +3,9 @@ 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 { V as Vector3, c as Vector2, P as PlannerElementData, B as BoundingBox } from './index-9836bc0f.js';
6
+ import { V as Vector3, c as Vector2, P as PlannerElementData, B as BoundingBox } from './index-cdc9af99.js';
7
7
  import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
8
- import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-0c96ec2e.js';
8
+ import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-fe777260.js';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
11
11
  import '@babel/runtime/helpers/toConsumableArray';
@@ -1245,7 +1245,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
1245
1245
  case 0:
1246
1246
  articlesToLoad = [];
1247
1247
  articleCopyRelation.forEach(function (basketIDNewArticle, elementToCopyId) {
1248
- if (copyInfo == undefined || copyInfo.dpType == 'NO') articlesToLoad.push(basketIDNewArticle);
1248
+ if (copyInfo == undefined) articlesToLoad.push(basketIDNewArticle);
1249
1249
  });
1250
1250
  i = 0;
1251
1251
  case 3:
@@ -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-9836bc0f.js';
4
+ import './index-cdc9af99.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 { R as Rendering, H as HQRenderScript } from './index-9836bc0f.js';
6
+ import { R as Rendering, H as HQRenderScript } from './index-cdc9af99.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-9836bc0f.js';
3
+ import './index-cdc9af99.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-9836bc0f.js';
3
+ import { a as articleHandlerInstance } from './index-cdc9af99.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, D as DockingPoint, V as Vector3 } from './index-9836bc0f.js';
6
+ import { c as Vector2, D as DockingPoint, V as Vector3 } from './index-cdc9af99.js';
7
7
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
8
8
  import { fabric } from 'fabric';
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-9836bc0f.js';
4
+ import { s as summaryHandlerInstance } from './index-cdc9af99.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, b as setHandlerInstance, a as articleHandlerInstance } from './index-9836bc0f.js';
7
+ import { G as Grid, b as setHandlerInstance, a as articleHandlerInstance } from './index-cdc9af99.js';
8
8
  import DivaUtils from '@crystaldesign/diva-utils';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
10
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -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-9836bc0f.js';
3
+ import './index-cdc9af99.js';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import '@babel/runtime/helpers/asyncToGenerator';
6
6
  import '@babel/runtime/helpers/defineProperty';
@@ -28256,7 +28256,7 @@ var DivaArticle = /*#__PURE__*/function () {
28256
28256
  break;
28257
28257
  }
28258
28258
  _context.next = 4;
28259
- return import('./ShelfPlanner-d3568028.js');
28259
+ return import('./ShelfPlanner-ba315b80.js');
28260
28260
  case 4:
28261
28261
  _yield$import = _context.sent;
28262
28262
  ShelfPlanner = _yield$import["default"];
@@ -32757,7 +32757,7 @@ var DivaSet = /*#__PURE__*/function () {
32757
32757
  break;
32758
32758
  }
32759
32759
  _context5.next = 3;
32760
- return import('./DoorPlanner-54471e77.js');
32760
+ return import('./DoorPlanner-20e5f657.js');
32761
32761
  case 3:
32762
32762
  _yield$import = _context5.sent;
32763
32763
  DoorPlanner = _yield$import["default"];
@@ -37740,7 +37740,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37740
37740
  value: (function () {
37741
37741
  var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
37742
37742
  var _resultPlannerUpdate;
37743
- var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
37743
+ var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle, rpu, copyIndex;
37744
37744
  return _regeneratorRuntime.wrap(function _callee27$(_context29) {
37745
37745
  while (1) switch (_context29.prev = _context29.next) {
37746
37746
  case 0:
@@ -37790,7 +37790,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37790
37790
 
37791
37791
  //Update Planner - check if planner data changed
37792
37792
  if (!(!ignorePlanner && from != 'calcVariant')) {
37793
- _context29.next = 55;
37793
+ _context29.next = 58;
37794
37794
  break;
37795
37795
  }
37796
37796
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
@@ -37835,7 +37835,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37835
37835
  break;
37836
37836
  case 41:
37837
37837
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
37838
- _context29.next = 54;
37838
+ _context29.next = 57;
37839
37839
  break;
37840
37840
  }
37841
37841
  //Todo copy these elements
@@ -37856,22 +37856,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
37856
37856
  _context29.next = 44;
37857
37857
  break;
37858
37858
  case 52:
37859
- _context29.next = 54;
37859
+ rpu = resultPlannerUpdate;
37860
+ copyIndex = {
37861
+ x: rpu.copyDPType == 'AVL' ? -1 : rpu.copyDPType == 'AVR' ? 1 : 0,
37862
+ y: 0,
37863
+ z: rpu.copyType == 'BoxPlanner_backside' ? -1 : 0
37864
+ };
37865
+ if (!(resultPlannerUpdate.copyType == 'BoxPlanner_backside')) {
37866
+ _context29.next = 57;
37867
+ break;
37868
+ }
37869
+ _context29.next = 57;
37860
37870
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
37861
- dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
37871
+ copyIndex: copyIndex,
37862
37872
  copyType: resultPlannerUpdate.copyType,
37863
37873
  changedOPT: resultPlannerUpdate.changedOPT,
37864
37874
  targetElements: resultPlannerUpdate.targetElements
37865
37875
  });
37866
- case 54:
37876
+ case 57:
37867
37877
  this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
37868
- case 55:
37878
+ case 58:
37869
37879
  return _context29.abrupt("return", {
37870
37880
  articleCountChanged: elementsToDeleteById.length > 0,
37871
37881
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
37872
37882
  setId: set.getSetId()
37873
37883
  });
37874
- case 56:
37884
+ case 59:
37875
37885
  case "end":
37876
37886
  return _context29.stop();
37877
37887
  }
@@ -39745,7 +39755,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39745
39755
  break;
39746
39756
  case 3:
39747
39757
  _context12.next = 5;
39748
- return import('./PfisterWWSHandler-a5542a05.js');
39758
+ return import('./PfisterWWSHandler-27999564.js');
39749
39759
  case 5:
39750
39760
  _yield$import = _context12.sent;
39751
39761
  PfisterWWSHandler = _yield$import["default"];
@@ -39753,7 +39763,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39753
39763
  return _context12.abrupt("break", 27);
39754
39764
  case 9:
39755
39765
  _context12.next = 11;
39756
- return import('./LiviqueWWSHandler-53a5195d.js');
39766
+ return import('./LiviqueWWSHandler-13bcb486.js');
39757
39767
  case 11:
39758
39768
  _yield$import2 = _context12.sent;
39759
39769
  LiviqueWWSHandler = _yield$import2["default"];
@@ -39761,7 +39771,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39761
39771
  return _context12.abrupt("break", 27);
39762
39772
  case 15:
39763
39773
  _context12.next = 17;
39764
- return import('./SeriousBasketHandler-fed815e3.js');
39774
+ return import('./SeriousBasketHandler-9c60850c.js');
39765
39775
  case 17:
39766
39776
  _yield$import3 = _context12.sent;
39767
39777
  SeriousWWSHandler = _yield$import3["default"];
@@ -39769,7 +39779,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39769
39779
  return _context12.abrupt("break", 27);
39770
39780
  case 21:
39771
39781
  _context12.next = 23;
39772
- return import('./StandardWWSHandler-38258f9c.js');
39782
+ return import('./StandardWWSHandler-ac9d3e80.js');
39773
39783
  case 23:
39774
39784
  _yield$import4 = _context12.sent;
39775
39785
  StandardWWSHandler = _yield$import4["default"];
@@ -41198,7 +41208,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41198
41208
  while (1) switch (_context3.prev = _context3.next) {
41199
41209
  case 0:
41200
41210
  _context3.next = 2;
41201
- return import('./Host3DSignalR-79df2488.js');
41211
+ return import('./Host3DSignalR-01931604.js');
41202
41212
  case 2:
41203
41213
  _yield$import = _context3.sent;
41204
41214
  Host3DSignalR = _yield$import["default"];
@@ -42756,7 +42766,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42756
42766
  break;
42757
42767
  case 8:
42758
42768
  _context4.next = 10;
42759
- return import('./DivaStandardPlanner-90620c78.js');
42769
+ return import('./DivaStandardPlanner-0fee420b.js');
42760
42770
  case 10:
42761
42771
  _yield$import = _context4.sent;
42762
42772
  DivaStandardPlanner = _yield$import["default"];
@@ -42767,7 +42777,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42767
42777
  return _context4.abrupt("break", 21);
42768
42778
  case 15:
42769
42779
  _context4.next = 17;
42770
- return import('./DivaBoxPlanner-28a692cd.js');
42780
+ return import('./DivaBoxPlanner-fc0dd76f.js');
42771
42781
  case 17:
42772
42782
  _yield$import2 = _context4.sent;
42773
42783
  DivaBoxPlanner = _yield$import2["default"];
@@ -43411,7 +43421,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43411
43421
  return _regeneratorRuntime.wrap(function _callee15$(_context15) {
43412
43422
  while (1) switch (_context15.prev = _context15.next) {
43413
43423
  case 0:
43414
- if (this.plannerList.has(setId)) {
43424
+ if (!(!this.plannerList.has(setId) || !copyInfo)) {
43415
43425
  _context15.next = 2;
43416
43426
  break;
43417
43427
  }
@@ -45281,7 +45291,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45281
45291
  key: "copyPlannerElement",
45282
45292
  value: (function () {
45283
45293
  var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
45284
- var newConfigStepKey, copyDps, eId, _i, _copyDps, _this$updateViewPlann12, copyDp, set, newSelectedArticle, _this$updateElementSe7, baseArticle;
45294
+ var _this$updateViewPlann12;
45295
+ var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
45285
45296
  return _regeneratorRuntime.wrap(function _callee21$(_context21) {
45286
45297
  while (1) switch (_context21.prev = _context21.next) {
45287
45298
  case 0:
@@ -45291,46 +45302,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45291
45302
  }
45292
45303
  return _context21.abrupt("return");
45293
45304
  case 2:
45294
- newConfigStepKey = '';
45295
- copyDps = [];
45296
- eId = elementId;
45297
- if (copyInfo.copyIndex.x > 0) copyDps.push('AVR');else copyDps.push('AVL');
45298
- if (copyInfo.copyIndex.y > 0) copyDps.push('AVO');
45299
- _i = 0, _copyDps = copyDps;
45300
- case 8:
45301
- if (!(_i < _copyDps.length)) {
45302
- _context21.next = 26;
45303
- break;
45304
- }
45305
- copyDp = _copyDps[_i];
45306
45305
  set = this.sets[setId];
45307
- _context21.next = 13;
45308
- return setHandlerInstance.copyPlannerElement(set, eId, {
45309
- copyType: copyInfo.copyType,
45310
- dpType: copyDp
45311
- });
45312
- case 13:
45306
+ _context21.next = 5;
45307
+ return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
45308
+ case 5:
45313
45309
  newSelectedArticle = _context21.sent;
45314
- if (newSelectedArticle !== null && newSelectedArticle !== void 0 && newSelectedArticle.elementId) eId = newSelectedArticle.elementId;
45315
45310
  this.updateConfigStructure();
45316
45311
  (_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
45317
45312
  this.updatePlannerView('COPY_PLANNER_ELEMENT');
45318
45313
  this.updatePriceInView();
45319
45314
  this.updateViewButtonsDependigOnConfigStructure();
45315
+ newConfigStepKey = undefined;
45320
45316
  if (newSelectedArticle != undefined) {
45321
- set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
45317
+ newConfigStepKey = set.configTree.getNewConfigStepKeyByBasketId(curConfigKey, newSelectedArticle.basketId);
45322
45318
  this.loadPaletteInfos(curConfigKey, [newSelectedArticle.basketId], Object.keys(set.getDivaArticles()));
45323
45319
  baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
45324
45320
  (_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
45325
45321
  }
45326
45322
  this.checkMatchingProducts('onCopy');
45327
- case 23:
45328
- _i++;
45329
- _context21.next = 8;
45330
- break;
45331
- case 26:
45332
45323
  return _context21.abrupt("return", newConfigStepKey);
45333
- case 27:
45324
+ case 15:
45334
45325
  case "end":
45335
45326
  return _context21.stop();
45336
45327
  }
@@ -46938,8 +46929,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46938
46929
  var actualBasketvalue = 0;
46939
46930
  if (set) {
46940
46931
  actualBasketvalue = set === null || set === void 0 ? void 0 : set.getSetPrice();
46941
- for (var _i2 = 0, _Object$values = Object.values(set.getDivaArticles()); _i2 < _Object$values.length; _i2++) {
46942
- var article = _Object$values[_i2];
46932
+ for (var _i = 0, _Object$values = Object.values(set.getDivaArticles()); _i < _Object$values.length; _i++) {
46933
+ var article = _Object$values[_i];
46943
46934
  if (article.relatedToBasketId) {
46944
46935
  var toAdd = {
46945
46936
  codex: article.configArticleCodex,
@@ -47006,8 +46997,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47006
46997
  };
47007
46998
  latestColor = ((_set$CatalogData$getO3 = set.CatalogData.getOptionValue(Object.values(myValues)[0])) === null || _set$CatalogData$getO3 === void 0 ? void 0 : _set$CatalogData$getO3.colorGroups) || [];
47008
46999
  }
47009
- for (var _i3 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i3 < _Object$values2.length; _i3++) {
47010
- var article = _Object$values2[_i3];
47000
+ for (var _i2 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i2 < _Object$values2.length; _i2++) {
47001
+ var article = _Object$values2[_i2];
47011
47002
  if (!configuration) {
47012
47003
  configuration = [{
47013
47004
  varientValues: article.VariantValues,
@@ -47047,9 +47038,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
47047
47038
  })
47048
47039
  });
47049
47040
  }
47050
- for (var _i4 = 0, _Object$entries = Object.entries(article.VariantValues); _i4 < _Object$entries.length; _i4++) {
47041
+ for (var _i3 = 0, _Object$entries = Object.entries(article.VariantValues); _i3 < _Object$entries.length; _i3++) {
47051
47042
  var _set$CatalogData$getO8, _set$CatalogData$getO9;
47052
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i4], 2),
47043
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2),
47053
47044
  opt = _Object$entries$_i[0],
47054
47045
  opv = _Object$entries$_i[1];
47055
47046
  allOpt.push({
@@ -1,4 +1,4 @@
1
- export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, D as DockingPoint, G as Grid, O as OptionCatalogData, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-9836bc0f.js';
1
+ export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, D as DockingPoint, G as Grid, O as OptionCatalogData, P as PlannerElementData, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-cdc9af99.js';
2
2
  import '@babel/runtime/helpers/slicedToArray';
3
3
  import '@babel/runtime/helpers/asyncToGenerator';
4
4
  import '@babel/runtime/helpers/classCallCheck';
@@ -19,7 +19,7 @@ export type { AccessoireItemType } from './interface/Articles/AccessoireItemType
19
19
  export type { CatalogPlannerArticleViewDataType } from './interface/Articles/CatalogPlannerArticleViewDataType';
20
20
  export type { StaticRoomDataType, ViewPointDataType } from './interface/Planner/StaticRoomDataType';
21
21
  export type { ReturnTo } from './interface/webPlannerParams/WebPlannerParamsType';
22
- export type { PlannerMode, PriceFormat, ParamCopyPlannerElementInfo, Nav3DMode, Nav3DParams } from './interface/FunctionTypes';
22
+ export type { PlannerMode, PriceFormat, Nav3DMode, Nav3DParams } from './interface/FunctionTypes';
23
23
  export type { ShelfAccessoriesView, FreePlacesOnGrids, PlannedPlacesOnGrids, ShelfAccessories } from './interface/ShelfPlanner/ShelfAccessoiresView';
24
24
  export type { MetaData } from './interface/Articles/CatalogArticleDataType';
25
25
  export type { ShelfAccessories3DValues } from './interface/ShelfPlanner/ShelfPlanner3DValues';