@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.
- package/LICENSE +55 -0
- package/dist/api-scope-request.d.ts +43 -0
- package/dist/api-scope-request.d.ts.map +1 -0
- package/dist/api-scope-request.js +96 -0
- package/dist/api-scope-request.js.map +1 -0
- package/dist/collection-chrome-icons.d.ts +18 -0
- package/dist/collection-chrome-icons.d.ts.map +1 -0
- package/dist/collection-chrome-icons.js +57 -0
- package/dist/collection-chrome-icons.js.map +1 -0
- package/dist/collection-chrome-runtime.d.ts +25 -0
- package/dist/collection-chrome-runtime.d.ts.map +1 -0
- package/dist/collection-chrome-runtime.js +72 -0
- package/dist/collection-chrome-runtime.js.map +1 -0
- package/dist/collection-chrome-slot-renderer-registry.d.ts +110 -0
- package/dist/collection-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/collection-chrome-slot-renderer-registry.js +136 -0
- package/dist/collection-chrome-slot-renderer-registry.js.map +1 -0
- package/dist/collection-selection-state.d.ts +18 -0
- package/dist/collection-selection-state.d.ts.map +1 -0
- package/dist/collection-selection-state.js +2 -0
- package/dist/collection-selection-state.js.map +1 -0
- package/dist/data-source-projection.d.ts +475 -0
- package/dist/data-source-projection.d.ts.map +1 -0
- package/dist/data-source-projection.js +880 -0
- package/dist/data-source-projection.js.map +1 -0
- package/dist/data-source-query-lowering.d.ts +35 -0
- package/dist/data-source-query-lowering.d.ts.map +1 -0
- package/dist/data-source-query-lowering.js +104 -0
- package/dist/data-source-query-lowering.js.map +1 -0
- package/dist/date-time-filter-model.d.ts +20 -0
- package/dist/date-time-filter-model.d.ts.map +1 -0
- package/dist/date-time-filter-model.js +115 -0
- package/dist/date-time-filter-model.js.map +1 -0
- package/dist/document-badge-icons.d.ts +4 -0
- package/dist/document-badge-icons.d.ts.map +1 -0
- package/dist/document-badge-icons.js +4 -0
- package/dist/document-badge-icons.js.map +1 -0
- package/dist/document-module.d.ts +268 -0
- package/dist/document-module.d.ts.map +1 -0
- package/dist/document-module.js +347 -0
- package/dist/document-module.js.map +1 -0
- package/dist/document-summary-model.d.ts +2 -0
- package/dist/document-summary-model.d.ts.map +1 -0
- package/dist/document-summary-model.js +2 -0
- package/dist/document-summary-model.js.map +1 -0
- package/dist/document-workspace-chrome-projection.d.ts +18 -0
- package/dist/document-workspace-chrome-projection.d.ts.map +1 -0
- package/dist/document-workspace-chrome-projection.js +35 -0
- package/dist/document-workspace-chrome-projection.js.map +1 -0
- package/dist/document-workspace-surface-slots.d.ts +75 -0
- package/dist/document-workspace-surface-slots.d.ts.map +1 -0
- package/dist/document-workspace-surface-slots.js +268 -0
- package/dist/document-workspace-surface-slots.js.map +1 -0
- package/dist/endpoint-executor.d.ts +62 -0
- package/dist/endpoint-executor.d.ts.map +1 -0
- package/dist/endpoint-executor.js +35 -0
- package/dist/endpoint-executor.js.map +1 -0
- package/dist/field-display-resolution.d.ts +5 -0
- package/dist/field-display-resolution.d.ts.map +1 -0
- package/dist/field-display-resolution.js +50 -0
- package/dist/field-display-resolution.js.map +1 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +48 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +108 -0
- package/dist/module.js.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts +12 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.js +29 -0
- package/dist/navigation-shell-frame-renderer-registry.js.map +1 -0
- package/dist/navigation-shell-layout-runtime.d.ts +29 -0
- package/dist/navigation-shell-layout-runtime.d.ts.map +1 -0
- package/dist/navigation-shell-layout-runtime.js +50 -0
- package/dist/navigation-shell-layout-runtime.js.map +1 -0
- package/dist/navigation-shell-region-component-registry.d.ts +96 -0
- package/dist/navigation-shell-region-component-registry.d.ts.map +1 -0
- package/dist/navigation-shell-region-component-registry.js +108 -0
- package/dist/navigation-shell-region-component-registry.js.map +1 -0
- package/dist/navigation-shell-runtime.d.ts +48 -0
- package/dist/navigation-shell-runtime.d.ts.map +1 -0
- package/dist/navigation-shell-runtime.js +457 -0
- package/dist/navigation-shell-runtime.js.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts +15 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.js +48 -0
- package/dist/navigation-shell-slot-renderer-registry.js.map +1 -0
- package/dist/navigation.d.ts +84 -0
- package/dist/navigation.d.ts.map +1 -0
- package/dist/navigation.js +167 -0
- package/dist/navigation.js.map +1 -0
- package/dist/object-path.d.ts +23 -0
- package/dist/object-path.d.ts.map +1 -0
- package/dist/object-path.js +63 -0
- package/dist/object-path.js.map +1 -0
- package/dist/page-host-renderer-registry.d.ts +119 -0
- package/dist/page-host-renderer-registry.d.ts.map +1 -0
- package/dist/page-host-renderer-registry.js +305 -0
- package/dist/page-host-renderer-registry.js.map +1 -0
- package/dist/presentation-action-endpoint-request-projection.d.ts +23 -0
- package/dist/presentation-action-endpoint-request-projection.d.ts.map +1 -0
- package/dist/presentation-action-endpoint-request-projection.js +117 -0
- package/dist/presentation-action-endpoint-request-projection.js.map +1 -0
- package/dist/presentation-action-endpoint.d.ts +24 -0
- package/dist/presentation-action-endpoint.d.ts.map +1 -0
- package/dist/presentation-action-endpoint.js +56 -0
- package/dist/presentation-action-endpoint.js.map +1 -0
- package/dist/presentation-action-icons.d.ts +4 -0
- package/dist/presentation-action-icons.d.ts.map +1 -0
- package/dist/presentation-action-icons.js +4 -0
- package/dist/presentation-action-icons.js.map +1 -0
- package/dist/presentation-action-result-state.d.ts +48 -0
- package/dist/presentation-action-result-state.d.ts.map +1 -0
- package/dist/presentation-action-result-state.js +109 -0
- package/dist/presentation-action-result-state.js.map +1 -0
- package/dist/presentation-action-runtime-binding.d.ts +48 -0
- package/dist/presentation-action-runtime-binding.d.ts.map +1 -0
- package/dist/presentation-action-runtime-binding.js +52 -0
- package/dist/presentation-action-runtime-binding.js.map +1 -0
- package/dist/presentation-action-runtime-diagnostics.d.ts +18 -0
- package/dist/presentation-action-runtime-diagnostics.d.ts.map +1 -0
- package/dist/presentation-action-runtime-diagnostics.js +69 -0
- package/dist/presentation-action-runtime-diagnostics.js.map +1 -0
- package/dist/presentation-action-runtime-labels.d.ts +15 -0
- package/dist/presentation-action-runtime-labels.d.ts.map +1 -0
- package/dist/presentation-action-runtime-labels.js +28 -0
- package/dist/presentation-action-runtime-labels.js.map +1 -0
- package/dist/presentation-action-runtime-projection.d.ts +17 -0
- package/dist/presentation-action-runtime-projection.d.ts.map +1 -0
- package/dist/presentation-action-runtime-projection.js +31 -0
- package/dist/presentation-action-runtime-projection.js.map +1 -0
- package/dist/presentation-badge-resolution.d.ts +8 -0
- package/dist/presentation-badge-resolution.d.ts.map +1 -0
- package/dist/presentation-badge-resolution.js +73 -0
- package/dist/presentation-badge-resolution.js.map +1 -0
- package/dist/presentation-collection-pagination.d.ts +32 -0
- package/dist/presentation-collection-pagination.d.ts.map +1 -0
- package/dist/presentation-collection-pagination.js +275 -0
- package/dist/presentation-collection-pagination.js.map +1 -0
- package/dist/presentation-content-diagnostics.d.ts +17 -0
- package/dist/presentation-content-diagnostics.d.ts.map +1 -0
- package/dist/presentation-content-diagnostics.js +61 -0
- package/dist/presentation-content-diagnostics.js.map +1 -0
- package/dist/presentation-content-resolution.d.ts +9 -0
- package/dist/presentation-content-resolution.d.ts.map +1 -0
- package/dist/presentation-content-resolution.js +19 -0
- package/dist/presentation-content-resolution.js.map +1 -0
- package/dist/presentation-data-source-binding-model.d.ts +81 -0
- package/dist/presentation-data-source-binding-model.d.ts.map +1 -0
- package/dist/presentation-data-source-binding-model.js +56 -0
- package/dist/presentation-data-source-binding-model.js.map +1 -0
- package/dist/presentation-data-source-runtime.d.ts +62 -0
- package/dist/presentation-data-source-runtime.d.ts.map +1 -0
- package/dist/presentation-data-source-runtime.js +80 -0
- package/dist/presentation-data-source-runtime.js.map +1 -0
- package/dist/presentation-design-intent-diagnostics.d.ts +25 -0
- package/dist/presentation-design-intent-diagnostics.d.ts.map +1 -0
- package/dist/presentation-design-intent-diagnostics.js +55 -0
- package/dist/presentation-design-intent-diagnostics.js.map +1 -0
- package/dist/presentation-icon-diagnostics.d.ts +45 -0
- package/dist/presentation-icon-diagnostics.d.ts.map +1 -0
- package/dist/presentation-icon-diagnostics.js +235 -0
- package/dist/presentation-icon-diagnostics.js.map +1 -0
- package/dist/presentation-icon-registry.d.ts +36 -0
- package/dist/presentation-icon-registry.d.ts.map +1 -0
- package/dist/presentation-icon-registry.js +81 -0
- package/dist/presentation-icon-registry.js.map +1 -0
- package/dist/presentation-navigation-action-runtime-bindings.d.ts +13 -0
- package/dist/presentation-navigation-action-runtime-bindings.d.ts.map +1 -0
- package/dist/presentation-navigation-action-runtime-bindings.js +29 -0
- package/dist/presentation-navigation-action-runtime-bindings.js.map +1 -0
- package/dist/presentation-pagination.d.ts +98 -0
- package/dist/presentation-pagination.d.ts.map +1 -0
- package/dist/presentation-pagination.js +427 -0
- package/dist/presentation-pagination.js.map +1 -0
- package/dist/presentation-projection-coverage.d.ts +38 -0
- package/dist/presentation-projection-coverage.d.ts.map +1 -0
- package/dist/presentation-projection-coverage.js +2429 -0
- package/dist/presentation-projection-coverage.js.map +1 -0
- package/dist/presentation-projection-diagnostics.d.ts +33 -0
- package/dist/presentation-projection-diagnostics.d.ts.map +1 -0
- package/dist/presentation-projection-diagnostics.js +17 -0
- package/dist/presentation-projection-diagnostics.js.map +1 -0
- package/dist/presentation-projection-trace.d.ts +97 -0
- package/dist/presentation-projection-trace.d.ts.map +1 -0
- package/dist/presentation-projection-trace.js +110 -0
- package/dist/presentation-projection-trace.js.map +1 -0
- package/dist/presentation-query-form-state.d.ts +15 -0
- package/dist/presentation-query-form-state.d.ts.map +1 -0
- package/dist/presentation-query-form-state.js +20 -0
- package/dist/presentation-query-form-state.js.map +1 -0
- package/dist/presentation-renderer-registry.d.ts +86 -0
- package/dist/presentation-renderer-registry.d.ts.map +1 -0
- package/dist/presentation-renderer-registry.js +108 -0
- package/dist/presentation-renderer-registry.js.map +1 -0
- package/dist/presentation-semantics.d.ts +288 -0
- package/dist/presentation-semantics.d.ts.map +1 -0
- package/dist/presentation-semantics.js +560 -0
- package/dist/presentation-semantics.js.map +1 -0
- package/dist/presentation-standards.d.ts +8 -0
- package/dist/presentation-standards.d.ts.map +1 -0
- package/dist/presentation-standards.js +9 -0
- package/dist/presentation-standards.js.map +1 -0
- package/dist/presentation-test-selectors.d.ts +146 -0
- package/dist/presentation-test-selectors.d.ts.map +1 -0
- package/dist/presentation-test-selectors.js +113 -0
- package/dist/presentation-test-selectors.js.map +1 -0
- package/dist/presentation-value-formatting.d.ts +12 -0
- package/dist/presentation-value-formatting.d.ts.map +1 -0
- package/dist/presentation-value-formatting.js +33 -0
- package/dist/presentation-value-formatting.js.map +1 -0
- package/dist/presentation-value-resolution.d.ts +7 -0
- package/dist/presentation-value-resolution.d.ts.map +1 -0
- package/dist/presentation-value-resolution.js +69 -0
- package/dist/presentation-value-resolution.js.map +1 -0
- package/dist/presentation-view-tree.d.ts +6 -0
- package/dist/presentation-view-tree.d.ts.map +1 -0
- package/dist/presentation-view-tree.js +15 -0
- package/dist/presentation-view-tree.js.map +1 -0
- package/dist/process-task-model.d.ts +80 -0
- package/dist/process-task-model.d.ts.map +1 -0
- package/dist/process-task-model.js +52 -0
- package/dist/process-task-model.js.map +1 -0
- package/dist/process-task-projection.d.ts +46 -0
- package/dist/process-task-projection.d.ts.map +1 -0
- package/dist/process-task-projection.js +233 -0
- package/dist/process-task-projection.js.map +1 -0
- package/dist/projected-action-status-projection.d.ts +18 -0
- package/dist/projected-action-status-projection.d.ts.map +1 -0
- package/dist/projected-action-status-projection.js +19 -0
- package/dist/projected-action-status-projection.js.map +1 -0
- package/dist/projected-activity-state-model.d.ts +22 -0
- package/dist/projected-activity-state-model.d.ts.map +1 -0
- package/dist/projected-activity-state-model.js +87 -0
- package/dist/projected-activity-state-model.js.map +1 -0
- package/dist/projected-collection-action-runtime-bindings.d.ts +12 -0
- package/dist/projected-collection-action-runtime-bindings.d.ts.map +1 -0
- package/dist/projected-collection-action-runtime-bindings.js +37 -0
- package/dist/projected-collection-action-runtime-bindings.js.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts +23 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.js +168 -0
- package/dist/projected-collection-action-runtime-diagnostics.js.map +1 -0
- package/dist/projected-collection-runtime.d.ts +475 -0
- package/dist/projected-collection-runtime.d.ts.map +1 -0
- package/dist/projected-collection-runtime.js +832 -0
- package/dist/projected-collection-runtime.js.map +1 -0
- package/dist/projected-document-action-diagnostics.d.ts +16 -0
- package/dist/projected-document-action-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-diagnostics.js +113 -0
- package/dist/projected-document-action-diagnostics.js.map +1 -0
- package/dist/projected-document-action-enablements.d.ts +25 -0
- package/dist/projected-document-action-enablements.d.ts.map +1 -0
- package/dist/projected-document-action-enablements.js +38 -0
- package/dist/projected-document-action-enablements.js.map +1 -0
- package/dist/projected-document-action-projection.d.ts +45 -0
- package/dist/projected-document-action-projection.d.ts.map +1 -0
- package/dist/projected-document-action-projection.js +201 -0
- package/dist/projected-document-action-projection.js.map +1 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.d.ts +16 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.js +168 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.js.map +1 -0
- package/dist/projected-document-action-runtime-profile.d.ts +64 -0
- package/dist/projected-document-action-runtime-profile.d.ts.map +1 -0
- package/dist/projected-document-action-runtime-profile.js +33 -0
- package/dist/projected-document-action-runtime-profile.js.map +1 -0
- package/dist/projected-document-action-status-notice-diagnostics.d.ts +10 -0
- package/dist/projected-document-action-status-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-status-notice-diagnostics.js +64 -0
- package/dist/projected-document-action-status-notice-diagnostics.js.map +1 -0
- package/dist/projected-document-badge-formatting.d.ts +2 -0
- package/dist/projected-document-badge-formatting.d.ts.map +1 -0
- package/dist/projected-document-badge-formatting.js +7 -0
- package/dist/projected-document-badge-formatting.js.map +1 -0
- package/dist/projected-document-editor-model.d.ts +4 -0
- package/dist/projected-document-editor-model.d.ts.map +1 -0
- package/dist/projected-document-editor-model.js +2 -0
- package/dist/projected-document-editor-model.js.map +1 -0
- package/dist/projected-document-field-navigation.d.ts +72 -0
- package/dist/projected-document-field-navigation.d.ts.map +1 -0
- package/dist/projected-document-field-navigation.js +143 -0
- package/dist/projected-document-field-navigation.js.map +1 -0
- package/dist/projected-document-field-semantics.d.ts +5 -0
- package/dist/projected-document-field-semantics.d.ts.map +1 -0
- package/dist/projected-document-field-semantics.js +16 -0
- package/dist/projected-document-field-semantics.js.map +1 -0
- package/dist/projected-document-workspace-data-source-bindings.d.ts +69 -0
- package/dist/projected-document-workspace-data-source-bindings.d.ts.map +1 -0
- package/dist/projected-document-workspace-data-source-bindings.js +81 -0
- package/dist/projected-document-workspace-data-source-bindings.js.map +1 -0
- package/dist/projected-document-workspace-notice-diagnostics.d.ts +12 -0
- package/dist/projected-document-workspace-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-workspace-notice-diagnostics.js +13 -0
- package/dist/projected-document-workspace-notice-diagnostics.js.map +1 -0
- package/dist/projected-input-form-runtime.d.ts +62 -0
- package/dist/projected-input-form-runtime.d.ts.map +1 -0
- package/dist/projected-input-form-runtime.js +2 -0
- package/dist/projected-input-form-runtime.js.map +1 -0
- package/dist/projected-process-task-notice-diagnostics.d.ts +13 -0
- package/dist/projected-process-task-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-process-task-notice-diagnostics.js +170 -0
- package/dist/projected-process-task-notice-diagnostics.js.map +1 -0
- package/dist/projected-query-form-runtime.d.ts +46 -0
- package/dist/projected-query-form-runtime.d.ts.map +1 -0
- package/dist/projected-query-form-runtime.js +2 -0
- package/dist/projected-query-form-runtime.js.map +1 -0
- package/dist/prompt-document-preview-projection.d.ts +46 -0
- package/dist/prompt-document-preview-projection.d.ts.map +1 -0
- package/dist/prompt-document-preview-projection.js +173 -0
- package/dist/prompt-document-preview-projection.js.map +1 -0
- package/dist/prompt-icons.d.ts +4 -0
- package/dist/prompt-icons.d.ts.map +1 -0
- package/dist/prompt-icons.js +4 -0
- package/dist/prompt-icons.js.map +1 -0
- package/dist/prompt-status-message-resolution.d.ts +18 -0
- package/dist/prompt-status-message-resolution.d.ts.map +1 -0
- package/dist/prompt-status-message-resolution.js +83 -0
- package/dist/prompt-status-message-resolution.js.map +1 -0
- package/dist/query-form-lowering.d.ts +16 -0
- package/dist/query-form-lowering.d.ts.map +1 -0
- package/dist/query-form-lowering.js +38 -0
- package/dist/query-form-lowering.js.map +1 -0
- package/dist/query-form-url-state.d.ts +44 -0
- package/dist/query-form-url-state.d.ts.map +1 -0
- package/dist/query-form-url-state.js +197 -0
- package/dist/query-form-url-state.js.map +1 -0
- package/dist/query-offset-page.d.ts +13 -0
- package/dist/query-offset-page.d.ts.map +1 -0
- package/dist/query-offset-page.js +24 -0
- package/dist/query-offset-page.js.map +1 -0
- package/dist/relation-query-input-form-target.d.ts +10 -0
- package/dist/relation-query-input-form-target.d.ts.map +1 -0
- package/dist/relation-query-input-form-target.js +30 -0
- package/dist/relation-query-input-form-target.js.map +1 -0
- package/dist/scope-selection.d.ts +94 -0
- package/dist/scope-selection.d.ts.map +1 -0
- package/dist/scope-selection.js +95 -0
- package/dist/scope-selection.js.map +1 -0
- package/dist/target-bindings.d.ts +39 -0
- package/dist/target-bindings.d.ts.map +1 -0
- package/dist/target-bindings.js +40 -0
- package/dist/target-bindings.js.map +1 -0
- package/dist/view-chrome-content-diagnostics.d.ts +8 -0
- package/dist/view-chrome-content-diagnostics.d.ts.map +1 -0
- package/dist/view-chrome-content-diagnostics.js +84 -0
- package/dist/view-chrome-content-diagnostics.js.map +1 -0
- package/dist/view-chrome-icons.d.ts +12 -0
- package/dist/view-chrome-icons.d.ts.map +1 -0
- package/dist/view-chrome-icons.js +50 -0
- package/dist/view-chrome-icons.js.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts +19 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.js +62 -0
- package/dist/view-chrome-slot-renderer-registry.js.map +1 -0
- package/package.json +53 -0
- package/src/api-scope-request.ts +186 -0
- package/src/collection-chrome-icons.ts +89 -0
- package/src/collection-chrome-runtime.ts +151 -0
- package/src/collection-chrome-slot-renderer-registry.ts +227 -0
- package/src/collection-selection-state.ts +32 -0
- package/src/data-source-projection.ts +2149 -0
- package/src/data-source-query-lowering.ts +217 -0
- package/src/date-time-filter-model.ts +156 -0
- package/src/document-badge-icons.ts +3 -0
- package/src/document-module.ts +741 -0
- package/src/document-summary-model.ts +1 -0
- package/src/document-workspace-chrome-projection.ts +62 -0
- package/src/document-workspace-surface-slots.ts +458 -0
- package/src/endpoint-executor.ts +122 -0
- package/src/field-display-resolution.ts +99 -0
- package/src/index.ts +104 -0
- package/src/module.ts +281 -0
- package/src/navigation-shell-frame-renderer-registry.ts +65 -0
- package/src/navigation-shell-layout-runtime.ts +124 -0
- package/src/navigation-shell-region-component-registry.ts +242 -0
- package/src/navigation-shell-runtime.ts +579 -0
- package/src/navigation-shell-slot-renderer-registry.ts +94 -0
- package/src/navigation.ts +364 -0
- package/src/object-path.ts +99 -0
- package/src/page-host-renderer-registry.ts +615 -0
- package/src/presentation-action-endpoint-request-projection.ts +223 -0
- package/src/presentation-action-endpoint.ts +130 -0
- package/src/presentation-action-icons.ts +3 -0
- package/src/presentation-action-result-state.ts +189 -0
- package/src/presentation-action-runtime-binding.ts +177 -0
- package/src/presentation-action-runtime-diagnostics.ts +120 -0
- package/src/presentation-action-runtime-labels.ts +57 -0
- package/src/presentation-action-runtime-projection.ts +67 -0
- package/src/presentation-badge-resolution.ts +138 -0
- package/src/presentation-collection-pagination.ts +436 -0
- package/src/presentation-content-diagnostics.ts +121 -0
- package/src/presentation-content-resolution.ts +46 -0
- package/src/presentation-data-source-binding-model.ts +140 -0
- package/src/presentation-data-source-runtime.ts +190 -0
- package/src/presentation-design-intent-diagnostics.ts +104 -0
- package/src/presentation-icon-diagnostics.ts +368 -0
- package/src/presentation-icon-registry.ts +181 -0
- package/src/presentation-navigation-action-runtime-bindings.ts +54 -0
- package/src/presentation-pagination.ts +694 -0
- package/src/presentation-projection-coverage.ts +3257 -0
- package/src/presentation-projection-diagnostics.ts +71 -0
- package/src/presentation-projection-trace.ts +293 -0
- package/src/presentation-query-form-state.ts +54 -0
- package/src/presentation-renderer-registry.ts +269 -0
- package/src/presentation-semantics.ts +1028 -0
- package/src/presentation-standards.ts +14 -0
- package/src/presentation-test-selectors.ts +312 -0
- package/src/presentation-value-formatting.ts +65 -0
- package/src/presentation-value-resolution.ts +100 -0
- package/src/presentation-view-tree.ts +33 -0
- package/src/process-task-model.ts +158 -0
- package/src/process-task-projection.ts +398 -0
- package/src/projected-action-status-projection.ts +43 -0
- package/src/projected-activity-state-model.ts +123 -0
- package/src/projected-collection-action-runtime-bindings.ts +76 -0
- package/src/projected-collection-action-runtime-diagnostics.ts +289 -0
- package/src/projected-collection-runtime.ts +1772 -0
- package/src/projected-document-action-diagnostics.ts +196 -0
- package/src/projected-document-action-enablements.ts +99 -0
- package/src/projected-document-action-projection.ts +464 -0
- package/src/projected-document-action-runtime-profile-diagnostics.ts +250 -0
- package/src/projected-document-action-runtime-profile.ts +133 -0
- package/src/projected-document-action-status-notice-diagnostics.ts +116 -0
- package/src/projected-document-badge-formatting.ts +7 -0
- package/src/projected-document-editor-model.ts +7 -0
- package/src/projected-document-field-navigation.ts +300 -0
- package/src/projected-document-field-semantics.ts +27 -0
- package/src/projected-document-workspace-data-source-bindings.ts +182 -0
- package/src/projected-document-workspace-notice-diagnostics.ts +41 -0
- package/src/projected-input-form-runtime.ts +86 -0
- package/src/projected-process-task-notice-diagnostics.ts +283 -0
- package/src/projected-query-form-runtime.ts +62 -0
- package/src/prompt-document-preview-projection.ts +345 -0
- package/src/prompt-icons.ts +3 -0
- package/src/prompt-status-message-resolution.ts +158 -0
- package/src/query-form-lowering.ts +77 -0
- package/src/query-form-url-state.ts +346 -0
- package/src/query-offset-page.ts +50 -0
- package/src/relation-query-input-form-target.ts +61 -0
- package/src/scope-selection.ts +201 -0
- package/src/target-bindings.ts +123 -0
- package/src/view-chrome-content-diagnostics.ts +139 -0
- package/src/view-chrome-icons.ts +81 -0
- package/src/view-chrome-slot-renderer-registry.ts +128 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export type PresentationProjectionDiagnosticSeverity = 'error' | 'info' | 'warning'
|
|
2
|
+
|
|
3
|
+
export type PresentationProjectionDiagnosticCategory =
|
|
4
|
+
| 'escape-hatch'
|
|
5
|
+
| 'incomplete-projection'
|
|
6
|
+
| 'local-interpretation'
|
|
7
|
+
| 'missing-binding'
|
|
8
|
+
| 'missing-definition'
|
|
9
|
+
| 'unsupported'
|
|
10
|
+
| 'unbound'
|
|
11
|
+
|
|
12
|
+
export type PresentationProjectionInterpretationStatus =
|
|
13
|
+
| 'bound'
|
|
14
|
+
| 'escape-hatch'
|
|
15
|
+
| 'locally-interpreted'
|
|
16
|
+
| 'projected'
|
|
17
|
+
| 'unbound'
|
|
18
|
+
| 'unsupported'
|
|
19
|
+
|
|
20
|
+
/** Stable reference to the IR element or frontend binding that produced a diagnostic. */
|
|
21
|
+
export interface PresentationProjectionDiagnosticSubject {
|
|
22
|
+
readonly id: string
|
|
23
|
+
readonly kind: string
|
|
24
|
+
readonly name?: string | null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Projection/interpreter boundary that produced a diagnostic. */
|
|
28
|
+
export interface PresentationProjectionInterpretation {
|
|
29
|
+
readonly status: PresentationProjectionInterpretationStatus
|
|
30
|
+
readonly target: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Structured TODO emitted by projection interpreters when a backend-declared
|
|
35
|
+
* construct cannot yet be fully interpreted by the frontend.
|
|
36
|
+
*/
|
|
37
|
+
export interface PresentationProjectionDiagnostic {
|
|
38
|
+
readonly category?: PresentationProjectionDiagnosticCategory
|
|
39
|
+
readonly details?: Readonly<Record<string, unknown>>
|
|
40
|
+
readonly id: string
|
|
41
|
+
readonly interpretation?: PresentationProjectionInterpretation
|
|
42
|
+
readonly message: string
|
|
43
|
+
readonly severity: PresentationProjectionDiagnosticSeverity
|
|
44
|
+
readonly source: string
|
|
45
|
+
readonly subject?: PresentationProjectionDiagnosticSubject
|
|
46
|
+
readonly suggestedNextStep?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function createPresentationProjectionDiagnostic(
|
|
50
|
+
diagnostic: PresentationProjectionDiagnostic,
|
|
51
|
+
): PresentationProjectionDiagnostic {
|
|
52
|
+
return diagnostic
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Collapses diagnostic streams from independent projection interpreters. */
|
|
56
|
+
export function mergePresentationProjectionDiagnostics(
|
|
57
|
+
...groups: readonly (readonly PresentationProjectionDiagnostic[] | null | undefined)[]
|
|
58
|
+
): readonly PresentationProjectionDiagnostic[] {
|
|
59
|
+
const diagnostics = groups.flatMap((group) => group ?? [])
|
|
60
|
+
const seen = new Set<string>()
|
|
61
|
+
|
|
62
|
+
return diagnostics.filter((diagnostic) => {
|
|
63
|
+
const key = `${diagnostic.source}:${diagnostic.id}`
|
|
64
|
+
if (seen.has(key)) {
|
|
65
|
+
return false
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
seen.add(key)
|
|
69
|
+
return true
|
|
70
|
+
})
|
|
71
|
+
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NavigationRouteDefinition,
|
|
3
|
+
PageHostDefinition,
|
|
4
|
+
ViewDefinition,
|
|
5
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
6
|
+
import {
|
|
7
|
+
findNavigationRoute,
|
|
8
|
+
resolveNavigationRouteId,
|
|
9
|
+
type NavigationDefinitionProjection,
|
|
10
|
+
} from './navigation'
|
|
11
|
+
import {
|
|
12
|
+
getPresentationSurfaceDataSourceIds,
|
|
13
|
+
getPresentationSurfaceViewTree,
|
|
14
|
+
getPresentationViewProjectedActions,
|
|
15
|
+
getPresentationViewProjectedDataSourceIds,
|
|
16
|
+
getPresentationViewProjectedFieldIds,
|
|
17
|
+
getPresentationViewSemanticRole,
|
|
18
|
+
resolveNavigationTarget,
|
|
19
|
+
} from './presentation-semantics'
|
|
20
|
+
import { getRegionViewIds } from './presentation-view-tree'
|
|
21
|
+
|
|
22
|
+
export interface PresentationProjectionTraceModule {
|
|
23
|
+
readonly Views: readonly ViewDefinition[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CreatePresentationProjectionTraceOptions<
|
|
27
|
+
TModule extends PresentationProjectionTraceModule,
|
|
28
|
+
TRoute extends NavigationRouteDefinition = NavigationRouteDefinition,
|
|
29
|
+
TPageHost extends PageHostDefinition = PageHostDefinition,
|
|
30
|
+
> {
|
|
31
|
+
readonly componentSet?: string
|
|
32
|
+
readonly module: TModule | null
|
|
33
|
+
readonly navigation: NavigationDefinitionProjection<TRoute, TPageHost> | null
|
|
34
|
+
readonly pathname: string
|
|
35
|
+
readonly resolvePageHostRenderer?: PresentationProjectionTracePageHostRendererResolver<
|
|
36
|
+
TModule,
|
|
37
|
+
TRoute,
|
|
38
|
+
TPageHost
|
|
39
|
+
>
|
|
40
|
+
readonly resolveViewRenderer?: PresentationProjectionTraceViewRendererResolver<TModule>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PresentationProjectionTracePageHostRendererResolutionContext<
|
|
44
|
+
TModule extends PresentationProjectionTraceModule,
|
|
45
|
+
TRoute extends NavigationRouteDefinition,
|
|
46
|
+
TPageHost extends PageHostDefinition,
|
|
47
|
+
> {
|
|
48
|
+
readonly componentSet?: string
|
|
49
|
+
readonly module: TModule
|
|
50
|
+
readonly pageHost: TPageHost | null
|
|
51
|
+
readonly route: TRoute | null
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type PresentationProjectionTracePageHostRendererResolver<
|
|
55
|
+
TModule extends PresentationProjectionTraceModule,
|
|
56
|
+
TRoute extends NavigationRouteDefinition,
|
|
57
|
+
TPageHost extends PageHostDefinition,
|
|
58
|
+
> = (
|
|
59
|
+
context: PresentationProjectionTracePageHostRendererResolutionContext<
|
|
60
|
+
TModule,
|
|
61
|
+
TRoute,
|
|
62
|
+
TPageHost
|
|
63
|
+
>,
|
|
64
|
+
) => PresentationProjectionTracePageHostRenderer | null
|
|
65
|
+
|
|
66
|
+
export interface PresentationProjectionTraceViewRendererResolutionContext<
|
|
67
|
+
TModule extends PresentationProjectionTraceModule,
|
|
68
|
+
> {
|
|
69
|
+
readonly componentSet?: string
|
|
70
|
+
readonly module: TModule
|
|
71
|
+
readonly routeId: string | null
|
|
72
|
+
readonly view: ViewDefinition
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PresentationProjectionTraceViewRendererResolution {
|
|
76
|
+
readonly componentKey: string | null
|
|
77
|
+
readonly componentRole: string | null
|
|
78
|
+
readonly rendererResolved: boolean
|
|
79
|
+
readonly resolutionSource: string | null
|
|
80
|
+
readonly semanticRole?: string | null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type PresentationProjectionTraceViewRendererResolver<
|
|
84
|
+
TModule extends PresentationProjectionTraceModule,
|
|
85
|
+
> = (
|
|
86
|
+
context: PresentationProjectionTraceViewRendererResolutionContext<TModule>,
|
|
87
|
+
) => PresentationProjectionTraceViewRendererResolution | null
|
|
88
|
+
|
|
89
|
+
export interface PresentationProjectionTrace {
|
|
90
|
+
readonly dataSourceIds: readonly string[]
|
|
91
|
+
readonly moduleAvailable: boolean
|
|
92
|
+
readonly pageHost: PresentationProjectionTracePageHost | null
|
|
93
|
+
readonly pageHostRenderer: PresentationProjectionTracePageHostRenderer | null
|
|
94
|
+
readonly pathname: string
|
|
95
|
+
readonly route: PresentationProjectionTraceRoute | null
|
|
96
|
+
readonly surface: PresentationProjectionTraceSurface | null
|
|
97
|
+
readonly views: readonly PresentationProjectionTraceView[]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface PresentationProjectionTraceRoute {
|
|
101
|
+
readonly id: string
|
|
102
|
+
readonly label: string
|
|
103
|
+
readonly pageHostId: string
|
|
104
|
+
readonly pathTemplate: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface PresentationProjectionTracePageHost {
|
|
108
|
+
readonly documentProfileId: string | null
|
|
109
|
+
readonly id: string
|
|
110
|
+
readonly kind: string
|
|
111
|
+
readonly viewId: string | null
|
|
112
|
+
readonly workspaceId: string | null
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface PresentationProjectionTracePageHostRenderer {
|
|
116
|
+
readonly componentKey: string | null
|
|
117
|
+
readonly componentRole: string | null
|
|
118
|
+
readonly rendererKey: string | null
|
|
119
|
+
readonly resolutionSource: string | null
|
|
120
|
+
readonly semanticRole: string | null
|
|
121
|
+
readonly targetBindingSource: string | null
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface PresentationProjectionTraceSurface {
|
|
125
|
+
readonly id: string
|
|
126
|
+
readonly rootViewId: string | null
|
|
127
|
+
readonly workspaceId: string | null
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface PresentationProjectionTraceView {
|
|
131
|
+
readonly actionCount: number
|
|
132
|
+
readonly componentKey: string | null
|
|
133
|
+
readonly componentRole: string | null
|
|
134
|
+
readonly dataSourceIds: readonly string[]
|
|
135
|
+
readonly fieldIds: readonly string[]
|
|
136
|
+
readonly id: string
|
|
137
|
+
readonly kind: string
|
|
138
|
+
readonly name: string
|
|
139
|
+
readonly regions: readonly PresentationProjectionTraceRegion[]
|
|
140
|
+
readonly rendererResolved: boolean
|
|
141
|
+
readonly resolutionSource: string | null
|
|
142
|
+
readonly semanticRole: string
|
|
143
|
+
readonly subjectDataSourceId: string | null
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface PresentationProjectionTraceRegion {
|
|
147
|
+
readonly dataSourceIds: readonly string[]
|
|
148
|
+
readonly id: string
|
|
149
|
+
readonly viewIds: readonly string[]
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Builds a read-only trace of route, page-host, surface, view, and renderer
|
|
154
|
+
* resolution. Framework adapters can supply renderer resolver functions; the
|
|
155
|
+
* trace model itself remains pure presentation IR/runtime state.
|
|
156
|
+
*/
|
|
157
|
+
export function createPresentationProjectionTrace<
|
|
158
|
+
TModule extends PresentationProjectionTraceModule,
|
|
159
|
+
TRoute extends NavigationRouteDefinition = NavigationRouteDefinition,
|
|
160
|
+
TPageHost extends PageHostDefinition = PageHostDefinition,
|
|
161
|
+
>({
|
|
162
|
+
componentSet,
|
|
163
|
+
module,
|
|
164
|
+
navigation,
|
|
165
|
+
pathname,
|
|
166
|
+
resolvePageHostRenderer,
|
|
167
|
+
resolveViewRenderer,
|
|
168
|
+
}: CreatePresentationProjectionTraceOptions<
|
|
169
|
+
TModule,
|
|
170
|
+
TRoute,
|
|
171
|
+
TPageHost
|
|
172
|
+
>): PresentationProjectionTrace {
|
|
173
|
+
const routeId = resolveNavigationRouteId(navigation, pathname)
|
|
174
|
+
const route = navigation && routeId
|
|
175
|
+
? findNavigationRoute<TRoute>(navigation, routeId)
|
|
176
|
+
: null
|
|
177
|
+
const navigationTarget = navigation && route
|
|
178
|
+
? resolveNavigationTarget<
|
|
179
|
+
NavigationDefinitionProjection<TRoute, TPageHost>,
|
|
180
|
+
TRoute,
|
|
181
|
+
TPageHost
|
|
182
|
+
>(navigation, route)
|
|
183
|
+
: null
|
|
184
|
+
const pageHost = navigationTarget?.pageHost ?? null
|
|
185
|
+
const rootViewId = pageHost?.View?.ViewId ?? null
|
|
186
|
+
const rootView = module && rootViewId
|
|
187
|
+
? module.Views.find((view) => view.Id === rootViewId) ?? null
|
|
188
|
+
: null
|
|
189
|
+
const surface = pageHost
|
|
190
|
+
? {
|
|
191
|
+
id: pageHost.Id,
|
|
192
|
+
rootView,
|
|
193
|
+
rootViewId,
|
|
194
|
+
workspaceRef: pageHost.Workspace,
|
|
195
|
+
}
|
|
196
|
+
: null
|
|
197
|
+
const viewTree = module
|
|
198
|
+
? getPresentationSurfaceViewTree(module, { rootView })
|
|
199
|
+
: []
|
|
200
|
+
const pageHostRenderer = module && resolvePageHostRenderer
|
|
201
|
+
? resolvePageHostRenderer({
|
|
202
|
+
componentSet,
|
|
203
|
+
module,
|
|
204
|
+
pageHost,
|
|
205
|
+
route,
|
|
206
|
+
})
|
|
207
|
+
: null
|
|
208
|
+
|
|
209
|
+
return {
|
|
210
|
+
dataSourceIds: module
|
|
211
|
+
? getPresentationSurfaceDataSourceIds(module, { rootView })
|
|
212
|
+
: [],
|
|
213
|
+
moduleAvailable: Boolean(module),
|
|
214
|
+
pageHost: pageHost
|
|
215
|
+
? {
|
|
216
|
+
documentProfileId: pageHost.Workspace?.DocumentProfileId ?? null,
|
|
217
|
+
id: pageHost.Id,
|
|
218
|
+
kind: String(pageHost.Kind),
|
|
219
|
+
viewId: rootViewId,
|
|
220
|
+
workspaceId: pageHost.Workspace?.WorkspaceId ?? null,
|
|
221
|
+
}
|
|
222
|
+
: null,
|
|
223
|
+
pageHostRenderer,
|
|
224
|
+
pathname,
|
|
225
|
+
route: route
|
|
226
|
+
? {
|
|
227
|
+
id: route.Id,
|
|
228
|
+
label: route.Label,
|
|
229
|
+
pageHostId: route.PageHostId,
|
|
230
|
+
pathTemplate: route.PathTemplate,
|
|
231
|
+
}
|
|
232
|
+
: null,
|
|
233
|
+
surface: surface
|
|
234
|
+
? {
|
|
235
|
+
id: surface.id,
|
|
236
|
+
rootViewId: surface.rootViewId,
|
|
237
|
+
workspaceId: surface.workspaceRef?.WorkspaceId ?? null,
|
|
238
|
+
}
|
|
239
|
+
: null,
|
|
240
|
+
views: module
|
|
241
|
+
? viewTree.map((view) =>
|
|
242
|
+
createViewTrace({
|
|
243
|
+
componentSet,
|
|
244
|
+
module,
|
|
245
|
+
resolveViewRenderer,
|
|
246
|
+
routeId: route?.Id ?? null,
|
|
247
|
+
view,
|
|
248
|
+
}),
|
|
249
|
+
)
|
|
250
|
+
: [],
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function createViewTrace<TModule extends PresentationProjectionTraceModule>({
|
|
255
|
+
componentSet,
|
|
256
|
+
module,
|
|
257
|
+
resolveViewRenderer,
|
|
258
|
+
routeId,
|
|
259
|
+
view,
|
|
260
|
+
}: {
|
|
261
|
+
readonly componentSet?: string
|
|
262
|
+
readonly module: TModule
|
|
263
|
+
readonly resolveViewRenderer?: PresentationProjectionTraceViewRendererResolver<TModule>
|
|
264
|
+
readonly routeId: string | null
|
|
265
|
+
readonly view: ViewDefinition
|
|
266
|
+
}): PresentationProjectionTraceView {
|
|
267
|
+
const resolution = resolveViewRenderer?.({
|
|
268
|
+
componentSet,
|
|
269
|
+
module,
|
|
270
|
+
routeId,
|
|
271
|
+
view,
|
|
272
|
+
}) ?? null
|
|
273
|
+
|
|
274
|
+
return {
|
|
275
|
+
actionCount: getPresentationViewProjectedActions(view).length,
|
|
276
|
+
componentKey: resolution?.componentKey ?? null,
|
|
277
|
+
componentRole: resolution?.componentRole ?? null,
|
|
278
|
+
dataSourceIds: getPresentationViewProjectedDataSourceIds(view),
|
|
279
|
+
fieldIds: getPresentationViewProjectedFieldIds(view),
|
|
280
|
+
id: view.Id,
|
|
281
|
+
kind: String(view.Kind),
|
|
282
|
+
name: view.Name,
|
|
283
|
+
regions: view.Regions.map((region) => ({
|
|
284
|
+
dataSourceIds: region.DataSourceIds,
|
|
285
|
+
id: region.Id,
|
|
286
|
+
viewIds: getRegionViewIds(region),
|
|
287
|
+
})),
|
|
288
|
+
rendererResolved: Boolean(resolution?.rendererResolved),
|
|
289
|
+
resolutionSource: resolution?.resolutionSource ?? null,
|
|
290
|
+
semanticRole: resolution?.semanticRole ?? getPresentationViewSemanticRole(view),
|
|
291
|
+
subjectDataSourceId: view.Subject.DataSourceId ?? null,
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { QueryFormDefinition } from './module'
|
|
2
|
+
|
|
3
|
+
export interface PresentationQueryFormState<TValue = unknown> {
|
|
4
|
+
readonly appliedValue: TValue
|
|
5
|
+
readonly draftValue: TValue
|
|
6
|
+
readonly queryForm: QueryFormDefinition
|
|
7
|
+
readonly queryFormId: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type PresentationQueryFormStateMap = Readonly<
|
|
11
|
+
Record<string, PresentationQueryFormState>
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
export interface PresentationQueryFormStateContext {
|
|
15
|
+
readonly queryFormStates?: PresentationQueryFormStateMap
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function readPresentationQueryFormDraftValue<TValue = unknown>(
|
|
19
|
+
context: PresentationQueryFormStateContext,
|
|
20
|
+
dataSourceId: string,
|
|
21
|
+
): TValue | undefined {
|
|
22
|
+
return findPresentationQueryFormStateForDataSource(context, dataSourceId, 'draft')
|
|
23
|
+
?.draftValue as TValue | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function readPresentationQueryFormAppliedValue<TValue = unknown>(
|
|
27
|
+
context: PresentationQueryFormStateContext,
|
|
28
|
+
dataSourceId: string,
|
|
29
|
+
): TValue | undefined {
|
|
30
|
+
return findPresentationQueryFormStateForDataSource(context, dataSourceId, 'applied')
|
|
31
|
+
?.appliedValue as TValue | undefined
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function findPresentationQueryFormStateForDataSource(
|
|
35
|
+
{ queryFormStates = {} }: PresentationQueryFormStateContext,
|
|
36
|
+
dataSourceId: string,
|
|
37
|
+
phase: 'applied' | 'draft',
|
|
38
|
+
) {
|
|
39
|
+
return Object.values(queryFormStates).find((state) =>
|
|
40
|
+
phase === 'draft'
|
|
41
|
+
? state.queryForm.Target.State.DraftDataSourceId === dataSourceId
|
|
42
|
+
: isAppliedQueryFormDataSource(state.queryForm, dataSourceId),
|
|
43
|
+
) ?? null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function isAppliedQueryFormDataSource(
|
|
47
|
+
queryForm: QueryFormDefinition,
|
|
48
|
+
dataSourceId: string,
|
|
49
|
+
) {
|
|
50
|
+
const state = queryForm.Target.State
|
|
51
|
+
return state.AppliedDataSourceId === dataSourceId ||
|
|
52
|
+
state.ResultDataSourceId === dataSourceId ||
|
|
53
|
+
state.SynchronizedDataSourceIds.includes(dataSourceId)
|
|
54
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import {
|
|
2
|
+
presentationBindingKinds,
|
|
3
|
+
type PresentationBindingDefinition,
|
|
4
|
+
type ViewDefinition,
|
|
5
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
6
|
+
import { getPresentationViewSemanticRole } from './presentation-semantics'
|
|
7
|
+
import {
|
|
8
|
+
createPresentationEnumDiscriminator,
|
|
9
|
+
resolvePresentationComponentBinding,
|
|
10
|
+
type PresentationEnumDiscriminator,
|
|
11
|
+
} from './target-bindings'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Registry for composite view renderers, keyed by progressively more semantic
|
|
15
|
+
* matching strategies. Resolution prefers semantic roles and view kinds before
|
|
16
|
+
* using component bindings as an explicit escape hatch.
|
|
17
|
+
*/
|
|
18
|
+
export interface PresentationCompositeRendererRegistry<TRenderer = unknown> {
|
|
19
|
+
/** Renderers keyed by semantic component roles resolved from target bindings. */
|
|
20
|
+
readonly byComponentRole?: Readonly<Record<string, TRenderer>>
|
|
21
|
+
|
|
22
|
+
/** Renderers keyed by concrete component keys resolved from target bindings. */
|
|
23
|
+
readonly byComponentKey?: Readonly<Record<string, TRenderer>>
|
|
24
|
+
|
|
25
|
+
/** Renderers keyed by semantic view role. */
|
|
26
|
+
readonly bySemanticRole?: Readonly<Record<string, TRenderer>>
|
|
27
|
+
|
|
28
|
+
/** Renderers keyed by generated view kind discriminator values. */
|
|
29
|
+
readonly byViewKind?: Readonly<Record<string, TRenderer>>
|
|
30
|
+
|
|
31
|
+
/** Renderer used when no key, role, or kind-specific renderer matches. */
|
|
32
|
+
readonly fallback?: TRenderer
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Complete renderer registry used by presentation projection runtimes. The
|
|
37
|
+
* renderer values are intentionally generic so core can resolve semantic
|
|
38
|
+
* bindings without depending on React, DOM, or any other adapter runtime.
|
|
39
|
+
*/
|
|
40
|
+
export interface PresentationRendererRegistry<
|
|
41
|
+
TViewRenderer = unknown,
|
|
42
|
+
TControlRenderer = unknown,
|
|
43
|
+
TValueRenderer = unknown,
|
|
44
|
+
> {
|
|
45
|
+
/** Composite renderers that adapt whole semantic views. */
|
|
46
|
+
readonly composites?: PresentationCompositeRendererRegistry<TViewRenderer>
|
|
47
|
+
|
|
48
|
+
/** Control renderers keyed by presentation control ids or component keys. */
|
|
49
|
+
readonly controls?: Readonly<Record<string, TControlRenderer>>
|
|
50
|
+
|
|
51
|
+
/** Value renderers keyed by semantic value or field renderer ids. */
|
|
52
|
+
readonly values?: Readonly<Record<string, TValueRenderer>>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Minimal module projection needed to resolve component bindings without
|
|
57
|
+
* coupling renderer resolution to a full generated presentation module shape.
|
|
58
|
+
*/
|
|
59
|
+
export interface PresentationRendererBindingModuleProjection {
|
|
60
|
+
/** Binding targets declared by the presentation module. */
|
|
61
|
+
readonly Targets: readonly {
|
|
62
|
+
/** Bindings declared for this target. */
|
|
63
|
+
readonly Bindings: readonly PresentationBindingDefinition[]
|
|
64
|
+
|
|
65
|
+
/** Optional component set that scopes concrete component keys. */
|
|
66
|
+
readonly ComponentSet?: string | null
|
|
67
|
+
|
|
68
|
+
/** Target discriminator value, such as the generated React target kind. */
|
|
69
|
+
readonly Target: string | number
|
|
70
|
+
}[]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Combines renderer registries in declaration order, with later registries
|
|
75
|
+
* overriding earlier renderer keys and fallback renderers.
|
|
76
|
+
*/
|
|
77
|
+
export function mergePresentationRendererRegistries<
|
|
78
|
+
TViewRenderer = unknown,
|
|
79
|
+
TControlRenderer = unknown,
|
|
80
|
+
TValueRenderer = unknown,
|
|
81
|
+
>(
|
|
82
|
+
...registries: readonly PresentationRendererRegistry<
|
|
83
|
+
TViewRenderer,
|
|
84
|
+
TControlRenderer,
|
|
85
|
+
TValueRenderer
|
|
86
|
+
>[]
|
|
87
|
+
): PresentationRendererRegistry<TViewRenderer, TControlRenderer, TValueRenderer> {
|
|
88
|
+
return {
|
|
89
|
+
composites: {
|
|
90
|
+
byComponentRole: mergeRecord(
|
|
91
|
+
registries.map((registry) => registry.composites?.byComponentRole),
|
|
92
|
+
),
|
|
93
|
+
byComponentKey: mergeRecord(
|
|
94
|
+
registries.map((registry) => registry.composites?.byComponentKey),
|
|
95
|
+
),
|
|
96
|
+
bySemanticRole: mergeRecord(
|
|
97
|
+
registries.map((registry) => registry.composites?.bySemanticRole),
|
|
98
|
+
),
|
|
99
|
+
byViewKind: mergeRecord(
|
|
100
|
+
registries.map((registry) => registry.composites?.byViewKind),
|
|
101
|
+
),
|
|
102
|
+
fallback: registries.reduce<TViewRenderer | undefined>(
|
|
103
|
+
(fallback, registry) => registry.composites?.fallback ?? fallback,
|
|
104
|
+
undefined,
|
|
105
|
+
),
|
|
106
|
+
},
|
|
107
|
+
controls: mergeRecord(registries.map((registry) => registry.controls)),
|
|
108
|
+
values: mergeRecord(registries.map((registry) => registry.values)),
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Strategy that selected a renderer for a presentation view.
|
|
114
|
+
*/
|
|
115
|
+
export type PresentationViewRendererResolutionSource =
|
|
116
|
+
| 'component-key'
|
|
117
|
+
| 'component-role'
|
|
118
|
+
| 'fallback'
|
|
119
|
+
| 'semantic-role'
|
|
120
|
+
| 'view-kind'
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Result of resolving a concrete renderer for a semantic presentation view.
|
|
124
|
+
*/
|
|
125
|
+
export interface PresentationViewRendererResolution<TRenderer = unknown> {
|
|
126
|
+
/** Component key resolved from target bindings, when one matched. */
|
|
127
|
+
readonly componentKey: string | null
|
|
128
|
+
|
|
129
|
+
/** Component role resolved from target bindings, when one matched. */
|
|
130
|
+
readonly componentRole: string | null
|
|
131
|
+
|
|
132
|
+
/** Renderer selected from the registry, or null when no renderer matched. */
|
|
133
|
+
readonly renderer: TRenderer | null
|
|
134
|
+
|
|
135
|
+
/** Resolution strategy that selected the renderer, or null when unresolved. */
|
|
136
|
+
readonly resolutionSource: PresentationViewRendererResolutionSource | null
|
|
137
|
+
|
|
138
|
+
/** Semantic role derived from the view definition and available to diagnostics. */
|
|
139
|
+
readonly semanticRole: string
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface ResolvePresentationViewRendererOptions<
|
|
143
|
+
TRenderer,
|
|
144
|
+
TModule extends PresentationRendererBindingModuleProjection =
|
|
145
|
+
PresentationRendererBindingModuleProjection,
|
|
146
|
+
> {
|
|
147
|
+
readonly componentSet?: string | null
|
|
148
|
+
readonly module: TModule
|
|
149
|
+
readonly registry: PresentationRendererRegistry<TRenderer>
|
|
150
|
+
readonly routeId?: string | null
|
|
151
|
+
readonly targetKind?: PresentationEnumDiscriminator | null
|
|
152
|
+
readonly view: ViewDefinition
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Resolves the renderer for a semantic view by consulting semantic role and
|
|
157
|
+
* view kind first. Component bindings remain available as an explicit escape
|
|
158
|
+
* hatch for views that cannot yet be interpreted from the IR shape alone.
|
|
159
|
+
*/
|
|
160
|
+
export function resolvePresentationViewRenderer<
|
|
161
|
+
TRenderer,
|
|
162
|
+
TModule extends PresentationRendererBindingModuleProjection =
|
|
163
|
+
PresentationRendererBindingModuleProjection,
|
|
164
|
+
>({
|
|
165
|
+
componentSet,
|
|
166
|
+
module,
|
|
167
|
+
registry,
|
|
168
|
+
routeId,
|
|
169
|
+
targetKind,
|
|
170
|
+
view,
|
|
171
|
+
}: ResolvePresentationViewRendererOptions<
|
|
172
|
+
TRenderer,
|
|
173
|
+
TModule
|
|
174
|
+
>): PresentationViewRendererResolution<TRenderer> {
|
|
175
|
+
const componentBinding = resolvePresentationComponentBinding(module, {
|
|
176
|
+
bindingKind: createPresentationEnumDiscriminator(
|
|
177
|
+
presentationBindingKinds,
|
|
178
|
+
'viewComponent',
|
|
179
|
+
'ViewComponent',
|
|
180
|
+
),
|
|
181
|
+
componentSet,
|
|
182
|
+
id: view.Id,
|
|
183
|
+
routeId,
|
|
184
|
+
targetKind,
|
|
185
|
+
})
|
|
186
|
+
const componentKey = componentBinding.componentKey
|
|
187
|
+
const componentRole = componentBinding.componentRole
|
|
188
|
+
const composites = registry.composites
|
|
189
|
+
const semanticRole = getPresentationViewSemanticRole(view)
|
|
190
|
+
|
|
191
|
+
const semanticRoleRenderer = composites?.bySemanticRole?.[semanticRole]
|
|
192
|
+
if (semanticRoleRenderer !== undefined && semanticRoleRenderer !== null) {
|
|
193
|
+
return {
|
|
194
|
+
componentKey,
|
|
195
|
+
componentRole,
|
|
196
|
+
renderer: semanticRoleRenderer,
|
|
197
|
+
resolutionSource: 'semantic-role',
|
|
198
|
+
semanticRole,
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const viewKindRenderer = composites?.byViewKind?.[String(view.Kind)]
|
|
203
|
+
if (viewKindRenderer !== undefined && viewKindRenderer !== null) {
|
|
204
|
+
return {
|
|
205
|
+
componentKey,
|
|
206
|
+
componentRole,
|
|
207
|
+
renderer: viewKindRenderer,
|
|
208
|
+
resolutionSource: 'view-kind',
|
|
209
|
+
semanticRole,
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (componentRole) {
|
|
214
|
+
const renderer = composites?.byComponentRole?.[componentRole]
|
|
215
|
+
if (renderer !== undefined && renderer !== null) {
|
|
216
|
+
return {
|
|
217
|
+
componentKey,
|
|
218
|
+
componentRole,
|
|
219
|
+
renderer,
|
|
220
|
+
resolutionSource: 'component-role',
|
|
221
|
+
semanticRole,
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (componentKey) {
|
|
227
|
+
const renderer = composites?.byComponentKey?.[componentKey]
|
|
228
|
+
if (renderer !== undefined && renderer !== null) {
|
|
229
|
+
return {
|
|
230
|
+
componentKey,
|
|
231
|
+
componentRole,
|
|
232
|
+
renderer,
|
|
233
|
+
resolutionSource: 'component-key',
|
|
234
|
+
semanticRole,
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (composites?.fallback !== undefined && composites.fallback !== null) {
|
|
240
|
+
return {
|
|
241
|
+
componentKey,
|
|
242
|
+
componentRole,
|
|
243
|
+
renderer: composites.fallback,
|
|
244
|
+
resolutionSource: 'fallback',
|
|
245
|
+
semanticRole,
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return {
|
|
250
|
+
componentKey,
|
|
251
|
+
componentRole,
|
|
252
|
+
renderer: null,
|
|
253
|
+
resolutionSource: null,
|
|
254
|
+
semanticRole,
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function mergeRecord<TValue>(
|
|
259
|
+
records: readonly (Readonly<Record<string, TValue>> | undefined)[],
|
|
260
|
+
) {
|
|
261
|
+
const merged: Record<string, TValue> = {}
|
|
262
|
+
for (const record of records) {
|
|
263
|
+
if (record) {
|
|
264
|
+
Object.assign(merged, record)
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return merged
|
|
269
|
+
}
|