@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,14 @@
|
|
|
1
|
+
export type PresentationStandardsComposer<TStandards, TContribution> = (
|
|
2
|
+
...contributions: readonly TContribution[]
|
|
3
|
+
) => TStandards
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates a typed standards contribution without coupling the contribution to a
|
|
7
|
+
* particular app shell. Folder-local feature modules can export these and the
|
|
8
|
+
* app composition layer decides how to merge them.
|
|
9
|
+
*/
|
|
10
|
+
export function definePresentationStandardsContribution<TContribution>(
|
|
11
|
+
contribution: TContribution,
|
|
12
|
+
) {
|
|
13
|
+
return contribution
|
|
14
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import {
|
|
2
|
+
presentationTestSelectors as generatedPresentationTestSelectors,
|
|
3
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
4
|
+
import type {
|
|
5
|
+
FlowDefinition,
|
|
6
|
+
FlowStateDefinition,
|
|
7
|
+
FlowTransitionDefinition,
|
|
8
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Stable DOM attribute names emitted by Cohesive presentation renderers for
|
|
12
|
+
* semantic UI automation.
|
|
13
|
+
*/
|
|
14
|
+
export const presentationTestAttributes = {
|
|
15
|
+
actionId: generatedPresentationTestSelectors.actionIdAttribute,
|
|
16
|
+
collectionSlotId: generatedPresentationTestSelectors.collectionSlotIdAttribute,
|
|
17
|
+
fieldId: generatedPresentationTestSelectors.fieldIdAttribute,
|
|
18
|
+
flowId: generatedPresentationTestSelectors.flowIdAttribute,
|
|
19
|
+
flowStateId: generatedPresentationTestSelectors.flowStateIdAttribute,
|
|
20
|
+
formId: generatedPresentationTestSelectors.formIdAttribute,
|
|
21
|
+
projectionId: generatedPresentationTestSelectors.projectionIdAttribute,
|
|
22
|
+
routeId: generatedPresentationTestSelectors.routeIdAttribute,
|
|
23
|
+
rowId: generatedPresentationTestSelectors.rowIdAttribute,
|
|
24
|
+
viewId: generatedPresentationTestSelectors.viewIdAttribute,
|
|
25
|
+
} as const
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Custom browser event names reserved for Cohesive presentation test drivers.
|
|
29
|
+
*/
|
|
30
|
+
export const presentationTestEvents = {
|
|
31
|
+
setDocumentText: 'cohesive:presentation.test.set-document-text',
|
|
32
|
+
} as const
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Semantic presentation identities that can be projected onto a rendered
|
|
36
|
+
* element as stable automation attributes.
|
|
37
|
+
*/
|
|
38
|
+
export interface PresentationTestAttributeSubject {
|
|
39
|
+
/** Presentation action identifier represented by the element. */
|
|
40
|
+
readonly actionId?: string | null
|
|
41
|
+
|
|
42
|
+
/** Collection chrome, body, detail, or action slot identifier. */
|
|
43
|
+
readonly collectionSlotId?: string | null
|
|
44
|
+
|
|
45
|
+
/** Presentation field identifier represented by the element. */
|
|
46
|
+
readonly fieldId?: string | null
|
|
47
|
+
|
|
48
|
+
/** Presentation flow identifier represented by the element. */
|
|
49
|
+
readonly flowId?: string | null
|
|
50
|
+
|
|
51
|
+
/** Flow state identifier represented by the element. */
|
|
52
|
+
readonly flowStateId?: string | null
|
|
53
|
+
|
|
54
|
+
/** Presentation form identifier represented by the element. */
|
|
55
|
+
readonly formId?: string | null
|
|
56
|
+
|
|
57
|
+
/** Renderer-specific projection identifier represented by the element. */
|
|
58
|
+
readonly projectionId?: string | null
|
|
59
|
+
|
|
60
|
+
/** Navigation route identifier represented by the element. */
|
|
61
|
+
readonly routeId?: string | null
|
|
62
|
+
|
|
63
|
+
/** Data row identifier represented by the element. */
|
|
64
|
+
readonly rowId?: string | null
|
|
65
|
+
|
|
66
|
+
/** Presentation view identifier represented by the element. */
|
|
67
|
+
readonly viewId?: string | null
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Payload for the test-only document text event.
|
|
72
|
+
*/
|
|
73
|
+
export interface PresentationSetDocumentTextTestEventDetail {
|
|
74
|
+
/** Replacement document text supplied by the test driver. */
|
|
75
|
+
readonly value: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Serializable semantic test plan generated from a presentation flow.
|
|
80
|
+
*/
|
|
81
|
+
export interface PresentationFlowTestPlan {
|
|
82
|
+
/** Flow identifier that owns the generated plan. */
|
|
83
|
+
readonly flowId: string
|
|
84
|
+
|
|
85
|
+
/** Initial state identifier declared by the flow. */
|
|
86
|
+
readonly initialStateId: string
|
|
87
|
+
|
|
88
|
+
/** Human-readable flow name. */
|
|
89
|
+
readonly name: string
|
|
90
|
+
|
|
91
|
+
/** Flow states with selectors for locating their rendered surfaces. */
|
|
92
|
+
readonly states: readonly PresentationFlowTestState[]
|
|
93
|
+
|
|
94
|
+
/** Flow transitions with optional selectors for invoking actions. */
|
|
95
|
+
readonly transitions: readonly PresentationFlowTestTransition[]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Testable state node generated from a presentation flow state.
|
|
100
|
+
*/
|
|
101
|
+
export interface PresentationFlowTestState {
|
|
102
|
+
/** Flow state identifier. */
|
|
103
|
+
readonly id: string
|
|
104
|
+
|
|
105
|
+
/** Presentation flow state kind from the IR. */
|
|
106
|
+
readonly kind: FlowStateDefinition['Kind']
|
|
107
|
+
|
|
108
|
+
/** Human-readable state name. */
|
|
109
|
+
readonly name: string
|
|
110
|
+
|
|
111
|
+
/** CSS selector that locates this state within the rendered flow. */
|
|
112
|
+
readonly selector: string
|
|
113
|
+
|
|
114
|
+
/** View rendered for this state, when the state declares one. */
|
|
115
|
+
readonly viewId: string | null
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Testable transition edge generated from a presentation flow transition.
|
|
120
|
+
*/
|
|
121
|
+
export interface PresentationFlowTestTransition {
|
|
122
|
+
/** Action invoked by this transition, when the transition is action-bound. */
|
|
123
|
+
readonly actionId: string | null
|
|
124
|
+
|
|
125
|
+
/** Event name that triggers the transition. */
|
|
126
|
+
readonly event: string
|
|
127
|
+
|
|
128
|
+
/** Source flow state identifier. */
|
|
129
|
+
readonly fromStateId: string
|
|
130
|
+
|
|
131
|
+
/** Guard expression or identifier declared by the transition, when present. */
|
|
132
|
+
readonly guard: string | null
|
|
133
|
+
|
|
134
|
+
/** Flow transition identifier. */
|
|
135
|
+
readonly id: string
|
|
136
|
+
|
|
137
|
+
/** CSS selector for the transition action, when the transition is action-bound. */
|
|
138
|
+
readonly selector: string | null
|
|
139
|
+
|
|
140
|
+
/** Destination flow state identifier. */
|
|
141
|
+
readonly toStateId: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Creates DOM attributes for a semantic presentation subject.
|
|
146
|
+
*
|
|
147
|
+
* Null, undefined, and empty-string values are omitted so callers can spread the
|
|
148
|
+
* result directly onto React elements.
|
|
149
|
+
*/
|
|
150
|
+
export function createPresentationTestAttributes({
|
|
151
|
+
actionId,
|
|
152
|
+
collectionSlotId,
|
|
153
|
+
fieldId,
|
|
154
|
+
flowId,
|
|
155
|
+
flowStateId,
|
|
156
|
+
formId,
|
|
157
|
+
projectionId,
|
|
158
|
+
routeId,
|
|
159
|
+
rowId,
|
|
160
|
+
viewId,
|
|
161
|
+
}: PresentationTestAttributeSubject): Record<string, string> {
|
|
162
|
+
const entries: readonly (readonly [string, string | null | undefined])[] = [
|
|
163
|
+
[presentationTestAttributes.actionId, actionId],
|
|
164
|
+
[presentationTestAttributes.collectionSlotId, collectionSlotId],
|
|
165
|
+
[presentationTestAttributes.fieldId, fieldId],
|
|
166
|
+
[presentationTestAttributes.flowId, flowId],
|
|
167
|
+
[presentationTestAttributes.flowStateId, flowStateId],
|
|
168
|
+
[presentationTestAttributes.formId, formId],
|
|
169
|
+
[presentationTestAttributes.projectionId, projectionId],
|
|
170
|
+
[presentationTestAttributes.routeId, routeId],
|
|
171
|
+
[presentationTestAttributes.rowId, rowId],
|
|
172
|
+
[presentationTestAttributes.viewId, viewId],
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
return Object.fromEntries(
|
|
176
|
+
entries.filter((entry): entry is readonly [string, string] =>
|
|
177
|
+
typeof entry[1] === 'string' && entry[1].length > 0),
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Creates a CSS attribute selector for a Cohesive semantic test attribute.
|
|
183
|
+
*/
|
|
184
|
+
export function createPresentationAttributeSelector(
|
|
185
|
+
attribute: string,
|
|
186
|
+
value: string,
|
|
187
|
+
) {
|
|
188
|
+
return `[${attribute}="${escapeCssAttributeValue(value)}"]`
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Selector factories for semantic presentation test attributes.
|
|
193
|
+
*/
|
|
194
|
+
export const presentationTestSelectors = {
|
|
195
|
+
/** Locates an element by presentation action identifier. */
|
|
196
|
+
action: (actionId: string) =>
|
|
197
|
+
createPresentationAttributeSelector(
|
|
198
|
+
presentationTestAttributes.actionId,
|
|
199
|
+
actionId,
|
|
200
|
+
),
|
|
201
|
+
|
|
202
|
+
/** Locates an element by collection slot identifier. */
|
|
203
|
+
collectionSlot: (slotId: string) =>
|
|
204
|
+
createPresentationAttributeSelector(
|
|
205
|
+
presentationTestAttributes.collectionSlotId,
|
|
206
|
+
slotId,
|
|
207
|
+
),
|
|
208
|
+
|
|
209
|
+
/** Locates an element by presentation field identifier. */
|
|
210
|
+
field: (fieldId: string) =>
|
|
211
|
+
createPresentationAttributeSelector(
|
|
212
|
+
presentationTestAttributes.fieldId,
|
|
213
|
+
fieldId,
|
|
214
|
+
),
|
|
215
|
+
|
|
216
|
+
/** Locates an element by presentation flow identifier. */
|
|
217
|
+
flow: (flowId: string) =>
|
|
218
|
+
createPresentationAttributeSelector(
|
|
219
|
+
presentationTestAttributes.flowId,
|
|
220
|
+
flowId,
|
|
221
|
+
),
|
|
222
|
+
|
|
223
|
+
/** Locates a rendered flow state within a presentation flow. */
|
|
224
|
+
flowState: (flowId: string, stateId: string) =>
|
|
225
|
+
`${presentationTestSelectors.flow(flowId)}${createPresentationAttributeSelector(
|
|
226
|
+
presentationTestAttributes.flowStateId,
|
|
227
|
+
stateId,
|
|
228
|
+
)}`,
|
|
229
|
+
|
|
230
|
+
/** Locates an element by presentation form identifier. */
|
|
231
|
+
form: (formId: string) =>
|
|
232
|
+
createPresentationAttributeSelector(
|
|
233
|
+
presentationTestAttributes.formId,
|
|
234
|
+
formId,
|
|
235
|
+
),
|
|
236
|
+
|
|
237
|
+
/** Locates an element by renderer-specific projection identifier. */
|
|
238
|
+
projection: (projectionId: string) =>
|
|
239
|
+
createPresentationAttributeSelector(
|
|
240
|
+
presentationTestAttributes.projectionId,
|
|
241
|
+
projectionId,
|
|
242
|
+
),
|
|
243
|
+
|
|
244
|
+
/** Locates an element by navigation route identifier. */
|
|
245
|
+
route: (routeId: string) =>
|
|
246
|
+
createPresentationAttributeSelector(
|
|
247
|
+
presentationTestAttributes.routeId,
|
|
248
|
+
routeId,
|
|
249
|
+
),
|
|
250
|
+
|
|
251
|
+
/** Locates an element by data row identifier. */
|
|
252
|
+
row: (rowId: string) =>
|
|
253
|
+
createPresentationAttributeSelector(
|
|
254
|
+
presentationTestAttributes.rowId,
|
|
255
|
+
rowId,
|
|
256
|
+
),
|
|
257
|
+
|
|
258
|
+
/** Locates an element by presentation view identifier. */
|
|
259
|
+
view: (viewId: string) =>
|
|
260
|
+
createPresentationAttributeSelector(
|
|
261
|
+
presentationTestAttributes.viewId,
|
|
262
|
+
viewId,
|
|
263
|
+
),
|
|
264
|
+
} as const
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Generates a semantic test plan from a presentation flow definition.
|
|
268
|
+
*/
|
|
269
|
+
export function createPresentationFlowTestPlan(
|
|
270
|
+
flow: FlowDefinition,
|
|
271
|
+
): PresentationFlowTestPlan {
|
|
272
|
+
return {
|
|
273
|
+
flowId: flow.Id,
|
|
274
|
+
initialStateId: flow.InitialStateId,
|
|
275
|
+
name: flow.Name,
|
|
276
|
+
states: flow.States.map((state) => createPresentationFlowTestState(flow, state)),
|
|
277
|
+
transitions: flow.Transitions.map(createPresentationFlowTestTransition),
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function createPresentationFlowTestState(
|
|
282
|
+
flow: FlowDefinition,
|
|
283
|
+
state: FlowStateDefinition,
|
|
284
|
+
): PresentationFlowTestState {
|
|
285
|
+
return {
|
|
286
|
+
id: state.Id,
|
|
287
|
+
kind: state.Kind,
|
|
288
|
+
name: state.Name,
|
|
289
|
+
selector: presentationTestSelectors.flowState(flow.Id, state.Id),
|
|
290
|
+
viewId: state.ViewId ?? null,
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function createPresentationFlowTestTransition(
|
|
295
|
+
transition: FlowTransitionDefinition,
|
|
296
|
+
): PresentationFlowTestTransition {
|
|
297
|
+
return {
|
|
298
|
+
actionId: transition.ActionId ?? null,
|
|
299
|
+
event: transition.Event,
|
|
300
|
+
fromStateId: transition.FromStateId,
|
|
301
|
+
guard: transition.Guard ?? null,
|
|
302
|
+
id: transition.Id,
|
|
303
|
+
selector: transition.ActionId
|
|
304
|
+
? presentationTestSelectors.action(transition.ActionId)
|
|
305
|
+
: null,
|
|
306
|
+
toStateId: transition.ToStateId,
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function escapeCssAttributeValue(value: string) {
|
|
311
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')
|
|
312
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export function resolvePresentationEnumLabel(
|
|
2
|
+
value: unknown,
|
|
3
|
+
labels: Readonly<Record<number | string, string>> | undefined,
|
|
4
|
+
{
|
|
5
|
+
fallback = 'Unknown',
|
|
6
|
+
}: {
|
|
7
|
+
readonly fallback?: string
|
|
8
|
+
} = {},
|
|
9
|
+
) {
|
|
10
|
+
if (value === null || value === undefined || value === '') {
|
|
11
|
+
return fallback
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const key = String(value)
|
|
15
|
+
return labels?.[key] ?? String(value)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function formatPresentationVersion(
|
|
19
|
+
value: unknown,
|
|
20
|
+
{
|
|
21
|
+
fallback = 'n/a',
|
|
22
|
+
prefix = 'v',
|
|
23
|
+
}: {
|
|
24
|
+
readonly fallback?: string
|
|
25
|
+
readonly prefix?: string
|
|
26
|
+
} = {},
|
|
27
|
+
) {
|
|
28
|
+
return value === null || value === undefined || value === ''
|
|
29
|
+
? fallback
|
|
30
|
+
: `${prefix}${value}`
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function formatPresentationDateTime(
|
|
34
|
+
value: unknown,
|
|
35
|
+
{
|
|
36
|
+
fallback = 'n/a',
|
|
37
|
+
}: {
|
|
38
|
+
readonly fallback?: string
|
|
39
|
+
} = {},
|
|
40
|
+
) {
|
|
41
|
+
if (typeof value !== 'string') {
|
|
42
|
+
return fallback
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const parsed = new Date(value)
|
|
46
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return parsed.toLocaleString(undefined, {
|
|
51
|
+
day: 'numeric',
|
|
52
|
+
hour: 'numeric',
|
|
53
|
+
minute: '2-digit',
|
|
54
|
+
month: 'short',
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function formatPresentationOptionalValue(
|
|
59
|
+
value: unknown,
|
|
60
|
+
fallback = 'n/a',
|
|
61
|
+
) {
|
|
62
|
+
return value === null || value === undefined || value === ''
|
|
63
|
+
? fallback
|
|
64
|
+
: String(value)
|
|
65
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { PresentationValueDefinition } from './module'
|
|
2
|
+
|
|
3
|
+
const presentationValueKind = {
|
|
4
|
+
literal: new Set<string | number>(['Literal', 0]),
|
|
5
|
+
field: new Set<string | number>(['Field', 1]),
|
|
6
|
+
} as const
|
|
7
|
+
|
|
8
|
+
export function resolvePresentationValue(
|
|
9
|
+
value: PresentationValueDefinition | null | undefined,
|
|
10
|
+
data: unknown,
|
|
11
|
+
) {
|
|
12
|
+
if (!value) {
|
|
13
|
+
return undefined
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (presentationValueKind.literal.has(value.Kind)) {
|
|
17
|
+
return value.Literal
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (presentationValueKind.field.has(value.Kind)) {
|
|
21
|
+
return readPresentationFieldValue(data, value.Field)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return undefined
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function resolvePresentationTemplate(
|
|
28
|
+
template: string | null | undefined,
|
|
29
|
+
data: unknown,
|
|
30
|
+
) {
|
|
31
|
+
if (!template) {
|
|
32
|
+
return null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return template.replace(/\{([^}]+)\}/g, (match, fieldPath: string) => {
|
|
36
|
+
const value = readPresentationFieldValue(data, fieldPath)
|
|
37
|
+
return value === null || value === undefined ? match : formatPresentationValue(value) ?? ''
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function readPresentationFieldValue(
|
|
42
|
+
data: unknown,
|
|
43
|
+
fieldPath: string | null | undefined,
|
|
44
|
+
) {
|
|
45
|
+
if (!fieldPath) {
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const path = fieldPath.split('.').filter(Boolean)
|
|
50
|
+
const exactValue = readPath(data, path)
|
|
51
|
+
if (exactValue !== undefined || path.length <= 1) {
|
|
52
|
+
return exactValue
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return readPath(data, path.slice(1))
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function isEmptyPresentationValue(value: unknown) {
|
|
59
|
+
return value === null || value === undefined || value === ''
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function formatPresentationValue(value: unknown) {
|
|
63
|
+
if (value === null || value === undefined) {
|
|
64
|
+
return null
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (typeof value === 'string') {
|
|
68
|
+
return value
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (typeof value === 'number' || typeof value === 'bigint' || typeof value === 'boolean') {
|
|
72
|
+
return value.toString()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return JSON.stringify(value)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function readPath(source: unknown, path: readonly string[]) {
|
|
79
|
+
let current = source
|
|
80
|
+
for (const segment of path) {
|
|
81
|
+
if (!current || typeof current !== 'object') {
|
|
82
|
+
return undefined
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
current = readObjectProperty(current as Record<string, unknown>, segment)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return current
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function readObjectProperty(source: Record<string, unknown>, segment: string) {
|
|
92
|
+
if (Object.prototype.hasOwnProperty.call(source, segment)) {
|
|
93
|
+
return source[segment]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const match = Object.keys(source).find(
|
|
97
|
+
(key) => key.toLocaleLowerCase() === segment.toLocaleLowerCase(),
|
|
98
|
+
)
|
|
99
|
+
return match ? source[match] : undefined
|
|
100
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findPresentationView,
|
|
3
|
+
type PresentationModuleDefinition,
|
|
4
|
+
type ViewDefinition,
|
|
5
|
+
type ViewRegionDefinition,
|
|
6
|
+
} from './module'
|
|
7
|
+
|
|
8
|
+
export function findPresentationViewRegion(
|
|
9
|
+
view: Pick<ViewDefinition, 'Regions'> | null,
|
|
10
|
+
regionId: string,
|
|
11
|
+
) {
|
|
12
|
+
return view?.Regions?.find((region) => region.Id === regionId) ?? null
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function readFirstRegionViewId(
|
|
16
|
+
view: Pick<ViewDefinition, 'Regions'> | null,
|
|
17
|
+
regionId: string,
|
|
18
|
+
) {
|
|
19
|
+
return findPresentationViewRegion(view, regionId)?.ViewIds?.[0] ?? null
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function findFirstRegionView<TView extends ViewDefinition>(
|
|
23
|
+
module: Pick<PresentationModuleDefinition, 'Views'> | null,
|
|
24
|
+
view: Pick<ViewDefinition, 'Regions'> | null,
|
|
25
|
+
regionId: string,
|
|
26
|
+
) {
|
|
27
|
+
const viewId = readFirstRegionViewId(view, regionId)
|
|
28
|
+
return viewId ? findPresentationView<TView>(module, viewId) : null
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function getRegionViewIds(region: ViewRegionDefinition) {
|
|
32
|
+
return region.ViewIds ?? []
|
|
33
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export type ProcessTaskType = string
|
|
2
|
+
export type ProcessLifecycleStatus = 'pending' | 'running' | 'waiting' | 'success' | 'error' | 'paused'
|
|
3
|
+
export type ProcessTaskMetadataSelector = Partial<{
|
|
4
|
+
readonly [K in keyof ProcessTaskMetadata]: ProcessTaskMetadata[K]
|
|
5
|
+
}>
|
|
6
|
+
|
|
7
|
+
export interface ProcessTaskMetadata {
|
|
8
|
+
readonly correlationId?: string | null
|
|
9
|
+
readonly ediSpecId?: string | null
|
|
10
|
+
readonly mode?: string | null
|
|
11
|
+
readonly modelId?: string | null
|
|
12
|
+
readonly policyId?: string | null
|
|
13
|
+
readonly projectionIds?: readonly string[] | null
|
|
14
|
+
readonly shapeGraphId?: string | null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProcessTask {
|
|
18
|
+
readonly id: string
|
|
19
|
+
readonly type: ProcessTaskType
|
|
20
|
+
readonly typeTone?: string | null
|
|
21
|
+
readonly title: string
|
|
22
|
+
readonly status: string
|
|
23
|
+
readonly statusLabel: string
|
|
24
|
+
readonly lifecycleStatus: ProcessLifecycleStatus
|
|
25
|
+
readonly startedAtUtc?: string | null
|
|
26
|
+
readonly updatedAtUtc?: string | null
|
|
27
|
+
readonly completedAtUtc?: string | null
|
|
28
|
+
readonly failureMessage?: string | null
|
|
29
|
+
readonly detailsHref?: string | null
|
|
30
|
+
readonly sourceHref?: string | null
|
|
31
|
+
readonly targetHref?: string | null
|
|
32
|
+
readonly metadata: ProcessTaskMetadata
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ProcessTaskSelector {
|
|
36
|
+
readonly activeOnly?: boolean
|
|
37
|
+
readonly metadata?: ProcessTaskMetadataSelector
|
|
38
|
+
readonly processType?: ProcessTaskType | null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ProcessTaskStartToast {
|
|
42
|
+
readonly description?: string
|
|
43
|
+
readonly href?: string | null
|
|
44
|
+
readonly hrefLabel?: string | null
|
|
45
|
+
readonly title?: string
|
|
46
|
+
readonly tone?: ProcessTaskToast['tone']
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ProcessTaskStartRegistration {
|
|
50
|
+
readonly completedAtUtc?: string | null
|
|
51
|
+
readonly detailsHref?: string | null
|
|
52
|
+
readonly failureMessage?: string | null
|
|
53
|
+
readonly invalidateQueryKeys?: readonly (readonly unknown[])[]
|
|
54
|
+
readonly metadata?: ProcessTaskMetadata
|
|
55
|
+
readonly processId: string
|
|
56
|
+
readonly processName?: string | null
|
|
57
|
+
readonly processType: ProcessTaskType
|
|
58
|
+
readonly processTypeLabel?: string | null
|
|
59
|
+
readonly processTypeTone?: string | null
|
|
60
|
+
readonly sourceHref?: string | null
|
|
61
|
+
readonly startedAtUtc?: string | null
|
|
62
|
+
readonly startedToast?: ProcessTaskStartToast | null
|
|
63
|
+
readonly status?: string | null
|
|
64
|
+
readonly statusLabel?: string | null
|
|
65
|
+
readonly statusTone?: string | null
|
|
66
|
+
readonly targetHref?: string | null
|
|
67
|
+
readonly terminalInvalidateQueryKeys?: readonly (readonly unknown[])[]
|
|
68
|
+
readonly updatedAtUtc?: string | null
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ProcessTaskToast {
|
|
72
|
+
readonly id: string
|
|
73
|
+
readonly taskId: string
|
|
74
|
+
readonly title: string
|
|
75
|
+
readonly description: string
|
|
76
|
+
readonly tone: 'info' | 'success' | 'error'
|
|
77
|
+
readonly href?: string | null
|
|
78
|
+
readonly hrefLabel?: string | null
|
|
79
|
+
readonly createdAt: number
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function isProcessTaskTerminal(task: ProcessTask) {
|
|
83
|
+
return isTerminalProcessStatus(task.status, task.completedAtUtc)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function findProcessTask(
|
|
87
|
+
tasks: readonly ProcessTask[],
|
|
88
|
+
selector: ProcessTaskSelector,
|
|
89
|
+
) {
|
|
90
|
+
return findProcessTasks(tasks, selector)[0] ?? null
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function findProcessTasks(
|
|
94
|
+
tasks: readonly ProcessTask[],
|
|
95
|
+
selector: ProcessTaskSelector,
|
|
96
|
+
) {
|
|
97
|
+
return tasks.filter((task) => matchesProcessTaskSelector(task, selector))
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function matchesProcessTaskSelector(
|
|
101
|
+
task: ProcessTask,
|
|
102
|
+
selector: ProcessTaskSelector,
|
|
103
|
+
) {
|
|
104
|
+
if (selector.activeOnly && isProcessTaskTerminal(task)) {
|
|
105
|
+
return false
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (selector.processType && task.type !== selector.processType) {
|
|
109
|
+
return false
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return matchesProcessTaskMetadataSelector(task.metadata, selector.metadata)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function isTerminalProcessStatus(status: string, completedAtUtc?: string | null) {
|
|
116
|
+
if (['Completed', 'Failed', 'Cancelled', 'Canceled', 'Terminated'].includes(status)) {
|
|
117
|
+
return true
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (['Pending', 'Running', 'Waiting', 'Suspended'].includes(status)) {
|
|
121
|
+
return false
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return Boolean(completedAtUtc)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function matchesProcessTaskMetadataSelector(
|
|
128
|
+
metadata: ProcessTaskMetadata,
|
|
129
|
+
selector: ProcessTaskMetadataSelector | null | undefined,
|
|
130
|
+
) {
|
|
131
|
+
if (!selector) {
|
|
132
|
+
return true
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
for (const [key, expected] of Object.entries(selector)) {
|
|
136
|
+
if (expected === undefined) {
|
|
137
|
+
continue
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const actual = metadata[key as keyof ProcessTaskMetadata]
|
|
141
|
+
if (Array.isArray(expected)) {
|
|
142
|
+
if (!Array.isArray(actual) || !arraysEqual(actual, expected)) {
|
|
143
|
+
return false
|
|
144
|
+
}
|
|
145
|
+
continue
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (actual !== expected) {
|
|
149
|
+
return false
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return true
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function arraysEqual(left: readonly unknown[], right: readonly unknown[]) {
|
|
157
|
+
return left.length === right.length && left.every((value, index) => value === right[index])
|
|
158
|
+
}
|