@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,880 @@
1
+ import { findPresentationDataSource, } from './module.js';
2
+ import { isTanStackQueryBinding, presentationDataSourceBindings, presentationDataSourceAuthorization, } from './presentation-data-source-binding-model.js';
3
+ import { createDataSourceEndpointQueryRequest, createDataSourcePaginationRequest, findDataSourceQueryEndpointBinding, } from './data-source-query-lowering.js';
4
+ import { aggregateOperators, cachePolicyKinds, dataSourceAggregateMaterializationKinds, dataSourceAggregatePredicateKinds, dataSourceKindLabels, dataSourceKinds, presentationBindingKinds, } from '@cohesivesystems/presentation-contracts';
5
+ import { readPresentationQueryFormAppliedValue, } from './presentation-query-form-state.js';
6
+ import { readObjectPath, writeObjectPath, } from './object-path.js';
7
+ /** Preserves target interpretation objects as a named projection concept. */
8
+ export function createPresentationDataSourceTargetInterpretation(interpretation) {
9
+ return interpretation;
10
+ }
11
+ /**
12
+ * Resolves authorization from the target interpretation based on the backend
13
+ * binding kind declared for the data source.
14
+ */
15
+ export function resolvePresentationDataSourceTargetAuthorization(targetInterpretation, context) {
16
+ const options = readPresentationDataSourceTargetBindingOptions(context.binding);
17
+ if (options.authorizationPolicyId) {
18
+ return (targetInterpretation?.authorizationPoliciesById?.[options.authorizationPolicyId]?.(context) ??
19
+ presentationDataSourceAuthorization.required({
20
+ blockedLabel: `No frontend authorization policy is registered for '${options.authorizationPolicyId}'.`,
21
+ isAuthorized: false,
22
+ }));
23
+ }
24
+ if (isApiEndpointBinding(context.binding)) {
25
+ return (targetInterpretation?.apiEndpoint?.authorization?.(context) ??
26
+ targetInterpretation?.defaultAuthorization?.(context) ??
27
+ presentationDataSourceAuthorization.none());
28
+ }
29
+ if (isLocalStateBinding(context.binding)) {
30
+ return (targetInterpretation?.localState?.authorization?.(context) ??
31
+ targetInterpretation?.defaultAuthorization?.(context) ??
32
+ presentationDataSourceAuthorization.none());
33
+ }
34
+ return (targetInterpretation?.defaultAuthorization?.(context) ??
35
+ presentationDataSourceAuthorization.none());
36
+ }
37
+ /** Creates a local-value binding with authorization supplied by the target. */
38
+ export function createTargetInterpretedLocalValueDataSourceBinding(context, targetInterpretation, binding) {
39
+ const { authorization, ...bindingWithoutAuthorization } = binding;
40
+ return presentationDataSourceBindings.localValue({
41
+ ...bindingWithoutAuthorization,
42
+ authorization: authorization ??
43
+ resolvePresentationDataSourceTargetAuthorization(targetInterpretation, context),
44
+ });
45
+ }
46
+ /** Creates a TanStack Query binding with authorization supplied by the target. */
47
+ export function createTargetInterpretedTanStackQueryDataSourceBinding(context, targetInterpretation, binding, defaultAuthorization) {
48
+ const { authorization, ...bindingWithoutAuthorization } = binding;
49
+ return presentationDataSourceBindings.tanstackQuery({
50
+ ...bindingWithoutAuthorization,
51
+ authorization: authorization ??
52
+ defaultAuthorization?.(context) ??
53
+ resolvePresentationDataSourceTargetAuthorization(targetInterpretation, context),
54
+ });
55
+ }
56
+ /** Creates endpoint-query binding input from backend-declared query lowering. */
57
+ export function createDataSourceEndpointQueryBindingInput({ context, defaultRequest, emptyMessage, enabled, endpointId, fallbackData, paginationRequest, pendingLabel, queryKeyParts = [], refetchInterval, retry, staleTime, targetInterpretation, transforms, value, }) {
58
+ const loweredTransforms = mergeDataSourceQueryLoweringTransforms(targetInterpretation.queryLowering?.transformsById, transforms);
59
+ const query = createDataSourceEndpointQueryRequest({
60
+ dataSource: context.dataSource,
61
+ defaultRequest,
62
+ endpointId,
63
+ paginationRequest,
64
+ transforms: loweredTransforms,
65
+ value,
66
+ });
67
+ const runtimeOptions = readDataSourceBindingRuntimeOptions(context.dataSource);
68
+ return {
69
+ dataSourceId: context.dataSource.Id,
70
+ emptyMessage: emptyMessage ?? runtimeOptions.emptyMessage,
71
+ enabled,
72
+ fallbackData: fallbackData === undefined ? runtimeOptions.fallbackData : fallbackData,
73
+ pendingLabel: pendingLabel ?? runtimeOptions.pendingLabel,
74
+ queryFn: () => executePresentationDataSourceTargetEndpoint(targetInterpretation, endpointId, { query }, { binding: context.binding }),
75
+ queryKey: [
76
+ 'presentation-data-source-endpoint-query',
77
+ context.dataSource.Id,
78
+ endpointId,
79
+ query,
80
+ ...queryKeyParts,
81
+ ],
82
+ refetchInterval: refetchInterval ?? runtimeOptions.refetchInterval,
83
+ retry: retry ?? runtimeOptions.retry,
84
+ staleTime: staleTime ?? runtimeOptions.staleTime,
85
+ };
86
+ }
87
+ /** Creates a fully wrapped endpoint-query binding from backend query lowering. */
88
+ export function createDataSourceEndpointQueryBinding(options) {
89
+ return createTargetInterpretedTanStackQueryDataSourceBinding(options.context, options.targetInterpretation, createDataSourceEndpointQueryBindingInput(options));
90
+ }
91
+ /** Creates a default binding registry for backend-declared collection-query data sources. */
92
+ export function createCollectionQueryDataSourceBindingProjectionRegistry({ paginationRequestsByDataSourceId = {}, queryKeyParts = [], resolveLocalValue, resolveTransforms, resolveValue, targetInterpretation, }) {
93
+ return {
94
+ apiEndpoint: (context) => {
95
+ if (!isCollectionQueryDataSource(context.dataSource) ||
96
+ !context.dataSource.Query) {
97
+ return null;
98
+ }
99
+ const localValue = resolveLocalValue?.(context);
100
+ if (localValue) {
101
+ return createTargetInterpretedLocalValueDataSourceBinding(context, targetInterpretation, localValue);
102
+ }
103
+ const endpointId = readPresentationDataSourceEndpointId(context.binding);
104
+ if (!endpointId) {
105
+ return null;
106
+ }
107
+ return createDataSourceEndpointQueryBinding({
108
+ context,
109
+ endpointId,
110
+ paginationRequest: paginationRequestsByDataSourceId[context.dataSource.Id],
111
+ queryKeyParts: resolveQueryKeyParts(queryKeyParts, context),
112
+ targetInterpretation,
113
+ transforms: resolveTransforms?.(context),
114
+ value: resolveValue?.(context) ??
115
+ readPresentationQueryFormAppliedValue(context.context, context.dataSource.Id),
116
+ });
117
+ },
118
+ };
119
+ }
120
+ /** Creates a default binding registry for backend-declared aggregate-query data sources. */
121
+ export function createAggregateQueryDataSourceBindingProjectionRegistry({ queryKeyParts = [], resolveTransforms, resolveValue, targetInterpretation, }) {
122
+ return {
123
+ fallback: (context) => {
124
+ if (!isAggregateQueryDataSource(context.dataSource) ||
125
+ !context.dataSource.Aggregation) {
126
+ return null;
127
+ }
128
+ return createDataSourceAggregateQueryBinding({
129
+ context,
130
+ queryKeyParts: resolveQueryKeyParts(queryKeyParts, context),
131
+ targetInterpretation,
132
+ transforms: resolveTransforms?.(context),
133
+ value: resolveValue?.(context),
134
+ });
135
+ },
136
+ };
137
+ }
138
+ /** Creates a default fetch binding registry for endpoint-backed data sources. */
139
+ export function createApiEndpointFetchDataSourceBindingProjectionRegistry({ queryKeyParts = [], targetInterpretation, }) {
140
+ return {
141
+ apiEndpoint: (context) => {
142
+ if (context.dataSource.Query || isPromptPreviewDataSource(context.dataSource)) {
143
+ return null;
144
+ }
145
+ const endpointId = readPresentationDataSourceEndpointId(context.binding);
146
+ if (!endpointId) {
147
+ return null;
148
+ }
149
+ return createDataSourceEndpointFetchBinding({
150
+ context,
151
+ endpointId,
152
+ queryKeyParts: resolveQueryKeyParts(queryKeyParts, context),
153
+ targetInterpretation,
154
+ });
155
+ },
156
+ };
157
+ }
158
+ /** Creates a default binding registry for frontend-owned local-state data sources. */
159
+ export function createLocalStateDataSourceBindingProjectionRegistry({ resolveLocalValue, targetInterpretation, }) {
160
+ return {
161
+ fallback: (context) => {
162
+ if (!isLocalStateDataSource(context.dataSource)) {
163
+ return null;
164
+ }
165
+ const localValue = resolveLocalValue(context);
166
+ return localValue
167
+ ? createTargetInterpretedLocalValueDataSourceBinding(context, targetInterpretation, localValue)
168
+ : null;
169
+ },
170
+ };
171
+ }
172
+ /**
173
+ * Creates a binding registry that exposes action-result state writes as local
174
+ * values for their target data sources.
175
+ */
176
+ export function createActionResultStateDataSourceBindingProjectionRegistry({ targetInterpretation, values = {}, }) {
177
+ return {
178
+ fallback: (context) => {
179
+ if (!hasOwn(values, context.dataSource.Id)) {
180
+ return null;
181
+ }
182
+ return createTargetInterpretedLocalValueDataSourceBinding(context, targetInterpretation, {
183
+ data: values[context.dataSource.Id],
184
+ dataSourceId: context.dataSource.Id,
185
+ });
186
+ },
187
+ };
188
+ }
189
+ /** Adapts data-source query interpretation metadata to collection/aggregate projector hooks. */
190
+ export function createDataSourceQueryInterpretationResolvers({ byDataSourceId = {}, defaultQueryKeyParts = [], transforms, }) {
191
+ return {
192
+ queryKeyParts: (context) => resolveQueryKeyParts(byDataSourceId[context.dataSource.Id]?.queryKeyParts ?? defaultQueryKeyParts, context),
193
+ resolveLocalValue: (context) => byDataSourceId[context.dataSource.Id]?.localValue?.(context),
194
+ resolveTransforms: (context) => resolveDataSourceQueryInterpretationTransforms(byDataSourceId[context.dataSource.Id], transforms, context),
195
+ resolveValue: (context) => resolveDataSourceQueryInterpretationValue(byDataSourceId[context.dataSource.Id], context),
196
+ };
197
+ }
198
+ /** Creates endpoint-fetch binding input from an API endpoint data source. */
199
+ export function createDataSourceEndpointFetchBindingInput({ context, emptyMessage, enabled, endpointId, fallbackData, pendingLabel, queryKeyParts = [], refetchInterval, retry, routeParameters, staleTime, targetInterpretation, }) {
200
+ const runtimeOptions = readDataSourceBindingRuntimeOptions(context.dataSource);
201
+ const resolvedEndpointId = endpointId ?? readPresentationDataSourceEndpointId(context.binding);
202
+ const resolvedRouteParameters = routeParameters ??
203
+ projectDataSourceRouteParameters(context.dataSource.Parameters, context.context.routeParameters);
204
+ const hasRequiredRouteParameters = hasRequiredDataSourceRouteParameters(context.dataSource.Parameters, resolvedRouteParameters);
205
+ return {
206
+ dataSourceId: context.dataSource.Id,
207
+ emptyMessage: emptyMessage ?? runtimeOptions.emptyMessage,
208
+ enabled: Boolean(resolvedEndpointId) && (enabled ?? true) && hasRequiredRouteParameters,
209
+ fallbackData: fallbackData === undefined ? runtimeOptions.fallbackData : fallbackData,
210
+ pendingLabel: pendingLabel ?? runtimeOptions.pendingLabel,
211
+ queryFn: () => resolvedEndpointId
212
+ ? executePresentationDataSourceTargetEndpoint(targetInterpretation, resolvedEndpointId, { routeParameters: resolvedRouteParameters }, { binding: context.binding })
213
+ : Promise.reject(new Error(`Data source '${context.dataSource.Id}' is not bound to an API endpoint.`)),
214
+ queryKey: [
215
+ 'presentation-data-source-endpoint-fetch',
216
+ context.dataSource.Id,
217
+ resolvedEndpointId,
218
+ resolvedRouteParameters,
219
+ ...queryKeyParts,
220
+ ],
221
+ refetchInterval: refetchInterval ?? runtimeOptions.refetchInterval,
222
+ retry: retry ?? runtimeOptions.retry,
223
+ staleTime: staleTime ?? runtimeOptions.staleTime,
224
+ };
225
+ }
226
+ /** Creates a fully wrapped endpoint-fetch binding from an API endpoint data source. */
227
+ export function createDataSourceEndpointFetchBinding(options) {
228
+ return createTargetInterpretedTanStackQueryDataSourceBinding(options.context, options.targetInterpretation, createDataSourceEndpointFetchBindingInput(options));
229
+ }
230
+ /** Creates a binding that materializes a source data source and evaluates aggregate measures. */
231
+ export function createDataSourceAggregateQueryBinding({ context, queryKeyParts = [], targetInterpretation, transforms, value, }) {
232
+ const aggregation = context.dataSource.Aggregation;
233
+ if (!aggregation) {
234
+ return null;
235
+ }
236
+ const sourceDataSource = findPresentationDataSource(context.module, aggregation.SourceDataSourceId);
237
+ const sourceEndpointId = readPresentationDataSourceEndpointId(sourceDataSource?.Binding);
238
+ if (!sourceDataSource || !sourceEndpointId) {
239
+ return createTargetInterpretedTanStackQueryDataSourceBinding(context, targetInterpretation, {
240
+ authorization: presentationDataSourceAuthorization.required({
241
+ blockedLabel: `Aggregate data source '${context.dataSource.Id}' cannot resolve source '${aggregation.SourceDataSourceId}'.`,
242
+ isAuthorized: false,
243
+ }),
244
+ dataSourceId: context.dataSource.Id,
245
+ queryFn: () => Promise.resolve(evaluateDataSourceAggregateQuery(aggregation, [])),
246
+ queryKey: [
247
+ 'presentation-data-source-aggregate-query',
248
+ context.dataSource.Id,
249
+ aggregation.SourceDataSourceId,
250
+ 'missing-source',
251
+ ...queryKeyParts,
252
+ ],
253
+ });
254
+ }
255
+ const appliedValue = value ?? readPresentationQueryFormAppliedValue(context.context, context.dataSource.Id);
256
+ const runtimeOptions = readDataSourceBindingRuntimeOptions(context.dataSource);
257
+ const fallbackData = runtimeOptions.fallbackData === undefined
258
+ ? evaluateDataSourceAggregateQuery(aggregation, [])
259
+ : runtimeOptions.fallbackData;
260
+ const sourceAuthorization = resolvePresentationDataSourceTargetAuthorization(targetInterpretation, {
261
+ ...context,
262
+ binding: sourceDataSource.Binding ?? null,
263
+ dataSource: sourceDataSource,
264
+ });
265
+ const loweredTransforms = mergeDataSourceQueryLoweringTransforms(targetInterpretation.queryLowering?.transformsById, transforms);
266
+ return createTargetInterpretedTanStackQueryDataSourceBinding(context, targetInterpretation, {
267
+ authorization: sourceAuthorization,
268
+ dataSourceId: context.dataSource.Id,
269
+ fallbackData,
270
+ pendingLabel: runtimeOptions.pendingLabel,
271
+ queryFn: async () => {
272
+ const items = await materializeDataSourceAggregateItems({
273
+ aggregation,
274
+ sourceDataSource,
275
+ sourceEndpointId,
276
+ targetInterpretation,
277
+ transforms: loweredTransforms,
278
+ value: appliedValue,
279
+ });
280
+ return evaluateDataSourceAggregateQuery(aggregation, items);
281
+ },
282
+ queryKey: [
283
+ 'presentation-data-source-aggregate-query',
284
+ context.dataSource.Id,
285
+ sourceDataSource.Id,
286
+ appliedValue ?? {},
287
+ aggregation,
288
+ ...queryKeyParts,
289
+ ],
290
+ refetchInterval: runtimeOptions.refetchInterval,
291
+ retry: runtimeOptions.retry,
292
+ staleTime: runtimeOptions.staleTime,
293
+ });
294
+ }
295
+ /** Executes an API endpoint through the active target interpretation. */
296
+ export function executePresentationDataSourceTargetEndpoint(targetInterpretation, endpointId, request = {}, options = {}) {
297
+ const executeEndpoint = resolvePresentationDataSourceTargetEndpointExecutor(targetInterpretation, options.binding);
298
+ if (!executeEndpoint) {
299
+ const executionTargetId = readPresentationDataSourceTargetBindingOptions(options.binding).executionTargetId;
300
+ return Promise.reject(new Error(executionTargetId
301
+ ? `No API endpoint executor is registered for presentation data-source execution target '${executionTargetId}'.`
302
+ : `No API endpoint executor is registered for presentation data-source endpoint '${endpointId}'.`));
303
+ }
304
+ return executeEndpoint(endpointId, request);
305
+ }
306
+ /**
307
+ * Composes independently owned data-source binding registries into one
308
+ * projection registry. Later registries override earlier factories for the same
309
+ * data-source or endpoint id so app-level composition can replace defaults at
310
+ * narrower ownership boundaries.
311
+ */
312
+ export function mergePresentationDataSourceBindingProjectionRegistries(...registries) {
313
+ let defaultAuthorization;
314
+ for (const registry of registries) {
315
+ defaultAuthorization = registry.defaultAuthorization ?? defaultAuthorization;
316
+ }
317
+ return {
318
+ apiEndpoint: resolveApiEndpointFactory(registries),
319
+ byDataSourceId: Object.assign({}, ...registries.map((registry) => registry.byDataSourceId ?? {})),
320
+ byEndpointId: Object.assign({}, ...registries.map((registry) => registry.byEndpointId ?? {})),
321
+ defaultAuthorization,
322
+ fallback: resolveFallbackFactory(registries),
323
+ };
324
+ }
325
+ /**
326
+ * Projects semantic data-source definitions onto concrete frontend binding
327
+ * plans. React hooks are deliberately not used here; hook-backed realization is
328
+ * handled later by PresentationDataSourceBinder.
329
+ */
330
+ export function projectPresentationDataSourceBindings({ context = {}, dataSourceDefinitions = [], dataSourceIds, module, registry, }) {
331
+ const uniqueDataSourceIds = Array.from(new Set(dataSourceIds));
332
+ const fallbackDataSourcesById = new Map(dataSourceDefinitions.map((dataSource) => [dataSource.Id, dataSource]));
333
+ return uniqueDataSourceIds.flatMap((dataSourceId) => {
334
+ const dataSource = findPresentationDataSource(module, dataSourceId) ??
335
+ fallbackDataSourcesById.get(dataSourceId) ??
336
+ null;
337
+ if (!dataSource) {
338
+ return [];
339
+ }
340
+ const binding = dataSource.Binding ?? null;
341
+ const factoryContext = {
342
+ binding,
343
+ context,
344
+ dataSource,
345
+ module,
346
+ };
347
+ const factory = resolveDataSourceBindingFactory(registry, dataSource);
348
+ const projectedBinding = factory?.(factoryContext) ??
349
+ createUnboundDataSourceBinding(dataSource, registry.defaultAuthorization?.(factoryContext));
350
+ return [applyDataSourceDefaults(projectedBinding, dataSource)];
351
+ });
352
+ }
353
+ /**
354
+ * Adapts TanStack Query binding-input factories into a full projection
355
+ * registry by applying target-level authorization to every produced binding.
356
+ */
357
+ export function createTanStackQueryDataSourceBindingProjectionRegistry({ apiEndpoint, byDataSourceId, byEndpointId, defaultAuthorization, targetInterpretation, }) {
358
+ return {
359
+ apiEndpoint: apiEndpoint
360
+ ? (context) => {
361
+ const binding = apiEndpoint(context);
362
+ return binding
363
+ ? createTargetInterpretedTanStackQueryDataSourceBinding(context, targetInterpretation, binding, defaultAuthorization)
364
+ : binding;
365
+ }
366
+ : undefined,
367
+ byDataSourceId,
368
+ byEndpointId: mapFactories(byEndpointId, (factory) => (context) => {
369
+ const binding = factory(context);
370
+ return binding
371
+ ? createTargetInterpretedTanStackQueryDataSourceBinding(context, targetInterpretation, binding, defaultAuthorization)
372
+ : binding;
373
+ }),
374
+ defaultAuthorization,
375
+ };
376
+ }
377
+ /**
378
+ * Creates a generic TanStack Query projection registry for API endpoint data
379
+ * sources. The registry resolves endpoint ids from backend bindings, projects
380
+ * route parameters, applies runtime annotations, and executes through the
381
+ * active target interpretation.
382
+ */
383
+ export function createApiEndpointTanStackQueryDataSourceBindingProjectionRegistry({ createQueryKey, defaultAuthorization, executeEndpoint, isEnabled, pendingLabel, retry, targetInterpretation, }) {
384
+ return createTanStackQueryDataSourceBindingProjectionRegistry({
385
+ apiEndpoint: (context) => {
386
+ const endpointId = readPresentationDataSourceEndpointId(context.binding);
387
+ if (!endpointId) {
388
+ return null;
389
+ }
390
+ const endpointExecutor = executeEndpoint ??
391
+ resolvePresentationDataSourceTargetEndpointExecutor(targetInterpretation, context.binding);
392
+ if (!endpointExecutor) {
393
+ return null;
394
+ }
395
+ const routeParameters = projectDataSourceRouteParameters(context.dataSource.Parameters, context.context.routeParameters);
396
+ const apiContext = {
397
+ ...context,
398
+ endpointId,
399
+ routeParameters,
400
+ };
401
+ const runtimeOptions = readDataSourceBindingRuntimeOptions(context.dataSource);
402
+ const targetIsEnabled = targetInterpretation?.apiEndpoint?.isEnabled?.(apiContext);
403
+ const projectedIsEnabled = isEnabled?.(apiContext);
404
+ return {
405
+ dataSourceId: context.dataSource.Id,
406
+ enabled: (targetIsEnabled ?? true) &&
407
+ (projectedIsEnabled ?? true) &&
408
+ hasRequiredDataSourceRouteParameters(context.dataSource.Parameters, routeParameters),
409
+ emptyMessage: runtimeOptions.emptyMessage,
410
+ fallbackData: runtimeOptions.fallbackData,
411
+ pendingLabel: resolveApiEndpointDataSourcePendingLabel(pendingLabel ??
412
+ runtimeOptions.pendingLabel ??
413
+ targetInterpretation?.apiEndpoint?.pendingLabel, apiContext),
414
+ queryFn: () => endpointExecutor(endpointId, { routeParameters }),
415
+ queryKey: createQueryKey?.(apiContext) ??
416
+ targetInterpretation?.apiEndpoint?.createQueryKey?.(apiContext) ??
417
+ createDefaultApiEndpointDataSourceQueryKey(apiContext),
418
+ refetchInterval: runtimeOptions.refetchInterval,
419
+ retry: retry ?? runtimeOptions.retry ?? targetInterpretation?.apiEndpoint?.retry ?? false,
420
+ staleTime: runtimeOptions.staleTime,
421
+ };
422
+ },
423
+ defaultAuthorization,
424
+ targetInterpretation,
425
+ });
426
+ }
427
+ function resolveApiEndpointFactory(registries) {
428
+ const factories = registries.flatMap((registry) => registry.apiEndpoint ? [registry.apiEndpoint] : []);
429
+ if (factories.length === 0) {
430
+ return undefined;
431
+ }
432
+ return (context) => {
433
+ for (let i = factories.length - 1; i >= 0; i -= 1) {
434
+ const binding = factories[i]?.(context);
435
+ if (binding) {
436
+ return binding;
437
+ }
438
+ }
439
+ return null;
440
+ };
441
+ }
442
+ function resolveFallbackFactory(registries) {
443
+ const factories = registries.flatMap((registry) => registry.fallback ? [registry.fallback] : []);
444
+ if (factories.length === 0) {
445
+ return undefined;
446
+ }
447
+ return (context) => {
448
+ for (let i = factories.length - 1; i >= 0; i -= 1) {
449
+ const binding = factories[i]?.(context);
450
+ if (binding) {
451
+ return binding;
452
+ }
453
+ }
454
+ return null;
455
+ };
456
+ }
457
+ function resolveDataSourceBindingFactory(registry, dataSource) {
458
+ const endpointId = isApiEndpointBinding(dataSource.Binding)
459
+ ? dataSource.Binding?.EndpointId
460
+ : null;
461
+ const exactFactory = registry.byDataSourceId?.[dataSource.Id] ??
462
+ (endpointId ? registry.byEndpointId?.[endpointId] : undefined);
463
+ if (exactFactory) {
464
+ return exactFactory;
465
+ }
466
+ const genericFactories = [
467
+ endpointId ? registry.apiEndpoint : undefined,
468
+ registry.fallback,
469
+ ].filter((factory) => Boolean(factory));
470
+ if (genericFactories.length === 0) {
471
+ return undefined;
472
+ }
473
+ return (context) => {
474
+ for (const factory of genericFactories) {
475
+ const binding = factory(context);
476
+ if (binding) {
477
+ return binding;
478
+ }
479
+ }
480
+ return null;
481
+ };
482
+ }
483
+ function isAggregateQueryDataSource(dataSource) {
484
+ return matchesDataSourceKind(dataSource.Kind, dataSourceKinds.aggregateQuery, 'aggregateQuery');
485
+ }
486
+ function isCollectionQueryDataSource(dataSource) {
487
+ return matchesDataSourceKind(dataSource.Kind, dataSourceKinds.collectionQuery, 'collectionQuery');
488
+ }
489
+ function isLocalStateDataSource(dataSource) {
490
+ return matchesDataSourceKind(dataSource.Kind, dataSourceKinds.localState, 'localState');
491
+ }
492
+ function isPromptPreviewDataSource(dataSource) {
493
+ return matchesDataSourceKind(dataSource.Kind, dataSourceKinds.promptPreview, 'promptPreview');
494
+ }
495
+ function matchesDataSourceKind(value, numericValue, camelLabel) {
496
+ const pascalLabel = dataSourceKindLabels[numericValue];
497
+ return (value === numericValue ||
498
+ String(value) === String(numericValue) ||
499
+ String(value) === pascalLabel ||
500
+ String(value).toLocaleLowerCase() === camelLabel.toLocaleLowerCase());
501
+ }
502
+ function resolveQueryKeyParts(queryKeyParts, context) {
503
+ return typeof queryKeyParts === 'function'
504
+ ? queryKeyParts(context)
505
+ : queryKeyParts;
506
+ }
507
+ function resolveDataSourceQueryInterpretationTransforms(interpretation, registryTransforms, context) {
508
+ const resolvedRegistryTransforms = resolveDataSourceQueryTransforms(registryTransforms, context);
509
+ const resolvedInterpretationTransforms = resolveDataSourceQueryTransforms(interpretation?.transforms, context);
510
+ if (!resolvedRegistryTransforms) {
511
+ return resolvedInterpretationTransforms;
512
+ }
513
+ if (!resolvedInterpretationTransforms) {
514
+ return resolvedRegistryTransforms;
515
+ }
516
+ return {
517
+ ...resolvedRegistryTransforms,
518
+ ...resolvedInterpretationTransforms,
519
+ };
520
+ }
521
+ function resolveDataSourceQueryTransforms(transforms, context) {
522
+ return typeof transforms === 'function'
523
+ ? transforms(context)
524
+ : transforms;
525
+ }
526
+ function mergeDataSourceQueryLoweringTransforms(targetTransforms, localTransforms) {
527
+ if (!targetTransforms) {
528
+ return localTransforms;
529
+ }
530
+ if (!localTransforms) {
531
+ return targetTransforms;
532
+ }
533
+ return {
534
+ ...targetTransforms,
535
+ ...localTransforms,
536
+ };
537
+ }
538
+ function resolveDataSourceQueryInterpretationValue(interpretation, context) {
539
+ if (!interpretation?.normalizeValue && !interpretation?.readValue) {
540
+ return undefined;
541
+ }
542
+ const value = interpretation.readValue
543
+ ? interpretation.readValue(context)
544
+ : readPresentationQueryFormAppliedValue(context.context, context.dataSource.Id);
545
+ return interpretation.normalizeValue
546
+ ? interpretation.normalizeValue(value, context)
547
+ : value;
548
+ }
549
+ /**
550
+ * Reads target binding options from a backend presentation binding.
551
+ *
552
+ * Option names are matched case-insensitively and may use either camelCase or
553
+ * PascalCase.
554
+ */
555
+ export function readPresentationDataSourceTargetBindingOptions(binding) {
556
+ return {
557
+ authorizationPolicyId: readPresentationBindingStringOption(binding?.Options, 'authorizationPolicyId'),
558
+ executionTargetId: readPresentationBindingStringOption(binding?.Options, 'executionTargetId'),
559
+ };
560
+ }
561
+ /**
562
+ * Reads runtime query defaults from the standard
563
+ * `cohesive.presentation.data-source.runtime` data-source annotation.
564
+ */
565
+ export function readDataSourceBindingRuntimeOptions(dataSource) {
566
+ const annotation = dataSource?.Annotations.find((candidate) => candidate.Name === 'cohesive.presentation.data-source.runtime' ||
567
+ candidate.Name.toLocaleLowerCase() === 'cohesive.presentation.data-source.runtime');
568
+ if (!annotation || !annotation.Value || typeof annotation.Value !== 'object') {
569
+ return {};
570
+ }
571
+ const options = annotation.Value;
572
+ const refetchInterval = readNumberOption(options, 'refetchIntervalMs') ??
573
+ readSecondsOptionAsMilliseconds(options, 'refetchIntervalSeconds');
574
+ const staleTime = readNumberOption(options, 'staleTimeMs') ??
575
+ readSecondsOptionAsMilliseconds(options, 'staleTimeSeconds');
576
+ return {
577
+ emptyMessage: readStringOption(options, 'emptyMessage'),
578
+ fallbackData: readObjectOption(options, 'fallbackData'),
579
+ pendingLabel: readStringOption(options, 'pendingLabel'),
580
+ refetchInterval,
581
+ retry: readRetryOption(options, 'retry'),
582
+ staleTime,
583
+ };
584
+ }
585
+ /**
586
+ * Resolves the endpoint executor selected by a binding's `executionTargetId`,
587
+ * falling back to the default API endpoint executor on the target
588
+ * interpretation.
589
+ */
590
+ export function resolvePresentationDataSourceTargetEndpointExecutor(targetInterpretation, binding) {
591
+ const executionTargetId = readPresentationDataSourceTargetBindingOptions(binding).executionTargetId;
592
+ if (executionTargetId) {
593
+ return targetInterpretation?.apiEndpoint?.executeEndpointByTargetId?.[executionTargetId];
594
+ }
595
+ return targetInterpretation?.apiEndpoint?.executeEndpoint;
596
+ }
597
+ async function materializeDataSourceAggregateItems({ aggregation, sourceDataSource, sourceEndpointId, targetInterpretation, transforms, value, }) {
598
+ const materializeAllPages = matchesDataSourceAggregateMaterializationKind(aggregation.Materialization.Kind, dataSourceAggregateMaterializationKinds.allPages, 'allPages');
599
+ const pageSize = aggregation.Materialization.PageSize ??
600
+ sourceDataSource.Query?.Pagination?.DefaultPageSize ??
601
+ 100;
602
+ const endpointBinding = findDataSourceQueryEndpointBinding(sourceDataSource, sourceEndpointId);
603
+ const items = [];
604
+ const seenCursors = new Set();
605
+ let cursor = null;
606
+ do {
607
+ const paginationRequest = materializeAllPages
608
+ ? createDataSourcePaginationRequest(sourceDataSource, {
609
+ cursor,
610
+ limit: pageSize,
611
+ })
612
+ : null;
613
+ const query = createDataSourceEndpointQueryRequest({
614
+ dataSource: sourceDataSource,
615
+ endpointId: sourceEndpointId,
616
+ paginationRequest,
617
+ transforms,
618
+ value,
619
+ });
620
+ const response = await executePresentationDataSourceTargetEndpoint(targetInterpretation, sourceEndpointId, { query }, { binding: sourceDataSource.Binding ?? null });
621
+ const pageItems = readAggregateResponseItems(response, endpointBinding?.ItemsPath);
622
+ items.push(...pageItems);
623
+ const nextCursor = readStringObjectPath(response, sourceDataSource.Query?.Pagination?.Response.CursorField);
624
+ cursor = materializeAllPages && nextCursor && !seenCursors.has(nextCursor)
625
+ ? nextCursor
626
+ : null;
627
+ if (cursor) {
628
+ seenCursors.add(cursor);
629
+ }
630
+ } while (cursor);
631
+ return items;
632
+ }
633
+ function evaluateDataSourceAggregateQuery(aggregation, items) {
634
+ const result = {};
635
+ for (const measure of aggregation.Measures) {
636
+ const predicate = measure.Predicate;
637
+ const matchingItems = predicate
638
+ ? items.filter((item) => evaluateDataSourceAggregatePredicate(predicate, item))
639
+ : items;
640
+ writeObjectPath(result, measure.TargetPath, evaluateDataSourceAggregateMeasure(measure.Operator, measure.SourceField, matchingItems));
641
+ }
642
+ return result;
643
+ }
644
+ function evaluateDataSourceAggregateMeasure(operator, sourceField, items) {
645
+ if (matchesAggregateOperator(operator, aggregateOperators.count, 'count')) {
646
+ return items.length;
647
+ }
648
+ const values = sourceField
649
+ ? items.map((item) => readObjectPath(item, fieldPathToString(sourceField)))
650
+ : items;
651
+ if (matchesAggregateOperator(operator, aggregateOperators.sum, 'sum')) {
652
+ return values.reduce((sum, value) => sum + (typeof value === 'number' ? value : 0), 0);
653
+ }
654
+ if (matchesAggregateOperator(operator, aggregateOperators.min, 'min')) {
655
+ return values
656
+ .filter((value) => typeof value === 'number')
657
+ .reduce((min, value) => min === null ? value : Math.min(min, value), null);
658
+ }
659
+ if (matchesAggregateOperator(operator, aggregateOperators.max, 'max')) {
660
+ return values
661
+ .filter((value) => typeof value === 'number')
662
+ .reduce((max, value) => max === null ? value : Math.max(max, value), null);
663
+ }
664
+ if (matchesAggregateOperator(operator, aggregateOperators.any, 'any')) {
665
+ return values.some(Boolean);
666
+ }
667
+ if (matchesAggregateOperator(operator, aggregateOperators.all, 'all')) {
668
+ return values.every(Boolean);
669
+ }
670
+ return null;
671
+ }
672
+ function evaluateDataSourceAggregatePredicate(predicate, item) {
673
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.and, 'and')) {
674
+ return (predicate.Terms ?? []).every((term) => evaluateDataSourceAggregatePredicate(term, item));
675
+ }
676
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.or, 'or')) {
677
+ return (predicate.Terms ?? []).some((term) => evaluateDataSourceAggregatePredicate(term, item));
678
+ }
679
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.not, 'not')) {
680
+ const [term] = predicate.Terms ?? [];
681
+ return term ? !evaluateDataSourceAggregatePredicate(term, item) : true;
682
+ }
683
+ const value = readObjectPath(item, fieldPathToString(predicate.Field));
684
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.fieldEquals, 'fieldEquals')) {
685
+ return String(value) === predicate.Value;
686
+ }
687
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.fieldNotEquals, 'fieldNotEquals')) {
688
+ return String(value) !== predicate.Value;
689
+ }
690
+ if (matchesDataSourceAggregatePredicateKind(predicate.Kind, dataSourceAggregatePredicateKinds.fieldHasValue, 'fieldHasValue')) {
691
+ return hasAggregateValue(value);
692
+ }
693
+ return false;
694
+ }
695
+ function readPresentationDataSourceEndpointId(binding) {
696
+ return isApiEndpointBinding(binding) && binding?.EndpointId
697
+ ? binding.EndpointId
698
+ : null;
699
+ }
700
+ function applyDataSourceDefaults(binding, dataSource) {
701
+ if (!isTanStackQueryBinding(binding)) {
702
+ return binding;
703
+ }
704
+ return {
705
+ ...binding,
706
+ staleTime: binding.staleTime ?? readDataSourceStaleTime(dataSource),
707
+ };
708
+ }
709
+ function createUnboundDataSourceBinding(dataSource, authorization) {
710
+ return presentationDataSourceBindings.localValue({
711
+ authorization: authorization ??
712
+ presentationDataSourceAuthorization.required({
713
+ blockedLabel: `No frontend binding is registered for '${dataSource.Name}'.`,
714
+ isAuthorized: false,
715
+ }),
716
+ data: undefined,
717
+ dataSourceId: dataSource.Id,
718
+ });
719
+ }
720
+ function readDataSourceStaleTime(dataSource) {
721
+ const cache = dataSource.Cache;
722
+ if (!cache) {
723
+ return undefined;
724
+ }
725
+ if (cache.Kind === cachePolicyKinds.reactQuery ||
726
+ String(cache.Kind).toLocaleLowerCase() === 'reactquery') {
727
+ return cache.StaleAfterSeconds === null ||
728
+ cache.StaleAfterSeconds === undefined
729
+ ? undefined
730
+ : cache.StaleAfterSeconds * 1000;
731
+ }
732
+ return undefined;
733
+ }
734
+ function isApiEndpointBinding(binding) {
735
+ return (binding?.Kind === presentationBindingKinds.apiEndpoint ||
736
+ String(binding?.Kind).toLocaleLowerCase() === 'apiendpoint');
737
+ }
738
+ function isLocalStateBinding(binding) {
739
+ return (binding?.Kind === presentationBindingKinds.localState ||
740
+ String(binding?.Kind).toLocaleLowerCase() === 'localstate');
741
+ }
742
+ function readPresentationBindingStringOption(options, key) {
743
+ if (!options || typeof options !== 'object') {
744
+ return null;
745
+ }
746
+ const record = options;
747
+ const value = record[key] ??
748
+ record[capitalizeFirstCharacter(key)] ??
749
+ readCaseInsensitiveProperty(record, key);
750
+ return typeof value === 'string' && value.trim().length > 0
751
+ ? value
752
+ : null;
753
+ }
754
+ function readAggregateResponseItems(response, itemsPath) {
755
+ const value = itemsPath ? readObjectPath(response, itemsPath) : response;
756
+ if (Array.isArray(value)) {
757
+ return value;
758
+ }
759
+ const items = readObjectPath(response, 'Items');
760
+ return Array.isArray(items) ? items : [];
761
+ }
762
+ function readStringObjectPath(value, path) {
763
+ const raw = readObjectPath(value, path);
764
+ return typeof raw === 'string' && raw.trim().length > 0 ? raw.trim() : null;
765
+ }
766
+ function fieldPathToString(field) {
767
+ return field?.Segments.map((segment) => segment.Segment).filter(Boolean).join('.') ?? '';
768
+ }
769
+ function hasAggregateValue(value) {
770
+ if (value === null || value === undefined) {
771
+ return false;
772
+ }
773
+ if (typeof value === 'string') {
774
+ return value.trim().length > 0;
775
+ }
776
+ if (Array.isArray(value)) {
777
+ return value.length > 0;
778
+ }
779
+ return true;
780
+ }
781
+ function matchesAggregateOperator(value, numericValue, camelLabel) {
782
+ return matchesGeneratedEnum(value, numericValue, camelLabel);
783
+ }
784
+ function matchesDataSourceAggregateMaterializationKind(value, numericValue, camelLabel) {
785
+ return matchesGeneratedEnum(value, numericValue, camelLabel);
786
+ }
787
+ function matchesDataSourceAggregatePredicateKind(value, numericValue, camelLabel) {
788
+ return matchesGeneratedEnum(value, numericValue, camelLabel);
789
+ }
790
+ function matchesGeneratedEnum(value, numericValue, camelLabel) {
791
+ return (value === numericValue ||
792
+ String(value) === String(numericValue) ||
793
+ String(value).toLocaleLowerCase() === camelLabel.toLocaleLowerCase());
794
+ }
795
+ function readStringOption(options, key) {
796
+ const value = readObjectOption(options, key);
797
+ return typeof value === 'string' && value.trim().length > 0
798
+ ? value
799
+ : undefined;
800
+ }
801
+ function readObjectOption(options, key) {
802
+ return Object.prototype.hasOwnProperty.call(options, key)
803
+ ? options[key]
804
+ : readCaseInsensitiveProperty(options, key);
805
+ }
806
+ function readNumberOption(options, key) {
807
+ const value = readObjectOption(options, key);
808
+ return typeof value === 'number' && Number.isFinite(value)
809
+ ? value
810
+ : undefined;
811
+ }
812
+ function readSecondsOptionAsMilliseconds(options, key) {
813
+ const seconds = readNumberOption(options, key);
814
+ return seconds === undefined ? undefined : seconds * 1000;
815
+ }
816
+ function readRetryOption(options, key) {
817
+ const value = readObjectOption(options, key);
818
+ return typeof value === 'boolean' || typeof value === 'number'
819
+ ? value
820
+ : undefined;
821
+ }
822
+ function readCaseInsensitiveProperty(record, key) {
823
+ const normalizedKey = key.toLocaleLowerCase();
824
+ const match = Object.keys(record).find((candidate) => candidate.toLocaleLowerCase() === normalizedKey);
825
+ return match ? record[match] : undefined;
826
+ }
827
+ function capitalizeFirstCharacter(value) {
828
+ return value.length > 0
829
+ ? `${value.slice(0, 1).toLocaleUpperCase()}${value.slice(1)}`
830
+ : value;
831
+ }
832
+ function projectDataSourceRouteParameters(parameters, routeParameters) {
833
+ return Object.fromEntries(parameters.map((parameter) => [
834
+ parameter.Name,
835
+ readRouteParameterValue(routeParameters, parameter.Name),
836
+ ]));
837
+ }
838
+ function hasRequiredDataSourceRouteParameters(parameters, routeParameters) {
839
+ return parameters.every((parameter) => !parameter.IsRequired ||
840
+ typeof routeParameters[parameter.Name] === 'string' &&
841
+ routeParameters[parameter.Name].length > 0);
842
+ }
843
+ function readRouteParameterValue(routeParameters, parameterName) {
844
+ if (!routeParameters) {
845
+ return undefined;
846
+ }
847
+ if (Object.prototype.hasOwnProperty.call(routeParameters, parameterName)) {
848
+ return routeParameters[parameterName];
849
+ }
850
+ const match = Object.keys(routeParameters).find((candidate) => candidate.toLocaleLowerCase() === parameterName.toLocaleLowerCase());
851
+ return match ? routeParameters[match] : undefined;
852
+ }
853
+ function hasOwn(values, key) {
854
+ return Object.prototype.hasOwnProperty.call(values, key);
855
+ }
856
+ function resolveApiEndpointDataSourcePendingLabel(label, context) {
857
+ if (typeof label === 'function') {
858
+ return label(context);
859
+ }
860
+ return label ?? `Loading ${context.dataSource.Name.toLocaleLowerCase()}...`;
861
+ }
862
+ function createDefaultApiEndpointDataSourceQueryKey({ context, dataSource, endpointId, routeParameters, }) {
863
+ return [
864
+ 'presentation-data-source',
865
+ dataSource.Id,
866
+ endpointId,
867
+ routeParameters,
868
+ ...(context.queryKeyParts ?? []),
869
+ ];
870
+ }
871
+ function mapFactories(factories, mapFactory) {
872
+ if (!factories) {
873
+ return undefined;
874
+ }
875
+ return Object.fromEntries(Object.entries(factories).map(([key, factory]) => [
876
+ key,
877
+ mapFactory(factory),
878
+ ]));
879
+ }
880
+ //# sourceMappingURL=data-source-projection.js.map