@crystaldesign/web-planner-logic 26.12.0-beta.2 → 26.12.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/{DivaBoxPlanner-2c699ee3.js → DivaBoxPlanner-4257e123.js} +12 -9
- package/build/cjs/{DivaStandardPlanner-3d6a05bc.js → DivaStandardPlanner-75e89258.js} +2 -2
- package/build/cjs/{DoorPlanner-adda9c0d.js → DoorPlanner-d95057f1.js} +1 -1
- package/build/cjs/{Host3DSignalR-6914541f.js → Host3DSignalR-5d7777a8.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-635cffae.js → LiviqueWWSHandler-c7d2cdaf.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-d95419db.js → PfisterWWSHandler-5af229be.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b76ba907.js → PlannerHandler2D-55fe0f7d.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-777904e8.js → SeriousBasketHandler-8e6ecb34.js} +160 -78
- package/build/cjs/{ShelfPlanner-5ffd15a2.js → ShelfPlanner-0efecc7e.js} +106 -78
- package/build/cjs/{StandardWWSHandler-e92acae6.js → StandardWWSHandler-9fda645d.js} +1 -1
- package/build/cjs/{index-d516d2b2.js → index-5e69d373.js} +2307 -784
- package/build/cjs/index.js +9 -1
- package/build/esm/{DivaBoxPlanner-6f0727a3.js → DivaBoxPlanner-de401670.js} +12 -9
- package/build/esm/{DivaStandardPlanner-7188da61.js → DivaStandardPlanner-9b5a2a5d.js} +2 -2
- package/build/esm/{DoorPlanner-74bcd21d.js → DoorPlanner-183462e8.js} +1 -1
- package/build/esm/{Host3DSignalR-bb6db8e6.js → Host3DSignalR-7e155294.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-c4ba143d.js → LiviqueWWSHandler-ac11f46d.js} +1 -1
- package/build/esm/{PfisterWWSHandler-41b7b1b7.js → PfisterWWSHandler-93696189.js} +1 -1
- package/build/esm/{PlannerHandler2D-829ffceb.js → PlannerHandler2D-1c432604.js} +1 -1
- package/build/esm/{SeriousBasketHandler-0bb8ee55.js → SeriousBasketHandler-d9609a7b.js} +160 -78
- package/build/esm/{ShelfPlanner-1406888d.js → ShelfPlanner-b2e45c1f.js} +106 -78
- package/build/esm/{StandardWWSHandler-a8045129.js → StandardWWSHandler-3d453d21.js} +1 -1
- package/build/esm/{index-16a1a540.js → index-124399b2.js} +2300 -785
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +10 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +8 -2
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +40 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +6 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +17 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +20 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts +8 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +10 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +31 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +6 -3
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +7 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +22 -6
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.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/Set/DivaSet.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +9 -2
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +31 -0
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +34 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -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-
|
|
7
|
+
import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-124399b2.js';
|
|
8
8
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -50,6 +50,9 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
50
50
|
//rule so the shelfplanner cells get disabled when the neighbour (AVL or AVR) is smaller. eg: Ben sulvag
|
|
51
51
|
_defineProperty(this, "disableCellsByElement", void 0);
|
|
52
52
|
_defineProperty(this, "montageOptions", []);
|
|
53
|
+
//true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
|
|
54
|
+
//until then no initAcc may be placed, they would occupy the cells of the saved accessoires
|
|
55
|
+
_defineProperty(this, "restorePending", void 0);
|
|
53
56
|
/**
|
|
54
57
|
* Debug trail of shelf-planner mutations (the shelf equivalent of the box
|
|
55
58
|
* planner's constructionDebugStack): one entry per visibility flip, grid
|
|
@@ -59,11 +62,9 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
59
62
|
*/
|
|
60
63
|
_defineProperty(this, "shelfDebugStack", []);
|
|
61
64
|
_defineProperty(this, "shelfDebugSeq", 0);
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
//accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
|
|
66
|
-
//becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
|
|
65
|
+
//accessoires of grids that were cleared by a grid rule, per gridIndex and the HeightGridCellCountOnRule entry the grid
|
|
66
|
+
//ran as. They get placed again when the grid becomes active again under the same entry - eg a shelf that is configured
|
|
67
|
+
//from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's initAcc
|
|
67
68
|
_defineProperty(this, "stashedAccessoires", {});
|
|
68
69
|
this.article = article;
|
|
69
70
|
this.restorePending = !!article.shelfPlanData;
|
|
@@ -189,27 +190,30 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
189
190
|
key: "onConfigChanged",
|
|
190
191
|
value: (function () {
|
|
191
192
|
var _onConfigChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(variantValues) {
|
|
192
|
-
var newHeightSet, gridsTodos, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
193
|
+
var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
193
194
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
194
195
|
while (1) switch (_context2.prev = _context2.next) {
|
|
195
196
|
case 0:
|
|
196
197
|
newHeightSet = false;
|
|
197
|
-
gridsTodos = [];
|
|
198
|
+
gridsTodos = []; //onConfigChanged moves a grid to its new rule entry, the stash needs the entry the accessoires were planned under
|
|
199
|
+
ruleIndexesBefore = this.grids.map(function (grid) {
|
|
200
|
+
return grid.CurrentLoadedRuleIndex;
|
|
201
|
+
});
|
|
198
202
|
for (i = 0; i < this.grids.length; i++) {
|
|
199
203
|
gridsTodos.push(this.grids[i].onConfigChanged());
|
|
200
204
|
}
|
|
201
205
|
_i = 0;
|
|
202
|
-
case
|
|
206
|
+
case 5:
|
|
203
207
|
if (!(_i < gridsTodos.length)) {
|
|
204
|
-
_context2.next =
|
|
208
|
+
_context2.next = 14;
|
|
205
209
|
break;
|
|
206
210
|
}
|
|
207
211
|
if (gridsTodos[_i].length) {
|
|
208
|
-
_context2.next =
|
|
212
|
+
_context2.next = 8;
|
|
209
213
|
break;
|
|
210
214
|
}
|
|
211
|
-
return _context2.abrupt("continue",
|
|
212
|
-
case
|
|
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
|
|
230
|
+
case 11:
|
|
227
231
|
_i++;
|
|
228
|
-
_context2.next =
|
|
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 =
|
|
238
|
+
_context2.next = 24;
|
|
235
239
|
break;
|
|
236
240
|
}
|
|
237
241
|
if (gridsTodos[_i2].length) {
|
|
238
|
-
_context2.next =
|
|
242
|
+
_context2.next = 18;
|
|
239
243
|
break;
|
|
240
244
|
}
|
|
241
|
-
return _context2.abrupt("continue",
|
|
242
|
-
case
|
|
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 =
|
|
248
|
+
this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
|
|
249
|
+
_context2.next = 21;
|
|
246
250
|
return this.grids[_i2].deleteAllAccOfGrid();
|
|
247
|
-
case
|
|
251
|
+
case 21:
|
|
248
252
|
_i2++;
|
|
249
|
-
_context2.next =
|
|
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 =
|
|
259
|
+
_context2.next = 41;
|
|
256
260
|
break;
|
|
257
261
|
}
|
|
258
262
|
if (gridsTodos[_i3].length) {
|
|
259
|
-
_context2.next =
|
|
263
|
+
_context2.next = 28;
|
|
260
264
|
break;
|
|
261
265
|
}
|
|
262
|
-
return _context2.abrupt("continue",
|
|
263
|
-
case
|
|
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 =
|
|
275
|
+
_context2.next = 38;
|
|
272
276
|
break;
|
|
273
277
|
}
|
|
274
278
|
if (!this.restorePending) {
|
|
275
|
-
_context2.next =
|
|
279
|
+
_context2.next = 33;
|
|
276
280
|
break;
|
|
277
281
|
}
|
|
278
|
-
return _context2.abrupt("continue",
|
|
279
|
-
case
|
|
280
|
-
_context2.next =
|
|
282
|
+
return _context2.abrupt("continue", 38);
|
|
283
|
+
case 33:
|
|
284
|
+
_context2.next = 35;
|
|
281
285
|
return this.placeStashedAccessoiresOfGrid(_i3);
|
|
282
|
-
case
|
|
286
|
+
case 35:
|
|
283
287
|
if (_context2.sent) {
|
|
284
|
-
_context2.next =
|
|
288
|
+
_context2.next = 38;
|
|
285
289
|
break;
|
|
286
290
|
}
|
|
287
|
-
_context2.next =
|
|
291
|
+
_context2.next = 38;
|
|
288
292
|
return this.initAccList(_i3);
|
|
289
|
-
case
|
|
293
|
+
case 38:
|
|
290
294
|
_i3++;
|
|
291
|
-
_context2.next =
|
|
295
|
+
_context2.next = 25;
|
|
292
296
|
break;
|
|
293
|
-
case
|
|
297
|
+
case 41:
|
|
294
298
|
if (!(!newHeightSet && Object.keys(variantValues).length)) {
|
|
295
|
-
_context2.next =
|
|
299
|
+
_context2.next = 52;
|
|
296
300
|
break;
|
|
297
301
|
}
|
|
298
302
|
grids = this.activeGrids;
|
|
299
303
|
_i4 = 0;
|
|
300
|
-
case
|
|
304
|
+
case 44:
|
|
301
305
|
if (!(_i4 < grids.length)) {
|
|
302
|
-
_context2.next =
|
|
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 =
|
|
313
|
+
_context2.next = 49;
|
|
310
314
|
break;
|
|
311
315
|
}
|
|
312
316
|
newHeightSet = true;
|
|
313
|
-
return _context2.abrupt("break",
|
|
314
|
-
case
|
|
317
|
+
return _context2.abrupt("break", 52);
|
|
318
|
+
case 49:
|
|
315
319
|
_i4++;
|
|
316
|
-
_context2.next =
|
|
320
|
+
_context2.next = 44;
|
|
317
321
|
break;
|
|
318
|
-
case
|
|
322
|
+
case 52:
|
|
319
323
|
if (newHeightSet) {
|
|
320
324
|
this.updateDisabledCells();
|
|
321
325
|
}
|
|
322
|
-
case
|
|
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)
|
|
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
|
|
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
|
-
|
|
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 =
|
|
422
|
+
_context3.next = 4;
|
|
404
423
|
break;
|
|
405
424
|
}
|
|
406
425
|
return _context3.abrupt("return", 0);
|
|
407
|
-
case
|
|
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[
|
|
410
|
-
_context3.next =
|
|
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,
|
|
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 =
|
|
456
|
+
_context4.next = 18;
|
|
438
457
|
break;
|
|
439
458
|
}
|
|
440
|
-
gridIndex = Number(gridIndexes[i]);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
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 =
|
|
476
|
+
_context4.next = 15;
|
|
449
477
|
break;
|
|
450
478
|
}
|
|
451
|
-
_context4.next =
|
|
479
|
+
_context4.next = 15;
|
|
452
480
|
return this.initAccList(gridIndex);
|
|
453
|
-
case
|
|
481
|
+
case 15:
|
|
454
482
|
i++;
|
|
455
483
|
_context4.next = 2;
|
|
456
484
|
break;
|
|
457
|
-
case
|
|
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$
|
|
1520
|
-
return (_this$
|
|
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-
|
|
3
|
+
import './index-124399b2.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|