@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,99 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
FieldPresentationDefinition,
|
|
3
|
+
FieldValueIconDefinition,
|
|
4
|
+
FieldValueLabelDefinition,
|
|
5
|
+
FieldValueToneDefinition,
|
|
6
|
+
} from './module'
|
|
7
|
+
import {
|
|
8
|
+
readObjectPath,
|
|
9
|
+
} from './object-path'
|
|
10
|
+
|
|
11
|
+
export function resolvePresentationFieldValueLabel(
|
|
12
|
+
field: FieldPresentationDefinition | null | undefined,
|
|
13
|
+
value: unknown,
|
|
14
|
+
) {
|
|
15
|
+
return readDisplayValueLabel(field?.Display?.ValueLabels, value)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function resolvePresentationFieldValueTone(
|
|
19
|
+
field: FieldPresentationDefinition | null | undefined,
|
|
20
|
+
value: unknown,
|
|
21
|
+
resource?: unknown,
|
|
22
|
+
) {
|
|
23
|
+
return (
|
|
24
|
+
readFirstDisplayFieldPathValue(field?.Display?.ToneFieldPaths, resource) ??
|
|
25
|
+
readDisplayValueTone(field?.Display?.ValueTones, value) ??
|
|
26
|
+
field?.Display?.Tone ??
|
|
27
|
+
null
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function resolvePresentationFieldValueIcon(
|
|
32
|
+
field: FieldPresentationDefinition | null | undefined,
|
|
33
|
+
value: unknown,
|
|
34
|
+
) {
|
|
35
|
+
return readDisplayValueIcon(field?.Display?.ValueIcons, value)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function readDisplayValueLabel(
|
|
39
|
+
labels: readonly FieldValueLabelDefinition[] | null | undefined,
|
|
40
|
+
value: unknown,
|
|
41
|
+
) {
|
|
42
|
+
if (!labels) {
|
|
43
|
+
return null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const key = String(value)
|
|
47
|
+
return labels.find((label) =>
|
|
48
|
+
label.Value === key ||
|
|
49
|
+
label.Value.toLocaleLowerCase() === key.toLocaleLowerCase(),
|
|
50
|
+
)?.Label ?? null
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function readDisplayValueTone(
|
|
54
|
+
tones: readonly FieldValueToneDefinition[] | null | undefined,
|
|
55
|
+
value: unknown,
|
|
56
|
+
) {
|
|
57
|
+
if (!tones) {
|
|
58
|
+
return null
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const key = String(value)
|
|
62
|
+
return tones.find((tone) =>
|
|
63
|
+
tone.Value === key ||
|
|
64
|
+
tone.Value.toLocaleLowerCase() === key.toLocaleLowerCase(),
|
|
65
|
+
)?.Tone ?? null
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function readDisplayValueIcon(
|
|
69
|
+
icons: readonly FieldValueIconDefinition[] | null | undefined,
|
|
70
|
+
value: unknown,
|
|
71
|
+
) {
|
|
72
|
+
if (!icons) {
|
|
73
|
+
return null
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const key = String(value)
|
|
77
|
+
return icons.find((icon) =>
|
|
78
|
+
icon.Value === key ||
|
|
79
|
+
icon.Value.toLocaleLowerCase() === key.toLocaleLowerCase(),
|
|
80
|
+
)?.Icon ?? null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function readFirstDisplayFieldPathValue(
|
|
84
|
+
fieldPaths: readonly string[] | null | undefined,
|
|
85
|
+
resource: unknown,
|
|
86
|
+
) {
|
|
87
|
+
if (!fieldPaths || fieldPaths.length === 0) {
|
|
88
|
+
return null
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
for (const path of fieldPaths) {
|
|
92
|
+
const value = readObjectPath(resource, path)
|
|
93
|
+
if (value !== null && value !== undefined && value !== '') {
|
|
94
|
+
return String(value)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return null
|
|
99
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export * from './api-scope-request'
|
|
2
|
+
export * from './collection-chrome-runtime'
|
|
3
|
+
export * from './collection-chrome-icons'
|
|
4
|
+
export {
|
|
5
|
+
collectionChromeSlotAnyPlacement,
|
|
6
|
+
createCollectionChromeSlotRendererKey,
|
|
7
|
+
createCollectionChromeSlotRendererRegistry,
|
|
8
|
+
getCollectionChromeSlotRendererCandidateKeys,
|
|
9
|
+
getCollectionChromeSlotRendererRegistryKeys,
|
|
10
|
+
hasCollectionChromeSlotRendererBinding,
|
|
11
|
+
isCollectionChromeSlotKind,
|
|
12
|
+
isCollectionChromeSlotPlacement,
|
|
13
|
+
isCollectionChromeSlotPlacementValue,
|
|
14
|
+
resolveCollectionChromeSlotRenderer,
|
|
15
|
+
} from './collection-chrome-slot-renderer-registry'
|
|
16
|
+
export type {
|
|
17
|
+
CollectionChromeSlotRenderer,
|
|
18
|
+
CollectionChromeSlotRendererBinding,
|
|
19
|
+
CollectionChromeSlotRendererRegistry,
|
|
20
|
+
} from './collection-chrome-slot-renderer-registry'
|
|
21
|
+
export * from './collection-selection-state'
|
|
22
|
+
export * from './data-source-projection'
|
|
23
|
+
export * from './data-source-query-lowering'
|
|
24
|
+
export * from './date-time-filter-model'
|
|
25
|
+
export * from './document-module'
|
|
26
|
+
export * from './document-badge-icons'
|
|
27
|
+
export * from './document-summary-model'
|
|
28
|
+
export * from './document-workspace-chrome-projection'
|
|
29
|
+
export * from './document-workspace-surface-slots'
|
|
30
|
+
export * from './endpoint-executor'
|
|
31
|
+
export * from './field-display-resolution'
|
|
32
|
+
export * from './module'
|
|
33
|
+
export * from './navigation'
|
|
34
|
+
export * from './navigation-shell-frame-renderer-registry'
|
|
35
|
+
export * from './navigation-shell-layout-runtime'
|
|
36
|
+
export * from './navigation-shell-region-component-registry'
|
|
37
|
+
export * from './navigation-shell-runtime'
|
|
38
|
+
export * from './navigation-shell-slot-renderer-registry'
|
|
39
|
+
export * from './object-path'
|
|
40
|
+
export * from './page-host-renderer-registry'
|
|
41
|
+
export * from './presentation-action-icons'
|
|
42
|
+
export * from './presentation-action-endpoint'
|
|
43
|
+
export * from './presentation-action-endpoint-request-projection'
|
|
44
|
+
export * from './presentation-action-result-state'
|
|
45
|
+
export * from './presentation-action-runtime-binding'
|
|
46
|
+
export * from './presentation-action-runtime-diagnostics'
|
|
47
|
+
export * from './presentation-action-runtime-labels'
|
|
48
|
+
export * from './presentation-action-runtime-projection'
|
|
49
|
+
export * from './presentation-badge-resolution'
|
|
50
|
+
export * from './presentation-collection-pagination'
|
|
51
|
+
export * from './presentation-content-resolution'
|
|
52
|
+
export * from './presentation-content-diagnostics'
|
|
53
|
+
export * from './presentation-data-source-binding-model'
|
|
54
|
+
export * from './presentation-data-source-runtime'
|
|
55
|
+
export * from './presentation-design-intent-diagnostics'
|
|
56
|
+
export * from './presentation-icon-diagnostics'
|
|
57
|
+
export * from './presentation-icon-registry'
|
|
58
|
+
export * from './presentation-navigation-action-runtime-bindings'
|
|
59
|
+
export * from './presentation-pagination'
|
|
60
|
+
export * from './presentation-projection-diagnostics'
|
|
61
|
+
export * from './presentation-projection-coverage'
|
|
62
|
+
export * from './presentation-projection-trace'
|
|
63
|
+
export * from './presentation-query-form-state'
|
|
64
|
+
export * from './projected-query-form-runtime'
|
|
65
|
+
export * from './query-form-url-state'
|
|
66
|
+
export * from './presentation-renderer-registry'
|
|
67
|
+
export * from './presentation-semantics'
|
|
68
|
+
export * from './presentation-standards'
|
|
69
|
+
export * from './presentation-test-selectors'
|
|
70
|
+
export * from './presentation-value-formatting'
|
|
71
|
+
export * from './presentation-value-resolution'
|
|
72
|
+
export * from './presentation-view-tree'
|
|
73
|
+
export * from './prompt-document-preview-projection'
|
|
74
|
+
export * from './prompt-icons'
|
|
75
|
+
export * from './prompt-status-message-resolution'
|
|
76
|
+
export * from './projected-collection-action-runtime-bindings'
|
|
77
|
+
export * from './projected-collection-action-runtime-diagnostics'
|
|
78
|
+
export * from './projected-collection-runtime'
|
|
79
|
+
export * from './projected-action-status-projection'
|
|
80
|
+
export * from './projected-document-action-diagnostics'
|
|
81
|
+
export * from './projected-document-action-enablements'
|
|
82
|
+
export * from './projected-document-action-projection'
|
|
83
|
+
export * from './projected-document-action-runtime-profile'
|
|
84
|
+
export * from './projected-document-action-runtime-profile-diagnostics'
|
|
85
|
+
export * from './projected-document-action-status-notice-diagnostics'
|
|
86
|
+
export * from './projected-document-badge-formatting'
|
|
87
|
+
export * from './projected-document-editor-model'
|
|
88
|
+
export * from './projected-document-field-semantics'
|
|
89
|
+
export * from './projected-document-field-navigation'
|
|
90
|
+
export * from './projected-document-workspace-notice-diagnostics'
|
|
91
|
+
export * from './projected-document-workspace-data-source-bindings'
|
|
92
|
+
export * from './projected-activity-state-model'
|
|
93
|
+
export * from './projected-input-form-runtime'
|
|
94
|
+
export * from './projected-process-task-notice-diagnostics'
|
|
95
|
+
export * from './process-task-model'
|
|
96
|
+
export * from './process-task-projection'
|
|
97
|
+
export * from './query-offset-page'
|
|
98
|
+
export * from './query-form-lowering'
|
|
99
|
+
export * from './relation-query-input-form-target'
|
|
100
|
+
export * from './scope-selection'
|
|
101
|
+
export * from './target-bindings'
|
|
102
|
+
export * from './view-chrome-slot-renderer-registry'
|
|
103
|
+
export * from './view-chrome-icons'
|
|
104
|
+
export * from './view-chrome-content-diagnostics'
|
package/src/module.ts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { viewChromeSlotKinds } from '@cohesivesystems/presentation-contracts'
|
|
2
|
+
import {
|
|
3
|
+
createCollectionChromeRuntime,
|
|
4
|
+
resolveCollectionChromeDataSourceIds,
|
|
5
|
+
} from './collection-chrome-runtime'
|
|
6
|
+
import type {
|
|
7
|
+
ActionDefinition,
|
|
8
|
+
ActionPlacementDefinition,
|
|
9
|
+
DataSourceDefinition,
|
|
10
|
+
DocumentProfileDefinition,
|
|
11
|
+
FieldPresentationDefinition,
|
|
12
|
+
FlowDefinition,
|
|
13
|
+
InputFormDefinition,
|
|
14
|
+
NavigationDefinition,
|
|
15
|
+
QueryFormDefinition,
|
|
16
|
+
TargetBindingDefinition,
|
|
17
|
+
ViewDefinition,
|
|
18
|
+
WorkspaceDefinition,
|
|
19
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
20
|
+
|
|
21
|
+
export type {
|
|
22
|
+
ActionDefinition,
|
|
23
|
+
ActionEnablementCriterionDefinition,
|
|
24
|
+
ActionEndpointRequestProjectionDefinition,
|
|
25
|
+
ActionEndpointRequestValueBindingDefinition,
|
|
26
|
+
ActionPlacementDefinition,
|
|
27
|
+
ActionResultStateWriteDefinition,
|
|
28
|
+
CollectionChromeDefinition,
|
|
29
|
+
CollectionChromeSlotDefinition,
|
|
30
|
+
CollectionChromeSlotKind,
|
|
31
|
+
CollectionChromeSlotPlacement,
|
|
32
|
+
CollectionColumnDefinition,
|
|
33
|
+
CollectionDetailActivation,
|
|
34
|
+
CollectionRowActionDefinition,
|
|
35
|
+
CollectionRowActionParameterBindingDefinition,
|
|
36
|
+
CollectionSelectionActionDefinition,
|
|
37
|
+
CollectionSelectionActionParameterBindingDefinition,
|
|
38
|
+
CollectionSelectionActionParameterSource,
|
|
39
|
+
CollectionSelectionMode,
|
|
40
|
+
CollectionViewDefinition,
|
|
41
|
+
DataSourceDefinition,
|
|
42
|
+
DataSourceQueryDefinition,
|
|
43
|
+
DataSourceQueryEndpointBindingDefinition,
|
|
44
|
+
DataSourceQueryFieldDefinition,
|
|
45
|
+
DocumentActionStatusNoticeDefinition,
|
|
46
|
+
DocumentProcessTaskNoticeActionDefinition,
|
|
47
|
+
DocumentProcessTaskNoticeActionTargetKind,
|
|
48
|
+
DocumentProcessTaskNoticeDefinition,
|
|
49
|
+
DocumentProfileDefinition,
|
|
50
|
+
DocumentWorkspaceSurfaceSlotDefinition,
|
|
51
|
+
DocumentWorkspaceSurfaceSlotRole,
|
|
52
|
+
FieldDisplayOptions,
|
|
53
|
+
FieldEntityReferenceFallbackKind,
|
|
54
|
+
FieldJsonDisplayMode,
|
|
55
|
+
FieldPresentationDefinition,
|
|
56
|
+
FieldValueIconDefinition,
|
|
57
|
+
FieldValueLabelDefinition,
|
|
58
|
+
FieldValueToneDefinition,
|
|
59
|
+
FlowDefinition,
|
|
60
|
+
FlowStateDefinition,
|
|
61
|
+
FlowTransitionDefinition,
|
|
62
|
+
InputFormDefinition,
|
|
63
|
+
InputFormFieldDefinition,
|
|
64
|
+
InputFormGroupDefinition,
|
|
65
|
+
LayoutNodeDefinition,
|
|
66
|
+
LayoutNodeKind,
|
|
67
|
+
LayoutOrientation,
|
|
68
|
+
PresentationAnnotationDefinition,
|
|
69
|
+
PresentationBadgeDefinition,
|
|
70
|
+
PresentationBindingDefinition,
|
|
71
|
+
PresentationContentDefinition,
|
|
72
|
+
PresentationModuleDefinition,
|
|
73
|
+
PresentationValueDefinition,
|
|
74
|
+
ProcessTaskSelectorDefinition,
|
|
75
|
+
ProcessTaskSelectorMatchDefinition,
|
|
76
|
+
ProjectionDefinition,
|
|
77
|
+
PromptDismissPolicyDefinition,
|
|
78
|
+
PromptDocumentPreviewDefinition,
|
|
79
|
+
PromptStatusMessageDefinition,
|
|
80
|
+
QueryFormDefinition,
|
|
81
|
+
QueryFormUrlPolicyDefinition,
|
|
82
|
+
TargetBindingDefinition,
|
|
83
|
+
ViewChromeSlotDefinition,
|
|
84
|
+
ViewChromeSlotKind,
|
|
85
|
+
ViewChromeSlotPlacement,
|
|
86
|
+
ViewDefinition,
|
|
87
|
+
ViewRegionDefinition,
|
|
88
|
+
WorkspaceDefinition,
|
|
89
|
+
WorkspaceLayoutDefinition,
|
|
90
|
+
WorkspaceLayoutModeDefinition,
|
|
91
|
+
WorkspaceRefDefinition,
|
|
92
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
93
|
+
|
|
94
|
+
type IdentifiedDefinition = { readonly Id: string }
|
|
95
|
+
|
|
96
|
+
export function getDefaultNavigation<TNavigation extends NavigationDefinition>(
|
|
97
|
+
module: { readonly Navigation: readonly TNavigation[] } | null,
|
|
98
|
+
): TNavigation | null {
|
|
99
|
+
return module?.Navigation[0] ?? null
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function findPresentationView<TView extends ViewDefinition>(
|
|
103
|
+
module: { readonly Views: readonly ViewDefinition[] } | null,
|
|
104
|
+
viewId: string,
|
|
105
|
+
): TView | null {
|
|
106
|
+
return findById(module?.Views, viewId) as TView | null
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function findPresentationWorkspace<TWorkspace extends WorkspaceDefinition>(
|
|
110
|
+
module: { readonly Workspaces: readonly WorkspaceDefinition[] } | null,
|
|
111
|
+
workspaceId: string,
|
|
112
|
+
): TWorkspace | null {
|
|
113
|
+
return findById(module?.Workspaces, workspaceId) as TWorkspace | null
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function findPresentationDocumentProfile<TProfile extends DocumentProfileDefinition>(
|
|
117
|
+
workspace: { readonly DocumentProfiles: readonly DocumentProfileDefinition[] } | null,
|
|
118
|
+
documentProfileId: string,
|
|
119
|
+
): TProfile | null {
|
|
120
|
+
return findById(workspace?.DocumentProfiles, documentProfileId) as TProfile | null
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function findPresentationDataSource<TDataSource extends DataSourceDefinition>(
|
|
124
|
+
module: { readonly DataSources: readonly DataSourceDefinition[] } | null,
|
|
125
|
+
dataSourceId: string,
|
|
126
|
+
): TDataSource | null {
|
|
127
|
+
return findById(module?.DataSources, dataSourceId) as TDataSource | null
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function findPresentationQueryForm<TQueryForm extends QueryFormDefinition>(
|
|
131
|
+
module: { readonly QueryForms: readonly QueryFormDefinition[] } | null,
|
|
132
|
+
queryFormId: string,
|
|
133
|
+
): TQueryForm | null {
|
|
134
|
+
return findById(module?.QueryForms, queryFormId) as TQueryForm | null
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function findPresentationInputForm<TInputForm extends InputFormDefinition>(
|
|
138
|
+
module: { readonly InputForms: readonly InputFormDefinition[] } | null,
|
|
139
|
+
inputFormId: string,
|
|
140
|
+
): TInputForm | null {
|
|
141
|
+
return findById(module?.InputForms, inputFormId) as TInputForm | null
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function findPresentationInputFormForView<TInputForm extends InputFormDefinition>(
|
|
145
|
+
module: {
|
|
146
|
+
readonly InputForms: readonly InputFormDefinition[]
|
|
147
|
+
readonly QueryForms: readonly QueryFormDefinition[]
|
|
148
|
+
} | null,
|
|
149
|
+
view: Pick<ViewDefinition, 'Collection' | 'DataSourceIds' | 'Subject'> | null,
|
|
150
|
+
): TInputForm | null {
|
|
151
|
+
if (!view) {
|
|
152
|
+
return null
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const inputFormId = view.Subject.InputFormId
|
|
156
|
+
if (inputFormId) {
|
|
157
|
+
return findPresentationInputForm<TInputForm>(module, inputFormId)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const queryFormId = view.Subject.QueryFormId
|
|
161
|
+
if (queryFormId) {
|
|
162
|
+
const queryForm = findPresentationQueryForm(module, queryFormId)
|
|
163
|
+
return queryForm
|
|
164
|
+
? findPresentationInputForm<TInputForm>(module, queryForm.FormId)
|
|
165
|
+
: null
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const formDataSourceIds = new Set([
|
|
169
|
+
...view.DataSourceIds,
|
|
170
|
+
...(view.Subject.DataSourceId ? [view.Subject.DataSourceId] : []),
|
|
171
|
+
...resolveCollectionChromeDataSourceIds(view.Collection),
|
|
172
|
+
])
|
|
173
|
+
const inputForm = module?.InputForms.find((candidate) =>
|
|
174
|
+
formDataSourceIds.has(candidate.StateDataSourceId) ||
|
|
175
|
+
formDataSourceIds.has(candidate.Target.DataSourceId ?? ''),
|
|
176
|
+
)
|
|
177
|
+
return (inputForm as TInputForm | undefined) ?? null
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function findPresentationQueryFormForView<TQueryForm extends QueryFormDefinition>(
|
|
181
|
+
module: {
|
|
182
|
+
readonly InputForms: readonly InputFormDefinition[]
|
|
183
|
+
readonly QueryForms: readonly QueryFormDefinition[]
|
|
184
|
+
} | null,
|
|
185
|
+
view: Pick<ViewDefinition, 'Collection' | 'DataSourceIds' | 'Subject'> | null,
|
|
186
|
+
): TQueryForm | null {
|
|
187
|
+
if (!view) {
|
|
188
|
+
return null
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const queryFormId = view.Subject.QueryFormId
|
|
192
|
+
if (queryFormId) {
|
|
193
|
+
return findPresentationQueryForm<TQueryForm>(module, queryFormId)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const collectionQueryFormId = createCollectionChromeRuntime(view.Collection).queryFormSlot
|
|
197
|
+
?.QueryFormId
|
|
198
|
+
if (collectionQueryFormId) {
|
|
199
|
+
return findPresentationQueryForm<TQueryForm>(module, collectionQueryFormId)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const queryDataSourceIds = new Set([
|
|
203
|
+
...view.DataSourceIds,
|
|
204
|
+
...(view.Subject.DataSourceId ? [view.Subject.DataSourceId] : []),
|
|
205
|
+
...resolveCollectionChromeDataSourceIds(view.Collection),
|
|
206
|
+
])
|
|
207
|
+
const queryForm = module?.QueryForms.find((candidate) =>
|
|
208
|
+
queryDataSourceIds.has(candidate.Target.State.DraftDataSourceId) ||
|
|
209
|
+
queryDataSourceIds.has(candidate.Target.State.ResultDataSourceId) ||
|
|
210
|
+
queryDataSourceIds.has(candidate.Target.Result.DataSourceId) ||
|
|
211
|
+
queryDataSourceIds.has(findPresentationInputForm(module, candidate.FormId)?.StateDataSourceId ?? ''),
|
|
212
|
+
)
|
|
213
|
+
return (queryForm as TQueryForm | undefined) ?? null
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function findPresentationAction<TAction extends ActionDefinition>(
|
|
217
|
+
module: { readonly Actions: readonly ActionDefinition[] } | null,
|
|
218
|
+
actionId: string,
|
|
219
|
+
): TAction | null {
|
|
220
|
+
return findById(module?.Actions, actionId) as TAction | null
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function findPresentationFlow<TFlow extends FlowDefinition>(
|
|
224
|
+
module: { readonly Flows: readonly FlowDefinition[] } | null,
|
|
225
|
+
flowId: string,
|
|
226
|
+
): TFlow | null {
|
|
227
|
+
return findById(module?.Flows, flowId) as TFlow | null
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function findPresentationField<TField extends FieldPresentationDefinition>(
|
|
231
|
+
module: { readonly Fields: readonly FieldPresentationDefinition[] } | null,
|
|
232
|
+
fieldId: string,
|
|
233
|
+
): TField | null {
|
|
234
|
+
return findById(module?.Fields, fieldId) as TField | null
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function findPresentationFieldByFieldPath<TField extends FieldPresentationDefinition>(
|
|
238
|
+
module: { readonly Fields: readonly FieldPresentationDefinition[] } | null,
|
|
239
|
+
field: string,
|
|
240
|
+
): TField | null {
|
|
241
|
+
const match = module?.Fields.find((candidate) => candidate.Field === field)
|
|
242
|
+
return (match as TField | undefined) ?? null
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function findPresentationTargetBinding<TTarget extends TargetBindingDefinition>(
|
|
246
|
+
module: { readonly Targets: readonly TargetBindingDefinition[] } | null,
|
|
247
|
+
targetId: string,
|
|
248
|
+
): TTarget | null {
|
|
249
|
+
return findById(module?.Targets, targetId) as TTarget | null
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function resolvePresentationViewActionPlacements(
|
|
253
|
+
view: Pick<ViewDefinition, 'Actions' | 'Chrome'> | null,
|
|
254
|
+
): readonly ActionPlacementDefinition[] {
|
|
255
|
+
const chromeActions =
|
|
256
|
+
view?.Chrome?.Slots.filter((slot) => isActionsChromeSlotKind(slot.Kind))
|
|
257
|
+
.flatMap((slot) => slot.Actions) ?? []
|
|
258
|
+
const actionPlacements = [...chromeActions, ...(view?.Actions ?? [])]
|
|
259
|
+
const seen = new Set<string>()
|
|
260
|
+
|
|
261
|
+
return actionPlacements.filter((placement) => {
|
|
262
|
+
const key = `${placement.Region}:${placement.ActionId}`
|
|
263
|
+
if (seen.has(key)) {
|
|
264
|
+
return false
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
seen.add(key)
|
|
268
|
+
return true
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function findById<TDefinition extends IdentifiedDefinition>(
|
|
273
|
+
definitions: readonly TDefinition[] | null | undefined,
|
|
274
|
+
id: string,
|
|
275
|
+
) {
|
|
276
|
+
return definitions?.find((definition) => definition.Id === id) ?? null
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function isActionsChromeSlotKind(value: string | number) {
|
|
280
|
+
return value === viewChromeSlotKinds.actions || String(value).toLocaleLowerCase() === 'actions'
|
|
281
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
navigationShellKindLabels,
|
|
3
|
+
type NavigationShellKind,
|
|
4
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
5
|
+
|
|
6
|
+
export type NavigationShellFrameRendererRegistry<TRenderer = unknown> = Readonly<
|
|
7
|
+
Record<string, TRenderer>
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
export interface NavigationShellFrameRendererBinding<TRenderer = unknown> {
|
|
11
|
+
readonly kind: NavigationShellKind | string | number
|
|
12
|
+
readonly render: TRenderer
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function createNavigationShellFrameRendererRegistry<TRenderer>(
|
|
16
|
+
bindings: readonly NavigationShellFrameRendererBinding<TRenderer>[],
|
|
17
|
+
): NavigationShellFrameRendererRegistry<TRenderer> {
|
|
18
|
+
return Object.fromEntries(
|
|
19
|
+
bindings.map((binding) => [
|
|
20
|
+
createNavigationShellFrameRendererKey(binding.kind),
|
|
21
|
+
binding.render,
|
|
22
|
+
]),
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function createNavigationShellFrameRendererKey(
|
|
27
|
+
kind: NavigationShellKind | string | number,
|
|
28
|
+
) {
|
|
29
|
+
return normalizeNavigationShellKind(kind)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getNavigationShellFrameRendererRegistryKeys(
|
|
33
|
+
registry: NavigationShellFrameRendererRegistry | null | undefined,
|
|
34
|
+
) {
|
|
35
|
+
return Object.keys(registry ?? {})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function hasNavigationShellFrameRendererBinding(
|
|
39
|
+
keys: readonly string[],
|
|
40
|
+
kind: NavigationShellKind | string | number,
|
|
41
|
+
) {
|
|
42
|
+
return keys.includes(createNavigationShellFrameRendererKey(kind))
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function resolveNavigationShellFrameRenderer<TRenderer>(
|
|
46
|
+
registry: NavigationShellFrameRendererRegistry<TRenderer> | null | undefined,
|
|
47
|
+
kind: NavigationShellKind | string | number,
|
|
48
|
+
) {
|
|
49
|
+
return registry?.[createNavigationShellFrameRendererKey(kind)] ?? null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function normalizeNavigationShellKind(value: unknown) {
|
|
53
|
+
return normalizeGeneratedEnumToken(value, navigationShellKindLabels)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function normalizeGeneratedEnumToken(
|
|
57
|
+
value: unknown,
|
|
58
|
+
labels: Readonly<Record<number, string>>,
|
|
59
|
+
) {
|
|
60
|
+
const label = typeof value === 'number'
|
|
61
|
+
? labels[value] ?? String(value)
|
|
62
|
+
: String(value)
|
|
63
|
+
|
|
64
|
+
return label.replace(/[^a-z0-9]/gi, '').toLocaleLowerCase()
|
|
65
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
navigationShellKindLabels,
|
|
3
|
+
navigationShellSlotKinds,
|
|
4
|
+
type NavigationDefinition,
|
|
5
|
+
type NavigationShellSlotDefinition,
|
|
6
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
7
|
+
import {
|
|
8
|
+
hasNavigationShellFrameRendererBinding,
|
|
9
|
+
} from './navigation-shell-frame-renderer-registry'
|
|
10
|
+
import {
|
|
11
|
+
findNavigationShellSlot,
|
|
12
|
+
isNavigationShellSlotKind,
|
|
13
|
+
} from './navigation-shell-runtime'
|
|
14
|
+
import {
|
|
15
|
+
createPresentationProjectionDiagnostic,
|
|
16
|
+
type PresentationProjectionDiagnostic,
|
|
17
|
+
} from './presentation-projection-diagnostics'
|
|
18
|
+
|
|
19
|
+
export interface ProjectedNavigationShellLayout<
|
|
20
|
+
TFrameLayout = unknown,
|
|
21
|
+
TSlotLayout = unknown,
|
|
22
|
+
> {
|
|
23
|
+
readonly brandSlot: NavigationShellSlotDefinition | null
|
|
24
|
+
readonly frame: TFrameLayout
|
|
25
|
+
readonly primaryNavigationSlot: NavigationShellSlotDefinition | null
|
|
26
|
+
readonly routedContentSlot: NavigationShellSlotDefinition | null
|
|
27
|
+
readonly slotLayouts: Readonly<Record<string, TSlotLayout>>
|
|
28
|
+
readonly shellSlots: readonly NavigationShellSlotDefinition[]
|
|
29
|
+
readonly systemNoticeSlots: readonly NavigationShellSlotDefinition[]
|
|
30
|
+
readonly utilityActionSlots: readonly NavigationShellSlotDefinition[]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ResolveProjectedNavigationShellLayoutOptions<
|
|
34
|
+
TFrameLayout,
|
|
35
|
+
TSlotLayout,
|
|
36
|
+
> {
|
|
37
|
+
readonly navigation: NavigationDefinition
|
|
38
|
+
readonly resolveFrameLayout: (navigation: NavigationDefinition) => TFrameLayout
|
|
39
|
+
readonly resolveSlotLayout: (slot: NavigationShellSlotDefinition) => TSlotLayout
|
|
40
|
+
readonly shellSlots: readonly NavigationShellSlotDefinition[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface NavigationShellLayoutDiagnosticsOptions {
|
|
44
|
+
readonly navigation: NavigationDefinition
|
|
45
|
+
readonly shellFrameRendererKeys?: readonly string[]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Groups semantic shell slots and lets adapters attach their own layout
|
|
50
|
+
* interpretation without making core depend on CSS, React, or Tailwind.
|
|
51
|
+
*/
|
|
52
|
+
export function resolveProjectedNavigationShellLayout<
|
|
53
|
+
TFrameLayout,
|
|
54
|
+
TSlotLayout,
|
|
55
|
+
>({
|
|
56
|
+
navigation,
|
|
57
|
+
resolveFrameLayout,
|
|
58
|
+
resolveSlotLayout,
|
|
59
|
+
shellSlots,
|
|
60
|
+
}: ResolveProjectedNavigationShellLayoutOptions<
|
|
61
|
+
TFrameLayout,
|
|
62
|
+
TSlotLayout
|
|
63
|
+
>): ProjectedNavigationShellLayout<TFrameLayout, TSlotLayout> {
|
|
64
|
+
return {
|
|
65
|
+
brandSlot: findNavigationShellSlot(shellSlots, navigationShellSlotKinds.brand, 'Brand'),
|
|
66
|
+
frame: resolveFrameLayout(navigation),
|
|
67
|
+
primaryNavigationSlot: findNavigationShellSlot(
|
|
68
|
+
shellSlots,
|
|
69
|
+
navigationShellSlotKinds.primaryNavigation,
|
|
70
|
+
'PrimaryNavigation',
|
|
71
|
+
),
|
|
72
|
+
routedContentSlot: findNavigationShellSlot(
|
|
73
|
+
shellSlots,
|
|
74
|
+
navigationShellSlotKinds.routedContent,
|
|
75
|
+
'RoutedContent',
|
|
76
|
+
),
|
|
77
|
+
slotLayouts: Object.fromEntries(
|
|
78
|
+
shellSlots.map((slot) => [slot.Id, resolveSlotLayout(slot)]),
|
|
79
|
+
),
|
|
80
|
+
shellSlots,
|
|
81
|
+
systemNoticeSlots: shellSlots.filter((slot) =>
|
|
82
|
+
isNavigationShellSlotKind(slot, navigationShellSlotKinds.systemNotices, 'SystemNotices')),
|
|
83
|
+
utilityActionSlots: shellSlots.filter((slot) =>
|
|
84
|
+
isNavigationShellSlotKind(slot, navigationShellSlotKinds.utilityActions, 'UtilityActions')),
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function projectNavigationShellLayoutDiagnostics({
|
|
89
|
+
navigation,
|
|
90
|
+
shellFrameRendererKeys,
|
|
91
|
+
}: NavigationShellLayoutDiagnosticsOptions): readonly PresentationProjectionDiagnostic[] {
|
|
92
|
+
if (
|
|
93
|
+
!shellFrameRendererKeys ||
|
|
94
|
+
hasNavigationShellFrameRendererBinding(shellFrameRendererKeys, navigation.Shell.Kind)
|
|
95
|
+
) {
|
|
96
|
+
return []
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const kindLabel =
|
|
100
|
+
navigationShellKindLabels[navigation.Shell.Kind] ?? String(navigation.Shell.Kind)
|
|
101
|
+
|
|
102
|
+
return [
|
|
103
|
+
createPresentationProjectionDiagnostic({
|
|
104
|
+
category: 'missing-binding',
|
|
105
|
+
details: {
|
|
106
|
+
kind: navigation.Shell.Kind,
|
|
107
|
+
kindLabel,
|
|
108
|
+
},
|
|
109
|
+
id: `navigation-shell.${navigation.Shell.Id}.frame.missing-renderer`,
|
|
110
|
+
interpretation: {
|
|
111
|
+
status: 'unbound',
|
|
112
|
+
target: 'navigation-shell',
|
|
113
|
+
},
|
|
114
|
+
message: `Navigation shell '${navigation.Shell.Id}' has no frontend frame renderer for kind '${kindLabel}'.`,
|
|
115
|
+
severity: 'warning',
|
|
116
|
+
source: `navigation-shell:${navigation.Shell.Id}`,
|
|
117
|
+
subject: {
|
|
118
|
+
id: navigation.Shell.Id,
|
|
119
|
+
kind: 'NavigationShellDefinition',
|
|
120
|
+
},
|
|
121
|
+
suggestedNextStep: 'Register a shell frame renderer for this shell kind.',
|
|
122
|
+
}),
|
|
123
|
+
]
|
|
124
|
+
}
|