@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,368 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultPresentationComponentSet,
|
|
3
|
+
resolvePresentationIcon,
|
|
4
|
+
type PresentationIconModuleProjection,
|
|
5
|
+
type PresentationIconRegistry,
|
|
6
|
+
} from './presentation-icon-registry'
|
|
7
|
+
import {
|
|
8
|
+
createPresentationProjectionDiagnostic,
|
|
9
|
+
type PresentationProjectionDiagnostic,
|
|
10
|
+
} from './presentation-projection-diagnostics'
|
|
11
|
+
|
|
12
|
+
export interface PresentationActionIconPlacement {
|
|
13
|
+
readonly ActionId: string
|
|
14
|
+
readonly Icon?: string | null
|
|
15
|
+
readonly Label?: string | null
|
|
16
|
+
readonly Region?: string | null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface PresentationIconDiagnosticSubject {
|
|
20
|
+
readonly details?: Readonly<Record<string, unknown>>
|
|
21
|
+
readonly icon: string | null | undefined
|
|
22
|
+
readonly id: string
|
|
23
|
+
readonly kind: string
|
|
24
|
+
readonly label?: string | null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ProjectPresentationIconDiagnosticsOptions<
|
|
28
|
+
TSubject extends PresentationIconDiagnosticSubject,
|
|
29
|
+
> {
|
|
30
|
+
readonly componentSet?: string
|
|
31
|
+
readonly icons: readonly TSubject[]
|
|
32
|
+
readonly module?: PresentationIconModuleProjection | null
|
|
33
|
+
readonly registry?: PresentationIconRegistry<TSubject> | null
|
|
34
|
+
readonly source: string
|
|
35
|
+
readonly surfaceId?: string | null
|
|
36
|
+
readonly surfaceName?: string | null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ProjectPresentationActionIconDiagnosticsOptions<
|
|
40
|
+
TPlacement extends PresentationActionIconPlacement,
|
|
41
|
+
> {
|
|
42
|
+
readonly actionPlacements: readonly TPlacement[]
|
|
43
|
+
readonly componentSet?: string
|
|
44
|
+
readonly module?: PresentationIconModuleProjection | null
|
|
45
|
+
readonly registry?: PresentationIconRegistry<TPlacement> | null
|
|
46
|
+
readonly source: string
|
|
47
|
+
readonly surfaceId?: string | null
|
|
48
|
+
readonly surfaceName?: string | null
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Reports arbitrary semantic icon ids that are not fully interpreted by the
|
|
53
|
+
* frontend icon target.
|
|
54
|
+
*/
|
|
55
|
+
export function projectPresentationIconDiagnostics<
|
|
56
|
+
TSubject extends PresentationIconDiagnosticSubject,
|
|
57
|
+
>({
|
|
58
|
+
componentSet = defaultPresentationComponentSet,
|
|
59
|
+
icons,
|
|
60
|
+
module,
|
|
61
|
+
registry,
|
|
62
|
+
source,
|
|
63
|
+
surfaceId,
|
|
64
|
+
surfaceName,
|
|
65
|
+
}: ProjectPresentationIconDiagnosticsOptions<TSubject>): readonly PresentationProjectionDiagnostic[] {
|
|
66
|
+
return icons.flatMap((subject) => {
|
|
67
|
+
const icon = subject.icon
|
|
68
|
+
if (!icon) {
|
|
69
|
+
return []
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const resolution = resolvePresentationIcon({
|
|
73
|
+
componentSet,
|
|
74
|
+
icon,
|
|
75
|
+
module,
|
|
76
|
+
registry,
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
if (!resolution.renderer) {
|
|
80
|
+
return [
|
|
81
|
+
createGenericIconDiagnostic({
|
|
82
|
+
details: {
|
|
83
|
+
componentKey: resolution.componentKey,
|
|
84
|
+
componentRole: resolution.componentRole,
|
|
85
|
+
icon,
|
|
86
|
+
surfaceId,
|
|
87
|
+
...subject.details,
|
|
88
|
+
},
|
|
89
|
+
icon,
|
|
90
|
+
message:
|
|
91
|
+
`${formatIconSubject(subject)} declares icon '${icon}', ` +
|
|
92
|
+
'but the frontend icon registry has no renderer for it.',
|
|
93
|
+
reason: 'missing-icon-renderer',
|
|
94
|
+
severity: 'warning',
|
|
95
|
+
source,
|
|
96
|
+
status: 'unbound',
|
|
97
|
+
subject,
|
|
98
|
+
surfaceName,
|
|
99
|
+
target: 'presentation-icon-registry',
|
|
100
|
+
}),
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (resolution.targetBindingSource) {
|
|
105
|
+
if (resolution.resolutionSource === 'icon-key') {
|
|
106
|
+
return [
|
|
107
|
+
createGenericIconDiagnostic({
|
|
108
|
+
details: {
|
|
109
|
+
componentKey: resolution.componentKey,
|
|
110
|
+
componentRole: resolution.componentRole,
|
|
111
|
+
icon,
|
|
112
|
+
surfaceId,
|
|
113
|
+
...subject.details,
|
|
114
|
+
},
|
|
115
|
+
icon,
|
|
116
|
+
message:
|
|
117
|
+
`${formatIconSubject(subject)} declares icon '${icon}', ` +
|
|
118
|
+
'but its target binding was not resolved by the frontend icon registry; raw icon-key fallback was used.',
|
|
119
|
+
reason: 'icon-target-binding-fallback',
|
|
120
|
+
severity: 'warning',
|
|
121
|
+
source,
|
|
122
|
+
status: 'locally-interpreted',
|
|
123
|
+
subject,
|
|
124
|
+
surfaceName,
|
|
125
|
+
target: 'presentation-icon-target-binding',
|
|
126
|
+
}),
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return []
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return [
|
|
134
|
+
createGenericIconDiagnostic({
|
|
135
|
+
details: {
|
|
136
|
+
icon,
|
|
137
|
+
surfaceId,
|
|
138
|
+
...subject.details,
|
|
139
|
+
},
|
|
140
|
+
icon,
|
|
141
|
+
message:
|
|
142
|
+
`${formatIconSubject(subject)} declares icon '${icon}', ` +
|
|
143
|
+
'but no presentation icon target binding was found; raw icon-key fallback was used.',
|
|
144
|
+
reason: 'missing-icon-target-binding',
|
|
145
|
+
severity: 'info',
|
|
146
|
+
source,
|
|
147
|
+
status: 'locally-interpreted',
|
|
148
|
+
subject,
|
|
149
|
+
surfaceName,
|
|
150
|
+
target: 'presentation-icon-target-binding',
|
|
151
|
+
}),
|
|
152
|
+
]
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Reports action icon placements that are not fully interpreted by the
|
|
158
|
+
* frontend icon target. The UI can still render through raw icon-key fallback,
|
|
159
|
+
* but this keeps IR target-binding coverage visible in the developer toolbar.
|
|
160
|
+
*/
|
|
161
|
+
export function projectPresentationActionIconDiagnostics<
|
|
162
|
+
TPlacement extends PresentationActionIconPlacement,
|
|
163
|
+
>({
|
|
164
|
+
actionPlacements,
|
|
165
|
+
componentSet = defaultPresentationComponentSet,
|
|
166
|
+
module,
|
|
167
|
+
registry,
|
|
168
|
+
source,
|
|
169
|
+
surfaceId,
|
|
170
|
+
surfaceName,
|
|
171
|
+
}: ProjectPresentationActionIconDiagnosticsOptions<TPlacement>): readonly PresentationProjectionDiagnostic[] {
|
|
172
|
+
return actionPlacements.flatMap((placement) => {
|
|
173
|
+
const icon = placement.Icon
|
|
174
|
+
if (!icon) {
|
|
175
|
+
return []
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const resolution = resolvePresentationIcon({
|
|
179
|
+
componentSet,
|
|
180
|
+
icon,
|
|
181
|
+
module,
|
|
182
|
+
registry,
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
if (!resolution.renderer) {
|
|
186
|
+
return [
|
|
187
|
+
createIconDiagnostic({
|
|
188
|
+
details: {
|
|
189
|
+
componentKey: resolution.componentKey,
|
|
190
|
+
componentRole: resolution.componentRole,
|
|
191
|
+
icon,
|
|
192
|
+
region: placement.Region,
|
|
193
|
+
surfaceId,
|
|
194
|
+
},
|
|
195
|
+
icon,
|
|
196
|
+
message:
|
|
197
|
+
`Action '${formatActionPlacement(placement)}' declares icon '${icon}', ` +
|
|
198
|
+
'but the frontend icon registry has no renderer for it.',
|
|
199
|
+
placement,
|
|
200
|
+
reason: 'missing-icon-renderer',
|
|
201
|
+
severity: 'warning',
|
|
202
|
+
source,
|
|
203
|
+
status: 'unbound',
|
|
204
|
+
surfaceName,
|
|
205
|
+
target: 'presentation-icon-registry',
|
|
206
|
+
}),
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (resolution.targetBindingSource) {
|
|
211
|
+
if (resolution.resolutionSource === 'icon-key') {
|
|
212
|
+
return [
|
|
213
|
+
createIconDiagnostic({
|
|
214
|
+
details: {
|
|
215
|
+
componentKey: resolution.componentKey,
|
|
216
|
+
componentRole: resolution.componentRole,
|
|
217
|
+
icon,
|
|
218
|
+
region: placement.Region,
|
|
219
|
+
surfaceId,
|
|
220
|
+
},
|
|
221
|
+
icon,
|
|
222
|
+
message:
|
|
223
|
+
`Action '${formatActionPlacement(placement)}' declares icon '${icon}', ` +
|
|
224
|
+
'but its target binding was not resolved by the frontend icon registry; raw icon-key fallback was used.',
|
|
225
|
+
placement,
|
|
226
|
+
reason: 'icon-target-binding-fallback',
|
|
227
|
+
severity: 'warning',
|
|
228
|
+
source,
|
|
229
|
+
status: 'locally-interpreted',
|
|
230
|
+
surfaceName,
|
|
231
|
+
target: 'presentation-icon-target-binding',
|
|
232
|
+
}),
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return []
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return [
|
|
240
|
+
createIconDiagnostic({
|
|
241
|
+
details: {
|
|
242
|
+
icon,
|
|
243
|
+
region: placement.Region,
|
|
244
|
+
surfaceId,
|
|
245
|
+
},
|
|
246
|
+
icon,
|
|
247
|
+
message:
|
|
248
|
+
`Action '${formatActionPlacement(placement)}' declares icon '${icon}', ` +
|
|
249
|
+
'but no presentation icon target binding was found; raw icon-key fallback was used.',
|
|
250
|
+
placement,
|
|
251
|
+
reason: 'missing-icon-target-binding',
|
|
252
|
+
severity: 'info',
|
|
253
|
+
source,
|
|
254
|
+
status: 'locally-interpreted',
|
|
255
|
+
surfaceName,
|
|
256
|
+
target: 'presentation-icon-target-binding',
|
|
257
|
+
}),
|
|
258
|
+
]
|
|
259
|
+
})
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function createIconDiagnostic({
|
|
263
|
+
details,
|
|
264
|
+
icon,
|
|
265
|
+
message,
|
|
266
|
+
placement,
|
|
267
|
+
reason,
|
|
268
|
+
severity,
|
|
269
|
+
source,
|
|
270
|
+
status,
|
|
271
|
+
surfaceName,
|
|
272
|
+
target,
|
|
273
|
+
}: {
|
|
274
|
+
readonly details: Readonly<Record<string, unknown>>
|
|
275
|
+
readonly icon: string
|
|
276
|
+
readonly message: string
|
|
277
|
+
readonly placement: PresentationActionIconPlacement
|
|
278
|
+
readonly reason: string
|
|
279
|
+
readonly severity: PresentationProjectionDiagnostic['severity']
|
|
280
|
+
readonly source: string
|
|
281
|
+
readonly status: NonNullable<PresentationProjectionDiagnostic['interpretation']>['status']
|
|
282
|
+
readonly surfaceName?: string | null
|
|
283
|
+
readonly target: string
|
|
284
|
+
}) {
|
|
285
|
+
return createPresentationProjectionDiagnostic({
|
|
286
|
+
category: reason === 'missing-icon-renderer'
|
|
287
|
+
? 'missing-binding'
|
|
288
|
+
: 'local-interpretation',
|
|
289
|
+
details,
|
|
290
|
+
id: `action-icon.${formatDiagnosticToken(placement.ActionId)}.${formatDiagnosticToken(placement.Region ?? 'default')}.${formatDiagnosticToken(icon)}.${reason}`,
|
|
291
|
+
interpretation: {
|
|
292
|
+
status,
|
|
293
|
+
target,
|
|
294
|
+
},
|
|
295
|
+
message,
|
|
296
|
+
severity,
|
|
297
|
+
source,
|
|
298
|
+
subject: {
|
|
299
|
+
id: placement.ActionId,
|
|
300
|
+
kind: 'action-placement',
|
|
301
|
+
name: placement.Label ?? surfaceName ?? null,
|
|
302
|
+
},
|
|
303
|
+
suggestedNextStep: reason === 'missing-icon-target-binding'
|
|
304
|
+
? 'Add a presentation icon target binding for this icon id.'
|
|
305
|
+
: 'Bind the icon target to a frontend icon renderer.',
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function createGenericIconDiagnostic({
|
|
310
|
+
details,
|
|
311
|
+
icon,
|
|
312
|
+
message,
|
|
313
|
+
reason,
|
|
314
|
+
severity,
|
|
315
|
+
source,
|
|
316
|
+
status,
|
|
317
|
+
subject,
|
|
318
|
+
surfaceName,
|
|
319
|
+
target,
|
|
320
|
+
}: {
|
|
321
|
+
readonly details: Readonly<Record<string, unknown>>
|
|
322
|
+
readonly icon: string
|
|
323
|
+
readonly message: string
|
|
324
|
+
readonly reason: string
|
|
325
|
+
readonly severity: PresentationProjectionDiagnostic['severity']
|
|
326
|
+
readonly source: string
|
|
327
|
+
readonly status: NonNullable<PresentationProjectionDiagnostic['interpretation']>['status']
|
|
328
|
+
readonly subject: PresentationIconDiagnosticSubject
|
|
329
|
+
readonly surfaceName?: string | null
|
|
330
|
+
readonly target: string
|
|
331
|
+
}) {
|
|
332
|
+
return createPresentationProjectionDiagnostic({
|
|
333
|
+
category: reason === 'missing-icon-renderer'
|
|
334
|
+
? 'missing-binding'
|
|
335
|
+
: 'local-interpretation',
|
|
336
|
+
details,
|
|
337
|
+
id: `icon.${formatDiagnosticToken(subject.kind)}.${formatDiagnosticToken(subject.id)}.${formatDiagnosticToken(icon)}.${reason}`,
|
|
338
|
+
interpretation: {
|
|
339
|
+
status,
|
|
340
|
+
target,
|
|
341
|
+
},
|
|
342
|
+
message,
|
|
343
|
+
severity,
|
|
344
|
+
source,
|
|
345
|
+
subject: {
|
|
346
|
+
id: subject.id,
|
|
347
|
+
kind: subject.kind,
|
|
348
|
+
name: subject.label ?? surfaceName ?? null,
|
|
349
|
+
},
|
|
350
|
+
suggestedNextStep: reason === 'missing-icon-target-binding'
|
|
351
|
+
? 'Add a presentation icon target binding for this semantic icon id.'
|
|
352
|
+
: 'Bind the icon target to a frontend icon renderer.',
|
|
353
|
+
})
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function formatActionPlacement(placement: PresentationActionIconPlacement) {
|
|
357
|
+
return placement.Label ?? placement.ActionId
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function formatIconSubject(subject: PresentationIconDiagnosticSubject) {
|
|
361
|
+
return subject.label
|
|
362
|
+
? `${subject.kind} '${subject.label}'`
|
|
363
|
+
: `${subject.kind} '${subject.id}'`
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
function formatDiagnosticToken(value: string) {
|
|
367
|
+
return value.replaceAll(/[^a-zA-Z0-9_.-]+/g, '-')
|
|
368
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
PresentationBindingDefinition,
|
|
3
|
+
} from './module'
|
|
4
|
+
import {
|
|
5
|
+
createPresentationEnumDiscriminator,
|
|
6
|
+
resolvePresentationComponentBinding,
|
|
7
|
+
} from './target-bindings'
|
|
8
|
+
import {
|
|
9
|
+
presentationBindingKinds,
|
|
10
|
+
presentationTargetKinds,
|
|
11
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
12
|
+
|
|
13
|
+
export interface PresentationIconRenderContext<TSubject = unknown> {
|
|
14
|
+
readonly className?: string
|
|
15
|
+
readonly icon: string
|
|
16
|
+
readonly subject?: TSubject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type PresentationIconRenderer<
|
|
20
|
+
TSubject = unknown,
|
|
21
|
+
TResult = unknown,
|
|
22
|
+
> = (context: PresentationIconRenderContext<TSubject>) => TResult
|
|
23
|
+
|
|
24
|
+
export interface PresentationIconRegistry<
|
|
25
|
+
TSubject = unknown,
|
|
26
|
+
TResult = unknown,
|
|
27
|
+
> {
|
|
28
|
+
readonly byComponentKey?: Readonly<Record<string, PresentationIconRenderer<TSubject, TResult>>>
|
|
29
|
+
readonly byComponentRole?: Readonly<Record<string, PresentationIconRenderer<TSubject, TResult>>>
|
|
30
|
+
readonly byIconKey?: Readonly<Record<string, PresentationIconRenderer<TSubject, TResult>>>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface PresentationIconModuleProjection {
|
|
34
|
+
readonly Targets?: readonly {
|
|
35
|
+
readonly Bindings: readonly PresentationBindingDefinition[]
|
|
36
|
+
readonly ComponentSet?: string | null
|
|
37
|
+
readonly Target: string | number
|
|
38
|
+
}[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface PresentationIconResolution<
|
|
42
|
+
TSubject = unknown,
|
|
43
|
+
TResult = unknown,
|
|
44
|
+
> {
|
|
45
|
+
readonly componentKey: string | null
|
|
46
|
+
readonly componentRole: string | null
|
|
47
|
+
readonly icon: string
|
|
48
|
+
readonly renderer: PresentationIconRenderer<TSubject, TResult> | null
|
|
49
|
+
readonly resolutionSource:
|
|
50
|
+
| 'component-key'
|
|
51
|
+
| 'component-role'
|
|
52
|
+
| 'icon-key'
|
|
53
|
+
| null
|
|
54
|
+
readonly targetBindingSource: 'target-icon-binding' | null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const defaultPresentationComponentSet = 'cohesive.presentation.default'
|
|
58
|
+
|
|
59
|
+
export function createPresentationIconRegistry<
|
|
60
|
+
TSubject = unknown,
|
|
61
|
+
TResult = unknown,
|
|
62
|
+
>(
|
|
63
|
+
registry: PresentationIconRegistry<TSubject, TResult>,
|
|
64
|
+
) {
|
|
65
|
+
return registry
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function resolvePresentationIcon<
|
|
69
|
+
TSubject = unknown,
|
|
70
|
+
TResult = unknown,
|
|
71
|
+
>({
|
|
72
|
+
componentSet = defaultPresentationComponentSet,
|
|
73
|
+
icon,
|
|
74
|
+
module,
|
|
75
|
+
registry,
|
|
76
|
+
}: {
|
|
77
|
+
readonly componentSet?: string
|
|
78
|
+
readonly icon: string | null | undefined
|
|
79
|
+
readonly module?: PresentationIconModuleProjection | null
|
|
80
|
+
readonly registry: PresentationIconRegistry<TSubject, TResult> | null | undefined
|
|
81
|
+
}): PresentationIconResolution<TSubject, TResult> {
|
|
82
|
+
const iconKey = icon ?? ''
|
|
83
|
+
const targetBinding = iconKey
|
|
84
|
+
? resolvePresentationIconTargetBinding({ componentSet, icon: iconKey, module })
|
|
85
|
+
: null
|
|
86
|
+
const componentRole = targetBinding?.componentRole ?? null
|
|
87
|
+
const componentKey = targetBinding?.componentKey ?? null
|
|
88
|
+
|
|
89
|
+
if (componentRole) {
|
|
90
|
+
const renderer = registry?.byComponentRole?.[componentRole]
|
|
91
|
+
if (renderer) {
|
|
92
|
+
return {
|
|
93
|
+
componentKey,
|
|
94
|
+
componentRole,
|
|
95
|
+
icon: iconKey,
|
|
96
|
+
renderer,
|
|
97
|
+
resolutionSource: 'component-role',
|
|
98
|
+
targetBindingSource: targetBinding?.source ?? null,
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (componentKey) {
|
|
104
|
+
const renderer = registry?.byComponentKey?.[componentKey]
|
|
105
|
+
if (renderer) {
|
|
106
|
+
return {
|
|
107
|
+
componentKey,
|
|
108
|
+
componentRole,
|
|
109
|
+
icon: iconKey,
|
|
110
|
+
renderer,
|
|
111
|
+
resolutionSource: 'component-key',
|
|
112
|
+
targetBindingSource: targetBinding?.source ?? null,
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (iconKey) {
|
|
118
|
+
const renderer = registry?.byIconKey?.[iconKey]
|
|
119
|
+
if (renderer) {
|
|
120
|
+
return {
|
|
121
|
+
componentKey,
|
|
122
|
+
componentRole,
|
|
123
|
+
icon: iconKey,
|
|
124
|
+
renderer,
|
|
125
|
+
resolutionSource: 'icon-key',
|
|
126
|
+
targetBindingSource: targetBinding?.source ?? null,
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
componentKey,
|
|
133
|
+
componentRole,
|
|
134
|
+
icon: iconKey,
|
|
135
|
+
renderer: null,
|
|
136
|
+
resolutionSource: null,
|
|
137
|
+
targetBindingSource: targetBinding?.source ?? null,
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function resolvePresentationIconTargetBinding({
|
|
142
|
+
componentSet,
|
|
143
|
+
icon,
|
|
144
|
+
module,
|
|
145
|
+
}: {
|
|
146
|
+
readonly componentSet: string
|
|
147
|
+
readonly icon: string
|
|
148
|
+
readonly module?: PresentationIconModuleProjection | null
|
|
149
|
+
}) {
|
|
150
|
+
if (!module?.Targets) {
|
|
151
|
+
return null
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const resolvedBinding = resolvePresentationComponentBinding(
|
|
155
|
+
{ Targets: module.Targets },
|
|
156
|
+
{
|
|
157
|
+
bindingKind: createPresentationEnumDiscriminator(
|
|
158
|
+
presentationBindingKinds,
|
|
159
|
+
'icon',
|
|
160
|
+
'Icon',
|
|
161
|
+
),
|
|
162
|
+
componentSet,
|
|
163
|
+
id: icon,
|
|
164
|
+
targetKind: createPresentationEnumDiscriminator(
|
|
165
|
+
presentationTargetKinds,
|
|
166
|
+
'react',
|
|
167
|
+
'React',
|
|
168
|
+
),
|
|
169
|
+
},
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
if (!resolvedBinding.binding) {
|
|
173
|
+
return null
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
componentKey: resolvedBinding.componentKey,
|
|
178
|
+
componentRole: resolvedBinding.componentRole,
|
|
179
|
+
source: 'target-icon-binding' as const,
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ActionDefinition,
|
|
3
|
+
} from './module'
|
|
4
|
+
import type {
|
|
5
|
+
PresentationActionRuntimeBinding,
|
|
6
|
+
} from './presentation-action-runtime-binding'
|
|
7
|
+
import {
|
|
8
|
+
createPresentationActionRuntimeBinding,
|
|
9
|
+
} from './presentation-action-runtime-binding'
|
|
10
|
+
import {
|
|
11
|
+
actionKinds,
|
|
12
|
+
presentationBindingKinds,
|
|
13
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
14
|
+
|
|
15
|
+
export interface ProjectPresentationNavigationActionRuntimeBindingsOptions {
|
|
16
|
+
readonly navigateHref: (href: string) => void
|
|
17
|
+
readonly resolveHref: (action: ActionDefinition) => string | null
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Projects parameterless navigation actions into local navigation runtime
|
|
22
|
+
* bindings. The presentation IR declares route navigation semantics; the host
|
|
23
|
+
* still supplies href construction and navigation side effects.
|
|
24
|
+
*/
|
|
25
|
+
export function projectPresentationNavigationActionRuntimeBindings<
|
|
26
|
+
TExecuteContext = unknown,
|
|
27
|
+
TLabel = string,
|
|
28
|
+
>({
|
|
29
|
+
navigateHref,
|
|
30
|
+
resolveHref,
|
|
31
|
+
}: ProjectPresentationNavigationActionRuntimeBindingsOptions): readonly PresentationActionRuntimeBinding<
|
|
32
|
+
TExecuteContext,
|
|
33
|
+
TLabel
|
|
34
|
+
>[] {
|
|
35
|
+
return [
|
|
36
|
+
createPresentationActionRuntimeBinding<TExecuteContext, TLabel>({
|
|
37
|
+
bindingKind: presentationBindingKinds.navigationRoute,
|
|
38
|
+
id: 'parameterless-navigation-route',
|
|
39
|
+
kind: actionKinds.navigationAction,
|
|
40
|
+
predicate: ({ action }) => action.Parameters.length === 0,
|
|
41
|
+
project: ({ action }) => {
|
|
42
|
+
const href = resolveHref(action)
|
|
43
|
+
return {
|
|
44
|
+
execute: () => {
|
|
45
|
+
if (href) {
|
|
46
|
+
navigateHref(href)
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
isDisabled: !href,
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
]
|
|
54
|
+
}
|