@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.
Files changed (244) hide show
  1. package/build/cjs/{DivaBoxPlanner-006ec070.js → DivaBoxPlanner-7f6bd584.js} +5 -4
  2. package/build/cjs/{DivaStandardPlanner-a428fcb7.js → DivaStandardPlanner-77c603dc.js} +1921 -203
  3. package/build/cjs/{DoorPlanner-40b303c4.js → DoorPlanner-5de2bbf0.js} +4 -3
  4. package/build/cjs/{Host3DSignalR-55f69ca3.js → Host3DSignalR-26b95303.js} +64 -20
  5. package/build/cjs/{LiviqueWWSHandler-4c6f6071.js → LiviqueWWSHandler-1e419862.js} +4 -3
  6. package/build/cjs/{PfisterWWSHandler-55bdb575.js → PfisterWWSHandler-b2f7a5ec.js} +3 -2
  7. package/build/cjs/{PlannerHandler2D-314ce41d.js → PlannerHandler2D-ff734c3e.js} +10 -10
  8. package/build/cjs/{SeriousBasketHandler-1b365a2b.js → SeriousBasketHandler-e54bd31b.js} +4 -3
  9. package/build/cjs/{ShelfPlanner-8e91f830.js → ShelfPlanner-08e15d16.js} +600 -203
  10. package/build/cjs/{StandardWWSHandler-4a2442aa.js → StandardWWSHandler-0e7b20dc.js} +4 -3
  11. package/build/cjs/{index-e08a4789.js → index-5dd5fb4b.js} +9343 -3810
  12. package/build/cjs/index.js +11 -9
  13. package/build/esm/{DivaBoxPlanner-edb41fff.js → DivaBoxPlanner-6ac448b4.js} +5 -4
  14. package/build/esm/{DivaStandardPlanner-20fe9ebf.js → DivaStandardPlanner-abd9609d.js} +1911 -194
  15. package/build/esm/{DoorPlanner-0bf17f1f.js → DoorPlanner-fde32e61.js} +4 -3
  16. package/build/esm/{Host3DSignalR-263f6d3f.js → Host3DSignalR-0f97c7f3.js} +64 -20
  17. package/build/esm/{LiviqueWWSHandler-e80b574f.js → LiviqueWWSHandler-9ee5b7cb.js} +4 -3
  18. package/build/esm/{PfisterWWSHandler-508bb12f.js → PfisterWWSHandler-b9699549.js} +3 -2
  19. package/build/esm/{PlannerHandler2D-e4d80c41.js → PlannerHandler2D-8d963e77.js} +2 -2
  20. package/build/esm/{SeriousBasketHandler-e9ebb195.js → SeriousBasketHandler-40e7e46c.js} +4 -3
  21. package/build/esm/{ShelfPlanner-fbb7d7dd.js → ShelfPlanner-69cbb2c1.js} +600 -203
  22. package/build/esm/{StandardWWSHandler-88f4eb7d.js → StandardWWSHandler-dbf02663.js} +4 -3
  23. package/build/esm/{index-86463de2.js → index-88148ccc.js} +9297 -3798
  24. package/build/esm/index.js +4 -3
  25. package/build/types/web-planner-logic/src/index.d.ts +7 -8
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +4 -2
  28. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +6 -2
  30. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +14 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +1 -0
  34. package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +7 -0
  36. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +16 -1
  38. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -3
  40. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +10 -0
  42. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/interface/Planner/IDM3DTranslation.d.ts +20 -0
  44. package/build/types/web-planner-logic/src/interface/Planner/IDM3DTranslation.d.ts.map +1 -0
  45. package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts +10 -0
  46. package/build/types/web-planner-logic/src/interface/Planner/ISaveSetPlanner.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/interface/Planner/RoomSceneTypes.d.ts +76 -0
  48. package/build/types/web-planner-logic/src/interface/Planner/RoomSceneTypes.d.ts.map +1 -0
  49. package/build/types/web-planner-logic/src/interface/Rendering/AlternativeRendering.d.ts +4 -0
  50. package/build/types/web-planner-logic/src/interface/Rendering/AlternativeRendering.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts +5 -0
  52. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -0
  54. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -1
  56. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +30 -0
  59. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +5 -0
  61. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +8 -0
  63. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts +3 -1
  65. package/build/types/web-planner-logic/src/logic/Article/mandatoryAccessories.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts +2 -0
  67. package/build/types/web-planner-logic/src/logic/Article/measureUnit.d.ts.map +1 -1
  68. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +7 -0
  71. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +77 -7
  73. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
  74. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +14 -2
  75. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  76. package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.d.ts +19 -0
  77. package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.d.ts.map +1 -0
  78. package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.test.d.ts +2 -0
  79. package/build/types/web-planner-logic/src/logic/ConfigTree/viewerStateToggles.test.d.ts.map +1 -0
  80. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +112 -24
  81. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  82. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +74 -9
  83. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  84. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +175 -4
  85. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts +32 -0
  87. package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.d.ts.map +1 -0
  88. package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.test.d.ts +2 -0
  89. package/build/types/web-planner-logic/src/logic/Planner/IDM3D/idm3dTranslation.test.d.ts.map +1 -0
  90. package/build/types/web-planner-logic/src/logic/Planner/Placement/carrierGuests.d.ts +75 -0
  91. package/build/types/web-planner-logic/src/logic/Planner/Placement/carrierGuests.d.ts.map +1 -0
  92. package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.d.ts +47 -0
  93. package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.d.ts.map +1 -0
  94. package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.test.d.ts +2 -0
  95. package/build/types/web-planner-logic/src/logic/Planner/Placement/guestPlacement.test.d.ts.map +1 -0
  96. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementDefaults.d.ts +9 -0
  97. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementDefaults.d.ts.map +1 -0
  98. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.d.ts +78 -0
  99. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.d.ts.map +1 -0
  100. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.test.d.ts +2 -0
  101. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementRules.test.d.ts.map +1 -0
  102. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementSlots.d.ts +81 -0
  103. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementSlots.d.ts.map +1 -0
  104. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementTypes.d.ts +13 -0
  105. package/build/types/web-planner-logic/src/logic/Planner/Placement/placementTypes.d.ts.map +1 -0
  106. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts +1 -1
  107. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/DockingPointHandler.d.ts.map +1 -1
  108. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +1 -1
  109. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +1 -0
  110. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  111. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +13 -1
  112. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  113. package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.d.ts +56 -0
  114. package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.d.ts.map +1 -0
  115. package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.test.d.ts +2 -0
  116. package/build/types/web-planner-logic/src/logic/Planner/Room/elementShapes.test.d.ts.map +1 -0
  117. package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.d.ts +90 -0
  118. package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.d.ts.map +1 -0
  119. package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.test.d.ts +2 -0
  120. package/build/types/web-planner-logic/src/logic/Planner/Room/roomCollisions.test.d.ts.map +1 -0
  121. package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.d.ts +32 -0
  122. package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.d.ts.map +1 -0
  123. package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.test.d.ts +2 -0
  124. package/build/types/web-planner-logic/src/logic/Planner/Room/roomGroups.test.d.ts.map +1 -0
  125. package/build/types/web-planner-logic/src/logic/Planner/Room/roomProperties.test.d.ts +2 -0
  126. package/build/types/web-planner-logic/src/logic/Planner/Room/roomProperties.test.d.ts.map +1 -0
  127. package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.d.ts +21 -0
  128. package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.d.ts.map +1 -0
  129. package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.test.d.ts +2 -0
  130. package/build/types/web-planner-logic/src/logic/Planner/Room/roomScenes.test.d.ts.map +1 -0
  131. package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.d.ts +13 -0
  132. package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.d.ts.map +1 -0
  133. package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.test.d.ts +2 -0
  134. package/build/types/web-planner-logic/src/logic/Planner/Room/roomValidation.test.d.ts.map +1 -0
  135. package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.d.ts +17 -0
  136. package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.d.ts.map +1 -0
  137. package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.test.d.ts +2 -0
  138. package/build/types/web-planner-logic/src/logic/Planner/Room/rtvFeatures.test.d.ts.map +1 -0
  139. package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.d.ts +72 -0
  140. package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.d.ts.map +1 -0
  141. package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.test.d.ts +2 -0
  142. package/build/types/web-planner-logic/src/logic/Planner/Room/wallBinding.test.d.ts.map +1 -0
  143. package/build/types/web-planner-logic/src/logic/Planner/Room/wallMode.d.ts +7 -0
  144. package/build/types/web-planner-logic/src/logic/Planner/Room/wallMode.d.ts.map +1 -0
  145. package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.d.ts +32 -0
  146. package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.d.ts.map +1 -0
  147. package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.test.d.ts +2 -0
  148. package/build/types/web-planner-logic/src/logic/Planner/plannerSwitch.test.d.ts.map +1 -0
  149. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +12 -6
  150. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  151. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +30 -6
  152. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  153. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +5 -0
  154. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
  155. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  156. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  157. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +28 -0
  158. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  159. package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts +3 -0
  160. package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
  161. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +4 -2
  162. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
  163. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +10 -0
  164. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  165. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +6 -4
  166. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  167. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
  168. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts +1 -1
  169. package/build/types/web-planner-logic/src/model/Planner/DockingPoint.d.ts.map +1 -1
  170. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +41 -0
  171. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  172. package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +23 -11
  173. package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -1
  174. package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +1 -34
  175. package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -1
  176. package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts +42 -0
  177. package/build/types/web-planner-logic/src/model/Properties/propertyValues.d.ts.map +1 -0
  178. package/build/types/web-planner-logic/src/test/alternateRenderingToggle.test.d.ts +2 -0
  179. package/build/types/web-planner-logic/src/test/alternateRenderingToggle.test.d.ts.map +1 -0
  180. package/build/types/web-planner-logic/src/test/bundleRulesOwnPartlist.test.d.ts +2 -0
  181. package/build/types/web-planner-logic/src/test/bundleRulesOwnPartlist.test.d.ts.map +1 -0
  182. package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts +1 -0
  183. package/build/types/web-planner-logic/src/test/capturedSetImages.test.d.ts.map +1 -1
  184. package/build/types/web-planner-logic/src/test/carrierGuests.test.d.ts +2 -0
  185. package/build/types/web-planner-logic/src/test/carrierGuests.test.d.ts.map +1 -0
  186. package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts +2 -0
  187. package/build/types/web-planner-logic/src/test/classificationRepairFreeText.test.d.ts.map +1 -0
  188. package/build/types/web-planner-logic/src/test/copyRestoreConnectors.test.d.ts +2 -0
  189. package/build/types/web-planner-logic/src/test/copyRestoreConnectors.test.d.ts.map +1 -0
  190. package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts +2 -0
  191. package/build/types/web-planner-logic/src/test/decisionFeatureRefOp.test.d.ts.map +1 -0
  192. package/build/types/web-planner-logic/src/test/dragZones.test.d.ts +2 -0
  193. package/build/types/web-planner-logic/src/test/dragZones.test.d.ts.map +1 -0
  194. package/build/types/web-planner-logic/src/test/familySwapInPlace.test.d.ts +2 -0
  195. package/build/types/web-planner-logic/src/test/familySwapInPlace.test.d.ts.map +1 -0
  196. package/build/types/web-planner-logic/src/test/getConfigStepKeyOfAccessoire.test.d.ts +2 -0
  197. package/build/types/web-planner-logic/src/test/getConfigStepKeyOfAccessoire.test.d.ts.map +1 -0
  198. package/build/types/web-planner-logic/src/test/headlessRoomScenes.test.d.ts +2 -0
  199. package/build/types/web-planner-logic/src/test/headlessRoomScenes.test.d.ts.map +1 -0
  200. package/build/types/web-planner-logic/src/test/host3DSignalRReconnect.test.d.ts +2 -0
  201. package/build/types/web-planner-logic/src/test/host3DSignalRReconnect.test.d.ts.map +1 -0
  202. package/build/types/web-planner-logic/src/test/liveArUpdate.test.d.ts +2 -0
  203. package/build/types/web-planner-logic/src/test/liveArUpdate.test.d.ts.map +1 -0
  204. package/build/types/web-planner-logic/src/test/oltRectBody.test.d.ts +2 -0
  205. package/build/types/web-planner-logic/src/test/oltRectBody.test.d.ts.map +1 -0
  206. package/build/types/web-planner-logic/src/test/orderNumberTemplates.test.d.ts +2 -0
  207. package/build/types/web-planner-logic/src/test/orderNumberTemplates.test.d.ts.map +1 -0
  208. package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts +2 -0
  209. package/build/types/web-planner-logic/src/test/partlistChangeReevaluatesOptionTree.test.d.ts.map +1 -0
  210. package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts +2 -0
  211. package/build/types/web-planner-logic/src/test/plannerElementHeightChange.test.d.ts.map +1 -0
  212. package/build/types/web-planner-logic/src/test/plannerHandler3DRoomListQueue.test.d.ts +2 -0
  213. package/build/types/web-planner-logic/src/test/plannerHandler3DRoomListQueue.test.d.ts.map +1 -0
  214. package/build/types/web-planner-logic/src/test/plannerRoomScenesSwitch.test.d.ts +2 -0
  215. package/build/types/web-planner-logic/src/test/plannerRoomScenesSwitch.test.d.ts.map +1 -0
  216. package/build/types/web-planner-logic/src/test/planning2DCapture.test.d.ts +2 -0
  217. package/build/types/web-planner-logic/src/test/planning2DCapture.test.d.ts.map +1 -0
  218. package/build/types/web-planner-logic/src/test/planningRoundTrip.test.d.ts +2 -0
  219. package/build/types/web-planner-logic/src/test/planningRoundTrip.test.d.ts.map +1 -0
  220. package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts +2 -0
  221. package/build/types/web-planner-logic/src/test/propertyParsers.test.d.ts.map +1 -0
  222. package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts +2 -0
  223. package/build/types/web-planner-logic/src/test/propertyValues.test.d.ts.map +1 -0
  224. package/build/types/web-planner-logic/src/test/roomDragContact.test.d.ts +2 -0
  225. package/build/types/web-planner-logic/src/test/roomDragContact.test.d.ts.map +1 -0
  226. package/build/types/web-planner-logic/src/test/roomPlacement.test.d.ts +2 -0
  227. package/build/types/web-planner-logic/src/test/roomPlacement.test.d.ts.map +1 -0
  228. package/build/types/web-planner-logic/src/test/roomScenePlanning.test.d.ts +2 -0
  229. package/build/types/web-planner-logic/src/test/roomScenePlanning.test.d.ts.map +1 -0
  230. package/build/types/web-planner-logic/src/test/rotationSnap.test.d.ts +2 -0
  231. package/build/types/web-planner-logic/src/test/rotationSnap.test.d.ts.map +1 -0
  232. package/build/types/web-planner-logic/src/test/shelfEditNoting.test.d.ts +3 -0
  233. package/build/types/web-planner-logic/src/test/shelfEditNoting.test.d.ts.map +1 -0
  234. package/build/types/web-planner-logic/src/test/shelfGridCarryOver.test.d.ts +2 -0
  235. package/build/types/web-planner-logic/src/test/shelfGridCarryOver.test.d.ts.map +1 -0
  236. package/build/types/web-planner-logic/src/test/shelfMoveLocks.test.d.ts +2 -0
  237. package/build/types/web-planner-logic/src/test/shelfMoveLocks.test.d.ts.map +1 -0
  238. package/build/types/web-planner-logic/src/test/shelfOfferedCells.test.d.ts +2 -0
  239. package/build/types/web-planner-logic/src/test/shelfOfferedCells.test.d.ts.map +1 -0
  240. package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts +2 -0
  241. package/build/types/web-planner-logic/src/test/shelfStashInheritedOptions.test.d.ts.map +1 -0
  242. package/build/types/web-planner-logic/src/test/sideCopySubstitute.test.d.ts +3 -0
  243. package/build/types/web-planner-logic/src/test/sideCopySubstitute.test.d.ts.map +1 -0
  244. 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-86463de2.js';
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 initAcc
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 15:
263
+ case 16:
237
264
  if (!(_i2 < gridsTodos.length)) {
238
- _context2.next = 24;
265
+ _context2.next = 26;
239
266
  break;
240
267
  }
241
268
  if (gridsTodos[_i2].length) {
242
- _context2.next = 18;
269
+ _context2.next = 19;
243
270
  break;
244
271
  }
245
- return _context2.abrupt("continue", 21);
246
- case 18:
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
- _context2.next = 21;
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 21:
279
+ case 23:
252
280
  _i2++;
253
- _context2.next = 15;
281
+ _context2.next = 16;
254
282
  break;
255
- case 24:
283
+ case 26:
256
284
  _i3 = 0;
257
- case 25:
285
+ case 27:
258
286
  if (!(_i3 < gridsTodos.length)) {
259
- _context2.next = 41;
287
+ _context2.next = 65;
260
288
  break;
261
289
  }
262
290
  if (gridsTodos[_i3].length) {
263
- _context2.next = 28;
291
+ _context2.next = 30;
264
292
  break;
265
293
  }
266
- return _context2.abrupt("continue", 38);
267
- case 28:
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 = 38;
303
+ _context2.next = 62;
276
304
  break;
277
305
  }
278
306
  if (!this.restorePending) {
279
- _context2.next = 33;
307
+ _context2.next = 35;
280
308
  break;
281
309
  }
282
- return _context2.abrupt("continue", 38);
283
- case 33:
284
- _context2.next = 35;
285
- return this.placeStashedAccessoiresOfGrid(_i3);
310
+ return _context2.abrupt("continue", 62);
286
311
  case 35:
287
- if (_context2.sent) {
288
- _context2.next = 38;
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
- _context2.next = 38;
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 38:
372
+ case 62:
294
373
  _i3++;
295
- _context2.next = 25;
374
+ _context2.next = 27;
296
375
  break;
297
- case 41:
376
+ case 65:
298
377
  if (!(!newHeightSet && Object.keys(variantValues).length)) {
299
- _context2.next = 52;
378
+ _context2.next = 76;
300
379
  break;
301
380
  }
302
381
  grids = this.activeGrids;
303
382
  _i4 = 0;
304
- case 44:
383
+ case 68:
305
384
  if (!(_i4 < grids.length)) {
306
- _context2.next = 52;
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 = 49;
392
+ _context2.next = 73;
314
393
  break;
315
394
  }
316
395
  newHeightSet = true;
317
- return _context2.abrupt("break", 52);
318
- case 49:
396
+ return _context2.abrupt("break", 76);
397
+ case 73:
319
398
  _i4++;
320
- _context2.next = 44;
399
+ _context2.next = 68;
321
400
  break;
322
- case 52:
401
+ case 76:
323
402
  if (newHeightSet) {
324
403
  this.updateDisabledCells();
325
404
  }
326
- case 53:
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.stashedAccessoires[this.stashKey(gridIndex, ruleIndex)] = stashedAccessoires;
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
- var accessoireShelfPlanner = accessoire.shelfPlanner;
381
- for (var j = 0; j < ((_accessoireShelfPlann = accessoireShelfPlanner === null || accessoireShelfPlanner === void 0 ? void 0 : accessoireShelfPlanner.grids.length) !== null && _accessoireShelfPlann !== void 0 ? _accessoireShelfPlann : 0); j++) {
382
- var _accessoireShelfPlann;
383
- var accessoireGrid = accessoireShelfPlanner.grids[j];
384
- var accessoiresOfGrid = accessoireShelfPlanner.collectAccessoiresToStash(accessoireGrid);
385
- if (accessoiresOfGrid.length) {
386
- accessoires[accessoireGrid.ShelfIndex] = {
387
- ruleIndex: accessoireGrid.CurrentLoadedRuleIndex,
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: accessoire.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
- * Places the accessoires remembered for the rule entry the grid runs now back into their cells.
407
- * @param gridIndex grid that became active again
408
- * @returns how many accessoires were placed - 0 means the grid is still empty and needs its initAcc
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: "placeStashedAccessoiresOfGrid",
412
- value: (function () {
413
- var _placeStashedAccessoiresOfGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(gridIndex) {
414
- var stashKey, stashedAccessoires;
415
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
416
- while (1) switch (_context3.prev = _context3.next) {
417
- case 0:
418
- //a recreated grid already runs its new rule entry, only accessoires planned under that entry belong into it
419
- stashKey = this.stashKey(gridIndex, this.grids[gridIndex].CurrentLoadedRuleIndex);
420
- stashedAccessoires = this.stashedAccessoires[stashKey];
421
- if (stashedAccessoires !== null && stashedAccessoires !== void 0 && stashedAccessoires.length) {
422
- _context3.next = 4;
423
- break;
424
- }
425
- return _context3.abrupt("return", 0);
426
- case 4:
427
- //remove it first, a reconfiguration triggered by placing them must not place them a second time
428
- delete this.stashedAccessoires[stashKey];
429
- _context3.next = 7;
430
- return this.placeStashedAccessoiresInGrid(gridIndex, stashedAccessoires);
431
- case 7:
432
- return _context3.abrupt("return", _context3.sent);
433
- case 8:
434
- case "end":
435
- return _context3.stop();
436
- }
437
- }, _callee3, this);
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 placeStashedAccessoiresOfGrid;
443
- }() /** Places stashed accessoires that are grouped by gridIndex - used for the accessoires of an accessoire. */)
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 gridIndexes, i, gridIndex, grid, stashed;
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 2:
703
+ case 3:
455
704
  if (!(i < gridIndexes.length)) {
456
- _context4.next = 18;
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 = 8;
712
+ if (!(!grid || !mapByFamily && grid.CurrentLoadedRuleIndex !== stashed.ruleIndex)) {
713
+ _context4.next = 9;
465
714
  break;
466
715
  }
467
- return _context4.abrupt("continue", 15);
468
- case 8:
469
- _context4.next = 10;
716
+ return _context4.abrupt("continue", 16);
717
+ case 9:
718
+ _context4.next = 11;
470
719
  return grid.deleteAllAccOfGrid();
471
- case 10:
472
- _context4.next = 12;
473
- return this.placeStashedAccessoiresInGrid(gridIndex, stashed.accessoires);
474
- case 12:
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 = 15;
725
+ _context4.next = 16;
477
726
  break;
478
727
  }
479
- _context4.next = 15;
728
+ _context4.next = 16;
480
729
  return this.initAccList(gridIndex);
481
- case 15:
730
+ case 16:
482
731
  i++;
483
- _context4.next = 2;
732
+ _context4.next = 3;
484
733
  break;
485
- case 18:
734
+ case 19:
486
735
  case "end":
487
736
  return _context4.stop();
488
737
  }
489
738
  }, _callee4, this);
490
739
  }));
491
- function placeStashedAccessoiresByGrid(_x4) {
740
+ function placeStashedAccessoiresByGrid(_x5) {
492
741
  return _placeStashedAccessoiresByGrid.apply(this, arguments);
493
742
  }
494
743
  return placeStashedAccessoiresByGrid;
495
- }() /** @returns how many of the stashed accessoires were placed */)
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 placedAccessoires, grid, i, stashed, result, fitResult, accessoire;
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 = 4;
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 = 28;
783
+ _context5.next = 53;
516
784
  break;
517
785
  }
518
786
  stashed = stashedAccessoires[i];
519
- grid.ActAccessoire = stashed.articleCodex;
520
- _context5.next = 10;
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 10:
805
+ case 17:
527
806
  result = _context5.sent;
528
807
  grid.ActAccessoire = undefined;
529
- fitResult = result === false || result.index === undefined ? undefined : result;
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 = 17;
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", 25);
547
- case 17:
861
+ return _context5.abrupt("continue", 50);
862
+ case 39:
548
863
  accessoire.quantity = stashed.quantity;
549
864
  placedAccessoires++;
550
- if (!Object.keys(stashed.variantValues).length) {
551
- _context5.next = 22;
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 = 22;
555
- return articleHandlerInstance.updateCfgValues(accessoire, stashed.variantValues, {});
556
- case 22:
879
+ _context5.next = 47;
880
+ return articleHandlerInstance.updateCfgValues(accessoire, variantValues, {});
881
+ case 47:
557
882
  if (!accessoire.shelfPlanner) {
558
- _context5.next = 25;
883
+ _context5.next = 50;
559
884
  break;
560
885
  }
561
- _context5.next = 25;
562
- return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires);
563
- case 25:
886
+ _context5.next = 50;
887
+ return accessoire.shelfPlanner.placeStashedAccessoiresByGrid(stashed.accessoires, mapByFamily || replaced);
888
+ case 50:
564
889
  i++;
565
- _context5.next = 5;
890
+ _context5.next = 6;
566
891
  break;
567
- case 28:
892
+ case 53:
568
893
  return _context5.abrupt("return", placedAccessoires);
569
- case 29:
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(_x5, _x6) {
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$accesso, shelfId, accessoires, _accessoireToDelete$s, accessoireToDelete, rh;
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 = 37;
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", 34);
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", 34);
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 9:
972
+ case 10:
615
973
  if (!(j < grid.InitAccArr.length)) {
616
- _context6.next = 34;
974
+ _context6.next = 40;
617
975
  break;
618
976
  }
619
977
  initAcc = grid.InitAccArr[j];
620
- k = 0;
621
- case 12:
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 = 31;
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 = 17;
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 17:
642
- if (!initAcc.replaceFromParent) {
643
- _context6.next = 27;
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$accesso = this.article.accessoireParentArticle) !== null && _this$article$accesso !== void 0 && _this$article$accesso.shelfPlanner)) {
648
- _context6.next = 27;
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 = 27;
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 = 27;
1023
+ _context6.next = 33;
660
1024
  break;
661
1025
  }
662
- _context6.next = 27;
1026
+ _context6.next = 33;
663
1027
  return setHandlerInstance.deleteAccessorieOnShelfPlanner(this.article.set, accessoireToDelete.relatedToShelfGrid, rh, this.article.accessoireParentArticle.basketId);
664
- case 27:
1028
+ case 33:
665
1029
  grid.ActAccessoire = undefined;
666
- case 28:
1030
+ case 34:
667
1031
  k++;
668
- _context6.next = 12;
1032
+ _context6.next = 17;
669
1033
  break;
670
- case 31:
1034
+ case 37:
671
1035
  j++;
672
- _context6.next = 9;
1036
+ _context6.next = 10;
673
1037
  break;
674
- case 34:
1038
+ case 40:
675
1039
  i++;
676
1040
  _context6.next = 2;
677
1041
  break;
678
- case 37:
1042
+ case 43:
679
1043
  case "end":
680
1044
  return _context6.stop();
681
1045
  }
682
1046
  }, _callee6, this);
683
1047
  }));
684
- function initAccList(_x7) {
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, _i5, option, visitOptionState;
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
- _i5 = 0;
1114
+ _i6 = 0;
751
1115
  case 14:
752
- if (!(_i5 < [].concat(toUpdateOptions, toCleanOptions).length)) {
1116
+ if (!(_i6 < [].concat(toUpdateOptions, toCleanOptions).length)) {
753
1117
  _context7.next = 23;
754
1118
  break;
755
1119
  }
756
- option = [].concat(toUpdateOptions, toCleanOptions)[_i5];
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
- _i5++;
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(_x8) {
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(_x9, _x10) {
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$Article, cell, _i6, _cell$Article2, _cell, _i7;
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$Article = cell.Article) === null || _cell$Article === void 0 ? void 0 : _cell$Article.basketId) === accessoire.basketId) {
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 (_i6 = 0; _i6 < accessoire.shelfHeightBelow; _i6++) {
1009
- _cell = this.grids[gridIndex].Cells[cellIndex - (_i6 + 1)];
1010
- if ((_cell === null || _cell === void 0 || (_cell$Article2 = _cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) === accessoire.basketId) {
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
- _i7 = 0;
1398
+ _i8 = 0;
1020
1399
  case 6:
1021
- if (!(_i7 < this.grids.length)) {
1400
+ if (!(_i8 < this.grids.length)) {
1022
1401
  _context10.next = 14;
1023
1402
  break;
1024
1403
  }
1025
- if (!(_i7 === gridIndex)) {
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[_i7].deleteAccessoireInCells(cellIndex);
1411
+ return this.grids[_i8].deleteAccessoireInCells(cellIndex);
1033
1412
  case 11:
1034
- _i7++;
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(_x11, _x12, _x13) {
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(_x14, _x15, _x16, _x17, _x18) {
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$Article3, _cell$Article4;
1593
+ var _cell$Article4, _cell$Article5;
1215
1594
  cells[j].usedArticleData = {
1216
- Codex: (_cell$Article3 = cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.articleCodex,
1217
- BasketID: (_cell$Article4 = cell.Article) === null || _cell$Article4 === void 0 ? void 0 : _cell$Article4.basketId
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$Article5;
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$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId,
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$accesso2;
1271
- if ((_this$article$accesso2 = this.article.accessoireParentArticle) !== null && _this$article$accesso2 !== void 0 && _this$article$accesso2.shelfPlanner && this.article.relatedToShelfGrid !== undefined && this.grids.length > 0) {
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$accesso3,
1287
- _this = this;
1665
+ var _this$article$accesso5,
1666
+ _this2 = this;
1288
1667
  if (this.article.relatedToShelfGrid === undefined) return undefined;
1289
- return (_this$article$accesso3 = this.article.accessoireParentArticle) === null || _this$article$accesso3 === void 0 || (_this$article$accesso3 = _this$article$accesso3.shelfPlanner) === null || _this$article$accesso3 === void 0 || (_this$article$accesso3 = _this$article$accesso3.grids[this.article.relatedToShelfGrid].Cells.find(function (item) {
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) == _this.article.basketId;
1292
- })) === null || _this$article$accesso3 === void 0 ? void 0 : _this$article$accesso3.InUse;
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$accesso4;
1356
- if (this.article.relatedToShelfGrid !== undefined) return (_this$article$accesso4 = this.article.accessoireParentArticle) === null || _this$article$accesso4 === void 0 || (_this$article$accesso4 = _this$article$accesso4.shelfPlanner) === null || _this$article$accesso4 === void 0 || (_this$article$accesso4 = _this$article$accesso4.grids[this.article.relatedToShelfGrid]) === null || _this$article$accesso4 === void 0 ? void 0 : _this$article$accesso4.ShelfId;
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 _this2 = this;
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) _this2.logShelfDebug({
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(_this2.article.set, grid.ShelfIndex, cell.InUse, grid.basketId);
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(_x19) {
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