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
@@ -1,5 +1,6 @@
1
- import { buildManyToManyChildRequestData, graftChildRows, planChildLevelFetch, planEagerWaves, sliceBulkChildRows, sliceManyToManyChildRows } from "../../../domain/inquiryTree/waveLoad.mjs";
2
1
  import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inquiryTree/displayTree.mjs";
2
+ import { buildManyToManyChildRequestData, graftChildRows, parseLazyPageSize, planChildLevelFetch, planEagerWaves, sliceBulkChildRows, sliceManyToManyChildRows } from "../../../domain/inquiryTree/waveLoad.mjs";
3
+ import { keyGroupHeadings } from "./pagedChildrenModel.mjs";
3
4
  //#region src/inquiry/v2/tree/waveLoader.ts
4
5
  /**
5
6
  * The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/
@@ -8,10 +9,11 @@ import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inq
8
9
  * TWO ENTRY POINTS, ONE MECHANISM:
9
10
  * - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,
10
11
  * breadth-first: one batched `parentFK IN (…)` request per level per wave,
11
- * levels within a wave in parallel, waves serial by depth. Fetched rows are
12
+ * paged until the server's total is reached (an eager level has no Show
13
+ * More, so it loads whole), levels within a wave in parallel, waves serial
14
+ * by depth. Fetched rows are
12
15
  * written onto their parent row under the level's association key, so the
13
- * display composer walks one row graph and never has to know whether the
14
- * server nested anything (it no longer does — every request is lean).
16
+ * display composer walks one row graph.
15
17
  * - `loadLazyChildren` fills ONE level on expand: the same planner with a
16
18
  * single parent value, then the eager levels below it, then composition.
17
19
  *
@@ -28,23 +30,69 @@ import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inq
28
30
  * discard it the moment that input is superseded; serving a hydration of stale
29
31
  * rows is how a menu ends up rendering records the rest of the pane can't see.
30
32
  */
33
+ /**
34
+ * One request's rows. `complete` keeps asking for the next page while the
35
+ * server reports more: an eager level has no Show More, so it must arrive whole
36
+ * (v1 nested eager children uncapped). A lazy page is one page — the menu's
37
+ * Show More asks for the next.
38
+ */
39
+ const fetchRows = async (context, apiMethodId, data, complete) => {
40
+ const first = await context.fetchRows(apiMethodId, data);
41
+ if (!complete) return first;
42
+ const rows = [...first.rows];
43
+ let pageNumber = Number(data["pageNumber"] ?? 1);
44
+ while (rows.length < first.total) {
45
+ pageNumber += 1;
46
+ const next = await context.fetchRows(apiMethodId, {
47
+ ...data,
48
+ pageNumber
49
+ });
50
+ if (!next.rows.length) break;
51
+ rows.push(...next.rows);
52
+ }
53
+ return {
54
+ ...first,
55
+ rows
56
+ };
57
+ };
31
58
  /** Run ONE planned request and map its rows back to the parents that claim them. */
32
- const runChildFetch = async (context, request) => {
33
- const first = await context.fetchRows(request.apiMethodId, request.data);
34
- if (request.kind === "single") return { [request.parentKey]: await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap) };
35
- if (request.kind === "bulk") return sliceBulkChildRows(request, await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap));
36
- if (!first.rows.length) return sliceBulkChildRows(request, []);
37
- const second = await context.fetchRows(request.childApiMethodId, buildManyToManyChildRequestData(request, first.rows, first.rows.length));
38
- return sliceManyToManyChildRows(request, first.rows, await context.stampRows(request.catalogReturnObject, second.rows, second.lookupsMap));
59
+ const runChildFetch = async (context, request, complete) => {
60
+ const first = await fetchRows(context, request.apiMethodId, request.data, complete);
61
+ const { total } = first;
62
+ if (request.kind === "single") return {
63
+ slices: { [request.parentKey]: await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap) },
64
+ total
65
+ };
66
+ if (request.kind === "bulk") return {
67
+ slices: sliceBulkChildRows(request, await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap)),
68
+ total
69
+ };
70
+ if (!first.rows.length) return {
71
+ slices: sliceBulkChildRows(request, []),
72
+ total
73
+ };
74
+ const second = await fetchRows(context, request.childApiMethodId, buildManyToManyChildRequestData(request, first.rows, first.rows.length), true);
75
+ return {
76
+ slices: sliceManyToManyChildRows(request, first.rows, await context.stampRows(request.catalogReturnObject, second.rows, second.lookupsMap)),
77
+ total
78
+ };
39
79
  };
40
- /** Fetch one level for a set of parents: plan → requests (parallel) → slices. */
41
- const fetchLevel = async (context, plan, parents, options = {}) => {
42
- const { requests, errorsByParentKey } = planChildLevelFetch(plan, parents, context.catalogObjects, context.promotedEntities, options);
80
+ /**
81
+ * Fetch one level for a set of parents: plan → requests (parallel) → slices.
82
+ * With a `page` it fetches that page (lazy expand / Show More); without one
83
+ * the level loads whole (an eager wave).
84
+ */
85
+ const fetchLevel = async (context, plan, parents, page) => {
86
+ const complete = !page;
87
+ const { requests, errorsByParentKey } = planChildLevelFetch(plan, parents, context.catalogObjects, context.promotedEntities, page);
43
88
  const errors = Array.from(new Set(Object.values(errorsByParentKey)));
44
89
  const rowsByParentKey = {};
90
+ let hasMore = false;
45
91
  (await Promise.all(requests.map(async (request) => {
46
92
  try {
47
- return await runChildFetch(context, request);
93
+ const { slices, total } = await runChildFetch(context, request, complete);
94
+ if (page && total > page.pageNumber * page.pageSize) hasMore = true;
95
+ return slices;
48
96
  } catch (error) {
49
97
  const reason = error instanceof Error && error.message ? `: ${error.message}` : "";
50
98
  errors.push(`Unable to load ${request.catalogReturnObject ?? plan.catalogObjectKey}${reason}`);
@@ -54,7 +102,8 @@ const fetchLevel = async (context, plan, parents, options = {}) => {
54
102
  errors.forEach((message) => context.onLevelError?.(message));
55
103
  return {
56
104
  rowsByParentKey,
57
- errors
105
+ errors,
106
+ hasMore
58
107
  };
59
108
  };
60
109
  /**
@@ -68,7 +117,7 @@ const hydrateRowsWithWaves = async (origin, rows, context) => {
68
117
  if (!rows?.length || !origin) return rows ?? [];
69
118
  const waves = planEagerWaves(origin);
70
119
  if (!waves.length) return rows;
71
- const hydrated = rows.map((row) => structuredClone(row));
120
+ const hydrated = rows.map((row) => ({ ...row }));
72
121
  const parentsByLevelId = /* @__PURE__ */ new Map();
73
122
  parentsByLevelId.set(String(origin.id), hydrated.map((row, index) => ({
74
123
  key: `#${index}`,
@@ -85,52 +134,14 @@ const hydrateRowsWithWaves = async (origin, rows, context) => {
85
134
  }));
86
135
  return hydrated;
87
136
  };
88
- /** Find a config level in the nested seed by its wire treeStructure id. */
89
- const findSeedLevel = (node, id) => {
90
- if (!node || !id) return null;
91
- if (String(node.id) === String(id)) return node;
92
- for (const child of node.children ?? []) {
93
- const match = findSeedLevel(child, id);
94
- if (match) return match;
95
- }
96
- return null;
97
- };
98
- /**
99
- * A level composed as a display ROOT must not carry its own catalogObjectKey.
100
- * The composer collects the keys of the levels BELOW its root in order and
101
- * indexes its config levels by position against that list (the legacy
102
- * processReferences scheme, which every tree satisfies because a tree root's
103
- * key is empty). Composing a lazily-expanded level as a root breaks that
104
- * assumption: its key would shift the list by one and every level beneath it
105
- * would resolve to the wrong config node — silently dropping the eager
106
- * grandchildren that were just fetched.
107
- */
108
- const asCompositionRoot = (level) => ({
109
- ...level,
110
- properties: {
111
- ...level.properties,
112
- catalogObjectKey: ""
113
- }
114
- });
115
- /**
116
- * Put the level's own key back on the rows that came from it, so a lazily
117
- * paged-in row is byte-identical to the same row composed eagerly.
118
- */
119
- const restoreCatalogObjectKey = (node, configNodeId, catalogObjectKey) => {
120
- if (!node.isGroupNode && String(node.configNodeId) === configNodeId) node.properties = {
121
- ...node.properties,
122
- catalogObjectKey
123
- };
124
- (node.children ?? []).forEach((child) => restoreCatalogObjectKey(child, configNodeId, catalogObjectKey));
125
- };
126
137
  /**
127
138
  * Page in ONE row's lazy levels. Same planner and the same batched request as a
128
139
  * wave — with a single parent value — then the eager levels below the fetched
129
140
  * rows, then composition through the display pipeline, so a lazily-loaded level
130
141
  * groups, hides and nests exactly like an eager one.
131
142
  */
132
- const loadLazyChildren = async ({ node, seed, pageNumber = 1, context, makeId }) => {
133
- const configNode = findSeedLevel(seed, node.configNodeId);
143
+ const loadLazyChildren = async ({ node, findLevel, pageNumber = 1, context, makeId }) => {
144
+ const configNode = findLevel(node.configNodeId);
134
145
  if (!configNode) return {
135
146
  children: [],
136
147
  hasMoreChildren: false,
@@ -141,35 +152,35 @@ const loadLazyChildren = async ({ node, seed, pageNumber = 1, context, makeId })
141
152
  key: "p",
142
153
  row: node.nodeObj ?? {}
143
154
  };
144
- const { lazyChildNodes } = splitChildLevels(configNode, "config");
155
+ const { lazyChildNodes } = splitChildLevels(configNode);
156
+ const pageSize = parseLazyPageSize(configNode);
145
157
  let hasMoreChildren = false;
146
158
  const levelErrors = [];
147
159
  const children = (await Promise.all(lazyChildNodes.map(async (childNode, levelIndex) => {
148
160
  const catalogObjectKey = childNode.properties?.["catalogObjectKey"];
149
- const { rowsByParentKey, errors } = await fetchLevel(context, {
161
+ const { rowsByParentKey, errors, hasMore } = await fetchLevel(context, {
150
162
  parentNode: configNode,
151
163
  childNode,
152
164
  catalogObjectKey
153
- }, [parentRef], { pageNumber });
165
+ }, [parentRef], {
166
+ pageSize,
167
+ pageNumber
168
+ });
154
169
  if (errors.length) levelErrors[levelIndex] = `${childNode.properties?.["name"] || catalogObjectKey}: ${errors[0]}`;
155
170
  const childRows = rowsByParentKey[parentRef.key] ?? [];
156
- if (childRows.length >= 50) hasMoreChildren = true;
157
- const hydrated = await hydrateRowsWithWaves(childNode, childRows, context);
158
- const built = buildPreloadedDisplayList(asCompositionRoot(childNode), hydrated, {
171
+ if (hasMore) hasMoreChildren = true;
172
+ return buildPreloadedDisplayList(childNode, await hydrateRowsWithWaves(childNode, childRows, context), {
159
173
  makeId,
160
- loadMode: "config",
161
174
  catalogObjects: context.catalogObjects,
162
175
  promotedEntities: context.promotedEntities
163
176
  }) ?? [];
164
- built.forEach((root) => restoreCatalogObjectKey(root, String(childNode.id), catalogObjectKey));
165
- return built;
166
177
  }))).flat();
167
178
  children.forEach((child) => {
168
179
  child.parentId = node.id ?? null;
169
180
  if (child.isGroupNode) child.parentGroupId = node.id ?? null;
170
181
  else child["entityNodeParentId"] = node.id ?? null;
171
- child["wasLazyLoaded"] = true;
172
182
  });
183
+ keyGroupHeadings(children, String(node.id));
173
184
  return {
174
185
  children,
175
186
  hasMoreChildren,
@@ -178,6 +189,6 @@ const loadLazyChildren = async ({ node, seed, pageNumber = 1, context, makeId })
178
189
  };
179
190
  };
180
191
  //#endregion
181
- export { findSeedLevel, hydrateRowsWithWaves, loadLazyChildren };
192
+ export { hydrateRowsWithWaves, loadLazyChildren };
182
193
 
183
194
  //# sourceMappingURL=waveLoader.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"waveLoader.mjs","names":["CHILD_PAGE_SIZE","buildManyToManyChildRequestData","buildPreloadedDisplayList","graftChildRows","planChildLevelFetch","planEagerWaves","sliceBulkChildRows","sliceManyToManyChildRows","splitChildLevels","CatalogObject","ChildFetch","EagerLevelPlan","ParentRowRef","PromotedEntity","DisplayNode","Row","Record","ChildRowsResult","rows","total","lookupsMap","WaveContext","fetchRows","apiMethodId","data","Promise","catalogObjects","promotedEntities","stampRows","entityName","onLevelError","message","LevelResult","rowsByParentKey","errors","runChildFetch","context","request","first","kind","parentKey","catalogReturnObject","length","second","childApiMethodId","fetchLevel","plan","parents","options","pageNumber","requests","errorsByParentKey","Array","from","Set","Object","values","settled","all","map","error","reason","Error","push","catalogObjectKey","forEach","slice","assign","hydrateRowsWithWaves","origin","waves","hydrated","row","structuredClone","parentsByLevelId","Map","set","String","id","index","key","wave","get","parentNode","childNode","findSeedLevel","node","child","children","match","asCompositionRoot","level","properties","restoreCatalogObjectKey","configNodeId","isGroupNode","LazyChildrenResult","hasMoreChildren","errorRetrievingChildren","updatedNodeObj","LoadLazyChildrenArgs","seed","makeId","loadLazyChildren","configNode","nodeObj","parentRef","lazyChildNodes","levelErrors","levels","levelIndex","levelName","childRows","built","loadMode","root","flat","parentId","parentGroupId","find"],"sources":["../../../../src/inquiry/v2/tree/waveLoader.ts"],"sourcesContent":["/**\n * The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/\n * waveLoad) into requests, cache entries and display rows.\n *\n * TWO ENTRY POINTS, ONE MECHANISM:\n * - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,\n * breadth-first: one batched `parentFK IN (…)` request per level per wave,\n * levels within a wave in parallel, waves serial by depth. Fetched rows are\n * written onto their parent row under the level's association key, so the\n * display composer walks one row graph and never has to know whether the\n * server nested anything (it no longer does — every request is lean).\n * - `loadLazyChildren` fills ONE level on expand: the same planner with a\n * single parent value, then the eager levels below it, then composition.\n *\n * Caching is the query cache, reached through the injected `fetchRows` (the\n * viewer keys it on method × exact body). A collapsed-then-reopened row, a wave\n * that re-crosses parents it already covered, and a recompose after a catalog\n * change are all cache hits, not network hops.\n *\n * IDENTITY CONTRACT (the menu depends on it). `hydrateRowsWithWaves` returns\n * the caller's OWN array, by reference, when it had nothing to add — so a tree\n * with no eager level never invalidates a downstream memo — and a brand-new\n * array whenever it grafted anything. It never mutates the caller's rows. The\n * caller must therefore pair a result with the exact input it came from and\n * discard it the moment that input is superseded; serving a hydration of stale\n * rows is how a menu ends up rendering records the rest of the pane can't see.\n */\nimport {\n CHILD_PAGE_SIZE,\n buildManyToManyChildRequestData,\n buildPreloadedDisplayList,\n graftChildRows,\n planChildLevelFetch,\n planEagerWaves,\n sliceBulkChildRows,\n sliceManyToManyChildRows,\n splitChildLevels\n} from '../../../domain/inquiryTree';\nimport type {\n CatalogObject,\n ChildFetch,\n EagerLevelPlan,\n ParentRowRef,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport type { DisplayNode } from '../../../domain/inquiryTree/displayTree';\n\ntype Row = Record<string, unknown>;\n\n/** What one child request answers with (the v2 query hook's RecordRows). */\nexport interface ChildRowsResult {\n rows: Row[];\n total: number;\n lookupsMap?: Record<string, unknown> | null;\n}\n\n/**\n * Everything the wave executor needs from the outside. Both effects are\n * INJECTED rather than imported so this module stays free of React and the\n * query client — which is what lets the mount-order contract below be tested\n * under the domain harness instead of only in a browser.\n */\nexport interface WaveContext {\n /** Issue one child request. The caller owns caching (inquiryKeys.childBatch). */\n fetchRows: (apiMethodId: string, data: Row) => Promise<ChildRowsResult>;\n catalogObjects?: CatalogObject[] | null;\n promotedEntities?: PromotedEntity[] | null;\n /**\n * Lookup-stamp a page of rows for a known entity — the same pass the root\n * page gets, so a child row's label reads like its parent's.\n */\n stampRows: (\n entityName: string | undefined,\n rows: Row[],\n lookupsMap?: Record<string, unknown> | null\n ) => Promise<Row[]>;\n /** Called once per distinct level failure (un-promoted child, bad assoc). */\n onLevelError?: (message: string) => void;\n}\n\n/** Rows fetched for one level, plus whatever stopped some parents being asked. */\ninterface LevelResult {\n rowsByParentKey: Record<string, Row[]>;\n errors: string[];\n}\n\n/** Run ONE planned request and map its rows back to the parents that claim them. */\nconst runChildFetch = async (\n context: WaveContext,\n request: ChildFetch\n): Promise<Record<string, Row[]>> => {\n const first = await context.fetchRows(request.apiMethodId, request.data);\n\n if (request.kind === 'single') {\n return {\n [request.parentKey]: await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n };\n }\n\n if (request.kind === 'bulk') {\n return sliceBulkChildRows(\n request,\n await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n );\n }\n\n // Many-to-many: the first hop returned JOINING rows (which carry the parent\n // key AND the child key); the second fetches every child they name at once.\n if (!first.rows.length) return sliceBulkChildRows(request, []);\n const second = await context.fetchRows(\n request.childApiMethodId,\n buildManyToManyChildRequestData(request, first.rows, first.rows.length)\n );\n return sliceManyToManyChildRows(\n request,\n first.rows,\n await context.stampRows(\n request.catalogReturnObject,\n second.rows,\n second.lookupsMap\n )\n );\n};\n\n/** Fetch one level for a set of parents: plan → requests (parallel) → slices. */\nconst fetchLevel = async (\n context: WaveContext,\n plan: EagerLevelPlan,\n parents: ParentRowRef[],\n options: { pageNumber?: number } = {}\n): Promise<LevelResult> => {\n const { requests, errorsByParentKey } = planChildLevelFetch(\n plan,\n parents,\n context.catalogObjects,\n context.promotedEntities,\n options\n );\n const errors = Array.from(new Set(Object.values(errorsByParentKey)));\n const rowsByParentKey: Record<string, Row[]> = {};\n const settled = await Promise.all(\n requests.map(async (request) => {\n try {\n return await runChildFetch(context, request);\n } catch (error) {\n // A failed level renders empty rather than taking the wave down; the\n // caller decides whether to say so. The thrown reason rides along —\n // this catch covers the lookup STAMPING pass as well as the request, so\n // \"every response was 200 and the level still failed\" has to be\n // readable from the row rather than from the network panel.\n const reason =\n error instanceof Error && error.message ? `: ${error.message}` : '';\n errors.push(\n `Unable to load ${\n request.catalogReturnObject ?? plan.catalogObjectKey\n }${reason}`\n );\n return {};\n }\n })\n );\n settled.forEach((slice) => Object.assign(rowsByParentKey, slice));\n errors.forEach((message) => context.onLevelError?.(message));\n return { rowsByParentKey, errors };\n};\n\n/**\n * Fill every eager level below `origin` for `rows`, breadth-first. Returns a\n * PRIVATE copy of the rows with each level's records grafted on — the caller's\n * (cached) rows are never touched. Identity is preserved when the config has no\n * eager level at all, so a fully lazy tree costs nothing (see the module's\n * IDENTITY CONTRACT).\n */\nexport const hydrateRowsWithWaves = async (\n origin: DisplayNode | null | undefined,\n rows: Row[] | null | undefined,\n context: WaveContext\n): Promise<Row[]> => {\n if (!rows?.length || !origin) return rows ?? [];\n const waves = planEagerWaves(origin);\n if (!waves.length) return rows;\n\n const hydrated = rows.map((row) => structuredClone(row));\n const parentsByLevelId = new Map<string, ParentRowRef[]>();\n parentsByLevelId.set(\n String(origin.id),\n hydrated.map((row, index) => ({ key: `#${index}`, row }))\n );\n\n for (const wave of waves) {\n await Promise.all(\n wave.map(async (plan) => {\n const parents = parentsByLevelId.get(String(plan.parentNode.id)) ?? [];\n if (!parents.length) {\n parentsByLevelId.set(String(plan.childNode.id), []);\n return;\n }\n const { rowsByParentKey } = await fetchLevel(context, plan, parents);\n parentsByLevelId.set(\n String(plan.childNode.id),\n graftChildRows(parents, plan.catalogObjectKey, rowsByParentKey)\n );\n })\n );\n }\n return hydrated;\n};\n\n/** Find a config level in the nested seed by its wire treeStructure id. */\nexport const findSeedLevel = (\n node: DisplayNode | null | undefined,\n id: string | null | undefined\n): DisplayNode | null => {\n if (!node || !id) return null;\n if (String(node.id) === String(id)) return node;\n for (const child of node.children ?? []) {\n const match = findSeedLevel(child, id);\n if (match) return match;\n }\n return null;\n};\n\n/**\n * A level composed as a display ROOT must not carry its own catalogObjectKey.\n * The composer collects the keys of the levels BELOW its root in order and\n * indexes its config levels by position against that list (the legacy\n * processReferences scheme, which every tree satisfies because a tree root's\n * key is empty). Composing a lazily-expanded level as a root breaks that\n * assumption: its key would shift the list by one and every level beneath it\n * would resolve to the wrong config node — silently dropping the eager\n * grandchildren that were just fetched.\n */\nconst asCompositionRoot = (level: DisplayNode): DisplayNode => ({\n ...level,\n properties: { ...level.properties, catalogObjectKey: '' }\n});\n\n/**\n * Put the level's own key back on the rows that came from it, so a lazily\n * paged-in row is byte-identical to the same row composed eagerly.\n */\nconst restoreCatalogObjectKey = (\n node: DisplayNode,\n configNodeId: string,\n catalogObjectKey: string\n): void => {\n if (!node.isGroupNode && String(node.configNodeId) === configNodeId) {\n node.properties = { ...node.properties, catalogObjectKey };\n }\n (node.children ?? []).forEach((child) =>\n restoreCatalogObjectKey(child, configNodeId, catalogObjectKey)\n );\n};\n\nexport interface LazyChildrenResult {\n children: DisplayNode[];\n hasMoreChildren: boolean;\n /**\n * The FIRST failure's own message when there is one, never a bare `true`: the\n * menu renders a stamped string verbatim and falls back to \"Error Retrieving\n * Children\" otherwise, and that generic row is unreadable — a planning\n * failure (un-promoted child entity, no catalog association, a level that has\n * left the configuration) issues NO request at all, so the network tells the\n * reader nothing either.\n */\n errorRetrievingChildren: string | boolean;\n /** The parent's row, unchanged — v2 never rewrites it on a child fetch. */\n updatedNodeObj: Row | undefined;\n}\n\nexport interface LoadLazyChildrenArgs {\n /** The display row being expanded. */\n node: DisplayNode;\n /** The nested tree config (makeDisplayTreeStructure output). */\n seed: DisplayNode | null;\n /** 1 for the first page; Show More asks for the next. */\n pageNumber?: number;\n context: WaveContext;\n makeId: () => string;\n}\n\n/**\n * Page in ONE row's lazy levels. Same planner and the same batched request as a\n * wave — with a single parent value — then the eager levels below the fetched\n * rows, then composition through the display pipeline, so a lazily-loaded level\n * groups, hides and nests exactly like an eager one.\n */\nexport const loadLazyChildren = async ({\n node,\n seed,\n pageNumber = 1,\n context,\n makeId\n}: LoadLazyChildrenArgs): Promise<LazyChildrenResult> => {\n const configNode = findSeedLevel(seed, node.configNodeId);\n if (!configNode) {\n return {\n children: [],\n hasMoreChildren: false,\n errorRetrievingChildren: `Error: tree level ${\n node.configNodeId ?? '(none)'\n } is not in the current tree configuration`,\n updatedNodeObj: node.nodeObj\n };\n }\n\n const parentRef: ParentRowRef = { key: 'p', row: node.nodeObj ?? {} };\n const { lazyChildNodes } = splitChildLevels(configNode, 'config');\n let hasMoreChildren = false;\n // Per LEVEL, positionally — the levels settle in whatever order the network\n // returns them, and \"the first error\" has to mean the first configured level\n // that failed, not the first to finish.\n const levelErrors: Array<string | undefined> = [];\n\n const levels = await Promise.all(\n lazyChildNodes.map(async (childNode, levelIndex) => {\n const catalogObjectKey = childNode.properties?.[\n 'catalogObjectKey'\n ] as string;\n const { rowsByParentKey, errors } = await fetchLevel(\n context,\n { parentNode: configNode, childNode, catalogObjectKey },\n [parentRef],\n { pageNumber }\n );\n if (errors.length) {\n // Name the level the message belongs to: one misconfigured level under\n // a parent must not read as \"this row's children failed\".\n const levelName =\n (childNode.properties?.['name'] as string) || catalogObjectKey;\n levelErrors[levelIndex] = `${levelName}: ${errors[0]}`;\n }\n const childRows = rowsByParentKey[parentRef.key] ?? [];\n // A full page means there is probably another — the menu's Show More row.\n if (childRows.length >= CHILD_PAGE_SIZE) hasMoreChildren = true;\n const hydrated = await hydrateRowsWithWaves(\n childNode,\n childRows,\n context\n );\n const built =\n buildPreloadedDisplayList(asCompositionRoot(childNode), hydrated, {\n makeId,\n loadMode: 'config',\n catalogObjects: context.catalogObjects,\n promotedEntities: context.promotedEntities\n }) ?? [];\n built.forEach((root) =>\n restoreCatalogObjectKey(root, String(childNode.id), catalogObjectKey)\n );\n return built;\n })\n );\n\n const children = levels.flat();\n children.forEach((child) => {\n child.parentId = node.id ?? null;\n if (child.isGroupNode) child.parentGroupId = node.id ?? null;\n else child['entityNodeParentId'] = node.id ?? null;\n // Marks the row as paged in, which is what lets the menu dedup by\n // businessObjectKey when Show More appends the next page. It is NOT the\n // legacy rule-evaluation flag: v2's fetch returns flat child-entity rows\n // (the many-to-many joining row never reaches the composer), so rules\n // evaluate against the same shape an eager level produces.\n child['wasLazyLoaded'] = true;\n });\n\n return {\n children,\n hasMoreChildren,\n errorRetrievingChildren: levelErrors.find((error) => !!error) ?? false,\n updatedNodeObj: node.nodeObj\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAMmC,gBAAgB,OACpBC,SACAC,YACmC;CACnC,MAAMC,QAAQ,MAAMF,QAAQd,UAAUe,QAAQd,aAAac,QAAQb,KAAK;AAExE,KAAIa,QAAQE,SAAS,SACnB,QAAO,GACJF,QAAQG,YAAY,MAAMJ,QAAQR,UACjCS,QAAQI,qBACRH,MAAMpB,MACNoB,MAAMlB,WACR,EACD;AAGH,KAAIiB,QAAQE,SAAS,OACnB,QAAOjC,mBACL+B,SACA,MAAMD,QAAQR,UACZS,QAAQI,qBACRH,MAAMpB,MACNoB,MAAMlB,WAEV,CAAC;AAKH,KAAI,CAACkB,MAAMpB,KAAKwB,OAAQ,QAAOpC,mBAAmB+B,SAAS,EAAE,CAAC;CAC9D,MAAMM,SAAS,MAAMP,QAAQd,UAC3Be,QAAQO,kBACR3C,gCAA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d,iBACtD,CAAC;AACD,SAAOiD;GAEX,CAAC,EAEuBG,MAAM;AAC9B5B,UAASvB,SAASsB,UAAU;AAC1BA,QAAM8B,WAAW/B,KAAKR,MAAM;AAC5B,MAAIS,MAAMQ,YAAaR,OAAM+B,gBAAgBhC,KAAKR,MAAM;MACnDS,OAAM,wBAAwBD,KAAKR,MAAM;AAM9CS,QAAM,mBAAmB;GACzB;AAEF,QAAO;EACLC;EACAS;EACAC,yBAAyBU,YAAYW,MAAM3D,UAAU,CAAC,CAACA,MAAM,IAAI;EACjEuC,gBAAgBb,KAAKmB;EACtB"}
1
+ {"version":3,"file":"waveLoader.mjs","names":["buildManyToManyChildRequestData","buildPreloadedDisplayList","graftChildRows","parseLazyPageSize","planChildLevelFetch","planEagerWaves","sliceBulkChildRows","sliceManyToManyChildRows","splitChildLevels","CatalogObject","ChildFetch","EagerLevelPlan","ParentRowRef","PromotedEntity","DisplayNode","keyGroupHeadings","Row","Record","ChildRowsResult","rows","total","lookupsMap","WaveContext","fetchRows","apiMethodId","data","Promise","catalogObjects","promotedEntities","stampRows","entityName","onLevelError","message","LevelResult","rowsByParentKey","errors","hasMore","context","complete","first","pageNumber","Number","length","next","push","ChildFetchResult","slices","runChildFetch","request","kind","parentKey","catalogReturnObject","second","childApiMethodId","fetchLevel","plan","parents","page","pageSize","requests","errorsByParentKey","Array","from","Set","Object","values","settled","all","map","error","reason","Error","catalogObjectKey","forEach","slice","assign","hydrateRowsWithWaves","origin","waves","hydrated","row","parentsByLevelId","Map","set","String","id","index","key","wave","get","parentNode","childNode","LazyChildrenResult","children","hasMoreChildren","errorRetrievingChildren","updatedNodeObj","LoadLazyChildrenArgs","node","findLevel","makeId","loadLazyChildren","configNode","configNodeId","nodeObj","parentRef","lazyChildNodes","levelErrors","levels","levelIndex","properties","levelName","childRows","flat","child","parentId","isGroupNode","parentGroupId","find"],"sources":["../../../../src/inquiry/v2/tree/waveLoader.ts"],"sourcesContent":["/**\n * The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/\n * waveLoad) into requests, cache entries and display rows.\n *\n * TWO ENTRY POINTS, ONE MECHANISM:\n * - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,\n * breadth-first: one batched `parentFK IN (…)` request per level per wave,\n * paged until the server's total is reached (an eager level has no Show\n * More, so it loads whole), levels within a wave in parallel, waves serial\n * by depth. Fetched rows are\n * written onto their parent row under the level's association key, so the\n * display composer walks one row graph.\n * - `loadLazyChildren` fills ONE level on expand: the same planner with a\n * single parent value, then the eager levels below it, then composition.\n *\n * Caching is the query cache, reached through the injected `fetchRows` (the\n * viewer keys it on method × exact body). A collapsed-then-reopened row, a wave\n * that re-crosses parents it already covered, and a recompose after a catalog\n * change are all cache hits, not network hops.\n *\n * IDENTITY CONTRACT (the menu depends on it). `hydrateRowsWithWaves` returns\n * the caller's OWN array, by reference, when it had nothing to add — so a tree\n * with no eager level never invalidates a downstream memo — and a brand-new\n * array whenever it grafted anything. It never mutates the caller's rows. The\n * caller must therefore pair a result with the exact input it came from and\n * discard it the moment that input is superseded; serving a hydration of stale\n * rows is how a menu ends up rendering records the rest of the pane can't see.\n */\nimport {\n buildManyToManyChildRequestData,\n buildPreloadedDisplayList,\n graftChildRows,\n parseLazyPageSize,\n planChildLevelFetch,\n planEagerWaves,\n sliceBulkChildRows,\n sliceManyToManyChildRows,\n splitChildLevels\n} from '../../../domain/inquiryTree';\nimport type {\n CatalogObject,\n ChildFetch,\n EagerLevelPlan,\n ParentRowRef,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport type { DisplayNode } from '../../../domain/inquiryTree/displayTree';\nimport { keyGroupHeadings } from './pagedChildrenModel';\n\ntype Row = Record<string, unknown>;\n\n/** What one child request answers with (the v2 query hook's RecordRows). */\nexport interface ChildRowsResult {\n rows: Row[];\n total: number;\n lookupsMap?: Record<string, unknown> | null;\n}\n\n/**\n * Everything the wave executor needs from the outside. Both effects are\n * INJECTED rather than imported so this module stays free of React and the\n * query client — which is what lets the mount-order contract below be tested\n * under the domain harness instead of only in a browser.\n */\nexport interface WaveContext {\n /** Issue one child request. The caller owns caching (inquiryKeys.childBatch). */\n fetchRows: (apiMethodId: string, data: Row) => Promise<ChildRowsResult>;\n catalogObjects?: CatalogObject[] | null;\n promotedEntities?: PromotedEntity[] | null;\n /**\n * Lookup-stamp a page of rows for a known entity — the same pass the root\n * page gets, so a child row's label reads like its parent's.\n */\n stampRows: (\n entityName: string | undefined,\n rows: Row[],\n lookupsMap?: Record<string, unknown> | null\n ) => Promise<Row[]>;\n /** Called once per distinct level failure (un-promoted child, bad assoc). */\n onLevelError?: (message: string) => void;\n}\n\n/** Rows fetched for one level, plus whatever stopped some parents being asked. */\ninterface LevelResult {\n rowsByParentKey: Record<string, Row[]>;\n errors: string[];\n /** A page was asked for and the server holds rows beyond it. */\n hasMore: boolean;\n}\n\n/**\n * One request's rows. `complete` keeps asking for the next page while the\n * server reports more: an eager level has no Show More, so it must arrive whole\n * (v1 nested eager children uncapped). A lazy page is one page — the menu's\n * Show More asks for the next.\n */\nconst fetchRows = async (\n context: WaveContext,\n apiMethodId: string,\n data: Row,\n complete: boolean\n): Promise<ChildRowsResult> => {\n const first = await context.fetchRows(apiMethodId, data);\n if (!complete) return first;\n const rows = [...first.rows];\n let pageNumber = Number(data['pageNumber'] ?? 1);\n while (rows.length < first.total) {\n pageNumber += 1;\n const next = await context.fetchRows(apiMethodId, { ...data, pageNumber });\n if (!next.rows.length) break;\n rows.push(...next.rows);\n }\n return { ...first, rows };\n};\n\n/** One request's rows per parent, and the server's total for what it paged. */\ninterface ChildFetchResult {\n slices: Record<string, Row[]>;\n total: number;\n}\n\n/** Run ONE planned request and map its rows back to the parents that claim them. */\nconst runChildFetch = async (\n context: WaveContext,\n request: ChildFetch,\n complete: boolean\n): Promise<ChildFetchResult> => {\n const first = await fetchRows(\n context,\n request.apiMethodId,\n request.data,\n complete\n );\n const { total } = first;\n\n if (request.kind === 'single') {\n return {\n slices: {\n [request.parentKey]: await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n },\n total\n };\n }\n\n if (request.kind === 'bulk') {\n return {\n slices: sliceBulkChildRows(\n request,\n await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n ),\n total\n };\n }\n\n // Many-to-many: the first hop returned JOINING rows (which carry the parent\n // key AND the child key); the second fetches every child they name at once,\n // always whole — it answers exactly the joining rows already in hand. The\n // page (and so the total) is the joining rows': a short second hop is no\n // sign the parent has nothing more.\n if (!first.rows.length) {\n return { slices: sliceBulkChildRows(request, []), total };\n }\n const second = await fetchRows(\n context,\n request.childApiMethodId,\n buildManyToManyChildRequestData(request, first.rows, first.rows.length),\n true\n );\n return {\n slices: sliceManyToManyChildRows(\n request,\n first.rows,\n await context.stampRows(\n request.catalogReturnObject,\n second.rows,\n second.lookupsMap\n )\n ),\n total\n };\n};\n\n/**\n * Fetch one level for a set of parents: plan → requests (parallel) → slices.\n * With a `page` it fetches that page (lazy expand / Show More); without one\n * the level loads whole (an eager wave).\n */\nconst fetchLevel = async (\n context: WaveContext,\n plan: EagerLevelPlan,\n parents: ParentRowRef[],\n page?: { pageSize: number; pageNumber: number }\n): Promise<LevelResult> => {\n const complete = !page;\n const { requests, errorsByParentKey } = planChildLevelFetch(\n plan,\n parents,\n context.catalogObjects,\n context.promotedEntities,\n page\n );\n const errors = Array.from(new Set(Object.values(errorsByParentKey)));\n const rowsByParentKey: Record<string, Row[]> = {};\n let hasMore = false;\n const settled = await Promise.all(\n requests.map(async (request) => {\n try {\n const { slices, total } = await runChildFetch(\n context,\n request,\n complete\n );\n if (page && total > page.pageNumber * page.pageSize) hasMore = true;\n return slices;\n } catch (error) {\n // A failed level renders empty rather than taking the wave down; the\n // caller decides whether to say so. The thrown reason rides along —\n // this catch covers the lookup STAMPING pass as well as the request, so\n // \"every response was 200 and the level still failed\" has to be\n // readable from the row rather than from the network panel.\n const reason =\n error instanceof Error && error.message ? `: ${error.message}` : '';\n errors.push(\n `Unable to load ${\n request.catalogReturnObject ?? plan.catalogObjectKey\n }${reason}`\n );\n return {};\n }\n })\n );\n settled.forEach((slice) => Object.assign(rowsByParentKey, slice));\n errors.forEach((message) => context.onLevelError?.(message));\n return { rowsByParentKey, errors, hasMore };\n};\n\n/**\n * Fill every eager level below `origin` for `rows`, breadth-first. Returns a\n * PRIVATE copy of the rows with each level's records grafted on — the caller's\n * (cached) rows are never touched. Identity is preserved when the config has no\n * eager level at all, so a fully lazy tree costs nothing (see the module's\n * IDENTITY CONTRACT).\n */\nexport const hydrateRowsWithWaves = async (\n origin: DisplayNode | null | undefined,\n rows: Row[] | null | undefined,\n context: WaveContext\n): Promise<Row[]> => {\n if (!rows?.length || !origin) return rows ?? [];\n const waves = planEagerWaves(origin);\n if (!waves.length) return rows;\n\n // Shallow is enough: grafting only writes a level's key onto each row.\n const hydrated = rows.map((row) => ({ ...row }));\n const parentsByLevelId = new Map<string, ParentRowRef[]>();\n parentsByLevelId.set(\n String(origin.id),\n hydrated.map((row, index) => ({ key: `#${index}`, row }))\n );\n\n for (const wave of waves) {\n await Promise.all(\n wave.map(async (plan) => {\n const parents = parentsByLevelId.get(String(plan.parentNode.id)) ?? [];\n if (!parents.length) {\n parentsByLevelId.set(String(plan.childNode.id), []);\n return;\n }\n const { rowsByParentKey } = await fetchLevel(context, plan, parents);\n parentsByLevelId.set(\n String(plan.childNode.id),\n graftChildRows(parents, plan.catalogObjectKey, rowsByParentKey)\n );\n })\n );\n }\n return hydrated;\n};\nexport interface LazyChildrenResult {\n children: DisplayNode[];\n hasMoreChildren: boolean;\n /**\n * The FIRST failure's own message when there is one, never a bare `true`: a\n * planning failure (un-promoted child entity, no catalog association, a\n * level that has left the configuration) issues NO request at all, so this\n * message — logged by the menu — is the only trace it leaves.\n */\n errorRetrievingChildren: string | boolean;\n /** The parent's row, unchanged — v2 never rewrites it on a child fetch. */\n updatedNodeObj: Row | undefined;\n}\n\nexport interface LoadLazyChildrenArgs {\n /** The display row being expanded. */\n node: DisplayNode;\n /**\n * The config level a row's `configNodeId` names — the menu's lookup, which\n * spans this tree and any other tree a loaded root came from.\n */\n findLevel: (id: string | number | null | undefined) => DisplayNode | null;\n /** 1 for the first page; Show More asks for the next. */\n pageNumber?: number;\n context: WaveContext;\n makeId: () => string;\n}\n\n/**\n * Page in ONE row's lazy levels. Same planner and the same batched request as a\n * wave — with a single parent value — then the eager levels below the fetched\n * rows, then composition through the display pipeline, so a lazily-loaded level\n * groups, hides and nests exactly like an eager one.\n */\nexport const loadLazyChildren = async ({\n node,\n findLevel,\n pageNumber = 1,\n context,\n makeId\n}: LoadLazyChildrenArgs): Promise<LazyChildrenResult> => {\n const configNode = findLevel(node.configNodeId);\n if (!configNode) {\n return {\n children: [],\n hasMoreChildren: false,\n errorRetrievingChildren: `Error: tree level ${\n node.configNodeId ?? '(none)'\n } is not in the current tree configuration`,\n updatedNodeObj: node.nodeObj\n };\n }\n\n const parentRef: ParentRowRef = { key: 'p', row: node.nodeObj ?? {} };\n const { lazyChildNodes } = splitChildLevels(configNode);\n const pageSize = parseLazyPageSize(configNode);\n let hasMoreChildren = false;\n // Per LEVEL, positionally — the levels settle in whatever order the network\n // returns them, and \"the first error\" has to mean the first configured level\n // that failed, not the first to finish.\n const levelErrors: Array<string | undefined> = [];\n\n const levels = await Promise.all(\n lazyChildNodes.map(async (childNode, levelIndex) => {\n const catalogObjectKey = childNode.properties?.[\n 'catalogObjectKey'\n ] as string;\n const { rowsByParentKey, errors, hasMore } = await fetchLevel(\n context,\n { parentNode: configNode, childNode, catalogObjectKey },\n [parentRef],\n { pageSize, pageNumber }\n );\n if (errors.length) {\n // Name the level the message belongs to: one misconfigured level under\n // a parent must not read as \"this row's children failed\".\n const levelName =\n (childNode.properties?.['name'] as string) || catalogObjectKey;\n levelErrors[levelIndex] = `${levelName}: ${errors[0]}`;\n }\n const childRows = rowsByParentKey[parentRef.key] ?? [];\n // The server's total, not the page's length, says whether Show More has\n // anything to show.\n if (hasMore) hasMoreChildren = true;\n const hydrated = await hydrateRowsWithWaves(\n childNode,\n childRows,\n context\n );\n return (\n buildPreloadedDisplayList(childNode, hydrated, {\n makeId,\n catalogObjects: context.catalogObjects,\n promotedEntities: context.promotedEntities\n }) ?? []\n );\n })\n );\n\n const children = levels.flat();\n children.forEach((child) => {\n child.parentId = node.id ?? null;\n if (child.isGroupNode) child.parentGroupId = node.id ?? null;\n else child['entityNodeParentId'] = node.id ?? null;\n });\n keyGroupHeadings(children, String(node.id));\n\n return {\n children,\n hasMoreChildren,\n errorRetrievingChildren: levelErrors.find((error) => !!error) ?? false,\n updatedNodeObj: node.nodeObj\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAMuB,YAAY,OAChBc,SACAb,aACAC,MACAa,aAC6B;CAC7B,MAAMC,QAAQ,MAAMF,QAAQd,UAAUC,aAAaC,KAAK;AACxD,KAAI,CAACa,SAAU,QAAOC;CACtB,MAAMpB,OAAO,CAAC,GAAGoB,MAAMpB,KAAK;CAC5B,IAAIqB,aAAaC,OAAOhB,KAAK,iBAAiB,EAAE;AAChD,QAAON,KAAKuB,SAASH,MAAMnB,OAAO;AAChCoB,gBAAc;EACd,MAAMG,OAAO,MAAMN,QAAQd,UAAUC,aAAa;GAAE,GAAGC;GAAMe;GAAY,CAAC;AAC1E,MAAI,CAACG,KAAKxB,KAAKuB,OAAQ;AACvBvB,OAAKyB,KAAK,GAAGD,KAAKxB,KAAK;;AAEzB,QAAO;EAAE,GAAGoB;EAAOpB;EAAM;;;AAU3B,MAAM4B,gBAAgB,OACpBV,SACAW,SACAV,aAC8B;CAC9B,MAAMC,QAAQ,MAAMhB,UAClBc,SACAW,QAAQxB,aACRwB,QAAQvB,MACRa,SACD;CACD,MAAM,EAAElB,UAAUmB;AAElB,KAAIS,QAAQC,SAAS,SACnB,QAAO;EACLH,QAAQ,GACLE,QAAQE,YAAY,MAAMb,QAAQR,UACjCmB,QAAQG,qBACRZ,MAAMpB,MACN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KAAKb,GAAG,CAAC;AAE3C,QAAO;EACLQ;EACAC;EACAC,yBAAyBY,YAAYW,MAAMjD,UAAU,CAAC,CAACA,MAAM,IAAI;EACjE2B,gBAAgBE,KAAKM;EACtB"}
@@ -0,0 +1,27 @@
1
+ /* A row's primary text stays on one line and ellipsizes, so every row in a
2
+ list is the same height however long a name is or however narrow the pane. */
3
+ .oneLine {
4
+ display: block;
5
+ min-width: 0;
6
+ overflow: hidden;
7
+ white-space: nowrap;
8
+ text-overflow: ellipsis;
9
+ }
10
+
11
+ /* A list item pads its content in from its own edge so the hover wash has
12
+ room. Pulling the list out by that same inset puts the row's content on the
13
+ section's text edge — title, rows and controls then share one left line —
14
+ and lets the wash bleed into the gutter. Row dividers stay on the text edge
15
+ too, rather than following the wash out. */
16
+ .flush {
17
+ margin-inline: calc(-1 * var(--spacingHorizontalM));
18
+ --udp-list-divider-inset: var(--spacingHorizontalM);
19
+ }
20
+
21
+ /* The scroll box around a flush list: it grows into the gutter by the same
22
+ inset and pads it back, so the rows' wash is inside the box rather than
23
+ clipped by it, and everything else in the box stays on the text edge. */
24
+ .bleed {
25
+ margin-inline: calc(-1 * var(--spacingHorizontalM));
26
+ padding-inline: var(--spacingHorizontalM);
27
+ }
@@ -16,17 +16,21 @@ export interface RecentlyLoadedWire {
16
16
  }
17
17
  /** One row of the Recent Records list. */
18
18
  export interface RecentRecordRow {
19
+ /** The record's identity (recordKeyOf) — unique within the list. */
20
+ key: string;
19
21
  /** The record's display label, as it was stamped when it was loaded. */
20
22
  label: string;
21
23
  /** The entity, humanized ("Works Request"). */
22
24
  entity: string;
23
- /** Raw ISO timestamp — the widget sorts on this and formats it for display. */
25
+ /** Raw ISO timestamp — the widget formats it for display. */
24
26
  dateLoaded: string;
25
27
  /** The history entry itself — replayed through `onLoadedNodeClick`. */
26
28
  node: RecentlyLoadedWire;
27
29
  }
28
30
  /**
29
- * The history as list rows, in input order (the widget sorts newest-first).
31
+ * The history as list rows, newest first, one row per record (recordKeyOf).
32
+ * The server log is append-only, so a record loaded three times arrives three
33
+ * times; only its latest load is listed.
30
34
  * Entries the tree can no longer name are still listed — dropping them would
31
35
  * turn a loadable record into a silent absence — but they are labelled with
32
36
  * `unnamedLabel` (the caller's translated fallback) rather than an empty row.
@@ -1 +1 @@
1
- {"version":3,"file":"widgetRowModel.d.ts","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,iFAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAuE;IACvE,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAKD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0EAa3B,CAAC"}
1
+ {"version":3,"file":"widgetRowModel.d.ts","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,sEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,+DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAuE;IACvE,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AA+BD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,0EAwB9B,CAAC"}
@@ -9,24 +9,59 @@
9
9
  * back to something identifying rather than a blank row
10
10
  * (frontend-standards: "never render a blank label").
11
11
  */
12
- import { entityNounOf } from '../search/searchModel';
12
+ import { asText, entityNounOf } from '../search/searchModel';
13
13
  const isNonEmptyString = (value) => typeof value === 'string' && value.trim().length > 0;
14
+ const dateOf = (node) => isNonEmptyString(node === null || node === void 0 ? void 0 : node.dateLoaded) ? node.dateLoaded : '';
14
15
  /**
15
- * The history as list rows, in input order (the widget sorts newest-first).
16
+ * A logged record's identity: its entity plus the identifier filters its
17
+ * `queryPayload` replays. v1 and v2 log the same record under different payload
18
+ * envelopes (page size, eager load) but the same `filterElements`, so the
19
+ * filters — field case-folded, value as text, order ignored — are the key. An
20
+ * entry with no filters cannot be told apart from another record, so it is
21
+ * keyed by its position in the list and never merged.
22
+ */
23
+ const recordKeyOf = (node, entityName, position) => {
24
+ var _a;
25
+ const filters = (_a = node === null || node === void 0 ? void 0 : node.queryPayload) === null || _a === void 0 ? void 0 : _a['filterElements'];
26
+ const pairs = (Array.isArray(filters) ? filters : [])
27
+ .map((filter) => [
28
+ asText(filter === null || filter === void 0 ? void 0 : filter['searchField']).toLowerCase(),
29
+ asText(filter === null || filter === void 0 ? void 0 : filter['searchValue'])
30
+ ])
31
+ .sort();
32
+ return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;
33
+ };
34
+ /**
35
+ * The history as list rows, newest first, one row per record (recordKeyOf).
36
+ * The server log is append-only, so a record loaded three times arrives three
37
+ * times; only its latest load is listed.
16
38
  * Entries the tree can no longer name are still listed — dropping them would
17
39
  * turn a loadable record into a silent absence — but they are labelled with
18
40
  * `unnamedLabel` (the caller's translated fallback) rather than an empty row.
19
41
  */
20
- export const toRecentRecordRows = (nodes, unnamedLabel) => (nodes !== null && nodes !== void 0 ? nodes : []).map((node) => {
21
- var _a, _b;
22
- var _c;
23
- const entityName = (_c = (_a = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _a === void 0 ? void 0 : _a.catalogReturnObject) !== null && _c !== void 0 ? _c : '';
24
- const label = (_b = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _b === void 0 ? void 0 : _b.nodeLabel;
25
- return {
26
- label: isNonEmptyString(label) ? label.trim() : unnamedLabel,
27
- entity: entityName ? entityNounOf(entityName) : '',
28
- dateLoaded: isNonEmptyString(node === null || node === void 0 ? void 0 : node.dateLoaded) ? node.dateLoaded : '',
29
- node
30
- };
31
- });
42
+ export const toRecentRecordRows = (nodes, unnamedLabel) => {
43
+ const seen = new Set();
44
+ return [...(nodes !== null && nodes !== void 0 ? nodes : [])]
45
+ .sort((a, b) => dateOf(b).localeCompare(dateOf(a)))
46
+ .flatMap((node, position) => {
47
+ var _a, _b;
48
+ var _c;
49
+ const entityName = (_c = (_a = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _a === void 0 ? void 0 : _a.catalogReturnObject) !== null && _c !== void 0 ? _c : '';
50
+ const rawLabel = (_b = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _b === void 0 ? void 0 : _b.nodeLabel;
51
+ const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;
52
+ const key = recordKeyOf(node, entityName, position);
53
+ if (seen.has(key))
54
+ return [];
55
+ seen.add(key);
56
+ return [
57
+ {
58
+ key,
59
+ label,
60
+ entity: entityName ? entityNounOf(entityName) : '',
61
+ dateLoaded: dateOf(node),
62
+ node
63
+ }
64
+ ];
65
+ });
66
+ };
32
67
  //# sourceMappingURL=widgetRowModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widgetRowModel.js","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA+BrD,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC3D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAA8C,EAC9C,YAAoB,EACD,EAAE,CACrB,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;;;IAC1B,MAAM,UAAU,SAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,0CAAE,mBAAmB,mCAAI,EAAE,CAAC;IAChE,MAAM,KAAK,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,0CAAE,SAAS,CAAC;IAC3C,OAAO;QACL,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,YAAY;QAC5D,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;QAClD,UAAU,EAAE,gBAAgB,CAAC,IAAI,aAAJ,IAAI,uBAA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U,CAAC,CAAC,CAAC,CAAC,EAAE;gBAClD,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC;gBACxB,IAAI;aACL;SACF,CAAC;IAAA,CACH,CAAC,CAAC;AAAA,CACN,CAAC"}
@@ -1,4 +1,4 @@
1
- import { entityNounOf } from "../search/searchModel.mjs";
1
+ import { asText, entityNounOf } from "../search/searchModel.mjs";
2
2
  //#region src/inquiry/v2/widgets/widgetRowModel.ts
3
3
  /**
4
4
  * The explore-page widgets' PURE half — no React, no HTTP — so it runs under
@@ -12,22 +12,46 @@ import { entityNounOf } from "../search/searchModel.mjs";
12
12
  * (frontend-standards: "never render a blank label").
13
13
  */
14
14
  const isNonEmptyString = (value) => typeof value === "string" && value.trim().length > 0;
15
+ const dateOf = (node) => isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : "";
15
16
  /**
16
- * The history as list rows, in input order (the widget sorts newest-first).
17
+ * A logged record's identity: its entity plus the identifier filters its
18
+ * `queryPayload` replays. v1 and v2 log the same record under different payload
19
+ * envelopes (page size, eager load) but the same `filterElements`, so the
20
+ * filters — field case-folded, value as text, order ignored — are the key. An
21
+ * entry with no filters cannot be told apart from another record, so it is
22
+ * keyed by its position in the list and never merged.
23
+ */
24
+ const recordKeyOf = (node, entityName, position) => {
25
+ const filters = node?.queryPayload?.["filterElements"];
26
+ const pairs = (Array.isArray(filters) ? filters : []).map((filter) => [asText(filter?.["searchField"]).toLowerCase(), asText(filter?.["searchValue"])]).sort();
27
+ return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;
28
+ };
29
+ /**
30
+ * The history as list rows, newest first, one row per record (recordKeyOf).
31
+ * The server log is append-only, so a record loaded three times arrives three
32
+ * times; only its latest load is listed.
17
33
  * Entries the tree can no longer name are still listed — dropping them would
18
34
  * turn a loadable record into a silent absence — but they are labelled with
19
35
  * `unnamedLabel` (the caller's translated fallback) rather than an empty row.
20
36
  */
21
- const toRecentRecordRows = (nodes, unnamedLabel) => (nodes ?? []).map((node) => {
22
- const entityName = node?.nodeDetails?.catalogReturnObject ?? "";
23
- const label = node?.nodeDetails?.nodeLabel;
24
- return {
25
- label: isNonEmptyString(label) ? label.trim() : unnamedLabel,
26
- entity: entityName ? entityNounOf(entityName) : "",
27
- dateLoaded: isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : "",
28
- node
29
- };
30
- });
37
+ const toRecentRecordRows = (nodes, unnamedLabel) => {
38
+ const seen = /* @__PURE__ */ new Set();
39
+ return [...nodes ?? []].sort((a, b) => dateOf(b).localeCompare(dateOf(a))).flatMap((node, position) => {
40
+ const entityName = node?.nodeDetails?.catalogReturnObject ?? "";
41
+ const rawLabel = node?.nodeDetails?.nodeLabel;
42
+ const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;
43
+ const key = recordKeyOf(node, entityName, position);
44
+ if (seen.has(key)) return [];
45
+ seen.add(key);
46
+ return [{
47
+ key,
48
+ label,
49
+ entity: entityName ? entityNounOf(entityName) : "",
50
+ dateLoaded: dateOf(node),
51
+ node
52
+ }];
53
+ });
54
+ };
31
55
  //#endregion
32
56
  export { toRecentRecordRows };
33
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"widgetRowModel.mjs","names":["entityNounOf","RecentlyLoadedWire","apiMethodId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","Record","key","RecentRecordRow","label","entity","node","isNonEmptyString","value","trim","length","toRecentRecordRows","nodes","unnamedLabel","map","entityName"],"sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"sourcesContent":["/**\n * The explore-page widgets' PURE half — no React, no HTTP — so it runs under\n * the node:test domain harness (`pnpm test:domain`).\n *\n * `toRecentRecordRows` — the recently-loaded history as list rows. The entity\n * is humanized through the SAME helper the search surface uses\n * (`entityNounOf`), so \"…Models.WorksRequest\" reads \"Works Request\"\n * everywhere, and a history entry whose label the server never stamped falls\n * back to something identifying rather than a blank row\n * (frontend-standards: \"never render a blank label\").\n */\nimport { entityNounOf } from '../search/searchModel';\n\n/**\n * One recently-loaded history entry, structurally. Mirrors\n * `api/queries.RecentlyLoadedNode`; declared here so this module stays inside\n * the domain harness (queries.ts is React + axios and cannot compile there).\n */\nexport interface RecentlyLoadedWire {\n apiMethodId?: string;\n dateLoaded?: string;\n nodeDetails?: {\n nodeLabel?: string;\n catalogReturnObject?: string;\n treeStructureId?: string;\n };\n queryPayload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/** One row of the Recent Records list. */\nexport interface RecentRecordRow {\n /** The record's display label, as it was stamped when it was loaded. */\n label: string;\n /** The entity, humanized (\"Works Request\"). */\n entity: string;\n /** Raw ISO timestamp — the widget sorts on this and formats it for display. */\n dateLoaded: string;\n /** The history entry itself — replayed through `onLoadedNodeClick`. */\n node: RecentlyLoadedWire;\n}\n\nconst isNonEmptyString = (value: unknown): value is string =>\n typeof value === 'string' && value.trim().length > 0;\n\n/**\n * The history as list rows, in input order (the widget sorts newest-first).\n * Entries the tree can no longer name are still listed — dropping them would\n * turn a loadable record into a silent absence — but they are labelled with\n * `unnamedLabel` (the caller's translated fallback) rather than an empty row.\n */\nexport const toRecentRecordRows = (\n nodes: RecentlyLoadedWire[] | null | undefined,\n unnamedLabel: string\n): RecentRecordRow[] =>\n (nodes ?? []).map((node) => {\n const entityName = node?.nodeDetails?.catalogReturnObject ?? '';\n const label = node?.nodeDetails?.nodeLabel;\n return {\n label: isNonEmptyString(label) ? label.trim() : unnamedLabel,\n entity: entityName ? entityNounOf(entityName) : '',\n dateLoaded: isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : '',\n node\n };\n });\n"],"mappings":";;;;;;;;;;;;;AA0CA,MAAMe,oBAAoBC,UACxB,OAAOA,UAAU,YAAYA,MAAMC,MAAM,CAACC,SAAS;;;;;;;AAQrD,MAAaC,sBACXC,OACAC,kBAECD,SAAS,EAAE,EAAEE,KAAKR,SAAS;CAC1B,MAAMS,aAAaT,MAAMV,aAAaE,uBAAuB;CAC7D,MAAMM,QAAQE,MAAMV,aAAaC;AACjC,QAAO;EACLO,OAAOG,iBAAiBH,MAAM,GAAGA,MAAMK,MAAM,GAAGI;EAChDR,QAAQU,aAAavB,aAAauB,WAAW,GAAG;EAChDpB,YAAYY,iBAAiBD,MAAMX,WAAW,GAAGW,KAAKX,aAAa;EACnEW;EACD;EACD"}
1
+ {"version":3,"file":"widgetRowModel.mjs","names":["asText","entityNounOf","RecentlyLoadedWire","apiMethodId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","Record","key","RecentRecordRow","label","entity","node","isNonEmptyString","value","trim","length","dateOf","recordKeyOf","entityName","position","filters","pairs","Array","isArray","map","filter","toLowerCase","sort","JSON","stringify","toRecentRecordRows","nodes","unnamedLabel","seen","Set","a","b","localeCompare","flatMap","rawLabel","has","add"],"sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"sourcesContent":["/**\n * The explore-page widgets' PURE half — no React, no HTTP — so it runs under\n * the node:test domain harness (`pnpm test:domain`).\n *\n * `toRecentRecordRows` — the recently-loaded history as list rows. The entity\n * is humanized through the SAME helper the search surface uses\n * (`entityNounOf`), so \"…Models.WorksRequest\" reads \"Works Request\"\n * everywhere, and a history entry whose label the server never stamped falls\n * back to something identifying rather than a blank row\n * (frontend-standards: \"never render a blank label\").\n */\nimport { asText, entityNounOf } from '../search/searchModel';\n\n/**\n * One recently-loaded history entry, structurally. Mirrors\n * `api/queries.RecentlyLoadedNode`; declared here so this module stays inside\n * the domain harness (queries.ts is React + axios and cannot compile there).\n */\nexport interface RecentlyLoadedWire {\n apiMethodId?: string;\n dateLoaded?: string;\n nodeDetails?: {\n nodeLabel?: string;\n catalogReturnObject?: string;\n treeStructureId?: string;\n };\n queryPayload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/** One row of the Recent Records list. */\nexport interface RecentRecordRow {\n /** The record's identity (recordKeyOf) — unique within the list. */\n key: string;\n /** The record's display label, as it was stamped when it was loaded. */\n label: string;\n /** The entity, humanized (\"Works Request\"). */\n entity: string;\n /** Raw ISO timestamp — the widget formats it for display. */\n dateLoaded: string;\n /** The history entry itself — replayed through `onLoadedNodeClick`. */\n node: RecentlyLoadedWire;\n}\n\nconst isNonEmptyString = (value: unknown): value is string =>\n typeof value === 'string' && value.trim().length > 0;\n\nconst dateOf = (node: RecentlyLoadedWire): string =>\n isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : '';\n\n/**\n * A logged record's identity: its entity plus the identifier filters its\n * `queryPayload` replays. v1 and v2 log the same record under different payload\n * envelopes (page size, eager load) but the same `filterElements`, so the\n * filters — field case-folded, value as text, order ignored — are the key. An\n * entry with no filters cannot be told apart from another record, so it is\n * keyed by its position in the list and never merged.\n */\nconst recordKeyOf = (\n node: RecentlyLoadedWire,\n entityName: string,\n position: number\n): string => {\n const filters = node?.queryPayload?.['filterElements'];\n const pairs = (Array.isArray(filters) ? filters : [])\n .map((filter: Record<string, unknown>) => [\n asText(filter?.['searchField']).toLowerCase(),\n asText(filter?.['searchValue'])\n ])\n .sort();\n return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;\n};\n\n/**\n * The history as list rows, newest first, one row per record (recordKeyOf).\n * The server log is append-only, so a record loaded three times arrives three\n * times; only its latest load is listed.\n * Entries the tree can no longer name are still listed — dropping them would\n * turn a loadable record into a silent absence — but they are labelled with\n * `unnamedLabel` (the caller's translated fallback) rather than an empty row.\n */\nexport const toRecentRecordRows = (\n nodes: RecentlyLoadedWire[] | null | undefined,\n unnamedLabel: string\n): RecentRecordRow[] => {\n const seen = new Set<string>();\n return [...(nodes ?? [])]\n .sort((a, b) => dateOf(b).localeCompare(dateOf(a)))\n .flatMap((node, position) => {\n const entityName = node?.nodeDetails?.catalogReturnObject ?? '';\n const rawLabel = node?.nodeDetails?.nodeLabel;\n const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;\n const key = recordKeyOf(node, entityName, position);\n if (seen.has(key)) return [];\n seen.add(key);\n return [\n {\n key,\n label,\n entity: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,9 @@ import { asText } from "./text.mjs";
7
7
  import { parsePatch, tenantLabelField } from "./config/layers.mjs";
8
8
  import { usePromotedEntity } from "./api/promoted.mjs";
9
9
  import { loadEntityMetadata } from "./metadata/useEntityMetadata.mjs";
10
+ import { labelsFor } from "./api/labels.mjs";
10
11
  import { useHolds } from "./useEntityPage.mjs";
11
12
  import { tagsForBusinessKeys, useAllTags } from "./api/tagsApi.mjs";
12
- import { labelsFor } from "./api/labels.mjs";
13
13
  import { MAINTENANCE_GRID_ID } from "./grid/gridId.mjs";
14
14
  import { tagsCellRenderer } from "./grid/MaintenanceGrid.mjs";
15
15
  import { RecordSheet } from "./record/RecordSheet.mjs";
@@ -1,8 +1,8 @@
1
1
  import { executeQueryWithParameters } from "../../udp/utilities/methodUtils.mjs";
2
- import { appQueryClient } from "../../providers/QueryProvider.mjs";
3
2
  import { asText } from "../text.mjs";
4
3
  import { getPromotedEntity } from "./promoted.mjs";
5
4
  import { search, searchEntity } from "./entityApi.mjs";
5
+ import { appQueryClient } from "../../providers/QueryProvider.mjs";
6
6
  import { maintenanceKeys } from "../queryKeys.mjs";
7
7
  //#region src/maintenance/api/lookupApi.ts
8
8
  /** Every curated `udp.Lookup` (domain and virtual), by name — the lookups a field can take its options from. */
@@ -1,7 +1,7 @@
1
1
  import { c } from "../../reactCompilerRuntime.mjs";
2
- import { appQueryClient } from "../../providers/QueryProvider.mjs";
3
2
  import { getPromotedEntity } from "./promoted.mjs";
4
3
  import { createEntity, deleteEntity, eqFilter, inFilter, search, searchEntity } from "./entityApi.mjs";
4
+ import { appQueryClient } from "../../providers/QueryProvider.mjs";
5
5
  import { maintenanceKeys } from "../queryKeys.mjs";
6
6
  import { useQuery } from "@tanstack/react-query";
7
7
  //#region src/maintenance/api/tagsApi.ts
@@ -1 +1 @@
1
- {"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/maintenance/config/nodeDefaults.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,YAAY,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAWD,eAAO,MAAM,kBAAkB,gEAS9B,CAAC"}
1
+ {"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/maintenance/config/nodeDefaults.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,YAAY,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAoBD,eAAO,MAAM,kBAAkB,gEAS9B,CAAC"}