@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
|
@@ -4,14 +4,15 @@ 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, f as familyMembersOf, a as articleHandlerInstance, b as setHandlerInstance } from './index-88148ccc.js';
|
|
8
8
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
11
|
import 'axios';
|
|
12
|
-
import '@crystaldesign/planner-2d-core';
|
|
13
|
-
import '@crystaldesign/basket-model';
|
|
14
12
|
import '@babel/runtime/helpers/typeof';
|
|
13
|
+
import '@babel/runtime/helpers/toArray';
|
|
14
|
+
import '@crystaldesign/planner-core';
|
|
15
|
+
import '@crystaldesign/basket-model';
|
|
15
16
|
import 'fast-xml-parser';
|
|
16
17
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
17
18
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
@@ -20,9 +21,19 @@ import '@babel/runtime/helpers/wrapNativeSuper';
|
|
|
20
21
|
import '@crystaldesign/basket-handler';
|
|
21
22
|
import 'socket.io-client';
|
|
22
23
|
|
|
24
|
+
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; } } }; }
|
|
25
|
+
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; } }
|
|
26
|
+
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; }
|
|
23
27
|
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; }
|
|
24
28
|
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(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; }
|
|
25
29
|
var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
30
|
+
|
|
31
|
+
/** The accessoire really went into the cell - not a rejected fit, whose article is deleted again. */
|
|
32
|
+
function isPlaced(result) {
|
|
33
|
+
return result !== false && result.index !== undefined && !!result.accessoire && result.type !== 'doesNotFit' && !result.type.startsWith('notAllowed');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Values the parents pass on to their accessoires with their global options, per basketId of the accessoire. */
|
|
26
37
|
var ShelfPlanner = /*#__PURE__*/function () {
|
|
27
38
|
function ShelfPlanner(data, article) {
|
|
28
39
|
_classCallCheck(this, ShelfPlanner);
|
|
@@ -64,8 +75,12 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
64
75
|
_defineProperty(this, "shelfDebugSeq", 0);
|
|
65
76
|
//accessoires of grids that were cleared by a grid rule, per gridIndex and the HeightGridCellCountOnRule entry the grid
|
|
66
77
|
//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
|
|
78
|
+
//from 100cm to 50cm and back keeps its accessoires. A grid that comes back under another entry starts with that entry's
|
|
79
|
+
//initAcc; with rtv-next it first takes what the change cleared (placeTransferredAccessoires)
|
|
68
80
|
_defineProperty(this, "stashedAccessoires", {});
|
|
81
|
+
//a memory is outdated once something was edited by hand after it was taken (the init jump of a shelf edits nothing)
|
|
82
|
+
_defineProperty(this, "editEpoch", 0);
|
|
83
|
+
_defineProperty(this, "stashEpochs", {});
|
|
69
84
|
this.article = article;
|
|
70
85
|
this.restorePending = !!article.shelfPlanData;
|
|
71
86
|
this.disableCellsByElement = data.DisableCells;
|
|
@@ -115,6 +130,16 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
115
130
|
}
|
|
116
131
|
}
|
|
117
132
|
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* True when an accessoire with this codex can be planned for free on this shelf (an initAcc with noPrice, eg the first
|
|
136
|
+
* Kleiderstange of a Jutzler element).
|
|
137
|
+
*/
|
|
138
|
+
}, {
|
|
139
|
+
key: "canBeFree",
|
|
140
|
+
value: function canBeFree(articleCodex) {
|
|
141
|
+
return this.freeArticlesPossible[articleCodex] !== undefined;
|
|
142
|
+
}
|
|
118
143
|
}, {
|
|
119
144
|
key: "IsVisible",
|
|
120
145
|
get: function get() {
|
|
@@ -190,7 +215,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
190
215
|
key: "onConfigChanged",
|
|
191
216
|
value: (function () {
|
|
192
217
|
var _onConfigChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(variantValues) {
|
|
193
|
-
var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, _i2, _i3, _grid, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
218
|
+
var newHeightSet, gridsTodos, ruleIndexesBefore, i, _i, grid, clearedNow, _i2, stashed, _i3, _grid, own, carryOver, grids, _i4, _grid2$DisableCellsBy, _grid2;
|
|
194
219
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
195
220
|
while (1) switch (_context2.prev = _context2.next) {
|
|
196
221
|
case 0:
|
|
@@ -232,39 +257,42 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
232
257
|
_context2.next = 5;
|
|
233
258
|
break;
|
|
234
259
|
case 14:
|
|
260
|
+
//what this change clears, per grid - carried over into a grid that comes back without an up-to-date memory of its own
|
|
261
|
+
clearedNow = new Map(); //first delete all disables grids then init all the new ones
|
|
235
262
|
_i2 = 0;
|
|
236
|
-
case
|
|
263
|
+
case 16:
|
|
237
264
|
if (!(_i2 < gridsTodos.length)) {
|
|
238
|
-
_context2.next =
|
|
265
|
+
_context2.next = 26;
|
|
239
266
|
break;
|
|
240
267
|
}
|
|
241
268
|
if (gridsTodos[_i2].length) {
|
|
242
|
-
_context2.next =
|
|
269
|
+
_context2.next = 19;
|
|
243
270
|
break;
|
|
244
271
|
}
|
|
245
|
-
return _context2.abrupt("continue",
|
|
246
|
-
case
|
|
272
|
+
return _context2.abrupt("continue", 23);
|
|
273
|
+
case 19:
|
|
247
274
|
//remember the accessoires before they get deleted, so they can be placed again when the grid becomes active again
|
|
248
|
-
this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
|
|
249
|
-
|
|
275
|
+
stashed = this.stashAccessoiresOfGrid(_i2, ruleIndexesBefore[_i2]);
|
|
276
|
+
if (!this.isOnlyInitContent(this.grids[_i2], stashed)) clearedNow.set(_i2, stashed);
|
|
277
|
+
_context2.next = 23;
|
|
250
278
|
return this.grids[_i2].deleteAllAccOfGrid();
|
|
251
|
-
case
|
|
279
|
+
case 23:
|
|
252
280
|
_i2++;
|
|
253
|
-
_context2.next =
|
|
281
|
+
_context2.next = 16;
|
|
254
282
|
break;
|
|
255
|
-
case
|
|
283
|
+
case 26:
|
|
256
284
|
_i3 = 0;
|
|
257
|
-
case
|
|
285
|
+
case 27:
|
|
258
286
|
if (!(_i3 < gridsTodos.length)) {
|
|
259
|
-
_context2.next =
|
|
287
|
+
_context2.next = 65;
|
|
260
288
|
break;
|
|
261
289
|
}
|
|
262
290
|
if (gridsTodos[_i3].length) {
|
|
263
|
-
_context2.next =
|
|
291
|
+
_context2.next = 30;
|
|
264
292
|
break;
|
|
265
293
|
}
|
|
266
|
-
return _context2.abrupt("continue",
|
|
267
|
-
case
|
|
294
|
+
return _context2.abrupt("continue", 62);
|
|
295
|
+
case 30:
|
|
268
296
|
if (gridsTodos[_i3].includes('heightGridRule')) {
|
|
269
297
|
this.creatNewGrid(_i3);
|
|
270
298
|
newHeightSet = true;
|
|
@@ -272,58 +300,109 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
272
300
|
//read the grid after a possible recreate, the replaced one is not the grid that gets filled
|
|
273
301
|
_grid = this.grids[_i3];
|
|
274
302
|
if (!((gridsTodos[_i3].includes('heightGridRule') || gridsTodos[_i3].includes('disableGridRule')) && !_grid.DisabledByRule)) {
|
|
275
|
-
_context2.next =
|
|
303
|
+
_context2.next = 62;
|
|
276
304
|
break;
|
|
277
305
|
}
|
|
278
306
|
if (!this.restorePending) {
|
|
279
|
-
_context2.next =
|
|
307
|
+
_context2.next = 35;
|
|
280
308
|
break;
|
|
281
309
|
}
|
|
282
|
-
return _context2.abrupt("continue",
|
|
283
|
-
case 33:
|
|
284
|
-
_context2.next = 35;
|
|
285
|
-
return this.placeStashedAccessoiresOfGrid(_i3);
|
|
310
|
+
return _context2.abrupt("continue", 62);
|
|
286
311
|
case 35:
|
|
287
|
-
|
|
288
|
-
|
|
312
|
+
//the grid's own memory beats the initAcc while nothing was edited since, else another grid's newer content is carried over
|
|
313
|
+
own = this.takeStashOfGrid(_i3); //only rtv-next carries content over between grids, otherwise the memory is restored as is
|
|
314
|
+
carryOver = this.article.set.CatalogData.divaUseRtvNext;
|
|
315
|
+
_context2.t0 = own && (!own.outdated || !carryOver);
|
|
316
|
+
if (!_context2.t0) {
|
|
317
|
+
_context2.next = 42;
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
_context2.next = 41;
|
|
321
|
+
return this.placeStashedAccessoiresInGrid(_i3, own.accessoires);
|
|
322
|
+
case 41:
|
|
323
|
+
_context2.t0 = _context2.sent;
|
|
324
|
+
case 42:
|
|
325
|
+
if (!_context2.t0) {
|
|
326
|
+
_context2.next = 45;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
clearedNow["delete"](_i3);
|
|
330
|
+
return _context2.abrupt("continue", 62);
|
|
331
|
+
case 45:
|
|
332
|
+
_context2.t1 = carryOver;
|
|
333
|
+
if (!_context2.t1) {
|
|
334
|
+
_context2.next = 50;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
_context2.next = 49;
|
|
338
|
+
return this.placeTransferredAccessoires(_i3, clearedNow);
|
|
339
|
+
case 49:
|
|
340
|
+
_context2.t1 = _context2.sent;
|
|
341
|
+
case 50:
|
|
342
|
+
if (!_context2.t1) {
|
|
343
|
+
_context2.next = 54;
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
_context2.next = 53;
|
|
347
|
+
return this.initAccList(_i3);
|
|
348
|
+
case 53:
|
|
349
|
+
return _context2.abrupt("continue", 62);
|
|
350
|
+
case 54:
|
|
351
|
+
if (!(carryOver && own !== null && own !== void 0 && own.outdated)) {
|
|
352
|
+
_context2.next = 60;
|
|
289
353
|
break;
|
|
290
354
|
}
|
|
291
|
-
|
|
355
|
+
this.logShelfDebug({
|
|
356
|
+
phase: 'configChanged',
|
|
357
|
+
action: 'stashOutdatedRestored',
|
|
358
|
+
gridIndex: _i3,
|
|
359
|
+
detail: 'edited since, but nothing to carry over'
|
|
360
|
+
});
|
|
361
|
+
_context2.next = 58;
|
|
362
|
+
return this.placeStashedAccessoiresInGrid(_i3, own.accessoires);
|
|
363
|
+
case 58:
|
|
364
|
+
if (!_context2.sent) {
|
|
365
|
+
_context2.next = 60;
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
return _context2.abrupt("continue", 62);
|
|
369
|
+
case 60:
|
|
370
|
+
_context2.next = 62;
|
|
292
371
|
return this.initAccList(_i3);
|
|
293
|
-
case
|
|
372
|
+
case 62:
|
|
294
373
|
_i3++;
|
|
295
|
-
_context2.next =
|
|
374
|
+
_context2.next = 27;
|
|
296
375
|
break;
|
|
297
|
-
case
|
|
376
|
+
case 65:
|
|
298
377
|
if (!(!newHeightSet && Object.keys(variantValues).length)) {
|
|
299
|
-
_context2.next =
|
|
378
|
+
_context2.next = 76;
|
|
300
379
|
break;
|
|
301
380
|
}
|
|
302
381
|
grids = this.activeGrids;
|
|
303
382
|
_i4 = 0;
|
|
304
|
-
case
|
|
383
|
+
case 68:
|
|
305
384
|
if (!(_i4 < grids.length)) {
|
|
306
|
-
_context2.next =
|
|
385
|
+
_context2.next = 76;
|
|
307
386
|
break;
|
|
308
387
|
}
|
|
309
388
|
_grid2 = grids[_i4];
|
|
310
389
|
if (!((_grid2$DisableCellsBy = _grid2.DisableCellsByMeasures) !== null && _grid2$DisableCellsBy !== void 0 && _grid2$DisableCellsBy.options.find(function (o) {
|
|
311
390
|
return Object.keys(variantValues).includes('OPT' + o.opt);
|
|
312
391
|
}) || !!_grid2.disableCellsByRules)) {
|
|
313
|
-
_context2.next =
|
|
392
|
+
_context2.next = 73;
|
|
314
393
|
break;
|
|
315
394
|
}
|
|
316
395
|
newHeightSet = true;
|
|
317
|
-
return _context2.abrupt("break",
|
|
318
|
-
case
|
|
396
|
+
return _context2.abrupt("break", 76);
|
|
397
|
+
case 73:
|
|
319
398
|
_i4++;
|
|
320
|
-
_context2.next =
|
|
399
|
+
_context2.next = 68;
|
|
321
400
|
break;
|
|
322
|
-
case
|
|
401
|
+
case 76:
|
|
323
402
|
if (newHeightSet) {
|
|
324
403
|
this.updateDisabledCells();
|
|
325
404
|
}
|
|
326
|
-
case
|
|
405
|
+
case 77:
|
|
327
406
|
case "end":
|
|
328
407
|
return _context2.stop();
|
|
329
408
|
}
|
|
@@ -350,9 +429,146 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
350
429
|
}, {
|
|
351
430
|
key: "stashAccessoiresOfGrid",
|
|
352
431
|
value: function stashAccessoiresOfGrid(gridIndex, ruleIndex) {
|
|
353
|
-
var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex]);
|
|
354
|
-
if (!stashedAccessoires.length) return;
|
|
355
|
-
this.
|
|
432
|
+
var stashedAccessoires = this.collectAccessoiresToStash(this.grids[gridIndex], this.valuesPassedOnByParents());
|
|
433
|
+
if (!stashedAccessoires.length) return stashedAccessoires;
|
|
434
|
+
var stashKey = this.stashKey(gridIndex, ruleIndex);
|
|
435
|
+
this.stashedAccessoires[stashKey] = stashedAccessoires;
|
|
436
|
+
this.stashEpochs[stashKey] = this.editEpoch;
|
|
437
|
+
return stashedAccessoires;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** A hand edit of this shelf or of an accessoire inside it (add, delete, move) - outdates the memories taken before. */
|
|
441
|
+
}, {
|
|
442
|
+
key: "noteUserEdit",
|
|
443
|
+
value: function noteUserEdit() {
|
|
444
|
+
var _this$article$accesso;
|
|
445
|
+
this.editEpoch++;
|
|
446
|
+
(_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();
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** The hand edit noted last changed nothing (eg the drop did not fit) - the memories taken before it stay up to date. */
|
|
450
|
+
}, {
|
|
451
|
+
key: "withdrawUserEdit",
|
|
452
|
+
value: function withdrawUserEdit() {
|
|
453
|
+
var _this$article$accesso2;
|
|
454
|
+
this.editEpoch--;
|
|
455
|
+
(_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();
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* True when a grid held nothing but its own initAcc - eg the Kleiderstange of a shelf that only passes through another
|
|
460
|
+
* width while it initializes. Such content is not carried over, the other grid starts with its own initAcc.
|
|
461
|
+
*/
|
|
462
|
+
}, {
|
|
463
|
+
key: "isOnlyInitContent",
|
|
464
|
+
value: function isOnlyInitContent(grid, stashed) {
|
|
465
|
+
return stashed.every(function (acc) {
|
|
466
|
+
var _grid$InitAccArr;
|
|
467
|
+
return (_grid$InitAccArr = grid.InitAccArr) === null || _grid$InitAccArr === void 0 ? void 0 : _grid$InitAccArr.some(function (init) {
|
|
468
|
+
return init.Codex === acc.articleCodex && init.initRH.includes(acc.cellIndex);
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Fallback for a grid without an up-to-date memory of its own: places what this change cleared from it, else from a grid
|
|
475
|
+
* the change switched off, mapped by family (eg the 50cm tablar comes back as the 100cm one). The cleared grid keeps its
|
|
476
|
+
* own memory.
|
|
477
|
+
* @param cleared what this change cleared, per grid - a placed source is taken out
|
|
478
|
+
* @returns how many were placed
|
|
479
|
+
*/
|
|
480
|
+
}, {
|
|
481
|
+
key: "placeTransferredAccessoires",
|
|
482
|
+
value: (function () {
|
|
483
|
+
var _placeTransferredAccessoires = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(gridIndex, cleared) {
|
|
484
|
+
var _this = this;
|
|
485
|
+
var sources, _iterator, _step, source, accessoires, placed;
|
|
486
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
487
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
488
|
+
case 0:
|
|
489
|
+
//a grid that stays active keeps its content for itself
|
|
490
|
+
sources = [gridIndex].concat(_toConsumableArray(_toConsumableArray(cleared.keys()).filter(function (source) {
|
|
491
|
+
return source !== gridIndex && _this.grids[source].DisabledByRule;
|
|
492
|
+
})));
|
|
493
|
+
_iterator = _createForOfIteratorHelper(sources);
|
|
494
|
+
_context3.prev = 2;
|
|
495
|
+
_iterator.s();
|
|
496
|
+
case 4:
|
|
497
|
+
if ((_step = _iterator.n()).done) {
|
|
498
|
+
_context3.next = 18;
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
source = _step.value;
|
|
502
|
+
accessoires = cleared.get(source);
|
|
503
|
+
if (accessoires) {
|
|
504
|
+
_context3.next = 9;
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
return _context3.abrupt("continue", 16);
|
|
508
|
+
case 9:
|
|
509
|
+
_context3.next = 11;
|
|
510
|
+
return this.placeStashedAccessoiresInGrid(gridIndex, accessoires, true);
|
|
511
|
+
case 11:
|
|
512
|
+
placed = _context3.sent;
|
|
513
|
+
if (placed) {
|
|
514
|
+
_context3.next = 14;
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
return _context3.abrupt("continue", 16);
|
|
518
|
+
case 14:
|
|
519
|
+
cleared["delete"](source);
|
|
520
|
+
return _context3.abrupt("return", placed);
|
|
521
|
+
case 16:
|
|
522
|
+
_context3.next = 4;
|
|
523
|
+
break;
|
|
524
|
+
case 18:
|
|
525
|
+
_context3.next = 23;
|
|
526
|
+
break;
|
|
527
|
+
case 20:
|
|
528
|
+
_context3.prev = 20;
|
|
529
|
+
_context3.t0 = _context3["catch"](2);
|
|
530
|
+
_iterator.e(_context3.t0);
|
|
531
|
+
case 23:
|
|
532
|
+
_context3.prev = 23;
|
|
533
|
+
_iterator.f();
|
|
534
|
+
return _context3.finish(23);
|
|
535
|
+
case 26:
|
|
536
|
+
return _context3.abrupt("return", 0);
|
|
537
|
+
case 27:
|
|
538
|
+
case "end":
|
|
539
|
+
return _context3.stop();
|
|
540
|
+
}
|
|
541
|
+
}, _callee3, this, [[2, 20, 23, 26]]);
|
|
542
|
+
}));
|
|
543
|
+
function placeTransferredAccessoires(_x3, _x4) {
|
|
544
|
+
return _placeTransferredAccessoires.apply(this, arguments);
|
|
545
|
+
}
|
|
546
|
+
return placeTransferredAccessoires;
|
|
547
|
+
}() /** How many accessoires of `articleCodex` or of its family the grid holds, each counted in the cell it starts in. */)
|
|
548
|
+
}, {
|
|
549
|
+
key: "countPlacedOfFamily",
|
|
550
|
+
value: function countPlacedOfFamily(grid, articleCodex) {
|
|
551
|
+
var codexes = [articleCodex].concat(_toConsumableArray(familyMembersOf(articleCodex, this.article.CatalogData.allCatalogArticles)));
|
|
552
|
+
var startsHere = function startsHere(cell) {
|
|
553
|
+
return cell.InUse === cell.Index && !cell.OnlyPlaceHolder;
|
|
554
|
+
};
|
|
555
|
+
return grid.Cells.filter(function (cell) {
|
|
556
|
+
var _cell$Article$article, _cell$Article;
|
|
557
|
+
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 : '');
|
|
558
|
+
}).length;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/** The article itself when the grid allows it, else the members of its family the grid allows. */
|
|
562
|
+
}, {
|
|
563
|
+
key: "familyCandidates",
|
|
564
|
+
value: function familyCandidates(grid, articleCodex) {
|
|
565
|
+
var allowed = grid.getAllArticleRelations();
|
|
566
|
+
var family = familyMembersOf(articleCodex, this.article.CatalogData.allCatalogArticles).filter(function (codex) {
|
|
567
|
+
return codex !== articleCodex;
|
|
568
|
+
});
|
|
569
|
+
return [articleCodex].concat(_toConsumableArray(family)).filter(function (codex) {
|
|
570
|
+
return allowed.includes(codex);
|
|
571
|
+
});
|
|
356
572
|
}
|
|
357
573
|
|
|
358
574
|
/** The memory is per grid and per HeightGridCellCountOnRule entry, false when the grid runs without a matching entry. */
|
|
@@ -365,29 +581,29 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
365
581
|
/**
|
|
366
582
|
* Collects an accessoire of every cell it starts in, including the accessoires of the accessoire itself
|
|
367
583
|
* (eg the drawers of an EINBAU), because those get deleted with their parent as well.
|
|
584
|
+
* @param parentInheritedValues values the parents of the article pass on to the accessoires, per basketId
|
|
368
585
|
*/
|
|
369
586
|
}, {
|
|
370
587
|
key: "collectAccessoiresToStash",
|
|
371
|
-
value: function collectAccessoiresToStash(grid) {
|
|
588
|
+
value: function collectAccessoiresToStash(grid, parentInheritedValues) {
|
|
372
589
|
var stashedAccessoires = [];
|
|
590
|
+
var inheritedValues = ShelfPlanner.addValuesPassedOnBy(this.article, parentInheritedValues);
|
|
373
591
|
for (var i = 0; i < grid.Cells.length; i++) {
|
|
592
|
+
var _accessoire$shelfPlan, _accessoire$shelfPlan2, _inheritedValues$acce;
|
|
374
593
|
var cell = grid.Cells[i];
|
|
375
594
|
var accessoire = cell.Article;
|
|
376
595
|
if (cell.InUse !== i || !accessoire) continue;
|
|
377
596
|
|
|
378
597
|
//the accessoire can be a shelf itself (eg an EINBAU), its own accessoires are grouped by its own grids
|
|
379
|
-
var accessoires = {};
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
accessoires: accessoiresOfGrid
|
|
389
|
-
};
|
|
390
|
-
}
|
|
598
|
+
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 : {};
|
|
599
|
+
|
|
600
|
+
//a value the accessoire only took over from the parent is not remembered: placed again, the accessoire takes over the
|
|
601
|
+
//parent's value of that time, the parent may have changed it in between
|
|
602
|
+
var variantValues = accessoire.VariantValues;
|
|
603
|
+
var inherited = (_inheritedValues$acce = inheritedValues[accessoire.basketId]) !== null && _inheritedValues$acce !== void 0 ? _inheritedValues$acce : {};
|
|
604
|
+
for (var _i5 = 0, _Object$keys = Object.keys(inherited); _i5 < _Object$keys.length; _i5++) {
|
|
605
|
+
var codex = _Object$keys[_i5];
|
|
606
|
+
if (variantValues[codex] === inherited[codex]) delete variantValues[codex];
|
|
391
607
|
}
|
|
392
608
|
stashedAccessoires.push({
|
|
393
609
|
articleCodex: accessoire.articleCodex,
|
|
@@ -395,7 +611,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
395
611
|
noMove: cell.NoMove,
|
|
396
612
|
noDelete: cell.NoDelete,
|
|
397
613
|
quantity: accessoire.quantity,
|
|
398
|
-
variantValues:
|
|
614
|
+
variantValues: variantValues,
|
|
615
|
+
inheritedValues: inherited,
|
|
399
616
|
accessoires: accessoires
|
|
400
617
|
});
|
|
401
618
|
}
|
|
@@ -403,133 +620,231 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
403
620
|
}
|
|
404
621
|
|
|
405
622
|
/**
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
623
|
+
* The values the parents of the article pass on to their accessoires right now, per basketId. A stash can start at an
|
|
624
|
+
* accessoire that is a shelf itself (eg an EINBAU whose own grid gets rebuilt), its accessoires inherit the values of
|
|
625
|
+
* all its parents as well (eg the cabinet colour).
|
|
409
626
|
*/
|
|
410
627
|
}, {
|
|
411
|
-
key: "
|
|
412
|
-
value:
|
|
413
|
-
var
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
function placeStashedAccessoiresOfGrid(_x3) {
|
|
440
|
-
return _placeStashedAccessoiresOfGrid.apply(this, arguments);
|
|
628
|
+
key: "valuesPassedOnByParents",
|
|
629
|
+
value: function valuesPassedOnByParents() {
|
|
630
|
+
var parents = [];
|
|
631
|
+
for (var parent = this.article.accessoireParentArticle; parent; parent = parent.accessoireParentArticle) parents.unshift(parent);
|
|
632
|
+
return parents.reduce(function (inheritedValues, parent) {
|
|
633
|
+
return ShelfPlanner.addValuesPassedOnBy(parent, inheritedValues);
|
|
634
|
+
}, {});
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Adds the values the article passes on to its accessoires with its global options right now (eg the gardenhouse colour of
|
|
639
|
+
* the door) on top of the ones its parents pass on (eg the cabinet colour of the drawers in an EINBAU).
|
|
640
|
+
* @param parentInheritedValues values the parents of the article pass on, per basketId
|
|
641
|
+
* @returns the values passed on per basketId, a new object
|
|
642
|
+
*/
|
|
643
|
+
}, {
|
|
644
|
+
key: "collectOwnAccessoiresToStash",
|
|
645
|
+
value: /** The accessoires of all grids of this shelfplanner, grouped by grid - eg the drawers of an EINBAU that gets replaced. */
|
|
646
|
+
function collectOwnAccessoiresToStash() {
|
|
647
|
+
var parentInheritedValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.valuesPassedOnByParents();
|
|
648
|
+
var accessoires = {};
|
|
649
|
+
for (var j = 0; j < this.grids.length; j++) {
|
|
650
|
+
var grid = this.grids[j];
|
|
651
|
+
var accessoiresOfGrid = this.collectAccessoiresToStash(grid, parentInheritedValues);
|
|
652
|
+
if (accessoiresOfGrid.length) accessoires[grid.ShelfIndex] = {
|
|
653
|
+
ruleIndex: grid.CurrentLoadedRuleIndex,
|
|
654
|
+
accessoires: accessoiresOfGrid
|
|
655
|
+
};
|
|
441
656
|
}
|
|
442
|
-
return
|
|
443
|
-
}
|
|
657
|
+
return accessoires;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Takes the accessoires remembered for the rule entry the grid runs now out of the memory.
|
|
662
|
+
* @param gridIndex grid that became active again
|
|
663
|
+
* @returns the remembered accessoires and whether something was edited by hand since they were taken
|
|
664
|
+
*/
|
|
665
|
+
}, {
|
|
666
|
+
key: "takeStashOfGrid",
|
|
667
|
+
value: function takeStashOfGrid(gridIndex) {
|
|
668
|
+
//a recreated grid already runs its new rule entry, only accessoires planned under that entry belong into it
|
|
669
|
+
var stashKey = this.stashKey(gridIndex, this.grids[gridIndex].CurrentLoadedRuleIndex);
|
|
670
|
+
var accessoires = this.stashedAccessoires[stashKey];
|
|
671
|
+
var outdated = this.stashEpochs[stashKey] !== this.editEpoch;
|
|
672
|
+
//remove it first, a reconfiguration triggered by placing them must not place them a second time
|
|
673
|
+
delete this.stashedAccessoires[stashKey];
|
|
674
|
+
delete this.stashEpochs[stashKey];
|
|
675
|
+
return accessoires !== null && accessoires !== void 0 && accessoires.length ? {
|
|
676
|
+
accessoires: accessoires,
|
|
677
|
+
outdated: outdated
|
|
678
|
+
} : undefined;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Places stashed accessoires that are grouped by gridIndex - used for the accessoires of an accessoire.
|
|
683
|
+
* @param mapByFamily the accessoire was replaced by another member of its family: its grids run their own rule entry, and
|
|
684
|
+
* every accessoire is placed as itself or as the family member the grid allows
|
|
685
|
+
*/
|
|
444
686
|
}, {
|
|
445
687
|
key: "placeStashedAccessoiresByGrid",
|
|
446
688
|
value: (function () {
|
|
447
689
|
var _placeStashedAccessoiresByGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(stashedAccessoires) {
|
|
448
|
-
var
|
|
690
|
+
var mapByFamily,
|
|
691
|
+
gridIndexes,
|
|
692
|
+
i,
|
|
693
|
+
gridIndex,
|
|
694
|
+
grid,
|
|
695
|
+
stashed,
|
|
696
|
+
_args4 = arguments;
|
|
449
697
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
450
698
|
while (1) switch (_context4.prev = _context4.next) {
|
|
451
699
|
case 0:
|
|
700
|
+
mapByFamily = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : false;
|
|
452
701
|
gridIndexes = Object.keys(stashedAccessoires);
|
|
453
702
|
i = 0;
|
|
454
|
-
case
|
|
703
|
+
case 3:
|
|
455
704
|
if (!(i < gridIndexes.length)) {
|
|
456
|
-
_context4.next =
|
|
705
|
+
_context4.next = 19;
|
|
457
706
|
break;
|
|
458
707
|
}
|
|
459
708
|
gridIndex = Number(gridIndexes[i]);
|
|
460
709
|
grid = this.getGridByIndex(gridIndex);
|
|
461
710
|
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
711
|
//runs another entry than the remembered accessoires were planned under keeps them
|
|
463
|
-
if (!(!grid || grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
|
|
464
|
-
_context4.next =
|
|
712
|
+
if (!(!grid || !mapByFamily && grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
|
|
713
|
+
_context4.next = 9;
|
|
465
714
|
break;
|
|
466
715
|
}
|
|
467
|
-
return _context4.abrupt("continue",
|
|
468
|
-
case
|
|
469
|
-
_context4.next =
|
|
716
|
+
return _context4.abrupt("continue", 16);
|
|
717
|
+
case 9:
|
|
718
|
+
_context4.next = 11;
|
|
470
719
|
return grid.deleteAllAccOfGrid();
|
|
471
|
-
case
|
|
472
|
-
_context4.next =
|
|
473
|
-
return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires);
|
|
474
|
-
case
|
|
720
|
+
case 11:
|
|
721
|
+
_context4.next = 13;
|
|
722
|
+
return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires, mapByFamily);
|
|
723
|
+
case 13:
|
|
475
724
|
if (_context4.sent) {
|
|
476
|
-
_context4.next =
|
|
725
|
+
_context4.next = 16;
|
|
477
726
|
break;
|
|
478
727
|
}
|
|
479
|
-
_context4.next =
|
|
728
|
+
_context4.next = 16;
|
|
480
729
|
return this.initAccList(gridIndex);
|
|
481
|
-
case
|
|
730
|
+
case 16:
|
|
482
731
|
i++;
|
|
483
|
-
_context4.next =
|
|
732
|
+
_context4.next = 3;
|
|
484
733
|
break;
|
|
485
|
-
case
|
|
734
|
+
case 19:
|
|
486
735
|
case "end":
|
|
487
736
|
return _context4.stop();
|
|
488
737
|
}
|
|
489
738
|
}, _callee4, this);
|
|
490
739
|
}));
|
|
491
|
-
function placeStashedAccessoiresByGrid(
|
|
740
|
+
function placeStashedAccessoiresByGrid(_x5) {
|
|
492
741
|
return _placeStashedAccessoiresByGrid.apply(this, arguments);
|
|
493
742
|
}
|
|
494
743
|
return placeStashedAccessoiresByGrid;
|
|
495
|
-
}()
|
|
744
|
+
}()
|
|
745
|
+
/**
|
|
746
|
+
* @param mapByFamily an accessoire the grid does not allow is placed as the member of its family the grid allows
|
|
747
|
+
* @returns how many of the stashed accessoires were placed
|
|
748
|
+
*/
|
|
749
|
+
)
|
|
496
750
|
}, {
|
|
497
751
|
key: "placeStashedAccessoiresInGrid",
|
|
498
752
|
value: (function () {
|
|
499
753
|
var _placeStashedAccessoiresInGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(gridIndex, stashedAccessoires) {
|
|
500
|
-
var
|
|
754
|
+
var mapByFamily,
|
|
755
|
+
placedAccessoires,
|
|
756
|
+
grid,
|
|
757
|
+
i,
|
|
758
|
+
stashed,
|
|
759
|
+
result,
|
|
760
|
+
_iterator2,
|
|
761
|
+
_step2,
|
|
762
|
+
articleCodex,
|
|
763
|
+
fitResult,
|
|
764
|
+
accessoire,
|
|
765
|
+
replaced,
|
|
766
|
+
variantValues,
|
|
767
|
+
_args5 = arguments;
|
|
501
768
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
502
769
|
while (1) switch (_context5.prev = _context5.next) {
|
|
503
770
|
case 0:
|
|
771
|
+
mapByFamily = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : false;
|
|
504
772
|
placedAccessoires = 0;
|
|
505
773
|
grid = this.getGridByIndex(gridIndex);
|
|
506
774
|
if (grid) {
|
|
507
|
-
_context5.next =
|
|
775
|
+
_context5.next = 5;
|
|
508
776
|
break;
|
|
509
777
|
}
|
|
510
778
|
return _context5.abrupt("return", placedAccessoires);
|
|
511
|
-
case 4:
|
|
512
|
-
i = 0;
|
|
513
779
|
case 5:
|
|
780
|
+
i = 0;
|
|
781
|
+
case 6:
|
|
514
782
|
if (!(i < stashedAccessoires.length)) {
|
|
515
|
-
_context5.next =
|
|
783
|
+
_context5.next = 53;
|
|
516
784
|
break;
|
|
517
785
|
}
|
|
518
786
|
stashed = stashedAccessoires[i];
|
|
519
|
-
|
|
520
|
-
|
|
787
|
+
result = false;
|
|
788
|
+
_iterator2 = _createForOfIteratorHelper(mapByFamily ? this.familyCandidates(grid, stashed.articleCodex) : [stashed.articleCodex]);
|
|
789
|
+
_context5.prev = 10;
|
|
790
|
+
_iterator2.s();
|
|
791
|
+
case 12:
|
|
792
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
793
|
+
_context5.next = 23;
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
articleCodex = _step2.value;
|
|
797
|
+
grid.ActAccessoire = articleCodex;
|
|
798
|
+
_context5.next = 17;
|
|
521
799
|
return setHandlerInstance.addAccessorieOnShelfPlanner(this.article.set, gridIndex, stashed.cellIndex, this.article.basketId, {
|
|
522
800
|
noMove: stashed.noMove,
|
|
523
801
|
noDelete: stashed.noDelete,
|
|
524
|
-
byInit: true
|
|
802
|
+
byInit: true,
|
|
803
|
+
onlyOfferedCells: mapByFamily
|
|
525
804
|
});
|
|
526
|
-
case
|
|
805
|
+
case 17:
|
|
527
806
|
result = _context5.sent;
|
|
528
807
|
grid.ActAccessoire = undefined;
|
|
529
|
-
|
|
808
|
+
if (!isPlaced(result)) {
|
|
809
|
+
_context5.next = 21;
|
|
810
|
+
break;
|
|
811
|
+
}
|
|
812
|
+
return _context5.abrupt("break", 23);
|
|
813
|
+
case 21:
|
|
814
|
+
_context5.next = 12;
|
|
815
|
+
break;
|
|
816
|
+
case 23:
|
|
817
|
+
_context5.next = 28;
|
|
818
|
+
break;
|
|
819
|
+
case 25:
|
|
820
|
+
_context5.prev = 25;
|
|
821
|
+
_context5.t0 = _context5["catch"](10);
|
|
822
|
+
_iterator2.e(_context5.t0);
|
|
823
|
+
case 28:
|
|
824
|
+
_context5.prev = 28;
|
|
825
|
+
_iterator2.f();
|
|
826
|
+
return _context5.finish(28);
|
|
827
|
+
case 31:
|
|
828
|
+
//a failed fit still returns its result, with the temporary article already deleted
|
|
829
|
+
fitResult = mapByFamily ? isPlaced(result) ? result : undefined : result === false || result.index === undefined ? undefined : result;
|
|
530
830
|
accessoire = fitResult === null || fitResult === void 0 ? void 0 : fitResult.accessoire;
|
|
831
|
+
if (!(mapByFamily && (!fitResult || !accessoire))) {
|
|
832
|
+
_context5.next = 36;
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
//carrying over is a best effort - what has no fitting family member in this grid is left out
|
|
836
|
+
this.logShelfDebug({
|
|
837
|
+
phase: 'configChanged',
|
|
838
|
+
action: 'accessoryNotTransferred',
|
|
839
|
+
gridIndex: gridIndex,
|
|
840
|
+
cellIndex: stashed.cellIndex,
|
|
841
|
+
articleCodex: stashed.articleCodex,
|
|
842
|
+
detail: 'no member of its family fits into this grid'
|
|
843
|
+
});
|
|
844
|
+
return _context5.abrupt("continue", 50);
|
|
845
|
+
case 36:
|
|
531
846
|
if (!(!fitResult || !accessoire)) {
|
|
532
|
-
_context5.next =
|
|
847
|
+
_context5.next = 39;
|
|
533
848
|
break;
|
|
534
849
|
}
|
|
535
850
|
LOG.error(new DivaError('shelfaccessoire of a switched off grid does not fit anymore and gets dropped', {
|
|
@@ -543,50 +858,91 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
543
858
|
parentBasketId: this.article.basketId
|
|
544
859
|
}
|
|
545
860
|
}));
|
|
546
|
-
return _context5.abrupt("continue",
|
|
547
|
-
case
|
|
861
|
+
return _context5.abrupt("continue", 50);
|
|
862
|
+
case 39:
|
|
548
863
|
accessoire.quantity = stashed.quantity;
|
|
549
864
|
placedAccessoires++;
|
|
550
|
-
|
|
551
|
-
|
|
865
|
+
replaced = accessoire.articleCodex !== stashed.articleCodex;
|
|
866
|
+
if (mapByFamily) this.logShelfDebug({
|
|
867
|
+
phase: 'configChanged',
|
|
868
|
+
action: 'accessoryTransferred',
|
|
869
|
+
gridIndex: gridIndex,
|
|
870
|
+
cellIndex: stashed.cellIndex,
|
|
871
|
+
articleCodex: accessoire.articleCodex,
|
|
872
|
+
detail: replaced ? "as family member of ".concat(stashed.articleCodex) : 'same article'
|
|
873
|
+
});
|
|
874
|
+
variantValues = this.valuesToPlaceAgain(stashed, accessoire);
|
|
875
|
+
if (!Object.keys(variantValues).length) {
|
|
876
|
+
_context5.next = 47;
|
|
552
877
|
break;
|
|
553
878
|
}
|
|
554
|
-
_context5.next =
|
|
555
|
-
return articleHandlerInstance.updateCfgValues(accessoire,
|
|
556
|
-
case
|
|
879
|
+
_context5.next = 47;
|
|
880
|
+
return articleHandlerInstance.updateCfgValues(accessoire, variantValues, {});
|
|
881
|
+
case 47:
|
|
557
882
|
if (!accessoire.shelfPlanner) {
|
|
558
|
-
_context5.next =
|
|
883
|
+
_context5.next = 50;
|
|
559
884
|
break;
|
|
560
885
|
}
|
|
561
|
-
_context5.next =
|
|
562
|
-
return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires);
|
|
563
|
-
case
|
|
886
|
+
_context5.next = 50;
|
|
887
|
+
return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires, mapByFamily || replaced);
|
|
888
|
+
case 50:
|
|
564
889
|
i++;
|
|
565
|
-
_context5.next =
|
|
890
|
+
_context5.next = 6;
|
|
566
891
|
break;
|
|
567
|
-
case
|
|
892
|
+
case 53:
|
|
568
893
|
return _context5.abrupt("return", placedAccessoires);
|
|
569
|
-
case
|
|
894
|
+
case 54:
|
|
570
895
|
case "end":
|
|
571
896
|
return _context5.stop();
|
|
572
897
|
}
|
|
573
|
-
}, _callee5, this);
|
|
898
|
+
}, _callee5, this, [[10, 25, 28, 31]]);
|
|
574
899
|
}));
|
|
575
|
-
function placeStashedAccessoiresInGrid(
|
|
900
|
+
function placeStashedAccessoiresInGrid(_x6, _x7) {
|
|
576
901
|
return _placeStashedAccessoiresInGrid.apply(this, arguments);
|
|
577
902
|
}
|
|
578
903
|
return placeStashedAccessoiresInGrid;
|
|
579
904
|
}()
|
|
905
|
+
/**
|
|
906
|
+
* The remembered values of a stashed accessoire to set on the accessoire that was placed for it. A value of its own (eg an
|
|
907
|
+
* anthracite door) does not come back when the parent passes on another value than at stash time (eg the gardenhouse turned
|
|
908
|
+
* dark grey): an accessoire that stays in place takes over the parent's new value as well (updateAccessoriesFromGlobalOption).
|
|
909
|
+
* @param accessoire the accessoire placed for the stashed one, the values the parents pass on to it now are looked up by its basketId
|
|
910
|
+
*/
|
|
911
|
+
)
|
|
912
|
+
}, {
|
|
913
|
+
key: "valuesToPlaceAgain",
|
|
914
|
+
value: function valuesToPlaceAgain(stashed, accessoire) {
|
|
915
|
+
var _ShelfPlanner$addValu;
|
|
916
|
+
var variantValues = _objectSpread({}, stashed.variantValues);
|
|
917
|
+
var ownInheritableCodices = Object.keys(stashed.inheritedValues).filter(function (codex) {
|
|
918
|
+
return codex in variantValues;
|
|
919
|
+
});
|
|
920
|
+
if (!ownInheritableCodices.length) return variantValues;
|
|
921
|
+
var inheritedNow = (_ShelfPlanner$addValu = ShelfPlanner.addValuesPassedOnBy(this.article, this.valuesPassedOnByParents())[accessoire.basketId]) !== null && _ShelfPlanner$addValu !== void 0 ? _ShelfPlanner$addValu : {};
|
|
922
|
+
var _iterator3 = _createForOfIteratorHelper(ownInheritableCodices),
|
|
923
|
+
_step3;
|
|
924
|
+
try {
|
|
925
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
926
|
+
var codex = _step3.value;
|
|
927
|
+
if (inheritedNow[codex] !== undefined && inheritedNow[codex] !== stashed.inheritedValues[codex]) delete variantValues[codex];
|
|
928
|
+
}
|
|
929
|
+
} catch (err) {
|
|
930
|
+
_iterator3.e(err);
|
|
931
|
+
} finally {
|
|
932
|
+
_iterator3.f();
|
|
933
|
+
}
|
|
934
|
+
return variantValues;
|
|
935
|
+
}
|
|
936
|
+
|
|
580
937
|
/**
|
|
581
938
|
* runs through the InitAccArr and initialized all the accessoires eg: Kleiderstange gets placed
|
|
582
939
|
* 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
|
|
583
940
|
*/
|
|
584
|
-
)
|
|
585
941
|
}, {
|
|
586
942
|
key: "initAccList",
|
|
587
943
|
value: (function () {
|
|
588
944
|
var _initAccList = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(gridIndex) {
|
|
589
|
-
var grids, i, grid, j, initAcc, k, _this$article$
|
|
945
|
+
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;
|
|
590
946
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
591
947
|
while (1) switch (_context6.prev = _context6.next) {
|
|
592
948
|
case 0:
|
|
@@ -594,7 +950,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
594
950
|
i = 0;
|
|
595
951
|
case 2:
|
|
596
952
|
if (!(i < grids.length)) {
|
|
597
|
-
_context6.next =
|
|
953
|
+
_context6.next = 43;
|
|
598
954
|
break;
|
|
599
955
|
}
|
|
600
956
|
grid = grids[i];
|
|
@@ -602,25 +958,31 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
602
958
|
_context6.next = 6;
|
|
603
959
|
break;
|
|
604
960
|
}
|
|
605
|
-
return _context6.abrupt("continue",
|
|
961
|
+
return _context6.abrupt("continue", 40);
|
|
606
962
|
case 6:
|
|
607
963
|
if (grid.InitAccArr) {
|
|
608
964
|
_context6.next = 8;
|
|
609
965
|
break;
|
|
610
966
|
}
|
|
611
|
-
return _context6.abrupt("continue",
|
|
967
|
+
return _context6.abrupt("continue", 40);
|
|
612
968
|
case 8:
|
|
969
|
+
//only tops up: what the grid held of a family before (eg a carried over Kleiderstange in another cell) counts once
|
|
970
|
+
heldByFamily = new Map();
|
|
613
971
|
j = 0;
|
|
614
|
-
case
|
|
972
|
+
case 10:
|
|
615
973
|
if (!(j < grid.InitAccArr.length)) {
|
|
616
|
-
_context6.next =
|
|
974
|
+
_context6.next = 40;
|
|
617
975
|
break;
|
|
618
976
|
}
|
|
619
977
|
initAcc = grid.InitAccArr[j];
|
|
620
|
-
|
|
621
|
-
|
|
978
|
+
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;
|
|
979
|
+
held = (_heldByFamily$get = heldByFamily.get(family)) !== null && _heldByFamily$get !== void 0 ? _heldByFamily$get : this.countPlacedOfFamily(grid, initAcc.Codex);
|
|
980
|
+
placed = Math.min(held, initAcc.initRH.length);
|
|
981
|
+
heldByFamily.set(family, held - placed);
|
|
982
|
+
k = placed;
|
|
983
|
+
case 17:
|
|
622
984
|
if (!(k < initAcc.initRH.length)) {
|
|
623
|
-
_context6.next =
|
|
985
|
+
_context6.next = 37;
|
|
624
986
|
break;
|
|
625
987
|
}
|
|
626
988
|
grid.ActAccessoire = initAcc.Codex;
|
|
@@ -632,56 +994,58 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
632
994
|
articleCodex: initAcc.Codex,
|
|
633
995
|
detail: 'from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed'
|
|
634
996
|
});
|
|
635
|
-
_context6.next =
|
|
997
|
+
_context6.next = 22;
|
|
636
998
|
return setHandlerInstance.addAccessorieOnShelfPlanner(this.article.set, grid.ShelfIndex, initAcc.initRH[k], grid.basketId, {
|
|
637
999
|
noMove: initAcc.noMove,
|
|
638
1000
|
noDelete: initAcc.noDelete,
|
|
639
1001
|
byInit: true
|
|
640
1002
|
});
|
|
641
|
-
case
|
|
642
|
-
|
|
643
|
-
|
|
1003
|
+
case 22:
|
|
1004
|
+
//UseCase Atlantis Kleiderstange gets deleted on parent - not by a dry run, its parent is the real shelf it previews in
|
|
1005
|
+
parentIsReal = !setHandlerInstance.isDryRunArticle(this.article.accessoireParentArticle);
|
|
1006
|
+
if (!(initAcc.replaceFromParent && !(setHandlerInstance.isDryRunArticle(this.article) && parentIsReal))) {
|
|
1007
|
+
_context6.next = 33;
|
|
644
1008
|
break;
|
|
645
1009
|
}
|
|
646
1010
|
shelfId = this.getShelfParentShelfId();
|
|
647
|
-
if (!(shelfId && (_this$article$
|
|
648
|
-
_context6.next =
|
|
1011
|
+
if (!(shelfId && (_this$article$accesso3 = this.article.accessoireParentArticle) !== null && _this$article$accesso3 !== void 0 && _this$article$accesso3.shelfPlanner)) {
|
|
1012
|
+
_context6.next = 33;
|
|
649
1013
|
break;
|
|
650
1014
|
}
|
|
651
1015
|
accessoires = this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(shelfId, initAcc.Codex);
|
|
652
1016
|
if (!(accessoires && accessoires.length > 0)) {
|
|
653
|
-
_context6.next =
|
|
1017
|
+
_context6.next = 33;
|
|
654
1018
|
break;
|
|
655
1019
|
}
|
|
656
1020
|
accessoireToDelete = accessoires[0];
|
|
657
1021
|
rh = (_accessoireToDelete$s = accessoireToDelete.shelfPlanner) === null || _accessoireToDelete$s === void 0 ? void 0 : _accessoireToDelete$s.getRHOnParentArticle();
|
|
658
1022
|
if (!(rh !== undefined && accessoireToDelete.relatedToShelfGrid !== undefined)) {
|
|
659
|
-
_context6.next =
|
|
1023
|
+
_context6.next = 33;
|
|
660
1024
|
break;
|
|
661
1025
|
}
|
|
662
|
-
_context6.next =
|
|
1026
|
+
_context6.next = 33;
|
|
663
1027
|
return setHandlerInstance.deleteAccessorieOnShelfPlanner(this.article.set, accessoireToDelete.relatedToShelfGrid, rh, this.article.accessoireParentArticle.basketId);
|
|
664
|
-
case
|
|
1028
|
+
case 33:
|
|
665
1029
|
grid.ActAccessoire = undefined;
|
|
666
|
-
case
|
|
1030
|
+
case 34:
|
|
667
1031
|
k++;
|
|
668
|
-
_context6.next =
|
|
1032
|
+
_context6.next = 17;
|
|
669
1033
|
break;
|
|
670
|
-
case
|
|
1034
|
+
case 37:
|
|
671
1035
|
j++;
|
|
672
|
-
_context6.next =
|
|
1036
|
+
_context6.next = 10;
|
|
673
1037
|
break;
|
|
674
|
-
case
|
|
1038
|
+
case 40:
|
|
675
1039
|
i++;
|
|
676
1040
|
_context6.next = 2;
|
|
677
1041
|
break;
|
|
678
|
-
case
|
|
1042
|
+
case 43:
|
|
679
1043
|
case "end":
|
|
680
1044
|
return _context6.stop();
|
|
681
1045
|
}
|
|
682
1046
|
}, _callee6, this);
|
|
683
1047
|
}));
|
|
684
|
-
function initAccList(
|
|
1048
|
+
function initAccList(_x8) {
|
|
685
1049
|
return _initAccList.apply(this, arguments);
|
|
686
1050
|
}
|
|
687
1051
|
return initAccList;
|
|
@@ -711,7 +1075,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
711
1075
|
key: "triggerVisibility",
|
|
712
1076
|
value: function () {
|
|
713
1077
|
var _triggerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(gridGroup) {
|
|
714
|
-
var toCleanOptions, toUpdateOptions, i, grid,
|
|
1078
|
+
var toCleanOptions, toUpdateOptions, i, grid, _i6, option, visitOptionState;
|
|
715
1079
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
716
1080
|
while (1) switch (_context7.prev = _context7.next) {
|
|
717
1081
|
case 0:
|
|
@@ -747,13 +1111,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
747
1111
|
_context7.next = 3;
|
|
748
1112
|
break;
|
|
749
1113
|
case 13:
|
|
750
|
-
|
|
1114
|
+
_i6 = 0;
|
|
751
1115
|
case 14:
|
|
752
|
-
if (!(
|
|
1116
|
+
if (!(_i6 < [].concat(toUpdateOptions, toCleanOptions).length)) {
|
|
753
1117
|
_context7.next = 23;
|
|
754
1118
|
break;
|
|
755
1119
|
}
|
|
756
|
-
option = [].concat(toUpdateOptions, toCleanOptions)[
|
|
1120
|
+
option = [].concat(toUpdateOptions, toCleanOptions)[_i6];
|
|
757
1121
|
visitOptionState = this.article.getArticleOptionState((!this.article.CatalogData.isIDMFormat ? 'OPT' : '') + option);
|
|
758
1122
|
if (!visitOptionState) {
|
|
759
1123
|
_context7.next = 20;
|
|
@@ -762,7 +1126,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
762
1126
|
_context7.next = 20;
|
|
763
1127
|
return articleHandlerInstance.updateOption(this.article, visitOptionState.optionCodex, toUpdateOptions.includes(option) ? 'OPVMIT' : 'OPVOHNE');
|
|
764
1128
|
case 20:
|
|
765
|
-
|
|
1129
|
+
_i6++;
|
|
766
1130
|
_context7.next = 14;
|
|
767
1131
|
break;
|
|
768
1132
|
case 23:
|
|
@@ -771,7 +1135,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
771
1135
|
}
|
|
772
1136
|
}, _callee7, this);
|
|
773
1137
|
}));
|
|
774
|
-
function triggerVisibility(
|
|
1138
|
+
function triggerVisibility(_x9) {
|
|
775
1139
|
return _triggerVisibility.apply(this, arguments);
|
|
776
1140
|
}
|
|
777
1141
|
return triggerVisibility;
|
|
@@ -858,6 +1222,21 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
858
1222
|
}
|
|
859
1223
|
}
|
|
860
1224
|
|
|
1225
|
+
/**
|
|
1226
|
+
* `tryFitOnShelfOfGrid` limited to the cells `getFreeSpacesOfAccessoire` offers (an active grid, room above and below,
|
|
1227
|
+
* neighbour and montage rules) - for a placement nobody picked by hand: a carry-over or a family swap.
|
|
1228
|
+
*/
|
|
1229
|
+
}, {
|
|
1230
|
+
key: "tryFitOnOfferedCellOfGrid",
|
|
1231
|
+
value: function tryFitOnOfferedCellOfGrid(gridIndex, cellIndex, accessoire) {
|
|
1232
|
+
var fit = this.tryFitOnShelfOfGrid(gridIndex, cellIndex, accessoire);
|
|
1233
|
+
if (fit === false || fit.index === undefined || fit.type === 'doesNotFit' || fit.type.startsWith('notAllowed')) return fit;
|
|
1234
|
+
return this.grids[gridIndex].getFreeSpacesOfAccessoire(accessoire).includes(fit.index) ? fit : {
|
|
1235
|
+
type: 'doesNotFit',
|
|
1236
|
+
size: fit.size
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
|
|
861
1240
|
/**
|
|
862
1241
|
*
|
|
863
1242
|
* @param gridName
|
|
@@ -950,7 +1329,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
950
1329
|
}
|
|
951
1330
|
}, _callee9, this);
|
|
952
1331
|
}));
|
|
953
|
-
function deleteAccessoireOfCellInGrid(
|
|
1332
|
+
function deleteAccessoireOfCellInGrid(_x10, _x11) {
|
|
954
1333
|
return _deleteAccessoireOfCellInGrid.apply(this, arguments);
|
|
955
1334
|
}
|
|
956
1335
|
return deleteAccessoireOfCellInGrid;
|
|
@@ -986,7 +1365,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
986
1365
|
key: "handleDeleteTakePlaceOnOtherGrids",
|
|
987
1366
|
value: (function () {
|
|
988
1367
|
var _handleDeleteTakePlaceOnOtherGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(gridIndex, cellIndex, accessoire) {
|
|
989
|
-
var i, _cell$
|
|
1368
|
+
var i, _cell$Article2, cell, _i7, _cell$Article3, _cell, _i8;
|
|
990
1369
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
991
1370
|
while (1) switch (_context10.prev = _context10.next) {
|
|
992
1371
|
case 0:
|
|
@@ -999,15 +1378,15 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
999
1378
|
if (accessoire.shelfHeightAbove) {
|
|
1000
1379
|
for (i = 0; i < accessoire.shelfHeightAbove; i++) {
|
|
1001
1380
|
cell = this.grids[gridIndex].Cells[cellIndex + accessoire.shelfHeight + i];
|
|
1002
|
-
if ((cell === null || cell === void 0 || (_cell$
|
|
1381
|
+
if ((cell === null || cell === void 0 || (_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) === accessoire.basketId) {
|
|
1003
1382
|
cell.ClearInUse();
|
|
1004
1383
|
}
|
|
1005
1384
|
}
|
|
1006
1385
|
}
|
|
1007
1386
|
if (accessoire.shelfHeightBelow) {
|
|
1008
|
-
for (
|
|
1009
|
-
_cell = this.grids[gridIndex].Cells[cellIndex - (
|
|
1010
|
-
if ((_cell === null || _cell === void 0 || (_cell$
|
|
1387
|
+
for (_i7 = 0; _i7 < accessoire.shelfHeightBelow; _i7++) {
|
|
1388
|
+
_cell = this.grids[gridIndex].Cells[cellIndex - (_i7 + 1)];
|
|
1389
|
+
if ((_cell === null || _cell === void 0 || (_cell$Article3 = _cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId) === accessoire.basketId) {
|
|
1011
1390
|
_cell.ClearInUse();
|
|
1012
1391
|
}
|
|
1013
1392
|
}
|
|
@@ -1016,22 +1395,22 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1016
1395
|
_context10.next = 14;
|
|
1017
1396
|
break;
|
|
1018
1397
|
}
|
|
1019
|
-
|
|
1398
|
+
_i8 = 0;
|
|
1020
1399
|
case 6:
|
|
1021
|
-
if (!(
|
|
1400
|
+
if (!(_i8 < this.grids.length)) {
|
|
1022
1401
|
_context10.next = 14;
|
|
1023
1402
|
break;
|
|
1024
1403
|
}
|
|
1025
|
-
if (!(
|
|
1404
|
+
if (!(_i8 === gridIndex)) {
|
|
1026
1405
|
_context10.next = 9;
|
|
1027
1406
|
break;
|
|
1028
1407
|
}
|
|
1029
1408
|
return _context10.abrupt("continue", 11);
|
|
1030
1409
|
case 9:
|
|
1031
1410
|
_context10.next = 11;
|
|
1032
|
-
return this.grids[
|
|
1411
|
+
return this.grids[_i8].deleteAccessoireInCells(cellIndex);
|
|
1033
1412
|
case 11:
|
|
1034
|
-
|
|
1413
|
+
_i8++;
|
|
1035
1414
|
_context10.next = 6;
|
|
1036
1415
|
break;
|
|
1037
1416
|
case 14:
|
|
@@ -1040,7 +1419,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1040
1419
|
}
|
|
1041
1420
|
}, _callee10, this);
|
|
1042
1421
|
}));
|
|
1043
|
-
function handleDeleteTakePlaceOnOtherGrids(
|
|
1422
|
+
function handleDeleteTakePlaceOnOtherGrids(_x12, _x13, _x14) {
|
|
1044
1423
|
return _handleDeleteTakePlaceOnOtherGrids.apply(this, arguments);
|
|
1045
1424
|
}
|
|
1046
1425
|
return handleDeleteTakePlaceOnOtherGrids;
|
|
@@ -1105,7 +1484,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1105
1484
|
}
|
|
1106
1485
|
}, _callee11, this);
|
|
1107
1486
|
}));
|
|
1108
|
-
function addAccessoireInCellInGrid(
|
|
1487
|
+
function addAccessoireInCellInGrid(_x15, _x16, _x17, _x18, _x19) {
|
|
1109
1488
|
return _addAccessoireInCellInGrid.apply(this, arguments);
|
|
1110
1489
|
}
|
|
1111
1490
|
return addAccessoireInCellInGrid;
|
|
@@ -1211,10 +1590,10 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1211
1590
|
});
|
|
1212
1591
|
if (grid.ShelfIndex != i) cells[j].gridIndex = grid.ShelfIndex;
|
|
1213
1592
|
if (cell.InUse == j) {
|
|
1214
|
-
var _cell$
|
|
1593
|
+
var _cell$Article4, _cell$Article5;
|
|
1215
1594
|
cells[j].usedArticleData = {
|
|
1216
|
-
Codex: (_cell$
|
|
1217
|
-
BasketID: (_cell$
|
|
1595
|
+
Codex: (_cell$Article4 = cell.Article) === null || _cell$Article4 === void 0 ? void 0 : _cell$Article4.articleCodex,
|
|
1596
|
+
BasketID: (_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId
|
|
1218
1597
|
};
|
|
1219
1598
|
}
|
|
1220
1599
|
}
|
|
@@ -1240,13 +1619,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1240
1619
|
for (var j = 0; j < grid.Cells.length; j++) {
|
|
1241
1620
|
var cell = grid.Cells[j];
|
|
1242
1621
|
if (cell.InUse == j && cell.Article && cell.Article.model3DName && !cell.OnlyPlaceHolder) {
|
|
1243
|
-
var _cell$
|
|
1622
|
+
var _cell$Article6;
|
|
1244
1623
|
var cellIndex = cell.Index;
|
|
1245
1624
|
if (grid.Direction == 'vertikal' && this.article.CatalogData.useShelfPlannerRTV != true) {
|
|
1246
1625
|
cellIndex = grid.Cells.length - 1 - cell.Index;
|
|
1247
1626
|
}
|
|
1248
1627
|
accessoires.push({
|
|
1249
|
-
basketId: (_cell$
|
|
1628
|
+
basketId: (_cell$Article6 = cell.Article) === null || _cell$Article6 === void 0 ? void 0 : _cell$Article6.basketId,
|
|
1250
1629
|
gridId: grid.ShelfIndex,
|
|
1251
1630
|
gridName: grid.GridName,
|
|
1252
1631
|
model: cell.Article.model3DName,
|
|
@@ -1267,8 +1646,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1267
1646
|
}, {
|
|
1268
1647
|
key: "getShelfElementId",
|
|
1269
1648
|
value: function getShelfElementId() {
|
|
1270
|
-
var _this$article$
|
|
1271
|
-
if ((_this$article$
|
|
1649
|
+
var _this$article$accesso4;
|
|
1650
|
+
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) {
|
|
1272
1651
|
var rh = this.getRHOnParentArticle();
|
|
1273
1652
|
var parentId = this.article.accessoireParentArticle.shelfPlanner.getShelfElementId();
|
|
1274
1653
|
return parentId + '.' + this.article.relatedToShelfGrid + '.' + rh;
|
|
@@ -1283,13 +1662,13 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1283
1662
|
}, {
|
|
1284
1663
|
key: "getRHOnParentArticle",
|
|
1285
1664
|
value: function getRHOnParentArticle() {
|
|
1286
|
-
var _this$article$
|
|
1287
|
-
|
|
1665
|
+
var _this$article$accesso5,
|
|
1666
|
+
_this2 = this;
|
|
1288
1667
|
if (this.article.relatedToShelfGrid === undefined) return undefined;
|
|
1289
|
-
return (_this$article$
|
|
1668
|
+
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) {
|
|
1290
1669
|
var _item$Article;
|
|
1291
|
-
return ((_item$Article = item.Article) === null || _item$Article === void 0 ? void 0 : _item$Article.basketId) ==
|
|
1292
|
-
})) === null || _this$article$
|
|
1670
|
+
return ((_item$Article = item.Article) === null || _item$Article === void 0 ? void 0 : _item$Article.basketId) == _this2.article.basketId;
|
|
1671
|
+
})) === null || _this$article$accesso5 === void 0 ? void 0 : _this$article$accesso5.InUse;
|
|
1293
1672
|
}
|
|
1294
1673
|
|
|
1295
1674
|
/**
|
|
@@ -1352,8 +1731,8 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1352
1731
|
}, {
|
|
1353
1732
|
key: "getShelfParentShelfId",
|
|
1354
1733
|
value: function getShelfParentShelfId() {
|
|
1355
|
-
var _this$article$
|
|
1356
|
-
if (this.article.relatedToShelfGrid !== undefined) return (_this$article$
|
|
1734
|
+
var _this$article$accesso6;
|
|
1735
|
+
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;
|
|
1357
1736
|
return undefined;
|
|
1358
1737
|
}
|
|
1359
1738
|
|
|
@@ -1413,7 +1792,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1413
1792
|
key: "disableCellsByDockedShelfs",
|
|
1414
1793
|
value: (function () {
|
|
1415
1794
|
var _disableCellsByDockedShelfs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(count) {
|
|
1416
|
-
var
|
|
1795
|
+
var _this3 = this;
|
|
1417
1796
|
var grids, _loop2, i;
|
|
1418
1797
|
return _regeneratorRuntime.wrap(function _callee12$(_context13) {
|
|
1419
1798
|
while (1) switch (_context13.prev = _context13.next) {
|
|
@@ -1437,7 +1816,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1437
1816
|
newlyEnabled = grid.Cells.filter(function (cell, j) {
|
|
1438
1817
|
return cell.IsDisabled && !toDisableCells.includes(j);
|
|
1439
1818
|
}).length;
|
|
1440
|
-
if (newlyDisabled.length || newlyEnabled)
|
|
1819
|
+
if (newlyDisabled.length || newlyEnabled) _this3.logShelfDebug({
|
|
1441
1820
|
phase: 'docking',
|
|
1442
1821
|
action: 'disabledCellsUpdated',
|
|
1443
1822
|
gridIndex: grid.ShelfIndex,
|
|
@@ -1455,7 +1834,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1455
1834
|
break;
|
|
1456
1835
|
}
|
|
1457
1836
|
_context12.next = 14;
|
|
1458
|
-
return setHandlerInstance.deleteAccessorieOnShelfPlanner(
|
|
1837
|
+
return setHandlerInstance.deleteAccessorieOnShelfPlanner(_this3.article.set, grid.ShelfIndex, cell.InUse, grid.basketId);
|
|
1459
1838
|
case 14:
|
|
1460
1839
|
cell.IsDisabled = true;
|
|
1461
1840
|
case 15:
|
|
@@ -1503,7 +1882,7 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1503
1882
|
}
|
|
1504
1883
|
}, _callee12, this);
|
|
1505
1884
|
}));
|
|
1506
|
-
function disableCellsByDockedShelfs(
|
|
1885
|
+
function disableCellsByDockedShelfs(_x20) {
|
|
1507
1886
|
return _disableCellsByDockedShelfs.apply(this, arguments);
|
|
1508
1887
|
}
|
|
1509
1888
|
return disableCellsByDockedShelfs;
|
|
@@ -1576,6 +1955,24 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
1576
1955
|
}
|
|
1577
1956
|
return undefined;
|
|
1578
1957
|
}
|
|
1958
|
+
}], [{
|
|
1959
|
+
key: "addValuesPassedOnBy",
|
|
1960
|
+
value: function addValuesPassedOnBy(article, parentInheritedValues) {
|
|
1961
|
+
var globalValues = {};
|
|
1962
|
+
for (var _i9 = 0, _Object$keys2 = Object.keys(article.getGlobalOptions()); _i9 < _Object$keys2.length; _i9++) {
|
|
1963
|
+
var _article$getArticleOp;
|
|
1964
|
+
var opt = _Object$keys2[_i9];
|
|
1965
|
+
var valCodex = (_article$getArticleOp = article.getArticleOptionState(opt)) === null || _article$getArticleOp === void 0 ? void 0 : _article$getArticleOp.valCodex;
|
|
1966
|
+
if (valCodex) globalValues[opt] = valCodex;
|
|
1967
|
+
}
|
|
1968
|
+
var inheritedValues = _objectSpread({}, parentInheritedValues);
|
|
1969
|
+
var ownInheritedValues = article.getAccessoriesToChangeFromGlobalOption(globalValues);
|
|
1970
|
+
for (var _i10 = 0, _Object$keys3 = Object.keys(ownInheritedValues); _i10 < _Object$keys3.length; _i10++) {
|
|
1971
|
+
var _basketId = _Object$keys3[_i10];
|
|
1972
|
+
inheritedValues[_basketId] = _objectSpread(_objectSpread({}, inheritedValues[_basketId]), ownInheritedValues[_basketId].variantValues);
|
|
1973
|
+
}
|
|
1974
|
+
return inheritedValues;
|
|
1975
|
+
}
|
|
1579
1976
|
}]);
|
|
1580
1977
|
}();
|
|
1581
1978
|
|