@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,464 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ActionDefinition,
|
|
3
|
+
ActionPlacementDefinition,
|
|
4
|
+
InputFormDefinition,
|
|
5
|
+
PresentationModuleDefinition,
|
|
6
|
+
ViewDefinition,
|
|
7
|
+
} from './module'
|
|
8
|
+
import {
|
|
9
|
+
findPresentationAction,
|
|
10
|
+
} from './module'
|
|
11
|
+
import {
|
|
12
|
+
createPresentationEnumDiscriminator,
|
|
13
|
+
matchesPresentationEnum,
|
|
14
|
+
} from './target-bindings'
|
|
15
|
+
import {
|
|
16
|
+
actionSemanticsKinds,
|
|
17
|
+
actionKinds,
|
|
18
|
+
actionScopeKinds,
|
|
19
|
+
documentWorkspaceActionKinds,
|
|
20
|
+
localDocumentEditorActionKinds,
|
|
21
|
+
presentationBindingKinds,
|
|
22
|
+
preparationKinds,
|
|
23
|
+
type DocumentWorkspaceActionKind,
|
|
24
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
25
|
+
|
|
26
|
+
export interface ProjectedDocumentAction {
|
|
27
|
+
readonly action: ActionDefinition
|
|
28
|
+
readonly placement: ActionPlacementDefinition
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DocumentProfileActionProjectionOptions {
|
|
32
|
+
readonly actionId?: string | null
|
|
33
|
+
readonly actionPlacements: readonly ActionPlacementDefinition[]
|
|
34
|
+
readonly dataSourceId: string
|
|
35
|
+
readonly flowId?: string | null
|
|
36
|
+
readonly module: Pick<PresentationModuleDefinition, 'Actions'> | null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface PromptActionProjectionOptions {
|
|
40
|
+
readonly module: Pick<PresentationModuleDefinition, 'Actions'> | null
|
|
41
|
+
readonly view: ViewDefinition | null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type LocalDocumentEditorActionIntent = 'format' | 'reset'
|
|
45
|
+
|
|
46
|
+
export type PromptLocalActionIntent = 'revert'
|
|
47
|
+
|
|
48
|
+
/** Finds the profile action that saves the active JSON document resource. */
|
|
49
|
+
export function findDocumentSaveAction({
|
|
50
|
+
actionPlacements,
|
|
51
|
+
dataSourceId,
|
|
52
|
+
module,
|
|
53
|
+
}: DocumentProfileActionProjectionOptions): ActionDefinition | null {
|
|
54
|
+
const placedActions = resolvePlacedActions(module, actionPlacements)
|
|
55
|
+
const semanticMatch = placedActions.find(({ action }) =>
|
|
56
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
57
|
+
action,
|
|
58
|
+
documentWorkspaceActionKinds.saveReview,
|
|
59
|
+
) &&
|
|
60
|
+
hasEndpointRequestForDataSource(action, dataSourceId)
|
|
61
|
+
)
|
|
62
|
+
if (semanticMatch) {
|
|
63
|
+
return semanticMatch.action
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return placedActions.find(({ action }) =>
|
|
67
|
+
isPreviewFlowAction(action) &&
|
|
68
|
+
hasEndpointRequestForDataSource(action, dataSourceId) &&
|
|
69
|
+
hasEndpointRequestSource(action, 'document.value'),
|
|
70
|
+
)?.action ?? null
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Finds a long-running profile preview action whose endpoint request is driven
|
|
75
|
+
* by input-form state rather than the current document value.
|
|
76
|
+
*/
|
|
77
|
+
export function findDocumentProcessPreviewAction({
|
|
78
|
+
actionId,
|
|
79
|
+
actionPlacements,
|
|
80
|
+
dataSourceId,
|
|
81
|
+
flowId,
|
|
82
|
+
module,
|
|
83
|
+
}: DocumentProfileActionProjectionOptions): ActionDefinition | null {
|
|
84
|
+
return findDocumentProcessPreviewActions({
|
|
85
|
+
actionId,
|
|
86
|
+
actionPlacements,
|
|
87
|
+
dataSourceId,
|
|
88
|
+
flowId,
|
|
89
|
+
module,
|
|
90
|
+
})[0] ?? null
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Finds long-running profile preview actions whose endpoint requests are driven
|
|
95
|
+
* by input-form state rather than the current document value.
|
|
96
|
+
*/
|
|
97
|
+
export function findDocumentProcessPreviewActions({
|
|
98
|
+
actionId,
|
|
99
|
+
actionPlacements,
|
|
100
|
+
dataSourceId,
|
|
101
|
+
flowId,
|
|
102
|
+
module,
|
|
103
|
+
}: DocumentProfileActionProjectionOptions): readonly ActionDefinition[] {
|
|
104
|
+
const placedActions = resolvePlacedActions(module, actionPlacements)
|
|
105
|
+
const semanticMatches = placedActions
|
|
106
|
+
.filter(({ action }) =>
|
|
107
|
+
matchesActionId(action, actionId) &&
|
|
108
|
+
matchesActionFlow(action, flowId) &&
|
|
109
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
110
|
+
action,
|
|
111
|
+
documentWorkspaceActionKinds.processPreview,
|
|
112
|
+
) &&
|
|
113
|
+
hasEndpointRequestForDataSource(action, dataSourceId),
|
|
114
|
+
)
|
|
115
|
+
.map(({ action }) => action)
|
|
116
|
+
if (semanticMatches.length > 0) {
|
|
117
|
+
return semanticMatches
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return placedActions
|
|
121
|
+
.filter(({ action }) =>
|
|
122
|
+
matchesActionId(action, actionId) &&
|
|
123
|
+
matchesActionFlow(action, flowId) &&
|
|
124
|
+
isPreviewFlowAction(action) &&
|
|
125
|
+
Boolean(action.Execution?.IsLongRunning) &&
|
|
126
|
+
hasEndpointRequestForDataSource(action, dataSourceId) &&
|
|
127
|
+
hasEndpointRequestSourcePrefix(action, 'input.'),
|
|
128
|
+
)
|
|
129
|
+
.map(({ action }) => action)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Finds an entity-scoped local editor action such as reset or format. */
|
|
133
|
+
export function findLocalDocumentEditorAction({
|
|
134
|
+
actionPlacements,
|
|
135
|
+
intent,
|
|
136
|
+
module,
|
|
137
|
+
}: Omit<DocumentProfileActionProjectionOptions, 'dataSourceId'> & {
|
|
138
|
+
readonly intent: LocalDocumentEditorActionIntent
|
|
139
|
+
}): ActionDefinition | null {
|
|
140
|
+
const placedActions = resolvePlacedActions(module, actionPlacements)
|
|
141
|
+
const semanticMatch = placedActions.find(({ action }) =>
|
|
142
|
+
matchesLocalDocumentEditorActionSemantics(action, intent),
|
|
143
|
+
)
|
|
144
|
+
if (semanticMatch) {
|
|
145
|
+
return semanticMatch.action
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return placedActions.find(({ action, placement }) =>
|
|
149
|
+
matchesPresentationEnum(action.Kind, localStateActionKind) &&
|
|
150
|
+
matchesPresentationEnum(action.Scope, entityActionScopeKind) &&
|
|
151
|
+
matchesPresentationEnum(action.Binding.Kind, localStateBindingKind) &&
|
|
152
|
+
matchesActionIntent(action, placement, intent),
|
|
153
|
+
)?.action ?? null
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** Finds a prompt's explicit dismiss action from PromptDismiss semantics. */
|
|
157
|
+
export function findPromptDismissAction({
|
|
158
|
+
module,
|
|
159
|
+
view,
|
|
160
|
+
}: PromptActionProjectionOptions): ActionDefinition | null {
|
|
161
|
+
const actionId = view?.PromptDismiss?.DismissActionId
|
|
162
|
+
const explicitAction = actionId
|
|
163
|
+
? findPresentationAction<ActionDefinition>(module, actionId)
|
|
164
|
+
: null
|
|
165
|
+
if (explicitAction) {
|
|
166
|
+
return explicitAction
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return resolvePromptActions(module, view).find(({ action }) =>
|
|
170
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
171
|
+
action,
|
|
172
|
+
documentWorkspaceActionKinds.saveCancel,
|
|
173
|
+
) ||
|
|
174
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
175
|
+
action,
|
|
176
|
+
documentWorkspaceActionKinds.processCancel,
|
|
177
|
+
),
|
|
178
|
+
)?.action ?? null
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** Finds the primary prompt action that commits or accepts the prompt. */
|
|
182
|
+
export function findPromptCommitAction({
|
|
183
|
+
module,
|
|
184
|
+
view,
|
|
185
|
+
}: PromptActionProjectionOptions): ActionDefinition | null {
|
|
186
|
+
const dismissActionId = view?.PromptDismiss?.DismissActionId
|
|
187
|
+
const promptActions = resolvePromptActions(module, view)
|
|
188
|
+
const semanticMatch = promptActions.find(({ action }) =>
|
|
189
|
+
action.Id !== dismissActionId &&
|
|
190
|
+
(
|
|
191
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
192
|
+
action,
|
|
193
|
+
documentWorkspaceActionKinds.saveCommit,
|
|
194
|
+
) ||
|
|
195
|
+
matchesDocumentWorkspaceActionSemantics(
|
|
196
|
+
action,
|
|
197
|
+
documentWorkspaceActionKinds.processStart,
|
|
198
|
+
)
|
|
199
|
+
),
|
|
200
|
+
)
|
|
201
|
+
if (semanticMatch) {
|
|
202
|
+
return semanticMatch.action
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return promptActions.find(({ action, placement }) =>
|
|
206
|
+
action.Id !== dismissActionId &&
|
|
207
|
+
(
|
|
208
|
+
matchesPresentationEnum(action.Kind, transitionActionKind) ||
|
|
209
|
+
matchesPresentationEnum(action.Kind, processStartActionKind)
|
|
210
|
+
) &&
|
|
211
|
+
(
|
|
212
|
+
placement.Intent === 'primary' ||
|
|
213
|
+
action.Execution?.RequiresConfirmation ||
|
|
214
|
+
matchesPresentationEnum(action.Kind, processStartActionKind)
|
|
215
|
+
),
|
|
216
|
+
)?.action ?? null
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Finds a secondary prompt-local action by semantic intent. */
|
|
220
|
+
export function findPromptLocalAction({
|
|
221
|
+
intent,
|
|
222
|
+
module,
|
|
223
|
+
view,
|
|
224
|
+
}: PromptActionProjectionOptions & {
|
|
225
|
+
readonly intent: PromptLocalActionIntent
|
|
226
|
+
}): ActionDefinition | null {
|
|
227
|
+
const dismissActionId = view?.PromptDismiss?.DismissActionId
|
|
228
|
+
const promptActions = resolvePromptActions(module, view)
|
|
229
|
+
const semanticKind = documentWorkspaceActionKindByPromptLocalIntent[intent]
|
|
230
|
+
const semanticMatch = promptActions.find(({ action }) =>
|
|
231
|
+
action.Id !== dismissActionId &&
|
|
232
|
+
matchesDocumentWorkspaceActionSemantics(action, semanticKind),
|
|
233
|
+
)
|
|
234
|
+
if (semanticMatch) {
|
|
235
|
+
return semanticMatch.action
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return promptActions.find(({ action, placement }) =>
|
|
239
|
+
action.Id !== dismissActionId &&
|
|
240
|
+
matchesPresentationEnum(action.Scope, flowActionScopeKind) &&
|
|
241
|
+
matchesPresentationEnum(action.Binding.Kind, flowEventBindingKind) &&
|
|
242
|
+
matchesActionIntent(action, placement, intent),
|
|
243
|
+
)?.action ?? null
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** Resolves the input-form placement that invokes a given semantic action. */
|
|
247
|
+
export function findInputFormActionPlacement(
|
|
248
|
+
inputForm: InputFormDefinition | null,
|
|
249
|
+
action: ActionDefinition | null,
|
|
250
|
+
): ActionPlacementDefinition | null {
|
|
251
|
+
if (!inputForm) {
|
|
252
|
+
return null
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return (
|
|
256
|
+
inputForm.Actions.find((candidate) => candidate.ActionId === action?.Id) ??
|
|
257
|
+
inputForm.Actions[0] ??
|
|
258
|
+
null
|
|
259
|
+
)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function resolvePlacedActions(
|
|
263
|
+
module: Pick<PresentationModuleDefinition, 'Actions'> | null,
|
|
264
|
+
actionPlacements: readonly ActionPlacementDefinition[],
|
|
265
|
+
): readonly ProjectedDocumentAction[] {
|
|
266
|
+
return actionPlacements.flatMap((placement) => {
|
|
267
|
+
const action = findPresentationAction<ActionDefinition>(module, placement.ActionId)
|
|
268
|
+
return action ? [{ action, placement }] : []
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function resolvePromptActions(
|
|
273
|
+
module: Pick<PresentationModuleDefinition, 'Actions'> | null,
|
|
274
|
+
view: ViewDefinition | null,
|
|
275
|
+
): readonly ProjectedDocumentAction[] {
|
|
276
|
+
return resolvePlacedActions(module, view?.Actions ?? [])
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function isPreviewFlowAction(action: ActionDefinition) {
|
|
280
|
+
return (
|
|
281
|
+
matchesPresentationEnum(action.Kind, flowActionKind) &&
|
|
282
|
+
matchesPresentationEnum(action.Preparation?.Kind ?? '', previewFlowPreparationKind)
|
|
283
|
+
)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function hasEndpointRequestForDataSource(
|
|
287
|
+
action: ActionDefinition,
|
|
288
|
+
dataSourceId: string,
|
|
289
|
+
) {
|
|
290
|
+
return action.EndpointRequests.some((request) =>
|
|
291
|
+
!request.DataSourceId || request.DataSourceId === dataSourceId,
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function hasEndpointRequestSource(action: ActionDefinition, source: string) {
|
|
296
|
+
return action.EndpointRequests.some((request) =>
|
|
297
|
+
request.BodyFields.some((binding) => binding.Source.Field === source),
|
|
298
|
+
)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function hasEndpointRequestSourcePrefix(action: ActionDefinition, prefix: string) {
|
|
302
|
+
return action.EndpointRequests.some((request) =>
|
|
303
|
+
request.BodyFields.some((binding) => binding.Source.Field?.startsWith(prefix)),
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function matchesActionId(
|
|
308
|
+
action: Pick<ActionDefinition, 'Id'>,
|
|
309
|
+
actionId: string | null | undefined,
|
|
310
|
+
) {
|
|
311
|
+
return !actionId || action.Id === actionId
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function matchesActionFlow(
|
|
315
|
+
action: ActionDefinition,
|
|
316
|
+
flowId: string | null | undefined,
|
|
317
|
+
) {
|
|
318
|
+
return !flowId || action.Preparation?.FlowId === flowId
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function matchesActionIntent(
|
|
322
|
+
action: ActionDefinition,
|
|
323
|
+
placement: ActionPlacementDefinition,
|
|
324
|
+
intent: string,
|
|
325
|
+
) {
|
|
326
|
+
return [
|
|
327
|
+
action.Id,
|
|
328
|
+
action.Name,
|
|
329
|
+
action.Binding.Id,
|
|
330
|
+
placement.Label,
|
|
331
|
+
...action.Annotations.flatMap((annotation) => [
|
|
332
|
+
annotation.Name,
|
|
333
|
+
typeof annotation.Value === 'string' ? annotation.Value : '',
|
|
334
|
+
]),
|
|
335
|
+
].some((value) => normalizeActionToken(value).includes(intent))
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function matchesLocalDocumentEditorActionSemantics(
|
|
339
|
+
action: ActionDefinition,
|
|
340
|
+
intent: LocalDocumentEditorActionIntent,
|
|
341
|
+
) {
|
|
342
|
+
if (
|
|
343
|
+
!action.Semantics ||
|
|
344
|
+
!matchesPresentationEnum(action.Semantics.Kind, localDocumentEditorActionSemanticsKind)
|
|
345
|
+
) {
|
|
346
|
+
return false
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const localDocumentEditor = action.Semantics.LocalDocumentEditor
|
|
350
|
+
if (!localDocumentEditor) {
|
|
351
|
+
return false
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
return matchesPresentationEnum(
|
|
355
|
+
localDocumentEditor.Kind,
|
|
356
|
+
localDocumentEditorActionKindByIntent[intent],
|
|
357
|
+
)
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function matchesDocumentWorkspaceActionSemantics(
|
|
361
|
+
action: ActionDefinition,
|
|
362
|
+
kind: DocumentWorkspaceActionKind,
|
|
363
|
+
) {
|
|
364
|
+
if (
|
|
365
|
+
!action.Semantics ||
|
|
366
|
+
!matchesPresentationEnum(action.Semantics.Kind, documentWorkspaceActionSemanticsKind)
|
|
367
|
+
) {
|
|
368
|
+
return false
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const documentWorkspace = action.Semantics.DocumentWorkspace
|
|
372
|
+
if (!documentWorkspace) {
|
|
373
|
+
return false
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return matchesPresentationEnum(documentWorkspace.Kind, { value: kind })
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function normalizeActionToken(value: string | null | undefined) {
|
|
380
|
+
return (value ?? '').replace(/[^a-zA-Z0-9]+/g, '').toLocaleLowerCase()
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const localDocumentEditorActionSemanticsKind = createPresentationEnumDiscriminator(
|
|
384
|
+
actionSemanticsKinds,
|
|
385
|
+
'localDocumentEditor',
|
|
386
|
+
'LocalDocumentEditor',
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
const documentWorkspaceActionSemanticsKind = createPresentationEnumDiscriminator(
|
|
390
|
+
actionSemanticsKinds,
|
|
391
|
+
'documentWorkspace',
|
|
392
|
+
'DocumentWorkspace',
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
const localDocumentEditorActionKindByIntent = {
|
|
396
|
+
format: createPresentationEnumDiscriminator(
|
|
397
|
+
localDocumentEditorActionKinds,
|
|
398
|
+
'format',
|
|
399
|
+
'Format',
|
|
400
|
+
),
|
|
401
|
+
reset: createPresentationEnumDiscriminator(
|
|
402
|
+
localDocumentEditorActionKinds,
|
|
403
|
+
'reset',
|
|
404
|
+
'Reset',
|
|
405
|
+
),
|
|
406
|
+
} as const
|
|
407
|
+
|
|
408
|
+
const documentWorkspaceActionKindByPromptLocalIntent = {
|
|
409
|
+
revert: documentWorkspaceActionKinds.saveRevert,
|
|
410
|
+
} as const
|
|
411
|
+
|
|
412
|
+
const entityActionScopeKind = createPresentationEnumDiscriminator(
|
|
413
|
+
actionScopeKinds,
|
|
414
|
+
'entity',
|
|
415
|
+
'Entity',
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
const flowActionScopeKind = createPresentationEnumDiscriminator(
|
|
419
|
+
actionScopeKinds,
|
|
420
|
+
'flow',
|
|
421
|
+
'Flow',
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
const flowActionKind = createPresentationEnumDiscriminator(
|
|
425
|
+
actionKinds,
|
|
426
|
+
'flowAction',
|
|
427
|
+
'FlowAction',
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
const localStateActionKind = createPresentationEnumDiscriminator(
|
|
431
|
+
actionKinds,
|
|
432
|
+
'localStateAction',
|
|
433
|
+
'LocalStateAction',
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
const processStartActionKind = createPresentationEnumDiscriminator(
|
|
437
|
+
actionKinds,
|
|
438
|
+
'processStartAction',
|
|
439
|
+
'ProcessStartAction',
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
const transitionActionKind = createPresentationEnumDiscriminator(
|
|
443
|
+
actionKinds,
|
|
444
|
+
'transitionAction',
|
|
445
|
+
'TransitionAction',
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
const flowEventBindingKind = createPresentationEnumDiscriminator(
|
|
449
|
+
presentationBindingKinds,
|
|
450
|
+
'flowEvent',
|
|
451
|
+
'FlowEvent',
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
const localStateBindingKind = createPresentationEnumDiscriminator(
|
|
455
|
+
presentationBindingKinds,
|
|
456
|
+
'localState',
|
|
457
|
+
'LocalState',
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
const previewFlowPreparationKind = createPresentationEnumDiscriminator(
|
|
461
|
+
preparationKinds,
|
|
462
|
+
'previewFlow',
|
|
463
|
+
'PreviewFlow',
|
|
464
|
+
)
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DocumentProfileProjection,
|
|
3
|
+
} from './document-module'
|
|
4
|
+
import type {
|
|
5
|
+
ActionDefinition,
|
|
6
|
+
ActionPlacementDefinition,
|
|
7
|
+
PresentationModuleDefinition,
|
|
8
|
+
} from './module'
|
|
9
|
+
import {
|
|
10
|
+
findPresentationAction,
|
|
11
|
+
} from './module'
|
|
12
|
+
import type {
|
|
13
|
+
PresentationProjectionDiagnostic,
|
|
14
|
+
} from './presentation-projection-diagnostics'
|
|
15
|
+
import {
|
|
16
|
+
findDocumentProcessPreviewActions,
|
|
17
|
+
} from './projected-document-action-projection'
|
|
18
|
+
|
|
19
|
+
export interface ProjectDocumentActionRuntimeProfileDiagnosticsOptions {
|
|
20
|
+
readonly actionPlacements: readonly ActionPlacementDefinition[]
|
|
21
|
+
readonly dataSourceId: string
|
|
22
|
+
readonly documentProfile: Pick<
|
|
23
|
+
DocumentProfileProjection,
|
|
24
|
+
'ActionRuntimeProfiles' | 'Id' | 'Name'
|
|
25
|
+
>
|
|
26
|
+
readonly module: Pick<PresentationModuleDefinition, 'Actions'> | null
|
|
27
|
+
readonly source?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Reports process-preview actions that are declared on a document profile but
|
|
32
|
+
* have no matching document action runtime profile.
|
|
33
|
+
*/
|
|
34
|
+
export function projectDocumentActionRuntimeProfileDiagnostics({
|
|
35
|
+
actionPlacements,
|
|
36
|
+
dataSourceId,
|
|
37
|
+
documentProfile,
|
|
38
|
+
module,
|
|
39
|
+
source = 'document-action-runtime-profile-projection',
|
|
40
|
+
}: ProjectDocumentActionRuntimeProfileDiagnosticsOptions): readonly PresentationProjectionDiagnostic[] {
|
|
41
|
+
const actionRuntimeProfiles = documentProfile.ActionRuntimeProfiles ?? []
|
|
42
|
+
const placedActionIds = new Set(actionPlacements.map((placement) => placement.ActionId))
|
|
43
|
+
const profiledActionIds = new Set(
|
|
44
|
+
actionRuntimeProfiles.map((profile) => profile.ActionId),
|
|
45
|
+
)
|
|
46
|
+
const processPreviewActions = distinctActionsById(
|
|
47
|
+
findDocumentProcessPreviewActions({
|
|
48
|
+
actionPlacements,
|
|
49
|
+
dataSourceId,
|
|
50
|
+
module,
|
|
51
|
+
}),
|
|
52
|
+
)
|
|
53
|
+
const processPreviewActionIds = new Set(processPreviewActions.map((action) => action.Id))
|
|
54
|
+
|
|
55
|
+
const missingProfileDiagnostics = processPreviewActions
|
|
56
|
+
.filter((action) => !profiledActionIds.has(action.Id))
|
|
57
|
+
.map((action) =>
|
|
58
|
+
createMissingActionRuntimeProfileDiagnostic({
|
|
59
|
+
action,
|
|
60
|
+
documentProfile,
|
|
61
|
+
source,
|
|
62
|
+
}),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
const invalidProfileDiagnostics = actionRuntimeProfiles.flatMap((profile) => {
|
|
66
|
+
const action = findPresentationAction<ActionDefinition>(module, profile.ActionId)
|
|
67
|
+
if (!action) {
|
|
68
|
+
return [
|
|
69
|
+
createInvalidActionRuntimeProfileDiagnostic({
|
|
70
|
+
details: {
|
|
71
|
+
actionId: profile.ActionId,
|
|
72
|
+
documentProfileId: documentProfile.Id,
|
|
73
|
+
runtimeProfileId: profile.Id,
|
|
74
|
+
},
|
|
75
|
+
documentProfile,
|
|
76
|
+
message:
|
|
77
|
+
`Document action runtime profile '${profile.Name ?? profile.Id}' references ` +
|
|
78
|
+
`action '${profile.ActionId}', but that action is not present in the catalog.`,
|
|
79
|
+
reason: 'missing-action',
|
|
80
|
+
severity: 'error',
|
|
81
|
+
source,
|
|
82
|
+
subject: {
|
|
83
|
+
id: profile.Id,
|
|
84
|
+
kind: 'document-action-runtime-profile',
|
|
85
|
+
name: profile.Name,
|
|
86
|
+
},
|
|
87
|
+
}),
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (!placedActionIds.has(profile.ActionId)) {
|
|
92
|
+
return [
|
|
93
|
+
createInvalidActionRuntimeProfileDiagnostic({
|
|
94
|
+
details: {
|
|
95
|
+
actionId: profile.ActionId,
|
|
96
|
+
documentProfileId: documentProfile.Id,
|
|
97
|
+
runtimeProfileId: profile.Id,
|
|
98
|
+
},
|
|
99
|
+
documentProfile,
|
|
100
|
+
message:
|
|
101
|
+
`Document action runtime profile '${profile.Name ?? profile.Id}' references ` +
|
|
102
|
+
`action '${action.Name}', but that action is not placed on this document profile.`,
|
|
103
|
+
reason: 'unplaced-action',
|
|
104
|
+
severity: 'warning',
|
|
105
|
+
source,
|
|
106
|
+
subject: {
|
|
107
|
+
id: profile.ActionId,
|
|
108
|
+
kind: 'action',
|
|
109
|
+
name: action.Name,
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!processPreviewActionIds.has(profile.ActionId)) {
|
|
116
|
+
return [
|
|
117
|
+
createInvalidActionRuntimeProfileDiagnostic({
|
|
118
|
+
details: {
|
|
119
|
+
actionId: profile.ActionId,
|
|
120
|
+
bindingKind: action.Binding.Kind,
|
|
121
|
+
documentProfileId: documentProfile.Id,
|
|
122
|
+
flowId: action.Preparation?.FlowId ?? null,
|
|
123
|
+
kind: action.Kind,
|
|
124
|
+
runtimeProfileId: profile.Id,
|
|
125
|
+
},
|
|
126
|
+
documentProfile,
|
|
127
|
+
message:
|
|
128
|
+
`Document action runtime profile '${profile.Name ?? profile.Id}' references ` +
|
|
129
|
+
`action '${action.Name}', but that action is not a document process-preview action.`,
|
|
130
|
+
reason: 'unsupported-action',
|
|
131
|
+
severity: 'warning',
|
|
132
|
+
source,
|
|
133
|
+
subject: {
|
|
134
|
+
id: profile.ActionId,
|
|
135
|
+
kind: 'action',
|
|
136
|
+
name: action.Name,
|
|
137
|
+
},
|
|
138
|
+
}),
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (
|
|
143
|
+
profile.FlowId &&
|
|
144
|
+
action.Preparation?.FlowId &&
|
|
145
|
+
profile.FlowId !== action.Preparation.FlowId
|
|
146
|
+
) {
|
|
147
|
+
return [
|
|
148
|
+
createInvalidActionRuntimeProfileDiagnostic({
|
|
149
|
+
details: {
|
|
150
|
+
actionFlowId: action.Preparation.FlowId,
|
|
151
|
+
actionId: profile.ActionId,
|
|
152
|
+
documentProfileId: documentProfile.Id,
|
|
153
|
+
runtimeProfileFlowId: profile.FlowId,
|
|
154
|
+
runtimeProfileId: profile.Id,
|
|
155
|
+
},
|
|
156
|
+
documentProfile,
|
|
157
|
+
message:
|
|
158
|
+
`Document action runtime profile '${profile.Name ?? profile.Id}' declares flow ` +
|
|
159
|
+
`'${profile.FlowId}', but action '${action.Name}' prepares flow ` +
|
|
160
|
+
`'${action.Preparation.FlowId}'.`,
|
|
161
|
+
reason: 'flow-mismatch',
|
|
162
|
+
severity: 'error',
|
|
163
|
+
source,
|
|
164
|
+
subject: {
|
|
165
|
+
id: profile.ActionId,
|
|
166
|
+
kind: 'action',
|
|
167
|
+
name: action.Name,
|
|
168
|
+
},
|
|
169
|
+
}),
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return []
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
return [
|
|
177
|
+
...missingProfileDiagnostics,
|
|
178
|
+
...invalidProfileDiagnostics,
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function createMissingActionRuntimeProfileDiagnostic({
|
|
183
|
+
action,
|
|
184
|
+
documentProfile,
|
|
185
|
+
source,
|
|
186
|
+
}: {
|
|
187
|
+
readonly action: ActionDefinition
|
|
188
|
+
readonly documentProfile: Pick<DocumentProfileProjection, 'Id' | 'Name'>
|
|
189
|
+
readonly source: string
|
|
190
|
+
}): PresentationProjectionDiagnostic {
|
|
191
|
+
return {
|
|
192
|
+
details: {
|
|
193
|
+
actionId: action.Id,
|
|
194
|
+
documentProfileId: documentProfile.Id,
|
|
195
|
+
flowId: action.Preparation?.FlowId ?? null,
|
|
196
|
+
},
|
|
197
|
+
id: `document-action-runtime-profile.${documentProfile.Id}.${action.Id}.missing`,
|
|
198
|
+
message:
|
|
199
|
+
`Document profile '${documentProfile.Name ?? documentProfile.Id}' places ` +
|
|
200
|
+
`process-preview action '${action.Name}', but does not declare an action runtime profile.`,
|
|
201
|
+
severity: 'warning',
|
|
202
|
+
source,
|
|
203
|
+
subject: {
|
|
204
|
+
id: action.Id,
|
|
205
|
+
kind: 'action',
|
|
206
|
+
name: action.Name,
|
|
207
|
+
},
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function createInvalidActionRuntimeProfileDiagnostic({
|
|
212
|
+
details,
|
|
213
|
+
documentProfile,
|
|
214
|
+
message,
|
|
215
|
+
reason,
|
|
216
|
+
severity,
|
|
217
|
+
source,
|
|
218
|
+
subject,
|
|
219
|
+
}: {
|
|
220
|
+
readonly details: Readonly<Record<string, unknown>>
|
|
221
|
+
readonly documentProfile: Pick<DocumentProfileProjection, 'Id'>
|
|
222
|
+
readonly message: string
|
|
223
|
+
readonly reason: string
|
|
224
|
+
readonly severity: PresentationProjectionDiagnostic['severity']
|
|
225
|
+
readonly source: string
|
|
226
|
+
readonly subject: PresentationProjectionDiagnostic['subject']
|
|
227
|
+
}): PresentationProjectionDiagnostic {
|
|
228
|
+
return {
|
|
229
|
+
details,
|
|
230
|
+
id: `document-action-runtime-profile.${documentProfile.Id}.${details.runtimeProfileId}.${reason}`,
|
|
231
|
+
message,
|
|
232
|
+
severity,
|
|
233
|
+
source,
|
|
234
|
+
subject,
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function distinctActionsById(
|
|
239
|
+
actions: readonly ActionDefinition[],
|
|
240
|
+
): readonly ActionDefinition[] {
|
|
241
|
+
const seen = new Set<string>()
|
|
242
|
+
return actions.filter((action) => {
|
|
243
|
+
if (seen.has(action.Id)) {
|
|
244
|
+
return false
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
seen.add(action.Id)
|
|
248
|
+
return true
|
|
249
|
+
})
|
|
250
|
+
}
|