@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,579 @@
|
|
|
1
|
+
import {
|
|
2
|
+
navigationShellSlotKindLabels,
|
|
3
|
+
navigationShellSlotKinds,
|
|
4
|
+
type NavigationDefinition,
|
|
5
|
+
type NavigationNodeDefinition,
|
|
6
|
+
type NavigationShellRegionDefinition,
|
|
7
|
+
type NavigationShellSlotDefinition,
|
|
8
|
+
type NavigationShellSlotKind,
|
|
9
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
10
|
+
import {
|
|
11
|
+
createNavigationHref,
|
|
12
|
+
getNavigationShellRegions,
|
|
13
|
+
resolveNavigationRouteId,
|
|
14
|
+
} from './navigation'
|
|
15
|
+
import {
|
|
16
|
+
hasNavigationShellSlotRendererBinding,
|
|
17
|
+
} from './navigation-shell-slot-renderer-registry'
|
|
18
|
+
import {
|
|
19
|
+
createPresentationProjectionDiagnostic,
|
|
20
|
+
type PresentationProjectionDiagnostic,
|
|
21
|
+
} from './presentation-projection-diagnostics'
|
|
22
|
+
|
|
23
|
+
export interface ProjectedNavigationShellItem {
|
|
24
|
+
readonly href: string
|
|
25
|
+
readonly label: string
|
|
26
|
+
readonly node: NavigationNodeDefinition
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Pure navigation shell interpretation inputs used to report target binding
|
|
31
|
+
* gaps without coupling diagnostics to a concrete React component.
|
|
32
|
+
*/
|
|
33
|
+
export interface NavigationShellDiagnosticsOptions {
|
|
34
|
+
readonly isNodeIconSupported?: (icon: string) => boolean
|
|
35
|
+
readonly isShellRegionComponentBound?: (
|
|
36
|
+
componentKey: string,
|
|
37
|
+
region: NavigationShellRegionDefinition,
|
|
38
|
+
) => boolean
|
|
39
|
+
readonly isShellRegionComponentTargetBound?: (
|
|
40
|
+
region: NavigationShellRegionDefinition,
|
|
41
|
+
) => boolean
|
|
42
|
+
readonly isShellRegionSupported?: (region: NavigationShellRegionDefinition) => boolean
|
|
43
|
+
readonly isShellRegionViewBound?: (
|
|
44
|
+
viewId: string,
|
|
45
|
+
region: NavigationShellRegionDefinition,
|
|
46
|
+
) => boolean
|
|
47
|
+
readonly navigation: NavigationDefinition
|
|
48
|
+
readonly renderShellIconBound: boolean
|
|
49
|
+
readonly shellSlotRendererKeys?: readonly string[]
|
|
50
|
+
readonly shellSlots: readonly NavigationShellSlotDefinition[]
|
|
51
|
+
readonly supportedSlotPlacements?: readonly string[]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const defaultNavigationShellSlotPlacements = [
|
|
55
|
+
'top-left',
|
|
56
|
+
'top-center',
|
|
57
|
+
'top-right',
|
|
58
|
+
'below-navigation',
|
|
59
|
+
'main',
|
|
60
|
+
] as const
|
|
61
|
+
|
|
62
|
+
const supportedNavigationShellSlotKinds = new Set<NavigationShellSlotKind>([
|
|
63
|
+
navigationShellSlotKinds.brand,
|
|
64
|
+
navigationShellSlotKinds.primaryNavigation,
|
|
65
|
+
navigationShellSlotKinds.utilityActions,
|
|
66
|
+
navigationShellSlotKinds.systemNotices,
|
|
67
|
+
navigationShellSlotKinds.routedContent,
|
|
68
|
+
navigationShellSlotKinds.custom,
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Lowers a semantic shell navigation slot into routed link items.
|
|
73
|
+
*/
|
|
74
|
+
export function createProjectedNavigationShellItems(
|
|
75
|
+
navigation: NavigationDefinition,
|
|
76
|
+
slot: NavigationShellSlotDefinition | null,
|
|
77
|
+
): readonly ProjectedNavigationShellItem[] {
|
|
78
|
+
const nodesById = new Map(navigation.Nodes.map((node) => [node.Id, node]))
|
|
79
|
+
const nodeIds = slot?.NodeIds.length ? slot.NodeIds : navigation.Shell.PrimaryNodeIds
|
|
80
|
+
|
|
81
|
+
return nodeIds.map((nodeId) => {
|
|
82
|
+
const node = nodesById.get(nodeId)
|
|
83
|
+
if (!node) {
|
|
84
|
+
return null
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const href = createNavigationHref(navigation, node.RouteId)
|
|
88
|
+
if (!href) {
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
href,
|
|
94
|
+
label: node.Label,
|
|
95
|
+
node,
|
|
96
|
+
}
|
|
97
|
+
}).filter((item): item is ProjectedNavigationShellItem => item !== null)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function findNavigationShellSlot(
|
|
101
|
+
slots: readonly NavigationShellSlotDefinition[],
|
|
102
|
+
numericKind: NavigationShellSlotKind,
|
|
103
|
+
label: string,
|
|
104
|
+
) {
|
|
105
|
+
return slots.find((slot) => isNavigationShellSlotKind(slot, numericKind, label)) ?? null
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function isNavigationShellSlotKind(
|
|
109
|
+
slot: NavigationShellSlotDefinition,
|
|
110
|
+
numericKind: NavigationShellSlotKind,
|
|
111
|
+
label: string,
|
|
112
|
+
) {
|
|
113
|
+
const normalizedKind = String(slot.Kind).replace(/[-_\s]/g, '').toLocaleLowerCase()
|
|
114
|
+
const normalizedLabel = label.replace(/[-_\s]/g, '').toLocaleLowerCase()
|
|
115
|
+
|
|
116
|
+
return slot.Kind === numericKind || normalizedKind === normalizedLabel
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function isProjectedNavigationShellItemActive(
|
|
120
|
+
activePath: string,
|
|
121
|
+
item: ProjectedNavigationShellItem,
|
|
122
|
+
navigation: NavigationDefinition,
|
|
123
|
+
) {
|
|
124
|
+
const activeRouteId = resolveNavigationRouteId(navigation, activePath)
|
|
125
|
+
if (!activeRouteId) {
|
|
126
|
+
return activePath === item.href
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return activeRouteId === item.node.RouteId || item.node.ActiveRouteIds.includes(activeRouteId)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function isSupportedNavigationShellSlot(slot: NavigationShellSlotDefinition) {
|
|
133
|
+
return supportedNavigationShellSlotKinds.has(slot.Kind)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Resolves slot regions through declared region ids, region SlotId links, and
|
|
138
|
+
* finally legacy placement matching for shells that predate explicit slots.
|
|
139
|
+
*/
|
|
140
|
+
export function resolveNavigationShellSlotRegions(
|
|
141
|
+
navigation: NavigationDefinition,
|
|
142
|
+
slot: NavigationShellSlotDefinition,
|
|
143
|
+
) {
|
|
144
|
+
const regionsById = new Map(navigation.Shell.Regions.map((region) => [region.Id, region]))
|
|
145
|
+
const regionIds = new Set(slot.RegionIds)
|
|
146
|
+
const regions = slot.RegionIds
|
|
147
|
+
.map((regionId) => regionsById.get(regionId))
|
|
148
|
+
.filter((region): region is NavigationShellRegionDefinition => Boolean(region))
|
|
149
|
+
|
|
150
|
+
for (const region of navigation.Shell.Regions) {
|
|
151
|
+
if (region.SlotId === slot.Id && !regionIds.has(region.Id)) {
|
|
152
|
+
regions.push(region)
|
|
153
|
+
regionIds.add(region.Id)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (regions.length === 0) {
|
|
158
|
+
for (const region of navigation.Shell.Regions) {
|
|
159
|
+
if (region.Placement === slot.Placement && !regionIds.has(region.Id)) {
|
|
160
|
+
regions.push(region)
|
|
161
|
+
regionIds.add(region.Id)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return regions
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Returns declared shell slots, or synthesizes the standard shell slots for
|
|
171
|
+
* compatibility with older presentation modules.
|
|
172
|
+
*/
|
|
173
|
+
export function resolveProjectedNavigationShellSlots(
|
|
174
|
+
navigation: NavigationDefinition,
|
|
175
|
+
): readonly NavigationShellSlotDefinition[] {
|
|
176
|
+
const declaredSlots = navigation.Shell.Slots ?? []
|
|
177
|
+
if (declaredSlots.length > 0) {
|
|
178
|
+
return declaredSlots
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return synthesizeNavigationShellSlots(navigation)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Produces projection diagnostics for shell slots, navigation links, chrome,
|
|
186
|
+
* and app-specific shell region bindings.
|
|
187
|
+
*/
|
|
188
|
+
export function projectNavigationShellDiagnostics({
|
|
189
|
+
isNodeIconSupported,
|
|
190
|
+
isShellRegionComponentBound,
|
|
191
|
+
isShellRegionComponentTargetBound,
|
|
192
|
+
isShellRegionSupported,
|
|
193
|
+
isShellRegionViewBound,
|
|
194
|
+
navigation,
|
|
195
|
+
renderShellIconBound,
|
|
196
|
+
shellSlotRendererKeys,
|
|
197
|
+
shellSlots,
|
|
198
|
+
supportedSlotPlacements = defaultNavigationShellSlotPlacements,
|
|
199
|
+
}: NavigationShellDiagnosticsOptions): readonly PresentationProjectionDiagnostic[] {
|
|
200
|
+
const diagnostics: PresentationProjectionDiagnostic[] = []
|
|
201
|
+
const nodesById = new Map(navigation.Nodes.map((node) => [node.Id, node]))
|
|
202
|
+
const regionsById = new Map(navigation.Shell.Regions.map((region) => [region.Id, region]))
|
|
203
|
+
const shell = navigation.Shell
|
|
204
|
+
const declaredSlots = shell.Slots ?? []
|
|
205
|
+
const hasDeclaredSlots = declaredSlots.length > 0
|
|
206
|
+
const slotIds = new Set(shellSlots.map((slot) => slot.Id))
|
|
207
|
+
const supportedPlacementSet = new Set(supportedSlotPlacements)
|
|
208
|
+
|
|
209
|
+
for (const slot of shellSlots) {
|
|
210
|
+
if (
|
|
211
|
+
shellSlotRendererKeys &&
|
|
212
|
+
!hasNavigationShellSlotRendererBinding(shellSlotRendererKeys, slot)
|
|
213
|
+
) {
|
|
214
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
215
|
+
category: 'missing-binding',
|
|
216
|
+
details: {
|
|
217
|
+
kind: slot.Kind,
|
|
218
|
+
placement: slot.Placement,
|
|
219
|
+
},
|
|
220
|
+
id: `navigation-shell.${shell.Id}.slot.${slot.Id}.missing-renderer`,
|
|
221
|
+
interpretation: {
|
|
222
|
+
status: 'unbound',
|
|
223
|
+
target: 'navigation-shell',
|
|
224
|
+
},
|
|
225
|
+
message: `Navigation shell slot '${slot.Id}' has no frontend slot renderer binding.`,
|
|
226
|
+
severity: 'warning',
|
|
227
|
+
source: `navigation-shell:${shell.Id}`,
|
|
228
|
+
subject: {
|
|
229
|
+
id: slot.Id,
|
|
230
|
+
kind: 'NavigationShellSlotDefinition',
|
|
231
|
+
},
|
|
232
|
+
suggestedNextStep: 'Register a standard or app-specific shell slot renderer for this slot kind.',
|
|
233
|
+
}))
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (!isSupportedNavigationShellSlot(slot)) {
|
|
237
|
+
const kindLabel =
|
|
238
|
+
navigationShellSlotKindLabels[slot.Kind] ?? String(slot.Kind)
|
|
239
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
240
|
+
category: 'unsupported',
|
|
241
|
+
details: {
|
|
242
|
+
kind: slot.Kind,
|
|
243
|
+
kindLabel,
|
|
244
|
+
},
|
|
245
|
+
id: `navigation-shell.${shell.Id}.slot.${slot.Id}.unsupported-kind`,
|
|
246
|
+
interpretation: {
|
|
247
|
+
status: 'unsupported',
|
|
248
|
+
target: 'navigation-shell',
|
|
249
|
+
},
|
|
250
|
+
message: `Navigation shell slot '${slot.Id}' uses unsupported slot kind '${kindLabel}'.`,
|
|
251
|
+
severity: 'warning',
|
|
252
|
+
source: `navigation-shell:${shell.Id}`,
|
|
253
|
+
subject: {
|
|
254
|
+
id: slot.Id,
|
|
255
|
+
kind: 'NavigationShellSlotDefinition',
|
|
256
|
+
},
|
|
257
|
+
suggestedNextStep: 'Add a standard shell slot renderer for this kind or map it to a supported slot kind.',
|
|
258
|
+
}))
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (!supportedPlacementSet.has(slot.Placement)) {
|
|
262
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
263
|
+
category: 'unsupported',
|
|
264
|
+
details: {
|
|
265
|
+
placement: slot.Placement,
|
|
266
|
+
},
|
|
267
|
+
id: `navigation-shell.${shell.Id}.slot.${slot.Id}.unsupported-placement`,
|
|
268
|
+
interpretation: {
|
|
269
|
+
status: 'unsupported',
|
|
270
|
+
target: 'navigation-shell',
|
|
271
|
+
},
|
|
272
|
+
message: `Navigation shell slot '${slot.Id}' uses unsupported placement '${slot.Placement}'.`,
|
|
273
|
+
severity: 'warning',
|
|
274
|
+
source: `navigation-shell:${shell.Id}`,
|
|
275
|
+
subject: {
|
|
276
|
+
id: slot.Id,
|
|
277
|
+
kind: 'NavigationShellSlotDefinition',
|
|
278
|
+
},
|
|
279
|
+
suggestedNextStep: 'Add a frontend shell slot placement or change the slot placement.',
|
|
280
|
+
}))
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
for (const nodeId of slot.NodeIds) {
|
|
284
|
+
if (!nodesById.has(nodeId)) {
|
|
285
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
286
|
+
category: 'missing-definition',
|
|
287
|
+
id: `navigation-shell.${shell.Id}.slot.${slot.Id}.node.${nodeId}.missing-node`,
|
|
288
|
+
interpretation: {
|
|
289
|
+
status: 'unbound',
|
|
290
|
+
target: 'navigation-shell',
|
|
291
|
+
},
|
|
292
|
+
message: `Navigation shell slot '${slot.Id}' references missing node '${nodeId}'.`,
|
|
293
|
+
severity: 'warning',
|
|
294
|
+
source: `navigation-shell:${shell.Id}`,
|
|
295
|
+
subject: {
|
|
296
|
+
id: slot.Id,
|
|
297
|
+
kind: 'NavigationShellSlotDefinition',
|
|
298
|
+
},
|
|
299
|
+
suggestedNextStep: 'Declare the navigation node or remove it from the slot.',
|
|
300
|
+
}))
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
for (const regionId of slot.RegionIds) {
|
|
305
|
+
if (!regionsById.has(regionId)) {
|
|
306
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
307
|
+
category: 'missing-definition',
|
|
308
|
+
id: `navigation-shell.${shell.Id}.slot.${slot.Id}.region.${regionId}.missing-region`,
|
|
309
|
+
interpretation: {
|
|
310
|
+
status: 'unbound',
|
|
311
|
+
target: 'navigation-shell',
|
|
312
|
+
},
|
|
313
|
+
message: `Navigation shell slot '${slot.Id}' references missing region '${regionId}'.`,
|
|
314
|
+
severity: 'warning',
|
|
315
|
+
source: `navigation-shell:${shell.Id}`,
|
|
316
|
+
subject: {
|
|
317
|
+
id: slot.Id,
|
|
318
|
+
kind: 'NavigationShellSlotDefinition',
|
|
319
|
+
},
|
|
320
|
+
suggestedNextStep: 'Declare the shell region or remove it from the slot.',
|
|
321
|
+
}))
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const shellNavigationNodeIds = new Set([
|
|
327
|
+
...shell.PrimaryNodeIds,
|
|
328
|
+
...shellSlots.flatMap((slot) => slot.NodeIds),
|
|
329
|
+
])
|
|
330
|
+
|
|
331
|
+
for (const nodeId of shellNavigationNodeIds) {
|
|
332
|
+
const node = nodesById.get(nodeId)
|
|
333
|
+
if (!node) {
|
|
334
|
+
continue
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (!createNavigationHref(navigation, node.RouteId)) {
|
|
338
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
339
|
+
category: 'missing-binding',
|
|
340
|
+
details: {
|
|
341
|
+
routeId: node.RouteId,
|
|
342
|
+
},
|
|
343
|
+
id: `navigation-shell.${shell.Id}.node.${node.Id}.missing-href`,
|
|
344
|
+
interpretation: {
|
|
345
|
+
status: 'unbound',
|
|
346
|
+
target: 'navigation-route',
|
|
347
|
+
},
|
|
348
|
+
message: `Navigation node '${node.Label}' cannot be lowered to a browser href.`,
|
|
349
|
+
severity: 'warning',
|
|
350
|
+
source: `navigation-shell:${shell.Id}`,
|
|
351
|
+
subject: {
|
|
352
|
+
id: node.Id,
|
|
353
|
+
kind: 'NavigationNodeDefinition',
|
|
354
|
+
name: node.Label,
|
|
355
|
+
},
|
|
356
|
+
suggestedNextStep: 'Bind the node to a route whose required parameters are available in shell context.',
|
|
357
|
+
}))
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (node.Icon && isNodeIconSupported && !isNodeIconSupported(node.Icon)) {
|
|
361
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
362
|
+
category: 'missing-binding',
|
|
363
|
+
details: {
|
|
364
|
+
icon: node.Icon,
|
|
365
|
+
},
|
|
366
|
+
id: `navigation-shell.${shell.Id}.node.${node.Id}.unbound-icon`,
|
|
367
|
+
interpretation: {
|
|
368
|
+
status: 'unbound',
|
|
369
|
+
target: 'navigation-icon',
|
|
370
|
+
},
|
|
371
|
+
message: `Navigation node '${node.Label}' declares icon '${node.Icon}', but no frontend icon binding is registered.`,
|
|
372
|
+
severity: 'info',
|
|
373
|
+
source: `navigation-shell:${shell.Id}`,
|
|
374
|
+
subject: {
|
|
375
|
+
id: node.Id,
|
|
376
|
+
kind: 'NavigationNodeDefinition',
|
|
377
|
+
name: node.Label,
|
|
378
|
+
},
|
|
379
|
+
suggestedNextStep: 'Add this icon key to the app shell icon registry or remove it from the navigation node.',
|
|
380
|
+
}))
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (shell.Chrome?.Icon && !renderShellIconBound) {
|
|
385
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
386
|
+
category: 'missing-binding',
|
|
387
|
+
details: {
|
|
388
|
+
icon: shell.Chrome.Icon,
|
|
389
|
+
},
|
|
390
|
+
id: `navigation-shell.${shell.Id}.chrome.unbound-icon`,
|
|
391
|
+
interpretation: {
|
|
392
|
+
status: 'unbound',
|
|
393
|
+
target: 'navigation-shell',
|
|
394
|
+
},
|
|
395
|
+
message: `Navigation shell '${shell.Id}' declares shell icon '${shell.Chrome.Icon}', but no shell icon renderer is registered.`,
|
|
396
|
+
severity: 'info',
|
|
397
|
+
source: `navigation-shell:${shell.Id}`,
|
|
398
|
+
subject: {
|
|
399
|
+
id: shell.Id,
|
|
400
|
+
kind: 'NavigationShellDefinition',
|
|
401
|
+
},
|
|
402
|
+
suggestedNextStep: 'Bind a shell icon renderer in the frontend target interpretation.',
|
|
403
|
+
}))
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
for (const region of shell.Regions) {
|
|
407
|
+
const componentKey = region.ComponentKey ?? null
|
|
408
|
+
const viewId = region.ViewId ?? null
|
|
409
|
+
const hasComponentTarget = Boolean(componentKey) ||
|
|
410
|
+
Boolean(isShellRegionComponentTargetBound?.(region))
|
|
411
|
+
|
|
412
|
+
if (hasDeclaredSlots && region.SlotId && !slotIds.has(region.SlotId)) {
|
|
413
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
414
|
+
category: 'missing-definition',
|
|
415
|
+
details: {
|
|
416
|
+
slotId: region.SlotId,
|
|
417
|
+
},
|
|
418
|
+
id: `navigation-shell.${shell.Id}.region.${region.Id}.missing-slot`,
|
|
419
|
+
interpretation: {
|
|
420
|
+
status: 'unbound',
|
|
421
|
+
target: 'navigation-shell',
|
|
422
|
+
},
|
|
423
|
+
message: `Shell region '${region.Id}' references missing slot '${region.SlotId}'.`,
|
|
424
|
+
severity: 'warning',
|
|
425
|
+
source: `navigation-shell:${shell.Id}`,
|
|
426
|
+
subject: {
|
|
427
|
+
id: region.Id,
|
|
428
|
+
kind: 'NavigationShellRegionDefinition',
|
|
429
|
+
},
|
|
430
|
+
suggestedNextStep: 'Declare the shell slot or update the region SlotId.',
|
|
431
|
+
}))
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (viewId && isShellRegionViewBound && !isShellRegionViewBound(viewId, region)) {
|
|
435
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
436
|
+
category: 'missing-definition',
|
|
437
|
+
details: {
|
|
438
|
+
viewId,
|
|
439
|
+
},
|
|
440
|
+
id: `navigation-shell.${shell.Id}.region.${region.Id}.missing-view`,
|
|
441
|
+
interpretation: {
|
|
442
|
+
status: 'unbound',
|
|
443
|
+
target: 'navigation-shell',
|
|
444
|
+
},
|
|
445
|
+
message: `Shell region '${region.Id}' references missing view '${viewId}'.`,
|
|
446
|
+
severity: 'warning',
|
|
447
|
+
source: `navigation-shell:${shell.Id}`,
|
|
448
|
+
subject: {
|
|
449
|
+
id: region.Id,
|
|
450
|
+
kind: 'NavigationShellRegionDefinition',
|
|
451
|
+
},
|
|
452
|
+
suggestedNextStep: 'Declare the view or remove the ViewId from the shell region.',
|
|
453
|
+
}))
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (
|
|
457
|
+
componentKey &&
|
|
458
|
+
isShellRegionComponentBound &&
|
|
459
|
+
!isShellRegionComponentBound(componentKey, region)
|
|
460
|
+
) {
|
|
461
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
462
|
+
category: 'missing-binding',
|
|
463
|
+
details: {
|
|
464
|
+
componentKey,
|
|
465
|
+
},
|
|
466
|
+
id: `navigation-shell.${shell.Id}.region.${region.Id}.unbound-component`,
|
|
467
|
+
interpretation: {
|
|
468
|
+
status: 'unbound',
|
|
469
|
+
target: 'navigation-shell',
|
|
470
|
+
},
|
|
471
|
+
message: `Shell region '${region.Id}' declares unbound component key '${componentKey}'.`,
|
|
472
|
+
severity: 'warning',
|
|
473
|
+
source: `navigation-shell:${shell.Id}`,
|
|
474
|
+
subject: {
|
|
475
|
+
id: region.Id,
|
|
476
|
+
kind: 'NavigationShellRegionDefinition',
|
|
477
|
+
},
|
|
478
|
+
suggestedNextStep: 'Bind the component key in the frontend shell-region adapter or remove it from the region.',
|
|
479
|
+
}))
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (!viewId && !hasComponentTarget) {
|
|
483
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
484
|
+
category: 'unbound',
|
|
485
|
+
id: `navigation-shell.${shell.Id}.region.${region.Id}.missing-target`,
|
|
486
|
+
interpretation: {
|
|
487
|
+
status: 'unbound',
|
|
488
|
+
target: 'navigation-shell',
|
|
489
|
+
},
|
|
490
|
+
message: `Shell region '${region.Id}' has neither ViewId nor component target binding.`,
|
|
491
|
+
severity: 'warning',
|
|
492
|
+
source: `navigation-shell:${shell.Id}`,
|
|
493
|
+
subject: {
|
|
494
|
+
id: region.Id,
|
|
495
|
+
kind: 'NavigationShellRegionDefinition',
|
|
496
|
+
},
|
|
497
|
+
suggestedNextStep: 'Declare a projected view for the region, bind a ComponentRole target, or bind a local component-key escape hatch.',
|
|
498
|
+
}))
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
if (isShellRegionSupported && !isShellRegionSupported(region)) {
|
|
502
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
503
|
+
category: 'missing-binding',
|
|
504
|
+
details: {
|
|
505
|
+
kind: region.Kind,
|
|
506
|
+
},
|
|
507
|
+
id: `navigation-shell.${shell.Id}.region.${region.Id}.unsupported-kind`,
|
|
508
|
+
interpretation: {
|
|
509
|
+
status: 'unbound',
|
|
510
|
+
target: 'navigation-shell-region',
|
|
511
|
+
},
|
|
512
|
+
message: `Shell region '${region.Id}' is not handled by the frontend shell-region adapter.`,
|
|
513
|
+
severity: 'warning',
|
|
514
|
+
source: `navigation-shell:${shell.Id}`,
|
|
515
|
+
subject: {
|
|
516
|
+
id: region.Id,
|
|
517
|
+
kind: 'NavigationShellRegionDefinition',
|
|
518
|
+
},
|
|
519
|
+
suggestedNextStep: 'Add a local shell-region interpretation or remove the region from the shell.',
|
|
520
|
+
}))
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
return diagnostics
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
function synthesizeNavigationShellSlots(
|
|
528
|
+
navigation: NavigationDefinition,
|
|
529
|
+
): readonly NavigationShellSlotDefinition[] {
|
|
530
|
+
return [
|
|
531
|
+
{
|
|
532
|
+
Annotations: [],
|
|
533
|
+
Design: null,
|
|
534
|
+
Id: 'brand',
|
|
535
|
+
Kind: navigationShellSlotKinds.brand,
|
|
536
|
+
NodeIds: [],
|
|
537
|
+
Placement: 'top-left',
|
|
538
|
+
RegionIds: [],
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
Annotations: [],
|
|
542
|
+
Design: null,
|
|
543
|
+
Id: 'primary-navigation',
|
|
544
|
+
Kind: navigationShellSlotKinds.primaryNavigation,
|
|
545
|
+
NodeIds: navigation.Shell.PrimaryNodeIds,
|
|
546
|
+
Placement: 'top-center',
|
|
547
|
+
RegionIds: [],
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
Annotations: [],
|
|
551
|
+
Design: null,
|
|
552
|
+
Id: 'utility-actions',
|
|
553
|
+
Kind: navigationShellSlotKinds.utilityActions,
|
|
554
|
+
NodeIds: [],
|
|
555
|
+
Placement: 'top-right',
|
|
556
|
+
RegionIds: getNavigationShellRegions(navigation, { placement: 'top-right' })
|
|
557
|
+
.map((region) => region.Id),
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
Annotations: [],
|
|
561
|
+
Design: null,
|
|
562
|
+
Id: 'system-notices',
|
|
563
|
+
Kind: navigationShellSlotKinds.systemNotices,
|
|
564
|
+
NodeIds: [],
|
|
565
|
+
Placement: 'below-navigation',
|
|
566
|
+
RegionIds: getNavigationShellRegions(navigation, { placement: 'below-navigation' })
|
|
567
|
+
.map((region) => region.Id),
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
Annotations: [],
|
|
571
|
+
Design: null,
|
|
572
|
+
Id: 'routed-content',
|
|
573
|
+
Kind: navigationShellSlotKinds.routedContent,
|
|
574
|
+
NodeIds: [],
|
|
575
|
+
Placement: 'main',
|
|
576
|
+
RegionIds: [],
|
|
577
|
+
},
|
|
578
|
+
]
|
|
579
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
navigationShellSlotKindLabels,
|
|
3
|
+
type NavigationShellSlotDefinition,
|
|
4
|
+
type NavigationShellSlotKind,
|
|
5
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
6
|
+
|
|
7
|
+
export const navigationShellSlotAnyPlacement = '*'
|
|
8
|
+
|
|
9
|
+
export type NavigationShellSlotRendererRegistry<TRenderer = unknown> = Readonly<
|
|
10
|
+
Record<string, TRenderer>
|
|
11
|
+
>
|
|
12
|
+
|
|
13
|
+
export interface NavigationShellSlotRendererBinding<TRenderer = unknown> {
|
|
14
|
+
readonly kind: NavigationShellSlotKind | string | number
|
|
15
|
+
readonly placement?: string | number | null
|
|
16
|
+
readonly render: TRenderer
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function createNavigationShellSlotRendererRegistry<TRenderer>(
|
|
20
|
+
bindings: readonly NavigationShellSlotRendererBinding<TRenderer>[],
|
|
21
|
+
): NavigationShellSlotRendererRegistry<TRenderer> {
|
|
22
|
+
return Object.fromEntries(
|
|
23
|
+
bindings.map((binding) => [
|
|
24
|
+
createNavigationShellSlotRendererKey(binding.kind, binding.placement),
|
|
25
|
+
binding.render,
|
|
26
|
+
]),
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createNavigationShellSlotRendererKey(
|
|
31
|
+
kind: NavigationShellSlotKind | string | number,
|
|
32
|
+
placement?: string | number | null,
|
|
33
|
+
) {
|
|
34
|
+
return `${normalizeNavigationShellSlotKind(kind)}:${placement == null
|
|
35
|
+
? navigationShellSlotAnyPlacement
|
|
36
|
+
: normalizeNavigationShellSlotPlacement(placement)}`
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getNavigationShellSlotRendererRegistryKeys(
|
|
40
|
+
registry: NavigationShellSlotRendererRegistry | null | undefined,
|
|
41
|
+
) {
|
|
42
|
+
return Object.keys(registry ?? {})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function getNavigationShellSlotRendererCandidateKeys(
|
|
46
|
+
slot: NavigationShellSlotDefinition,
|
|
47
|
+
) {
|
|
48
|
+
return [
|
|
49
|
+
createNavigationShellSlotRendererKey(slot.Kind, slot.Placement),
|
|
50
|
+
createNavigationShellSlotRendererKey(slot.Kind),
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function hasNavigationShellSlotRendererBinding(
|
|
55
|
+
keys: readonly string[],
|
|
56
|
+
slot: NavigationShellSlotDefinition,
|
|
57
|
+
) {
|
|
58
|
+
return getNavigationShellSlotRendererCandidateKeys(slot).some((key) =>
|
|
59
|
+
keys.includes(key))
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function resolveNavigationShellSlotRenderer<TRenderer>(
|
|
63
|
+
registry: NavigationShellSlotRendererRegistry<TRenderer> | null | undefined,
|
|
64
|
+
slot: NavigationShellSlotDefinition,
|
|
65
|
+
) {
|
|
66
|
+
const renderers = registry ?? {}
|
|
67
|
+
for (const key of getNavigationShellSlotRendererCandidateKeys(slot)) {
|
|
68
|
+
const renderer = renderers[key]
|
|
69
|
+
if (renderer !== undefined && renderer !== null) {
|
|
70
|
+
return renderer
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return null
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function normalizeNavigationShellSlotKind(value: unknown) {
|
|
78
|
+
return normalizeGeneratedEnumToken(value, navigationShellSlotKindLabels)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function normalizeNavigationShellSlotPlacement(value: unknown) {
|
|
82
|
+
return String(value).replace(/[^a-z0-9]/gi, '').toLocaleLowerCase()
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function normalizeGeneratedEnumToken(
|
|
86
|
+
value: unknown,
|
|
87
|
+
labels: Readonly<Record<number, string>>,
|
|
88
|
+
) {
|
|
89
|
+
const label = typeof value === 'number'
|
|
90
|
+
? labels[value] ?? String(value)
|
|
91
|
+
: String(value)
|
|
92
|
+
|
|
93
|
+
return label.replace(/[^a-z0-9]/gi, '').toLocaleLowerCase()
|
|
94
|
+
}
|