@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,146 @@
|
|
|
1
|
+
import type { FlowDefinition, FlowStateDefinition } from '@cohesivesystems/presentation-contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Stable DOM attribute names emitted by Cohesive presentation renderers for
|
|
4
|
+
* semantic UI automation.
|
|
5
|
+
*/
|
|
6
|
+
export declare const presentationTestAttributes: {
|
|
7
|
+
readonly actionId: "data-presentation-action-id";
|
|
8
|
+
readonly collectionSlotId: "data-presentation-collection-slot-id";
|
|
9
|
+
readonly fieldId: "data-presentation-field-id";
|
|
10
|
+
readonly flowId: "data-presentation-flow-id";
|
|
11
|
+
readonly flowStateId: "data-presentation-flow-state-id";
|
|
12
|
+
readonly formId: "data-presentation-form-id";
|
|
13
|
+
readonly projectionId: "data-presentation-projection-id";
|
|
14
|
+
readonly routeId: "data-presentation-route-id";
|
|
15
|
+
readonly rowId: "data-presentation-row-id";
|
|
16
|
+
readonly viewId: "data-presentation-view-id";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Custom browser event names reserved for Cohesive presentation test drivers.
|
|
20
|
+
*/
|
|
21
|
+
export declare const presentationTestEvents: {
|
|
22
|
+
readonly setDocumentText: "cohesive:presentation.test.set-document-text";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Semantic presentation identities that can be projected onto a rendered
|
|
26
|
+
* element as stable automation attributes.
|
|
27
|
+
*/
|
|
28
|
+
export interface PresentationTestAttributeSubject {
|
|
29
|
+
/** Presentation action identifier represented by the element. */
|
|
30
|
+
readonly actionId?: string | null;
|
|
31
|
+
/** Collection chrome, body, detail, or action slot identifier. */
|
|
32
|
+
readonly collectionSlotId?: string | null;
|
|
33
|
+
/** Presentation field identifier represented by the element. */
|
|
34
|
+
readonly fieldId?: string | null;
|
|
35
|
+
/** Presentation flow identifier represented by the element. */
|
|
36
|
+
readonly flowId?: string | null;
|
|
37
|
+
/** Flow state identifier represented by the element. */
|
|
38
|
+
readonly flowStateId?: string | null;
|
|
39
|
+
/** Presentation form identifier represented by the element. */
|
|
40
|
+
readonly formId?: string | null;
|
|
41
|
+
/** Renderer-specific projection identifier represented by the element. */
|
|
42
|
+
readonly projectionId?: string | null;
|
|
43
|
+
/** Navigation route identifier represented by the element. */
|
|
44
|
+
readonly routeId?: string | null;
|
|
45
|
+
/** Data row identifier represented by the element. */
|
|
46
|
+
readonly rowId?: string | null;
|
|
47
|
+
/** Presentation view identifier represented by the element. */
|
|
48
|
+
readonly viewId?: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Payload for the test-only document text event.
|
|
52
|
+
*/
|
|
53
|
+
export interface PresentationSetDocumentTextTestEventDetail {
|
|
54
|
+
/** Replacement document text supplied by the test driver. */
|
|
55
|
+
readonly value: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Serializable semantic test plan generated from a presentation flow.
|
|
59
|
+
*/
|
|
60
|
+
export interface PresentationFlowTestPlan {
|
|
61
|
+
/** Flow identifier that owns the generated plan. */
|
|
62
|
+
readonly flowId: string;
|
|
63
|
+
/** Initial state identifier declared by the flow. */
|
|
64
|
+
readonly initialStateId: string;
|
|
65
|
+
/** Human-readable flow name. */
|
|
66
|
+
readonly name: string;
|
|
67
|
+
/** Flow states with selectors for locating their rendered surfaces. */
|
|
68
|
+
readonly states: readonly PresentationFlowTestState[];
|
|
69
|
+
/** Flow transitions with optional selectors for invoking actions. */
|
|
70
|
+
readonly transitions: readonly PresentationFlowTestTransition[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Testable state node generated from a presentation flow state.
|
|
74
|
+
*/
|
|
75
|
+
export interface PresentationFlowTestState {
|
|
76
|
+
/** Flow state identifier. */
|
|
77
|
+
readonly id: string;
|
|
78
|
+
/** Presentation flow state kind from the IR. */
|
|
79
|
+
readonly kind: FlowStateDefinition['Kind'];
|
|
80
|
+
/** Human-readable state name. */
|
|
81
|
+
readonly name: string;
|
|
82
|
+
/** CSS selector that locates this state within the rendered flow. */
|
|
83
|
+
readonly selector: string;
|
|
84
|
+
/** View rendered for this state, when the state declares one. */
|
|
85
|
+
readonly viewId: string | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Testable transition edge generated from a presentation flow transition.
|
|
89
|
+
*/
|
|
90
|
+
export interface PresentationFlowTestTransition {
|
|
91
|
+
/** Action invoked by this transition, when the transition is action-bound. */
|
|
92
|
+
readonly actionId: string | null;
|
|
93
|
+
/** Event name that triggers the transition. */
|
|
94
|
+
readonly event: string;
|
|
95
|
+
/** Source flow state identifier. */
|
|
96
|
+
readonly fromStateId: string;
|
|
97
|
+
/** Guard expression or identifier declared by the transition, when present. */
|
|
98
|
+
readonly guard: string | null;
|
|
99
|
+
/** Flow transition identifier. */
|
|
100
|
+
readonly id: string;
|
|
101
|
+
/** CSS selector for the transition action, when the transition is action-bound. */
|
|
102
|
+
readonly selector: string | null;
|
|
103
|
+
/** Destination flow state identifier. */
|
|
104
|
+
readonly toStateId: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Creates DOM attributes for a semantic presentation subject.
|
|
108
|
+
*
|
|
109
|
+
* Null, undefined, and empty-string values are omitted so callers can spread the
|
|
110
|
+
* result directly onto React elements.
|
|
111
|
+
*/
|
|
112
|
+
export declare function createPresentationTestAttributes({ actionId, collectionSlotId, fieldId, flowId, flowStateId, formId, projectionId, routeId, rowId, viewId, }: PresentationTestAttributeSubject): Record<string, string>;
|
|
113
|
+
/**
|
|
114
|
+
* Creates a CSS attribute selector for a Cohesive semantic test attribute.
|
|
115
|
+
*/
|
|
116
|
+
export declare function createPresentationAttributeSelector(attribute: string, value: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* Selector factories for semantic presentation test attributes.
|
|
119
|
+
*/
|
|
120
|
+
export declare const presentationTestSelectors: {
|
|
121
|
+
/** Locates an element by presentation action identifier. */
|
|
122
|
+
readonly action: (actionId: string) => string;
|
|
123
|
+
/** Locates an element by collection slot identifier. */
|
|
124
|
+
readonly collectionSlot: (slotId: string) => string;
|
|
125
|
+
/** Locates an element by presentation field identifier. */
|
|
126
|
+
readonly field: (fieldId: string) => string;
|
|
127
|
+
/** Locates an element by presentation flow identifier. */
|
|
128
|
+
readonly flow: (flowId: string) => string;
|
|
129
|
+
/** Locates a rendered flow state within a presentation flow. */
|
|
130
|
+
readonly flowState: (flowId: string, stateId: string) => string;
|
|
131
|
+
/** Locates an element by presentation form identifier. */
|
|
132
|
+
readonly form: (formId: string) => string;
|
|
133
|
+
/** Locates an element by renderer-specific projection identifier. */
|
|
134
|
+
readonly projection: (projectionId: string) => string;
|
|
135
|
+
/** Locates an element by navigation route identifier. */
|
|
136
|
+
readonly route: (routeId: string) => string;
|
|
137
|
+
/** Locates an element by data row identifier. */
|
|
138
|
+
readonly row: (rowId: string) => string;
|
|
139
|
+
/** Locates an element by presentation view identifier. */
|
|
140
|
+
readonly view: (viewId: string) => string;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Generates a semantic test plan from a presentation flow definition.
|
|
144
|
+
*/
|
|
145
|
+
export declare function createPresentationFlowTestPlan(flow: FlowDefinition): PresentationFlowTestPlan;
|
|
146
|
+
//# sourceMappingURL=presentation-test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M,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,MAAM,EACN,WAAW,EACX,MAAM,EACN,YAAY,EACZ,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE,gCAAgC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkB3D;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,UAGd;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB;IACpC,4DAA4D;gCACzC,MAAM;IAMzB,wDAAwD;sCAC/B,MAAM;IAM/B,2DAA2D;8BAC1C,MAAM;IAMvB,0DAA0D;4BAC3C,MAAM;IAMrB,gEAAgE;iCAC5C,MAAM,WAAW,MAAM;IAM3C,0DAA0D;4BAC3C,MAAM;IAMrB,qEAAqE;wCAC1C,MAAM;IAMjC,yDAAyD;8BACxC,MAAM;IAMvB,iDAAiD;0BACpC,MAAM;IAMnB,0DAA0D;4BAC3C,MAAM;CAKb,CAAA;AAEV;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,cAAc,GACnB,wBAAwB,CAQ1B"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { presentationTestSelectors as generatedPresentationTestSelectors, } from '@cohesivesystems/presentation-contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Stable DOM attribute names emitted by Cohesive presentation renderers for
|
|
4
|
+
* semantic UI automation.
|
|
5
|
+
*/
|
|
6
|
+
export const presentationTestAttributes = {
|
|
7
|
+
actionId: generatedPresentationTestSelectors.actionIdAttribute,
|
|
8
|
+
collectionSlotId: generatedPresentationTestSelectors.collectionSlotIdAttribute,
|
|
9
|
+
fieldId: generatedPresentationTestSelectors.fieldIdAttribute,
|
|
10
|
+
flowId: generatedPresentationTestSelectors.flowIdAttribute,
|
|
11
|
+
flowStateId: generatedPresentationTestSelectors.flowStateIdAttribute,
|
|
12
|
+
formId: generatedPresentationTestSelectors.formIdAttribute,
|
|
13
|
+
projectionId: generatedPresentationTestSelectors.projectionIdAttribute,
|
|
14
|
+
routeId: generatedPresentationTestSelectors.routeIdAttribute,
|
|
15
|
+
rowId: generatedPresentationTestSelectors.rowIdAttribute,
|
|
16
|
+
viewId: generatedPresentationTestSelectors.viewIdAttribute,
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Custom browser event names reserved for Cohesive presentation test drivers.
|
|
20
|
+
*/
|
|
21
|
+
export const presentationTestEvents = {
|
|
22
|
+
setDocumentText: 'cohesive:presentation.test.set-document-text',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Creates DOM attributes for a semantic presentation subject.
|
|
26
|
+
*
|
|
27
|
+
* Null, undefined, and empty-string values are omitted so callers can spread the
|
|
28
|
+
* result directly onto React elements.
|
|
29
|
+
*/
|
|
30
|
+
export function createPresentationTestAttributes({ actionId, collectionSlotId, fieldId, flowId, flowStateId, formId, projectionId, routeId, rowId, viewId, }) {
|
|
31
|
+
const entries = [
|
|
32
|
+
[presentationTestAttributes.actionId, actionId],
|
|
33
|
+
[presentationTestAttributes.collectionSlotId, collectionSlotId],
|
|
34
|
+
[presentationTestAttributes.fieldId, fieldId],
|
|
35
|
+
[presentationTestAttributes.flowId, flowId],
|
|
36
|
+
[presentationTestAttributes.flowStateId, flowStateId],
|
|
37
|
+
[presentationTestAttributes.formId, formId],
|
|
38
|
+
[presentationTestAttributes.projectionId, projectionId],
|
|
39
|
+
[presentationTestAttributes.routeId, routeId],
|
|
40
|
+
[presentationTestAttributes.rowId, rowId],
|
|
41
|
+
[presentationTestAttributes.viewId, viewId],
|
|
42
|
+
];
|
|
43
|
+
return Object.fromEntries(entries.filter((entry) => typeof entry[1] === 'string' && entry[1].length > 0));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates a CSS attribute selector for a Cohesive semantic test attribute.
|
|
47
|
+
*/
|
|
48
|
+
export function createPresentationAttributeSelector(attribute, value) {
|
|
49
|
+
return `[${attribute}="${escapeCssAttributeValue(value)}"]`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Selector factories for semantic presentation test attributes.
|
|
53
|
+
*/
|
|
54
|
+
export const presentationTestSelectors = {
|
|
55
|
+
/** Locates an element by presentation action identifier. */
|
|
56
|
+
action: (actionId) => createPresentationAttributeSelector(presentationTestAttributes.actionId, actionId),
|
|
57
|
+
/** Locates an element by collection slot identifier. */
|
|
58
|
+
collectionSlot: (slotId) => createPresentationAttributeSelector(presentationTestAttributes.collectionSlotId, slotId),
|
|
59
|
+
/** Locates an element by presentation field identifier. */
|
|
60
|
+
field: (fieldId) => createPresentationAttributeSelector(presentationTestAttributes.fieldId, fieldId),
|
|
61
|
+
/** Locates an element by presentation flow identifier. */
|
|
62
|
+
flow: (flowId) => createPresentationAttributeSelector(presentationTestAttributes.flowId, flowId),
|
|
63
|
+
/** Locates a rendered flow state within a presentation flow. */
|
|
64
|
+
flowState: (flowId, stateId) => `${presentationTestSelectors.flow(flowId)}${createPresentationAttributeSelector(presentationTestAttributes.flowStateId, stateId)}`,
|
|
65
|
+
/** Locates an element by presentation form identifier. */
|
|
66
|
+
form: (formId) => createPresentationAttributeSelector(presentationTestAttributes.formId, formId),
|
|
67
|
+
/** Locates an element by renderer-specific projection identifier. */
|
|
68
|
+
projection: (projectionId) => createPresentationAttributeSelector(presentationTestAttributes.projectionId, projectionId),
|
|
69
|
+
/** Locates an element by navigation route identifier. */
|
|
70
|
+
route: (routeId) => createPresentationAttributeSelector(presentationTestAttributes.routeId, routeId),
|
|
71
|
+
/** Locates an element by data row identifier. */
|
|
72
|
+
row: (rowId) => createPresentationAttributeSelector(presentationTestAttributes.rowId, rowId),
|
|
73
|
+
/** Locates an element by presentation view identifier. */
|
|
74
|
+
view: (viewId) => createPresentationAttributeSelector(presentationTestAttributes.viewId, viewId),
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Generates a semantic test plan from a presentation flow definition.
|
|
78
|
+
*/
|
|
79
|
+
export function createPresentationFlowTestPlan(flow) {
|
|
80
|
+
return {
|
|
81
|
+
flowId: flow.Id,
|
|
82
|
+
initialStateId: flow.InitialStateId,
|
|
83
|
+
name: flow.Name,
|
|
84
|
+
states: flow.States.map((state) => createPresentationFlowTestState(flow, state)),
|
|
85
|
+
transitions: flow.Transitions.map(createPresentationFlowTestTransition),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function createPresentationFlowTestState(flow, state) {
|
|
89
|
+
return {
|
|
90
|
+
id: state.Id,
|
|
91
|
+
kind: state.Kind,
|
|
92
|
+
name: state.Name,
|
|
93
|
+
selector: presentationTestSelectors.flowState(flow.Id, state.Id),
|
|
94
|
+
viewId: state.ViewId ?? null,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function createPresentationFlowTestTransition(transition) {
|
|
98
|
+
return {
|
|
99
|
+
actionId: transition.ActionId ?? null,
|
|
100
|
+
event: transition.Event,
|
|
101
|
+
fromStateId: transition.FromStateId,
|
|
102
|
+
guard: transition.Guard ?? null,
|
|
103
|
+
id: transition.Id,
|
|
104
|
+
selector: transition.ActionId
|
|
105
|
+
? presentationTestSelectors.action(transition.ActionId)
|
|
106
|
+
: null,
|
|
107
|
+
toStateId: transition.ToStateId,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function escapeCssAttributeValue(value) {
|
|
111
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=presentation-test-selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-test-selectors.js","sourceRoot":"","sources":["../src/presentation-test-selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,IAAI,kCAAkC,GAChE,MAAM,yCAAyC,CAAA;AAOhD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B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CAAC,QAAQ,IAAI,IAAI;QACrC,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,IAAI;QAC/B,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC3B,CAAC,CAAC,yBAAyB,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;YACvD,CAAC,CAAC,IAAI;QACR,SAAS,EAAE,UAAU,CAAC,SAAS;KAChC,CAAA;AACH,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAa;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAC1D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function resolvePresentationEnumLabel(value: unknown, labels: Readonly<Record<number | string, string>> | undefined, { fallback, }?: {
|
|
2
|
+
readonly fallback?: string;
|
|
3
|
+
}): string;
|
|
4
|
+
export declare function formatPresentationVersion(value: unknown, { fallback, prefix, }?: {
|
|
5
|
+
readonly fallback?: string;
|
|
6
|
+
readonly prefix?: string;
|
|
7
|
+
}): string;
|
|
8
|
+
export declare function formatPresentationDateTime(value: unknown, { fallback, }?: {
|
|
9
|
+
readonly fallback?: string;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function formatPresentationOptionalValue(value: unknown, fallback?: string): string;
|
|
12
|
+
//# sourceMappingURL=presentation-value-formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-value-formatting.d.ts","sourceRoot":"","sources":["../src/presentation-value-formatting.ts"],"names":[],"mappings":"AAAA,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EAC7D,EACE,QAAoB,GACrB,GAAE;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CACtB,UAQP;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,EACE,QAAgB,EAChB,MAAY,GACb,GAAE;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACpB,UAKP;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,EACE,QAAgB,GACjB,GAAE;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CACtB,UAiBP;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,QAAQ,SAAQ,UAKjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function resolvePresentationEnumLabel(value, labels, { fallback = 'Unknown', } = {}) {
|
|
2
|
+
if (value === null || value === undefined || value === '') {
|
|
3
|
+
return fallback;
|
|
4
|
+
}
|
|
5
|
+
const key = String(value);
|
|
6
|
+
return labels?.[key] ?? String(value);
|
|
7
|
+
}
|
|
8
|
+
export function formatPresentationVersion(value, { fallback = 'n/a', prefix = 'v', } = {}) {
|
|
9
|
+
return value === null || value === undefined || value === ''
|
|
10
|
+
? fallback
|
|
11
|
+
: `${prefix}${value}`;
|
|
12
|
+
}
|
|
13
|
+
export function formatPresentationDateTime(value, { fallback = 'n/a', } = {}) {
|
|
14
|
+
if (typeof value !== 'string') {
|
|
15
|
+
return fallback;
|
|
16
|
+
}
|
|
17
|
+
const parsed = new Date(value);
|
|
18
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
return parsed.toLocaleString(undefined, {
|
|
22
|
+
day: 'numeric',
|
|
23
|
+
hour: 'numeric',
|
|
24
|
+
minute: '2-digit',
|
|
25
|
+
month: 'short',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export function formatPresentationOptionalValue(value, fallback = 'n/a') {
|
|
29
|
+
return value === null || value === undefined || value === ''
|
|
30
|
+
? fallback
|
|
31
|
+
: String(value);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=presentation-value-formatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-value-formatting.js","sourceRoot":"","sources":["../src/presentation-value-formatting.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,4BAA4B,CAC1C,KAAc,EACd,MAA6D,EAC7D,EACE,QAAQ,GAAG,SAAS,MAGlB,EAAE;IAEN,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACzB,OAAO,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AACvC,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,KAAc,EACd,EACE,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,GAAG,MAIV,EAAE;IAEN,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAC1D,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,GAAG,MAAM,GAAG,KAAK,EAAE,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAc,EACd,EACE,QAAQ,GAAG,KAAK,MAGd,EAAE;IAEN,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QACnC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE;QACtC,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,OAAO;KACf,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,KAAc,EACd,QAAQ,GAAG,KAAK;IAEhB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAC1D,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PresentationValueDefinition } from './module.js';
|
|
2
|
+
export declare function resolvePresentationValue(value: PresentationValueDefinition | null | undefined, data: unknown): unknown;
|
|
3
|
+
export declare function resolvePresentationTemplate(template: string | null | undefined, data: unknown): string | null;
|
|
4
|
+
export declare function readPresentationFieldValue(data: unknown, fieldPath: string | null | undefined): unknown;
|
|
5
|
+
export declare function isEmptyPresentationValue(value: unknown): value is "" | null | undefined;
|
|
6
|
+
export declare function formatPresentationValue(value: unknown): string | null;
|
|
7
|
+
//# sourceMappingURL=presentation-value-resolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-value-resolution.d.ts","sourceRoot":"","sources":["../src/presentation-value-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAO3D,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,EACrD,IAAI,EAAE,OAAO,WAed;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,IAAI,EAAE,OAAO,iBAUd;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,WAarC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,kCAEtD;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,iBAcrD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const presentationValueKind = {
|
|
2
|
+
literal: new Set(['Literal', 0]),
|
|
3
|
+
field: new Set(['Field', 1]),
|
|
4
|
+
};
|
|
5
|
+
export function resolvePresentationValue(value, data) {
|
|
6
|
+
if (!value) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
if (presentationValueKind.literal.has(value.Kind)) {
|
|
10
|
+
return value.Literal;
|
|
11
|
+
}
|
|
12
|
+
if (presentationValueKind.field.has(value.Kind)) {
|
|
13
|
+
return readPresentationFieldValue(data, value.Field);
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
export function resolvePresentationTemplate(template, data) {
|
|
18
|
+
if (!template) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return template.replace(/\{([^}]+)\}/g, (match, fieldPath) => {
|
|
22
|
+
const value = readPresentationFieldValue(data, fieldPath);
|
|
23
|
+
return value === null || value === undefined ? match : formatPresentationValue(value) ?? '';
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function readPresentationFieldValue(data, fieldPath) {
|
|
27
|
+
if (!fieldPath) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const path = fieldPath.split('.').filter(Boolean);
|
|
31
|
+
const exactValue = readPath(data, path);
|
|
32
|
+
if (exactValue !== undefined || path.length <= 1) {
|
|
33
|
+
return exactValue;
|
|
34
|
+
}
|
|
35
|
+
return readPath(data, path.slice(1));
|
|
36
|
+
}
|
|
37
|
+
export function isEmptyPresentationValue(value) {
|
|
38
|
+
return value === null || value === undefined || value === '';
|
|
39
|
+
}
|
|
40
|
+
export function formatPresentationValue(value) {
|
|
41
|
+
if (value === null || value === undefined) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
if (typeof value === 'string') {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
if (typeof value === 'number' || typeof value === 'bigint' || typeof value === 'boolean') {
|
|
48
|
+
return value.toString();
|
|
49
|
+
}
|
|
50
|
+
return JSON.stringify(value);
|
|
51
|
+
}
|
|
52
|
+
function readPath(source, path) {
|
|
53
|
+
let current = source;
|
|
54
|
+
for (const segment of path) {
|
|
55
|
+
if (!current || typeof current !== 'object') {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
current = readObjectProperty(current, segment);
|
|
59
|
+
}
|
|
60
|
+
return current;
|
|
61
|
+
}
|
|
62
|
+
function readObjectProperty(source, segment) {
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(source, segment)) {
|
|
64
|
+
return source[segment];
|
|
65
|
+
}
|
|
66
|
+
const match = Object.keys(source).find((key) => key.toLocaleLowerCase() === segment.toLocaleLowerCase());
|
|
67
|
+
return match ? source[match] : undefined;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=presentation-value-resolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-value-resolution.js","sourceRoot":"","sources":["../src/presentation-value-resolution.ts"],"names":[],"mappings":"AAEA,MAAM,qBAAqB,GAAG;IAC5B,OAAO,EAAE,IAAI,GAAG,CAAkB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACjD,KAAK,EAAE,IAAI,GAAG,CAAkB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;CACrC,CAAA;AAEV,MAAM,UAAU,wBAAwB,CACtC,KAAqD,EACrD,IAAa;IAEb,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,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,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,OAAO,CAAC,iBAAiB,EAAE,CACjE,CAAA;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC1C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PresentationModuleDefinition, type ViewDefinition, type ViewRegionDefinition } from './module.js';
|
|
2
|
+
export declare function findPresentationViewRegion(view: Pick<ViewDefinition, 'Regions'> | null, regionId: string): ViewRegionDefinition | null;
|
|
3
|
+
export declare function readFirstRegionViewId(view: Pick<ViewDefinition, 'Regions'> | null, regionId: string): string | null;
|
|
4
|
+
export declare function findFirstRegionView<TView extends ViewDefinition>(module: Pick<PresentationModuleDefinition, 'Views'> | null, view: Pick<ViewDefinition, 'Regions'> | null, regionId: string): TView | null;
|
|
5
|
+
export declare function getRegionViewIds(region: ViewRegionDefinition): string[];
|
|
6
|
+
//# sourceMappingURL=presentation-view-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-view-tree.d.ts","sourceRoot":"","sources":["../src/presentation-view-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAA;AAEjB,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,IAAI,EAC5C,QAAQ,EAAE,MAAM,+BAGjB;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,IAAI,EAC5C,QAAQ,EAAE,MAAM,iBAGjB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,cAAc,EAC9D,MAAM,EAAE,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,GAAG,IAAI,EAC1D,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,IAAI,EAC5C,QAAQ,EAAE,MAAM,gBAIjB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,YAE5D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { findPresentationView, } from './module.js';
|
|
2
|
+
export function findPresentationViewRegion(view, regionId) {
|
|
3
|
+
return view?.Regions?.find((region) => region.Id === regionId) ?? null;
|
|
4
|
+
}
|
|
5
|
+
export function readFirstRegionViewId(view, regionId) {
|
|
6
|
+
return findPresentationViewRegion(view, regionId)?.ViewIds?.[0] ?? null;
|
|
7
|
+
}
|
|
8
|
+
export function findFirstRegionView(module, view, regionId) {
|
|
9
|
+
const viewId = readFirstRegionViewId(view, regionId);
|
|
10
|
+
return viewId ? findPresentationView(module, viewId) : null;
|
|
11
|
+
}
|
|
12
|
+
export function getRegionViewIds(region) {
|
|
13
|
+
return region.ViewIds ?? [];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=presentation-view-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-view-tree.js","sourceRoot":"","sources":["../src/presentation-view-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAIrB,MAAM,UAAU,CAAA;AAEjB,MAAM,UAAU,0BAA0B,CACxC,IAA4C,EAC5C,QAAgB;IAEhB,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,QAAQ,CAAC,IAAI,IAAI,CAAA;AACxE,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,IAA4C,EAC5C,QAAgB;IAEhB,OAAO,0BAA0B,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;AACzE,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,MAA0D,EAC1D,IAA4C,EAC5C,QAAgB;IAEhB,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACpD,OAAO,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAQ,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACpE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA4B;IAC3D,OAAO,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
export interface ProcessTaskMetadata {
|
|
7
|
+
readonly correlationId?: string | null;
|
|
8
|
+
readonly ediSpecId?: string | null;
|
|
9
|
+
readonly mode?: string | null;
|
|
10
|
+
readonly modelId?: string | null;
|
|
11
|
+
readonly policyId?: string | null;
|
|
12
|
+
readonly projectionIds?: readonly string[] | null;
|
|
13
|
+
readonly shapeGraphId?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ProcessTask {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly type: ProcessTaskType;
|
|
18
|
+
readonly typeTone?: string | null;
|
|
19
|
+
readonly title: string;
|
|
20
|
+
readonly status: string;
|
|
21
|
+
readonly statusLabel: string;
|
|
22
|
+
readonly lifecycleStatus: ProcessLifecycleStatus;
|
|
23
|
+
readonly startedAtUtc?: string | null;
|
|
24
|
+
readonly updatedAtUtc?: string | null;
|
|
25
|
+
readonly completedAtUtc?: string | null;
|
|
26
|
+
readonly failureMessage?: string | null;
|
|
27
|
+
readonly detailsHref?: string | null;
|
|
28
|
+
readonly sourceHref?: string | null;
|
|
29
|
+
readonly targetHref?: string | null;
|
|
30
|
+
readonly metadata: ProcessTaskMetadata;
|
|
31
|
+
}
|
|
32
|
+
export interface ProcessTaskSelector {
|
|
33
|
+
readonly activeOnly?: boolean;
|
|
34
|
+
readonly metadata?: ProcessTaskMetadataSelector;
|
|
35
|
+
readonly processType?: ProcessTaskType | null;
|
|
36
|
+
}
|
|
37
|
+
export interface ProcessTaskStartToast {
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
readonly href?: string | null;
|
|
40
|
+
readonly hrefLabel?: string | null;
|
|
41
|
+
readonly title?: string;
|
|
42
|
+
readonly tone?: ProcessTaskToast['tone'];
|
|
43
|
+
}
|
|
44
|
+
export interface ProcessTaskStartRegistration {
|
|
45
|
+
readonly completedAtUtc?: string | null;
|
|
46
|
+
readonly detailsHref?: string | null;
|
|
47
|
+
readonly failureMessage?: string | null;
|
|
48
|
+
readonly invalidateQueryKeys?: readonly (readonly unknown[])[];
|
|
49
|
+
readonly metadata?: ProcessTaskMetadata;
|
|
50
|
+
readonly processId: string;
|
|
51
|
+
readonly processName?: string | null;
|
|
52
|
+
readonly processType: ProcessTaskType;
|
|
53
|
+
readonly processTypeLabel?: string | null;
|
|
54
|
+
readonly processTypeTone?: string | null;
|
|
55
|
+
readonly sourceHref?: string | null;
|
|
56
|
+
readonly startedAtUtc?: string | null;
|
|
57
|
+
readonly startedToast?: ProcessTaskStartToast | null;
|
|
58
|
+
readonly status?: string | null;
|
|
59
|
+
readonly statusLabel?: string | null;
|
|
60
|
+
readonly statusTone?: string | null;
|
|
61
|
+
readonly targetHref?: string | null;
|
|
62
|
+
readonly terminalInvalidateQueryKeys?: readonly (readonly unknown[])[];
|
|
63
|
+
readonly updatedAtUtc?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export interface ProcessTaskToast {
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly taskId: string;
|
|
68
|
+
readonly title: string;
|
|
69
|
+
readonly description: string;
|
|
70
|
+
readonly tone: 'info' | 'success' | 'error';
|
|
71
|
+
readonly href?: string | null;
|
|
72
|
+
readonly hrefLabel?: string | null;
|
|
73
|
+
readonly createdAt: number;
|
|
74
|
+
}
|
|
75
|
+
export declare function isProcessTaskTerminal(task: ProcessTask): boolean;
|
|
76
|
+
export declare function findProcessTask(tasks: readonly ProcessTask[], selector: ProcessTaskSelector): ProcessTask;
|
|
77
|
+
export declare function findProcessTasks(tasks: readonly ProcessTask[], selector: ProcessTaskSelector): ProcessTask[];
|
|
78
|
+
export declare function matchesProcessTaskSelector(task: ProcessTask, selector: ProcessTaskSelector): boolean;
|
|
79
|
+
export declare function isTerminalProcessStatus(status: string, completedAtUtc?: string | null): boolean;
|
|
80
|
+
//# sourceMappingURL=process-task-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-task-model.d.ts","sourceRoot":"","sources":["../src/process-task-model.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,MAAM,CAAA;AACpC,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;AACvG,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;IAChD,QAAQ,EAAE,CAAC,IAAI,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,CAAC,CAAC;CAClE,CAAC,CAAA;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAA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AAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAA;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,WAEtD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,QAAQ,EAAE,mBAAmB,eAG9B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,QAAQ,EAAE,mBAAmB,iBAG9B;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,mBAAmB,WAW9B;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,WAUrF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export function isProcessTaskTerminal(task) {
|
|
2
|
+
return isTerminalProcessStatus(task.status, task.completedAtUtc);
|
|
3
|
+
}
|
|
4
|
+
export function findProcessTask(tasks, selector) {
|
|
5
|
+
return findProcessTasks(tasks, selector)[0] ?? null;
|
|
6
|
+
}
|
|
7
|
+
export function findProcessTasks(tasks, selector) {
|
|
8
|
+
return tasks.filter((task) => matchesProcessTaskSelector(task, selector));
|
|
9
|
+
}
|
|
10
|
+
export function matchesProcessTaskSelector(task, selector) {
|
|
11
|
+
if (selector.activeOnly && isProcessTaskTerminal(task)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
if (selector.processType && task.type !== selector.processType) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return matchesProcessTaskMetadataSelector(task.metadata, selector.metadata);
|
|
18
|
+
}
|
|
19
|
+
export function isTerminalProcessStatus(status, completedAtUtc) {
|
|
20
|
+
if (['Completed', 'Failed', 'Cancelled', 'Canceled', 'Terminated'].includes(status)) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (['Pending', 'Running', 'Waiting', 'Suspended'].includes(status)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return Boolean(completedAtUtc);
|
|
27
|
+
}
|
|
28
|
+
function matchesProcessTaskMetadataSelector(metadata, selector) {
|
|
29
|
+
if (!selector) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
for (const [key, expected] of Object.entries(selector)) {
|
|
33
|
+
if (expected === undefined) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const actual = metadata[key];
|
|
37
|
+
if (Array.isArray(expected)) {
|
|
38
|
+
if (!Array.isArray(actual) || !arraysEqual(actual, expected)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (actual !== expected) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function arraysEqual(left, right) {
|
|
50
|
+
return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=process-task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