@cohesivesystems/presentation-core 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/LICENSE +55 -0
  2. package/dist/api-scope-request.d.ts +43 -0
  3. package/dist/api-scope-request.d.ts.map +1 -0
  4. package/dist/api-scope-request.js +96 -0
  5. package/dist/api-scope-request.js.map +1 -0
  6. package/dist/collection-chrome-icons.d.ts +18 -0
  7. package/dist/collection-chrome-icons.d.ts.map +1 -0
  8. package/dist/collection-chrome-icons.js +57 -0
  9. package/dist/collection-chrome-icons.js.map +1 -0
  10. package/dist/collection-chrome-runtime.d.ts +25 -0
  11. package/dist/collection-chrome-runtime.d.ts.map +1 -0
  12. package/dist/collection-chrome-runtime.js +72 -0
  13. package/dist/collection-chrome-runtime.js.map +1 -0
  14. package/dist/collection-chrome-slot-renderer-registry.d.ts +110 -0
  15. package/dist/collection-chrome-slot-renderer-registry.d.ts.map +1 -0
  16. package/dist/collection-chrome-slot-renderer-registry.js +136 -0
  17. package/dist/collection-chrome-slot-renderer-registry.js.map +1 -0
  18. package/dist/collection-selection-state.d.ts +18 -0
  19. package/dist/collection-selection-state.d.ts.map +1 -0
  20. package/dist/collection-selection-state.js +2 -0
  21. package/dist/collection-selection-state.js.map +1 -0
  22. package/dist/data-source-projection.d.ts +475 -0
  23. package/dist/data-source-projection.d.ts.map +1 -0
  24. package/dist/data-source-projection.js +880 -0
  25. package/dist/data-source-projection.js.map +1 -0
  26. package/dist/data-source-query-lowering.d.ts +35 -0
  27. package/dist/data-source-query-lowering.d.ts.map +1 -0
  28. package/dist/data-source-query-lowering.js +104 -0
  29. package/dist/data-source-query-lowering.js.map +1 -0
  30. package/dist/date-time-filter-model.d.ts +20 -0
  31. package/dist/date-time-filter-model.d.ts.map +1 -0
  32. package/dist/date-time-filter-model.js +115 -0
  33. package/dist/date-time-filter-model.js.map +1 -0
  34. package/dist/document-badge-icons.d.ts +4 -0
  35. package/dist/document-badge-icons.d.ts.map +1 -0
  36. package/dist/document-badge-icons.js +4 -0
  37. package/dist/document-badge-icons.js.map +1 -0
  38. package/dist/document-module.d.ts +268 -0
  39. package/dist/document-module.d.ts.map +1 -0
  40. package/dist/document-module.js +347 -0
  41. package/dist/document-module.js.map +1 -0
  42. package/dist/document-summary-model.d.ts +2 -0
  43. package/dist/document-summary-model.d.ts.map +1 -0
  44. package/dist/document-summary-model.js +2 -0
  45. package/dist/document-summary-model.js.map +1 -0
  46. package/dist/document-workspace-chrome-projection.d.ts +18 -0
  47. package/dist/document-workspace-chrome-projection.d.ts.map +1 -0
  48. package/dist/document-workspace-chrome-projection.js +35 -0
  49. package/dist/document-workspace-chrome-projection.js.map +1 -0
  50. package/dist/document-workspace-surface-slots.d.ts +75 -0
  51. package/dist/document-workspace-surface-slots.d.ts.map +1 -0
  52. package/dist/document-workspace-surface-slots.js +268 -0
  53. package/dist/document-workspace-surface-slots.js.map +1 -0
  54. package/dist/endpoint-executor.d.ts +62 -0
  55. package/dist/endpoint-executor.d.ts.map +1 -0
  56. package/dist/endpoint-executor.js +35 -0
  57. package/dist/endpoint-executor.js.map +1 -0
  58. package/dist/field-display-resolution.d.ts +5 -0
  59. package/dist/field-display-resolution.d.ts.map +1 -0
  60. package/dist/field-display-resolution.js +50 -0
  61. package/dist/field-display-resolution.js.map +1 -0
  62. package/dist/index.d.ts +90 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +89 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/module.d.ts +48 -0
  67. package/dist/module.d.ts.map +1 -0
  68. package/dist/module.js +108 -0
  69. package/dist/module.js.map +1 -0
  70. package/dist/navigation-shell-frame-renderer-registry.d.ts +12 -0
  71. package/dist/navigation-shell-frame-renderer-registry.d.ts.map +1 -0
  72. package/dist/navigation-shell-frame-renderer-registry.js +29 -0
  73. package/dist/navigation-shell-frame-renderer-registry.js.map +1 -0
  74. package/dist/navigation-shell-layout-runtime.d.ts +29 -0
  75. package/dist/navigation-shell-layout-runtime.d.ts.map +1 -0
  76. package/dist/navigation-shell-layout-runtime.js +50 -0
  77. package/dist/navigation-shell-layout-runtime.js.map +1 -0
  78. package/dist/navigation-shell-region-component-registry.d.ts +96 -0
  79. package/dist/navigation-shell-region-component-registry.d.ts.map +1 -0
  80. package/dist/navigation-shell-region-component-registry.js +108 -0
  81. package/dist/navigation-shell-region-component-registry.js.map +1 -0
  82. package/dist/navigation-shell-runtime.d.ts +48 -0
  83. package/dist/navigation-shell-runtime.d.ts.map +1 -0
  84. package/dist/navigation-shell-runtime.js +457 -0
  85. package/dist/navigation-shell-runtime.js.map +1 -0
  86. package/dist/navigation-shell-slot-renderer-registry.d.ts +15 -0
  87. package/dist/navigation-shell-slot-renderer-registry.d.ts.map +1 -0
  88. package/dist/navigation-shell-slot-renderer-registry.js +48 -0
  89. package/dist/navigation-shell-slot-renderer-registry.js.map +1 -0
  90. package/dist/navigation.d.ts +84 -0
  91. package/dist/navigation.d.ts.map +1 -0
  92. package/dist/navigation.js +167 -0
  93. package/dist/navigation.js.map +1 -0
  94. package/dist/object-path.d.ts +23 -0
  95. package/dist/object-path.d.ts.map +1 -0
  96. package/dist/object-path.js +63 -0
  97. package/dist/object-path.js.map +1 -0
  98. package/dist/page-host-renderer-registry.d.ts +119 -0
  99. package/dist/page-host-renderer-registry.d.ts.map +1 -0
  100. package/dist/page-host-renderer-registry.js +305 -0
  101. package/dist/page-host-renderer-registry.js.map +1 -0
  102. package/dist/presentation-action-endpoint-request-projection.d.ts +23 -0
  103. package/dist/presentation-action-endpoint-request-projection.d.ts.map +1 -0
  104. package/dist/presentation-action-endpoint-request-projection.js +117 -0
  105. package/dist/presentation-action-endpoint-request-projection.js.map +1 -0
  106. package/dist/presentation-action-endpoint.d.ts +24 -0
  107. package/dist/presentation-action-endpoint.d.ts.map +1 -0
  108. package/dist/presentation-action-endpoint.js +56 -0
  109. package/dist/presentation-action-endpoint.js.map +1 -0
  110. package/dist/presentation-action-icons.d.ts +4 -0
  111. package/dist/presentation-action-icons.d.ts.map +1 -0
  112. package/dist/presentation-action-icons.js +4 -0
  113. package/dist/presentation-action-icons.js.map +1 -0
  114. package/dist/presentation-action-result-state.d.ts +48 -0
  115. package/dist/presentation-action-result-state.d.ts.map +1 -0
  116. package/dist/presentation-action-result-state.js +109 -0
  117. package/dist/presentation-action-result-state.js.map +1 -0
  118. package/dist/presentation-action-runtime-binding.d.ts +48 -0
  119. package/dist/presentation-action-runtime-binding.d.ts.map +1 -0
  120. package/dist/presentation-action-runtime-binding.js +52 -0
  121. package/dist/presentation-action-runtime-binding.js.map +1 -0
  122. package/dist/presentation-action-runtime-diagnostics.d.ts +18 -0
  123. package/dist/presentation-action-runtime-diagnostics.d.ts.map +1 -0
  124. package/dist/presentation-action-runtime-diagnostics.js +69 -0
  125. package/dist/presentation-action-runtime-diagnostics.js.map +1 -0
  126. package/dist/presentation-action-runtime-labels.d.ts +15 -0
  127. package/dist/presentation-action-runtime-labels.d.ts.map +1 -0
  128. package/dist/presentation-action-runtime-labels.js +28 -0
  129. package/dist/presentation-action-runtime-labels.js.map +1 -0
  130. package/dist/presentation-action-runtime-projection.d.ts +17 -0
  131. package/dist/presentation-action-runtime-projection.d.ts.map +1 -0
  132. package/dist/presentation-action-runtime-projection.js +31 -0
  133. package/dist/presentation-action-runtime-projection.js.map +1 -0
  134. package/dist/presentation-badge-resolution.d.ts +8 -0
  135. package/dist/presentation-badge-resolution.d.ts.map +1 -0
  136. package/dist/presentation-badge-resolution.js +73 -0
  137. package/dist/presentation-badge-resolution.js.map +1 -0
  138. package/dist/presentation-collection-pagination.d.ts +32 -0
  139. package/dist/presentation-collection-pagination.d.ts.map +1 -0
  140. package/dist/presentation-collection-pagination.js +275 -0
  141. package/dist/presentation-collection-pagination.js.map +1 -0
  142. package/dist/presentation-content-diagnostics.d.ts +17 -0
  143. package/dist/presentation-content-diagnostics.d.ts.map +1 -0
  144. package/dist/presentation-content-diagnostics.js +61 -0
  145. package/dist/presentation-content-diagnostics.js.map +1 -0
  146. package/dist/presentation-content-resolution.d.ts +9 -0
  147. package/dist/presentation-content-resolution.d.ts.map +1 -0
  148. package/dist/presentation-content-resolution.js +19 -0
  149. package/dist/presentation-content-resolution.js.map +1 -0
  150. package/dist/presentation-data-source-binding-model.d.ts +81 -0
  151. package/dist/presentation-data-source-binding-model.d.ts.map +1 -0
  152. package/dist/presentation-data-source-binding-model.js +56 -0
  153. package/dist/presentation-data-source-binding-model.js.map +1 -0
  154. package/dist/presentation-data-source-runtime.d.ts +62 -0
  155. package/dist/presentation-data-source-runtime.d.ts.map +1 -0
  156. package/dist/presentation-data-source-runtime.js +80 -0
  157. package/dist/presentation-data-source-runtime.js.map +1 -0
  158. package/dist/presentation-design-intent-diagnostics.d.ts +25 -0
  159. package/dist/presentation-design-intent-diagnostics.d.ts.map +1 -0
  160. package/dist/presentation-design-intent-diagnostics.js +55 -0
  161. package/dist/presentation-design-intent-diagnostics.js.map +1 -0
  162. package/dist/presentation-icon-diagnostics.d.ts +45 -0
  163. package/dist/presentation-icon-diagnostics.d.ts.map +1 -0
  164. package/dist/presentation-icon-diagnostics.js +235 -0
  165. package/dist/presentation-icon-diagnostics.js.map +1 -0
  166. package/dist/presentation-icon-registry.d.ts +36 -0
  167. package/dist/presentation-icon-registry.d.ts.map +1 -0
  168. package/dist/presentation-icon-registry.js +81 -0
  169. package/dist/presentation-icon-registry.js.map +1 -0
  170. package/dist/presentation-navigation-action-runtime-bindings.d.ts +13 -0
  171. package/dist/presentation-navigation-action-runtime-bindings.d.ts.map +1 -0
  172. package/dist/presentation-navigation-action-runtime-bindings.js +29 -0
  173. package/dist/presentation-navigation-action-runtime-bindings.js.map +1 -0
  174. package/dist/presentation-pagination.d.ts +98 -0
  175. package/dist/presentation-pagination.d.ts.map +1 -0
  176. package/dist/presentation-pagination.js +427 -0
  177. package/dist/presentation-pagination.js.map +1 -0
  178. package/dist/presentation-projection-coverage.d.ts +38 -0
  179. package/dist/presentation-projection-coverage.d.ts.map +1 -0
  180. package/dist/presentation-projection-coverage.js +2429 -0
  181. package/dist/presentation-projection-coverage.js.map +1 -0
  182. package/dist/presentation-projection-diagnostics.d.ts +33 -0
  183. package/dist/presentation-projection-diagnostics.d.ts.map +1 -0
  184. package/dist/presentation-projection-diagnostics.js +17 -0
  185. package/dist/presentation-projection-diagnostics.js.map +1 -0
  186. package/dist/presentation-projection-trace.d.ts +97 -0
  187. package/dist/presentation-projection-trace.d.ts.map +1 -0
  188. package/dist/presentation-projection-trace.js +110 -0
  189. package/dist/presentation-projection-trace.js.map +1 -0
  190. package/dist/presentation-query-form-state.d.ts +15 -0
  191. package/dist/presentation-query-form-state.d.ts.map +1 -0
  192. package/dist/presentation-query-form-state.js +20 -0
  193. package/dist/presentation-query-form-state.js.map +1 -0
  194. package/dist/presentation-renderer-registry.d.ts +86 -0
  195. package/dist/presentation-renderer-registry.d.ts.map +1 -0
  196. package/dist/presentation-renderer-registry.js +108 -0
  197. package/dist/presentation-renderer-registry.js.map +1 -0
  198. package/dist/presentation-semantics.d.ts +288 -0
  199. package/dist/presentation-semantics.d.ts.map +1 -0
  200. package/dist/presentation-semantics.js +560 -0
  201. package/dist/presentation-semantics.js.map +1 -0
  202. package/dist/presentation-standards.d.ts +8 -0
  203. package/dist/presentation-standards.d.ts.map +1 -0
  204. package/dist/presentation-standards.js +9 -0
  205. package/dist/presentation-standards.js.map +1 -0
  206. package/dist/presentation-test-selectors.d.ts +146 -0
  207. package/dist/presentation-test-selectors.d.ts.map +1 -0
  208. package/dist/presentation-test-selectors.js +113 -0
  209. package/dist/presentation-test-selectors.js.map +1 -0
  210. package/dist/presentation-value-formatting.d.ts +12 -0
  211. package/dist/presentation-value-formatting.d.ts.map +1 -0
  212. package/dist/presentation-value-formatting.js +33 -0
  213. package/dist/presentation-value-formatting.js.map +1 -0
  214. package/dist/presentation-value-resolution.d.ts +7 -0
  215. package/dist/presentation-value-resolution.d.ts.map +1 -0
  216. package/dist/presentation-value-resolution.js +69 -0
  217. package/dist/presentation-value-resolution.js.map +1 -0
  218. package/dist/presentation-view-tree.d.ts +6 -0
  219. package/dist/presentation-view-tree.d.ts.map +1 -0
  220. package/dist/presentation-view-tree.js +15 -0
  221. package/dist/presentation-view-tree.js.map +1 -0
  222. package/dist/process-task-model.d.ts +80 -0
  223. package/dist/process-task-model.d.ts.map +1 -0
  224. package/dist/process-task-model.js +52 -0
  225. package/dist/process-task-model.js.map +1 -0
  226. package/dist/process-task-projection.d.ts +46 -0
  227. package/dist/process-task-projection.d.ts.map +1 -0
  228. package/dist/process-task-projection.js +233 -0
  229. package/dist/process-task-projection.js.map +1 -0
  230. package/dist/projected-action-status-projection.d.ts +18 -0
  231. package/dist/projected-action-status-projection.d.ts.map +1 -0
  232. package/dist/projected-action-status-projection.js +19 -0
  233. package/dist/projected-action-status-projection.js.map +1 -0
  234. package/dist/projected-activity-state-model.d.ts +22 -0
  235. package/dist/projected-activity-state-model.d.ts.map +1 -0
  236. package/dist/projected-activity-state-model.js +87 -0
  237. package/dist/projected-activity-state-model.js.map +1 -0
  238. package/dist/projected-collection-action-runtime-bindings.d.ts +12 -0
  239. package/dist/projected-collection-action-runtime-bindings.d.ts.map +1 -0
  240. package/dist/projected-collection-action-runtime-bindings.js +37 -0
  241. package/dist/projected-collection-action-runtime-bindings.js.map +1 -0
  242. package/dist/projected-collection-action-runtime-diagnostics.d.ts +23 -0
  243. package/dist/projected-collection-action-runtime-diagnostics.d.ts.map +1 -0
  244. package/dist/projected-collection-action-runtime-diagnostics.js +168 -0
  245. package/dist/projected-collection-action-runtime-diagnostics.js.map +1 -0
  246. package/dist/projected-collection-runtime.d.ts +475 -0
  247. package/dist/projected-collection-runtime.d.ts.map +1 -0
  248. package/dist/projected-collection-runtime.js +832 -0
  249. package/dist/projected-collection-runtime.js.map +1 -0
  250. package/dist/projected-document-action-diagnostics.d.ts +16 -0
  251. package/dist/projected-document-action-diagnostics.d.ts.map +1 -0
  252. package/dist/projected-document-action-diagnostics.js +113 -0
  253. package/dist/projected-document-action-diagnostics.js.map +1 -0
  254. package/dist/projected-document-action-enablements.d.ts +25 -0
  255. package/dist/projected-document-action-enablements.d.ts.map +1 -0
  256. package/dist/projected-document-action-enablements.js +38 -0
  257. package/dist/projected-document-action-enablements.js.map +1 -0
  258. package/dist/projected-document-action-projection.d.ts +45 -0
  259. package/dist/projected-document-action-projection.d.ts.map +1 -0
  260. package/dist/projected-document-action-projection.js +201 -0
  261. package/dist/projected-document-action-projection.js.map +1 -0
  262. package/dist/projected-document-action-runtime-profile-diagnostics.d.ts +16 -0
  263. package/dist/projected-document-action-runtime-profile-diagnostics.d.ts.map +1 -0
  264. package/dist/projected-document-action-runtime-profile-diagnostics.js +168 -0
  265. package/dist/projected-document-action-runtime-profile-diagnostics.js.map +1 -0
  266. package/dist/projected-document-action-runtime-profile.d.ts +64 -0
  267. package/dist/projected-document-action-runtime-profile.d.ts.map +1 -0
  268. package/dist/projected-document-action-runtime-profile.js +33 -0
  269. package/dist/projected-document-action-runtime-profile.js.map +1 -0
  270. package/dist/projected-document-action-status-notice-diagnostics.d.ts +10 -0
  271. package/dist/projected-document-action-status-notice-diagnostics.d.ts.map +1 -0
  272. package/dist/projected-document-action-status-notice-diagnostics.js +64 -0
  273. package/dist/projected-document-action-status-notice-diagnostics.js.map +1 -0
  274. package/dist/projected-document-badge-formatting.d.ts +2 -0
  275. package/dist/projected-document-badge-formatting.d.ts.map +1 -0
  276. package/dist/projected-document-badge-formatting.js +7 -0
  277. package/dist/projected-document-badge-formatting.js.map +1 -0
  278. package/dist/projected-document-editor-model.d.ts +4 -0
  279. package/dist/projected-document-editor-model.d.ts.map +1 -0
  280. package/dist/projected-document-editor-model.js +2 -0
  281. package/dist/projected-document-editor-model.js.map +1 -0
  282. package/dist/projected-document-field-navigation.d.ts +72 -0
  283. package/dist/projected-document-field-navigation.d.ts.map +1 -0
  284. package/dist/projected-document-field-navigation.js +143 -0
  285. package/dist/projected-document-field-navigation.js.map +1 -0
  286. package/dist/projected-document-field-semantics.d.ts +5 -0
  287. package/dist/projected-document-field-semantics.d.ts.map +1 -0
  288. package/dist/projected-document-field-semantics.js +16 -0
  289. package/dist/projected-document-field-semantics.js.map +1 -0
  290. package/dist/projected-document-workspace-data-source-bindings.d.ts +69 -0
  291. package/dist/projected-document-workspace-data-source-bindings.d.ts.map +1 -0
  292. package/dist/projected-document-workspace-data-source-bindings.js +81 -0
  293. package/dist/projected-document-workspace-data-source-bindings.js.map +1 -0
  294. package/dist/projected-document-workspace-notice-diagnostics.d.ts +12 -0
  295. package/dist/projected-document-workspace-notice-diagnostics.d.ts.map +1 -0
  296. package/dist/projected-document-workspace-notice-diagnostics.js +13 -0
  297. package/dist/projected-document-workspace-notice-diagnostics.js.map +1 -0
  298. package/dist/projected-input-form-runtime.d.ts +62 -0
  299. package/dist/projected-input-form-runtime.d.ts.map +1 -0
  300. package/dist/projected-input-form-runtime.js +2 -0
  301. package/dist/projected-input-form-runtime.js.map +1 -0
  302. package/dist/projected-process-task-notice-diagnostics.d.ts +13 -0
  303. package/dist/projected-process-task-notice-diagnostics.d.ts.map +1 -0
  304. package/dist/projected-process-task-notice-diagnostics.js +170 -0
  305. package/dist/projected-process-task-notice-diagnostics.js.map +1 -0
  306. package/dist/projected-query-form-runtime.d.ts +46 -0
  307. package/dist/projected-query-form-runtime.d.ts.map +1 -0
  308. package/dist/projected-query-form-runtime.js +2 -0
  309. package/dist/projected-query-form-runtime.js.map +1 -0
  310. package/dist/prompt-document-preview-projection.d.ts +46 -0
  311. package/dist/prompt-document-preview-projection.d.ts.map +1 -0
  312. package/dist/prompt-document-preview-projection.js +173 -0
  313. package/dist/prompt-document-preview-projection.js.map +1 -0
  314. package/dist/prompt-icons.d.ts +4 -0
  315. package/dist/prompt-icons.d.ts.map +1 -0
  316. package/dist/prompt-icons.js +4 -0
  317. package/dist/prompt-icons.js.map +1 -0
  318. package/dist/prompt-status-message-resolution.d.ts +18 -0
  319. package/dist/prompt-status-message-resolution.d.ts.map +1 -0
  320. package/dist/prompt-status-message-resolution.js +83 -0
  321. package/dist/prompt-status-message-resolution.js.map +1 -0
  322. package/dist/query-form-lowering.d.ts +16 -0
  323. package/dist/query-form-lowering.d.ts.map +1 -0
  324. package/dist/query-form-lowering.js +38 -0
  325. package/dist/query-form-lowering.js.map +1 -0
  326. package/dist/query-form-url-state.d.ts +44 -0
  327. package/dist/query-form-url-state.d.ts.map +1 -0
  328. package/dist/query-form-url-state.js +197 -0
  329. package/dist/query-form-url-state.js.map +1 -0
  330. package/dist/query-offset-page.d.ts +13 -0
  331. package/dist/query-offset-page.d.ts.map +1 -0
  332. package/dist/query-offset-page.js +24 -0
  333. package/dist/query-offset-page.js.map +1 -0
  334. package/dist/relation-query-input-form-target.d.ts +10 -0
  335. package/dist/relation-query-input-form-target.d.ts.map +1 -0
  336. package/dist/relation-query-input-form-target.js +30 -0
  337. package/dist/relation-query-input-form-target.js.map +1 -0
  338. package/dist/scope-selection.d.ts +94 -0
  339. package/dist/scope-selection.d.ts.map +1 -0
  340. package/dist/scope-selection.js +95 -0
  341. package/dist/scope-selection.js.map +1 -0
  342. package/dist/target-bindings.d.ts +39 -0
  343. package/dist/target-bindings.d.ts.map +1 -0
  344. package/dist/target-bindings.js +40 -0
  345. package/dist/target-bindings.js.map +1 -0
  346. package/dist/view-chrome-content-diagnostics.d.ts +8 -0
  347. package/dist/view-chrome-content-diagnostics.d.ts.map +1 -0
  348. package/dist/view-chrome-content-diagnostics.js +84 -0
  349. package/dist/view-chrome-content-diagnostics.js.map +1 -0
  350. package/dist/view-chrome-icons.d.ts +12 -0
  351. package/dist/view-chrome-icons.d.ts.map +1 -0
  352. package/dist/view-chrome-icons.js +50 -0
  353. package/dist/view-chrome-icons.js.map +1 -0
  354. package/dist/view-chrome-slot-renderer-registry.d.ts +19 -0
  355. package/dist/view-chrome-slot-renderer-registry.d.ts.map +1 -0
  356. package/dist/view-chrome-slot-renderer-registry.js +62 -0
  357. package/dist/view-chrome-slot-renderer-registry.js.map +1 -0
  358. package/package.json +53 -0
  359. package/src/api-scope-request.ts +186 -0
  360. package/src/collection-chrome-icons.ts +89 -0
  361. package/src/collection-chrome-runtime.ts +151 -0
  362. package/src/collection-chrome-slot-renderer-registry.ts +227 -0
  363. package/src/collection-selection-state.ts +32 -0
  364. package/src/data-source-projection.ts +2149 -0
  365. package/src/data-source-query-lowering.ts +217 -0
  366. package/src/date-time-filter-model.ts +156 -0
  367. package/src/document-badge-icons.ts +3 -0
  368. package/src/document-module.ts +741 -0
  369. package/src/document-summary-model.ts +1 -0
  370. package/src/document-workspace-chrome-projection.ts +62 -0
  371. package/src/document-workspace-surface-slots.ts +458 -0
  372. package/src/endpoint-executor.ts +122 -0
  373. package/src/field-display-resolution.ts +99 -0
  374. package/src/index.ts +104 -0
  375. package/src/module.ts +281 -0
  376. package/src/navigation-shell-frame-renderer-registry.ts +65 -0
  377. package/src/navigation-shell-layout-runtime.ts +124 -0
  378. package/src/navigation-shell-region-component-registry.ts +242 -0
  379. package/src/navigation-shell-runtime.ts +579 -0
  380. package/src/navigation-shell-slot-renderer-registry.ts +94 -0
  381. package/src/navigation.ts +364 -0
  382. package/src/object-path.ts +99 -0
  383. package/src/page-host-renderer-registry.ts +615 -0
  384. package/src/presentation-action-endpoint-request-projection.ts +223 -0
  385. package/src/presentation-action-endpoint.ts +130 -0
  386. package/src/presentation-action-icons.ts +3 -0
  387. package/src/presentation-action-result-state.ts +189 -0
  388. package/src/presentation-action-runtime-binding.ts +177 -0
  389. package/src/presentation-action-runtime-diagnostics.ts +120 -0
  390. package/src/presentation-action-runtime-labels.ts +57 -0
  391. package/src/presentation-action-runtime-projection.ts +67 -0
  392. package/src/presentation-badge-resolution.ts +138 -0
  393. package/src/presentation-collection-pagination.ts +436 -0
  394. package/src/presentation-content-diagnostics.ts +121 -0
  395. package/src/presentation-content-resolution.ts +46 -0
  396. package/src/presentation-data-source-binding-model.ts +140 -0
  397. package/src/presentation-data-source-runtime.ts +190 -0
  398. package/src/presentation-design-intent-diagnostics.ts +104 -0
  399. package/src/presentation-icon-diagnostics.ts +368 -0
  400. package/src/presentation-icon-registry.ts +181 -0
  401. package/src/presentation-navigation-action-runtime-bindings.ts +54 -0
  402. package/src/presentation-pagination.ts +694 -0
  403. package/src/presentation-projection-coverage.ts +3257 -0
  404. package/src/presentation-projection-diagnostics.ts +71 -0
  405. package/src/presentation-projection-trace.ts +293 -0
  406. package/src/presentation-query-form-state.ts +54 -0
  407. package/src/presentation-renderer-registry.ts +269 -0
  408. package/src/presentation-semantics.ts +1028 -0
  409. package/src/presentation-standards.ts +14 -0
  410. package/src/presentation-test-selectors.ts +312 -0
  411. package/src/presentation-value-formatting.ts +65 -0
  412. package/src/presentation-value-resolution.ts +100 -0
  413. package/src/presentation-view-tree.ts +33 -0
  414. package/src/process-task-model.ts +158 -0
  415. package/src/process-task-projection.ts +398 -0
  416. package/src/projected-action-status-projection.ts +43 -0
  417. package/src/projected-activity-state-model.ts +123 -0
  418. package/src/projected-collection-action-runtime-bindings.ts +76 -0
  419. package/src/projected-collection-action-runtime-diagnostics.ts +289 -0
  420. package/src/projected-collection-runtime.ts +1772 -0
  421. package/src/projected-document-action-diagnostics.ts +196 -0
  422. package/src/projected-document-action-enablements.ts +99 -0
  423. package/src/projected-document-action-projection.ts +464 -0
  424. package/src/projected-document-action-runtime-profile-diagnostics.ts +250 -0
  425. package/src/projected-document-action-runtime-profile.ts +133 -0
  426. package/src/projected-document-action-status-notice-diagnostics.ts +116 -0
  427. package/src/projected-document-badge-formatting.ts +7 -0
  428. package/src/projected-document-editor-model.ts +7 -0
  429. package/src/projected-document-field-navigation.ts +300 -0
  430. package/src/projected-document-field-semantics.ts +27 -0
  431. package/src/projected-document-workspace-data-source-bindings.ts +182 -0
  432. package/src/projected-document-workspace-notice-diagnostics.ts +41 -0
  433. package/src/projected-input-form-runtime.ts +86 -0
  434. package/src/projected-process-task-notice-diagnostics.ts +283 -0
  435. package/src/projected-query-form-runtime.ts +62 -0
  436. package/src/prompt-document-preview-projection.ts +345 -0
  437. package/src/prompt-icons.ts +3 -0
  438. package/src/prompt-status-message-resolution.ts +158 -0
  439. package/src/query-form-lowering.ts +77 -0
  440. package/src/query-form-url-state.ts +346 -0
  441. package/src/query-offset-page.ts +50 -0
  442. package/src/relation-query-input-form-target.ts +61 -0
  443. package/src/scope-selection.ts +201 -0
  444. package/src/target-bindings.ts +123 -0
  445. package/src/view-chrome-content-diagnostics.ts +139 -0
  446. package/src/view-chrome-icons.ts +81 -0
  447. package/src/view-chrome-slot-renderer-registry.ts +128 -0
@@ -0,0 +1,832 @@
1
+ import { createCollectionChromeRuntime, matchesCollectionChromeSlotPlacement, resolveCollectionChromeSlots, } from './collection-chrome-runtime.js';
2
+ import { findPresentationAction, findPresentationField, } from './module.js';
3
+ import { getPresentationViewProjectedActions, } from './presentation-semantics.js';
4
+ import { readObjectPath, readObjectProperty, } from './object-path.js';
5
+ import { resolvePresentationPageInfo, } from './presentation-pagination.js';
6
+ import { collectionDetailActivations, collectionChromeSlotPlacements, collectionRowActionKinds, collectionSelectionActionParameterSources, collectionSelectionModes, presentationValueKinds, } from '@cohesivesystems/presentation-contracts';
7
+ /**
8
+ * Annotation name used on collection chrome definitions to describe how the
9
+ * chrome was projected.
10
+ */
11
+ export const collectionChromeProjectionAnnotationName = 'cohesive.presentation.collection-chrome.projection';
12
+ /**
13
+ * Annotation name used on collection chrome slot definitions to describe how a
14
+ * specific slot was projected.
15
+ */
16
+ export const collectionChromeSlotProjectionAnnotationName = 'cohesive.presentation.collection-chrome.slot.projection';
17
+ /**
18
+ * Projection-mode tokens emitted by compatibility and declared collection
19
+ * chrome projection paths.
20
+ */
21
+ export const collectionChromeProjectionModes = {
22
+ compatibilitySynthesized: 'compatibility-synthesized',
23
+ declared: 'declared',
24
+ mixed: 'mixed',
25
+ };
26
+ /**
27
+ * Creates the host-facing runtime for a projected collection.
28
+ *
29
+ * @param options View IR, data, module metadata, selection state, pagination,
30
+ * and navigation hooks used to bind collection semantics to runtime behavior.
31
+ */
32
+ export function createProjectedCollectionRuntime({ createHref, data, module, pagination: paginationInput, selectionState = null, view, }) {
33
+ const collection = view?.Collection ?? null;
34
+ const chrome = createProjectedCollectionChromeRuntime(collection);
35
+ const bodySlot = chrome.bodySlot;
36
+ const selectionMode = resolveProjectedCollectionSelectionMode(collection);
37
+ const selectionEnabled = isCollectionSelectionEnabled(selectionMode);
38
+ const activeSelectionState = selectionEnabled ? selectionState : null;
39
+ const rowIdentityPath = bodySlot?.RowIdentityPath ?? null;
40
+ const rowLabelPath = bodySlot?.RowLabelPath ?? null;
41
+ const getRowId = rowIdentityPath
42
+ ? (row, index) => readProjectedCollectionRowIdentity(row, rowIdentityPath, index)
43
+ : undefined;
44
+ const selectedRowIds = activeSelectionState?.selectedRowIds ?? [];
45
+ const selectedRowIdSet = new Set(selectedRowIds);
46
+ const selectedRows = getRowId && selectedRowIds.length > 0
47
+ ? data.filter((row, index) => selectedRowIdSet.has(getRowId(row, index)))
48
+ : [];
49
+ const selectedRow = selectedRows[0] ?? null;
50
+ const detailSlot = chrome.detailSlot;
51
+ const detailIsRenderable = isRenderableCollectionDetailSlot(detailSlot);
52
+ const columns = createProjectedCollectionColumnRuntime({
53
+ bodySlot,
54
+ module,
55
+ });
56
+ const projectedActionRefs = getPresentationViewProjectedActions(view ?? null);
57
+ const rowActions = resolveProjectedCollectionRowActions(module, projectedActionRefs);
58
+ const selectionActions = resolveProjectedCollectionSelectionActions(module, projectedActionRefs);
59
+ const actionRuntime = createProjectedCollectionActionRuntime({
60
+ createHref,
61
+ rowActions,
62
+ selectionActions,
63
+ bodySlot,
64
+ selectedRowIds,
65
+ selectedRows,
66
+ });
67
+ const pagination = createProjectedCollectionPaginationRuntime({
68
+ chrome,
69
+ input: paginationInput,
70
+ itemCount: data.length,
71
+ });
72
+ return {
73
+ actions: actionRuntime,
74
+ chrome,
75
+ columns,
76
+ collection,
77
+ data,
78
+ detail: {
79
+ data: selectedRow,
80
+ emptyMessage: detailSlot?.EmptyMessage,
81
+ isRenderable: detailIsRenderable,
82
+ placement: detailSlot?.Placement,
83
+ title: detailSlot?.Title,
84
+ viewId: detailIsRenderable
85
+ ? detailSlot?.DetailViewId ?? null
86
+ : null,
87
+ },
88
+ getRowId,
89
+ pagination,
90
+ readRowLabel(row) {
91
+ return readProjectedCollectionRowLabel(row, rowLabelPath);
92
+ },
93
+ rowActions: rowActions.map(({ rowAction }) => rowAction),
94
+ selection: {
95
+ activateRow(row, index) {
96
+ const rowId = getRowId?.(row, index) ?? null;
97
+ if (!rowId || !activeSelectionState) {
98
+ return;
99
+ }
100
+ if (isMultipleCollectionSelection(selectionMode)) {
101
+ activeSelectionState.toggleRowId(rowId, selectionMode);
102
+ return;
103
+ }
104
+ activeSelectionState.selectRowId(rowId, selectionMode);
105
+ },
106
+ isEnabled: selectionEnabled,
107
+ isMultiple: isMultipleCollectionSelection(selectionMode),
108
+ isRowSelected: activeSelectionState && getRowId
109
+ ? (row, index) => selectedRowIdSet.has(getRowId(row, index))
110
+ : undefined,
111
+ mode: selectionMode,
112
+ pruneToVisibleRows() {
113
+ if (!bodySlot?.ClearSelectionOnQueryChange ||
114
+ !activeSelectionState ||
115
+ !getRowId ||
116
+ selectedRowIds.length === 0) {
117
+ return;
118
+ }
119
+ const visibleRowIds = new Set(data.map((row, index) => getRowId(row, index)));
120
+ const visibleSelectedRowIds = selectedRowIds.filter((rowId) => visibleRowIds.has(rowId));
121
+ if (visibleSelectedRowIds.length !== selectedRowIds.length) {
122
+ activeSelectionState.setSelectedRowIds(visibleSelectedRowIds);
123
+ }
124
+ },
125
+ selectedRow,
126
+ selectedRowIdSet,
127
+ selectedRowIds,
128
+ selectedRows,
129
+ state: activeSelectionState,
130
+ },
131
+ selectionActions: selectionActions.map(({ selectionAction }) => selectionAction),
132
+ };
133
+ }
134
+ /**
135
+ * Creates the collection chrome runtime for a projected collection definition.
136
+ */
137
+ export function createProjectedCollectionChromeRuntime(collection) {
138
+ return createCollectionChromeRuntime(collection);
139
+ }
140
+ /**
141
+ * Resolves all collection chrome slots from a collection definition.
142
+ */
143
+ export function resolveProjectedCollectionChromeSlots(collection) {
144
+ return resolveCollectionChromeSlots(collection);
145
+ }
146
+ /**
147
+ * Resolves the selection state identifier implied by collection chrome.
148
+ *
149
+ * Body state is preferred, followed by selection actions and detail state.
150
+ */
151
+ export function resolveProjectedCollectionSelectionStateId(collection) {
152
+ const chrome = createProjectedCollectionChromeRuntime(collection);
153
+ return chrome.bodySlot?.StateId ??
154
+ chrome.selectionActionsSlot?.StateId ??
155
+ chrome.detailSlot?.StateId ??
156
+ null;
157
+ }
158
+ /**
159
+ * Resolves the collection selection mode, defaulting to `none` when no body
160
+ * slot declares selection.
161
+ */
162
+ export function resolveProjectedCollectionSelectionMode(collection) {
163
+ return createProjectedCollectionChromeRuntime(collection).bodySlot?.SelectionMode ??
164
+ collectionSelectionModes.none;
165
+ }
166
+ /**
167
+ * Reads the projection mode annotation from collection chrome.
168
+ */
169
+ export function readCollectionChromeProjectionMode(chrome) {
170
+ return readCollectionChromeProjectionModeAnnotation(chrome?.Annotations, collectionChromeProjectionAnnotationName);
171
+ }
172
+ /**
173
+ * Reads the projection mode annotation from a collection chrome slot.
174
+ */
175
+ export function readCollectionChromeSlotProjectionMode(slot) {
176
+ return readCollectionChromeProjectionModeAnnotation(slot?.Annotations, collectionChromeSlotProjectionAnnotationName);
177
+ }
178
+ /**
179
+ * Checks whether a collection chrome slot carries a specific projection mode.
180
+ */
181
+ export function isCollectionChromeSlotProjectionMode(slot, mode) {
182
+ return readCollectionChromeSlotProjectionMode(slot) === mode;
183
+ }
184
+ /**
185
+ * Resolves the first data source identifier attached to the collection
186
+ * pagination slot.
187
+ */
188
+ export function resolveProjectedCollectionPaginationDataSourceId(collection) {
189
+ const paginationSlot = createProjectedCollectionChromeRuntime(collection).paginationSlot;
190
+ return paginationSlot?.DataSourceIds[0] ?? null;
191
+ }
192
+ /**
193
+ * Checks whether collection pagination chrome is declared.
194
+ */
195
+ export function isProjectedCollectionPaginationEnabled(collection) {
196
+ return Boolean(createProjectedCollectionChromeRuntime(collection).paginationSlot);
197
+ }
198
+ /**
199
+ * Checks whether collection pagination is declared for footer placement.
200
+ */
201
+ export function isProjectedCollectionPaginationFooterEnabled(collection) {
202
+ const chrome = createProjectedCollectionChromeRuntime(collection);
203
+ return Boolean(chrome.paginationFooterSlot);
204
+ }
205
+ /**
206
+ * Creates the pagination runtime by combining declared pagination chrome with a
207
+ * host pagination runtime and the current data-source response.
208
+ */
209
+ function createProjectedCollectionPaginationRuntime({ chrome, input, itemCount, }) {
210
+ const slot = chrome.paginationSlot;
211
+ const definition = slot;
212
+ const isEnabled = Boolean(slot);
213
+ const dataSourceId = slot?.DataSourceIds[0] ?? null;
214
+ const placement = slot?.Placement ?? null;
215
+ const runtime = input?.runtime ?? null;
216
+ const pageInfo = runtime
217
+ ? resolvePresentationPageInfo({
218
+ binding: runtime.binding,
219
+ itemCount,
220
+ readDataSource: input?.readDataSource,
221
+ response: input?.response,
222
+ state: runtime.state,
223
+ totalCount: input?.totalCount,
224
+ })
225
+ : null;
226
+ return {
227
+ dataSourceId,
228
+ definition,
229
+ isEnabled,
230
+ isFetching: Boolean(input?.isFetching),
231
+ isFooterEnabled: isEnabled && isCollectionChromeFooterPlacement(slot?.Placement ?? null),
232
+ placement,
233
+ slot,
234
+ window: runtime && pageInfo
235
+ ? {
236
+ binding: runtime.binding,
237
+ canGoNextPage: pageInfo.hasNextPage,
238
+ canGoPreviousPage: runtime.canGoPreviousPage,
239
+ dataSourceId: runtime.dataSourceId,
240
+ goToFirstPage: runtime.goToFirstPage,
241
+ goToNextPage: () => runtime.goToNextPage(input?.response),
242
+ goToPreviousPage: runtime.goToPreviousPage,
243
+ pageIndex: runtime.pageIndex,
244
+ pageInfo,
245
+ pageSize: runtime.pageSize,
246
+ state: runtime.state,
247
+ }
248
+ : null,
249
+ };
250
+ }
251
+ /**
252
+ * Reads and validates collection chrome projection-mode annotations.
253
+ */
254
+ function readCollectionChromeProjectionModeAnnotation(annotations, annotationName) {
255
+ const annotation = annotations?.find((candidate) => candidate.Name.toLocaleLowerCase() === annotationName);
256
+ if (!annotation) {
257
+ return null;
258
+ }
259
+ const value = annotation.Value;
260
+ const mode = typeof value === 'string'
261
+ ? value
262
+ : value && typeof value === 'object'
263
+ ? value.mode
264
+ : null;
265
+ return isCollectionChromeProjectionMode(mode) ? mode : null;
266
+ }
267
+ /**
268
+ * Checks whether an arbitrary annotation value is a known projection mode.
269
+ */
270
+ function isCollectionChromeProjectionMode(value) {
271
+ return value === collectionChromeProjectionModes.declared ||
272
+ value === collectionChromeProjectionModes.compatibilitySynthesized ||
273
+ value === collectionChromeProjectionModes.mixed;
274
+ }
275
+ /**
276
+ * Checks whether a slot placement is semantically the footer placement.
277
+ */
278
+ function isCollectionChromeFooterPlacement(placement) {
279
+ return matchesCollectionChromeSlotPlacement(placement, collectionChromeSlotPlacements.footer);
280
+ }
281
+ /**
282
+ * Builds visible column runtimes by resolving body-slot column declarations
283
+ * against field definitions in the presentation module.
284
+ */
285
+ function createProjectedCollectionColumnRuntime({ bodySlot, module, }) {
286
+ if (!module || !bodySlot) {
287
+ return [];
288
+ }
289
+ return resolveCollectionBodyColumns(bodySlot).flatMap((column) => {
290
+ const field = findPresentationField(module, column.FieldId);
291
+ if (!field) {
292
+ return [];
293
+ }
294
+ const valuePath = column.ValuePath ?? field.Field;
295
+ return [{
296
+ column,
297
+ field,
298
+ header: field.Label,
299
+ id: column.Id || field.Id,
300
+ readValue: (row) => readProjectedCollectionValue(row, valuePath),
301
+ valuePath,
302
+ }];
303
+ });
304
+ }
305
+ /**
306
+ * Returns visible body columns in declared order.
307
+ */
308
+ function resolveCollectionBodyColumns(bodySlot) {
309
+ return bodySlot.Columns
310
+ .filter((column) => column.IsVisible)
311
+ .sort((left, right) => left.Order - right.Order);
312
+ }
313
+ /**
314
+ * Creates the action runtime that resolves row and selection action items,
315
+ * builds execution contexts, and delegates invocation to host action runtimes.
316
+ */
317
+ function createProjectedCollectionActionRuntime({ bodySlot, createHref, rowActions, selectionActions, selectedRowIds, selectedRows, }) {
318
+ const primaryRowActions = rowActions.filter(({ rowAction }) => isPrimaryCollectionRowAction(rowAction));
319
+ const contextRowActions = rowActions.filter(({ rowAction }) => isContextMenuCollectionRowAction(rowAction));
320
+ const activatedRowAction = resolveActivatedCollectionRowAction(bodySlot, rowActions);
321
+ return {
322
+ activatedRowAction,
323
+ canInvokeAction: canInvokeProjectedCollectionAction,
324
+ canInvokeRowAction: canInvokeProjectedRowAction,
325
+ canInvokeSelectionAction: canInvokeProjectedSelectionAction,
326
+ contextRowActions,
327
+ createRowActionContext(resolvedAction, row) {
328
+ return createProjectedRowActionExecutionContext(resolvedAction, row, createHref);
329
+ },
330
+ invokeAction: invokeProjectedCollectionAction,
331
+ invokeRowAction: invokeProjectedRowAction,
332
+ invokeSelectionAction: invokeProjectedSelectionAction,
333
+ primaryRowActions,
334
+ resolveRowActionItems(row, resolvedActions, options) {
335
+ return resolvedActions.flatMap((resolvedAction) => {
336
+ const { action, actionRef, rowAction } = resolvedAction;
337
+ if (!evaluateProjectedRowActionPredicate(rowAction.IsVisible, row, true)) {
338
+ return [];
339
+ }
340
+ const actionContext = createProjectedRowActionExecutionContext(resolvedAction, row, createHref);
341
+ const isEnabled = evaluateProjectedRowActionPredicate(rowAction.IsEnabled, row, true) &&
342
+ (options?.canExecuteAction?.(actionContext) ?? true);
343
+ return [{
344
+ action,
345
+ actionContext,
346
+ actionRef,
347
+ isEnabled,
348
+ rowAction,
349
+ }];
350
+ });
351
+ },
352
+ resolveSelectionActionItems(options) {
353
+ if (selectedRowIds.length === 0) {
354
+ return [];
355
+ }
356
+ return (options?.selectionActions ?? selectionActions)
357
+ .slice()
358
+ .sort((left, right) => left.selectionAction.Order - right.selectionAction.Order)
359
+ .flatMap((resolvedAction) => {
360
+ const { action, actionRef, selectionAction } = resolvedAction;
361
+ if (!evaluateProjectedSelectionActionPredicate(selectionAction.IsVisible, selectedRows, true)) {
362
+ return [];
363
+ }
364
+ const actionContext = createProjectedSelectionActionExecutionContext(resolvedAction, selectedRows, selectedRowIds, createHref);
365
+ const isEnabled = isSelectionActionSelectionCountEnabled(selectionAction, selectedRowIds.length) &&
366
+ evaluateProjectedSelectionActionPredicate(selectionAction.IsEnabled, selectedRows, true) &&
367
+ (options?.canExecuteAction?.(actionContext) ?? true);
368
+ return [{
369
+ action,
370
+ actionContext,
371
+ actionRef,
372
+ isEnabled,
373
+ selectionAction,
374
+ }];
375
+ });
376
+ },
377
+ rowActions,
378
+ selectionActions,
379
+ };
380
+ }
381
+ /**
382
+ * Resolves row action references to concrete module actions.
383
+ */
384
+ function resolveProjectedCollectionRowActions(module, actionRefs) {
385
+ return sortResolvedCollectionRowActions(actionRefs.flatMap((actionRef) => {
386
+ if (actionRef.contextKind !== 'collection-row' || !actionRef.rowAction) {
387
+ return [];
388
+ }
389
+ const action = findPresentationAction(module ?? null, actionRef.actionId);
390
+ return action
391
+ ? [{
392
+ action,
393
+ actionRef,
394
+ rowAction: actionRef.rowAction,
395
+ slotId: actionRef.slotId ?? null,
396
+ }]
397
+ : [];
398
+ }));
399
+ }
400
+ /**
401
+ * Resolves selection action references to concrete module actions.
402
+ */
403
+ function resolveProjectedCollectionSelectionActions(module, actionRefs) {
404
+ return sortResolvedCollectionSelectionActions(actionRefs.flatMap((actionRef) => {
405
+ if (actionRef.contextKind !== 'collection-selection' || !actionRef.selectionAction) {
406
+ return [];
407
+ }
408
+ const action = findPresentationAction(module ?? null, actionRef.actionId);
409
+ return action
410
+ ? [{
411
+ action,
412
+ actionRef,
413
+ selectionAction: actionRef.selectionAction,
414
+ slotId: actionRef.slotId ?? null,
415
+ }]
416
+ : [];
417
+ }));
418
+ }
419
+ /**
420
+ * Sorts resolved row actions by declared action order.
421
+ */
422
+ function sortResolvedCollectionRowActions(actions) {
423
+ return actions.slice().sort((left, right) => left.rowAction.Order - right.rowAction.Order);
424
+ }
425
+ /**
426
+ * Sorts resolved selection actions by declared action order.
427
+ */
428
+ function sortResolvedCollectionSelectionActions(actions) {
429
+ return actions
430
+ .slice()
431
+ .sort((left, right) => left.selectionAction.Order - right.selectionAction.Order);
432
+ }
433
+ /**
434
+ * Resolves the row action invoked by row activation.
435
+ *
436
+ * An explicit activated-row action wins; otherwise the first primary row action
437
+ * is used when row activation is enabled.
438
+ */
439
+ function resolveActivatedCollectionRowAction(bodySlot, rowActions) {
440
+ if (!bodySlot?.ActivateOnRowClick) {
441
+ return null;
442
+ }
443
+ return bodySlot.ActivatedRowActionId
444
+ ? rowActions.find(({ rowAction }) => rowAction.Id === bodySlot.ActivatedRowActionId ||
445
+ rowAction.ActionId === bodySlot.ActivatedRowActionId) ?? null
446
+ : rowActions.find(({ rowAction }) => isPrimaryCollectionRowAction(rowAction)) ?? null;
447
+ }
448
+ /**
449
+ * Checks whether a row action is intended for the primary action surface.
450
+ */
451
+ function isPrimaryCollectionRowAction(rowAction) {
452
+ return matchesProjectionEnum(rowAction.Kind, collectionRowActionKinds.primary, 'primary');
453
+ }
454
+ /**
455
+ * Checks whether a row action is intended for contextual menu surfaces.
456
+ */
457
+ function isContextMenuCollectionRowAction(rowAction) {
458
+ return matchesProjectionEnum(rowAction.Kind, collectionRowActionKinds.contextMenu, 'contextMenu');
459
+ }
460
+ /**
461
+ * Creates a row action execution context with row-bound parameters and optional
462
+ * navigation href.
463
+ */
464
+ function createProjectedRowActionExecutionContext(resolvedAction, row, createHref) {
465
+ const { action, actionRef, rowAction } = resolvedAction;
466
+ const parameters = createProjectedRowActionParameters(actionRef, action, row);
467
+ return {
468
+ action,
469
+ actionRef,
470
+ contextKind: 'collection-row',
471
+ href: createProjectedActionHrefFromParameters(action, parameters, createHref),
472
+ parameters,
473
+ row,
474
+ rowAction,
475
+ };
476
+ }
477
+ /**
478
+ * Creates a selection action execution context with selection-bound parameters
479
+ * and optional navigation href.
480
+ */
481
+ function createProjectedSelectionActionExecutionContext(resolvedAction, selectedRows, selectedRowIds, createHref) {
482
+ const { action, actionRef, selectionAction } = resolvedAction;
483
+ const parameters = createProjectedSelectionActionParameters(actionRef, selectedRows, selectedRowIds);
484
+ return {
485
+ action,
486
+ actionRef,
487
+ contextKind: 'collection-selection',
488
+ href: createProjectedActionHrefFromParameters(action, parameters, createHref),
489
+ parameters,
490
+ selectedRowIds,
491
+ selectedRows,
492
+ selectionAction,
493
+ };
494
+ }
495
+ /**
496
+ * Builds a navigation href for actions that target a route.
497
+ */
498
+ function createProjectedActionHrefFromParameters(action, parameters, createHref) {
499
+ const routeId = action.Binding?.RouteId ?? action.Result?.NavigateToRouteId ?? null;
500
+ if (!routeId || !createHref) {
501
+ return null;
502
+ }
503
+ return createHref(routeId, parameters);
504
+ }
505
+ /**
506
+ * Creates row action parameters from explicit row-action bindings when present,
507
+ * otherwise from action parameter names read directly from the row.
508
+ */
509
+ function createProjectedRowActionParameters(actionRef, action, row) {
510
+ const rowAction = actionRef.rowAction;
511
+ if (!rowAction) {
512
+ return createProjectedActionParameters(row, action.Parameters ?? []);
513
+ }
514
+ return rowAction.Parameters.length > 0
515
+ ? createProjectedBoundActionParameters(row, rowAction.Parameters)
516
+ : createProjectedActionParameters(row, action.Parameters ?? []);
517
+ }
518
+ /**
519
+ * Creates route parameters for a selection action from its declared selection
520
+ * parameter bindings.
521
+ */
522
+ function createProjectedSelectionActionParameters(actionRef, selectedRows, selectedRowIds) {
523
+ const selectionAction = actionRef.selectionAction;
524
+ if (!selectionAction) {
525
+ return {};
526
+ }
527
+ const routeParameters = {};
528
+ for (const binding of selectionAction.Parameters) {
529
+ const value = readProjectedSelectionActionParameterValue(binding, selectedRows, selectedRowIds);
530
+ if (value === null || value === undefined || isEmptySelectionParameterValue(value)) {
531
+ if (!binding.OmitWhenEmpty) {
532
+ routeParameters[binding.Name] = '';
533
+ }
534
+ continue;
535
+ }
536
+ routeParameters[binding.Name] = Array.isArray(value)
537
+ ? value.map(toRouteParameterValue).join(',')
538
+ : toRouteParameterValue(value);
539
+ }
540
+ return routeParameters;
541
+ }
542
+ /**
543
+ * Reads the raw value for a selection action parameter binding.
544
+ */
545
+ function readProjectedSelectionActionParameterValue(binding, selectedRows, selectedRowIds) {
546
+ if (matchesCollectionSelectionActionParameterSource(binding.Source, 'selectedRowIdentity')) {
547
+ return selectedRowIds[0];
548
+ }
549
+ if (matchesCollectionSelectionActionParameterSource(binding.Source, 'selectedRowIdentityList')) {
550
+ return selectedRowIds;
551
+ }
552
+ if (matchesCollectionSelectionActionParameterSource(binding.Source, 'selectedRowValue')) {
553
+ return binding.ValuePath && selectedRows[0]
554
+ ? readProjectedCollectionValue(selectedRows[0], binding.ValuePath)
555
+ : undefined;
556
+ }
557
+ if (matchesCollectionSelectionActionParameterSource(binding.Source, 'selectedRowValueList')) {
558
+ return binding.ValuePath
559
+ ? selectedRows.map((row) => readProjectedCollectionValue(row, binding.ValuePath ?? ''))
560
+ : [];
561
+ }
562
+ if (matchesCollectionSelectionActionParameterSource(binding.Source, 'selectionCount')) {
563
+ return selectedRowIds.length;
564
+ }
565
+ return undefined;
566
+ }
567
+ /**
568
+ * Matches generated enum values and string fallback keys for selection action
569
+ * parameter sources.
570
+ */
571
+ function matchesCollectionSelectionActionParameterSource(source, key) {
572
+ return source === collectionSelectionActionParameterSources[key] ||
573
+ String(source).toLocaleLowerCase() === key.toLocaleLowerCase();
574
+ }
575
+ /**
576
+ * Checks whether a selection parameter should be treated as empty.
577
+ */
578
+ function isEmptySelectionParameterValue(value) {
579
+ return Array.isArray(value) && value.length === 0;
580
+ }
581
+ /**
582
+ * Creates route parameters from row action parameter bindings.
583
+ */
584
+ function createProjectedBoundActionParameters(row, bindings) {
585
+ const routeParameters = {};
586
+ for (const binding of bindings) {
587
+ const value = readProjectedCollectionValue(row, binding.ValuePath);
588
+ if (value === null || value === undefined) {
589
+ if (!binding.OmitWhenNull) {
590
+ routeParameters[binding.Name] = '';
591
+ }
592
+ continue;
593
+ }
594
+ routeParameters[binding.Name] = toRouteParameterValue(value);
595
+ }
596
+ return routeParameters;
597
+ }
598
+ /**
599
+ * Creates route parameters by reading action parameter names from a row object.
600
+ */
601
+ function createProjectedActionParameters(row, parameters) {
602
+ const routeParameters = {};
603
+ for (const parameter of parameters) {
604
+ const value = readObjectProperty(row, parameter.Name);
605
+ if (value === null || value === undefined) {
606
+ continue;
607
+ }
608
+ routeParameters[parameter.Name] = toRouteParameterValue(value);
609
+ }
610
+ return routeParameters;
611
+ }
612
+ /**
613
+ * Checks host runtime visibility, disabled state, and optional `canExecute`
614
+ * before allowing action invocation.
615
+ */
616
+ function canInvokeProjectedCollectionAction(context, actionRuntimes) {
617
+ const runtime = resolveProjectedCollectionActionRuntime(actionRuntimes, context);
618
+ if (runtime?.isHidden || runtime?.isDisabled) {
619
+ return false;
620
+ }
621
+ if (runtime?.execute) {
622
+ return runtime.canExecute?.(context) ?? true;
623
+ }
624
+ return false;
625
+ }
626
+ /**
627
+ * Row-action convenience wrapper around generic collection action invocation
628
+ * checks.
629
+ */
630
+ function canInvokeProjectedRowAction(context, actionRuntimes) {
631
+ return canInvokeProjectedCollectionAction(context, actionRuntimes);
632
+ }
633
+ /**
634
+ * Invokes an action through the host action runtime when it is executable.
635
+ */
636
+ async function invokeProjectedCollectionAction(context, actionRuntimes) {
637
+ const runtime = resolveProjectedCollectionActionRuntime(actionRuntimes, context);
638
+ if (runtime?.execute &&
639
+ !runtime.isHidden &&
640
+ !runtime.isDisabled &&
641
+ (runtime.canExecute?.(context) ?? true)) {
642
+ await runtime.execute(context);
643
+ return;
644
+ }
645
+ }
646
+ /**
647
+ * Row-action convenience wrapper around generic collection action invocation.
648
+ */
649
+ async function invokeProjectedRowAction(context, actionRuntimes) {
650
+ await invokeProjectedCollectionAction(context, actionRuntimes);
651
+ }
652
+ /**
653
+ * Selection-action convenience wrapper around generic collection action
654
+ * invocation checks.
655
+ */
656
+ function canInvokeProjectedSelectionAction(context, actionRuntimes) {
657
+ return canInvokeProjectedCollectionAction(context, actionRuntimes);
658
+ }
659
+ /**
660
+ * Selection-action convenience wrapper around generic collection action
661
+ * invocation.
662
+ */
663
+ async function invokeProjectedSelectionAction(context, actionRuntimes) {
664
+ await invokeProjectedCollectionAction(context, actionRuntimes);
665
+ }
666
+ /**
667
+ * Resolves the host action runtime by action identifier.
668
+ */
669
+ function resolveProjectedCollectionActionRuntime(actionRuntimes, context) {
670
+ return actionRuntimes?.[context.action.Id] ?? null;
671
+ }
672
+ /**
673
+ * Checks whether the current selection count is inside an action's declared
674
+ * min/max bounds.
675
+ */
676
+ function isSelectionActionSelectionCountEnabled(selectionAction, selectionCount) {
677
+ return selectionCount >= selectionAction.MinimumSelectionCount &&
678
+ (selectionAction.MaximumSelectionCount === null ||
679
+ selectionAction.MaximumSelectionCount === undefined ||
680
+ selectionCount <= selectionAction.MaximumSelectionCount);
681
+ }
682
+ /**
683
+ * Evaluates row action visibility or enablement predicates against a row.
684
+ */
685
+ function evaluateProjectedRowActionPredicate(predicate, row, fallback) {
686
+ if (!predicate) {
687
+ return fallback;
688
+ }
689
+ if (predicate.Kind === presentationValueKinds.literal ||
690
+ String(predicate.Kind).toLocaleLowerCase() === 'literal') {
691
+ return coercePredicateValue(predicate.Literal, fallback);
692
+ }
693
+ if (predicate.Field &&
694
+ (predicate.Kind === presentationValueKinds.field ||
695
+ String(predicate.Kind).toLocaleLowerCase() === 'field')) {
696
+ return coercePredicateValue(readProjectedCollectionValue(row, predicate.Field), fallback);
697
+ }
698
+ return fallback;
699
+ }
700
+ /**
701
+ * Evaluates selection action visibility or enablement predicates against the
702
+ * first selected row.
703
+ */
704
+ function evaluateProjectedSelectionActionPredicate(predicate, selectedRows, fallback) {
705
+ if (!predicate) {
706
+ return fallback;
707
+ }
708
+ if (predicate.Kind === presentationValueKinds.literal ||
709
+ String(predicate.Kind).toLocaleLowerCase() === 'literal') {
710
+ return coercePredicateValue(predicate.Literal, fallback);
711
+ }
712
+ if (predicate.Field &&
713
+ selectedRows[0] &&
714
+ (predicate.Kind === presentationValueKinds.field ||
715
+ String(predicate.Kind).toLocaleLowerCase() === 'field')) {
716
+ return coercePredicateValue(readProjectedCollectionValue(selectedRows[0], predicate.Field), fallback);
717
+ }
718
+ return fallback;
719
+ }
720
+ /**
721
+ * Coerces presentation predicate values into booleans while preserving the
722
+ * caller-provided fallback for unsupported values.
723
+ */
724
+ function coercePredicateValue(value, fallback) {
725
+ if (value === null || value === undefined) {
726
+ return fallback;
727
+ }
728
+ if (typeof value === 'boolean') {
729
+ return value;
730
+ }
731
+ if (typeof value === 'number') {
732
+ return value !== 0;
733
+ }
734
+ if (typeof value === 'string') {
735
+ const normalized = value.trim().toLocaleLowerCase();
736
+ if (normalized === 'true' || normalized === '1' || normalized === 'yes') {
737
+ return true;
738
+ }
739
+ if (normalized === 'false' || normalized === '0' || normalized === 'no' || normalized === '') {
740
+ return false;
741
+ }
742
+ }
743
+ return fallback;
744
+ }
745
+ /**
746
+ * Converts arbitrary parameter values into route parameter primitives.
747
+ */
748
+ function toRouteParameterValue(value) {
749
+ return typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string'
750
+ ? value
751
+ : String(value);
752
+ }
753
+ /**
754
+ * Reads a projected collection value from a row.
755
+ *
756
+ * Exact object-path lookup is attempted first. If it is missing, the final path
757
+ * segment is used as a direct property fallback for flatter data shapes.
758
+ */
759
+ export function readProjectedCollectionValue(row, fieldPath) {
760
+ const exactValue = readObjectPath(row, fieldPath);
761
+ if (exactValue !== undefined) {
762
+ return exactValue;
763
+ }
764
+ const fieldName = fieldPath.split('.').at(-1) ?? fieldPath;
765
+ return readObjectProperty(row, fieldName);
766
+ }
767
+ /**
768
+ * Reads a stable row identity from a row, falling back to the visible row index
769
+ * when the declared identity path is missing.
770
+ */
771
+ export function readProjectedCollectionRowIdentity(row, rowIdentityPath, index) {
772
+ const value = readProjectedCollectionValue(row, rowIdentityPath);
773
+ return value === null || value === undefined ? String(index) : String(value);
774
+ }
775
+ /**
776
+ * Reads a display label for a row.
777
+ *
778
+ * The declared label path is preferred, followed by conventional `Name` and
779
+ * `Id` properties.
780
+ */
781
+ export function readProjectedCollectionRowLabel(row, rowLabelPath) {
782
+ const pathValue = rowLabelPath
783
+ ? readObjectPath(row, rowLabelPath)
784
+ : undefined;
785
+ const value = pathValue ??
786
+ readObjectProperty(row, 'Name') ??
787
+ readObjectProperty(row, 'Id');
788
+ return value === null || value === undefined ? null : String(value);
789
+ }
790
+ /**
791
+ * Checks whether a collection selection mode enables any row selection.
792
+ */
793
+ export function isCollectionSelectionEnabled(mode) {
794
+ return matchesProjectionEnum(mode, collectionSelectionModes.single, 'single') ||
795
+ matchesProjectionEnum(mode, collectionSelectionModes.multiple, 'multiple');
796
+ }
797
+ /**
798
+ * Checks whether a collection selection mode allows multiple selected rows.
799
+ */
800
+ export function isMultipleCollectionSelection(mode) {
801
+ return matchesProjectionEnum(mode, collectionSelectionModes.multiple, 'multiple');
802
+ }
803
+ /**
804
+ * Checks whether a detail slot can render as a persistent detail surface.
805
+ */
806
+ function isRenderableCollectionDetailSlot(slot) {
807
+ return Boolean(slot?.DetailViewId &&
808
+ !isCollectionDetailActivationNone(slot.DetailActivation) &&
809
+ !isCollectionDetailActivationHover(slot.DetailActivation));
810
+ }
811
+ /**
812
+ * Checks whether detail activation is explicitly disabled.
813
+ */
814
+ function isCollectionDetailActivationNone(activation) {
815
+ return matchesProjectionEnum(activation, collectionDetailActivations.none, 'none');
816
+ }
817
+ /**
818
+ * Checks whether detail activation is hover-only and therefore not renderable
819
+ * as the selected-row detail surface.
820
+ */
821
+ function isCollectionDetailActivationHover(activation) {
822
+ return matchesProjectionEnum(activation, collectionDetailActivations.hover, 'hover');
823
+ }
824
+ /**
825
+ * Matches generated enum values while tolerating string fallback keys from
826
+ * non-generated or serialized projection inputs.
827
+ */
828
+ function matchesProjectionEnum(value, generatedValue, fallbackKey) {
829
+ return value === generatedValue ||
830
+ String(value).toLocaleLowerCase() === fallbackKey.toLocaleLowerCase();
831
+ }
832
+ //# sourceMappingURL=projected-collection-runtime.js.map