@crystaldesign/web-planner-logic 26.11.0 → 26.12.0-beta.10
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-28df37dc.js → DivaBoxPlanner-1c01e711.js} +12 -9
- package/build/cjs/{DivaStandardPlanner-a2aa5c1b.js → DivaStandardPlanner-8186e18f.js} +2 -2
- package/build/cjs/{DoorPlanner-75d541df.js → DoorPlanner-56c070ff.js} +1 -1
- package/build/cjs/{Host3DSignalR-bb5b7225.js → Host3DSignalR-76ed7e62.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-c7a32173.js → LiviqueWWSHandler-e8470fb7.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-49d7c793.js → PfisterWWSHandler-58d3fbc9.js} +1 -1
- package/build/cjs/{PlannerHandler2D-8f6ac3f0.js → PlannerHandler2D-4744a5af.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-a4b843ca.js → SeriousBasketHandler-0cd54ef6.js} +160 -78
- package/build/cjs/{ShelfPlanner-28208970.js → ShelfPlanner-e21f566f.js} +79 -107
- package/build/cjs/{StandardWWSHandler-2f0f6e42.js → StandardWWSHandler-81967097.js} +1 -1
- package/build/cjs/{index-12d7228d.js → index-b092b563.js} +3381 -1579
- package/build/cjs/index.js +9 -1
- package/build/esm/{DivaBoxPlanner-6cb2372e.js → DivaBoxPlanner-9a3d5bfa.js} +12 -9
- package/build/esm/{DivaStandardPlanner-8ae6587b.js → DivaStandardPlanner-319631e3.js} +2 -2
- package/build/esm/{DoorPlanner-3b1de12d.js → DoorPlanner-240561e1.js} +1 -1
- package/build/esm/{Host3DSignalR-812c760e.js → Host3DSignalR-bfe160de.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-89b9ebd5.js → LiviqueWWSHandler-86dc5c10.js} +1 -1
- package/build/esm/{PfisterWWSHandler-1e29c8b1.js → PfisterWWSHandler-79f2209b.js} +1 -1
- package/build/esm/{PlannerHandler2D-29d15b63.js → PlannerHandler2D-58aa45d2.js} +1 -1
- package/build/esm/{SeriousBasketHandler-16afc759.js → SeriousBasketHandler-1f4342db.js} +160 -78
- package/build/esm/{ShelfPlanner-ea7ddc30.js → ShelfPlanner-3a609e86.js} +79 -107
- package/build/esm/{StandardWWSHandler-0e752ca1.js → StandardWWSHandler-e388f4e3.js} +1 -1
- package/build/esm/{index-92ca01e9.js → index-9fae6c7a.js} +3375 -1581
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/headless/headlessArtifactPass.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +11 -1
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.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/CatalogArticleDataType.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.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 +2 -8
- 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 +4 -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 +4 -7
- 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 +67 -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/Planner/DivaPlannerHandler.d.ts +19 -0
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +7 -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 +50 -9
- 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/CatalogArticleData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.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 +12 -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/Catalog/IDMCatalogData.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/capturedSetImages.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/capturedSetImages.test.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/idmArticleRelations.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmArticleRelations.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-9fae6c7a.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,12 @@ 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);
|
|
56
|
+
//accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
|
|
57
|
+
//becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
|
|
58
|
+
_defineProperty(this, "stashedAccessoires", {});
|
|
53
59
|
/**
|
|
54
60
|
* Debug trail of shelf-planner mutations (the shelf equivalent of the box
|
|
55
61
|
* planner's constructionDebugStack): one entry per visibility flip, grid
|
|
@@ -59,13 +65,6 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
59
65
|
*/
|
|
60
66
|
_defineProperty(this, "shelfDebugStack", []);
|
|
61
67
|
_defineProperty(this, "shelfDebugSeq", 0);
|
|
62
|
-
//true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
|
|
63
|
-
//until then no initAcc may be placed, they would occupy the cells of the saved accessoires
|
|
64
|
-
_defineProperty(this, "restorePending", void 0);
|
|
65
|
-
//accessoires of grids that were cleared by a grid rule, per gridIndex and the HeightGridCellCountOnRule entry the grid
|
|
66
|
-
//ran as. They get placed again when the grid becomes active again under the same entry - eg a shelf that is configured
|
|
67
|
-
//from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's initAcc
|
|
68
|
-
_defineProperty(this, "stashedAccessoires", {});
|
|
69
68
|
this.article = article;
|
|
70
69
|
this.restorePending = !!article.shelfPlanData;
|
|
71
70
|
this.disableCellsByElement = data.DisableCells;
|
|
@@ -190,30 +189,27 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
190
189
|
key: "onConfigChanged",
|
|
191
190
|
value: (function () {
|
|
192
191
|
var _onConfigChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(variantValues) {
|
|
193
|
-
var newHeightSet, gridsTodos,
|
|
192
|
+
var newHeightSet, gridsTodos, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
194
193
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
195
194
|
while (1) switch (_context2.prev = _context2.next) {
|
|
196
195
|
case 0:
|
|
197
196
|
newHeightSet = false;
|
|
198
|
-
gridsTodos = [];
|
|
199
|
-
ruleIndexesBefore = this.grids.map(function (grid) {
|
|
200
|
-
return grid.CurrentLoadedRuleIndex;
|
|
201
|
-
});
|
|
197
|
+
gridsTodos = [];
|
|
202
198
|
for (i = 0; i < this.grids.length; i++) {
|
|
203
199
|
gridsTodos.push(this.grids[i].onConfigChanged());
|
|
204
200
|
}
|
|
205
201
|
_i = 0;
|
|
206
|
-
case
|
|
202
|
+
case 4:
|
|
207
203
|
if (!(_i < gridsTodos.length)) {
|
|
208
|
-
_context2.next =
|
|
204
|
+
_context2.next = 13;
|
|
209
205
|
break;
|
|
210
206
|
}
|
|
211
207
|
if (gridsTodos[_i].length) {
|
|
212
|
-
_context2.next =
|
|
208
|
+
_context2.next = 7;
|
|
213
209
|
break;
|
|
214
210
|
}
|
|
215
|
-
return _context2.abrupt("continue",
|
|
216
|
-
case
|
|
211
|
+
return _context2.abrupt("continue", 10);
|
|
212
|
+
case 7:
|
|
217
213
|
grid = this.grids[_i];
|
|
218
214
|
if (gridsTodos[_i].includes('disableGridRule')) this.logShelfDebug({
|
|
219
215
|
phase: 'configChanged',
|
|
@@ -227,44 +223,44 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
227
223
|
gridIndex: grid.ShelfIndex,
|
|
228
224
|
detail: 'HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted'
|
|
229
225
|
});
|
|
230
|
-
case
|
|
226
|
+
case 10:
|
|
231
227
|
_i++;
|
|
232
|
-
_context2.next =
|
|
228
|
+
_context2.next = 4;
|
|
233
229
|
break;
|
|
234
|
-
case
|
|
230
|
+
case 13:
|
|
235
231
|
_i2 = 0;
|
|
236
|
-
case
|
|
232
|
+
case 14:
|
|
237
233
|
if (!(_i2 < gridsTodos.length)) {
|
|
238
|
-
_context2.next =
|
|
234
|
+
_context2.next = 23;
|
|
239
235
|
break;
|
|
240
236
|
}
|
|
241
237
|
if (gridsTodos[_i2].length) {
|
|
242
|
-
_context2.next =
|
|
238
|
+
_context2.next = 17;
|
|
243
239
|
break;
|
|
244
240
|
}
|
|
245
|
-
return _context2.abrupt("continue",
|
|
246
|
-
case
|
|
241
|
+
return _context2.abrupt("continue", 20);
|
|
242
|
+
case 17:
|
|
247
243
|
//remember the accessoires before they get deleted, so they can be placed again when the grid becomes active again
|
|
248
|
-
this.stashAccessoiresOfGrid(_i2
|
|
249
|
-
_context2.next =
|
|
244
|
+
this.stashAccessoiresOfGrid(_i2);
|
|
245
|
+
_context2.next = 20;
|
|
250
246
|
return this.grids[_i2].deleteAllAccOfGrid();
|
|
251
|
-
case
|
|
247
|
+
case 20:
|
|
252
248
|
_i2++;
|
|
253
|
-
_context2.next =
|
|
249
|
+
_context2.next = 14;
|
|
254
250
|
break;
|
|
255
|
-
case
|
|
251
|
+
case 23:
|
|
256
252
|
_i3 = 0;
|
|
257
|
-
case
|
|
253
|
+
case 24:
|
|
258
254
|
if (!(_i3 < gridsTodos.length)) {
|
|
259
|
-
_context2.next =
|
|
255
|
+
_context2.next = 40;
|
|
260
256
|
break;
|
|
261
257
|
}
|
|
262
258
|
if (gridsTodos[_i3].length) {
|
|
263
|
-
_context2.next =
|
|
259
|
+
_context2.next = 27;
|
|
264
260
|
break;
|
|
265
261
|
}
|
|
266
|
-
return _context2.abrupt("continue",
|
|
267
|
-
case
|
|
262
|
+
return _context2.abrupt("continue", 37);
|
|
263
|
+
case 27:
|
|
268
264
|
if (gridsTodos[_i3].includes('heightGridRule')) {
|
|
269
265
|
this.creatNewGrid(_i3);
|
|
270
266
|
newHeightSet = true;
|
|
@@ -272,58 +268,58 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
272
268
|
//read the grid after a possible recreate, the replaced one is not the grid that gets filled
|
|
273
269
|
_grid = this.grids[_i3];
|
|
274
270
|
if (!((gridsTodos[_i3].includes('heightGridRule') || gridsTodos[_i3].includes('disableGridRule')) && !_grid.DisabledByRule)) {
|
|
275
|
-
_context2.next =
|
|
271
|
+
_context2.next = 37;
|
|
276
272
|
break;
|
|
277
273
|
}
|
|
278
274
|
if (!this.restorePending) {
|
|
279
|
-
_context2.next =
|
|
275
|
+
_context2.next = 32;
|
|
280
276
|
break;
|
|
281
277
|
}
|
|
282
|
-
return _context2.abrupt("continue",
|
|
283
|
-
case
|
|
284
|
-
_context2.next =
|
|
278
|
+
return _context2.abrupt("continue", 37);
|
|
279
|
+
case 32:
|
|
280
|
+
_context2.next = 34;
|
|
285
281
|
return this.placeStashedAccessoiresOfGrid(_i3);
|
|
286
|
-
case
|
|
282
|
+
case 34:
|
|
287
283
|
if (_context2.sent) {
|
|
288
|
-
_context2.next =
|
|
284
|
+
_context2.next = 37;
|
|
289
285
|
break;
|
|
290
286
|
}
|
|
291
|
-
_context2.next =
|
|
287
|
+
_context2.next = 37;
|
|
292
288
|
return this.initAccList(_i3);
|
|
293
|
-
case
|
|
289
|
+
case 37:
|
|
294
290
|
_i3++;
|
|
295
|
-
_context2.next =
|
|
291
|
+
_context2.next = 24;
|
|
296
292
|
break;
|
|
297
|
-
case
|
|
293
|
+
case 40:
|
|
298
294
|
if (!(!newHeightSet && Object.keys(variantValues).length)) {
|
|
299
|
-
_context2.next =
|
|
295
|
+
_context2.next = 51;
|
|
300
296
|
break;
|
|
301
297
|
}
|
|
302
298
|
grids = this.activeGrids;
|
|
303
299
|
_i4 = 0;
|
|
304
|
-
case
|
|
300
|
+
case 43:
|
|
305
301
|
if (!(_i4 < grids.length)) {
|
|
306
|
-
_context2.next =
|
|
302
|
+
_context2.next = 51;
|
|
307
303
|
break;
|
|
308
304
|
}
|
|
309
305
|
_grid2 = grids[_i4];
|
|
310
306
|
if (!((_grid2$DisableCellsBy = _grid2.DisableCellsByMeasures) !== null && _grid2$DisableCellsBy !== void 0 && _grid2$DisableCellsBy.options.find(function (o) {
|
|
311
307
|
return Object.keys(variantValues).includes('OPT' + o.opt);
|
|
312
308
|
}) || !!_grid2.disableCellsByRules)) {
|
|
313
|
-
_context2.next =
|
|
309
|
+
_context2.next = 48;
|
|
314
310
|
break;
|
|
315
311
|
}
|
|
316
312
|
newHeightSet = true;
|
|
317
|
-
return _context2.abrupt("break",
|
|
318
|
-
case
|
|
313
|
+
return _context2.abrupt("break", 51);
|
|
314
|
+
case 48:
|
|
319
315
|
_i4++;
|
|
320
|
-
_context2.next =
|
|
316
|
+
_context2.next = 43;
|
|
321
317
|
break;
|
|
322
|
-
case
|
|
318
|
+
case 51:
|
|
323
319
|
if (newHeightSet) {
|
|
324
320
|
this.updateDisabledCells();
|
|
325
321
|
}
|
|
326
|
-
case
|
|
322
|
+
case 52:
|
|
327
323
|
case "end":
|
|
328
324
|
return _context2.stop();
|
|
329
325
|
}
|
|
@@ -342,24 +338,16 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
342
338
|
}
|
|
343
339
|
|
|
344
340
|
/**
|
|
345
|
-
* Remembers the accessoires of a grid that is about to be cleared because a grid rule switched it off
|
|
341
|
+
* Remembers the accessoires of a grid that is about to be cleared because a grid rule switched it off.
|
|
346
342
|
* An empty grid never overwrites an existing memory, so the accessoires survive further configuration changes.
|
|
347
343
|
* @param gridIndex grid that gets cleared
|
|
348
|
-
* @param ruleIndex HeightGridCellCountOnRule entry the grid ran as while the accessoires were planned
|
|
349
344
|
*/
|
|
350
345
|
}, {
|
|
351
346
|
key: "stashAccessoiresOfGrid",
|
|
352
|
-
value: function stashAccessoiresOfGrid(gridIndex
|
|
347
|
+
value: function stashAccessoiresOfGrid(gridIndex) {
|
|
353
348
|
var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex]);
|
|
354
349
|
if (!stashedAccessoires.length) return;
|
|
355
|
-
this.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;
|
|
350
|
+
this.stashedAccessoires[gridIndex] = stashedAccessoires;
|
|
363
351
|
}
|
|
364
352
|
|
|
365
353
|
/**
|
|
@@ -382,12 +370,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
382
370
|
var _accessoireShelfPlann;
|
|
383
371
|
var accessoireGrid = accessoireShelfPlanner.grids[j];
|
|
384
372
|
var accessoiresOfGrid = accessoireShelfPlanner.collectAccessoiresToStash(accessoireGrid);
|
|
385
|
-
if (accessoiresOfGrid.length)
|
|
386
|
-
accessoires[accessoireGrid.ShelfIndex] = {
|
|
387
|
-
ruleIndex: accessoireGrid.CurrentLoadedRuleIndex,
|
|
388
|
-
accessoires: accessoiresOfGrid
|
|
389
|
-
};
|
|
390
|
-
}
|
|
373
|
+
if (accessoiresOfGrid.length) accessoires[accessoireGrid.ShelfIndex] = accessoiresOfGrid;
|
|
391
374
|
}
|
|
392
375
|
stashedAccessoires.push({
|
|
393
376
|
articleCodex: accessoire.articleCodex,
|
|
@@ -403,7 +386,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
403
386
|
}
|
|
404
387
|
|
|
405
388
|
/**
|
|
406
|
-
* Places the
|
|
389
|
+
* Places the remembered accessoires of a grid back into their cells.
|
|
407
390
|
* @param gridIndex grid that became active again
|
|
408
391
|
* @returns how many accessoires were placed - 0 means the grid is still empty and needs its initAcc
|
|
409
392
|
*/
|
|
@@ -411,26 +394,24 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
411
394
|
key: "placeStashedAccessoiresOfGrid",
|
|
412
395
|
value: (function () {
|
|
413
396
|
var _placeStashedAccessoiresOfGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(gridIndex) {
|
|
414
|
-
var
|
|
397
|
+
var stashedAccessoires;
|
|
415
398
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
416
399
|
while (1) switch (_context3.prev = _context3.next) {
|
|
417
400
|
case 0:
|
|
418
|
-
|
|
419
|
-
stashKey = this.stashKey(gridIndex, this.grids[gridIndex].CurrentLoadedRuleIndex);
|
|
420
|
-
stashedAccessoires = this.stashedAccessoires[stashKey];
|
|
401
|
+
stashedAccessoires = this.stashedAccessoires[gridIndex];
|
|
421
402
|
if (stashedAccessoires !== null && stashedAccessoires !== void 0 && stashedAccessoires.length) {
|
|
422
|
-
_context3.next =
|
|
403
|
+
_context3.next = 3;
|
|
423
404
|
break;
|
|
424
405
|
}
|
|
425
406
|
return _context3.abrupt("return", 0);
|
|
426
|
-
case
|
|
407
|
+
case 3:
|
|
427
408
|
//remove it first, a reconfiguration triggered by placing them must not place them a second time
|
|
428
|
-
delete this.stashedAccessoires[
|
|
429
|
-
_context3.next =
|
|
409
|
+
delete this.stashedAccessoires[gridIndex];
|
|
410
|
+
_context3.next = 6;
|
|
430
411
|
return this.placeStashedAccessoiresInGrid(gridIndex, stashedAccessoires);
|
|
431
|
-
case
|
|
412
|
+
case 6:
|
|
432
413
|
return _context3.abrupt("return", _context3.sent);
|
|
433
|
-
case
|
|
414
|
+
case 7:
|
|
434
415
|
case "end":
|
|
435
416
|
return _context3.stop();
|
|
436
417
|
}
|
|
@@ -445,7 +426,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
445
426
|
key: "placeStashedAccessoiresByGrid",
|
|
446
427
|
value: (function () {
|
|
447
428
|
var _placeStashedAccessoiresByGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(stashedAccessoires) {
|
|
448
|
-
var gridIndexes, i,
|
|
429
|
+
var gridIndexes, i, _this$getGridByIndex, gridIndex;
|
|
449
430
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
450
431
|
while (1) switch (_context4.prev = _context4.next) {
|
|
451
432
|
case 0:
|
|
@@ -453,36 +434,27 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
453
434
|
i = 0;
|
|
454
435
|
case 2:
|
|
455
436
|
if (!(i < gridIndexes.length)) {
|
|
456
|
-
_context4.next =
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
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;
|
|
437
|
+
_context4.next = 14;
|
|
465
438
|
break;
|
|
466
439
|
}
|
|
467
|
-
|
|
440
|
+
gridIndex = Number(gridIndexes[i]); //the accessoire was created new, so its initAcc are already placed in the cells the remembered accessoires need
|
|
441
|
+
_context4.next = 6;
|
|
442
|
+
return (_this$getGridByIndex = this.getGridByIndex(gridIndex)) === null || _this$getGridByIndex === void 0 ? void 0 : _this$getGridByIndex.deleteAllAccOfGrid();
|
|
443
|
+
case 6:
|
|
444
|
+
_context4.next = 8;
|
|
445
|
+
return this.placeStashedAccessoiresInGrid(gridIndex, stashedAccessoires[gridIndex]);
|
|
468
446
|
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:
|
|
475
447
|
if (_context4.sent) {
|
|
476
|
-
_context4.next =
|
|
448
|
+
_context4.next = 11;
|
|
477
449
|
break;
|
|
478
450
|
}
|
|
479
|
-
_context4.next =
|
|
451
|
+
_context4.next = 11;
|
|
480
452
|
return this.initAccList(gridIndex);
|
|
481
|
-
case
|
|
453
|
+
case 11:
|
|
482
454
|
i++;
|
|
483
455
|
_context4.next = 2;
|
|
484
456
|
break;
|
|
485
|
-
case
|
|
457
|
+
case 14:
|
|
486
458
|
case "end":
|
|
487
459
|
return _context4.stop();
|
|
488
460
|
}
|
|
@@ -1544,8 +1516,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1544
1516
|
}, {
|
|
1545
1517
|
key: "getCellIndexOfBasketId",
|
|
1546
1518
|
value: function getCellIndexOfBasketId(gridIndex, basketId) {
|
|
1547
|
-
var _this$
|
|
1548
|
-
return (_this$
|
|
1519
|
+
var _this$getGridByIndex2;
|
|
1520
|
+
return (_this$getGridByIndex2 = this.getGridByIndex(gridIndex)) === null || _this$getGridByIndex2 === void 0 ? void 0 : _this$getGridByIndex2.getIndexOfBasketId(basketId);
|
|
1549
1521
|
}
|
|
1550
1522
|
}, {
|
|
1551
1523
|
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-9fae6c7a.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|