@crystaldesign/web-planner-logic 26.5.0-beta.48 → 26.5.0-beta.49
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.
- package/build/cjs/{DivaBoxPlanner-176808cf.js → DivaBoxPlanner-a83ddf2d.js} +95 -47
- package/build/cjs/{DivaStandardPlanner-f6aa5074.js → DivaStandardPlanner-6839d35f.js} +2 -2
- package/build/cjs/{DoorPlanner-062bb372.js → DoorPlanner-d9d820b2.js} +1 -1
- package/build/cjs/{Host3DSignalR-96aeeba6.js → Host3DSignalR-7a424c6f.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-c8131605.js → LiviqueWWSHandler-1b4c240f.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-e129a977.js → PfisterWWSHandler-bf4b2af0.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b7afe8f4.js → PlannerHandler2D-4ef7a85f.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-1e030846.js → SeriousBasketHandler-e4e0835e.js} +1 -1
- package/build/cjs/{ShelfPlanner-c53230d3.js → ShelfPlanner-c4449795.js} +1 -1
- package/build/cjs/{StandardWWSHandler-cfe94d8b.js → StandardWWSHandler-7d3feb60.js} +1 -1
- package/build/cjs/{index-c30cb6cd.js → index-9145fe80.js} +120 -156
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-7417fb22.js → DivaBoxPlanner-34141af8.js} +95 -47
- package/build/esm/{DivaStandardPlanner-25408326.js → DivaStandardPlanner-9e6ffa11.js} +2 -2
- package/build/esm/{DoorPlanner-4acb508b.js → DoorPlanner-ad6344a7.js} +1 -1
- package/build/esm/{Host3DSignalR-0515c7b6.js → Host3DSignalR-baf9963c.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-c907d17d.js → LiviqueWWSHandler-56c4d1d2.js} +1 -1
- package/build/esm/{PfisterWWSHandler-c3120b8c.js → PfisterWWSHandler-d0109020.js} +1 -1
- package/build/esm/{PlannerHandler2D-a2636f6e.js → PlannerHandler2D-ebe62b9b.js} +1 -1
- package/build/esm/{SeriousBasketHandler-2cbd6a97.js → SeriousBasketHandler-29af6f6d.js} +1 -1
- package/build/esm/{ShelfPlanner-7805b794.js → ShelfPlanner-7f73ac20.js} +1 -1
- package/build/esm/{StandardWWSHandler-6dcf278c.js → StandardWWSHandler-553bf27b.js} +1 -1
- package/build/esm/{index-c160e407.js → index-66df82ca.js} +120 -156
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/API/Checkout.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +3 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -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-
|
|
6
|
+
import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-66df82ca.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-
|
|
10
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-ebe62b9b.js';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
12
12
|
import 'axios';
|
|
13
13
|
import '@crystaldesign/basket-model';
|
|
@@ -2681,12 +2681,27 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
|
|
|
2681
2681
|
}, {
|
|
2682
2682
|
key: "correctFoot",
|
|
2683
2683
|
value: function correctFoot(boxPlannerGrid, optionHandler) {
|
|
2684
|
-
var
|
|
2684
|
+
var _bottomElements$map$f,
|
|
2685
|
+
_this3 = this;
|
|
2685
2686
|
var elements = boxPlannerGrid.getAllElementsInFrontGrid();
|
|
2687
|
+
var bottomElements = boxPlannerGrid.getAllElementsInRow(0, false);
|
|
2688
|
+
var selectedFootSystem = (_bottomElements$map$f = bottomElements.map(function (element) {
|
|
2689
|
+
return _this3.getOptionVal(element.ElementId, 'OPTFUSS_SYS', optionHandler);
|
|
2690
|
+
}).find(function (optionValue) {
|
|
2691
|
+
return optionValue !== '' && optionValue !== 'OPVOHNE';
|
|
2692
|
+
})) !== null && _bottomElements$map$f !== void 0 ? _bottomElements$map$f : bottomElements.map(function (element) {
|
|
2693
|
+
return _this3.getOptionVal(element.ElementId, 'OPTFUSS_SYS', optionHandler);
|
|
2694
|
+
}).find(function (optionValue) {
|
|
2695
|
+
return optionValue !== '';
|
|
2696
|
+
});
|
|
2686
2697
|
elements.forEach(function (e) {
|
|
2687
2698
|
if (boxPlannerGrid.getElementHasBottomElement(e.ElementId)) {
|
|
2688
2699
|
_this3.setOptionValue(e.ElementId, 'OPTFUSS_SYS', 'OPVOHNE', optionHandler);
|
|
2689
2700
|
_this3.setOptionValue(e.ElementId, 'OPTPOSSIBILITY_FUSS_OHNE', 'OPVTRUE', optionHandler);
|
|
2701
|
+
} else {
|
|
2702
|
+
if (selectedFootSystem) {
|
|
2703
|
+
_this3.setOptionValue(e.ElementId, 'OPTFUSS_SYS', selectedFootSystem, optionHandler);
|
|
2704
|
+
}
|
|
2690
2705
|
}
|
|
2691
2706
|
});
|
|
2692
2707
|
}
|
|
@@ -3188,7 +3203,7 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
|
|
|
3188
3203
|
value: function () {
|
|
3189
3204
|
var _updateOptionLogicBoxPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(boxPlannerGrid, changedOPTs, targetElements, forceResetCornerElements) {
|
|
3190
3205
|
var _targetElements;
|
|
3191
|
-
var startTime, resultMessage, optionHandler, allElements, i, j, _boxPlannerGrid$getPl2, elementId, _boxPlannerGrid$getPl3, _elementId, _iterator, _step, coverPlateRule, _boxPlannerGrid$getPl4, _elementId2
|
|
3206
|
+
var startTime, resultMessage, optionHandler, allElements, i, j, _boxPlannerGrid$getPl2, elementId, _boxPlannerGrid$getPl3, _elementId, doChangeRetailArticleNumbers, _iterator, _step, coverPlateRule, _boxPlannerGrid$getPl4, _elementId2;
|
|
3192
3207
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3193
3208
|
while (1) switch (_context.prev = _context.next) {
|
|
3194
3209
|
case 0:
|
|
@@ -3305,6 +3320,13 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
|
|
|
3305
3320
|
this.correctOverHangingElement((_targetElements = targetElements) === null || _targetElements === void 0 ? void 0 : _targetElements[0], boxPlannerGrid, optionHandler, changedOPTs);
|
|
3306
3321
|
this.partlistHelper.calculateKnots(boxPlannerGrid, optionHandler);
|
|
3307
3322
|
this.partlistHelper.calculateRahmen(boxPlannerGrid, optionHandler);
|
|
3323
|
+
|
|
3324
|
+
// update height after we corrected the foot since we need the correct one for the CoverPlate calc
|
|
3325
|
+
doChangeRetailArticleNumbers = this.doChangeRetailArticleNumbers(boxPlannerGrid, optionHandler);
|
|
3326
|
+
_context.next = 56;
|
|
3327
|
+
return this.updateCfgValuesByPlanner(optionHandler, undefined, this.constructionRules.partlistRules.bundleRules, doChangeRetailArticleNumbers);
|
|
3328
|
+
case 56:
|
|
3329
|
+
this.updateGridElementDimensions();
|
|
3308
3330
|
if (this.constructionRules.coverPlateRule) {
|
|
3309
3331
|
_iterator = _createForOfIteratorHelper$1(this.constructionRules.coverPlateRule);
|
|
3310
3332
|
try {
|
|
@@ -3319,44 +3341,44 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
|
|
|
3319
3341
|
}
|
|
3320
3342
|
}
|
|
3321
3343
|
i = 0;
|
|
3322
|
-
case
|
|
3344
|
+
case 59:
|
|
3323
3345
|
if (!(i < boxPlannerGrid.getColumnCount())) {
|
|
3324
|
-
_context.next =
|
|
3346
|
+
_context.next = 72;
|
|
3325
3347
|
break;
|
|
3326
3348
|
}
|
|
3327
3349
|
j = 0;
|
|
3328
|
-
case
|
|
3350
|
+
case 61:
|
|
3329
3351
|
if (!(j < boxPlannerGrid.getRowCount(i, false))) {
|
|
3330
|
-
_context.next =
|
|
3352
|
+
_context.next = 69;
|
|
3331
3353
|
break;
|
|
3332
3354
|
}
|
|
3333
3355
|
_elementId2 = (_boxPlannerGrid$getPl4 = boxPlannerGrid.getPlannerElementAtGridPos(i, j, false)) === null || _boxPlannerGrid$getPl4 === void 0 ? void 0 : _boxPlannerGrid$getPl4.getElementId();
|
|
3334
3356
|
if (_elementId2) {
|
|
3335
|
-
_context.next =
|
|
3357
|
+
_context.next = 65;
|
|
3336
3358
|
break;
|
|
3337
3359
|
}
|
|
3338
|
-
return _context.abrupt("continue",
|
|
3339
|
-
case
|
|
3360
|
+
return _context.abrupt("continue", 66);
|
|
3361
|
+
case 65:
|
|
3340
3362
|
this.correctBack(boxPlannerGrid, optionHandler, _elementId2);
|
|
3341
|
-
case
|
|
3363
|
+
case 66:
|
|
3342
3364
|
j++;
|
|
3343
|
-
_context.next =
|
|
3365
|
+
_context.next = 61;
|
|
3344
3366
|
break;
|
|
3345
|
-
case
|
|
3367
|
+
case 69:
|
|
3346
3368
|
i++;
|
|
3347
|
-
_context.next =
|
|
3369
|
+
_context.next = 59;
|
|
3348
3370
|
break;
|
|
3349
|
-
case
|
|
3371
|
+
case 72:
|
|
3350
3372
|
doChangeRetailArticleNumbers = this.doChangeRetailArticleNumbers(boxPlannerGrid, optionHandler);
|
|
3351
|
-
_context.next =
|
|
3373
|
+
_context.next = 75;
|
|
3352
3374
|
return this.updateCfgValuesByPlanner(optionHandler, undefined, this.constructionRules.partlistRules.bundleRules, doChangeRetailArticleNumbers);
|
|
3353
|
-
case
|
|
3375
|
+
case 75:
|
|
3354
3376
|
this.updateIDMSpecificFeatures();
|
|
3355
3377
|
this.updateGridElementDimensions();
|
|
3356
3378
|
LOG$2.debug('BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: ' + (new Date().getTime() - startTime));
|
|
3357
3379
|
LOG$2.debug('BoxPlanner updateOptionLogic - Duration after setting updating configurator: ' + (new Date().getTime() - startTime));
|
|
3358
3380
|
return _context.abrupt("return", resultMessage);
|
|
3359
|
-
case
|
|
3381
|
+
case 80:
|
|
3360
3382
|
case "end":
|
|
3361
3383
|
return _context.stop();
|
|
3362
3384
|
}
|
|
@@ -3620,22 +3642,31 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
3620
3642
|
if (curGrid[cell.index.x].length == 0) curGrid.splice(cell.index.x, 1);
|
|
3621
3643
|
});
|
|
3622
3644
|
var refreshedGrid = [];
|
|
3645
|
+
var elementAreaById = new Map();
|
|
3623
3646
|
curGrid.forEach(function (row, x) {
|
|
3624
3647
|
refreshedGrid[x] = [];
|
|
3625
3648
|
row.forEach(function (column, y) {
|
|
3626
|
-
var
|
|
3649
|
+
var plannedElement = column.plannedElement;
|
|
3650
|
+
var elementId = plannedElement.elementId;
|
|
3651
|
+
var areaSpanX = plannedElement.area.toX - plannedElement.area.fromX;
|
|
3652
|
+
var areaSpanY = plannedElement.area.toY - plannedElement.area.fromY;
|
|
3653
|
+
var refreshedArea = elementAreaById.get(elementId);
|
|
3654
|
+
if (!refreshedArea) {
|
|
3655
|
+
refreshedArea = {
|
|
3656
|
+
fromX: x,
|
|
3657
|
+
fromY: y,
|
|
3658
|
+
toX: x + areaSpanX,
|
|
3659
|
+
toY: y + areaSpanY
|
|
3660
|
+
};
|
|
3661
|
+
elementAreaById.set(elementId, refreshedArea);
|
|
3662
|
+
}
|
|
3627
3663
|
refreshedGrid[x][y] = {
|
|
3628
3664
|
index: {
|
|
3629
3665
|
x: x,
|
|
3630
3666
|
y: y
|
|
3631
3667
|
},
|
|
3632
|
-
plannedElement: _objectSpread(_objectSpread({},
|
|
3633
|
-
area:
|
|
3634
|
-
fromX: x,
|
|
3635
|
-
fromY: y,
|
|
3636
|
-
toX: x + (area.toX - area.fromX),
|
|
3637
|
-
toY: y + (area.toY - area.fromY)
|
|
3638
|
-
}
|
|
3668
|
+
plannedElement: _objectSpread(_objectSpread({}, plannedElement), {}, {
|
|
3669
|
+
area: refreshedArea
|
|
3639
3670
|
})
|
|
3640
3671
|
};
|
|
3641
3672
|
});
|
|
@@ -4172,7 +4203,10 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4172
4203
|
var endHeight = 0;
|
|
4173
4204
|
for (var y = 0; y < currentRow.length;) {
|
|
4174
4205
|
var cell = currentRow[y];
|
|
4175
|
-
if (!cell || !cell.plannedElement)
|
|
4206
|
+
if (!cell || !cell.plannedElement) {
|
|
4207
|
+
y += 1;
|
|
4208
|
+
continue;
|
|
4209
|
+
}
|
|
4176
4210
|
if (cell.index.y < res.startRowIndex) startHeight = Math.round((startHeight + cell.plannedElement.size.height) * 1000) / 1000;
|
|
4177
4211
|
if (cell.index.y < res.endRowIndex) endHeight = Math.round((endHeight + cell.plannedElement.size.height) * 1000) / 1000;
|
|
4178
4212
|
y = cell.plannedElement.area.toY;
|
|
@@ -4184,12 +4218,15 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4184
4218
|
// only clean neighbours (for docking) add property if you also need clean ones
|
|
4185
4219
|
|
|
4186
4220
|
for (var x = plannedElement.area.toX; x < curGrid.length;) {
|
|
4187
|
-
var _neighbourRow$0$plann, _neighbourRow
|
|
4221
|
+
var _neighbourRow$0$plann, _neighbourRow$;
|
|
4188
4222
|
var neighbourRow = curGrid[x];
|
|
4189
4223
|
for (var _y = 0; _y < (neighbourRow === null || neighbourRow === void 0 ? void 0 : neighbourRow.length);) {
|
|
4190
4224
|
var _cell5$plannedElement, _cell5$plannedElement2;
|
|
4191
4225
|
var _cell5 = neighbourRow[_y];
|
|
4192
|
-
if (!_cell5 || neighbours.includes(_cell5))
|
|
4226
|
+
if (!_cell5 || neighbours.includes(_cell5)) {
|
|
4227
|
+
_y += 1;
|
|
4228
|
+
continue;
|
|
4229
|
+
}
|
|
4193
4230
|
|
|
4194
4231
|
// cubo has ladders that cause the first box to range all to the top, therefore the height computation won't work
|
|
4195
4232
|
if (plannedElement.area.fromY == _y && this.gridSetupParams.forceSingleCellPerElement && plannedElement.area.toX == x) neighbours.push(_cell5);else if (clean && !this.gridSetupParams.forceSingleCellPerElement && neighbourSize == startHeight) neighbours.push(_cell5);else if (!clean && neighbourSize >= startHeight && neighbourSize <= endHeight) neighbours.push(_cell5);
|
|
@@ -4197,7 +4234,7 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4197
4234
|
_y = (_cell5$plannedElement = (_cell5$plannedElement2 = _cell5.plannedElement) === null || _cell5$plannedElement2 === void 0 ? void 0 : _cell5$plannedElement2.area.toY) !== null && _cell5$plannedElement !== void 0 ? _cell5$plannedElement : _y + 1;
|
|
4198
4235
|
}
|
|
4199
4236
|
neighbourSize = 0;
|
|
4200
|
-
x = (_neighbourRow$0$plann = (_neighbourRow$
|
|
4237
|
+
x = (_neighbourRow$0$plann = (_neighbourRow$ = neighbourRow[0]) === null || _neighbourRow$ === void 0 || (_neighbourRow$ = _neighbourRow$.plannedElement) === null || _neighbourRow$ === void 0 ? void 0 : _neighbourRow$.area.toX) !== null && _neighbourRow$0$plann !== void 0 ? _neighbourRow$0$plann : x + 1;
|
|
4201
4238
|
}
|
|
4202
4239
|
neighbours.forEach(function (n) {
|
|
4203
4240
|
return !result.find(function (r) {
|
|
@@ -4207,17 +4244,21 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4207
4244
|
break;
|
|
4208
4245
|
case 'LEFT':
|
|
4209
4246
|
for (var _x2 = plannedElement.area.fromX - 1; _x2 >= 0;) {
|
|
4247
|
+
var _neighbourRow$2;
|
|
4210
4248
|
var _neighbourRow = curGrid[_x2];
|
|
4211
4249
|
for (var _y2 = 0; _y2 < (_neighbourRow === null || _neighbourRow === void 0 ? void 0 : _neighbourRow.length);) {
|
|
4212
4250
|
var _cell6$plannedElement, _cell6$plannedElement2;
|
|
4213
4251
|
var _cell6 = _neighbourRow[_y2];
|
|
4214
|
-
if (!_cell6 || neighbours.includes(_cell6))
|
|
4252
|
+
if (!_cell6 || neighbours.includes(_cell6)) {
|
|
4253
|
+
_y2 += 1;
|
|
4254
|
+
continue;
|
|
4255
|
+
}
|
|
4215
4256
|
if (plannedElement.area.fromY == _y2 && this.gridSetupParams.forceSingleCellPerElement && plannedElement.area.fromX - 1 == _x2) neighbours.push(_cell6);else if (clean && !this.gridSetupParams.forceSingleCellPerElement && neighbourSize == startHeight) neighbours.push(_cell6);else if (!clean && neighbourSize >= startHeight && neighbourSize <= endHeight) neighbours.push(_cell6);
|
|
4216
4257
|
neighbourSize = Math.round((neighbourSize + _cell6.plannedElement.size.height) * 1000) / 1000;
|
|
4217
4258
|
_y2 = (_cell6$plannedElement = (_cell6$plannedElement2 = _cell6.plannedElement) === null || _cell6$plannedElement2 === void 0 ? void 0 : _cell6$plannedElement2.area.toY) !== null && _cell6$plannedElement !== void 0 ? _cell6$plannedElement : _y2 + 1;
|
|
4218
4259
|
}
|
|
4219
4260
|
neighbourSize = 0;
|
|
4220
|
-
_x2 = _neighbourRow[0].plannedElement ? _neighbourRow[0].plannedElement.area.fromX - 1 : _x2 + 1;
|
|
4261
|
+
_x2 = (_neighbourRow$2 = _neighbourRow[0]) !== null && _neighbourRow$2 !== void 0 && _neighbourRow$2.plannedElement ? _neighbourRow[0].plannedElement.area.fromX - 1 : _x2 + 1;
|
|
4221
4262
|
}
|
|
4222
4263
|
neighbours.forEach(function (n) {
|
|
4223
4264
|
return !result.find(function (r) {
|
|
@@ -4422,7 +4463,7 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4422
4463
|
//columns and rows are swapped don't ask me why
|
|
4423
4464
|
var element = curPos.cells[0].plannedElement;
|
|
4424
4465
|
var index = {
|
|
4425
|
-
x: dir == 'LEFT' ? curPos.startColIndex : curPos.endColIndex
|
|
4466
|
+
x: dir == 'LEFT' ? curPos.startColIndex - 1 : curPos.endColIndex,
|
|
4426
4467
|
y: curPos.startRowIndex
|
|
4427
4468
|
};
|
|
4428
4469
|
var curGrid = curPos.backside ? this.generalPlanningState.grids[1].matrix : this.generalPlanningState.grids[0].matrix;
|
|
@@ -4434,9 +4475,21 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4434
4475
|
fromX: element.area.fromX + d,
|
|
4435
4476
|
toX: element.area.toX + d
|
|
4436
4477
|
});
|
|
4478
|
+
|
|
4479
|
+
// Neighbor column left/right of the copy (where support width is checked). At the grid edge that column does not exist
|
|
4480
|
+
// (LEFT: startColIndex === 0 → index.x === -1; RIGHT: endColIndex === curGrid.length → past last column).
|
|
4481
|
+
// Then scan along an in-grid column of this element so we still collect the full vertical stack to copy.
|
|
4482
|
+
var supportColX = index.x;
|
|
4483
|
+
if (!curGrid[supportColX]) {
|
|
4484
|
+
supportColX = dir === 'LEFT' ? curPos.startColIndex : curPos.endColIndex - 1;
|
|
4485
|
+
}
|
|
4437
4486
|
var _loop = function _loop(_y3) {
|
|
4438
|
-
var _curGrid$
|
|
4439
|
-
|
|
4487
|
+
var _curGrid$supportColX$, _Width, _Width2;
|
|
4488
|
+
if (!curGrid[supportColX]) {
|
|
4489
|
+
y = _y3;
|
|
4490
|
+
return 0;
|
|
4491
|
+
} // break
|
|
4492
|
+
var supportElement = (_curGrid$supportColX$ = curGrid[supportColX][_y3]) === null || _curGrid$supportColX$ === void 0 ? void 0 : _curGrid$supportColX$.plannedElement;
|
|
4440
4493
|
if (!supportElement) {
|
|
4441
4494
|
y = _y3;
|
|
4442
4495
|
return 0;
|
|
@@ -4676,27 +4729,22 @@ var BoxPlannerGrid = /*#__PURE__*/function () {
|
|
|
4676
4729
|
var curGrid = this.generalPlanningState.grids[0].matrix;
|
|
4677
4730
|
var cells = undefined;
|
|
4678
4731
|
if (absoluteIndex.x < 0 && absoluteIndex.y == 0) {
|
|
4679
|
-
var dir = deletedCells.endColIndex >= absoluteIndex.x;
|
|
4680
4732
|
if (deletedCells.startColIndex <= absoluteIndex.x) absoluteIndex.x -= deletedCells.endColIndex - deletedCells.startColIndex;
|
|
4681
4733
|
if (absoluteIndex.x < 0) absoluteIndex.x = 0;
|
|
4682
4734
|
cells = this.createNewCells(elementData, absoluteIndex.x, absoluteIndex.y, false);
|
|
4683
4735
|
var movedGrid = [];
|
|
4684
4736
|
var element = cells[0].plannedElement;
|
|
4737
|
+
var shiftBy = element.area.toX - element.area.fromX;
|
|
4685
4738
|
curGrid.forEach(function (_, x) {
|
|
4686
4739
|
_.forEach(function (_, y) {
|
|
4687
|
-
var newX = x;
|
|
4688
|
-
var shiftX = 0;
|
|
4689
|
-
if (y == absoluteIndex.y || absoluteIndex.y == 0) {
|
|
4690
|
-
newX += dir ? element.area.toX - element.area.fromX : 0;
|
|
4691
|
-
shiftX = dir ? element.area.toX - element.area.fromX : 0;
|
|
4692
|
-
}
|
|
4740
|
+
var newX = x + shiftBy;
|
|
4693
4741
|
if (!movedGrid[newX]) movedGrid[newX] = [];
|
|
4694
4742
|
var cellElem = curGrid[x][y].plannedElement;
|
|
4695
4743
|
var newCell = {
|
|
4696
4744
|
plannedElement: _objectSpread(_objectSpread({}, cellElem), {}, {
|
|
4697
4745
|
area: {
|
|
4698
|
-
fromX:
|
|
4699
|
-
toX: cellElem.area.toX +
|
|
4746
|
+
fromX: cellElem.area.fromX + shiftBy,
|
|
4747
|
+
toX: cellElem.area.toX + shiftBy,
|
|
4700
4748
|
fromY: cellElem.area.fromY,
|
|
4701
4749
|
toY: cellElem.area.toY
|
|
4702
4750
|
}
|
|
@@ -6077,7 +6125,7 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
|
|
|
6077
6125
|
allElementsToCopy.push(elementId);
|
|
6078
6126
|
if (copyInfo) {
|
|
6079
6127
|
if (copyInfo.copyIndex.x != 0) {
|
|
6080
|
-
if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
|
|
6128
|
+
if (this.boxPlannerGrid.getForceSingleCellPerElement() || this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
|
|
6081
6129
|
var result = this.boxPlannerGrid.getAllElementsInSameCol(elementId);
|
|
6082
6130
|
allElementsToCopy = result.elements;
|
|
6083
6131
|
result.backside;
|
|
@@ -6088,7 +6136,7 @@ var DivaBoxPlanner = /*#__PURE__*/function () {
|
|
|
6088
6136
|
}
|
|
6089
6137
|
}
|
|
6090
6138
|
if (copyInfo.copyIndex.y != 0) {
|
|
6091
|
-
if (this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
|
|
6139
|
+
if (this.boxPlannerGrid.getForceSingleCellPerElement() || this.constructionRulesHandler.getForceWholePlanningSameHeight()) {
|
|
6092
6140
|
var resultCopyUp = this.boxPlannerGrid.getAllElementsInSameRowByElementId(elementId);
|
|
6093
6141
|
allElementsToCopy = resultCopyUp.elementIds;
|
|
6094
6142
|
resultCopyUp.backside;
|
|
@@ -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-
|
|
6
|
+
import { V as Vector3, c as Vector2, P as PlannerElementData, B as BoundingBox } from './index-66df82ca.js';
|
|
7
7
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
8
|
-
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-
|
|
8
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-ebe62b9b.js';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
11
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -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-
|
|
4
|
+
import './index-66df82ca.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-
|
|
6
|
+
import { R as Rendering, H as HQRenderScript } from './index-66df82ca.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-
|
|
3
|
+
import './index-66df82ca.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-
|
|
3
|
+
import { a as articleHandlerInstance } from './index-66df82ca.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-
|
|
6
|
+
import { c as Vector2, D as DockingPoint, V as Vector3 } from './index-66df82ca.js';
|
|
7
7
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import { fabric } from 'fabric';
|
|
@@ -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-
|
|
4
|
+
import { s as summaryHandlerInstance } from './index-66df82ca.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-
|
|
7
|
+
import { G as Grid, b as setHandlerInstance, a as articleHandlerInstance } from './index-66df82ca.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-
|
|
3
|
+
import './index-66df82ca.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|