@crystaldesign/web-planner-logic 26.13.0-beta.9 → 26.14.0-beta.1
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-006ec070.js → DivaBoxPlanner-7f6bd584.js} +5 -4
- package/build/cjs/{DivaStandardPlanner-a428fcb7.js → DivaStandardPlanner-77c603dc.js} +1921 -203
- package/build/cjs/{DoorPlanner-40b303c4.js → DoorPlanner-5de2bbf0.js} +4 -3
- package/build/cjs/{Host3DSignalR-55f69ca3.js → Host3DSignalR-26b95303.js} +64 -20
- package/build/cjs/{LiviqueWWSHandler-4c6f6071.js → LiviqueWWSHandler-1e419862.js} +4 -3
- package/build/cjs/{PfisterWWSHandler-55bdb575.js → PfisterWWSHandler-b2f7a5ec.js} +3 -2
- package/build/cjs/{PlannerHandler2D-314ce41d.js → PlannerHandler2D-ff734c3e.js} +10 -10
- package/build/cjs/{SeriousBasketHandler-1b365a2b.js → SeriousBasketHandler-e54bd31b.js} +4 -3
- package/build/cjs/{ShelfPlanner-8e91f830.js → ShelfPlanner-08e15d16.js} +600 -203
- package/build/cjs/{StandardWWSHandler-4a2442aa.js → StandardWWSHandler-0e7b20dc.js} +4 -3
- package/build/cjs/{index-e08a4789.js → index-5dd5fb4b.js} +9343 -3810
- package/build/cjs/index.js +11 -9
- package/build/esm/{DivaBoxPlanner-edb41fff.js → DivaBoxPlanner-6ac448b4.js} +5 -4
- package/build/esm/{DivaStandardPlanner-20fe9ebf.js → DivaStandardPlanner-abd9609d.js} +1911 -194
- package/build/esm/{DoorPlanner-0bf17f1f.js → DoorPlanner-fde32e61.js} +4 -3
- package/build/esm/{Host3DSignalR-263f6d3f.js → Host3DSignalR-0f97c7f3.js} +64 -20
- package/build/esm/{LiviqueWWSHandler-e80b574f.js → LiviqueWWSHandler-9ee5b7cb.js} +4 -3
- package/build/esm/{PfisterWWSHandler-508bb12f.js → PfisterWWSHandler-b9699549.js} +3 -2
- package/build/esm/{PlannerHandler2D-e4d80c41.js → PlannerHandler2D-8d963e77.js} +2 -2
- package/build/esm/{SeriousBasketHandler-e9ebb195.js → SeriousBasketHandler-40e7e46c.js} +4 -3
- package/build/esm/{ShelfPlanner-fbb7d7dd.js → ShelfPlanner-69cbb2c1.js} +600 -203
- package/build/esm/{StandardWWSHandler-88f4eb7d.js → StandardWWSHandler-dbf02663.js} +4 -3
- package/build/esm/{index-86463de2.js → index-88148ccc.js} +9297 -3798
- package/build/esm/index.js +4 -3
- package/build/types/web-planner-logic/src/index.d.ts +7 -8
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +4 -2
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +6 -2
- package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +14 -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 +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +7 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +16 -1
- 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 -3
- 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 +10 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDM3DTranslation.d.ts +20 -0
- package/build/types/web-planner-logic/src/interface/Planner/IDM3DTranslation.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts +10 -0
- package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/RoomSceneTypes.d.ts +76 -0
- package/build/types/web-planner-logic/src/interface/Planner/RoomSceneTypes.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/interface/Rendering/AlternativeRendering.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/Rendering/AlternativeRendering.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.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/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +30 -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 +5 -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/IDMArticleEngine.d.ts +8 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/measureUnit.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.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +7 -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 +77 -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/Shelfplanner/ShelfPlannerGrid.d.ts +14 -2
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.d.ts +19 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +112 -24
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +74 -9
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +175 -4
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts +32 -0
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/carrierGuests.d.ts +75 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/carrierGuests.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.d.ts +47 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementDefaults.d.ts +9 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementDefaults.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.d.ts +78 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementSlots.d.ts +81 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementSlots.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementTypes.d.ts +13 -0
- package/build/types/web-planner-logic/src/logic/Planner/Placement/placementTypes.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +13 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.d.ts +56 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.d.ts +90 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.d.ts +32 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomProperties.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomProperties.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.d.ts +21 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.d.ts +13 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.d.ts +17 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.d.ts +72 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallMode.d.ts +7 -0
- package/build/types/web-planner-logic/src/logic/Planner/Room/wallMode.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.d.ts +32 -0
- package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +12 -6
- 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 +30 -6
- 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 +5 -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.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +28 -0
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts +3 -0
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +4 -2
- 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 +10 -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/CatalogOptionData.d.ts +6 -4
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +41 -0
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +23 -11
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +1 -34
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts +42 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/alternateRenderingToggle.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/alternateRenderingToggle.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/bundleRulesOwnPartlist.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/bundleRulesOwnPartlist.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts +1 -0
- package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/carrierGuests.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/carrierGuests.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/copyRestoreConnectors.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/copyRestoreConnectors.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/dragZones.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/dragZones.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/familySwapInPlace.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/familySwapInPlace.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/getConfigStepKeyOfAccessoire.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/getConfigStepKeyOfAccessoire.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/headlessRoomScenes.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/headlessRoomScenes.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/host3DSignalRReconnect.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/host3DSignalRReconnect.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/liveArUpdate.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/liveArUpdate.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/oltRectBody.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/oltRectBody.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/orderNumberTemplates.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/orderNumberTemplates.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/plannerHandler3DRoomListQueue.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/plannerHandler3DRoomListQueue.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/plannerRoomScenesSwitch.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/plannerRoomScenesSwitch.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/planning2DCapture.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/planning2DCapture.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/planningRoundTrip.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/planningRoundTrip.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/roomDragContact.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/roomDragContact.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/roomPlacement.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/roomPlacement.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/roomScenePlanning.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/roomScenePlanning.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/rotationSnap.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/rotationSnap.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfEditNoting.test.d.ts +3 -0
- package/build/types/web-planner-logic/src/test/shelfEditNoting.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfGridCarryOver.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/shelfGridCarryOver.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfMoveLocks.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/shelfMoveLocks.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfOfferedCells.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/shelfOfferedCells.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/sideCopySubstitute.test.d.ts +3 -0
- package/build/types/web-planner-logic/src/test/sideCopySubstitute.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -6,14 +6,15 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
|
6
6
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
7
7
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
8
8
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-5dd5fb4b.js');
|
|
10
10
|
var DivaUtils = require('@crystaldesign/diva-utils');
|
|
11
11
|
require('@babel/runtime/helpers/slicedToArray');
|
|
12
12
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
13
13
|
require('axios');
|
|
14
|
-
require('@crystaldesign/planner-2d-core');
|
|
15
|
-
require('@crystaldesign/basket-model');
|
|
16
14
|
require('@babel/runtime/helpers/typeof');
|
|
15
|
+
require('@babel/runtime/helpers/toArray');
|
|
16
|
+
require('@crystaldesign/planner-core');
|
|
17
|
+
require('@crystaldesign/basket-model');
|
|
17
18
|
require('fast-xml-parser');
|
|
18
19
|
require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
19
20
|
require('@babel/runtime/helpers/getPrototypeOf');
|
|
@@ -32,9 +33,19 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
32
33
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
33
34
|
var DivaUtils__default = /*#__PURE__*/_interopDefaultLegacy(DivaUtils);
|
|
34
35
|
|
|
36
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
37
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
38
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
35
39
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
40
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
41
|
var LOG = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
42
|
+
|
|
43
|
+
/** The accessoire really went into the cell - not a rejected fit, whose article is deleted again. */
|
|
44
|
+
function isPlaced(result) {
|
|
45
|
+
return result !== false && result.index !== undefined && !!result.accessoire && result.type !== 'doesNotFit' && !result.type.startsWith('notAllowed');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Values the parents pass on to their accessoires with their global options, per basketId of the accessoire. */
|
|
38
49
|
var ShelfPlanner = /*#__PURE__*/function () {
|
|
39
50
|
function ShelfPlanner(data, article) {
|
|
40
51
|
_classCallCheck__default["default"](this, ShelfPlanner);
|
|
@@ -76,8 +87,12 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
76
87
|
_defineProperty__default["default"](this, "shelfDebugSeq", 0);
|
|
77
88
|
//accessoires of grids that were cleared by a grid rule, per gridIndex and the HeightGridCellCountOnRule entry the grid
|
|
78
89
|
//ran as. They get placed again when the grid becomes active again under the same entry - eg a shelf that is configured
|
|
79
|
-
//from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's
|
|
90
|
+
//from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's
|
|
91
|
+
//initAcc; with rtv-next it first takes what the change cleared (placeTransferredAccessoires)
|
|
80
92
|
_defineProperty__default["default"](this, "stashedAccessoires", {});
|
|
93
|
+
//a memory is outdated once something was edited by hand after it was taken (the init jump of a shelf edits nothing)
|
|
94
|
+
_defineProperty__default["default"](this, "editEpoch", 0);
|
|
95
|
+
_defineProperty__default["default"](this, "stashEpochs", {});
|
|
81
96
|
this.article = article;
|
|
82
97
|
this.restorePending = !!article.shelfPlanData;
|
|
83
98
|
this.disableCellsByElement = data.DisableCells;
|
|
@@ -127,6 +142,16 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
127
142
|
}
|
|
128
143
|
}
|
|
129
144
|
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* True when an accessoire with this codex can be planned for free on this shelf (an initAcc with noPrice, eg the first
|
|
148
|
+
* Kleiderstange of a Jutzler element).
|
|
149
|
+
*/
|
|
150
|
+
}, {
|
|
151
|
+
key: "canBeFree",
|
|
152
|
+
value: function canBeFree(articleCodex) {
|
|
153
|
+
return this.freeArticlesPossible[articleCodex] !== undefined;
|
|
154
|
+
}
|
|
130
155
|
}, {
|
|
131
156
|
key: "IsVisible",
|
|
132
157
|
get: function get() {
|
|
@@ -202,7 +227,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
202
227
|
key: "onConfigChanged",
|
|
203
228
|
value: (function () {
|
|
204
229
|
var _onConfigChanged = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(variantValues) {
|
|
205
|
-
var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
230
|
+
var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, clearedNow, _i2, stashed, _i3, _grid, own, carryOver, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
206
231
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
207
232
|
while (1) switch (_context2.prev = _context2.next) {
|
|
208
233
|
case 0:
|
|
@@ -244,39 +269,42 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
244
269
|
_context2.next = 5;
|
|
245
270
|
break;
|
|
246
271
|
case 14:
|
|
272
|
+
//what this change clears, per grid - carried over into a grid that comes back without an up-to-date memory of its own
|
|
273
|
+
clearedNow = new Map(); //first delete all disables grids then init all the new ones
|
|
247
274
|
_i2 = 0;
|
|
248
|
-
case
|
|
275
|
+
case 16:
|
|
249
276
|
if (!(_i2 < gridsTodos.length)) {
|
|
250
|
-
_context2.next =
|
|
277
|
+
_context2.next = 26;
|
|
251
278
|
break;
|
|
252
279
|
}
|
|
253
280
|
if (gridsTodos[_i2].length) {
|
|
254
|
-
_context2.next =
|
|
281
|
+
_context2.next = 19;
|
|
255
282
|
break;
|
|
256
283
|
}
|
|
257
|
-
return _context2.abrupt("continue",
|
|
258
|
-
case
|
|
284
|
+
return _context2.abrupt("continue", 23);
|
|
285
|
+
case 19:
|
|
259
286
|
//remember the accessoires before they get deleted, so they can be placed again when the grid becomes active again
|
|
260
|
-
this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
|
|
261
|
-
|
|
287
|
+
stashed = this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
|
|
288
|
+
if (!this.isOnlyInitContent(this.grids[_i2], stashed)) clearedNow.set(_i2, stashed);
|
|
289
|
+
_context2.next = 23;
|
|
262
290
|
return this.grids[_i2].deleteAllAccOfGrid();
|
|
263
|
-
case
|
|
291
|
+
case 23:
|
|
264
292
|
_i2++;
|
|
265
|
-
_context2.next =
|
|
293
|
+
_context2.next = 16;
|
|
266
294
|
break;
|
|
267
|
-
case
|
|
295
|
+
case 26:
|
|
268
296
|
_i3 = 0;
|
|
269
|
-
case
|
|
297
|
+
case 27:
|
|
270
298
|
if (!(_i3 < gridsTodos.length)) {
|
|
271
|
-
_context2.next =
|
|
299
|
+
_context2.next = 65;
|
|
272
300
|
break;
|
|
273
301
|
}
|
|
274
302
|
if (gridsTodos[_i3].length) {
|
|
275
|
-
_context2.next =
|
|
303
|
+
_context2.next = 30;
|
|
276
304
|
break;
|
|
277
305
|
}
|
|
278
|
-
return _context2.abrupt("continue",
|
|
279
|
-
case
|
|
306
|
+
return _context2.abrupt("continue", 62);
|
|
307
|
+
case 30:
|
|
280
308
|
if (gridsTodos[_i3].includes('heightGridRule')) {
|
|
281
309
|
this.creatNewGrid(_i3);
|
|
282
310
|
newHeightSet = true;
|
|
@@ -284,58 +312,109 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
284
312
|
//read the grid after a possible recreate, the replaced one is not the grid that gets filled
|
|
285
313
|
_grid = this.grids[_i3];
|
|
286
314
|
if (!((gridsTodos[_i3].includes('heightGridRule') || gridsTodos[_i3].includes('disableGridRule')) && !_grid.DisabledByRule)) {
|
|
287
|
-
_context2.next =
|
|
315
|
+
_context2.next = 62;
|
|
288
316
|
break;
|
|
289
317
|
}
|
|
290
318
|
if (!this.restorePending) {
|
|
291
|
-
_context2.next =
|
|
319
|
+
_context2.next = 35;
|
|
292
320
|
break;
|
|
293
321
|
}
|
|
294
|
-
return _context2.abrupt("continue",
|
|
295
|
-
case 33:
|
|
296
|
-
_context2.next = 35;
|
|
297
|
-
return this.placeStashedAccessoiresOfGrid(_i3);
|
|
322
|
+
return _context2.abrupt("continue", 62);
|
|
298
323
|
case 35:
|
|
299
|
-
|
|
300
|
-
|
|
324
|
+
//the grid's own memory beats the initAcc while nothing was edited since, else another grid's newer content is carried over
|
|
325
|
+
own = this.takeStashOfGrid(_i3); //only rtv-next carries content over between grids, otherwise the memory is restored as is
|
|
326
|
+
carryOver = this.article.set.CatalogData.divaUseRtvNext;
|
|
327
|
+
_context2.t0 = own && (!own.outdated || !carryOver);
|
|
328
|
+
if (!_context2.t0) {
|
|
329
|
+
_context2.next = 42;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
_context2.next = 41;
|
|
333
|
+
return this.placeStashedAccessoiresInGrid(_i3, own.accessoires);
|
|
334
|
+
case 41:
|
|
335
|
+
_context2.t0 = _context2.sent;
|
|
336
|
+
case 42:
|
|
337
|
+
if (!_context2.t0) {
|
|
338
|
+
_context2.next = 45;
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
clearedNow["delete"](_i3);
|
|
342
|
+
return _context2.abrupt("continue", 62);
|
|
343
|
+
case 45:
|
|
344
|
+
_context2.t1 = carryOver;
|
|
345
|
+
if (!_context2.t1) {
|
|
346
|
+
_context2.next = 50;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
_context2.next = 49;
|
|
350
|
+
return this.placeTransferredAccessoires(_i3, clearedNow);
|
|
351
|
+
case 49:
|
|
352
|
+
_context2.t1 = _context2.sent;
|
|
353
|
+
case 50:
|
|
354
|
+
if (!_context2.t1) {
|
|
355
|
+
_context2.next = 54;
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
_context2.next = 53;
|
|
359
|
+
return this.initAccList(_i3);
|
|
360
|
+
case 53:
|
|
361
|
+
return _context2.abrupt("continue", 62);
|
|
362
|
+
case 54:
|
|
363
|
+
if (!(carryOver && own !== null && own !== void 0 && own.outdated)) {
|
|
364
|
+
_context2.next = 60;
|
|
301
365
|
break;
|
|
302
366
|
}
|
|
303
|
-
|
|
367
|
+
this.logShelfDebug({
|
|
368
|
+
phase: 'configChanged',
|
|
369
|
+
action: 'stashOutdatedRestored',
|
|
370
|
+
gridIndex: _i3,
|
|
371
|
+
detail: 'edited since, but nothing to carry over'
|
|
372
|
+
});
|
|
373
|
+
_context2.next = 58;
|
|
374
|
+
return this.placeStashedAccessoiresInGrid(_i3, own.accessoires);
|
|
375
|
+
case 58:
|
|
376
|
+
if (!_context2.sent) {
|
|
377
|
+
_context2.next = 60;
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
return _context2.abrupt("continue", 62);
|
|
381
|
+
case 60:
|
|
382
|
+
_context2.next = 62;
|
|
304
383
|
return this.initAccList(_i3);
|
|
305
|
-
case
|
|
384
|
+
case 62:
|
|
306
385
|
_i3++;
|
|
307
|
-
_context2.next =
|
|
386
|
+
_context2.next = 27;
|
|
308
387
|
break;
|
|
309
|
-
case
|
|
388
|
+
case 65:
|
|
310
389
|
if (!(!newHeightSet && Object.keys(variantValues).length)) {
|
|
311
|
-
_context2.next =
|
|
390
|
+
_context2.next = 76;
|
|
312
391
|
break;
|
|
313
392
|
}
|
|
314
393
|
grids = this.activeGrids;
|
|
315
394
|
_i4 = 0;
|
|
316
|
-
case
|
|
395
|
+
case 68:
|
|
317
396
|
if (!(_i4 < grids.length)) {
|
|
318
|
-
_context2.next =
|
|
397
|
+
_context2.next = 76;
|
|
319
398
|
break;
|
|
320
399
|
}
|
|
321
400
|
_grid2 = grids[_i4];
|
|
322
401
|
if (!((_grid2$DisableCellsBy = _grid2.DisableCellsByMeasures) !== null && _grid2$DisableCellsBy !== void 0 && _grid2$DisableCellsBy.options.find(function (o) {
|
|
323
402
|
return Object.keys(variantValues).includes('OPT' + o.opt);
|
|
324
403
|
}) || !!_grid2.disableCellsByRules)) {
|
|
325
|
-
_context2.next =
|
|
404
|
+
_context2.next = 73;
|
|
326
405
|
break;
|
|
327
406
|
}
|
|
328
407
|
newHeightSet = true;
|
|
329
|
-
return _context2.abrupt("break",
|
|
330
|
-
case
|
|
408
|
+
return _context2.abrupt("break", 76);
|
|
409
|
+
case 73:
|
|
331
410
|
_i4++;
|
|
332
|
-
_context2.next =
|
|
411
|
+
_context2.next = 68;
|
|
333
412
|
break;
|
|
334
|
-
case
|
|
413
|
+
case 76:
|
|
335
414
|
if (newHeightSet) {
|
|
336
415
|
this.updateDisabledCells();
|
|
337
416
|
}
|
|
338
|
-
case
|
|
417
|
+
case 77:
|
|
339
418
|
case "end":
|
|
340
419
|
return _context2.stop();
|
|
341
420
|
}
|
|
@@ -362,9 +441,146 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
362
441
|
}, {
|
|
363
442
|
key: "stashAccessoiresOfGrid",
|
|
364
443
|
value: function stashAccessoiresOfGrid(gridIndex, ruleIndex) {
|
|
365
|
-
var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex]);
|
|
366
|
-
if (!stashedAccessoires.length) return;
|
|
367
|
-
this.
|
|
444
|
+
var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex], this.valuesPassedOnByParents());
|
|
445
|
+
if (!stashedAccessoires.length) return stashedAccessoires;
|
|
446
|
+
var stashKey = this.stashKey(gridIndex, ruleIndex);
|
|
447
|
+
this.stashedAccessoires[stashKey] = stashedAccessoires;
|
|
448
|
+
this.stashEpochs[stashKey] = this.editEpoch;
|
|
449
|
+
return stashedAccessoires;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/** A hand edit of this shelf or of an accessoire inside it (add, delete, move) - outdates the memories taken before. */
|
|
453
|
+
}, {
|
|
454
|
+
key: "noteUserEdit",
|
|
455
|
+
value: function noteUserEdit() {
|
|
456
|
+
var _this$article$accesso;
|
|
457
|
+
this.editEpoch++;
|
|
458
|
+
(_this$article$accesso = this.article.accessoireParentArticle) === null || _this$article$accesso === void 0 || (_this$article$accesso = _this$article$accesso.shelfPlanner) === null || _this$article$accesso === void 0 || _this$article$accesso.noteUserEdit();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/** The hand edit noted last changed nothing (eg the drop did not fit) - the memories taken before it stay up to date. */
|
|
462
|
+
}, {
|
|
463
|
+
key: "withdrawUserEdit",
|
|
464
|
+
value: function withdrawUserEdit() {
|
|
465
|
+
var _this$article$accesso2;
|
|
466
|
+
this.editEpoch--;
|
|
467
|
+
(_this$article$accesso2 = this.article.accessoireParentArticle) === null || _this$article$accesso2 === void 0 || (_this$article$accesso2 = _this$article$accesso2.shelfPlanner) === null || _this$article$accesso2 === void 0 || _this$article$accesso2.withdrawUserEdit();
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* True when a grid held nothing but its own initAcc - eg the Kleiderstange of a shelf that only passes through another
|
|
472
|
+
* width while it initializes. Such content is not carried over, the other grid starts with its own initAcc.
|
|
473
|
+
*/
|
|
474
|
+
}, {
|
|
475
|
+
key: "isOnlyInitContent",
|
|
476
|
+
value: function isOnlyInitContent(grid, stashed) {
|
|
477
|
+
return stashed.every(function (acc) {
|
|
478
|
+
var _grid$InitAccArr;
|
|
479
|
+
return (_grid$InitAccArr = grid.InitAccArr) === null || _grid$InitAccArr === void 0 ? void 0 : _grid$InitAccArr.some(function (init) {
|
|
480
|
+
return init.Codex === acc.articleCodex && init.initRH.includes(acc.cellIndex);
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Fallback for a grid without an up-to-date memory of its own: places what this change cleared from it, else from a grid
|
|
487
|
+
* the change switched off, mapped by family (eg the 50cm tablar comes back as the 100cm one). The cleared grid keeps its
|
|
488
|
+
* own memory.
|
|
489
|
+
* @param cleared what this change cleared, per grid - a placed source is taken out
|
|
490
|
+
* @returns how many were placed
|
|
491
|
+
*/
|
|
492
|
+
}, {
|
|
493
|
+
key: "placeTransferredAccessoires",
|
|
494
|
+
value: (function () {
|
|
495
|
+
var _placeTransferredAccessoires = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(gridIndex, cleared) {
|
|
496
|
+
var _this = this;
|
|
497
|
+
var sources, _iterator, _step, source, accessoires, placed;
|
|
498
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
499
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
500
|
+
case 0:
|
|
501
|
+
//a grid that stays active keeps its content for itself
|
|
502
|
+
sources = [gridIndex].concat(_toConsumableArray__default["default"](_toConsumableArray__default["default"](cleared.keys()).filter(function (source) {
|
|
503
|
+
return source !== gridIndex && _this.grids[source].DisabledByRule;
|
|
504
|
+
})));
|
|
505
|
+
_iterator = _createForOfIteratorHelper(sources);
|
|
506
|
+
_context3.prev = 2;
|
|
507
|
+
_iterator.s();
|
|
508
|
+
case 4:
|
|
509
|
+
if ((_step = _iterator.n()).done) {
|
|
510
|
+
_context3.next = 18;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
source = _step.value;
|
|
514
|
+
accessoires = cleared.get(source);
|
|
515
|
+
if (accessoires) {
|
|
516
|
+
_context3.next = 9;
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
return _context3.abrupt("continue", 16);
|
|
520
|
+
case 9:
|
|
521
|
+
_context3.next = 11;
|
|
522
|
+
return this.placeStashedAccessoiresInGrid(gridIndex, accessoires, true);
|
|
523
|
+
case 11:
|
|
524
|
+
placed = _context3.sent;
|
|
525
|
+
if (placed) {
|
|
526
|
+
_context3.next = 14;
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
return _context3.abrupt("continue", 16);
|
|
530
|
+
case 14:
|
|
531
|
+
cleared["delete"](source);
|
|
532
|
+
return _context3.abrupt("return", placed);
|
|
533
|
+
case 16:
|
|
534
|
+
_context3.next = 4;
|
|
535
|
+
break;
|
|
536
|
+
case 18:
|
|
537
|
+
_context3.next = 23;
|
|
538
|
+
break;
|
|
539
|
+
case 20:
|
|
540
|
+
_context3.prev = 20;
|
|
541
|
+
_context3.t0 = _context3["catch"](2);
|
|
542
|
+
_iterator.e(_context3.t0);
|
|
543
|
+
case 23:
|
|
544
|
+
_context3.prev = 23;
|
|
545
|
+
_iterator.f();
|
|
546
|
+
return _context3.finish(23);
|
|
547
|
+
case 26:
|
|
548
|
+
return _context3.abrupt("return", 0);
|
|
549
|
+
case 27:
|
|
550
|
+
case "end":
|
|
551
|
+
return _context3.stop();
|
|
552
|
+
}
|
|
553
|
+
}, _callee3, this, [[2, 20, 23, 26]]);
|
|
554
|
+
}));
|
|
555
|
+
function placeTransferredAccessoires(_x3, _x4) {
|
|
556
|
+
return _placeTransferredAccessoires.apply(this, arguments);
|
|
557
|
+
}
|
|
558
|
+
return placeTransferredAccessoires;
|
|
559
|
+
}() /** How many accessoires of `articleCodex` or of its family the grid holds, each counted in the cell it starts in. */)
|
|
560
|
+
}, {
|
|
561
|
+
key: "countPlacedOfFamily",
|
|
562
|
+
value: function countPlacedOfFamily(grid, articleCodex) {
|
|
563
|
+
var codexes = [articleCodex].concat(_toConsumableArray__default["default"](index.familyMembersOf(articleCodex, this.article.CatalogData.allCatalogArticles)));
|
|
564
|
+
var startsHere = function startsHere(cell) {
|
|
565
|
+
return cell.InUse === cell.Index && !cell.OnlyPlaceHolder;
|
|
566
|
+
};
|
|
567
|
+
return grid.Cells.filter(function (cell) {
|
|
568
|
+
var _cell$Article$article, _cell$Article;
|
|
569
|
+
return startsHere(cell) && codexes.includes((_cell$Article$article = (_cell$Article = cell.Article) === null || _cell$Article === void 0 ? void 0 : _cell$Article.articleCodex) !== null && _cell$Article$article !== void 0 ? _cell$Article$article : '');
|
|
570
|
+
}).length;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/** The article itself when the grid allows it, else the members of its family the grid allows. */
|
|
574
|
+
}, {
|
|
575
|
+
key: "familyCandidates",
|
|
576
|
+
value: function familyCandidates(grid, articleCodex) {
|
|
577
|
+
var allowed = grid.getAllArticleRelations();
|
|
578
|
+
var family = index.familyMembersOf(articleCodex, this.article.CatalogData.allCatalogArticles).filter(function (codex) {
|
|
579
|
+
return codex !== articleCodex;
|
|
580
|
+
});
|
|
581
|
+
return [articleCodex].concat(_toConsumableArray__default["default"](family)).filter(function (codex) {
|
|
582
|
+
return allowed.includes(codex);
|
|
583
|
+
});
|
|
368
584
|
}
|
|
369
585
|
|
|
370
586
|
/** The memory is per grid and per HeightGridCellCountOnRule entry, false when the grid runs without a matching entry. */
|
|
@@ -377,29 +593,29 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
377
593
|
/**
|
|
378
594
|
* Collects an accessoire of every cell it starts in, including the accessoires of the accessoire itself
|
|
379
595
|
* (eg the drawers of an EINBAU), because those get deleted with their parent as well.
|
|
596
|
+
* @param parentInheritedValues values the parents of the article pass on to the accessoires, per basketId
|
|
380
597
|
*/
|
|
381
598
|
}, {
|
|
382
599
|
key: "collectAccessoiresToStash",
|
|
383
|
-
value: function collectAccessoiresToStash(grid) {
|
|
600
|
+
value: function collectAccessoiresToStash(grid, parentInheritedValues) {
|
|
384
601
|
var stashedAccessoires = [];
|
|
602
|
+
var inheritedValues = ShelfPlanner.addValuesPassedOnBy(this.article, parentInheritedValues);
|
|
385
603
|
for (var i = 0; i < grid.Cells.length; i++) {
|
|
604
|
+
var _accessoire$shelfPlan, _accessoire$shelfPlan2, _inheritedValues$acce;
|
|
386
605
|
var cell = grid.Cells[i];
|
|
387
606
|
var accessoire = cell.Article;
|
|
388
607
|
if (cell.InUse !== i || !accessoire) continue;
|
|
389
608
|
|
|
390
609
|
//the accessoire can be a shelf itself (eg an EINBAU), its own accessoires are grouped by its own grids
|
|
391
|
-
var accessoires = {};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
accessoires: accessoiresOfGrid
|
|
401
|
-
};
|
|
402
|
-
}
|
|
610
|
+
var accessoires = (_accessoire$shelfPlan = (_accessoire$shelfPlan2 = accessoire.shelfPlanner) === null || _accessoire$shelfPlan2 === void 0 ? void 0 : _accessoire$shelfPlan2.collectOwnAccessoiresToStash(inheritedValues)) !== null && _accessoire$shelfPlan !== void 0 ? _accessoire$shelfPlan : {};
|
|
611
|
+
|
|
612
|
+
//a value the accessoire only took over from the parent is not remembered: placed again, the accessoire takes over the
|
|
613
|
+
//parent's value of that time, the parent may have changed it in between
|
|
614
|
+
var variantValues = accessoire.VariantValues;
|
|
615
|
+
var inherited = (_inheritedValues$acce = inheritedValues[accessoire.basketId]) !== null && _inheritedValues$acce !== void 0 ? _inheritedValues$acce : {};
|
|
616
|
+
for (var _i5 = 0, _Object$keys = Object.keys(inherited); _i5 < _Object$keys.length; _i5++) {
|
|
617
|
+
var codex = _Object$keys[_i5];
|
|
618
|
+
if (variantValues[codex] === inherited[codex]) delete variantValues[codex];
|
|
403
619
|
}
|
|
404
620
|
stashedAccessoires.push({
|
|
405
621
|
articleCodex: accessoire.articleCodex,
|
|
@@ -407,7 +623,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
407
623
|
noMove: cell.NoMove,
|
|
408
624
|
noDelete: cell.NoDelete,
|
|
409
625
|
quantity: accessoire.quantity,
|
|
410
|
-
variantValues:
|
|
626
|
+
variantValues: variantValues,
|
|
627
|
+
inheritedValues: inherited,
|
|
411
628
|
accessoires: accessoires
|
|
412
629
|
});
|
|
413
630
|
}
|
|
@@ -415,133 +632,231 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
415
632
|
}
|
|
416
633
|
|
|
417
634
|
/**
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
635
|
+
* The values the parents of the article pass on to their accessoires right now, per basketId. A stash can start at an
|
|
636
|
+
* accessoire that is a shelf itself (eg an EINBAU whose own grid gets rebuilt), its accessoires inherit the values of
|
|
637
|
+
* all its parents as well (eg the cabinet colour).
|
|
421
638
|
*/
|
|
422
639
|
}, {
|
|
423
|
-
key: "
|
|
424
|
-
value:
|
|
425
|
-
var
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
function placeStashedAccessoiresOfGrid(_x3) {
|
|
452
|
-
return _placeStashedAccessoiresOfGrid.apply(this, arguments);
|
|
640
|
+
key: "valuesPassedOnByParents",
|
|
641
|
+
value: function valuesPassedOnByParents() {
|
|
642
|
+
var parents = [];
|
|
643
|
+
for (var parent = this.article.accessoireParentArticle; parent; parent = parent.accessoireParentArticle) parents.unshift(parent);
|
|
644
|
+
return parents.reduce(function (inheritedValues, parent) {
|
|
645
|
+
return ShelfPlanner.addValuesPassedOnBy(parent, inheritedValues);
|
|
646
|
+
}, {});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Adds the values the article passes on to its accessoires with its global options right now (eg the gardenhouse colour of
|
|
651
|
+
* the door) on top of the ones its parents pass on (eg the cabinet colour of the drawers in an EINBAU).
|
|
652
|
+
* @param parentInheritedValues values the parents of the article pass on, per basketId
|
|
653
|
+
* @returns the values passed on per basketId, a new object
|
|
654
|
+
*/
|
|
655
|
+
}, {
|
|
656
|
+
key: "collectOwnAccessoiresToStash",
|
|
657
|
+
value: /** The accessoires of all grids of this shelfplanner, grouped by grid - eg the drawers of an EINBAU that gets replaced. */
|
|
658
|
+
function collectOwnAccessoiresToStash() {
|
|
659
|
+
var parentInheritedValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.valuesPassedOnByParents();
|
|
660
|
+
var accessoires = {};
|
|
661
|
+
for (var j = 0; j < this.grids.length; j++) {
|
|
662
|
+
var grid = this.grids[j];
|
|
663
|
+
var accessoiresOfGrid = this.collectAccessoiresToStash(grid, parentInheritedValues);
|
|
664
|
+
if (accessoiresOfGrid.length) accessoires[grid.ShelfIndex] = {
|
|
665
|
+
ruleIndex: grid.CurrentLoadedRuleIndex,
|
|
666
|
+
accessoires: accessoiresOfGrid
|
|
667
|
+
};
|
|
453
668
|
}
|
|
454
|
-
return
|
|
455
|
-
}
|
|
669
|
+
return accessoires;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Takes the accessoires remembered for the rule entry the grid runs now out of the memory.
|
|
674
|
+
* @param gridIndex grid that became active again
|
|
675
|
+
* @returns the remembered accessoires and whether something was edited by hand since they were taken
|
|
676
|
+
*/
|
|
677
|
+
}, {
|
|
678
|
+
key: "takeStashOfGrid",
|
|
679
|
+
value: function takeStashOfGrid(gridIndex) {
|
|
680
|
+
//a recreated grid already runs its new rule entry, only accessoires planned under that entry belong into it
|
|
681
|
+
var stashKey = this.stashKey(gridIndex, this.grids[gridIndex].CurrentLoadedRuleIndex);
|
|
682
|
+
var accessoires = this.stashedAccessoires[stashKey];
|
|
683
|
+
var outdated = this.stashEpochs[stashKey] !== this.editEpoch;
|
|
684
|
+
//remove it first, a reconfiguration triggered by placing them must not place them a second time
|
|
685
|
+
delete this.stashedAccessoires[stashKey];
|
|
686
|
+
delete this.stashEpochs[stashKey];
|
|
687
|
+
return accessoires !== null && accessoires !== void 0 && accessoires.length ? {
|
|
688
|
+
accessoires: accessoires,
|
|
689
|
+
outdated: outdated
|
|
690
|
+
} : undefined;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Places stashed accessoires that are grouped by gridIndex - used for the accessoires of an accessoire.
|
|
695
|
+
* @param mapByFamily the accessoire was replaced by another member of its family: its grids run their own rule entry, and
|
|
696
|
+
* every accessoire is placed as itself or as the family member the grid allows
|
|
697
|
+
*/
|
|
456
698
|
}, {
|
|
457
699
|
key: "placeStashedAccessoiresByGrid",
|
|
458
700
|
value: (function () {
|
|
459
701
|
var _placeStashedAccessoiresByGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(stashedAccessoires) {
|
|
460
|
-
var
|
|
702
|
+
var mapByFamily,
|
|
703
|
+
gridIndexes,
|
|
704
|
+
i,
|
|
705
|
+
gridIndex,
|
|
706
|
+
grid,
|
|
707
|
+
stashed,
|
|
708
|
+
_args4 = arguments;
|
|
461
709
|
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
462
710
|
while (1) switch (_context4.prev = _context4.next) {
|
|
463
711
|
case 0:
|
|
712
|
+
mapByFamily = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : false;
|
|
464
713
|
gridIndexes = Object.keys(stashedAccessoires);
|
|
465
714
|
i = 0;
|
|
466
|
-
case
|
|
715
|
+
case 3:
|
|
467
716
|
if (!(i < gridIndexes.length)) {
|
|
468
|
-
_context4.next =
|
|
717
|
+
_context4.next = 19;
|
|
469
718
|
break;
|
|
470
719
|
}
|
|
471
720
|
gridIndex = Number(gridIndexes[i]);
|
|
472
721
|
grid = this.getGridByIndex(gridIndex);
|
|
473
722
|
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
|
|
474
723
|
//runs another entry than the remembered accessoires were planned under keeps them
|
|
475
|
-
if (!(!grid || grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
|
|
476
|
-
_context4.next =
|
|
724
|
+
if (!(!grid || !mapByFamily && grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
|
|
725
|
+
_context4.next = 9;
|
|
477
726
|
break;
|
|
478
727
|
}
|
|
479
|
-
return _context4.abrupt("continue",
|
|
480
|
-
case
|
|
481
|
-
_context4.next =
|
|
728
|
+
return _context4.abrupt("continue", 16);
|
|
729
|
+
case 9:
|
|
730
|
+
_context4.next = 11;
|
|
482
731
|
return grid.deleteAllAccOfGrid();
|
|
483
|
-
case
|
|
484
|
-
_context4.next =
|
|
485
|
-
return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires);
|
|
486
|
-
case
|
|
732
|
+
case 11:
|
|
733
|
+
_context4.next = 13;
|
|
734
|
+
return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires, mapByFamily);
|
|
735
|
+
case 13:
|
|
487
736
|
if (_context4.sent) {
|
|
488
|
-
_context4.next =
|
|
737
|
+
_context4.next = 16;
|
|
489
738
|
break;
|
|
490
739
|
}
|
|
491
|
-
_context4.next =
|
|
740
|
+
_context4.next = 16;
|
|
492
741
|
return this.initAccList(gridIndex);
|
|
493
|
-
case
|
|
742
|
+
case 16:
|
|
494
743
|
i++;
|
|
495
|
-
_context4.next =
|
|
744
|
+
_context4.next = 3;
|
|
496
745
|
break;
|
|
497
|
-
case
|
|
746
|
+
case 19:
|
|
498
747
|
case "end":
|
|
499
748
|
return _context4.stop();
|
|
500
749
|
}
|
|
501
750
|
}, _callee4, this);
|
|
502
751
|
}));
|
|
503
|
-
function placeStashedAccessoiresByGrid(
|
|
752
|
+
function placeStashedAccessoiresByGrid(_x5) {
|
|
504
753
|
return _placeStashedAccessoiresByGrid.apply(this, arguments);
|
|
505
754
|
}
|
|
506
755
|
return placeStashedAccessoiresByGrid;
|
|
507
|
-
}()
|
|
756
|
+
}()
|
|
757
|
+
/**
|
|
758
|
+
* @param mapByFamily an accessoire the grid does not allow is placed as the member of its family the grid allows
|
|
759
|
+
* @returns how many of the stashed accessoires were placed
|
|
760
|
+
*/
|
|
761
|
+
)
|
|
508
762
|
}, {
|
|
509
763
|
key: "placeStashedAccessoiresInGrid",
|
|
510
764
|
value: (function () {
|
|
511
765
|
var _placeStashedAccessoiresInGrid = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(gridIndex, stashedAccessoires) {
|
|
512
|
-
var
|
|
766
|
+
var mapByFamily,
|
|
767
|
+
placedAccessoires,
|
|
768
|
+
grid,
|
|
769
|
+
i,
|
|
770
|
+
stashed,
|
|
771
|
+
result,
|
|
772
|
+
_iterator2,
|
|
773
|
+
_step2,
|
|
774
|
+
articleCodex,
|
|
775
|
+
fitResult,
|
|
776
|
+
accessoire,
|
|
777
|
+
replaced,
|
|
778
|
+
variantValues,
|
|
779
|
+
_args5 = arguments;
|
|
513
780
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
514
781
|
while (1) switch (_context5.prev = _context5.next) {
|
|
515
782
|
case 0:
|
|
783
|
+
mapByFamily = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : false;
|
|
516
784
|
placedAccessoires = 0;
|
|
517
785
|
grid = this.getGridByIndex(gridIndex);
|
|
518
786
|
if (grid) {
|
|
519
|
-
_context5.next =
|
|
787
|
+
_context5.next = 5;
|
|
520
788
|
break;
|
|
521
789
|
}
|
|
522
790
|
return _context5.abrupt("return", placedAccessoires);
|
|
523
|
-
case 4:
|
|
524
|
-
i = 0;
|
|
525
791
|
case 5:
|
|
792
|
+
i = 0;
|
|
793
|
+
case 6:
|
|
526
794
|
if (!(i < stashedAccessoires.length)) {
|
|
527
|
-
_context5.next =
|
|
795
|
+
_context5.next = 53;
|
|
528
796
|
break;
|
|
529
797
|
}
|
|
530
798
|
stashed = stashedAccessoires[i];
|
|
531
|
-
|
|
532
|
-
|
|
799
|
+
result = false;
|
|
800
|
+
_iterator2 = _createForOfIteratorHelper(mapByFamily ? this.familyCandidates(grid, stashed.articleCodex) : [stashed.articleCodex]);
|
|
801
|
+
_context5.prev = 10;
|
|
802
|
+
_iterator2.s();
|
|
803
|
+
case 12:
|
|
804
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
805
|
+
_context5.next = 23;
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
articleCodex = _step2.value;
|
|
809
|
+
grid.ActAccessoire = articleCodex;
|
|
810
|
+
_context5.next = 17;
|
|
533
811
|
return index.setHandlerInstance.addAccessorieOnShelfPlanner(this.article.set, gridIndex, stashed.cellIndex, this.article.basketId, {
|
|
534
812
|
noMove: stashed.noMove,
|
|
535
813
|
noDelete: stashed.noDelete,
|
|
536
|
-
byInit: true
|
|
814
|
+
byInit: true,
|
|
815
|
+
onlyOfferedCells: mapByFamily
|
|
537
816
|
});
|
|
538
|
-
case
|
|
817
|
+
case 17:
|
|
539
818
|
result = _context5.sent;
|
|
540
819
|
grid.ActAccessoire = undefined;
|
|
541
|
-
|
|
820
|
+
if (!isPlaced(result)) {
|
|
821
|
+
_context5.next = 21;
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
return _context5.abrupt("break", 23);
|
|
825
|
+
case 21:
|
|
826
|
+
_context5.next = 12;
|
|
827
|
+
break;
|
|
828
|
+
case 23:
|
|
829
|
+
_context5.next = 28;
|
|
830
|
+
break;
|
|
831
|
+
case 25:
|
|
832
|
+
_context5.prev = 25;
|
|
833
|
+
_context5.t0 = _context5["catch"](10);
|
|
834
|
+
_iterator2.e(_context5.t0);
|
|
835
|
+
case 28:
|
|
836
|
+
_context5.prev = 28;
|
|
837
|
+
_iterator2.f();
|
|
838
|
+
return _context5.finish(28);
|
|
839
|
+
case 31:
|
|
840
|
+
//a failed fit still returns its result, with the temporary article already deleted
|
|
841
|
+
fitResult = mapByFamily ? isPlaced(result) ? result : undefined : result === false || result.index === undefined ? undefined : result;
|
|
542
842
|
accessoire = fitResult === null || fitResult === void 0 ? void 0 : fitResult.accessoire;
|
|
843
|
+
if (!(mapByFamily && (!fitResult || !accessoire))) {
|
|
844
|
+
_context5.next = 36;
|
|
845
|
+
break;
|
|
846
|
+
}
|
|
847
|
+
//carrying over is a best effort - what has no fitting family member in this grid is left out
|
|
848
|
+
this.logShelfDebug({
|
|
849
|
+
phase: 'configChanged',
|
|
850
|
+
action: 'accessoryNotTransferred',
|
|
851
|
+
gridIndex: gridIndex,
|
|
852
|
+
cellIndex: stashed.cellIndex,
|
|
853
|
+
articleCodex: stashed.articleCodex,
|
|
854
|
+
detail: 'no member of its family fits into this grid'
|
|
855
|
+
});
|
|
856
|
+
return _context5.abrupt("continue", 50);
|
|
857
|
+
case 36:
|
|
543
858
|
if (!(!fitResult || !accessoire)) {
|
|
544
|
-
_context5.next =
|
|
859
|
+
_context5.next = 39;
|
|
545
860
|
break;
|
|
546
861
|
}
|
|
547
862
|
LOG.error(new DivaUtils.DivaError('shelfaccessoire of a switched off grid does not fit anymore and gets dropped', {
|
|
@@ -555,50 +870,91 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
555
870
|
parentBasketId: this.article.basketId
|
|
556
871
|
}
|
|
557
872
|
}));
|
|
558
|
-
return _context5.abrupt("continue",
|
|
559
|
-
case
|
|
873
|
+
return _context5.abrupt("continue", 50);
|
|
874
|
+
case 39:
|
|
560
875
|
accessoire.quantity = stashed.quantity;
|
|
561
876
|
placedAccessoires++;
|
|
562
|
-
|
|
563
|
-
|
|
877
|
+
replaced = accessoire.articleCodex !== stashed.articleCodex;
|
|
878
|
+
if (mapByFamily) this.logShelfDebug({
|
|
879
|
+
phase: 'configChanged',
|
|
880
|
+
action: 'accessoryTransferred',
|
|
881
|
+
gridIndex: gridIndex,
|
|
882
|
+
cellIndex: stashed.cellIndex,
|
|
883
|
+
articleCodex: accessoire.articleCodex,
|
|
884
|
+
detail: replaced ? "as family member of ".concat(stashed.articleCodex) : 'same article'
|
|
885
|
+
});
|
|
886
|
+
variantValues = this.valuesToPlaceAgain(stashed, accessoire);
|
|
887
|
+
if (!Object.keys(variantValues).length) {
|
|
888
|
+
_context5.next = 47;
|
|
564
889
|
break;
|
|
565
890
|
}
|
|
566
|
-
_context5.next =
|
|
567
|
-
return index.articleHandlerInstance.updateCfgValues(accessoire,
|
|
568
|
-
case
|
|
891
|
+
_context5.next = 47;
|
|
892
|
+
return index.articleHandlerInstance.updateCfgValues(accessoire, variantValues, {});
|
|
893
|
+
case 47:
|
|
569
894
|
if (!accessoire.shelfPlanner) {
|
|
570
|
-
_context5.next =
|
|
895
|
+
_context5.next = 50;
|
|
571
896
|
break;
|
|
572
897
|
}
|
|
573
|
-
_context5.next =
|
|
574
|
-
return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires);
|
|
575
|
-
case
|
|
898
|
+
_context5.next = 50;
|
|
899
|
+
return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires, mapByFamily || replaced);
|
|
900
|
+
case 50:
|
|
576
901
|
i++;
|
|
577
|
-
_context5.next =
|
|
902
|
+
_context5.next = 6;
|
|
578
903
|
break;
|
|
579
|
-
case
|
|
904
|
+
case 53:
|
|
580
905
|
return _context5.abrupt("return", placedAccessoires);
|
|
581
|
-
case
|
|
906
|
+
case 54:
|
|
582
907
|
case "end":
|
|
583
908
|
return _context5.stop();
|
|
584
909
|
}
|
|
585
|
-
}, _callee5, this);
|
|
910
|
+
}, _callee5, this, [[10, 25, 28, 31]]);
|
|
586
911
|
}));
|
|
587
|
-
function placeStashedAccessoiresInGrid(
|
|
912
|
+
function placeStashedAccessoiresInGrid(_x6, _x7) {
|
|
588
913
|
return _placeStashedAccessoiresInGrid.apply(this, arguments);
|
|
589
914
|
}
|
|
590
915
|
return placeStashedAccessoiresInGrid;
|
|
591
916
|
}()
|
|
917
|
+
/**
|
|
918
|
+
* The remembered values of a stashed accessoire to set on the accessoire that was placed for it. A value of its own (eg an
|
|
919
|
+
* anthracite door) does not come back when the parent passes on another value than at stash time (eg the gardenhouse turned
|
|
920
|
+
* dark grey): an accessoire that stays in place takes over the parent's new value as well (updateAccessoriesFromGlobalOption).
|
|
921
|
+
* @param accessoire the accessoire placed for the stashed one, the values the parents pass on to it now are looked up by its basketId
|
|
922
|
+
*/
|
|
923
|
+
)
|
|
924
|
+
}, {
|
|
925
|
+
key: "valuesToPlaceAgain",
|
|
926
|
+
value: function valuesToPlaceAgain(stashed, accessoire) {
|
|
927
|
+
var _ShelfPlanner$addValu;
|
|
928
|
+
var variantValues = _objectSpread({}, stashed.variantValues);
|
|
929
|
+
var ownInheritableCodices = Object.keys(stashed.inheritedValues).filter(function (codex) {
|
|
930
|
+
return codex in variantValues;
|
|
931
|
+
});
|
|
932
|
+
if (!ownInheritableCodices.length) return variantValues;
|
|
933
|
+
var inheritedNow = (_ShelfPlanner$addValu = ShelfPlanner.addValuesPassedOnBy(this.article, this.valuesPassedOnByParents())[accessoire.basketId]) !== null && _ShelfPlanner$addValu !== void 0 ? _ShelfPlanner$addValu : {};
|
|
934
|
+
var _iterator3 = _createForOfIteratorHelper(ownInheritableCodices),
|
|
935
|
+
_step3;
|
|
936
|
+
try {
|
|
937
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
938
|
+
var codex = _step3.value;
|
|
939
|
+
if (inheritedNow[codex] !== undefined && inheritedNow[codex] !== stashed.inheritedValues[codex]) delete variantValues[codex];
|
|
940
|
+
}
|
|
941
|
+
} catch (err) {
|
|
942
|
+
_iterator3.e(err);
|
|
943
|
+
} finally {
|
|
944
|
+
_iterator3.f();
|
|
945
|
+
}
|
|
946
|
+
return variantValues;
|
|
947
|
+
}
|
|
948
|
+
|
|
592
949
|
/**
|
|
593
950
|
* runs through the InitAccArr and initialized all the accessoires eg: Kleiderstange gets placed
|
|
594
951
|
* if the replaceFromParent == true it removed the same article from the parent shelfplanner if one is found eg: Kleiderstange gets removed from schrank when the T-Sück gets initialized
|
|
595
952
|
*/
|
|
596
|
-
)
|
|
597
953
|
}, {
|
|
598
954
|
key: "initAccList",
|
|
599
955
|
value: (function () {
|
|
600
956
|
var _initAccList = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(gridIndex) {
|
|
601
|
-
var grids, i, grid, j, initAcc, k, _this$article$
|
|
957
|
+
var grids, i, grid, heldByFamily, j, _this$article$Catalog, _this$article$Catalog2, _heldByFamily$get, initAcc, family, held, placed, k, parentIsReal, _this$article$accesso3, shelfId, accessoires, _accessoireToDelete$s, accessoireToDelete, rh;
|
|
602
958
|
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
603
959
|
while (1) switch (_context6.prev = _context6.next) {
|
|
604
960
|
case 0:
|
|
@@ -606,7 +962,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
606
962
|
i = 0;
|
|
607
963
|
case 2:
|
|
608
964
|
if (!(i < grids.length)) {
|
|
609
|
-
_context6.next =
|
|
965
|
+
_context6.next = 43;
|
|
610
966
|
break;
|
|
611
967
|
}
|
|
612
968
|
grid = grids[i];
|
|
@@ -614,25 +970,31 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
614
970
|
_context6.next = 6;
|
|
615
971
|
break;
|
|
616
972
|
}
|
|
617
|
-
return _context6.abrupt("continue",
|
|
973
|
+
return _context6.abrupt("continue", 40);
|
|
618
974
|
case 6:
|
|
619
975
|
if (grid.InitAccArr) {
|
|
620
976
|
_context6.next = 8;
|
|
621
977
|
break;
|
|
622
978
|
}
|
|
623
|
-
return _context6.abrupt("continue",
|
|
979
|
+
return _context6.abrupt("continue", 40);
|
|
624
980
|
case 8:
|
|
981
|
+
//only tops up: what the grid held of a family before (eg a carried over Kleiderstange in another cell) counts once
|
|
982
|
+
heldByFamily = new Map();
|
|
625
983
|
j = 0;
|
|
626
|
-
case
|
|
984
|
+
case 10:
|
|
627
985
|
if (!(j < grid.InitAccArr.length)) {
|
|
628
|
-
_context6.next =
|
|
986
|
+
_context6.next = 40;
|
|
629
987
|
break;
|
|
630
988
|
}
|
|
631
989
|
initAcc = grid.InitAccArr[j];
|
|
632
|
-
|
|
633
|
-
|
|
990
|
+
family = (_this$article$Catalog = (_this$article$Catalog2 = this.article.CatalogData.allCatalogArticles[initAcc.Codex]) === null || _this$article$Catalog2 === void 0 ? void 0 : _this$article$Catalog2.accessoireFamily) !== null && _this$article$Catalog !== void 0 ? _this$article$Catalog : initAcc.Codex;
|
|
991
|
+
held = (_heldByFamily$get = heldByFamily.get(family)) !== null && _heldByFamily$get !== void 0 ? _heldByFamily$get : this.countPlacedOfFamily(grid, initAcc.Codex);
|
|
992
|
+
placed = Math.min(held, initAcc.initRH.length);
|
|
993
|
+
heldByFamily.set(family, held - placed);
|
|
994
|
+
k = placed;
|
|
995
|
+
case 17:
|
|
634
996
|
if (!(k < initAcc.initRH.length)) {
|
|
635
|
-
_context6.next =
|
|
997
|
+
_context6.next = 37;
|
|
636
998
|
break;
|
|
637
999
|
}
|
|
638
1000
|
grid.ActAccessoire = initAcc.Codex;
|
|
@@ -644,56 +1006,58 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
644
1006
|
articleCodex: initAcc.Codex,
|
|
645
1007
|
detail: 'from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed'
|
|
646
1008
|
});
|
|
647
|
-
_context6.next =
|
|
1009
|
+
_context6.next = 22;
|
|
648
1010
|
return index.setHandlerInstance.addAccessorieOnShelfPlanner(this.article.set, grid.ShelfIndex, initAcc.initRH[k], grid.basketId, {
|
|
649
1011
|
noMove: initAcc.noMove,
|
|
650
1012
|
noDelete: initAcc.noDelete,
|
|
651
1013
|
byInit: true
|
|
652
1014
|
});
|
|
653
|
-
case
|
|
654
|
-
|
|
655
|
-
|
|
1015
|
+
case 22:
|
|
1016
|
+
//UseCase Atlantis Kleiderstange gets deleted on parent - not by a dry run, its parent is the real shelf it previews in
|
|
1017
|
+
parentIsReal = !index.setHandlerInstance.isDryRunArticle(this.article.accessoireParentArticle);
|
|
1018
|
+
if (!(initAcc.replaceFromParent && !(index.setHandlerInstance.isDryRunArticle(this.article) && parentIsReal))) {
|
|
1019
|
+
_context6.next = 33;
|
|
656
1020
|
break;
|
|
657
1021
|
}
|
|
658
1022
|
shelfId = this.getShelfParentShelfId();
|
|
659
|
-
if (!(shelfId && (_this$article$
|
|
660
|
-
_context6.next =
|
|
1023
|
+
if (!(shelfId && (_this$article$accesso3 = this.article.accessoireParentArticle) !== null && _this$article$accesso3 !== void 0 && _this$article$accesso3.shelfPlanner)) {
|
|
1024
|
+
_context6.next = 33;
|
|
661
1025
|
break;
|
|
662
1026
|
}
|
|
663
1027
|
accessoires = this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(shelfId, initAcc.Codex);
|
|
664
1028
|
if (!(accessoires && accessoires.length > 0)) {
|
|
665
|
-
_context6.next =
|
|
1029
|
+
_context6.next = 33;
|
|
666
1030
|
break;
|
|
667
1031
|
}
|
|
668
1032
|
accessoireToDelete = accessoires[0];
|
|
669
1033
|
rh = (_accessoireToDelete$s = accessoireToDelete.shelfPlanner) === null || _accessoireToDelete$s === void 0 ? void 0 : _accessoireToDelete$s.getRHOnParentArticle();
|
|
670
1034
|
if (!(rh !== undefined && accessoireToDelete.relatedToShelfGrid !== undefined)) {
|
|
671
|
-
_context6.next =
|
|
1035
|
+
_context6.next = 33;
|
|
672
1036
|
break;
|
|
673
1037
|
}
|
|
674
|
-
_context6.next =
|
|
1038
|
+
_context6.next = 33;
|
|
675
1039
|
return index.setHandlerInstance.deleteAccessorieOnShelfPlanner(this.article.set, accessoireToDelete.relatedToShelfGrid, rh, this.article.accessoireParentArticle.basketId);
|
|
676
|
-
case
|
|
1040
|
+
case 33:
|
|
677
1041
|
grid.ActAccessoire = undefined;
|
|
678
|
-
case
|
|
1042
|
+
case 34:
|
|
679
1043
|
k++;
|
|
680
|
-
_context6.next =
|
|
1044
|
+
_context6.next = 17;
|
|
681
1045
|
break;
|
|
682
|
-
case
|
|
1046
|
+
case 37:
|
|
683
1047
|
j++;
|
|
684
|
-
_context6.next =
|
|
1048
|
+
_context6.next = 10;
|
|
685
1049
|
break;
|
|
686
|
-
case
|
|
1050
|
+
case 40:
|
|
687
1051
|
i++;
|
|
688
1052
|
_context6.next = 2;
|
|
689
1053
|
break;
|
|
690
|
-
case
|
|
1054
|
+
case 43:
|
|
691
1055
|
case "end":
|
|
692
1056
|
return _context6.stop();
|
|
693
1057
|
}
|
|
694
1058
|
}, _callee6, this);
|
|
695
1059
|
}));
|
|
696
|
-
function initAccList(
|
|
1060
|
+
function initAccList(_x8) {
|
|
697
1061
|
return _initAccList.apply(this, arguments);
|
|
698
1062
|
}
|
|
699
1063
|
return initAccList;
|
|
@@ -723,7 +1087,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
723
1087
|
key: "triggerVisibility",
|
|
724
1088
|
value: function () {
|
|
725
1089
|
var _triggerVisibility = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(gridGroup) {
|
|
726
|
-
var toCleanOptions, toUpdateOptions, i, grid,
|
|
1090
|
+
var toCleanOptions, toUpdateOptions, i, grid, _i6, option, visitOptionState;
|
|
727
1091
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
728
1092
|
while (1) switch (_context7.prev = _context7.next) {
|
|
729
1093
|
case 0:
|
|
@@ -759,13 +1123,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
759
1123
|
_context7.next = 3;
|
|
760
1124
|
break;
|
|
761
1125
|
case 13:
|
|
762
|
-
|
|
1126
|
+
_i6 = 0;
|
|
763
1127
|
case 14:
|
|
764
|
-
if (!(
|
|
1128
|
+
if (!(_i6 < [].concat(toUpdateOptions, toCleanOptions).length)) {
|
|
765
1129
|
_context7.next = 23;
|
|
766
1130
|
break;
|
|
767
1131
|
}
|
|
768
|
-
option = [].concat(toUpdateOptions, toCleanOptions)[
|
|
1132
|
+
option = [].concat(toUpdateOptions, toCleanOptions)[_i6];
|
|
769
1133
|
visitOptionState = this.article.getArticleOptionState((!this.article.CatalogData.isIDMFormat ? 'OPT' : '') + option);
|
|
770
1134
|
if (!visitOptionState) {
|
|
771
1135
|
_context7.next = 20;
|
|
@@ -774,7 +1138,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
774
1138
|
_context7.next = 20;
|
|
775
1139
|
return index.articleHandlerInstance.updateOption(this.article, visitOptionState.optionCodex, toUpdateOptions.includes(option) ? 'OPVMIT' : 'OPVOHNE');
|
|
776
1140
|
case 20:
|
|
777
|
-
|
|
1141
|
+
_i6++;
|
|
778
1142
|
_context7.next = 14;
|
|
779
1143
|
break;
|
|
780
1144
|
case 23:
|
|
@@ -783,7 +1147,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
783
1147
|
}
|
|
784
1148
|
}, _callee7, this);
|
|
785
1149
|
}));
|
|
786
|
-
function triggerVisibility(
|
|
1150
|
+
function triggerVisibility(_x9) {
|
|
787
1151
|
return _triggerVisibility.apply(this, arguments);
|
|
788
1152
|
}
|
|
789
1153
|
return triggerVisibility;
|
|
@@ -870,6 +1234,21 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
870
1234
|
}
|
|
871
1235
|
}
|
|
872
1236
|
|
|
1237
|
+
/**
|
|
1238
|
+
* `tryFitOnShelfOfGrid` limited to the cells `getFreeSpacesOfAccessoire` offers (an active grid, room above and below,
|
|
1239
|
+
* neighbour and montage rules) - for a placement nobody picked by hand: a carry-over or a family swap.
|
|
1240
|
+
*/
|
|
1241
|
+
}, {
|
|
1242
|
+
key: "tryFitOnOfferedCellOfGrid",
|
|
1243
|
+
value: function tryFitOnOfferedCellOfGrid(gridIndex, cellIndex, accessoire) {
|
|
1244
|
+
var fit = this.tryFitOnShelfOfGrid(gridIndex, cellIndex, accessoire);
|
|
1245
|
+
if (fit === false || fit.index === undefined || fit.type === 'doesNotFit' || fit.type.startsWith('notAllowed')) return fit;
|
|
1246
|
+
return this.grids[gridIndex].getFreeSpacesOfAccessoire(accessoire).includes(fit.index) ? fit : {
|
|
1247
|
+
type: 'doesNotFit',
|
|
1248
|
+
size: fit.size
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
|
|
873
1252
|
/**
|
|
874
1253
|
*
|
|
875
1254
|
* @param gridName
|
|
@@ -962,7 +1341,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
962
1341
|
}
|
|
963
1342
|
}, _callee9, this);
|
|
964
1343
|
}));
|
|
965
|
-
function deleteAccessoireOfCellInGrid(
|
|
1344
|
+
function deleteAccessoireOfCellInGrid(_x10, _x11) {
|
|
966
1345
|
return _deleteAccessoireOfCellInGrid.apply(this, arguments);
|
|
967
1346
|
}
|
|
968
1347
|
return deleteAccessoireOfCellInGrid;
|
|
@@ -998,7 +1377,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
998
1377
|
key: "handleDeleteTakePlaceOnOtherGrids",
|
|
999
1378
|
value: (function () {
|
|
1000
1379
|
var _handleDeleteTakePlaceOnOtherGrids = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(gridIndex, cellIndex, accessoire) {
|
|
1001
|
-
var i, _cell$
|
|
1380
|
+
var i, _cell$Article2, cell, _i7, _cell$Article3, _cell, _i8;
|
|
1002
1381
|
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
|
|
1003
1382
|
while (1) switch (_context10.prev = _context10.next) {
|
|
1004
1383
|
case 0:
|
|
@@ -1011,15 +1390,15 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1011
1390
|
if (accessoire.shelfHeightAbove) {
|
|
1012
1391
|
for (i = 0; i < accessoire.shelfHeightAbove; i++) {
|
|
1013
1392
|
cell = this.grids[gridIndex].Cells[cellIndex + accessoire.shelfHeight + i];
|
|
1014
|
-
if ((cell === null || cell === void 0 || (_cell$
|
|
1393
|
+
if ((cell === null || cell === void 0 || (_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) === accessoire.basketId) {
|
|
1015
1394
|
cell.ClearInUse();
|
|
1016
1395
|
}
|
|
1017
1396
|
}
|
|
1018
1397
|
}
|
|
1019
1398
|
if (accessoire.shelfHeightBelow) {
|
|
1020
|
-
for (
|
|
1021
|
-
_cell = this.grids[gridIndex].Cells[cellIndex - (
|
|
1022
|
-
if ((_cell === null || _cell === void 0 || (_cell$
|
|
1399
|
+
for (_i7 = 0; _i7 < accessoire.shelfHeightBelow; _i7++) {
|
|
1400
|
+
_cell = this.grids[gridIndex].Cells[cellIndex - (_i7 + 1)];
|
|
1401
|
+
if ((_cell === null || _cell === void 0 || (_cell$Article3 = _cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId) === accessoire.basketId) {
|
|
1023
1402
|
_cell.ClearInUse();
|
|
1024
1403
|
}
|
|
1025
1404
|
}
|
|
@@ -1028,22 +1407,22 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1028
1407
|
_context10.next = 14;
|
|
1029
1408
|
break;
|
|
1030
1409
|
}
|
|
1031
|
-
|
|
1410
|
+
_i8 = 0;
|
|
1032
1411
|
case 6:
|
|
1033
|
-
if (!(
|
|
1412
|
+
if (!(_i8 < this.grids.length)) {
|
|
1034
1413
|
_context10.next = 14;
|
|
1035
1414
|
break;
|
|
1036
1415
|
}
|
|
1037
|
-
if (!(
|
|
1416
|
+
if (!(_i8 === gridIndex)) {
|
|
1038
1417
|
_context10.next = 9;
|
|
1039
1418
|
break;
|
|
1040
1419
|
}
|
|
1041
1420
|
return _context10.abrupt("continue", 11);
|
|
1042
1421
|
case 9:
|
|
1043
1422
|
_context10.next = 11;
|
|
1044
|
-
return this.grids[
|
|
1423
|
+
return this.grids[_i8].deleteAccessoireInCells(cellIndex);
|
|
1045
1424
|
case 11:
|
|
1046
|
-
|
|
1425
|
+
_i8++;
|
|
1047
1426
|
_context10.next = 6;
|
|
1048
1427
|
break;
|
|
1049
1428
|
case 14:
|
|
@@ -1052,7 +1431,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1052
1431
|
}
|
|
1053
1432
|
}, _callee10, this);
|
|
1054
1433
|
}));
|
|
1055
|
-
function handleDeleteTakePlaceOnOtherGrids(
|
|
1434
|
+
function handleDeleteTakePlaceOnOtherGrids(_x12, _x13, _x14) {
|
|
1056
1435
|
return _handleDeleteTakePlaceOnOtherGrids.apply(this, arguments);
|
|
1057
1436
|
}
|
|
1058
1437
|
return handleDeleteTakePlaceOnOtherGrids;
|
|
@@ -1117,7 +1496,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1117
1496
|
}
|
|
1118
1497
|
}, _callee11, this);
|
|
1119
1498
|
}));
|
|
1120
|
-
function addAccessoireInCellInGrid(
|
|
1499
|
+
function addAccessoireInCellInGrid(_x15, _x16, _x17, _x18, _x19) {
|
|
1121
1500
|
return _addAccessoireInCellInGrid.apply(this, arguments);
|
|
1122
1501
|
}
|
|
1123
1502
|
return addAccessoireInCellInGrid;
|
|
@@ -1223,10 +1602,10 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1223
1602
|
});
|
|
1224
1603
|
if (grid.ShelfIndex != i) cells[j].gridIndex = grid.ShelfIndex;
|
|
1225
1604
|
if (cell.InUse == j) {
|
|
1226
|
-
var _cell$
|
|
1605
|
+
var _cell$Article4, _cell$Article5;
|
|
1227
1606
|
cells[j].usedArticleData = {
|
|
1228
|
-
Codex: (_cell$
|
|
1229
|
-
BasketID: (_cell$
|
|
1607
|
+
Codex: (_cell$Article4 = cell.Article) === null || _cell$Article4 === void 0 ? void 0 : _cell$Article4.articleCodex,
|
|
1608
|
+
BasketID: (_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId
|
|
1230
1609
|
};
|
|
1231
1610
|
}
|
|
1232
1611
|
}
|
|
@@ -1252,13 +1631,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1252
1631
|
for (var j = 0; j < grid.Cells.length; j++) {
|
|
1253
1632
|
var cell = grid.Cells[j];
|
|
1254
1633
|
if (cell.InUse == j && cell.Article && cell.Article.model3DName && !cell.OnlyPlaceHolder) {
|
|
1255
|
-
var _cell$
|
|
1634
|
+
var _cell$Article6;
|
|
1256
1635
|
var cellIndex = cell.Index;
|
|
1257
1636
|
if (grid.Direction == 'vertikal' && this.article.CatalogData.useShelfPlannerRTV != true) {
|
|
1258
1637
|
cellIndex = grid.Cells.length - 1 - cell.Index;
|
|
1259
1638
|
}
|
|
1260
1639
|
accessoires.push({
|
|
1261
|
-
basketId: (_cell$
|
|
1640
|
+
basketId: (_cell$Article6 = cell.Article) === null || _cell$Article6 === void 0 ? void 0 : _cell$Article6.basketId,
|
|
1262
1641
|
gridId: grid.ShelfIndex,
|
|
1263
1642
|
gridName: grid.GridName,
|
|
1264
1643
|
model: cell.Article.model3DName,
|
|
@@ -1279,8 +1658,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1279
1658
|
}, {
|
|
1280
1659
|
key: "getShelfElementId",
|
|
1281
1660
|
value: function getShelfElementId() {
|
|
1282
|
-
var _this$article$
|
|
1283
|
-
if ((_this$article$
|
|
1661
|
+
var _this$article$accesso4;
|
|
1662
|
+
if ((_this$article$accesso4 = this.article.accessoireParentArticle) !== null && _this$article$accesso4 !== void 0 && _this$article$accesso4.shelfPlanner && this.article.relatedToShelfGrid !== undefined && this.grids.length > 0) {
|
|
1284
1663
|
var rh = this.getRHOnParentArticle();
|
|
1285
1664
|
var parentId = this.article.accessoireParentArticle.shelfPlanner.getShelfElementId();
|
|
1286
1665
|
return parentId + '.' + this.article.relatedToShelfGrid + '.' + rh;
|
|
@@ -1295,13 +1674,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1295
1674
|
}, {
|
|
1296
1675
|
key: "getRHOnParentArticle",
|
|
1297
1676
|
value: function getRHOnParentArticle() {
|
|
1298
|
-
var _this$article$
|
|
1299
|
-
|
|
1677
|
+
var _this$article$accesso5,
|
|
1678
|
+
_this2 = this;
|
|
1300
1679
|
if (this.article.relatedToShelfGrid === undefined) return undefined;
|
|
1301
|
-
return (_this$article$
|
|
1680
|
+
return (_this$article$accesso5 = this.article.accessoireParentArticle) === null || _this$article$accesso5 === void 0 || (_this$article$accesso5 = _this$article$accesso5.shelfPlanner) === null || _this$article$accesso5 === void 0 || (_this$article$accesso5 = _this$article$accesso5.grids[this.article.relatedToShelfGrid].Cells.find(function (item) {
|
|
1302
1681
|
var _item$Article;
|
|
1303
|
-
return ((_item$Article = item.Article) === null || _item$Article === void 0 ? void 0 : _item$Article.basketId) ==
|
|
1304
|
-
})) === null || _this$article$
|
|
1682
|
+
return ((_item$Article = item.Article) === null || _item$Article === void 0 ? void 0 : _item$Article.basketId) == _this2.article.basketId;
|
|
1683
|
+
})) === null || _this$article$accesso5 === void 0 ? void 0 : _this$article$accesso5.InUse;
|
|
1305
1684
|
}
|
|
1306
1685
|
|
|
1307
1686
|
/**
|
|
@@ -1364,8 +1743,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1364
1743
|
}, {
|
|
1365
1744
|
key: "getShelfParentShelfId",
|
|
1366
1745
|
value: function getShelfParentShelfId() {
|
|
1367
|
-
var _this$article$
|
|
1368
|
-
if (this.article.relatedToShelfGrid !== undefined) return (_this$article$
|
|
1746
|
+
var _this$article$accesso6;
|
|
1747
|
+
if (this.article.relatedToShelfGrid !== undefined) return (_this$article$accesso6 = this.article.accessoireParentArticle) === null || _this$article$accesso6 === void 0 || (_this$article$accesso6 = _this$article$accesso6.shelfPlanner) === null || _this$article$accesso6 === void 0 || (_this$article$accesso6 = _this$article$accesso6.grids[this.article.relatedToShelfGrid]) === null || _this$article$accesso6 === void 0 ? void 0 : _this$article$accesso6.ShelfId;
|
|
1369
1748
|
return undefined;
|
|
1370
1749
|
}
|
|
1371
1750
|
|
|
@@ -1425,7 +1804,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1425
1804
|
key: "disableCellsByDockedShelfs",
|
|
1426
1805
|
value: (function () {
|
|
1427
1806
|
var _disableCellsByDockedShelfs = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(count) {
|
|
1428
|
-
var
|
|
1807
|
+
var _this3 = this;
|
|
1429
1808
|
var grids, _loop2, i;
|
|
1430
1809
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context13) {
|
|
1431
1810
|
while (1) switch (_context13.prev = _context13.next) {
|
|
@@ -1449,7 +1828,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1449
1828
|
newlyEnabled = grid.Cells.filter(function (cell, j) {
|
|
1450
1829
|
return cell.IsDisabled && !toDisableCells.includes(j);
|
|
1451
1830
|
}).length;
|
|
1452
|
-
if (newlyDisabled.length || newlyEnabled)
|
|
1831
|
+
if (newlyDisabled.length || newlyEnabled) _this3.logShelfDebug({
|
|
1453
1832
|
phase: 'docking',
|
|
1454
1833
|
action: 'disabledCellsUpdated',
|
|
1455
1834
|
gridIndex: grid.ShelfIndex,
|
|
@@ -1467,7 +1846,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1467
1846
|
break;
|
|
1468
1847
|
}
|
|
1469
1848
|
_context12.next = 14;
|
|
1470
|
-
return index.setHandlerInstance.deleteAccessorieOnShelfPlanner(
|
|
1849
|
+
return index.setHandlerInstance.deleteAccessorieOnShelfPlanner(_this3.article.set, grid.ShelfIndex, cell.InUse, grid.basketId);
|
|
1471
1850
|
case 14:
|
|
1472
1851
|
cell.IsDisabled = true;
|
|
1473
1852
|
case 15:
|
|
@@ -1515,7 +1894,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1515
1894
|
}
|
|
1516
1895
|
}, _callee12, this);
|
|
1517
1896
|
}));
|
|
1518
|
-
function disableCellsByDockedShelfs(
|
|
1897
|
+
function disableCellsByDockedShelfs(_x20) {
|
|
1519
1898
|
return _disableCellsByDockedShelfs.apply(this, arguments);
|
|
1520
1899
|
}
|
|
1521
1900
|
return disableCellsByDockedShelfs;
|
|
@@ -1588,6 +1967,24 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1588
1967
|
}
|
|
1589
1968
|
return undefined;
|
|
1590
1969
|
}
|
|
1970
|
+
}], [{
|
|
1971
|
+
key: "addValuesPassedOnBy",
|
|
1972
|
+
value: function addValuesPassedOnBy(article, parentInheritedValues) {
|
|
1973
|
+
var globalValues = {};
|
|
1974
|
+
for (var _i9 = 0, _Object$keys2 = Object.keys(article.getGlobalOptions()); _i9 < _Object$keys2.length; _i9++) {
|
|
1975
|
+
var _article$getArticleOp;
|
|
1976
|
+
var opt = _Object$keys2[_i9];
|
|
1977
|
+
var valCodex = (_article$getArticleOp = article.getArticleOptionState(opt)) === null || _article$getArticleOp === void 0 ? void 0 : _article$getArticleOp.valCodex;
|
|
1978
|
+
if (valCodex) globalValues[opt] = valCodex;
|
|
1979
|
+
}
|
|
1980
|
+
var inheritedValues = _objectSpread({}, parentInheritedValues);
|
|
1981
|
+
var ownInheritedValues = article.getAccessoriesToChangeFromGlobalOption(globalValues);
|
|
1982
|
+
for (var _i10 = 0, _Object$keys3 = Object.keys(ownInheritedValues); _i10 < _Object$keys3.length; _i10++) {
|
|
1983
|
+
var _basketId = _Object$keys3[_i10];
|
|
1984
|
+
inheritedValues[_basketId] = _objectSpread(_objectSpread({}, inheritedValues[_basketId]), ownInheritedValues[_basketId].variantValues);
|
|
1985
|
+
}
|
|
1986
|
+
return inheritedValues;
|
|
1987
|
+
}
|
|
1591
1988
|
}]);
|
|
1592
1989
|
}();
|
|
1593
1990
|
|