@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,436 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findPresentationDataSource,
|
|
3
|
+
type DataSourceDefinition,
|
|
4
|
+
type PresentationModuleDefinition,
|
|
5
|
+
type ViewDefinition,
|
|
6
|
+
} from './module'
|
|
7
|
+
import {
|
|
8
|
+
createDataSourcePaginationParameterPrefix,
|
|
9
|
+
inferPresentationPaginationBinding,
|
|
10
|
+
type PresentationPaginationBinding,
|
|
11
|
+
} from './presentation-pagination'
|
|
12
|
+
import {
|
|
13
|
+
createPresentationProjectionDiagnostic,
|
|
14
|
+
type PresentationProjectionDiagnostic,
|
|
15
|
+
} from './presentation-projection-diagnostics'
|
|
16
|
+
import {
|
|
17
|
+
createProjectedCollectionChromeRuntime,
|
|
18
|
+
isProjectedCollectionPaginationEnabled,
|
|
19
|
+
isProjectedCollectionPaginationFooterEnabled,
|
|
20
|
+
resolveProjectedCollectionPaginationDataSourceId,
|
|
21
|
+
} from './projected-collection-runtime'
|
|
22
|
+
import { findPresentationQueryFormForResultDataSource } from './query-form-lowering'
|
|
23
|
+
import {
|
|
24
|
+
dataSourceKindLabels,
|
|
25
|
+
dataSourceKinds,
|
|
26
|
+
type DataSourceKind,
|
|
27
|
+
} from '@cohesivesystems/presentation-contracts'
|
|
28
|
+
|
|
29
|
+
export type PresentationCollectionPaginationRequestMap = Readonly<Record<string, object>>
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Fallback page size used when neither the data source nor a synchronized query
|
|
33
|
+
* form declares a default page size.
|
|
34
|
+
*/
|
|
35
|
+
export const defaultPresentationCollectionPageSize = 10
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Options for projecting collection pagination bindings from a presentation
|
|
39
|
+
* module.
|
|
40
|
+
*/
|
|
41
|
+
export interface CreatePresentationCollectionPaginationBindingsOptions {
|
|
42
|
+
/** Data source ids that may require collection pagination bindings. */
|
|
43
|
+
readonly dataSourceIds: readonly string[]
|
|
44
|
+
|
|
45
|
+
/** Fallback page size used when no IR-level default is declared. */
|
|
46
|
+
readonly defaultPageSize?: number
|
|
47
|
+
|
|
48
|
+
/** Presentation module containing data-source and query-form definitions. */
|
|
49
|
+
readonly module: PresentationModuleDefinition | null
|
|
50
|
+
|
|
51
|
+
/** Optional views used to restrict pagination projection to enabled collections. */
|
|
52
|
+
readonly views?: readonly Pick<ViewDefinition, 'Collection'>[]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function createPresentationCollectionPaginationBindings({
|
|
56
|
+
dataSourceIds,
|
|
57
|
+
defaultPageSize = defaultPresentationCollectionPageSize,
|
|
58
|
+
module,
|
|
59
|
+
views,
|
|
60
|
+
}: CreatePresentationCollectionPaginationBindingsOptions): readonly PresentationPaginationBinding[] {
|
|
61
|
+
const fallbackPageSize =
|
|
62
|
+
readPositiveInteger(defaultPageSize) ?? defaultPresentationCollectionPageSize
|
|
63
|
+
|
|
64
|
+
return resolveCollectionPaginationDataSourceIds(dataSourceIds, views).flatMap((dataSourceId) => {
|
|
65
|
+
const dataSource = findPresentationDataSource(module, dataSourceId)
|
|
66
|
+
if (!dataSource || !isCollectionQueryDataSource(dataSource)) {
|
|
67
|
+
return []
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const binding = inferPresentationCollectionPaginationBinding(
|
|
71
|
+
dataSource,
|
|
72
|
+
module,
|
|
73
|
+
fallbackPageSize,
|
|
74
|
+
)
|
|
75
|
+
return binding ? [binding] : []
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function resolveCollectionPaginationDataSourceIds(
|
|
80
|
+
dataSourceIds: readonly string[],
|
|
81
|
+
views: readonly Pick<ViewDefinition, 'Collection'>[] | undefined,
|
|
82
|
+
) {
|
|
83
|
+
const collectionViews = views?.filter((view) => view.Collection) ?? []
|
|
84
|
+
if (collectionViews.length === 0) {
|
|
85
|
+
return Array.from(new Set(dataSourceIds))
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return Array.from(
|
|
89
|
+
new Set(
|
|
90
|
+
collectionViews.flatMap((view) => {
|
|
91
|
+
const collection = view.Collection
|
|
92
|
+
if (!collection || !isProjectedCollectionPaginationEnabled(collection)) {
|
|
93
|
+
return []
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const dataSourceId = resolveProjectedCollectionPaginationDataSourceId(collection)
|
|
97
|
+
return dataSourceId ? [dataSourceId] : []
|
|
98
|
+
}),
|
|
99
|
+
),
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function projectPresentationCollectionPaginationDiagnostics({
|
|
104
|
+
bindings,
|
|
105
|
+
footerRendererBound = true,
|
|
106
|
+
module,
|
|
107
|
+
sourceId,
|
|
108
|
+
views,
|
|
109
|
+
}: {
|
|
110
|
+
readonly bindings: readonly PresentationPaginationBinding[]
|
|
111
|
+
readonly footerRendererBound?: boolean
|
|
112
|
+
readonly module: PresentationModuleDefinition | null
|
|
113
|
+
readonly sourceId: string
|
|
114
|
+
readonly views?: readonly Pick<ViewDefinition, 'Collection' | 'Id' | 'Name'>[]
|
|
115
|
+
}): readonly PresentationProjectionDiagnostic[] {
|
|
116
|
+
const collectionPaginationViews = resolveEnabledCollectionPaginationViews(views)
|
|
117
|
+
if (collectionPaginationViews.length === 0) {
|
|
118
|
+
return bindings.map((binding) => {
|
|
119
|
+
const dataSource = findPresentationDataSource(module, binding.dataSourceId)
|
|
120
|
+
|
|
121
|
+
return createCollectionPaginationRuntimeDiagnostic({
|
|
122
|
+
binding,
|
|
123
|
+
dataSource,
|
|
124
|
+
sourceId,
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return collectionPaginationViews.flatMap((view) =>
|
|
130
|
+
projectCollectionViewPaginationDiagnostics({
|
|
131
|
+
bindings,
|
|
132
|
+
footerRendererBound,
|
|
133
|
+
module,
|
|
134
|
+
sourceId,
|
|
135
|
+
view,
|
|
136
|
+
}))
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function projectCollectionViewPaginationDiagnostics({
|
|
140
|
+
bindings,
|
|
141
|
+
footerRendererBound,
|
|
142
|
+
module,
|
|
143
|
+
sourceId,
|
|
144
|
+
view,
|
|
145
|
+
}: {
|
|
146
|
+
readonly bindings: readonly PresentationPaginationBinding[]
|
|
147
|
+
readonly footerRendererBound: boolean
|
|
148
|
+
readonly module: PresentationModuleDefinition | null
|
|
149
|
+
readonly sourceId: string
|
|
150
|
+
readonly view: Pick<ViewDefinition, 'Collection' | 'Id' | 'Name'>
|
|
151
|
+
}): readonly PresentationProjectionDiagnostic[] {
|
|
152
|
+
const collection = view.Collection
|
|
153
|
+
if (!collection || !isProjectedCollectionPaginationEnabled(collection)) {
|
|
154
|
+
return []
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const chrome = createProjectedCollectionChromeRuntime(collection)
|
|
158
|
+
const paginationSlot = chrome.paginationSlot
|
|
159
|
+
const dataSourceId = resolveProjectedCollectionPaginationDataSourceId(collection)
|
|
160
|
+
const diagnostics: PresentationProjectionDiagnostic[] = []
|
|
161
|
+
|
|
162
|
+
if (!dataSourceId) {
|
|
163
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
164
|
+
category: 'missing-definition',
|
|
165
|
+
details: {
|
|
166
|
+
collectionChromeSlotId: paginationSlot?.Id ?? null,
|
|
167
|
+
paginationPlacement: paginationSlot?.Placement ?? null,
|
|
168
|
+
viewId: view.Id,
|
|
169
|
+
},
|
|
170
|
+
id: `collection-pagination.${view.Id}.missing-slot-data-source`,
|
|
171
|
+
interpretation: {
|
|
172
|
+
status: 'unbound',
|
|
173
|
+
target: 'projected-collection-runtime.pagination',
|
|
174
|
+
},
|
|
175
|
+
message:
|
|
176
|
+
`Collection view '${view.Name}' declares pagination chrome, ` +
|
|
177
|
+
'but the pagination slot does not declare a data source.',
|
|
178
|
+
severity: 'error',
|
|
179
|
+
source: sourceId,
|
|
180
|
+
subject: {
|
|
181
|
+
id: view.Id,
|
|
182
|
+
kind: 'view',
|
|
183
|
+
name: view.Name,
|
|
184
|
+
},
|
|
185
|
+
suggestedNextStep:
|
|
186
|
+
'Add the paginated collection data source id to the Collection.Chrome pagination slot.',
|
|
187
|
+
}))
|
|
188
|
+
|
|
189
|
+
return diagnostics
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const dataSource = findPresentationDataSource(module, dataSourceId)
|
|
193
|
+
const binding = bindings.find((candidate) => candidate.dataSourceId === dataSourceId)
|
|
194
|
+
|
|
195
|
+
if (!dataSource) {
|
|
196
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
197
|
+
category: 'missing-definition',
|
|
198
|
+
details: {
|
|
199
|
+
collectionChromeSlotId: paginationSlot?.Id ?? null,
|
|
200
|
+
dataSourceId,
|
|
201
|
+
paginationPlacement: paginationSlot?.Placement ?? null,
|
|
202
|
+
viewId: view.Id,
|
|
203
|
+
},
|
|
204
|
+
id: `collection-pagination.${view.Id}.${dataSourceId}.missing-data-source`,
|
|
205
|
+
interpretation: {
|
|
206
|
+
status: 'unbound',
|
|
207
|
+
target: 'projected-collection-runtime.pagination',
|
|
208
|
+
},
|
|
209
|
+
message:
|
|
210
|
+
`Collection view '${view.Name}' enables pagination through data source ` +
|
|
211
|
+
`'${dataSourceId}', but that data source is not present in the presentation module.`,
|
|
212
|
+
severity: 'error',
|
|
213
|
+
source: sourceId,
|
|
214
|
+
subject: {
|
|
215
|
+
id: view.Id,
|
|
216
|
+
kind: 'view',
|
|
217
|
+
name: view.Name,
|
|
218
|
+
},
|
|
219
|
+
suggestedNextStep:
|
|
220
|
+
'Declare the pagination data source in the presentation module or update the Collection.Chrome pagination slot.',
|
|
221
|
+
}))
|
|
222
|
+
} else if (!binding) {
|
|
223
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
224
|
+
category: 'missing-binding',
|
|
225
|
+
details: {
|
|
226
|
+
collectionChromeSlotId: paginationSlot?.Id ?? null,
|
|
227
|
+
dataSourceId,
|
|
228
|
+
dataSourceKind: dataSource.Kind,
|
|
229
|
+
paginationPlacement: paginationSlot?.Placement ?? null,
|
|
230
|
+
viewId: view.Id,
|
|
231
|
+
},
|
|
232
|
+
id: `collection-pagination.${view.Id}.${dataSourceId}.missing-runtime-binding`,
|
|
233
|
+
interpretation: {
|
|
234
|
+
status: 'unbound',
|
|
235
|
+
target: 'projected-collection-runtime.pagination.window',
|
|
236
|
+
},
|
|
237
|
+
message:
|
|
238
|
+
`Collection view '${view.Name}' enables pagination for '${dataSource.Name}', ` +
|
|
239
|
+
'but no frontend pagination runtime binding was created for that data source.',
|
|
240
|
+
severity: 'warning',
|
|
241
|
+
source: sourceId,
|
|
242
|
+
subject: {
|
|
243
|
+
id: view.Id,
|
|
244
|
+
kind: 'view',
|
|
245
|
+
name: view.Name,
|
|
246
|
+
},
|
|
247
|
+
suggestedNextStep:
|
|
248
|
+
'Ensure the data source is a collection-query data source with declared or inferable pagination request and response bindings.',
|
|
249
|
+
}))
|
|
250
|
+
} else {
|
|
251
|
+
diagnostics.push(createCollectionPaginationRuntimeDiagnostic({
|
|
252
|
+
binding,
|
|
253
|
+
dataSource,
|
|
254
|
+
paginationSlotId: paginationSlot?.Id ?? null,
|
|
255
|
+
sourceId,
|
|
256
|
+
view,
|
|
257
|
+
}))
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (isProjectedCollectionPaginationFooterEnabled(collection) && !footerRendererBound) {
|
|
261
|
+
diagnostics.push(createPresentationProjectionDiagnostic({
|
|
262
|
+
category: 'missing-binding',
|
|
263
|
+
details: {
|
|
264
|
+
collectionChromeSlotId: paginationSlot?.Id ?? null,
|
|
265
|
+
dataSourceId,
|
|
266
|
+
paginationPlacement: paginationSlot?.Placement ?? null,
|
|
267
|
+
viewId: view.Id,
|
|
268
|
+
},
|
|
269
|
+
id: `collection-pagination.${view.Id}.missing-footer-renderer`,
|
|
270
|
+
interpretation: {
|
|
271
|
+
status: 'unbound',
|
|
272
|
+
target: 'collection-pagination-footer-chrome',
|
|
273
|
+
},
|
|
274
|
+
message:
|
|
275
|
+
`Collection view '${view.Name}' requests footer pagination chrome, ` +
|
|
276
|
+
'but no collection footer renderer is bound.',
|
|
277
|
+
severity: 'warning',
|
|
278
|
+
source: sourceId,
|
|
279
|
+
subject: {
|
|
280
|
+
id: view.Id,
|
|
281
|
+
kind: 'view',
|
|
282
|
+
name: view.Name,
|
|
283
|
+
},
|
|
284
|
+
suggestedNextStep:
|
|
285
|
+
'Bind a collection footer renderer that projects collectionRuntime.pagination.window, or change the collection pagination placement.',
|
|
286
|
+
}))
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return diagnostics
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function createCollectionPaginationRuntimeDiagnostic({
|
|
293
|
+
binding,
|
|
294
|
+
dataSource,
|
|
295
|
+
paginationSlotId = null,
|
|
296
|
+
sourceId,
|
|
297
|
+
view,
|
|
298
|
+
}: {
|
|
299
|
+
readonly binding: PresentationPaginationBinding
|
|
300
|
+
readonly dataSource: DataSourceDefinition | null
|
|
301
|
+
readonly paginationSlotId?: string | null
|
|
302
|
+
readonly sourceId: string
|
|
303
|
+
readonly view?: Pick<ViewDefinition, 'Id' | 'Name'> | null
|
|
304
|
+
}) {
|
|
305
|
+
return createPresentationProjectionDiagnostic({
|
|
306
|
+
category: 'local-interpretation',
|
|
307
|
+
details: {
|
|
308
|
+
collectionChromeSlotId: paginationSlotId,
|
|
309
|
+
dataSourceId: binding.dataSourceId,
|
|
310
|
+
defaultPageSize: binding.defaultPageSize,
|
|
311
|
+
paginationKind: binding.kind,
|
|
312
|
+
urlEnabled: binding.url.enabled,
|
|
313
|
+
urlParameterPrefix: binding.url.parameterPrefix,
|
|
314
|
+
viewId: view?.Id ?? null,
|
|
315
|
+
},
|
|
316
|
+
id: view
|
|
317
|
+
? `collection-pagination.${view.Id}.${binding.dataSourceId}.runtime-interpretation`
|
|
318
|
+
: `collection-pagination.${binding.dataSourceId}.runtime-interpretation`,
|
|
319
|
+
interpretation: {
|
|
320
|
+
status: 'locally-interpreted',
|
|
321
|
+
target: 'projected-collection-runtime.pagination.window',
|
|
322
|
+
},
|
|
323
|
+
message:
|
|
324
|
+
`Collection pagination for '${dataSource?.Name ?? binding.dataSourceId}' ` +
|
|
325
|
+
`is interpreted through Collection.Chrome by ProjectedCollectionRuntime as ${binding.kind} windowing.`,
|
|
326
|
+
severity: 'info',
|
|
327
|
+
source: sourceId,
|
|
328
|
+
subject: view
|
|
329
|
+
? {
|
|
330
|
+
id: view.Id,
|
|
331
|
+
kind: 'view',
|
|
332
|
+
name: view.Name,
|
|
333
|
+
}
|
|
334
|
+
: {
|
|
335
|
+
id: binding.dataSourceId,
|
|
336
|
+
kind: 'data-source',
|
|
337
|
+
name: dataSource?.Name,
|
|
338
|
+
},
|
|
339
|
+
suggestedNextStep:
|
|
340
|
+
'Extend collection IR with page-size controls, column selection, and row selection chips as the grid component system grows.',
|
|
341
|
+
})
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function resolveEnabledCollectionPaginationViews(
|
|
345
|
+
views: readonly Pick<ViewDefinition, 'Collection' | 'Id' | 'Name'>[] | undefined,
|
|
346
|
+
) {
|
|
347
|
+
return (views ?? []).filter((view) =>
|
|
348
|
+
isProjectedCollectionPaginationEnabled(view.Collection))
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function isCollectionQueryDataSource(
|
|
352
|
+
dataSource: Pick<DataSourceDefinition, 'Kind'>,
|
|
353
|
+
) {
|
|
354
|
+
return matchesDataSourceKind(
|
|
355
|
+
dataSource.Kind,
|
|
356
|
+
dataSourceKinds.collectionQuery,
|
|
357
|
+
'collectionQuery',
|
|
358
|
+
)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function matchesDataSourceKind(
|
|
362
|
+
value: unknown,
|
|
363
|
+
numericValue: DataSourceKind,
|
|
364
|
+
camelLabel: string,
|
|
365
|
+
) {
|
|
366
|
+
const pascalLabel = dataSourceKindLabels[numericValue]
|
|
367
|
+
return (
|
|
368
|
+
value === numericValue ||
|
|
369
|
+
String(value) === String(numericValue) ||
|
|
370
|
+
String(value) === pascalLabel ||
|
|
371
|
+
String(value) === camelLabel
|
|
372
|
+
)
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function inferPresentationCollectionPaginationBinding(
|
|
376
|
+
dataSource: DataSourceDefinition,
|
|
377
|
+
module: PresentationModuleDefinition | null,
|
|
378
|
+
fallbackPageSize: number,
|
|
379
|
+
): PresentationPaginationBinding | null {
|
|
380
|
+
const urlPolicy = resolveCollectionPaginationUrlPolicy(dataSource, module)
|
|
381
|
+
return inferPresentationPaginationBinding({
|
|
382
|
+
dataSource,
|
|
383
|
+
defaultPageSize: resolveCollectionPageSize(dataSource, module, fallbackPageSize),
|
|
384
|
+
parameterPrefix: urlPolicy.parameterPrefix,
|
|
385
|
+
useUrl: urlPolicy.enabled,
|
|
386
|
+
})
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function resolveCollectionPageSize(
|
|
390
|
+
dataSource: DataSourceDefinition,
|
|
391
|
+
module: PresentationModuleDefinition | null,
|
|
392
|
+
fallbackPageSize: number,
|
|
393
|
+
) {
|
|
394
|
+
const queryFormDefaultLimit = findPresentationQueryFormForResultDataSource(
|
|
395
|
+
module,
|
|
396
|
+
dataSource.Id,
|
|
397
|
+
)?.Target.Result.DefaultLimit
|
|
398
|
+
return readPositiveInteger(queryFormDefaultLimit) ?? fallbackPageSize
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function resolveCollectionPaginationUrlPolicy(
|
|
402
|
+
dataSource: DataSourceDefinition,
|
|
403
|
+
module: PresentationModuleDefinition | null,
|
|
404
|
+
) {
|
|
405
|
+
const dataSourceUrlPolicy = dataSource.Query?.Pagination?.Url
|
|
406
|
+
if (dataSourceUrlPolicy) {
|
|
407
|
+
return {
|
|
408
|
+
enabled: dataSourceUrlPolicy.IsEnabled,
|
|
409
|
+
parameterPrefix:
|
|
410
|
+
dataSourceUrlPolicy.ParameterPrefix ??
|
|
411
|
+
createDataSourcePaginationParameterPrefix(dataSource.Id),
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const queryForm = findPresentationQueryFormForResultDataSource(module, dataSource.Id)
|
|
416
|
+
const queryFormUrlPolicy = queryForm?.Target.State.Url
|
|
417
|
+
if (queryFormUrlPolicy?.IsEnabled && queryFormUrlPolicy.IncludePagination) {
|
|
418
|
+
return {
|
|
419
|
+
enabled: true,
|
|
420
|
+
parameterPrefix:
|
|
421
|
+
queryFormUrlPolicy.ParameterPrefix ??
|
|
422
|
+
createDataSourcePaginationParameterPrefix(dataSource.Id),
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return {
|
|
427
|
+
enabled: false,
|
|
428
|
+
parameterPrefix: createDataSourcePaginationParameterPrefix(dataSource.Id),
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
function readPositiveInteger(value: unknown) {
|
|
433
|
+
return typeof value === 'number' && Number.isInteger(value) && value > 0
|
|
434
|
+
? value
|
|
435
|
+
: null
|
|
436
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
PresentationContentDefinition,
|
|
3
|
+
} from './module'
|
|
4
|
+
import type {
|
|
5
|
+
PresentationProjectionDiagnostic,
|
|
6
|
+
PresentationProjectionDiagnosticSubject,
|
|
7
|
+
} from './presentation-projection-diagnostics'
|
|
8
|
+
|
|
9
|
+
export interface ProjectPresentationContentDiagnosticsOptions {
|
|
10
|
+
readonly content: PresentationContentDefinition | null | undefined
|
|
11
|
+
readonly contentFallbackDescription?: string
|
|
12
|
+
readonly descriptionFallbackDescription?: string
|
|
13
|
+
readonly details?: Readonly<Record<string, unknown>>
|
|
14
|
+
readonly diagnosticIdPrefix: string
|
|
15
|
+
readonly requireDescription?: boolean
|
|
16
|
+
readonly requireTitle?: boolean
|
|
17
|
+
readonly source: string
|
|
18
|
+
readonly subject: PresentationProjectionDiagnosticSubject
|
|
19
|
+
readonly surfaceLabel: string
|
|
20
|
+
readonly titleFallbackDescription?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function projectPresentationContentDiagnostics({
|
|
24
|
+
content,
|
|
25
|
+
contentFallbackDescription,
|
|
26
|
+
descriptionFallbackDescription,
|
|
27
|
+
details,
|
|
28
|
+
diagnosticIdPrefix,
|
|
29
|
+
requireDescription = false,
|
|
30
|
+
requireTitle = false,
|
|
31
|
+
source,
|
|
32
|
+
subject,
|
|
33
|
+
surfaceLabel,
|
|
34
|
+
titleFallbackDescription,
|
|
35
|
+
}: ProjectPresentationContentDiagnosticsOptions): readonly PresentationProjectionDiagnostic[] {
|
|
36
|
+
if (!content) {
|
|
37
|
+
return [
|
|
38
|
+
createPresentationContentDiagnostic({
|
|
39
|
+
details,
|
|
40
|
+
diagnosticIdPrefix,
|
|
41
|
+
fallbackDescription:
|
|
42
|
+
contentFallbackDescription ??
|
|
43
|
+
titleFallbackDescription ??
|
|
44
|
+
descriptionFallbackDescription ??
|
|
45
|
+
'local fallback content',
|
|
46
|
+
reason: 'missing-content',
|
|
47
|
+
source,
|
|
48
|
+
subject,
|
|
49
|
+
surfaceLabel,
|
|
50
|
+
surfacePart: 'content',
|
|
51
|
+
}),
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const diagnostics: PresentationProjectionDiagnostic[] = []
|
|
56
|
+
if (requireTitle && !content.Title) {
|
|
57
|
+
diagnostics.push(
|
|
58
|
+
createPresentationContentDiagnostic({
|
|
59
|
+
details,
|
|
60
|
+
diagnosticIdPrefix,
|
|
61
|
+
fallbackDescription: titleFallbackDescription ?? 'local title fallback content',
|
|
62
|
+
reason: 'missing-content-title',
|
|
63
|
+
source,
|
|
64
|
+
subject,
|
|
65
|
+
surfaceLabel,
|
|
66
|
+
surfacePart: 'title content',
|
|
67
|
+
}),
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (requireDescription && !content.Description && !content.DescriptionTemplate) {
|
|
72
|
+
diagnostics.push(
|
|
73
|
+
createPresentationContentDiagnostic({
|
|
74
|
+
details,
|
|
75
|
+
diagnosticIdPrefix,
|
|
76
|
+
fallbackDescription: descriptionFallbackDescription ?? 'local description fallback content',
|
|
77
|
+
reason: 'missing-content-description',
|
|
78
|
+
source,
|
|
79
|
+
subject,
|
|
80
|
+
surfaceLabel,
|
|
81
|
+
surfacePart: 'description content',
|
|
82
|
+
}),
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return diagnostics
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function createPresentationContentDiagnostic({
|
|
90
|
+
details,
|
|
91
|
+
diagnosticIdPrefix,
|
|
92
|
+
fallbackDescription,
|
|
93
|
+
reason,
|
|
94
|
+
source,
|
|
95
|
+
subject,
|
|
96
|
+
surfaceLabel,
|
|
97
|
+
surfacePart,
|
|
98
|
+
}: {
|
|
99
|
+
readonly details?: Readonly<Record<string, unknown>>
|
|
100
|
+
readonly diagnosticIdPrefix: string
|
|
101
|
+
readonly fallbackDescription: string
|
|
102
|
+
readonly reason: string
|
|
103
|
+
readonly source: string
|
|
104
|
+
readonly subject: PresentationProjectionDiagnosticSubject
|
|
105
|
+
readonly surfaceLabel: string
|
|
106
|
+
readonly surfacePart: string
|
|
107
|
+
}): PresentationProjectionDiagnostic {
|
|
108
|
+
return {
|
|
109
|
+
category: 'incomplete-projection',
|
|
110
|
+
details,
|
|
111
|
+
id: `${diagnosticIdPrefix}.${reason}`,
|
|
112
|
+
interpretation: {
|
|
113
|
+
status: 'locally-interpreted',
|
|
114
|
+
target: 'react',
|
|
115
|
+
},
|
|
116
|
+
message: `${surfaceLabel} does not declare ${surfacePart}; the frontend will use ${fallbackDescription}.`,
|
|
117
|
+
severity: 'warning',
|
|
118
|
+
source,
|
|
119
|
+
subject,
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
PresentationContentDefinition,
|
|
3
|
+
} from './module'
|
|
4
|
+
import {
|
|
5
|
+
formatPresentationValue,
|
|
6
|
+
resolvePresentationTemplate,
|
|
7
|
+
resolvePresentationValue,
|
|
8
|
+
} from './presentation-value-resolution'
|
|
9
|
+
|
|
10
|
+
export interface ProjectedPresentationContent {
|
|
11
|
+
readonly description: string | null
|
|
12
|
+
readonly subtitle: string | null
|
|
13
|
+
readonly title: string | null
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function resolvePresentationContent(
|
|
17
|
+
content: PresentationContentDefinition | null | undefined,
|
|
18
|
+
data: unknown,
|
|
19
|
+
): ProjectedPresentationContent {
|
|
20
|
+
return {
|
|
21
|
+
description: resolvePresentationContentDescription(content, data),
|
|
22
|
+
subtitle: resolvePresentationContentText(content?.Subtitle, data),
|
|
23
|
+
title: resolvePresentationContentText(content?.Title, data),
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function resolvePresentationContentDescription(
|
|
28
|
+
content: PresentationContentDefinition | null | undefined,
|
|
29
|
+
data: unknown,
|
|
30
|
+
) {
|
|
31
|
+
return (
|
|
32
|
+
resolvePresentationContentText(content?.Description, data) ??
|
|
33
|
+
resolveNonBlankPresentationText(resolvePresentationTemplate(content?.DescriptionTemplate, data))
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function resolvePresentationContentText(
|
|
38
|
+
value: PresentationContentDefinition['Title'],
|
|
39
|
+
data: unknown,
|
|
40
|
+
) {
|
|
41
|
+
return resolveNonBlankPresentationText(formatPresentationValue(resolvePresentationValue(value, data)))
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function resolveNonBlankPresentationText(value: string | null | undefined) {
|
|
45
|
+
return value && value.trim().length > 0 ? value : null
|
|
46
|
+
}
|