udp-react-enterprise-component-library 27.0.0-next.12 → 27.0.0-next.13

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 (540) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/UI/fluent-web-components/UdpIconPicker.d.ts +4 -1
  3. package/dist/UI/fluent-web-components/UdpIconPicker.d.ts.map +1 -1
  4. package/dist/UI/fluent-web-components/UdpIconPicker.js +2 -2
  5. package/dist/UI/fluent-web-components/UdpIconPicker.js.map +1 -1
  6. package/dist/UI/fluent-web-components/UdpIconPicker.mjs +32 -28
  7. package/dist/UI/fluent-web-components/UdpIconPicker.mjs.map +1 -1
  8. package/dist/UI/fluent-web-components/UdpLink.d.ts +6 -0
  9. package/dist/UI/fluent-web-components/UdpLink.d.ts.map +1 -1
  10. package/dist/UI/fluent-web-components/UdpLink.js.map +1 -1
  11. package/dist/UI/fluent-web-components/UdpLink.mjs.map +1 -1
  12. package/dist/UI/fluent-web-components/types.d.ts +2 -0
  13. package/dist/UI/fluent-web-components/types.d.ts.map +1 -1
  14. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts +16 -3
  15. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts.map +1 -1
  16. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js +36 -13
  17. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js.map +1 -1
  18. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs +119 -62
  19. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs.map +1 -1
  20. package/dist/UI/widgets/library/InquiryFindRecordsWidget/index.mjs +3 -2
  21. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts +9 -2
  22. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts.map +1 -1
  23. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js +18 -18
  24. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js.map +1 -1
  25. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs +79 -67
  26. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs.map +1 -1
  27. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts +8 -2
  28. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts.map +1 -1
  29. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js +32 -16
  30. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js.map +1 -1
  31. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs +129 -102
  32. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs.map +1 -1
  33. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts +3 -2
  34. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts.map +1 -1
  35. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js +11 -12
  36. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js.map +1 -1
  37. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs +6 -4
  38. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs.map +1 -1
  39. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts +2 -19
  40. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts.map +1 -1
  41. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js +4 -5
  42. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js.map +1 -1
  43. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs +5 -4
  44. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs.map +1 -1
  45. package/dist/actionPanels/index.d.ts +0 -2
  46. package/dist/actionPanels/index.d.ts.map +1 -1
  47. package/dist/actionPanels/index.js +0 -2
  48. package/dist/actionPanels/index.js.map +1 -1
  49. package/dist/actionPanels/panelActionFields.d.ts +9 -26
  50. package/dist/actionPanels/panelActionFields.d.ts.map +1 -1
  51. package/dist/actionPanels/panelActionFields.js +32 -55
  52. package/dist/actionPanels/panelActionFields.js.map +1 -1
  53. package/dist/actionPanels/panelActionFields.mjs +159 -375
  54. package/dist/actionPanels/panelActionFields.mjs.map +1 -1
  55. package/dist/actionPanels/panelOperations.d.ts +15 -41
  56. package/dist/actionPanels/panelOperations.d.ts.map +1 -1
  57. package/dist/actionPanels/panelOperations.js +51 -89
  58. package/dist/actionPanels/panelOperations.js.map +1 -1
  59. package/dist/actionPanels/panelOperations.mjs +37 -92
  60. package/dist/actionPanels/panelOperations.mjs.map +1 -1
  61. package/dist/domain/actionPanel/actionTypeMeta.d.ts +15 -2
  62. package/dist/domain/actionPanel/actionTypeMeta.d.ts.map +1 -1
  63. package/dist/domain/actionPanel/actionTypeMeta.js +21 -2
  64. package/dist/domain/actionPanel/actionTypeMeta.js.map +1 -1
  65. package/dist/domain/actionPanel/actionTypeMeta.mjs +18 -3
  66. package/dist/domain/actionPanel/actionTypeMeta.mjs.map +1 -1
  67. package/dist/domain/actionPanel/buttonOrder.d.ts +67 -0
  68. package/dist/domain/actionPanel/buttonOrder.d.ts.map +1 -0
  69. package/dist/domain/actionPanel/buttonOrder.js +105 -0
  70. package/dist/domain/actionPanel/buttonOrder.js.map +1 -0
  71. package/dist/domain/actionPanel/buttonOrder.mjs +90 -0
  72. package/dist/domain/actionPanel/buttonOrder.mjs.map +1 -0
  73. package/dist/domain/actionPanel/index.d.ts +1 -0
  74. package/dist/domain/actionPanel/index.d.ts.map +1 -1
  75. package/dist/domain/actionPanel/index.js +1 -0
  76. package/dist/domain/actionPanel/index.js.map +1 -1
  77. package/dist/domain/actionPanel/index.mjs +4 -3
  78. package/dist/domain/actionPanel/serialize.d.ts +6 -2
  79. package/dist/domain/actionPanel/serialize.d.ts.map +1 -1
  80. package/dist/domain/actionPanel/serialize.js +10 -3
  81. package/dist/domain/actionPanel/serialize.js.map +1 -1
  82. package/dist/domain/actionPanel/serialize.mjs +7 -3
  83. package/dist/domain/actionPanel/serialize.mjs.map +1 -1
  84. package/dist/domain/actionPanel/types.d.ts +24 -8
  85. package/dist/domain/actionPanel/types.d.ts.map +1 -1
  86. package/dist/domain/actionPanel/types.js.map +1 -1
  87. package/dist/domain/actionPanel/types.mjs.map +1 -1
  88. package/dist/domain/inquiryTree/describe.d.ts +15 -3
  89. package/dist/domain/inquiryTree/describe.d.ts.map +1 -1
  90. package/dist/domain/inquiryTree/describe.js +32 -28
  91. package/dist/domain/inquiryTree/describe.js.map +1 -1
  92. package/dist/domain/inquiryTree/describe.mjs +34 -16
  93. package/dist/domain/inquiryTree/describe.mjs.map +1 -1
  94. package/dist/domain/inquiryTree/displayTree.d.ts +75 -97
  95. package/dist/domain/inquiryTree/displayTree.d.ts.map +1 -1
  96. package/dist/domain/inquiryTree/displayTree.js +418 -551
  97. package/dist/domain/inquiryTree/displayTree.js.map +1 -1
  98. package/dist/domain/inquiryTree/displayTree.mjs +345 -414
  99. package/dist/domain/inquiryTree/displayTree.mjs.map +1 -1
  100. package/dist/domain/inquiryTree/groups.d.ts +2 -0
  101. package/dist/domain/inquiryTree/groups.d.ts.map +1 -1
  102. package/dist/domain/inquiryTree/groups.js.map +1 -1
  103. package/dist/domain/inquiryTree/groups.mjs.map +1 -1
  104. package/dist/domain/inquiryTree/index.d.ts +1 -1
  105. package/dist/domain/inquiryTree/index.d.ts.map +1 -1
  106. package/dist/domain/inquiryTree/index.js +1 -1
  107. package/dist/domain/inquiryTree/index.js.map +1 -1
  108. package/dist/domain/inquiryTree/index.mjs +12 -12
  109. package/dist/domain/inquiryTree/lazyLoad.d.ts +20 -129
  110. package/dist/domain/inquiryTree/lazyLoad.d.ts.map +1 -1
  111. package/dist/domain/inquiryTree/lazyLoad.js +48 -233
  112. package/dist/domain/inquiryTree/lazyLoad.js.map +1 -1
  113. package/dist/domain/inquiryTree/lazyLoad.mjs +32 -187
  114. package/dist/domain/inquiryTree/lazyLoad.mjs.map +1 -1
  115. package/dist/domain/inquiryTree/legalChildren.d.ts +13 -14
  116. package/dist/domain/inquiryTree/legalChildren.d.ts.map +1 -1
  117. package/dist/domain/inquiryTree/legalChildren.js +21 -42
  118. package/dist/domain/inquiryTree/legalChildren.js.map +1 -1
  119. package/dist/domain/inquiryTree/legalChildren.mjs +19 -37
  120. package/dist/domain/inquiryTree/legalChildren.mjs.map +1 -1
  121. package/dist/domain/inquiryTree/names.d.ts +38 -0
  122. package/dist/domain/inquiryTree/names.d.ts.map +1 -0
  123. package/dist/domain/inquiryTree/names.js +64 -0
  124. package/dist/domain/inquiryTree/names.js.map +1 -0
  125. package/dist/domain/inquiryTree/names.mjs +56 -0
  126. package/dist/domain/inquiryTree/names.mjs.map +1 -0
  127. package/dist/domain/inquiryTree/operations.d.ts +6 -2
  128. package/dist/domain/inquiryTree/operations.d.ts.map +1 -1
  129. package/dist/domain/inquiryTree/operations.js +17 -16
  130. package/dist/domain/inquiryTree/operations.js.map +1 -1
  131. package/dist/domain/inquiryTree/operations.mjs +14 -11
  132. package/dist/domain/inquiryTree/operations.mjs.map +1 -1
  133. package/dist/domain/inquiryTree/rules.d.ts +3 -4
  134. package/dist/domain/inquiryTree/rules.d.ts.map +1 -1
  135. package/dist/domain/inquiryTree/rules.js +3 -13
  136. package/dist/domain/inquiryTree/rules.js.map +1 -1
  137. package/dist/domain/inquiryTree/rules.mjs +3 -9
  138. package/dist/domain/inquiryTree/rules.mjs.map +1 -1
  139. package/dist/domain/inquiryTree/runtime.d.ts +23 -16
  140. package/dist/domain/inquiryTree/runtime.d.ts.map +1 -1
  141. package/dist/domain/inquiryTree/runtime.js +46 -54
  142. package/dist/domain/inquiryTree/runtime.js.map +1 -1
  143. package/dist/domain/inquiryTree/runtime.mjs +31 -26
  144. package/dist/domain/inquiryTree/runtime.mjs.map +1 -1
  145. package/dist/domain/inquiryTree/serialize.d.ts +20 -29
  146. package/dist/domain/inquiryTree/serialize.d.ts.map +1 -1
  147. package/dist/domain/inquiryTree/serialize.js +93 -205
  148. package/dist/domain/inquiryTree/serialize.js.map +1 -1
  149. package/dist/domain/inquiryTree/serialize.mjs +89 -180
  150. package/dist/domain/inquiryTree/serialize.mjs.map +1 -1
  151. package/dist/domain/inquiryTree/types.d.ts +146 -65
  152. package/dist/domain/inquiryTree/types.d.ts.map +1 -1
  153. package/dist/domain/inquiryTree/types.js +5 -0
  154. package/dist/domain/inquiryTree/types.js.map +1 -1
  155. package/dist/domain/inquiryTree/types.mjs +3 -1
  156. package/dist/domain/inquiryTree/types.mjs.map +1 -1
  157. package/dist/domain/inquiryTree/validate.d.ts +9 -2
  158. package/dist/domain/inquiryTree/validate.d.ts.map +1 -1
  159. package/dist/domain/inquiryTree/validate.js +30 -58
  160. package/dist/domain/inquiryTree/validate.js.map +1 -1
  161. package/dist/domain/inquiryTree/validate.mjs +29 -44
  162. package/dist/domain/inquiryTree/validate.mjs.map +1 -1
  163. package/dist/domain/inquiryTree/view.d.ts +8 -12
  164. package/dist/domain/inquiryTree/view.d.ts.map +1 -1
  165. package/dist/domain/inquiryTree/view.js +40 -66
  166. package/dist/domain/inquiryTree/view.js.map +1 -1
  167. package/dist/domain/inquiryTree/view.mjs +30 -60
  168. package/dist/domain/inquiryTree/view.mjs.map +1 -1
  169. package/dist/domain/inquiryTree/waveLoad.d.ts +32 -48
  170. package/dist/domain/inquiryTree/waveLoad.d.ts.map +1 -1
  171. package/dist/domain/inquiryTree/waveLoad.js +75 -90
  172. package/dist/domain/inquiryTree/waveLoad.js.map +1 -1
  173. package/dist/domain/inquiryTree/waveLoad.mjs +54 -60
  174. package/dist/domain/inquiryTree/waveLoad.mjs.map +1 -1
  175. package/dist/domain/inquiryTree/wireString.d.ts +5 -0
  176. package/dist/domain/inquiryTree/wireString.d.ts.map +1 -1
  177. package/dist/domain/inquiryTree/wireString.js +11 -0
  178. package/dist/domain/inquiryTree/wireString.js.map +1 -1
  179. package/dist/domain/inquiryTree/wireString.mjs +10 -1
  180. package/dist/domain/inquiryTree/wireString.mjs.map +1 -1
  181. package/dist/domain/nodeView/index.mjs +2 -2
  182. package/dist/domain/nodeView/model.d.ts +35 -30
  183. package/dist/domain/nodeView/model.d.ts.map +1 -1
  184. package/dist/domain/nodeView/model.js +108 -69
  185. package/dist/domain/nodeView/model.js.map +1 -1
  186. package/dist/domain/nodeView/model.mjs +86 -36
  187. package/dist/domain/nodeView/model.mjs.map +1 -1
  188. package/dist/icons/legacyIconNames.d.ts.map +1 -1
  189. package/dist/icons/legacyIconNames.js +46 -1
  190. package/dist/icons/legacyIconNames.js.map +1 -1
  191. package/dist/icons/legacyIconNames.mjs +46 -1
  192. package/dist/icons/legacyIconNames.mjs.map +1 -1
  193. package/dist/index.mjs +10 -12
  194. package/dist/inquiry/Inquiry.d.ts +3 -0
  195. package/dist/inquiry/Inquiry.d.ts.map +1 -1
  196. package/dist/inquiry/Inquiry.js +3 -0
  197. package/dist/inquiry/Inquiry.js.map +1 -1
  198. package/dist/inquiry/Inquiry.mjs +3 -0
  199. package/dist/inquiry/Inquiry.mjs.map +1 -1
  200. package/dist/inquiry/v2/InquiryV2.d.ts +8 -6
  201. package/dist/inquiry/v2/InquiryV2.d.ts.map +1 -1
  202. package/dist/inquiry/v2/InquiryV2.js +45 -24
  203. package/dist/inquiry/v2/InquiryV2.js.map +1 -1
  204. package/dist/inquiry/v2/InquiryV2.mjs +108 -61
  205. package/dist/inquiry/v2/InquiryV2.mjs.map +1 -1
  206. package/dist/inquiry/v2/InquiryV2.module.css +60 -15
  207. package/dist/inquiry/v2/InquiryWorkspace.d.ts +9 -9
  208. package/dist/inquiry/v2/InquiryWorkspace.d.ts.map +1 -1
  209. package/dist/inquiry/v2/InquiryWorkspace.js +531 -408
  210. package/dist/inquiry/v2/InquiryWorkspace.js.map +1 -1
  211. package/dist/inquiry/v2/InquiryWorkspace.mjs +524 -408
  212. package/dist/inquiry/v2/InquiryWorkspace.mjs.map +1 -1
  213. package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts +3 -2
  214. package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts.map +1 -1
  215. package/dist/inquiry/v2/ai/InquiryV2Copilot.js +20 -37
  216. package/dist/inquiry/v2/ai/InquiryV2Copilot.js.map +1 -1
  217. package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs +19 -31
  218. package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs.map +1 -1
  219. package/dist/inquiry/v2/ai/copilotModel.d.ts +6 -14
  220. package/dist/inquiry/v2/ai/copilotModel.d.ts.map +1 -1
  221. package/dist/inquiry/v2/ai/copilotModel.js +35 -87
  222. package/dist/inquiry/v2/ai/copilotModel.js.map +1 -1
  223. package/dist/inquiry/v2/ai/copilotModel.mjs +23 -47
  224. package/dist/inquiry/v2/ai/copilotModel.mjs.map +1 -1
  225. package/dist/inquiry/v2/api/queries.d.ts +46 -73
  226. package/dist/inquiry/v2/api/queries.d.ts.map +1 -1
  227. package/dist/inquiry/v2/api/queries.js +151 -210
  228. package/dist/inquiry/v2/api/queries.js.map +1 -1
  229. package/dist/inquiry/v2/api/queries.mjs +227 -183
  230. package/dist/inquiry/v2/api/queries.mjs.map +1 -1
  231. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.d.ts.map +1 -1
  232. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js +103 -32
  233. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js.map +1 -1
  234. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs +92 -32
  235. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs.map +1 -1
  236. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.module.css +8 -1
  237. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts +20 -16
  238. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts.map +1 -1
  239. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js +111 -68
  240. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js.map +1 -1
  241. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs +108 -142
  242. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs.map +1 -1
  243. package/dist/inquiry/v2/capabilities/actions/RetrieveSurface.mjs +1 -1
  244. package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts +66 -50
  245. package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts.map +1 -1
  246. package/dist/inquiry/v2/capabilities/actions/actionModel.js +141 -66
  247. package/dist/inquiry/v2/capabilities/actions/actionModel.js.map +1 -1
  248. package/dist/inquiry/v2/capabilities/actions/actionModel.mjs +115 -53
  249. package/dist/inquiry/v2/capabilities/actions/actionModel.mjs.map +1 -1
  250. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts +26 -0
  251. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts.map +1 -0
  252. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js +36 -0
  253. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js.map +1 -0
  254. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs +41 -0
  255. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs.map +1 -0
  256. package/dist/inquiry/v2/capabilities/actions/runAction.d.ts +3 -2
  257. package/dist/inquiry/v2/capabilities/actions/runAction.d.ts.map +1 -1
  258. package/dist/inquiry/v2/capabilities/actions/runAction.js +27 -23
  259. package/dist/inquiry/v2/capabilities/actions/runAction.js.map +1 -1
  260. package/dist/inquiry/v2/capabilities/actions/runAction.mjs +26 -20
  261. package/dist/inquiry/v2/capabilities/actions/runAction.mjs.map +1 -1
  262. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts +20 -0
  263. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts.map +1 -0
  264. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js +112 -0
  265. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js.map +1 -0
  266. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs +118 -0
  267. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs.map +1 -0
  268. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts +25 -1
  269. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts.map +1 -1
  270. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js +7 -4
  271. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js.map +1 -1
  272. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs +9 -4
  273. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs.map +1 -1
  274. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts +5 -3
  275. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts.map +1 -1
  276. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js +11 -8
  277. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js.map +1 -1
  278. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs +13 -7
  279. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs.map +1 -1
  280. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.module.css +4 -4
  281. package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts +1 -1
  282. package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts.map +1 -1
  283. package/dist/inquiry/v2/capabilities/header/HeaderCapability.js +20 -17
  284. package/dist/inquiry/v2/capabilities/header/HeaderCapability.js.map +1 -1
  285. package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs +101 -111
  286. package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs.map +1 -1
  287. package/dist/inquiry/v2/capabilities/header/HeaderCapability.module.css +9 -6
  288. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts +2 -1
  289. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts.map +1 -1
  290. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js +9 -2
  291. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js.map +1 -1
  292. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs +18 -15
  293. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs.map +1 -1
  294. package/dist/inquiry/v2/index.d.ts +0 -1
  295. package/dist/inquiry/v2/index.d.ts.map +1 -1
  296. package/dist/inquiry/v2/index.js.map +1 -1
  297. package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts +3 -3
  298. package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts.map +1 -1
  299. package/dist/inquiry/v2/kernel/ActionRunnerContext.js +11 -5
  300. package/dist/inquiry/v2/kernel/ActionRunnerContext.js.map +1 -1
  301. package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs +15 -12
  302. package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs.map +1 -1
  303. package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts +3 -0
  304. package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts.map +1 -0
  305. package/dist/inquiry/v2/kernel/ReadOnlyContext.js +14 -0
  306. package/dist/inquiry/v2/kernel/ReadOnlyContext.js.map +1 -0
  307. package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs +20 -0
  308. package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs.map +1 -0
  309. package/dist/inquiry/v2/kernel/RecordContext.d.ts +2 -0
  310. package/dist/inquiry/v2/kernel/RecordContext.d.ts.map +1 -1
  311. package/dist/inquiry/v2/kernel/RecordContext.js.map +1 -1
  312. package/dist/inquiry/v2/kernel/RecordContext.mjs.map +1 -1
  313. package/dist/inquiry/v2/kernel/UdpNodeView.d.ts.map +1 -1
  314. package/dist/inquiry/v2/kernel/UdpNodeView.js +18 -13
  315. package/dist/inquiry/v2/kernel/UdpNodeView.js.map +1 -1
  316. package/dist/inquiry/v2/kernel/UdpNodeView.mjs +177 -140
  317. package/dist/inquiry/v2/kernel/UdpNodeView.mjs.map +1 -1
  318. package/dist/inquiry/v2/kernel/UdpNodeView.module.css +56 -5
  319. package/dist/inquiry/v2/kernel/capabilities.d.ts +0 -2
  320. package/dist/inquiry/v2/kernel/capabilities.d.ts.map +1 -1
  321. package/dist/inquiry/v2/kernel/capabilities.js.map +1 -1
  322. package/dist/inquiry/v2/kernel/capabilities.mjs.map +1 -1
  323. package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts +26 -37
  324. package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts.map +1 -1
  325. package/dist/inquiry/v2/landing/InquiryExplorePage.js +48 -57
  326. package/dist/inquiry/v2/landing/InquiryExplorePage.js.map +1 -1
  327. package/dist/inquiry/v2/landing/InquiryExplorePage.mjs +102 -106
  328. package/dist/inquiry/v2/landing/InquiryExplorePage.mjs.map +1 -1
  329. package/dist/inquiry/v2/landing/InquiryExplorePage.module.css +58 -6
  330. package/dist/inquiry/v2/landing/InquiryLanding.d.ts +3 -3
  331. package/dist/inquiry/v2/landing/InquiryLanding.d.ts.map +1 -1
  332. package/dist/inquiry/v2/landing/InquiryLanding.js +8 -3
  333. package/dist/inquiry/v2/landing/InquiryLanding.js.map +1 -1
  334. package/dist/inquiry/v2/landing/InquiryLanding.mjs +51 -35
  335. package/dist/inquiry/v2/landing/InquiryLanding.mjs.map +1 -1
  336. package/dist/inquiry/v2/landing/InquiryLanding.module.css +8 -0
  337. package/dist/inquiry/v2/page/UdpPageRenderer.d.ts +5 -1
  338. package/dist/inquiry/v2/page/UdpPageRenderer.d.ts.map +1 -1
  339. package/dist/inquiry/v2/page/UdpPageRenderer.js +13 -1
  340. package/dist/inquiry/v2/page/UdpPageRenderer.js.map +1 -1
  341. package/dist/inquiry/v2/page/UdpPageRenderer.mjs +36 -7
  342. package/dist/inquiry/v2/page/UdpPageRenderer.mjs.map +1 -1
  343. package/dist/inquiry/v2/search/InquirySearchPanel.d.ts +1 -7
  344. package/dist/inquiry/v2/search/InquirySearchPanel.d.ts.map +1 -1
  345. package/dist/inquiry/v2/search/InquirySearchPanel.js +6 -13
  346. package/dist/inquiry/v2/search/InquirySearchPanel.js.map +1 -1
  347. package/dist/inquiry/v2/search/InquirySearchPanel.mjs +4 -8
  348. package/dist/inquiry/v2/search/InquirySearchPanel.mjs.map +1 -1
  349. package/dist/inquiry/v2/search/RecordFinder.d.ts +30 -1
  350. package/dist/inquiry/v2/search/RecordFinder.d.ts.map +1 -1
  351. package/dist/inquiry/v2/search/RecordFinder.js +43 -20
  352. package/dist/inquiry/v2/search/RecordFinder.js.map +1 -1
  353. package/dist/inquiry/v2/search/RecordFinder.mjs +68 -42
  354. package/dist/inquiry/v2/search/RecordFinder.mjs.map +1 -1
  355. package/dist/inquiry/v2/search/index.d.ts +3 -3
  356. package/dist/inquiry/v2/search/index.d.ts.map +1 -1
  357. package/dist/inquiry/v2/search/index.js +1 -1
  358. package/dist/inquiry/v2/search/index.js.map +1 -1
  359. package/dist/inquiry/v2/search/searchModel.d.ts +130 -23
  360. package/dist/inquiry/v2/search/searchModel.d.ts.map +1 -1
  361. package/dist/inquiry/v2/search/searchModel.js +237 -36
  362. package/dist/inquiry/v2/search/searchModel.js.map +1 -1
  363. package/dist/inquiry/v2/search/searchModel.mjs +207 -34
  364. package/dist/inquiry/v2/search/searchModel.mjs.map +1 -1
  365. package/dist/inquiry/v2/search/useInquirySearch.d.ts.map +1 -1
  366. package/dist/inquiry/v2/search/useInquirySearch.js +46 -19
  367. package/dist/inquiry/v2/search/useInquirySearch.js.map +1 -1
  368. package/dist/inquiry/v2/search/useInquirySearch.mjs +83 -84
  369. package/dist/inquiry/v2/search/useInquirySearch.mjs.map +1 -1
  370. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts +4 -1
  371. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts.map +1 -1
  372. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js +174 -166
  373. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js.map +1 -1
  374. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs +343 -325
  375. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs.map +1 -1
  376. package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts +3 -1
  377. package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts.map +1 -1
  378. package/dist/inquiry/v2/tree/InquiryMenuToolbar.js +8 -7
  379. package/dist/inquiry/v2/tree/InquiryMenuToolbar.js.map +1 -1
  380. package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs +68 -72
  381. package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs.map +1 -1
  382. package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts +3 -3
  383. package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts.map +1 -1
  384. package/dist/inquiry/v2/tree/LoadRecordDialog.js +12 -7
  385. package/dist/inquiry/v2/tree/LoadRecordDialog.js.map +1 -1
  386. package/dist/inquiry/v2/tree/LoadRecordDialog.mjs +48 -33
  387. package/dist/inquiry/v2/tree/LoadRecordDialog.mjs.map +1 -1
  388. package/dist/inquiry/v2/tree/NodeList.d.ts.map +1 -1
  389. package/dist/inquiry/v2/tree/NodeList.js +17 -6
  390. package/dist/inquiry/v2/tree/NodeList.js.map +1 -1
  391. package/dist/inquiry/v2/tree/NodeList.mjs +49 -36
  392. package/dist/inquiry/v2/tree/NodeList.mjs.map +1 -1
  393. package/dist/inquiry/v2/tree/arrivalModel.d.ts +15 -0
  394. package/dist/inquiry/v2/tree/arrivalModel.d.ts.map +1 -1
  395. package/dist/inquiry/v2/tree/arrivalModel.js +14 -1
  396. package/dist/inquiry/v2/tree/arrivalModel.js.map +1 -1
  397. package/dist/inquiry/v2/tree/arrivalModel.mjs +12 -1
  398. package/dist/inquiry/v2/tree/arrivalModel.mjs.map +1 -1
  399. package/dist/inquiry/v2/tree/branchRefreshModel.d.ts +32 -0
  400. package/dist/inquiry/v2/tree/branchRefreshModel.d.ts.map +1 -0
  401. package/dist/inquiry/v2/tree/branchRefreshModel.js +62 -0
  402. package/dist/inquiry/v2/tree/branchRefreshModel.js.map +1 -0
  403. package/dist/inquiry/v2/tree/branchRefreshModel.mjs +60 -0
  404. package/dist/inquiry/v2/tree/branchRefreshModel.mjs.map +1 -0
  405. package/dist/inquiry/v2/tree/droppedPageModel.d.ts +23 -1
  406. package/dist/inquiry/v2/tree/droppedPageModel.d.ts.map +1 -1
  407. package/dist/inquiry/v2/tree/droppedPageModel.js +53 -26
  408. package/dist/inquiry/v2/tree/droppedPageModel.js.map +1 -1
  409. package/dist/inquiry/v2/tree/droppedPageModel.mjs +48 -20
  410. package/dist/inquiry/v2/tree/droppedPageModel.mjs.map +1 -1
  411. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts +7 -12
  412. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts.map +1 -1
  413. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js +44 -15
  414. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js.map +1 -1
  415. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs +34 -15
  416. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs.map +1 -1
  417. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.d.ts.map +1 -1
  418. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js +7 -18
  419. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js.map +1 -1
  420. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs +6 -14
  421. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs.map +1 -1
  422. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts +20 -16
  423. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts.map +1 -1
  424. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js +77 -55
  425. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js.map +1 -1
  426. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs +85 -106
  427. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs.map +1 -1
  428. package/dist/inquiry/v2/tree/lineageModel.d.ts +18 -1
  429. package/dist/inquiry/v2/tree/lineageModel.d.ts.map +1 -1
  430. package/dist/inquiry/v2/tree/lineageModel.js +71 -2
  431. package/dist/inquiry/v2/tree/lineageModel.js.map +1 -1
  432. package/dist/inquiry/v2/tree/lineageModel.mjs +53 -3
  433. package/dist/inquiry/v2/tree/lineageModel.mjs.map +1 -1
  434. package/dist/inquiry/v2/tree/menuRebuildModel.d.ts +10 -27
  435. package/dist/inquiry/v2/tree/menuRebuildModel.d.ts.map +1 -1
  436. package/dist/inquiry/v2/tree/menuRebuildModel.js +8 -58
  437. package/dist/inquiry/v2/tree/menuRebuildModel.js.map +1 -1
  438. package/dist/inquiry/v2/tree/menuRebuildModel.mjs +8 -51
  439. package/dist/inquiry/v2/tree/menuRebuildModel.mjs.map +1 -1
  440. package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts +26 -0
  441. package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts.map +1 -0
  442. package/dist/inquiry/v2/tree/pagedChildrenModel.js +56 -0
  443. package/dist/inquiry/v2/tree/pagedChildrenModel.js.map +1 -0
  444. package/dist/inquiry/v2/tree/pagedChildrenModel.mjs +43 -0
  445. package/dist/inquiry/v2/tree/pagedChildrenModel.mjs.map +1 -0
  446. package/dist/inquiry/v2/tree/rootRemovalModel.d.ts +7 -0
  447. package/dist/inquiry/v2/tree/rootRemovalModel.d.ts.map +1 -1
  448. package/dist/inquiry/v2/tree/rootRemovalModel.js +31 -5
  449. package/dist/inquiry/v2/tree/rootRemovalModel.js.map +1 -1
  450. package/dist/inquiry/v2/tree/rootRemovalModel.mjs +21 -4
  451. package/dist/inquiry/v2/tree/rootRemovalModel.mjs.map +1 -1
  452. package/dist/inquiry/v2/tree/treeFilterModel.d.ts +0 -2
  453. package/dist/inquiry/v2/tree/treeFilterModel.d.ts.map +1 -1
  454. package/dist/inquiry/v2/tree/treeFilterModel.js +0 -7
  455. package/dist/inquiry/v2/tree/treeFilterModel.js.map +1 -1
  456. package/dist/inquiry/v2/tree/treeFilterModel.mjs.map +1 -1
  457. package/dist/inquiry/v2/tree/useInquiryMenu.d.ts +16 -7
  458. package/dist/inquiry/v2/tree/useInquiryMenu.d.ts.map +1 -1
  459. package/dist/inquiry/v2/tree/useInquiryMenu.js +401 -163
  460. package/dist/inquiry/v2/tree/useInquiryMenu.js.map +1 -1
  461. package/dist/inquiry/v2/tree/useInquiryMenu.mjs +511 -310
  462. package/dist/inquiry/v2/tree/useInquiryMenu.mjs.map +1 -1
  463. package/dist/inquiry/v2/tree/waveLoader.d.ts +10 -11
  464. package/dist/inquiry/v2/tree/waveLoader.d.ts.map +1 -1
  465. package/dist/inquiry/v2/tree/waveLoader.js +78 -72
  466. package/dist/inquiry/v2/tree/waveLoader.js.map +1 -1
  467. package/dist/inquiry/v2/tree/waveLoader.mjs +79 -68
  468. package/dist/inquiry/v2/tree/waveLoader.mjs.map +1 -1
  469. package/dist/inquiry/v2/widgets/listRow.module.css +27 -0
  470. package/dist/inquiry/v2/widgets/widgetRowModel.d.ts +6 -2
  471. package/dist/inquiry/v2/widgets/widgetRowModel.d.ts.map +1 -1
  472. package/dist/inquiry/v2/widgets/widgetRowModel.js +49 -14
  473. package/dist/inquiry/v2/widgets/widgetRowModel.js.map +1 -1
  474. package/dist/inquiry/v2/widgets/widgetRowModel.mjs +36 -12
  475. package/dist/inquiry/v2/widgets/widgetRowModel.mjs.map +1 -1
  476. package/dist/maintenance/UdpTaggedRecordsPage.mjs +1 -1
  477. package/dist/maintenance/api/lookupApi.mjs +1 -1
  478. package/dist/maintenance/api/tagsApi.mjs +1 -1
  479. package/dist/maintenance/config/nodeDefaults.d.ts.map +1 -1
  480. package/dist/maintenance/config/nodeDefaults.js +16 -5
  481. package/dist/maintenance/config/nodeDefaults.js.map +1 -1
  482. package/dist/maintenance/config/nodeDefaults.mjs +14 -5
  483. package/dist/maintenance/config/nodeDefaults.mjs.map +1 -1
  484. package/dist/maintenance/config/useEntityConfig.mjs +1 -1
  485. package/dist/maintenance/config/useLinkedLabels.mjs +1 -1
  486. package/dist/maintenance/grid/MaintenanceGrid.mjs +1 -1
  487. package/dist/maintenance/metadata/useEntityMetadata.mjs +1 -1
  488. package/dist/maintenance/record/ChildTab.mjs +1 -1
  489. package/dist/maintenance/record/DeleteRecordDialog.mjs +1 -1
  490. package/dist/maintenance/record/LinkRecordsSheet.mjs +1 -1
  491. package/dist/maintenance/record/RecordFacts.mjs +1 -1
  492. package/dist/maintenance/record/RecordSheet.mjs +2 -2
  493. package/dist/maintenance/record/displayValue.mjs +1 -1
  494. package/dist/maintenance/record/stampDisplayText.mjs +1 -1
  495. package/dist/maintenance/settings/useEntityCatalog.mjs +1 -1
  496. package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts +4 -5
  497. package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts.map +1 -1
  498. package/dist/stores/inquiryStore.d.ts +2 -1
  499. package/dist/stores/inquiryStore.d.ts.map +1 -1
  500. package/dist/stores/inquiryStore.js +4 -3
  501. package/dist/stores/inquiryStore.js.map +1 -1
  502. package/dist/stores/inquiryStore.mjs +18 -11
  503. package/dist/stores/inquiryStore.mjs.map +1 -1
  504. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.d.ts.map +1 -1
  505. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js +1 -1
  506. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js.map +1 -1
  507. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs +2 -1
  508. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs.map +1 -1
  509. package/dist/udp/pages/UdpMaintenanceEnginePage/components/EntitiyTimeLine.mjs +1 -1
  510. package/dist/udp/utilities/useDateStringColumnDef.d.ts +1 -1
  511. package/dist/utilities/i18n/locales/es-US.json +23 -5
  512. package/dist/utilities/i18n/locales/es-US.mjs +24 -4
  513. package/dist/utilities/i18n/locales/fr-CA.json +23 -5
  514. package/dist/utilities/i18n/locales/fr-CA.mjs +24 -4
  515. package/package.json +30 -18
  516. package/dist/actionPanels/PanelActionForm.d.ts +0 -56
  517. package/dist/actionPanels/PanelActionForm.d.ts.map +0 -1
  518. package/dist/actionPanels/PanelActionForm.js +0 -30
  519. package/dist/actionPanels/PanelActionForm.js.map +0 -1
  520. package/dist/actionPanels/PanelActionForm.mjs +0 -168
  521. package/dist/actionPanels/PanelActionForm.mjs.map +0 -1
  522. package/dist/actionPanels/PanelEditor.d.ts +0 -44
  523. package/dist/actionPanels/PanelEditor.d.ts.map +0 -1
  524. package/dist/actionPanels/PanelEditor.js +0 -78
  525. package/dist/actionPanels/PanelEditor.js.map +0 -1
  526. package/dist/actionPanels/PanelEditor.mjs +0 -345
  527. package/dist/actionPanels/PanelEditor.mjs.map +0 -1
  528. package/dist/actionPanels/panelActionFields.module.css +0 -18
  529. package/dist/domain/inquiryTree/ruleBindings.d.ts +0 -10
  530. package/dist/domain/inquiryTree/ruleBindings.d.ts.map +0 -1
  531. package/dist/domain/inquiryTree/ruleBindings.js +0 -20
  532. package/dist/domain/inquiryTree/ruleBindings.js.map +0 -1
  533. package/dist/domain/inquiryTree/ruleBindings.mjs +0 -21
  534. package/dist/domain/inquiryTree/ruleBindings.mjs.map +0 -1
  535. package/dist/inquiry/v2/kernel/readOnlyModel.d.ts +0 -17
  536. package/dist/inquiry/v2/kernel/readOnlyModel.d.ts.map +0 -1
  537. package/dist/inquiry/v2/kernel/readOnlyModel.js +0 -19
  538. package/dist/inquiry/v2/kernel/readOnlyModel.js.map +0 -1
  539. package/dist/inquiry/v2/kernel/readOnlyModel.mjs +0 -21
  540. package/dist/inquiry/v2/kernel/readOnlyModel.mjs.map +0 -1
@@ -18,32 +18,22 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  * - makeTreeStructure (:17-93) → makeDisplayTreeStructure
19
19
  * - getSearchValueString (:2808-2815) → getSearchValueString
20
20
  *
21
- * OUTPUT SHAPE IS THE EXACT LEGACY DISPLAY-NODE SHAPE (Phase B compatibility
22
- * layer): nested nodes with children[], isExpanded, fresh per-row id,
21
+ * OUTPUT SHAPE: nested nodes with children[], isExpanded, fresh per-row id,
23
22
  * parentId/entityNodeParentId, nodeObj, lazyLoadChildrenArr, parentGroupName,
24
- * and `properties` carrying nodeLabel/nodeSubLabel/headerTitle, the
25
- * conditionalNodeIcon… and conditionalNodeAdornment… triples, and
26
- * searchIdentifier/filterElements/searchValue — everything InquiryTreeMenu.renderTree
27
- * (InquiryTreeMenu.jsx:337-475) and the InquiryContainer consumers read.
23
+ * the row's own display state (childState, draggable) and `properties` — the
24
+ * level's config plus nodeLabel/nodeSubLabel, the conditionalNodeIcon… and
25
+ * conditionalNodeAdornment… triples, and searchValue.
28
26
  *
29
- * EAGER/LAZY: TWO RULES, CHOSEN BY THE CALLER (`LoadMode`, below) — because v1
30
- * and v2 compose through this same module and decide differently:
31
- * - 'legacy-data' (THE DEFAULT, v1): the DATA decides — a level renders from
32
- * the nested rows the response carried, and loads lazily when it carried
33
- * none; `properties.lazyLoad` forces lazy. Preserved verbatim in
34
- * resolveLegacyLoadMode, and it dies with InquiryContainer.
35
- * - 'config' (v2 + the Tree Builder's v2 preview): the CONFIG decides — a
36
- * level is eager only when `properties.eagerLoad === true`, and its rows
37
- * are fetched in breadth-first waves and grafted onto the parent rows
38
- * under their catalogObjectKey before composition, so this module walks
39
- * one row graph regardless of whether the server nested anything.
40
- * Either way splitChildLevels is the ONE owner: nothing downstream re-decides.
27
+ * EAGER/LAZY: THE CONFIG DECIDES — a level's child levels are eager unless it
28
+ * sets `lazyLoad` (loadsChildrenLazily, read off the parent), and eager rows
29
+ * are fetched in breadth-first waves and grafted onto the parent rows under
30
+ * their catalogObjectKey before composition, so this module walks one row
31
+ * graph regardless of whether the server nested anything. splitChildLevels is
32
+ * the ONE owner: nothing downstream re-decides.
41
33
  *
42
- * DRAGGABILITY follows the same split: 'legacy-data' reads the authored
43
- * `isDraggable` flag untouched, 'config' DERIVES it from the tree's own
44
- * On_Node_Drop actions (collectDropSourceEntities / isDraggableLevel, stamped
45
- * onto the seed in makeDisplayTreeStructure — the one place that sees every
46
- * level at once).
34
+ * DRAGGABILITY is DERIVED from the tree's own On_Node_Drop actions
35
+ * (collectDropSourceEntities / isDraggableLevel, stamped onto the seed in
36
+ * makeDisplayTreeStructure — the one place that sees every level at once).
47
37
  *
48
38
  * PURITY: unlike legacy (which mutated the shared treeStructure and aliased
49
39
  * query rows into nodeObj), every entry point deep-clones its tree AND row
@@ -64,8 +54,7 @@ var __rest = (this && this.__rest) || function (s, e) {
64
54
  * → makeDisplayTreeStructure(ts) (:569,:731,:1140,:1293,:1811,:2143,:2558)
65
55
  * formatTreeMenuItem(row, tree, catalog, promoted, assocTree, lazy)
66
56
  * → buildDisplayTree(row, tree, { makeId, catalogObjects: catalog,
67
- * promotedEntities: promoted, associatedInquiryTree: assocTree,
68
- * wasLazyLoaded: lazy }) (:574,:736,:1145,:1305,:1816,:1901,:2148;
57
+ * promotedEntities: promoted }) (:574,:736,:1145,:1305,:1816,:1901,:2148;
69
58
  * InquiryTreeMenu :186,:249,:595)
70
59
  * constructPreloadedTree(tree, pageList, catalog)
71
60
  * → buildPreloadedDisplayList(tree, pageList, { makeId, catalogObjects: catalog }) (:2563)
@@ -73,24 +62,44 @@ var __rest = (this && this.__rest) || function (s, e) {
73
62
  */
74
63
  import { NODE_GROUP_OUTLIER, NODE_GROUP_TYPE, compareGroupByOrder, getGroupChildMap, getLabelFromProperty, orderGroupsByOrder } from './groups';
75
64
  import { applyRule, mapRuleVariables } from './rules';
76
- import { buildRuntimeSearchState, evaluateConditionalAdornmentParts, evaluateConditionalIconParts, getSearchIdentifiers, isNodeHidden, resolveDisplayDetails, resolveDisplayName, resolveHeaderTitle } from './runtime';
65
+ import { buildRuntimeSearchState, evaluateConditionalAdornmentParts, evaluateConditionalIconParts, isNodeHidden, resolveDisplayDetails, resolveDisplayName } from './runtime';
77
66
  import { buildLazyLoadDescriptors } from './lazyLoad';
78
- import { isEagerLevel } from './waveLoad';
67
+ import { levelName } from './names';
79
68
  import { toWireString } from './wireString';
69
+ import { deepClone } from '../jsonClone';
70
+ /** Where the row's child levels stand — THE chevron/fetch predicate. */
71
+ export const rowChildState = (node) => {
72
+ var _a;
73
+ return (_a = node === null || node === void 0 ? void 0 : node.childState) !== null && _a !== void 0 ? _a : 'none';
74
+ };
75
+ /** A lazy level the row has not loaded yet: what an expand fetches. */
76
+ export const hasUnloadedChildren = (node) => {
77
+ const state = rowChildState(node);
78
+ return state === 'lazy' || state === 'error';
79
+ };
80
+ /**
81
+ * THE load rule, read off the parent: a level's child levels load lazily —
82
+ * collapsed, fetched on expand — when it sets `lazyLoad`, and eagerly
83
+ * otherwise. One setting on the parent, the one both builders store and v1
84
+ * reads.
85
+ */
86
+ export const loadsChildrenLazily = (level) => {
87
+ var _a;
88
+ return !!((_a = level === null || level === void 0 ? void 0 : level.properties) === null || _a === void 0 ? void 0 : _a['lazyLoad']);
89
+ };
80
90
  /**
81
- * The row's DISPLAY label — the exact string the tree renders for a node:
82
- * the group's own label, or the entity row's resolved `nodeLabel` (stamped by
83
- * processObjIndexInPlace from the `displayName` template) falling back to the
84
- * level's configured name, as renderTree :367 has always done. One reader for
85
- * both the menu/filter and the record pane, so nothing derives it twice.
91
+ * The row's DISPLAY label — the exact string the tree renders for a node: the
92
+ * entity row's resolved `nodeLabel` (stamped by processObjIndexInPlace from the
93
+ * `displayName` template), else the level's name as the Tree Builder shows it
94
+ * (levelName — a group's label). Never blank. One reader for the menu/filter
95
+ * and the record pane, so nothing derives it twice.
86
96
  */
87
97
  export const resolveRowLabel = (node) => {
88
98
  var _a;
89
- const properties = (_a = node.properties) !== null && _a !== void 0 ? _a : {};
90
- const label = node.isGroupNode
91
- ? properties['label']
92
- : properties['nodeLabel'] || properties['name'];
93
- return typeof label === 'string' ? label : '';
99
+ var _b;
100
+ const label = node.isGroupNode ? null : (_a = node.properties) === null || _a === void 0 ? void 0 : _a['nodeLabel'];
101
+ return ((typeof label === 'string' && label) ||
102
+ levelName(Object.assign(Object.assign({}, node), { properties: (_b = node.properties) !== null && _b !== void 0 ? _b : {} })));
94
103
  };
95
104
  /** The row's entity name — `properties.catalogReturnObject` when it is a string. */
96
105
  export const nodeEntityName = (node) => {
@@ -99,10 +108,19 @@ export const nodeEntityName = (node) => {
99
108
  return typeof entity === 'string' ? entity : undefined;
100
109
  };
101
110
  /* --------------------------------------------------------------- utilities */
102
- /** Deep clone (structuredClone ≈ lodash cloneDeep for wire/query JSON). */
103
- const deepClone = (value) => value === undefined ? value : structuredClone(value);
111
+ /**
112
+ * A level node's per-row copy: everything but its config subtree is cloned
113
+ * (enrichment rewrites id/properties), while `children` stays the shared
114
+ * config array — enrichment and the walkers only read it, and
115
+ * makeTreeStructureInPlace replaces it before anything is nested.
116
+ */
117
+ const cloneLevel = (node) => {
118
+ const copy = deepClone(Object.assign(Object.assign({}, node), { children: undefined }));
119
+ copy.children = node.children;
120
+ return copy;
121
+ };
104
122
  /** checkNodeIsHidden (TreeUtilities.js:2199-2229) — delegates to the runtime port. */
105
- const checkDisplayNodeHidden = (node, item, wasLazyLoaded) => isNodeHidden(node, item, wasLazyLoaded !== null && wasLazyLoaded !== void 0 ? wasLazyLoaded : false);
123
+ const checkDisplayNodeHidden = (node, item) => isNodeHidden(node, item);
106
124
  /**
107
125
  * GroupNode model port (models/GroupNode.ts:16-46) in the exact legacy display
108
126
  * shape and key order. Legacy defaulted a missing id to uuid() — makeId here.
@@ -126,30 +144,6 @@ const makeDisplayGroupNode = (init, makeId) => {
126
144
  isOutlierGroup: init.isOutlierGroup || false
127
145
  });
128
146
  };
129
- /** Port of processCatalogObjectKeysInOrder (TreeUtilities.js:365-378). */
130
- const collectCatalogObjectKeysInOrder = (tree, keys) => {
131
- var _a, _b, _c;
132
- if (!((_a = tree === null || tree === void 0 ? void 0 : tree.children) === null || _a === void 0 ? void 0 : _a.length)) {
133
- keys.push((_b = tree === null || tree === void 0 ? void 0 : tree.properties) === null || _b === void 0 ? void 0 : _b['catalogObjectKey']);
134
- }
135
- else {
136
- if ((_c = tree === null || tree === void 0 ? void 0 : tree.properties) === null || _c === void 0 ? void 0 : _c['catalogObjectKey']) {
137
- keys.push(tree.properties['catalogObjectKey']);
138
- }
139
- tree.children.forEach((node) => collectCatalogObjectKeysInOrder(node, keys));
140
- }
141
- };
142
- /** Port of processOrderedTreeData (TreeUtilities.js:380-389) — pre-order flatten. */
143
- const flattenTreeInPreOrder = (tree, treeData) => {
144
- var _a;
145
- if (!((_a = tree === null || tree === void 0 ? void 0 : tree.children) === null || _a === void 0 ? void 0 : _a.length)) {
146
- treeData.push(tree);
147
- }
148
- else {
149
- treeData.push(tree);
150
- tree.children.forEach((node) => flattenTreeInPreOrder(node, treeData));
151
- }
152
- };
153
147
  /** Port of findNodeById (TreeUtilities.js:1599-1609). */
154
148
  const findDisplayNodeById = (tree, id) => {
155
149
  let result = null;
@@ -193,10 +187,9 @@ const findDisplayNodesByIdAndLabel = (tree, id, label) => {
193
187
  };
194
188
  /* ------------------------------------------------------ drag-source derivation */
195
189
  /**
196
- * DRAGGABILITY IS DERIVED IN 'config' MODE (it is authored in 'legacy-data' —
197
- * see makeTreeStructureInPlace). A row can only be picked up where dropping it
198
- * somewhere would do something, so the drag side is computed from the drop side
199
- * rather than ticked on its own:
190
+ * DRAGGABILITY IS DERIVED (see makeTreeStructureInPlace). A row can only be
191
+ * picked up where dropping it somewhere would do something, so the drag side is
192
+ * computed from the drop side rather than ticked on its own:
200
193
  *
201
194
  * a level's rows are draggable ⟺ SOME level of the tree carries an
202
195
  * `On_Node_Drop` node action whose `dragEntityName` accepts this level's
@@ -205,9 +198,9 @@ const findDisplayNodesByIdAndLabel = (tree, id, label) => {
205
198
  * That is exactly the accept rule the drop side already runs — the target row's
206
199
  * accepts are its On_Node_Drop actions' dragEntityNames
207
200
  * (InquiryFluentTreeMenu.jsx itemDropAccepts), matched against the source row's
208
- * `catalogReturnObject` drag tag case-insensitively, with `'*'` accepting
209
- * anything (udp-tree's dragMatchesAccepts). Deriving from the same rule is what
210
- * makes "draggable" and "droppable" impossible to disagree.
201
+ * `catalogReturnObject` drag tag case-insensitively (isDragEntity). Deriving
202
+ * from the same rule is what makes "draggable" and "droppable" impossible to
203
+ * disagree.
211
204
  *
212
205
  * Trigger type is the whole gate, as on the drop side: whether the action then
213
206
  * runs an API or opens a page is the drop handler's business, not the grip's.
@@ -218,7 +211,14 @@ const findDisplayNodesByIdAndLabel = (tree, id, label) => {
218
211
  * as the drop side compares it (a wire enum: the number 1, never a name).
219
212
  */
220
213
  const ON_NODE_DROP_TRIGGER = 1;
221
- /** `'*'` in the returned set means "every entity is accepted somewhere". */
214
+ /** An entity name as a drag tag: the full name, case-folded (blank if none). */
215
+ const dragTag = (entityName) => typeof entityName === 'string' ? entityName.toLowerCase() : '';
216
+ /** Whether a drop action's `dragEntityName` names `entityName` — the gate's rule. */
217
+ export const isDragEntity = (dragEntityName, entityName) => {
218
+ const tag = dragTag(entityName);
219
+ return !!tag && dragTag(dragEntityName) === tag;
220
+ };
221
+ /** The drag tags some level's On_Node_Drop actions accept. */
222
222
  export const collectDropSourceEntities = (levels) => {
223
223
  const accepted = new Set();
224
224
  (levels !== null && levels !== void 0 ? levels : []).forEach((level) => {
@@ -230,10 +230,9 @@ export const collectDropSourceEntities = (levels) => {
230
230
  const row = action;
231
231
  if ((row === null || row === void 0 ? void 0 : row.triggerType) !== ON_NODE_DROP_TRIGGER)
232
232
  return;
233
- const entity = row === null || row === void 0 ? void 0 : row.dragEntityName;
234
- if (typeof entity === 'string' && entity) {
235
- accepted.add(entity.toLowerCase());
236
- }
233
+ const tag = dragTag(row === null || row === void 0 ? void 0 : row.dragEntityName);
234
+ if (tag)
235
+ accepted.add(tag);
237
236
  });
238
237
  });
239
238
  return accepted;
@@ -242,10 +241,19 @@ export const collectDropSourceEntities = (levels) => {
242
241
  export const isDraggableLevel = (node, acceptedEntities) => {
243
242
  if (!node || node.isGroupNode)
244
243
  return false;
245
- if (acceptedEntities.has('*'))
246
- return true;
247
- const entity = nodeEntityName(node);
248
- return entity ? acceptedEntities.has(entity.toLowerCase()) : false;
244
+ const tag = dragTag(nodeEntityName(node));
245
+ return !!tag && acceptedEntities.has(tag);
246
+ };
247
+ /**
248
+ * A hideEmptyGroups heading with no record anywhere under it. Lazily fetched
249
+ * levels keep every heading (so a Show More page merges into them in config
250
+ * order); the menu hides these when it draws the tree.
251
+ */
252
+ export const isEmptyHiddenHeading = (node) => {
253
+ var _a;
254
+ return !!(node === null || node === void 0 ? void 0 : node.isGroupNode) &&
255
+ !!node.hideEmptyGroups &&
256
+ ((_a = node.children) !== null && _a !== void 0 ? _a : []).every(isEmptyHiddenHeading);
249
257
  };
250
258
  /* ------------------------------------------------------ tree structure port */
251
259
  /**
@@ -256,41 +264,26 @@ export const isDraggableLevel = (node, acceptedEntities) => {
256
264
  * the presence of parentGroupId), prunes empty hideEmptyGroups groups, and
257
265
  * returns a single root bare or several as an array.
258
266
  */
259
- const makeTreeStructureInPlace = (treeData, key, parentKey, parentGroupKey = 'parentGroupId', loadMode = DEFAULT_LOAD_MODE) => {
267
+ const makeTreeStructureInPlace = (treeData, key, parentKey, parentGroupKey = 'parentGroupId') => {
260
268
  var _a;
261
269
  if (!treeData) {
262
270
  return [];
263
271
  }
264
- // config: a level opens because something EAGER renders under it; every other
265
- // level is a closed folder. legacy-data: the authored flags decide, exactly
266
- // as v1 seeded them. `defaultDisplay: 'collapsed'` forces closed either way.
267
- const parentsOfEagerLevels = new Set();
268
- if (loadMode === 'config') {
269
- treeData.forEach((node) => {
270
- if (!(node === null || node === void 0 ? void 0 : node.isGroupNode) && isEagerLevel(node)) {
271
- parentsOfEagerLevels.add(node[parentKey]);
272
- }
273
- });
274
- }
275
- // config: draggability is DERIVED from the tree's drop actions (see
276
- // collectDropSourceEntities) and the authored `isDraggable` flag has no say —
277
- // a grip nothing would accept is a lie. legacy-data: the flag decides, exactly
278
- // as v1 has always read it.
279
- const dropSourceEntities = loadMode === 'config'
280
- ? collectDropSourceEntities(treeData)
281
- : new Set();
272
+ // A level opens because something EAGER renders under it — it has a child
273
+ // level and loads its children eagerly; every other level is a closed
274
+ // folder. `defaultDisplay: 'collapsed'` forces closed.
275
+ const parentsOfLevels = new Set();
276
+ treeData.forEach((node) => {
277
+ if (!(node === null || node === void 0 ? void 0 : node.isGroupNode))
278
+ parentsOfLevels.add(node[parentKey]);
279
+ });
282
280
  treeData.forEach((node) => {
283
281
  node.children = [];
284
- if (loadMode === 'config' && !node.isGroupNode) {
285
- node.properties['isDraggable'] = isDraggableLevel(node, dropSourceEntities);
286
- }
287
282
  if (node['isExpanded'] === undefined && !node.isGroupNode) {
288
283
  node.isExpanded =
289
- loadMode === 'config'
290
- ? node.properties['defaultDisplay'] !== 'collapsed' &&
291
- parentsOfEagerLevels.has(node[key])
292
- : !(node.properties['defaultDisplay'] === 'collapsed' ||
293
- node.properties['lazyLoad']);
284
+ node.properties['defaultDisplay'] !== 'collapsed' &&
285
+ !loadsChildrenLazily(node) &&
286
+ parentsOfLevels.has(node[key]);
294
287
  }
295
288
  });
296
289
  const roots = treeData.filter((node) => !((node === null || node === void 0 ? void 0 : node.isGroupNode) ? node[parentGroupKey] : node[parentKey]));
@@ -352,126 +345,80 @@ const makeTreeStructureInPlace = (treeData, key, parentKey, parentGroupKey = 'pa
352
345
  return filteredRoots;
353
346
  };
354
347
  /**
355
- * Pure port of makeTreeStructure (TreeUtilities.js:17-93) — flat display/wire
348
+ * Pure port of makeTreeStructure (TreeUtilities.js:17-93) — the tree's flat
356
349
  * nodes → nested display seed. Legacy mutated the caller's treeStructure
357
350
  * (poisoning shared caches); this deep-clones the input first, so the caller's
358
351
  * array is never touched. Defaults match every legacy call site
359
352
  * (`makeTreeStructure(ts, 'id', 'parentId')` — InquiryContainer.jsx:569,:731,
360
353
  * :1140,:1293,:1811,:2143,:2558).
361
354
  */
362
- export const makeDisplayTreeStructure = (treeData, key = 'id', parentKey = 'parentId', parentGroupKey = 'parentGroupId',
363
- /** Which rule seeds `isExpanded` (see LoadMode). Defaults to v1's. */
364
- loadMode = DEFAULT_LOAD_MODE) => {
355
+ export const makeDisplayTreeStructure = (treeData, key = 'id', parentKey = 'parentId', parentGroupKey = 'parentGroupId') => {
365
356
  if (!treeData) {
366
357
  return [];
367
358
  }
368
- return makeTreeStructureInPlace(deepClone(treeData), key, parentKey, parentGroupKey, loadMode);
369
- };
370
- /** The safe default: unopted callers keep v1 semantics. */
371
- export const DEFAULT_LOAD_MODE = 'legacy-data';
372
- /**
373
- * v1's eager/lazy rule, preserved verbatim (this is the former
374
- * `resolveLoadMode`):
375
- *
376
- * A child level renders from nested eager data when the parent row carries
377
- * it; otherwise it loads lazily. `properties.lazyLoad` is a FORCED-LAZY
378
- * OVERRIDE — a level marked lazy ignores whatever eager data the row happens
379
- * to carry.
380
- *
381
- * - the row carries the child's catalogObjectKey (any value, `[]` included)
382
- * → eager: the level renders from that data, no descriptors, groups apply;
383
- * - the row carries null/undefined/no key at all
384
- * → lazy: search descriptors are built so the menu shows a chevron and
385
- * pages the level in on expand;
386
- * - a child level with no catalogObjectKey binds to no data and takes no
387
- * part in the decision.
388
- *
389
- * @deprecated Dies with v1 (`src/inquiry/InquiryContainer.jsx`). New code
390
- * passes `loadMode: 'config'`; nothing else may call this.
391
- */
392
- export const resolveLegacyLoadMode = (node, parentRow) => {
393
- var _a;
394
- var _b;
395
- const children = (_b = node === null || node === void 0 ? void 0 : node.children) !== null && _b !== void 0 ? _b : [];
396
- if ((_a = node === null || node === void 0 ? void 0 : node.properties) === null || _a === void 0 ? void 0 : _a['lazyLoad']) {
397
- return {
398
- eagerChildKeys: new Set(),
399
- lazyChildNodes: children,
400
- forcedLazy: true
401
- };
402
- }
403
- const row = parentRow !== null && parentRow !== void 0 ? parentRow : {};
404
- const eagerChildKeys = new Set();
405
- const lazyChildNodes = [];
406
- children.forEach((child) => {
407
- var _a;
408
- const key = (_a = child === null || child === void 0 ? void 0 : child.properties) === null || _a === void 0 ? void 0 : _a['catalogObjectKey'];
409
- if (!key)
410
- return;
411
- if (row[key] == null)
412
- lazyChildNodes.push(child);
413
- else
414
- eagerChildKeys.add(key);
359
+ // The clone is the seed: each config node, free to take on display state.
360
+ const levels = deepClone(treeData);
361
+ // Draggability is DERIVED from the whole tree's drop actions (see
362
+ // collectDropSourceEntities) and the authored `isDraggable` flag has no say —
363
+ // a grip nothing would accept is a lie. Stamped once on the seed; a row
364
+ // inherits it from its level, whichever subtree it is composed in.
365
+ const dropSourceEntities = collectDropSourceEntities(levels);
366
+ levels.forEach((node) => {
367
+ if (!node.isGroupNode)
368
+ node.draggable = isDraggableLevel(node, dropSourceEntities);
415
369
  });
416
- return { eagerChildKeys, lazyChildNodes, forcedLazy: false };
370
+ return makeTreeStructureInPlace(levels, key, parentKey, parentGroupKey);
417
371
  };
418
372
  /**
419
- * v2's eager/lazy rule: config decides. An eager level whose rows the wave
420
- * loader could not fetch renders EMPTY — it never silently becomes lazy — and
421
- * a lazy level ignores anything that happens to ride the row.
373
+ * THE EAGER/LAZY SPLIT for one level: config decides (loadsChildrenLazily). An
374
+ * eager level whose rows the wave loader could not fetch renders EMPTY — it
375
+ * never silently becomes lazy — and a lazy level ignores anything that happens
376
+ * to ride the row. Nothing downstream re-decides it.
422
377
  */
423
- const resolveConfiguredLoadMode = (node) => {
378
+ export const splitChildLevels = (node) => {
424
379
  var _a;
425
380
  const eagerChildKeys = new Set();
426
381
  const lazyChildNodes = [];
382
+ const lazy = loadsChildrenLazily(node);
427
383
  ((_a = node === null || node === void 0 ? void 0 : node.children) !== null && _a !== void 0 ? _a : []).forEach((child) => {
428
384
  var _a;
429
385
  const key = (_a = child === null || child === void 0 ? void 0 : child.properties) === null || _a === void 0 ? void 0 : _a['catalogObjectKey'];
430
386
  if (!key)
431
387
  return;
432
- if (isEagerLevel(child))
433
- eagerChildKeys.add(key);
434
- else
388
+ if (lazy)
435
389
  lazyChildNodes.push(child);
390
+ else
391
+ eagerChildKeys.add(key);
436
392
  });
437
- return { eagerChildKeys, lazyChildNodes, forcedLazy: false };
393
+ return { eagerChildKeys, lazyChildNodes };
438
394
  };
439
- /**
440
- * THE EAGER/LAZY SPLIT for one level, under the caller's chosen rule. Nothing
441
- * downstream re-decides it.
442
- */
443
- export const splitChildLevels = (node, loadMode = DEFAULT_LOAD_MODE, parentRow) => loadMode === 'config'
444
- ? resolveConfiguredLoadMode(node)
445
- : resolveLegacyLoadMode(node, parentRow);
446
395
  /* ------------------------------------------------------- node enrichment */
447
396
  /**
448
397
  * In-place port of processObjIndex (TreeUtilities.js:594-716), composed from
449
398
  * the runtime.ts ports where legacy wrote properties: the
450
399
  * conditionalNodeIcon… and conditionalNodeAdornment… triples via
451
- * evaluateConditionalIconParts/evaluateConditionalAdornmentParts,
452
- * searchIdentifier/filterElements/searchValue via getSearchIdentifiers +
453
- * buildRuntimeSearchState (one documented micro-divergence: a falsy non-nullish
454
- * associatedTreePrimaryKeyMap value ('') resolves to '' instead of the
455
- * identifier name — buildRuntimeSearchState uses ?? where legacy used a
456
- * ternary), labels via resolveDisplayName/Details/HeaderTitle, and
457
- * lazyLoadChildrenArr via buildLazyLoadDescriptors (getLazyLoadChildrenArr
458
- * :735-957 including the 'Error: Promote …' message, last child wins).
400
+ * evaluateConditionalIconParts/evaluateConditionalAdornmentParts, searchValue
401
+ * via buildRuntimeSearchState (one documented micro-divergence: a falsy
402
+ * non-nullish associatedTreePrimaryKeyMap value ('') resolves to '' instead of
403
+ * the identifier name — buildRuntimeSearchState uses ?? where legacy used a
404
+ * ternary), labels via resolveDisplayName/Details, and lazyLoadChildrenArr +
405
+ * childState via buildLazyLoadDescriptors (getLazyLoadChildrenArr :735-957
406
+ * including the 'Error: Promote …' message, last child wins).
459
407
  *
460
408
  * The eager/lazy split is NOT decided here — it asks splitChildLevels (the one
461
409
  * owner) and returns that split so the walkers can honor it without
462
410
  * re-deriving it.
463
411
  */
464
- const processObjIndexInPlace = (node, obj, parentId, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode) => {
465
- const entityView = node;
412
+ const processObjIndexInPlace = (node, obj, parentId, { makeId, catalogObjects, promotedEntities }) => {
466
413
  const props = node.properties;
467
- const iconParts = evaluateConditionalIconParts(entityView, obj, wasLazyLoaded !== null && wasLazyLoaded !== void 0 ? wasLazyLoaded : false);
414
+ const iconParts = evaluateConditionalIconParts(node, obj);
468
415
  if (iconParts) {
469
416
  props['conditionalNodeIconName'] = iconParts.name;
470
417
  props['conditionalNodeIconColor'] = iconParts.colorHex;
471
418
  props['conditionalNodeIconType'] = iconParts.type;
472
419
  props['conditionalNodeIconFluentName'] = iconParts.fluentName;
473
420
  }
474
- const adornmentParts = evaluateConditionalAdornmentParts(entityView, obj, wasLazyLoaded !== null && wasLazyLoaded !== void 0 ? wasLazyLoaded : false);
421
+ const adornmentParts = evaluateConditionalAdornmentParts(node, obj);
475
422
  if (adornmentParts) {
476
423
  props['conditionalNodeAdornmentName'] = adornmentParts.name;
477
424
  props['conditionalNodeAdornmentColor'] = adornmentParts.colorHex;
@@ -479,20 +426,10 @@ const processObjIndexInPlace = (node, obj, parentId, catalogObjects, promotedEnt
479
426
  props['conditionalNodeAdornmentFluentName'] = adornmentParts.fluentName;
480
427
  }
481
428
  if (props['catalogReturnObject']) {
482
- const catalogIdentifiers = getSearchIdentifiers(catalogObjects, props['catalogReturnObject']);
483
- props['searchIdentifier'] = catalogIdentifiers.join(',');
484
- const associatedTreePrimaryKeyMap = props['associatedTreePrimaryKeyMap'];
485
- if (associatedTreePrimaryKeyMap) {
486
- // legacy stores the raw key ARRAY here, not a joined string (:668-669)
487
- props['searchIdentifier'] = Object.keys(associatedTreePrimaryKeyMap);
488
- }
489
- const searchState = buildRuntimeSearchState(entityView, obj, catalogObjects);
490
- props['filterElements'] = searchState.filterElements;
491
- props['searchValue'] = searchState.searchValue;
429
+ props['searchValue'] = buildRuntimeSearchState(node, obj, catalogObjects).searchValue;
492
430
  }
493
- props['nodeLabel'] = resolveDisplayName(entityView, obj);
494
- props['nodeSubLabel'] = resolveDisplayDetails(entityView, obj);
495
- props['headerTitle'] = resolveHeaderTitle(entityView, obj);
431
+ props['nodeLabel'] = resolveDisplayName(node, obj);
432
+ props['nodeSubLabel'] = resolveDisplayDetails(node, obj);
496
433
  node.parentId = parentId;
497
434
  node['entityNodeParentId'] = parentId;
498
435
  // Display ids are re-minted per row (and again by the group paths), so the
@@ -502,28 +439,15 @@ const processObjIndexInPlace = (node, obj, parentId, catalogObjects, promotedEnt
502
439
  node['configNodeId'] = node.id;
503
440
  node.id = makeId();
504
441
  node.nodeObj = obj;
505
- // ONE rule, one owner (splitChildLevels) — which rule is the caller's choice.
506
- const split = splitChildLevels(node, loadMode, obj);
507
- if (split.forcedLazy) {
508
- // legacy-data: the authored flag already says lazy, so the wire flag stands
509
- // and descriptors are built for EVERY child level (:709-715).
510
- const { descriptors, errorRetrievingChildren } = buildLazyLoadDescriptors(entityView, obj, split.lazyChildNodes, catalogObjects, promotedEntities);
511
- node.lazyLoadChildrenArr = descriptors;
512
- if (errorRetrievingChildren) {
513
- node['errorRetrievingChildren'] = errorRetrievingChildren;
514
- }
515
- }
516
- else if (split.lazyChildNodes.length) {
517
- const { descriptors, errorRetrievingChildren } = buildLazyLoadDescriptors(entityView, obj, split.lazyChildNodes, catalogObjects, promotedEntities);
442
+ // ONE rule, one owner (splitChildLevels).
443
+ const split = splitChildLevels(node);
444
+ if (split.lazyChildNodes.length) {
445
+ const { descriptors, errorRetrievingChildren } = buildLazyLoadDescriptors(node, obj, split.lazyChildNodes, catalogObjects, promotedEntities);
518
446
  if (descriptors.length || errorRetrievingChildren) {
519
- // The DISPLAY-side lazy marker the tree menu reads to draw a chevron and
520
- // to run its expand fetch. It is written here, never read from the wire.
521
- props['lazyLoad'] = true;
522
- // Nothing eager to show underneath → the row starts closed. Under
523
- // 'config' the seed already decided this, so it is a no-op there.
524
- if (!split.eagerChildKeys.size) {
525
- node.isExpanded = false;
526
- }
447
+ // What the tree menu reads to draw a chevron and run its expand fetch.
448
+ node.childState = errorRetrievingChildren ? 'error' : 'lazy';
449
+ // Lazy levels → nothing renders underneath until the expand fetches it.
450
+ node.isExpanded = false;
527
451
  node.lazyLoadChildrenArr = descriptors;
528
452
  if (errorRetrievingChildren) {
529
453
  node['errorRetrievingChildren'] = errorRetrievingChildren;
@@ -533,6 +457,16 @@ const processObjIndexInPlace = (node, obj, parentId, catalogObjects, promotedEnt
533
457
  return split;
534
458
  };
535
459
  /* ------------------------------------------------------------ static groups */
460
+ /**
461
+ * The level's groupings of `groupType` when grouping is enabled, else [].
462
+ * Legacy's unguarded `groupings[groupType]` read (:1784) is kept.
463
+ */
464
+ const groupingsOf = (groupConfiguration, groupType) => {
465
+ var _a;
466
+ return (groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.enabled)
467
+ ? ((_a = groupConfiguration.groupings[groupType]) !== null && _a !== void 0 ? _a : [])
468
+ : [];
469
+ };
536
470
  /**
537
471
  * In-place port of makeTreeStaticGroupStructure (TreeUtilities.js:95-145):
538
472
  * replaces each ordered group config with a display GroupNode (quirk kept:
@@ -543,7 +477,7 @@ const processObjIndexInPlace = (node, obj, parentId, catalogObjects, promotedEnt
543
477
  * subgroup hides when empty just like its top-level heading — legacy forwarded
544
478
  * it to the top group only, which left empty subgroup headings on screen.
545
479
  */
546
- const makeTreeStaticGroupStructureInPlace = (treeData, key, parentKey, groupType, makeId, hideEmptyGroups) => {
480
+ const makeTreeStaticGroupStructureInPlace = (treeData, key, groupType, makeId, hideEmptyGroups) => {
547
481
  if (!treeData) {
548
482
  return [];
549
483
  }
@@ -590,20 +524,18 @@ const makeTreeStaticGroupStructureInPlace = (treeData, key, parentKey, groupType
590
524
  * apiMethodInstanceId/children inside properties (:1821), outlier==='group'
591
525
  * adds the outlier group node. Divergence from legacy (:1824): hideEmptyGroups
592
526
  * is stamped on EVERY heading this builds — subgroups and the ungrouped-records
593
- * outlier heading included, not just the top group — and an
594
- * absent flag reads as ON — the Tree Builder's "Hide empty groups" toggle
595
- * shows ON for a config that never stored the key, so treating it as OFF here
596
- * left empty headings on screen against what the builder promised.
527
+ * outlier heading included, not just the top group. An absent flag reads as
528
+ * OFF, as legacy and the Tree Builder's toggle read it.
597
529
  */
598
530
  const constructStaticNodeGroupsInPlace = (tree, shouldUseNewId, makeId) => {
599
- var _a, _b;
531
+ var _a;
600
532
  const nodeGroups = [];
601
533
  const groupConfiguration = (_a = tree === null || tree === void 0 ? void 0 : tree.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
602
534
  const groupType = ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType)) || NODE_GROUP_TYPE.Static;
603
- const hideEmptyGroups = (groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.hideEmptyGroups) !== false;
604
- if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.enabled) &&
605
- ((_b = groupConfiguration.groupings[groupType]) === null || _b === void 0 ? void 0 : _b.length)) {
606
- groupConfiguration.groupings[groupType].forEach((grouping) => {
535
+ const hideEmptyGroups = (groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.hideEmptyGroups) === true;
536
+ const groupings = groupingsOf(groupConfiguration, groupType);
537
+ if (groupings.length) {
538
+ groupings.forEach((grouping) => {
607
539
  var _a;
608
540
  const orderedGroups = orderGroupsByOrder((_a = grouping === null || grouping === void 0 ? void 0 : grouping.groups) !== null && _a !== void 0 ? _a : []);
609
541
  // key is old id, value is new id (:1790)
@@ -629,7 +561,7 @@ const constructStaticNodeGroupsInPlace = (tree, shouldUseNewId, makeId) => {
629
561
  const firstGroup = orderedGroups.find((group) => !group.parentGroupId) ||
630
562
  orderedGroups[0];
631
563
  orderedGroups.shift();
632
- const displayTree = makeTreeStaticGroupStructureInPlace(orderedGroups, 'id', 'parentGroupId', groupType, makeId, hideEmptyGroups);
564
+ const displayTree = makeTreeStaticGroupStructureInPlace(orderedGroups, 'id', groupType, makeId, hideEmptyGroups);
633
565
  const { id, isExpanded } = firstGroup, firstGroupProperties = __rest(firstGroup, ["id", "isExpanded"]);
634
566
  const groupNode = makeDisplayGroupNode({
635
567
  id: id,
@@ -663,7 +595,7 @@ const updateNodeForStaticGroupingInPlace = (displayTree, nodeGroup, nodeChildren
663
595
  // Only clone deep on children to handle multiple of same node
664
596
  // references in different groups. (:1669-1671)
665
597
  const updatedDisplayTree = Object.assign({}, displayTree);
666
- const nodeIsHidden = checkDisplayNodeHidden(updatedDisplayTree, item, false);
598
+ const nodeIsHidden = checkDisplayNodeHidden(updatedDisplayTree, item);
667
599
  if (!nodeIsHidden) {
668
600
  updatedDisplayTree.children = displayTree.children
669
601
  ? deepClone(displayTree.children)
@@ -693,13 +625,13 @@ const updateNodeForStaticGroupingInPlace = (displayTree, nodeGroup, nodeChildren
693
625
  * is provided the group node itself is pushed once (dedup by id, hidden check).
694
626
  */
695
627
  const processItemForStaticNodeGroupInPlace = (nodeGroup, item, groupedItemIndexes, displayTree, index, scopedGroupItemIndexes = new Set(), treeList, nodeChildren = []) => {
696
- var _a, _b, _c;
628
+ var _a, _b;
697
629
  const propertyMapping = (_a = nodeGroup === null || nodeGroup === void 0 ? void 0 : nodeGroup.properties) === null || _a === void 0 ? void 0 : _a['propertyMapping'];
698
630
  const groupJsonLogic = (_b = nodeGroup === null || nodeGroup === void 0 ? void 0 : nodeGroup.properties) === null || _b === void 0 ? void 0 : _b['jsonLogic'];
699
631
  if (propertyMapping && groupJsonLogic) {
700
632
  const rule = mapRuleVariables(propertyMapping, groupJsonLogic);
701
633
  if (rule &&
702
- applyRule(rule, item, (_c = item.properties) === null || _c === void 0 ? void 0 : _c.joiningEntityCatalogObjectKey, false)) {
634
+ applyRule(rule, item)) {
703
635
  let itemAdded = false;
704
636
  nodeGroup.children.forEach((childGroup) => {
705
637
  var _a;
@@ -725,7 +657,7 @@ const processItemForStaticNodeGroupInPlace = (nodeGroup, item, groupedItemIndexe
725
657
  .filter((node) => node.isGroupNode)
726
658
  .find((eg) => eg.id === nodeGroup.id);
727
659
  if (!existingGroup) {
728
- const nodeIsHidden = checkDisplayNodeHidden(nodeGroup, item, false);
660
+ const nodeIsHidden = checkDisplayNodeHidden(nodeGroup, item);
729
661
  if (!nodeIsHidden)
730
662
  treeList.push(nodeGroup);
731
663
  }
@@ -779,7 +711,7 @@ const updateTreeIdsInPlace = (node, lastEntityNodeId, newId, newParentId, parent
779
711
  }
780
712
  };
781
713
  /** In-place port of processGroupNodesAndAddToTreeList (TreeUtilities.js:2145-2179). */
782
- const processGroupNodesAndAddToTreeListInPlace = (node, treeList, lastEntityNodeId, item, wasLazyLoaded) => {
714
+ const processGroupNodesAndAddToTreeListInPlace = (node, treeList, lastEntityNodeId, item) => {
783
715
  var _a;
784
716
  let entityNodeParentId = lastEntityNodeId;
785
717
  if (treeList) {
@@ -791,15 +723,51 @@ const processGroupNodesAndAddToTreeListInPlace = (node, treeList, lastEntityNode
791
723
  if (!node.isGroupNode) {
792
724
  entityNodeParentId = node.id;
793
725
  }
794
- const nodeIsHidden = checkDisplayNodeHidden(node, item, wasLazyLoaded);
726
+ const nodeIsHidden = checkDisplayNodeHidden(node, item);
795
727
  if (!nodeIsHidden)
796
728
  treeList.push(node);
797
729
  }
798
730
  }
799
731
  if ((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.length) {
800
- node.children.forEach((child) => processGroupNodesAndAddToTreeListInPlace(child, treeList, entityNodeParentId, item, wasLazyLoaded));
732
+ node.children.forEach((child) => processGroupNodesAndAddToTreeListInPlace(child, treeList, entityNodeParentId, item));
801
733
  }
802
734
  };
735
+ /* ------------------------------------------------------------ blank groups */
736
+ /**
737
+ * The heading a group-by-field level gives records with NO value for the field.
738
+ * Deliberate divergence from legacy, which left those records loose beside the
739
+ * headings (v1 :2092-2093, v2 :2697-2735): a field's values are the groups, and
740
+ * no value is one of them — the grouped-list convention (a "(Blank)" group,
741
+ * listed last). The heading carries `properties.blank`, so a renderer can
742
+ * translate the label.
743
+ */
744
+ export const BLANK_GROUP_LABEL = '(Blank)';
745
+ const isBlankGroup = (node) => {
746
+ var _a;
747
+ return !!node.isGroupNode && ((_a = node.properties) === null || _a === void 0 ? void 0 : _a['blank']) === true;
748
+ };
749
+ /** Blank headings after their siblings, at every depth of the headings. */
750
+ const blankGroupsLastInPlace = (nodes) => {
751
+ nodes.sort((a, b) => Number(isBlankGroup(a)) - Number(isBlankGroup(b)));
752
+ nodes.forEach((node) => {
753
+ var _a;
754
+ if (node.isGroupNode)
755
+ blankGroupsLastInPlace((_a = node.children) !== null && _a !== void 0 ? _a : []);
756
+ });
757
+ };
758
+ /**
759
+ * A row's group label for one field (v1 path): the field's value, or the blank
760
+ * label when it has none. A falsy value that IS a value (0, false) is given as
761
+ * text, so the truthiness checks legacy guards its headings with let it through.
762
+ */
763
+ const dynamicGroupLabelOf = (item, property) => {
764
+ if (!property)
765
+ return null;
766
+ const value = getLabelFromProperty(item, property);
767
+ if (value === null || value === undefined || value === '')
768
+ return BLANK_GROUP_LABEL;
769
+ return value || toWireString(value);
770
+ };
803
771
  /* --------------------------------------------------------- dynamic groups v1 */
804
772
  /** In-place port of makeDynamicTreeStructure (TreeUtilities.js:254-278). */
805
773
  const makeDynamicTreeStructureInPlace = (treeData, key, parentKey) => {
@@ -830,7 +798,7 @@ const makeDynamicTreeStructureInPlace = (treeData, key, parentKey) => {
830
798
  /** Port of makeDynamicGroupTree (TreeUtilities.js:217-252) — display GroupNode variant. */
831
799
  const makeDynamicGroupTreeLocal = (node, item, parentGroupNode, makeId) => {
832
800
  const { id, children, apiMethodInstanceId, parentGroupId, order, property, label, isExpanded } = node, groupProperties = __rest(node, ["id", "children", "apiMethodInstanceId", "parentGroupId", "order", "property", "label", "isExpanded"]);
833
- const updatedLabel = property ? getLabelFromProperty(item, property) : null;
801
+ const updatedLabel = dynamicGroupLabelOf(item, property);
834
802
  if (updatedLabel) {
835
803
  const groupNode = makeDisplayGroupNode({
836
804
  id: `${id}`,
@@ -838,7 +806,7 @@ const makeDynamicGroupTreeLocal = (node, item, parentGroupNode, makeId) => {
838
806
  children: [],
839
807
  parentGroupId: (parentGroupNode === null || parentGroupNode === void 0 ? void 0 : parentGroupNode.id) || null,
840
808
  isExpanded,
841
- properties: Object.assign(Object.assign({ label: updatedLabel }, groupProperties), { propertyKey: property })
809
+ properties: Object.assign(Object.assign(Object.assign({ label: updatedLabel }, groupProperties), { propertyKey: property }), (updatedLabel === BLANK_GROUP_LABEL ? { blank: true } : {}))
842
810
  }, makeId);
843
811
  if (parentGroupNode) {
844
812
  parentGroupNode.children.push(groupNode);
@@ -854,7 +822,7 @@ const makeDynamicGroupTreeLocal = (node, item, parentGroupNode, makeId) => {
854
822
  const processDynamicGroupForCurrentNodeLevelLocal = (item, node, groupStructures, previousFilteredGroups, makeId) => {
855
823
  var _a;
856
824
  const { property, id } = node;
857
- const label = property ? getLabelFromProperty(item, property) : null;
825
+ const label = dynamicGroupLabelOf(item, property);
858
826
  let filteredGroups = [];
859
827
  previousFilteredGroups.forEach((group) => {
860
828
  if (group) {
@@ -904,12 +872,14 @@ const makeDynamicGroupStructuresLocal = (treeStructure, results, makeId) => {
904
872
  * the buggy id-only lookup below the root (:2080), unmatched rows land in
905
873
  * EVERY previous-level matched group (:2097-2102), single-group configs push
906
874
  * the display tree as a top-level sibling into the group set (:2092-2093).
875
+ * A row with no value for the group field joins the "(Blank)" group
876
+ * (dynamicGroupLabelOf).
907
877
  */
908
878
  const processItemForDynamicNodeGroupsInPlace = (displayTree, node, groupNodes, previousFilteredGroups = [], isSingleGroup = false) => {
909
879
  var _a;
910
880
  const { property, id } = node;
911
881
  const item = displayTree === null || displayTree === void 0 ? void 0 : displayTree.nodeObj;
912
- const label = property ? getLabelFromProperty(item, property) : null;
882
+ const label = dynamicGroupLabelOf(item, property);
913
883
  let filteredGroups = [];
914
884
  previousFilteredGroups.forEach((group) => {
915
885
  if (group) {
@@ -950,20 +920,20 @@ const processItemForDynamicNodeGroupsInPlace = (displayTree, node, groupNodes, p
950
920
  /**
951
921
  * In-place port of constructDynamicNodeGroups (TreeUtilities.js:1886-1975) —
952
922
  * the v1 dynamic path processReferences uses (:444). Builds a display tree per
953
- * row against the (already-cloned) node subtree — with catalogObjects/
954
- * promotedEntities null and wasLazyLoaded false, exactly like legacy
955
- * (:1940-1948) — assigns non-hidden rows into the group forest, then re-issues
923
+ * row against the (already-cloned) node subtree, in the caller's build
924
+ * context, assigns non-hidden rows into the group forest, then re-issues
956
925
  * every id (updateTreeIds :1966-1968). MUTATES the node's cloned
957
926
  * groupConfiguration like legacy.
958
927
  */
959
- const constructDynamicNodeGroupsInPlace = (results, tree, shouldUseNewId, makeId, loadMode) => {
960
- var _a, _b;
928
+ const constructDynamicNodeGroupsInPlace = (results, tree, shouldUseNewId, context) => {
929
+ var _a;
930
+ const { makeId } = context;
961
931
  let nodeGroups = [];
962
932
  const groupConfiguration = (_a = tree === null || tree === void 0 ? void 0 : tree.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
963
933
  const groupType = ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType)) || NODE_GROUP_TYPE.Dynamic;
964
- if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.enabled) &&
965
- ((_b = groupConfiguration.groupings[groupType]) === null || _b === void 0 ? void 0 : _b.length)) {
966
- groupConfiguration.groupings[groupType].forEach((grouping) => {
934
+ const groupings = groupingsOf(groupConfiguration, groupType);
935
+ if (groupings.length) {
936
+ groupings.forEach((grouping) => {
967
937
  var _a;
968
938
  const orderedGroups = orderGroupsByOrder((_a = grouping === null || grouping === void 0 ? void 0 : grouping.groups) !== null && _a !== void 0 ? _a : []);
969
939
  const newIdMap = {};
@@ -987,20 +957,15 @@ const constructDynamicNodeGroupsInPlace = (results, tree, shouldUseNewId, makeId
987
957
  const isSingleGroup = orderedGroups.length === 1;
988
958
  const dynamicTreeStructure = makeDynamicTreeStructureInPlace(orderedGroups, 'id', 'parentGroupId');
989
959
  const groupSet = makeDynamicGroupStructuresLocal(dynamicTreeStructure, results, makeId);
990
- const orderedKeys = [];
991
- const orderedTreeData = [];
992
- collectCatalogObjectKeysInOrder(tree, orderedKeys);
993
- flattenTreeInPreOrder(tree, orderedTreeData);
994
960
  results.forEach((item) => {
995
- const treeArr = [];
996
- processObjectToTreeInPlace(item, orderedTreeData, orderedKeys, treeArr, null, null, false, makeId, loadMode);
997
- const displayTree = makeTreeStructureInPlace(treeArr, 'id', 'parentId', 'parentGroupId', loadMode);
961
+ const displayTree = composeRowTree(item, tree, context);
998
962
  const updatedDisplayTree = deepClone(displayTree);
999
- const nodeIsHidden = checkDisplayNodeHidden(updatedDisplayTree, item, false);
963
+ const nodeIsHidden = checkDisplayNodeHidden(updatedDisplayTree, item);
1000
964
  if (!nodeIsHidden) {
1001
965
  processItemForDynamicNodeGroupsInPlace(updatedDisplayTree, dynamicTreeStructure, groupSet, groupSet, isSingleGroup);
1002
966
  }
1003
967
  });
968
+ blankGroupsLastInPlace(groupSet);
1004
969
  groupSet.forEach((group) => updateTreeIdsInPlace(group, null, makeId(), makeId(), null, makeId));
1005
970
  nodeGroups = nodeGroups.concat(groupSet);
1006
971
  }
@@ -1011,181 +976,94 @@ const constructDynamicNodeGroupsInPlace = (results, tree, shouldUseNewId, makeId
1011
976
  /* -------------------------------------------------------- recursive walker */
1012
977
  /**
1013
978
  * In-place port of processReferences (TreeUtilities.js:419-591) — the
1014
- * recursive walker that clones the tree branch per data row, enriches each
1015
- * copy (processObjIndex), synthesizes child-level static/dynamic groups
1016
- * (:439/:444 — static uses constructStaticNodeGroups, dynamic the v1
1017
- * constructDynamicNodeGroups), drops hidden rows, and recurses into child
1018
- * arrays keyed by catalogObjectKey — but only into the levels splitChildLevels
1019
- * called eager under the caller's LoadMode. Divergence from legacy (:541): rows reached through the
1020
- * parent's nested data were not lazy-fetched, so wasLazyLoaded goes down as
1021
- * false instead of inheriting the parent's lazyLoad flag (which now only means
1022
- * "this level's children are fetched separately", and such a level is never
1023
- * descended into at all).
979
+ * recursive walker that copies a level per data row, enriches each copy
980
+ * (processObjIndex), synthesizes child-level static/dynamic groups for a nested
981
+ * LIST (:439/:444 — static uses constructStaticNodeGroups, dynamic the v1
982
+ * constructDynamicNodeGroups), drops hidden rows, and recurses into the child
983
+ * rows keyed by catalogObjectKey — but only into the levels splitChildLevels
984
+ * called eager. Each child level is walked against its OWN config node (legacy
985
+ * re-found it by catalogObjectKey position in a flattened key list, which
986
+ * picked the wrong level whenever two levels shared a key).
1024
987
  */
1025
- const processReferencesInPlace = (reference, objectReferenceKeys, treeData, index, treeList, parentId, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode) => {
1026
- var _a, _b;
1027
- const newIndex = index + 1;
1028
- if (reference) {
1029
- const node = parentId ? treeData[newIndex] : treeData[0];
1030
- let nodeGroups = [];
1031
- const groupConfiguration = (_a = node === null || node === void 0 ? void 0 : node.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
1032
- if (parentId) {
1033
- if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType) === NODE_GROUP_TYPE.Static) {
1034
- nodeGroups = constructStaticNodeGroupsInPlace(node, true, makeId);
1035
- }
1036
- else if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType) === NODE_GROUP_TYPE.Dynamic) {
1037
- nodeGroups = constructDynamicNodeGroupsInPlace(reference, node, true, makeId, loadMode);
988
+ const processReferencesInPlace = (reference, node, treeList, parentId, ctx) => {
989
+ var _a;
990
+ if (!reference || typeof reference !== 'object')
991
+ return;
992
+ const isList = Array.isArray(reference);
993
+ const rows = (isList ? reference : [reference]);
994
+ const groupConfiguration = (_a = node.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
995
+ // Root-level groups are the entry point's; a single nested object has none.
996
+ const groupType = parentId && isList ? groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType : undefined;
997
+ const nodeGroups = groupType === NODE_GROUP_TYPE.Static
998
+ ? constructStaticNodeGroupsInPlace(node, true, ctx.makeId)
999
+ : groupType === NODE_GROUP_TYPE.Dynamic
1000
+ ? constructDynamicNodeGroupsInPlace(rows, node, true, ctx)
1001
+ : [];
1002
+ rows.forEach((ref, i) => {
1003
+ var _a;
1004
+ const nodeCopy = cloneLevel(node);
1005
+ const split = processObjIndexInPlace(nodeCopy, ref, parentId, ctx);
1006
+ if (!nodeGroups.length) {
1007
+ if (!checkDisplayNodeHidden(nodeCopy, ref))
1008
+ treeList.push(nodeCopy);
1009
+ }
1010
+ else if (groupType === NODE_GROUP_TYPE.Static) {
1011
+ const groupedItemIndexes = new Set();
1012
+ let itemAdded = false;
1013
+ nodeGroups.forEach((nodeGroup) => {
1014
+ const processedItem = processItemForStaticNodeGroupInPlace(nodeGroup, ref, groupedItemIndexes, nodeCopy, i, new Set(), treeList);
1015
+ itemAdded = processedItem.itemAdded;
1016
+ mapNodeGroupChildrenInPlace(nodeGroup, processedItem.nodeChildren);
1017
+ nodeGroup.parentGroupId = nodeCopy.parentId;
1018
+ });
1019
+ if (!itemAdded &&
1020
+ (groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.outlier) === NODE_GROUP_OUTLIER.Individual &&
1021
+ !checkDisplayNodeHidden(nodeCopy, ref)) {
1022
+ treeList.push(nodeCopy);
1038
1023
  }
1039
1024
  }
1040
- if (Array.isArray(reference) && reference.length) {
1041
- reference.forEach((ref, i) => {
1042
- var _a;
1043
- if (node) {
1044
- const nodeCopy = deepClone(node);
1045
- const split = processObjIndexInPlace(nodeCopy, ref, parentId, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode);
1046
- if (nodeGroups.length) {
1047
- if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType) === NODE_GROUP_TYPE.Static) {
1048
- const groupedItemIndexes = new Set();
1049
- let processedItem = { itemAdded: false, nodeChildren: [] };
1050
- nodeGroups.forEach((nodeGroup) => {
1051
- let nodeGroupChildren = [];
1052
- processedItem = processItemForStaticNodeGroupInPlace(nodeGroup, ref, groupedItemIndexes, nodeCopy, i, new Set(), treeList);
1053
- nodeGroupChildren = nodeGroupChildren.concat(processedItem.nodeChildren);
1054
- mapNodeGroupChildrenInPlace(nodeGroup, nodeGroupChildren);
1055
- nodeGroup.parentGroupId = nodeCopy.parentId;
1056
- });
1057
- if (!processedItem.itemAdded &&
1058
- (groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.outlier) === NODE_GROUP_OUTLIER.Individual) {
1059
- const nodeIsHidden = checkDisplayNodeHidden(nodeCopy, ref, wasLazyLoaded);
1060
- if (!nodeIsHidden)
1061
- treeList.push(nodeCopy);
1062
- }
1063
- }
1064
- else if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType) === NODE_GROUP_TYPE.Dynamic) {
1065
- nodeGroups.forEach((nodeGroup) => {
1066
- nodeGroup.parentGroupId = nodeCopy.parentId;
1067
- nodeGroup.parentId = nodeCopy.parentId;
1068
- processGroupNodesAndAddToTreeListInPlace(nodeGroup, treeList, nodeCopy.parentId, ref, wasLazyLoaded);
1069
- });
1070
- }
1071
- }
1072
- else {
1073
- const nodeIsHidden = checkDisplayNodeHidden(nodeCopy, ref, wasLazyLoaded);
1074
- if (!nodeIsHidden)
1075
- treeList.push(nodeCopy);
1076
- }
1077
- if ((_a = nodeCopy === null || nodeCopy === void 0 ? void 0 : nodeCopy.children) === null || _a === void 0 ? void 0 : _a.length) {
1078
- const objectReferenceKeysCopy = [...objectReferenceKeys];
1079
- nodeCopy.children.forEach((childNode) => {
1080
- var _a;
1081
- const catalogObjectKey = (_a = childNode === null || childNode === void 0 ? void 0 : childNode.properties) === null || _a === void 0 ? void 0 : _a['catalogObjectKey'];
1082
- const nextIndex = objectReferenceKeysCopy.indexOf(catalogObjectKey);
1083
- if (!parentId) {
1084
- objectReferenceKeysCopy[nextIndex] = null;
1085
- }
1086
- // splitChildLevels owns this: only the levels IT called eager
1087
- // render here, and their rows ride the parent row (the server
1088
- // nested them under 'legacy-data', the wave loader grafted them
1089
- // under 'config').
1090
- if (!catalogObjectKey ||
1091
- !split.eagerChildKeys.has(catalogObjectKey)) {
1092
- return;
1093
- }
1094
- processReferencesInPlace(ref[catalogObjectKey], objectReferenceKeys, treeData, nextIndex, treeList, nodeCopy.id, catalogObjects, promotedEntities, false, makeId, loadMode);
1095
- });
1096
- }
1097
- }
1025
+ else {
1026
+ nodeGroups.forEach((nodeGroup) => {
1027
+ nodeGroup.parentGroupId = nodeCopy.parentId;
1028
+ nodeGroup.parentId = nodeCopy.parentId;
1029
+ processGroupNodesAndAddToTreeListInPlace(nodeGroup, treeList, nodeCopy.parentId, ref);
1098
1030
  });
1099
1031
  }
1100
- else if (typeof reference === 'object' && !Array.isArray(reference)) {
1101
- if (node) {
1102
- // ENRICH A COPY, exactly as the array branch above does. The flattened
1103
- // level nodes are shared across every row of a page
1104
- // (buildPreloadedDisplayList flattens ONE cloned seed for all rows), and
1105
- // enrichment rewrites `id` — so enriching the shared node in place made
1106
- // the NEXT row stamp `configNodeId` from the previous row's freshly
1107
- // minted display id. Every row after the first then pointed at a config
1108
- // level that does not exist, which is what stranded a lazily-expanded
1109
- // level ("tree level <uuid> is not in the current tree configuration")
1110
- // and let a previous row's conditional icon / lazy marker leak forward.
1111
- const nodeCopy = deepClone(node);
1112
- const split = processObjIndexInPlace(nodeCopy, reference, parentId, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode);
1113
- const nodeIsHidden = checkDisplayNodeHidden(nodeCopy, reference, wasLazyLoaded);
1114
- if (!nodeIsHidden)
1115
- treeList.push(nodeCopy);
1116
- if ((_b = nodeCopy === null || nodeCopy === void 0 ? void 0 : nodeCopy.children) === null || _b === void 0 ? void 0 : _b.length) {
1117
- const objectReferenceKeysCopy = [...objectReferenceKeys];
1118
- nodeCopy.children.forEach((childNode) => {
1119
- var _a;
1120
- const catalogObjectKey = (_a = childNode === null || childNode === void 0 ? void 0 : childNode.properties) === null || _a === void 0 ? void 0 : _a['catalogObjectKey'];
1121
- const nextIndex = parentId
1122
- ? newIndex
1123
- : objectReferenceKeysCopy.indexOf(catalogObjectKey);
1124
- if (!parentId) {
1125
- objectReferenceKeysCopy[nextIndex] = null;
1126
- }
1127
- // Same single rule as the array branch — only the levels
1128
- // splitChildLevels called eager are descended into.
1129
- if (!catalogObjectKey ||
1130
- !split.eagerChildKeys.has(catalogObjectKey)) {
1131
- return;
1132
- }
1133
- processReferencesInPlace(reference[catalogObjectKey], objectReferenceKeys, treeData, nextIndex, treeList, nodeCopy.id, catalogObjects, promotedEntities, false, makeId, loadMode);
1134
- });
1135
- }
1032
+ // splitChildLevels owns this: only the levels IT called eager render
1033
+ // here, and their rows ride the parent row (the wave loader grafted them).
1034
+ ((_a = nodeCopy.children) !== null && _a !== void 0 ? _a : []).forEach((childNode) => {
1035
+ var _a;
1036
+ const catalogObjectKey = (_a = childNode === null || childNode === void 0 ? void 0 : childNode.properties) === null || _a === void 0 ? void 0 : _a['catalogObjectKey'];
1037
+ if (!catalogObjectKey || !split.eagerChildKeys.has(catalogObjectKey)) {
1038
+ return;
1136
1039
  }
1137
- }
1138
- }
1040
+ processReferencesInPlace(ref[catalogObjectKey], childNode, treeList, nodeCopy.id, ctx);
1041
+ });
1042
+ });
1139
1043
  };
1140
- /** In-place port of processObjectToTree (TreeUtilities.js:392-413). */
1141
- const processObjectToTreeInPlace = (result, treeData, objectReferenceKeys, treeList, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode) => {
1142
- const treeArr = Object.assign({}, treeData);
1143
- processReferencesInPlace(result, objectReferenceKeys, treeArr, 0, treeList, null, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode);
1044
+ /**
1045
+ * One row composed against a level into its nested display tree — the
1046
+ * processObjectToTree + makeTreeStructure pair (TreeUtilities.js:392-413).
1047
+ */
1048
+ const composeRowTree = (row, level, ctx) => {
1049
+ const treeList = [];
1050
+ processReferencesInPlace(row, level, treeList, null, ctx);
1051
+ return makeTreeStructureInPlace(treeList, 'id', 'parentId', 'parentGroupId');
1144
1052
  };
1145
1053
  /* -------------------------------------------------------------- entry: row */
1146
1054
  /**
1147
1055
  * Pure port of formatTreeMenuItem (TreeUtilities.js:1095-1124): one query row +
1148
1056
  * the NESTED display seed (makeDisplayTreeStructure output) → the enriched
1149
1057
  * display tree. Returns null when the row is falsy; a single root is returned
1150
- * bare, several as an array — with associatedInquiryTree/wasLazyLoaded
1151
- * attached to the result exactly like legacy (:1121-1122). Neither the seed
1152
- * nor the row is mutated or aliased (both are deep-cloned up front; nodeObj
1153
- * references the private row clone).
1058
+ * bare, several as an array. (Legacy also attached its associatedInquiryTree
1059
+ * argument to the result (:1121); v2 reads linked trees from their own query.)
1060
+ * Neither the seed nor the row is mutated or aliased (both are deep-cloned up
1061
+ * front; nodeObj references the private row clone).
1154
1062
  */
1155
1063
  export const buildDisplayTree = (row, nestedTreeStructure, options) => {
1156
- var _a;
1157
1064
  if (!row)
1158
1065
  return null;
1159
- const { makeId } = options;
1160
- const loadMode = (_a = options.loadMode) !== null && _a !== void 0 ? _a : DEFAULT_LOAD_MODE;
1161
- const tree = deepClone(nestedTreeStructure);
1162
- const responseObject = deepClone(row);
1163
- const orderedKeys = [];
1164
- const orderedTreeData = [];
1165
- const treeArr = [];
1166
- collectCatalogObjectKeysInOrder(tree, orderedKeys);
1167
- flattenTreeInPreOrder(tree, orderedTreeData);
1168
- processObjectToTreeInPlace(responseObject, orderedTreeData, orderedKeys, treeArr, options.catalogObjects, options.promotedEntities, options.wasLazyLoaded, makeId, loadMode);
1169
- const displayTree = makeTreeStructureInPlace(treeArr, 'id', 'parentId', 'parentGroupId', loadMode);
1170
- displayTree['associatedInquiryTree'] =
1171
- options.associatedInquiryTree;
1172
- displayTree['wasLazyLoaded'] =
1173
- options.wasLazyLoaded;
1174
- return displayTree;
1175
- };
1176
- /**
1177
- * Single-node variant of buildDisplayTree: enrich ONE entity node with one
1178
- * record into the display shape the Inquiry renderer consumes — nodeLabel/
1179
- * nodeSubLabel/headerTitle resolved, conditional icon/adornment stamped,
1180
- * search state attached, nodeObj set. Same enrichment code path as
1181
- * buildDisplayTree (processObjIndexInPlace), so a Tree Builder preview node
1182
- * is byte-shaped like a live Inquiry node. Neither input is mutated.
1183
- */
1184
- export const buildDisplayNodeForRecord = (node, row, options) => {
1185
- var _a, _b, _c;
1186
- const displayNode = deepClone(node);
1187
- processObjIndexInPlace(displayNode, deepClone(row), (_a = node.parentId) !== null && _a !== void 0 ? _a : null, options.catalogObjects, options.promotedEntities, (_b = options.wasLazyLoaded) !== null && _b !== void 0 ? _b : false, options.makeId, (_c = options.loadMode) !== null && _c !== void 0 ? _c : DEFAULT_LOAD_MODE);
1188
- return displayNode;
1066
+ return composeRowTree(deepClone(row), deepClone(nestedTreeStructure), options);
1189
1067
  };
1190
1068
  /* --------------------------------------------------------- dynamic groups v2 */
1191
1069
  /** Port of CompareSiblingNodes (TreeUtilities.js:2365-2378) — groups first, then by order. */
@@ -1204,6 +1082,8 @@ const compareSiblingNodes = (a, b) => {
1204
1082
  if ((((_c = a.properties) === null || _c === void 0 ? void 0 : _c['order'])) < (((_d = b.properties) === null || _d === void 0 ? void 0 : _d['order']))) {
1205
1083
  return -1;
1206
1084
  }
1085
+ // A blank heading follows the headings that name a value.
1086
+ return Number(isBlankGroup(a)) - Number(isBlankGroup(b));
1207
1087
  }
1208
1088
  return 0;
1209
1089
  };
@@ -1221,26 +1101,22 @@ const addGroupToChildMap = (map, groupKey, groupNode) => {
1221
1101
  * clone, and the stamped key rides into the emitted nodes for byte parity).
1222
1102
  */
1223
1103
  const constructDynamicGroupConfigTrees2InPlace = (configNode) => {
1224
- var _a, _b;
1104
+ var _a;
1225
1105
  const topLevelConfigGroupNodes = [];
1226
1106
  const groupConfiguration = (_a = configNode === null || configNode === void 0 ? void 0 : configNode.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
1227
1107
  const groupType = ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupType)) || NODE_GROUP_TYPE.Dynamic;
1228
- if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.enabled) &&
1229
- ((_b = groupConfiguration.groupings[groupType]) === null || _b === void 0 ? void 0 : _b.length)) {
1230
- const dynamicGroupings = groupConfiguration.groupings[groupType];
1231
- for (const grouping of dynamicGroupings) {
1232
- if (grouping.groups === undefined || grouping.groups === null)
1233
- continue;
1234
- // Map of each group's collection of children (:2609)
1235
- const groupChildMap = {};
1236
- for (const group of grouping.groups) {
1237
- group['children'] = getGroupChildMap(groupChildMap, group.id);
1238
- if (group.parentGroupId === undefined || group.parentGroupId === null) {
1239
- topLevelConfigGroupNodes.push(group);
1240
- }
1241
- else {
1242
- addGroupToChildMap(groupChildMap, group.parentGroupId, group);
1243
- }
1108
+ for (const grouping of groupingsOf(groupConfiguration, groupType)) {
1109
+ if (grouping.groups === undefined || grouping.groups === null)
1110
+ continue;
1111
+ // Map of each group's collection of children (:2609)
1112
+ const groupChildMap = {};
1113
+ for (const group of grouping.groups) {
1114
+ group['children'] = getGroupChildMap(groupChildMap, group.id);
1115
+ if (group.parentGroupId === undefined || group.parentGroupId === null) {
1116
+ topLevelConfigGroupNodes.push(group);
1117
+ }
1118
+ else {
1119
+ addGroupToChildMap(groupChildMap, group.parentGroupId, group);
1244
1120
  }
1245
1121
  }
1246
1122
  }
@@ -1249,16 +1125,85 @@ const constructDynamicGroupConfigTrees2InPlace = (configNode) => {
1249
1125
  }
1250
1126
  configNode['groupConfigTrees'] = topLevelConfigGroupNodes;
1251
1127
  };
1128
+ /**
1129
+ * One record as an enriched display node under `parentId`, its EAGER child
1130
+ * result sets composed through constructDynamicNodeGroups2 (:2516-2528,
1131
+ * :2697-2735). Legacy passes a child set's raw value either way (:2550-2568 —
1132
+ * the non-array wrap is built but never used), so a non-array set yields no
1133
+ * children, exactly like legacy.
1134
+ */
1135
+ const emitRecordNode = (configNode, item, parentId, context) => {
1136
+ var _a;
1137
+ const recordNode = deepClone(configNode);
1138
+ const split = processObjIndexInPlace(recordNode, item, parentId, context);
1139
+ recordNode.children = ((_a = recordNode.children) !== null && _a !== void 0 ? _a : []).flatMap((childConfigNode) => {
1140
+ const key = childConfigNode.properties['catalogObjectKey'];
1141
+ // only levels splitChildLevels called eager render from data
1142
+ if (!key || !split.eagerChildKeys.has(key) || !item[key])
1143
+ return [];
1144
+ return constructDynamicNodeGroups2InPlace(item[key], childConfigNode, recordNode.id, context);
1145
+ });
1146
+ return recordNode;
1147
+ };
1148
+ /**
1149
+ * Put one record under the heading `groupName` among `siblings` — reusing the
1150
+ * heading or creating it — and on down through the heading's subgroup configs
1151
+ * (createDynamicGroups2 :2448-2531). A record no subgroup field has a value for
1152
+ * goes under that level's blank heading; with no subgroups it is emitted into
1153
+ * the heading itself, with its own child result sets built through
1154
+ * constructDynamicNodeGroups2.
1155
+ */
1156
+ function joinDynamicGroup2InPlace(treeConfig, groupConfig, item, groupName, siblings, parentId, context, blank = false) {
1157
+ var _a, _b;
1158
+ const { makeId } = context;
1159
+ let groupNode = (_a = siblings.find((sibling) => sibling.isGroupNode === true && sibling.properties['label'] === groupName)) !== null && _a !== void 0 ? _a : null;
1160
+ if (groupNode == null) {
1161
+ groupNode = makeDisplayGroupNode({
1162
+ id: `${makeId()}`,
1163
+ groupType: NODE_GROUP_TYPE.Dynamic,
1164
+ children: [],
1165
+ parentGroupId: parentId,
1166
+ parentId: parentId,
1167
+ isExpanded: groupConfig.isExpanded,
1168
+ properties: Object.assign({ label: groupName, propertyIsCustom: groupConfig['propertyIsCustom'], propertyKey: groupConfig.property, order: groupConfig.order }, (blank ? { blank: true } : {}))
1169
+ }, makeId);
1170
+ siblings.push(groupNode);
1171
+ }
1172
+ const subGroupConfigs = (_b = groupConfig.children) !== null && _b !== void 0 ? _b : [];
1173
+ let subGroupWasCreated = false;
1174
+ subGroupConfigs.forEach((subGroupConfig) => {
1175
+ const subGroupCreated = createDynamicGroups2InPlace(treeConfig, subGroupConfig, item, item, subGroupConfig.property ? subGroupConfig.property.split('.') : [], groupNode.children, groupNode.id, context);
1176
+ subGroupWasCreated = subGroupCreated || subGroupWasCreated;
1177
+ });
1178
+ if (!subGroupWasCreated) {
1179
+ joinBlankGroupOrEmit2InPlace(treeConfig, subGroupConfigs, item, groupNode.children, groupNode.id, context);
1180
+ }
1181
+ groupNode.children.sort(compareSiblingNodes);
1182
+ }
1183
+ /**
1184
+ * A record none of a level's group fields has a value for: under the level's
1185
+ * blank heading, or — where the level groups by no field — a plain record row.
1186
+ */
1187
+ function joinBlankGroupOrEmit2InPlace(treeConfig, groupConfigs, item, siblings, parentId, context) {
1188
+ const fieldGroup = groupConfigs.find((config) => !!config.property);
1189
+ if (!fieldGroup) {
1190
+ siblings.push(emitRecordNode(treeConfig, item, parentId, context));
1191
+ return;
1192
+ }
1193
+ joinDynamicGroup2InPlace(treeConfig, fieldGroup, item, BLANK_GROUP_LABEL, siblings, parentId, context, true);
1194
+ }
1252
1195
  /**
1253
1196
  * In-place port of createDynamicGroups2 (TreeUtilities.js:2399-2581): walk the
1254
1197
  * dotted group property into the row (recursing through arrays/objects),
1255
1198
  * reuse-or-create the sibling group node labeled by the resolved value, then
1256
1199
  * recurse into subgroup configs — a row with no subgroup match becomes an
1257
1200
  * enriched display node inside the group, with its own child result sets built
1258
- * through constructDynamicNodeGroups2 (catalog/promoted null, not lazy —
1259
- * :2519-2527).
1201
+ * through constructDynamicNodeGroups2. Documented divergence from legacy
1202
+ * (catalog/promoted null there, :2519-2527): the caller's catalog metadata is
1203
+ * carried, so grouped rows get the same search state as every other row — their
1204
+ * identifiers are what a link back to them names.
1260
1205
  */
1261
- const createDynamicGroups2InPlace = (treeConfig, groupConfig, item, curItem, pList, siblings, parentId, makeId, loadMode) => {
1206
+ const createDynamicGroups2InPlace = (treeConfig, groupConfig, item, curItem, pList, siblings, parentId, context) => {
1262
1207
  let groupCreated = false;
1263
1208
  if (pList.length > 0) {
1264
1209
  const tmpProp = pList[0];
@@ -1268,87 +1213,19 @@ const createDynamicGroups2InPlace = (treeConfig, groupConfig, item, curItem, pLi
1268
1213
  // Arrays are also considered Objects, so check for it first (:2416)
1269
1214
  if (Array.isArray(newItem)) {
1270
1215
  for (let i = 0, numOfItems = newItem.length; i < numOfItems; i++) {
1271
- const aGroupWasCreated = createDynamicGroups2InPlace(treeConfig, groupConfig, item, newItem[i], pList.slice(1), siblings, parentId, makeId, loadMode);
1216
+ const aGroupWasCreated = createDynamicGroups2InPlace(treeConfig, groupConfig, item, newItem[i], pList.slice(1), siblings, parentId, context);
1272
1217
  groupCreated = aGroupWasCreated ? aGroupWasCreated : groupCreated;
1273
1218
  }
1274
1219
  }
1275
1220
  else if (typeof newItem === 'object' && newItem !== null) {
1276
- const aGroupWasCreated = createDynamicGroups2InPlace(treeConfig, groupConfig, item, newItem, pList.slice(1), siblings, parentId, makeId, loadMode);
1221
+ const aGroupWasCreated = createDynamicGroups2InPlace(treeConfig, groupConfig, item, newItem, pList.slice(1), siblings, parentId, context);
1277
1222
  groupCreated = aGroupWasCreated ? aGroupWasCreated : groupCreated;
1278
1223
  }
1279
1224
  }
1280
1225
  else {
1281
1226
  if (typeof newItem !== 'object' && newItem !== null && newItem !== '') {
1282
- const groupName = newItem.toString();
1283
- // Check if a group with this name already exists among the siblings (:2448)
1284
- let groupNode = null;
1285
- for (let siblingIdx = 0, numOfSiblings = siblings.length; siblingIdx < numOfSiblings; siblingIdx++) {
1286
- const sibling = siblings[siblingIdx];
1287
- if (Object.prototype.hasOwnProperty.call(sibling, 'isGroupNode') &&
1288
- sibling.isGroupNode === true) {
1289
- if (sibling.properties['label'] === groupName) {
1290
- groupNode = sibling;
1291
- break;
1292
- }
1293
- }
1294
- }
1295
- if (groupNode == null) {
1296
- groupNode = makeDisplayGroupNode({
1297
- id: `${makeId()}`,
1298
- groupType: NODE_GROUP_TYPE.Dynamic,
1299
- children: [],
1300
- parentGroupId: parentId,
1301
- parentId: parentId,
1302
- isExpanded: groupConfig.isExpanded,
1303
- properties: {
1304
- label: groupName,
1305
- propertyIsCustom: groupConfig['propertyIsCustom'],
1306
- propertyKey: groupConfig.property,
1307
- order: groupConfig.order
1308
- }
1309
- }, makeId);
1310
- siblings.push(groupNode);
1311
- }
1227
+ joinDynamicGroup2InPlace(treeConfig, groupConfig, item, newItem.toString(), siblings, parentId, context);
1312
1228
  groupCreated = true;
1313
- let subGroupWasCreated = false;
1314
- const subGroupConfigs = groupConfig.children;
1315
- for (let subGroupIdx = 0, numOfSubGroups = subGroupConfigs.length; subGroupIdx < numOfSubGroups; subGroupIdx++) {
1316
- const subGroupConfig = subGroupConfigs[subGroupIdx];
1317
- const subGroupPropList = subGroupConfig.property
1318
- ? subGroupConfig.property.split('.')
1319
- : [];
1320
- const subGroupCreated = createDynamicGroups2InPlace(treeConfig, subGroupConfig, item, item, subGroupPropList, groupNode.children, groupNode.id, makeId, loadMode);
1321
- subGroupWasCreated = subGroupCreated
1322
- ? subGroupCreated
1323
- : subGroupWasCreated;
1324
- }
1325
- // No subgroup claimed the record — emit a display node into the group (:2516-2528)
1326
- if (!subGroupWasCreated) {
1327
- const tmpNode = deepClone(treeConfig);
1328
- const split = processObjIndexInPlace(tmpNode, item, groupNode.id, null, null, false, makeId, loadMode);
1329
- groupNode.children.push(tmpNode);
1330
- const newChildNodes = [];
1331
- const tmpChildren = tmpNode.children;
1332
- for (let childNodeIdx = 0, numOfChildNodes = tmpChildren.length; childNodeIdx < numOfChildNodes; childNodeIdx++) {
1333
- const childConfigNode = tmpChildren[childNodeIdx];
1334
- const propToGetRecords = childConfigNode.properties['catalogObjectKey'];
1335
- if (propToGetRecords &&
1336
- propToGetRecords != null &&
1337
- // only levels splitChildLevels called eager render from data
1338
- split.eagerChildKeys.has(propToGetRecords) &&
1339
- Object.prototype.hasOwnProperty.call(item, propToGetRecords)) {
1340
- const newResultSet = item[propToGetRecords];
1341
- if (newResultSet && newResultSet != null) {
1342
- // legacy passes the raw value either way (:2550-2568 — the
1343
- // non-array wrap is built but never used); a non-array set
1344
- // therefore yields no children, exactly like legacy
1345
- newChildNodes.push(...constructDynamicNodeGroups2InPlace(newResultSet, childConfigNode, tmpNode.id, makeId, loadMode));
1346
- }
1347
- }
1348
- }
1349
- tmpNode.children = newChildNodes;
1350
- }
1351
- groupNode.children.sort(compareSiblingNodes);
1352
1229
  }
1353
1230
  }
1354
1231
  }
@@ -1358,11 +1235,13 @@ const createDynamicGroups2InPlace = (treeConfig, groupConfig, item, curItem, pLi
1358
1235
  /**
1359
1236
  * In-place port of constructDynamicNodeGroups2 (TreeUtilities.js:2643-2740) —
1360
1237
  * the v2 dynamic path constructPreloadedTree uses (:2335). Rows that create or
1361
- * join a group land under it; rows matching no group become enriched sibling
1362
- * display nodes with their own child result sets processed recursively. Group
1238
+ * join a group land under it; a row with no value for a group-by field joins
1239
+ * the "(Blank)" heading (joinBlankGroupOrEmit2InPlace); rows matching no group
1240
+ * otherwise become enriched sibling display nodes with their own child result
1241
+ * sets processed recursively. Group
1363
1242
  * nodes sort before entity nodes (CompareSiblingNodes).
1364
1243
  */
1365
- const constructDynamicNodeGroups2InPlace = (results, configNode, parentId, makeId, loadMode) => {
1244
+ const constructDynamicNodeGroups2InPlace = (results, configNode, parentId, context) => {
1366
1245
  const levelNodes = [];
1367
1246
  if (!configNode['groupConfigTrees']) {
1368
1247
  constructDynamicGroupConfigTrees2InPlace(configNode);
@@ -1376,36 +1255,34 @@ const constructDynamicNodeGroups2InPlace = (results, configNode, parentId, makeI
1376
1255
  const gPropList = groupConfigNode.property
1377
1256
  ? groupConfigNode.property.split('.')
1378
1257
  : [];
1379
- const aGroupWasCreated = createDynamicGroups2InPlace(configNode, groupConfigNode, item, item, gPropList, levelNodes, parentId, makeId, loadMode);
1258
+ const aGroupWasCreated = createDynamicGroups2InPlace(configNode, groupConfigNode, item, item, gPropList, levelNodes, parentId, context);
1380
1259
  groupCreated = aGroupWasCreated ? aGroupWasCreated : groupCreated;
1381
1260
  }
1382
1261
  if (!groupCreated) {
1383
- const tmpNode = deepClone(configNode);
1384
- const split = processObjIndexInPlace(tmpNode, item, parentId, null, null, false, makeId, loadMode);
1385
- levelNodes.push(tmpNode);
1386
- const newChildNodes = [];
1387
- const tmpChildren = tmpNode.children;
1388
- for (let childNodeIdx = 0, numOfChildNodes = tmpChildren.length; childNodeIdx < numOfChildNodes; childNodeIdx++) {
1389
- const childConfigNode = tmpChildren[childNodeIdx];
1390
- const propToGetRecords = childConfigNode.properties['catalogObjectKey'];
1391
- if (propToGetRecords &&
1392
- propToGetRecords != null &&
1393
- // only levels splitChildLevels called eager render from data
1394
- split.eagerChildKeys.has(propToGetRecords) &&
1395
- Object.prototype.hasOwnProperty.call(item, propToGetRecords)) {
1396
- const newResultSet = item[propToGetRecords];
1397
- if (newResultSet && newResultSet != null) {
1398
- newChildNodes.push(...constructDynamicNodeGroups2InPlace(newResultSet, childConfigNode, tmpNode.id, makeId, loadMode));
1399
- }
1400
- }
1401
- }
1402
- tmpNode.children = newChildNodes;
1262
+ joinBlankGroupOrEmit2InPlace(configNode, groupConfigTrees, item, levelNodes, parentId, context);
1403
1263
  }
1404
1264
  }
1405
1265
  levelNodes.sort(compareSiblingNodes);
1406
1266
  return levelNodes;
1407
1267
  };
1408
1268
  /* --------------------------------------------------- entry: preloaded trees */
1269
+ /**
1270
+ * Whether a level's records are sorted into configured groups — the condition
1271
+ * buildPreloadedDisplayList groups a root page under.
1272
+ */
1273
+ export const groupsLevelRecords = (level) => {
1274
+ var _a, _b, _c, _d, _e;
1275
+ const config = (_a = level === null || level === void 0 ? void 0 : level.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
1276
+ if (!(config === null || config === void 0 ? void 0 : config.enabled))
1277
+ return false;
1278
+ if (config.groupType === NODE_GROUP_TYPE.Static) {
1279
+ return !!((_c = (_b = config.groupings) === null || _b === void 0 ? void 0 : _b.static) === null || _c === void 0 ? void 0 : _c.length);
1280
+ }
1281
+ if (config.groupType === NODE_GROUP_TYPE.Dynamic) {
1282
+ return !!((_e = (_d = config.groupings) === null || _d === void 0 ? void 0 : _d.dynamic) === null || _e === void 0 ? void 0 : _e.length);
1283
+ }
1284
+ return false;
1285
+ };
1409
1286
  /**
1410
1287
  * Pure port of constructPreloadedTree (TreeUtilities.js:2231-2351): seed the
1411
1288
  * menu from a preloaded page of rows against the NESTED display seed
@@ -1423,37 +1300,27 @@ const constructDynamicNodeGroups2InPlace = (results, configNode, parentId, makeI
1423
1300
  */
1424
1301
  export const buildPreloadedDisplayList = (nestedTreeStructure, rows, options) => {
1425
1302
  var _a, _b, _c, _d, _e;
1426
- var _f, _g, _h;
1427
1303
  if (!rows)
1428
1304
  return null;
1429
1305
  const { makeId } = options;
1430
- const loadMode = (_f = options.loadMode) !== null && _f !== void 0 ? _f : DEFAULT_LOAD_MODE;
1431
- const catalogObjects = (_g = options.catalogObjects) !== null && _g !== void 0 ? _g : null;
1432
- const promotedEntities = (_h = options.promotedEntities) !== null && _h !== void 0 ? _h : null;
1433
1306
  let preloadedList = [];
1434
1307
  const tree = deepClone(nestedTreeStructure);
1435
1308
  const pageList = deepClone(rows);
1436
1309
  const groupConfiguration = (_a = tree.properties) === null || _a === void 0 ? void 0 : _a['groupConfiguration'];
1437
- // Row processing never changes the seed's levels, so flatten them once.
1438
- const orderedKeys = [];
1439
- const orderedTreeData = [];
1440
- collectCatalogObjectKeysInOrder(tree, orderedKeys);
1441
- flattenTreeInPreOrder(tree, orderedTreeData);
1442
- const buildRowTree = (item, wasLazyLoaded) => {
1443
- const treeArr = [];
1444
- processObjectToTreeInPlace(item, orderedTreeData, orderedKeys, treeArr, catalogObjects, promotedEntities, wasLazyLoaded, makeId, loadMode);
1445
- return makeTreeStructureInPlace(treeArr, 'id', 'parentId', 'parentGroupId', loadMode);
1446
- };
1310
+ const buildRowTree = (item) => composeRowTree(item, tree, options);
1447
1311
  if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.enabled) &&
1448
1312
  groupConfiguration.groupType === NODE_GROUP_TYPE.Static &&
1449
1313
  ((_c = (_b = groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupings) === null || _b === void 0 ? void 0 : _b.static) === null || _c === void 0 ? void 0 : _c.length)) {
1450
1314
  const topNodeGroups = constructStaticNodeGroupsInPlace(tree, false, makeId);
1451
1315
  const groupedItemIndexes = new Set();
1316
+ // Composed once per row: a group claims a shallow copy with its own cloned
1317
+ // children (updateNodeForStaticGroupingInPlace), never the row tree itself.
1318
+ const rowTrees = pageList.map(buildRowTree);
1452
1319
  topNodeGroups.forEach((nodeGroup) => {
1453
1320
  // Loop through each response item and group them (:2248)
1454
1321
  let nodeGroupChildren = [];
1455
1322
  pageList.forEach((item, index) => {
1456
- const displayTree = buildRowTree(item, false);
1323
+ const displayTree = rowTrees[index];
1457
1324
  const processedItem = processItemForStaticNodeGroupInPlace(nodeGroup, item, groupedItemIndexes, displayTree, index, new Set());
1458
1325
  nodeGroupChildren = nodeGroupChildren.concat((processedItem === null || processedItem === void 0 ? void 0 : processedItem.nodeChildren) || []);
1459
1326
  });
@@ -1467,8 +1334,8 @@ export const buildPreloadedDisplayList = (nestedTreeStructure, rows, options) =>
1467
1334
  if ((groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.outlier) === NODE_GROUP_OUTLIER.Individual) {
1468
1335
  pageList.forEach((item, index) => {
1469
1336
  if (!groupedItemIndexes.has(index)) {
1470
- const displayTree = buildRowTree(item, false);
1471
- const nodeIsHidden = checkDisplayNodeHidden(displayTree, item, false);
1337
+ const displayTree = rowTrees[index];
1338
+ const nodeIsHidden = checkDisplayNodeHidden(displayTree, item);
1472
1339
  if (!nodeIsHidden) {
1473
1340
  updateTreeIdsInPlace(displayTree, null, makeId(), makeId(), null, makeId);
1474
1341
  preloadedList.push(displayTree);
@@ -1481,13 +1348,13 @@ export const buildPreloadedDisplayList = (nestedTreeStructure, rows, options) =>
1481
1348
  groupConfiguration.groupType === NODE_GROUP_TYPE.Dynamic &&
1482
1349
  ((_e = (_d = groupConfiguration === null || groupConfiguration === void 0 ? void 0 : groupConfiguration.groupings) === null || _d === void 0 ? void 0 : _d.dynamic) === null || _e === void 0 ? void 0 : _e.length)) {
1483
1350
  // Handle Dynamic GroupType for single tree — v2 path (:2335)
1484
- const nodeGroups = constructDynamicNodeGroups2InPlace(pageList, tree, null, makeId, loadMode);
1351
+ const nodeGroups = constructDynamicNodeGroups2InPlace(pageList, tree, null, options);
1485
1352
  preloadedList = preloadedList.concat(nodeGroups);
1486
1353
  }
1487
1354
  else {
1488
1355
  pageList.forEach((item) => {
1489
- const displayTree = buildRowTree(item, undefined);
1490
- const nodeIsHidden = checkDisplayNodeHidden(displayTree, item, false);
1356
+ const displayTree = buildRowTree(item);
1357
+ const nodeIsHidden = checkDisplayNodeHidden(displayTree, item);
1491
1358
  if (!nodeIsHidden)
1492
1359
  preloadedList.push(displayTree);
1493
1360
  });