@cohesivesystems/presentation-react 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/collection-chrome-slot-renderer-registry.d.ts +12 -0
- package/dist/collection-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/collection-chrome-slot-renderer-registry.js +12 -0
- package/dist/collection-chrome-slot-renderer-registry.js.map +1 -0
- package/dist/collection-selection-state-context.d.ts +6 -0
- package/dist/collection-selection-state-context.d.ts.map +1 -0
- package/dist/collection-selection-state-context.js +25 -0
- package/dist/collection-selection-state-context.js.map +1 -0
- package/dist/collection-selection-state.d.ts +3 -0
- package/dist/collection-selection-state.d.ts.map +1 -0
- package/dist/collection-selection-state.js +52 -0
- package/dist/collection-selection-state.js.map +1 -0
- package/dist/document-workspace-runtime.d.ts +262 -0
- package/dist/document-workspace-runtime.d.ts.map +1 -0
- package/dist/document-workspace-runtime.js +699 -0
- package/dist/document-workspace-runtime.js.map +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/input-form-endpoint-runtime.d.ts +140 -0
- package/dist/input-form-endpoint-runtime.d.ts.map +1 -0
- package/dist/input-form-endpoint-runtime.js +280 -0
- package/dist/input-form-endpoint-runtime.js.map +1 -0
- package/dist/local-flow-state-data-source-projection.d.ts +21 -0
- package/dist/local-flow-state-data-source-projection.d.ts.map +1 -0
- package/dist/local-flow-state-data-source-projection.js +65 -0
- package/dist/local-flow-state-data-source-projection.js.map +1 -0
- package/dist/navigation-runtime-context.d.ts +22 -0
- package/dist/navigation-runtime-context.d.ts.map +1 -0
- package/dist/navigation-runtime-context.js +23 -0
- package/dist/navigation-runtime-context.js.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts +20 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.js +9 -0
- package/dist/navigation-shell-frame-renderer-registry.js.map +1 -0
- package/dist/navigation-shell-region-component-registry.d.ts +50 -0
- package/dist/navigation-shell-region-component-registry.d.ts.map +1 -0
- package/dist/navigation-shell-region-component-registry.js +44 -0
- package/dist/navigation-shell-region-component-registry.js.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts +22 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.js +9 -0
- package/dist/navigation-shell-slot-renderer-registry.js.map +1 -0
- package/dist/page-host-projection.d.ts +127 -0
- package/dist/page-host-projection.d.ts.map +1 -0
- package/dist/page-host-projection.js +59 -0
- package/dist/page-host-projection.js.map +1 -0
- package/dist/page-host-renderer-registry.d.ts +72 -0
- package/dist/page-host-renderer-registry.d.ts.map +1 -0
- package/dist/page-host-renderer-registry.js +63 -0
- package/dist/page-host-renderer-registry.js.map +1 -0
- package/dist/presentation-action-group-runtime-options.d.ts +36 -0
- package/dist/presentation-action-group-runtime-options.d.ts.map +1 -0
- package/dist/presentation-action-group-runtime-options.js +50 -0
- package/dist/presentation-action-group-runtime-options.js.map +1 -0
- package/dist/presentation-action-runtime.d.ts +52 -0
- package/dist/presentation-action-runtime.d.ts.map +1 -0
- package/dist/presentation-action-runtime.js +78 -0
- package/dist/presentation-action-runtime.js.map +1 -0
- package/dist/presentation-data-source-binding-runtime.d.ts +3 -0
- package/dist/presentation-data-source-binding-runtime.d.ts.map +1 -0
- package/dist/presentation-data-source-binding-runtime.js +65 -0
- package/dist/presentation-data-source-binding-runtime.js.map +1 -0
- package/dist/presentation-data-source-binding.d.ts +12 -0
- package/dist/presentation-data-source-binding.d.ts.map +1 -0
- package/dist/presentation-data-source-binding.js +13 -0
- package/dist/presentation-data-source-binding.js.map +1 -0
- package/dist/presentation-flow-runtime.d.ts +139 -0
- package/dist/presentation-flow-runtime.d.ts.map +1 -0
- package/dist/presentation-flow-runtime.js +514 -0
- package/dist/presentation-flow-runtime.js.map +1 -0
- package/dist/presentation-module-context.d.ts +4 -0
- package/dist/presentation-module-context.d.ts.map +1 -0
- package/dist/presentation-module-context.js +6 -0
- package/dist/presentation-module-context.js.map +1 -0
- package/dist/presentation-module-provider.d.ts +7 -0
- package/dist/presentation-module-provider.d.ts.map +1 -0
- package/dist/presentation-module-provider.js +7 -0
- package/dist/presentation-module-provider.js.map +1 -0
- package/dist/presentation-projection-diagnostics-context.d.ts +8 -0
- package/dist/presentation-projection-diagnostics-context.d.ts.map +1 -0
- package/dist/presentation-projection-diagnostics-context.js +3 -0
- package/dist/presentation-projection-diagnostics-context.js.map +1 -0
- package/dist/presentation-projection-diagnostics-hooks.d.ts +4 -0
- package/dist/presentation-projection-diagnostics-hooks.d.ts.map +1 -0
- package/dist/presentation-projection-diagnostics-hooks.js +17 -0
- package/dist/presentation-projection-diagnostics-hooks.js.map +1 -0
- package/dist/presentation-projection-diagnostics-runtime.d.ts +12 -0
- package/dist/presentation-projection-diagnostics-runtime.d.ts.map +1 -0
- package/dist/presentation-projection-diagnostics-runtime.js +54 -0
- package/dist/presentation-projection-diagnostics-runtime.js.map +1 -0
- package/dist/presentation-projection-trace.d.ts +27 -0
- package/dist/presentation-projection-trace.d.ts.map +1 -0
- package/dist/presentation-projection-trace.js +54 -0
- package/dist/presentation-projection-trace.js.map +1 -0
- package/dist/presentation-query-form-runtime.d.ts +30 -0
- package/dist/presentation-query-form-runtime.d.ts.map +1 -0
- package/dist/presentation-query-form-runtime.js +75 -0
- package/dist/presentation-query-form-runtime.js.map +1 -0
- package/dist/presentation-query-form-state-adapter-registry.d.ts +4 -0
- package/dist/presentation-query-form-state-adapter-registry.d.ts.map +1 -0
- package/dist/presentation-query-form-state-adapter-registry.js +13 -0
- package/dist/presentation-query-form-state-adapter-registry.js.map +1 -0
- package/dist/presentation-query-form-state-context.d.ts +20 -0
- package/dist/presentation-query-form-state-context.d.ts.map +1 -0
- package/dist/presentation-query-form-state-context.js +20 -0
- package/dist/presentation-query-form-state-context.js.map +1 -0
- package/dist/presentation-query-form-state.d.ts +29 -0
- package/dist/presentation-query-form-state.d.ts.map +1 -0
- package/dist/presentation-query-form-state.js +99 -0
- package/dist/presentation-query-form-state.js.map +1 -0
- package/dist/presentation-renderer-registry.d.ts +109 -0
- package/dist/presentation-renderer-registry.d.ts.map +1 -0
- package/dist/presentation-renderer-registry.js +25 -0
- package/dist/presentation-renderer-registry.js.map +1 -0
- package/dist/presentation-standards-context.d.ts +4 -0
- package/dist/presentation-standards-context.d.ts.map +1 -0
- package/dist/presentation-standards-context.js +12 -0
- package/dist/presentation-standards-context.js.map +1 -0
- package/dist/presentation-standards-provider.d.ts +14 -0
- package/dist/presentation-standards-provider.d.ts.map +1 -0
- package/dist/presentation-standards-provider.js +16 -0
- package/dist/presentation-standards-provider.js.map +1 -0
- package/dist/projected-document-action-runtime-bindings.d.ts +20 -0
- package/dist/projected-document-action-runtime-bindings.d.ts.map +1 -0
- package/dist/projected-document-action-runtime-bindings.js +88 -0
- package/dist/projected-document-action-runtime-bindings.js.map +1 -0
- package/dist/projected-document-action-runtime.d.ts +76 -0
- package/dist/projected-document-action-runtime.d.ts.map +1 -0
- package/dist/projected-document-action-runtime.js +224 -0
- package/dist/projected-document-action-runtime.js.map +1 -0
- package/dist/projected-document-process-preview-action-runtime-bindings.d.ts +26 -0
- package/dist/projected-document-process-preview-action-runtime-bindings.d.ts.map +1 -0
- package/dist/projected-document-process-preview-action-runtime-bindings.js +106 -0
- package/dist/projected-document-process-preview-action-runtime-bindings.js.map +1 -0
- package/dist/projected-document-process-preview-action-runtime.d.ts +321 -0
- package/dist/projected-document-process-preview-action-runtime.d.ts.map +1 -0
- package/dist/projected-document-process-preview-action-runtime.js +729 -0
- package/dist/projected-document-process-preview-action-runtime.js.map +1 -0
- package/dist/projected-document-process-preview-capability-runtime.d.ts +47 -0
- package/dist/projected-document-process-preview-capability-runtime.d.ts.map +1 -0
- package/dist/projected-document-process-preview-capability-runtime.js +49 -0
- package/dist/projected-document-process-preview-capability-runtime.js.map +1 -0
- package/dist/projected-document-workspace-action-runtime.d.ts +87 -0
- package/dist/projected-document-workspace-action-runtime.d.ts.map +1 -0
- package/dist/projected-document-workspace-action-runtime.js +150 -0
- package/dist/projected-document-workspace-action-runtime.js.map +1 -0
- package/dist/projected-document-workspace-projection-renderer-diagnostics.d.ts +18 -0
- package/dist/projected-document-workspace-projection-renderer-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-workspace-projection-renderer-diagnostics.js +207 -0
- package/dist/projected-document-workspace-projection-renderer-diagnostics.js.map +1 -0
- package/dist/projected-document-workspace-runtime-binding-diagnostics.d.ts +19 -0
- package/dist/projected-document-workspace-runtime-binding-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-workspace-runtime-binding-diagnostics.js +124 -0
- package/dist/projected-document-workspace-runtime-binding-diagnostics.js.map +1 -0
- package/dist/projected-navigation-provider.d.ts +16 -0
- package/dist/projected-navigation-provider.d.ts.map +1 -0
- package/dist/projected-navigation-provider.js +51 -0
- package/dist/projected-navigation-provider.js.map +1 -0
- package/dist/projected-presentation-flow-host.d.ts +16 -0
- package/dist/projected-presentation-flow-host.d.ts.map +1 -0
- package/dist/projected-presentation-flow-host.js +14 -0
- package/dist/projected-presentation-flow-host.js.map +1 -0
- package/dist/projected-query-form-state-adapter.d.ts +12 -0
- package/dist/projected-query-form-state-adapter.d.ts.map +1 -0
- package/dist/projected-query-form-state-adapter.js +361 -0
- package/dist/projected-query-form-state-adapter.js.map +1 -0
- package/dist/react-router-binding.d.ts +133 -0
- package/dist/react-router-binding.d.ts.map +1 -0
- package/dist/react-router-binding.js +76 -0
- package/dist/react-router-binding.js.map +1 -0
- package/dist/react-router-path.d.ts +4 -0
- package/dist/react-router-path.d.ts.map +1 -0
- package/dist/react-router-path.js +11 -0
- package/dist/react-router-path.js.map +1 -0
- package/dist/scope-selection-context.d.ts +28 -0
- package/dist/scope-selection-context.d.ts.map +1 -0
- package/dist/scope-selection-context.js +13 -0
- package/dist/scope-selection-context.js.map +1 -0
- package/dist/scope-selection-provider.d.ts +33 -0
- package/dist/scope-selection-provider.d.ts.map +1 -0
- package/dist/scope-selection-provider.js +162 -0
- package/dist/scope-selection-provider.js.map +1 -0
- package/dist/scope-selection-request.d.ts +6 -0
- package/dist/scope-selection-request.d.ts.map +1 -0
- package/dist/scope-selection-request.js +12 -0
- package/dist/scope-selection-request.js.map +1 -0
- package/dist/standard-navigation-shell-frame-renderers.d.ts +15 -0
- package/dist/standard-navigation-shell-frame-renderers.d.ts.map +1 -0
- package/dist/standard-navigation-shell-frame-renderers.js +22 -0
- package/dist/standard-navigation-shell-frame-renderers.js.map +1 -0
- package/dist/standard-navigation-shell-slot-renderers.d.ts +59 -0
- package/dist/standard-navigation-shell-slot-renderers.d.ts.map +1 -0
- package/dist/standard-navigation-shell-slot-renderers.js +67 -0
- package/dist/standard-navigation-shell-slot-renderers.js.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts +12 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.js +12 -0
- package/dist/view-chrome-slot-renderer-registry.js.map +1 -0
- package/package.json +60 -0
- package/src/collection-chrome-slot-renderer-registry.ts +66 -0
- package/src/collection-selection-state-context.ts +51 -0
- package/src/collection-selection-state.tsx +101 -0
- package/src/document-workspace-runtime.tsx +1505 -0
- package/src/index.ts +50 -0
- package/src/input-form-endpoint-runtime.ts +632 -0
- package/src/local-flow-state-data-source-projection.ts +133 -0
- package/src/navigation-runtime-context.ts +40 -0
- package/src/navigation-shell-frame-renderer-registry.ts +54 -0
- package/src/navigation-shell-region-component-registry.tsx +127 -0
- package/src/navigation-shell-slot-renderer-registry.ts +88 -0
- package/src/page-host-projection.ts +356 -0
- package/src/page-host-renderer-registry.tsx +353 -0
- package/src/presentation-action-group-runtime-options.ts +121 -0
- package/src/presentation-action-runtime.ts +190 -0
- package/src/presentation-data-source-binding-runtime.ts +109 -0
- package/src/presentation-data-source-binding.tsx +24 -0
- package/src/presentation-flow-runtime.tsx +835 -0
- package/src/presentation-module-context.ts +10 -0
- package/src/presentation-module-provider.tsx +19 -0
- package/src/presentation-projection-diagnostics-context.ts +17 -0
- package/src/presentation-projection-diagnostics-hooks.ts +29 -0
- package/src/presentation-projection-diagnostics-runtime.tsx +95 -0
- package/src/presentation-projection-trace.ts +117 -0
- package/src/presentation-query-form-runtime.ts +148 -0
- package/src/presentation-query-form-state-adapter-registry.ts +25 -0
- package/src/presentation-query-form-state-context.ts +56 -0
- package/src/presentation-query-form-state.tsx +250 -0
- package/src/presentation-renderer-registry.ts +214 -0
- package/src/presentation-standards-context.ts +21 -0
- package/src/presentation-standards-provider.tsx +44 -0
- package/src/projected-document-action-runtime-bindings.ts +132 -0
- package/src/projected-document-action-runtime.ts +414 -0
- package/src/projected-document-process-preview-action-runtime-bindings.ts +231 -0
- package/src/projected-document-process-preview-action-runtime.ts +1725 -0
- package/src/projected-document-process-preview-capability-runtime.ts +216 -0
- package/src/projected-document-workspace-action-runtime.ts +402 -0
- package/src/projected-document-workspace-projection-renderer-diagnostics.ts +342 -0
- package/src/projected-document-workspace-runtime-binding-diagnostics.ts +208 -0
- package/src/projected-navigation-provider.tsx +104 -0
- package/src/projected-presentation-flow-host.tsx +46 -0
- package/src/projected-query-form-state-adapter.ts +578 -0
- package/src/react-router-binding.tsx +417 -0
- package/src/react-router-path.ts +16 -0
- package/src/scope-selection-context.ts +58 -0
- package/src/scope-selection-provider.tsx +324 -0
- package/src/scope-selection-request.ts +21 -0
- package/src/standard-navigation-shell-frame-renderers.tsx +106 -0
- package/src/standard-navigation-shell-slot-renderers.tsx +289 -0
- package/src/view-chrome-slot-renderer-registry.ts +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-projection-diagnostics-runtime.d.ts","sourceRoot":"","sources":["../src/presentation-projection-diagnostics-runtime.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAUd,UAAU,8CAA8C;IACtD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,yCAAyC,CAAC,EACxD,QAAQ,GACT,EAAE,8CAA8C,2CAgDhD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useState, } from 'react';
|
|
3
|
+
import { PresentationProjectionDiagnosticsContext, } from './presentation-projection-diagnostics-context.js';
|
|
4
|
+
import { mergePresentationProjectionDiagnostics, } from '@cohesivesystems/presentation-core';
|
|
5
|
+
/**
|
|
6
|
+
* Collects projection diagnostics from local interpreters so developer tooling
|
|
7
|
+
* can render one consolidated view instead of scattering warnings through app
|
|
8
|
+
* chrome.
|
|
9
|
+
*/
|
|
10
|
+
export function PresentationProjectionDiagnosticsProvider({ children, }) {
|
|
11
|
+
const [diagnosticsBySource, setDiagnosticsBySource] = useState({});
|
|
12
|
+
const setDiagnostics = useCallback((sourceId, diagnostics) => {
|
|
13
|
+
setDiagnosticsBySource((current) => {
|
|
14
|
+
if (areDiagnosticsEqual(current[sourceId] ?? [], diagnostics)) {
|
|
15
|
+
return current;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
...current,
|
|
19
|
+
[sourceId]: [...diagnostics],
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
}, []);
|
|
23
|
+
const clearDiagnostics = useCallback((sourceId) => {
|
|
24
|
+
setDiagnosticsBySource((current) => {
|
|
25
|
+
if (!current[sourceId]) {
|
|
26
|
+
return current;
|
|
27
|
+
}
|
|
28
|
+
const next = { ...current };
|
|
29
|
+
delete next[sourceId];
|
|
30
|
+
return next;
|
|
31
|
+
});
|
|
32
|
+
}, []);
|
|
33
|
+
const diagnostics = useMemo(() => mergePresentationProjectionDiagnostics(...Object.values(diagnosticsBySource)), [diagnosticsBySource]);
|
|
34
|
+
const contextValue = useMemo(() => ({
|
|
35
|
+
clearDiagnostics,
|
|
36
|
+
diagnostics,
|
|
37
|
+
setDiagnostics,
|
|
38
|
+
}), [clearDiagnostics, diagnostics, setDiagnostics]);
|
|
39
|
+
return (_jsx(PresentationProjectionDiagnosticsContext.Provider, { value: contextValue, children: children }));
|
|
40
|
+
}
|
|
41
|
+
function areDiagnosticsEqual(left, right) {
|
|
42
|
+
if (left.length !== right.length) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return left.every((diagnostic, index) => {
|
|
46
|
+
const candidate = right[index];
|
|
47
|
+
return Boolean(candidate &&
|
|
48
|
+
diagnostic.id === candidate.id &&
|
|
49
|
+
diagnostic.message === candidate.message &&
|
|
50
|
+
diagnostic.severity === candidate.severity &&
|
|
51
|
+
diagnostic.source === candidate.source);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=presentation-projection-diagnostics-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-projection-diagnostics-runtime.js","sourceRoot":"","sources":["../src/presentation-projection-diagnostics-runtime.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,QAAQ,GAET,MAAM,OAAO,CAAA;AAEd,OAAO,EACL,wCAAwC,GACzC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EACL,sCAAsC,GAEvC,MAAM,oCAAoC,CAAA;AAM3C;;;;GAIG;AACH,MAAM,UAAU,yCAAyC,CAAC,EACxD,QAAQ,GACuC;IAC/C,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAE5D,EAAE,CAAC,CAAA;IACL,MAAM,cAAc,GAAG,WAAW,CAAC,CACjC,QAAgB,EAChB,WAAwD,EACxD,EAAE;QACF,sBAAsB,CAAC,CAAC,OAAO,EAAE,EAAE;YACjC,IAAI,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE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AE,KAAK,EAAE,EAAE;QACtC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;QAC9B,OAAO,OAAO,CACZ,SAAS;YACP,UAAU,CAAC,EAAE,KAAK,SAAS,CAAC,EAAE;YAC9B,UAAU,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO;YACxC,UAAU,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;YAC1C,UAAU,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM,CACzC,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PresentationBindingDefinition, ViewDefinition } from '@cohesivesystems/presentation-core';
|
|
2
|
+
import type { NavigationDefinitionProjection } from '@cohesivesystems/presentation-core';
|
|
3
|
+
import { type PresentationPageHostRendererModuleProjection, type SimplePageHostRendererRegistry } from './page-host-renderer-registry.js';
|
|
4
|
+
import { type PresentationRendererRegistry } from './presentation-renderer-registry.js';
|
|
5
|
+
export type { PresentationProjectionTrace, PresentationProjectionTracePageHost, PresentationProjectionTracePageHostRenderer, PresentationProjectionTraceRegion, PresentationProjectionTraceRoute, PresentationProjectionTraceSurface, PresentationProjectionTraceView, } from '@cohesivesystems/presentation-core';
|
|
6
|
+
export interface PresentationProjectionTraceModule extends PresentationPageHostRendererModuleProjection {
|
|
7
|
+
readonly Targets: readonly {
|
|
8
|
+
readonly Bindings: readonly PresentationBindingDefinition[];
|
|
9
|
+
readonly ComponentSet?: string | null;
|
|
10
|
+
readonly Target: string | number;
|
|
11
|
+
}[];
|
|
12
|
+
readonly Views: readonly ViewDefinition[];
|
|
13
|
+
}
|
|
14
|
+
export interface CreatePresentationProjectionTraceOptions<TModule extends PresentationProjectionTraceModule, TContext> {
|
|
15
|
+
readonly componentSet?: string;
|
|
16
|
+
readonly module: TModule | null;
|
|
17
|
+
readonly navigation: NavigationDefinitionProjection | null;
|
|
18
|
+
readonly pageHostRendererRegistry?: SimplePageHostRendererRegistry<TModule, TContext>;
|
|
19
|
+
readonly pathname: string;
|
|
20
|
+
readonly rendererRegistry?: PresentationRendererRegistry<TContext>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds a read-only projection trace while adapting React renderer
|
|
24
|
+
* registries into framework-neutral trace resolver results.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createPresentationProjectionTrace<TModule extends PresentationProjectionTraceModule, TContext = unknown>({ componentSet, module, navigation, pageHostRendererRegistry, pathname, rendererRegistry, }: CreatePresentationProjectionTraceOptions<TModule, TContext>): import("@cohesivesystems/presentation-core").PresentationProjectionTrace;
|
|
27
|
+
//# sourceMappingURL=presentation-projection-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-projection-trace.d.ts","sourceRoot":"","sources":["../src/presentation-projection-trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,cAAc,EACf,MAAM,oCAAoC,CAAA;AAC3C,OAAO,KAAK,EACV,8BAA8B,EAC/B,MAAM,oCAAoC,CAAA;AAI3C,OAAO,EAEL,KAAK,4CAA4C,EACjD,KAAK,8BAA8B,EACpC,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,kCAAkC,CAAA;AAEzC,YAAY,EACV,2BAA2B,EAC3B,mCAAmC,EACnC,2CAA2C,EAC3C,iCAAiC,EACjC,gCAAgC,EAChC,kCAAkC,EAClC,+BAA+B,GAChC,MAAM,oCAAoC,CAAA;AAE3C,MAAM,WAAW,iCACf,SAAQ,4CAA4C;IACpD,QAAQ,CAAC,OAAO,EAAE,SAAS;QACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,6BAA6B,EAAE,CAAA;QAC3D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KACjC,EAAE,CAAA;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,wCAAwC,CACvD,OAAO,SAAS,iCAAiC,EACjD,QAAQ;IAER,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,UAAU,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC1D,QAAQ,CAAC,wBAAwB,CAAC,EAAE,8BAA8B,CAChE,OAAO,EACP,QAAQ,CACT,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,4BAA4B,CAAC,QAAQ,CAAC,CAAA;CACnE;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,SAAS,iCAAiC,EACjD,QAAQ,GAAG,OAAO,EAClB,EACA,YAAY,EACZ,MAAM,EACN,UAAU,EACV,wBAAwB,EACxB,QAAQ,EACR,gBAAgB,GACjB,EAAE,wCAAwC,CAAC,OAAO,EAAE,QAAQ,CAAC,4EA+C7D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createPresentationProjectionTrace as createCorePresentationProjectionTrace, } from '@cohesivesystems/presentation-core';
|
|
2
|
+
import { resolvePageHostRenderer, } from './page-host-renderer-registry.js';
|
|
3
|
+
import { resolvePresentationViewRenderer, } from './presentation-renderer-registry.js';
|
|
4
|
+
/**
|
|
5
|
+
* Builds a read-only projection trace while adapting React renderer
|
|
6
|
+
* registries into framework-neutral trace resolver results.
|
|
7
|
+
*/
|
|
8
|
+
export function createPresentationProjectionTrace({ componentSet, module, navigation, pageHostRendererRegistry, pathname, rendererRegistry, }) {
|
|
9
|
+
return createCorePresentationProjectionTrace({
|
|
10
|
+
componentSet,
|
|
11
|
+
module,
|
|
12
|
+
navigation,
|
|
13
|
+
pathname,
|
|
14
|
+
resolvePageHostRenderer: pageHostRendererRegistry
|
|
15
|
+
? ({ module, pageHost, route }) => {
|
|
16
|
+
const resolution = resolvePageHostRenderer({
|
|
17
|
+
componentKey: null,
|
|
18
|
+
componentSet,
|
|
19
|
+
module,
|
|
20
|
+
pageHost,
|
|
21
|
+
registry: pageHostRendererRegistry,
|
|
22
|
+
route,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
componentKey: resolution.componentKey,
|
|
26
|
+
componentRole: resolution.componentRole,
|
|
27
|
+
rendererKey: resolution.rendererKey,
|
|
28
|
+
resolutionSource: resolution.resolutionSource,
|
|
29
|
+
semanticRole: resolution.semanticRole,
|
|
30
|
+
targetBindingSource: resolution.targetBindingSource,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
: undefined,
|
|
34
|
+
resolveViewRenderer: rendererRegistry
|
|
35
|
+
? ({ module, routeId, view }) => {
|
|
36
|
+
const resolution = resolvePresentationViewRenderer({
|
|
37
|
+
componentSet,
|
|
38
|
+
module,
|
|
39
|
+
registry: rendererRegistry,
|
|
40
|
+
routeId,
|
|
41
|
+
view,
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
componentKey: resolution.componentKey,
|
|
45
|
+
componentRole: resolution.componentRole,
|
|
46
|
+
rendererResolved: Boolean(resolution.renderer),
|
|
47
|
+
resolutionSource: resolution.resolutionSource,
|
|
48
|
+
semanticRole: resolution.semanticRole,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
: undefined,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=presentation-projection-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-projection-trace.js","sourceRoot":"","sources":["../src/presentation-projection-trace.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iCAAiC,IAAI,qCAAqC,GAC3E,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,uBAAuB,GAGxB,MAAM,+BAA+B,CAAA;AAC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AAE,UAAU,CAAC,gBAAgB;oBAC7C,YAAY,EAAE,UAAU,CAAC,YAAY;iBACtC,CAAA;YACH,CAAC;YACH,CAAC,CAAC,SAAS;KACd,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import type { ProjectedQueryFormRuntime, QueryFormDefinition } from '@cohesivesystems/presentation-core';
|
|
3
|
+
export type { PresentationQueryFormState, PresentationQueryFormStateMap, ProjectedQueryFormActionContext, ProjectedQueryFormRuntime, ProjectedQueryFormValueChangeContext, } from '@cohesivesystems/presentation-core';
|
|
4
|
+
export { findPresentationQueryFormStateForDataSource, readPresentationQueryFormAppliedValue, readPresentationQueryFormDraftValue, } from '@cohesivesystems/presentation-core';
|
|
5
|
+
export interface PresentationQueryFormValueContext<TValue extends object> {
|
|
6
|
+
readonly choiceValuesByFieldId: Readonly<Record<string, readonly string[]>>;
|
|
7
|
+
readonly queryForm: QueryFormDefinition;
|
|
8
|
+
readonly value: TValue;
|
|
9
|
+
}
|
|
10
|
+
export interface CreatePresentationQueryFormRuntimeOptions<TValue extends object> {
|
|
11
|
+
readonly applyValue: (context: PresentationQueryFormValueContext<TValue>) => void;
|
|
12
|
+
readonly createDefaultValue: (context: PresentationQueryFormValueContext<TValue>) => TValue;
|
|
13
|
+
readonly normalizeValue?: (context: PresentationQueryFormValueContext<TValue>) => TValue;
|
|
14
|
+
readonly queryForm: QueryFormDefinition | null;
|
|
15
|
+
readonly setDraftValue: Dispatch<SetStateAction<TValue>>;
|
|
16
|
+
readonly value: TValue;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Adapts caller-owned state into the projected query-form runtime contract.
|
|
20
|
+
*
|
|
21
|
+
* The presentation IR defines when a query form has an applied result state,
|
|
22
|
+
* URL state, and execution policy. This helper keeps the generic form actions
|
|
23
|
+
* semantic: apply normalizes the draft and commits it to the result state,
|
|
24
|
+
* reset computes the form default from the available choices and commits that
|
|
25
|
+
* same value. Concrete hosts provide the interpretation for the commit itself,
|
|
26
|
+
* such as URL updates, pagination reset, or data-source invalidation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createPresentationQueryFormRuntime<TValue extends object>({ applyValue, createDefaultValue, normalizeValue, queryForm, setDraftValue, value, }: CreatePresentationQueryFormRuntimeOptions<TValue>): ProjectedQueryFormRuntime<TValue> | null;
|
|
29
|
+
export declare function shouldExecuteQueryFormOnDraftChange(queryForm: QueryFormDefinition | null): boolean;
|
|
30
|
+
//# sourceMappingURL=presentation-query-form-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-runtime.d.ts","sourceRoot":"","sources":["../src/presentation-query-form-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EAEV,yBAAyB,EAEzB,mBAAmB,EACpB,MAAM,oCAAoC,CAAA;AAK3C,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,oCAAoC,GACrC,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EACL,2CAA2C,EAC3C,qCAAqC,EACrC,mCAAmC,GACpC,MAAM,oCAAoC,CAAA;AAE3C,MAAM,WAAW,iCAAiC,CAAC,MAAM,SAAS,MAAM;IACtE,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3E,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,yCAAyC,CAAC,MAAM,SAAS,MAAM;IAC9E,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACjF,QAAQ,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAA;IAC3F,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAA;IACxF,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,SAAS,MAAM,EAAE,EACxE,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,GACN,EAAE,yCAAyC,CAAC,MAAM,CAAC,GAAG,yBAAyB,CAAC,MAAM,CAAC,GAAG,IAAI,CAmC9F;AAED,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,WAGxF"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { queryFormExecutionModes } from '@cohesivesystems/presentation-contracts';
|
|
2
|
+
const debouncedDraftExecutionTimers = new Map();
|
|
3
|
+
export { findPresentationQueryFormStateForDataSource, readPresentationQueryFormAppliedValue, readPresentationQueryFormDraftValue, } from '@cohesivesystems/presentation-core';
|
|
4
|
+
/**
|
|
5
|
+
* Adapts caller-owned state into the projected query-form runtime contract.
|
|
6
|
+
*
|
|
7
|
+
* The presentation IR defines when a query form has an applied result state,
|
|
8
|
+
* URL state, and execution policy. This helper keeps the generic form actions
|
|
9
|
+
* semantic: apply normalizes the draft and commits it to the result state,
|
|
10
|
+
* reset computes the form default from the available choices and commits that
|
|
11
|
+
* same value. Concrete hosts provide the interpretation for the commit itself,
|
|
12
|
+
* such as URL updates, pagination reset, or data-source invalidation.
|
|
13
|
+
*/
|
|
14
|
+
export function createPresentationQueryFormRuntime({ applyValue, createDefaultValue, normalizeValue, queryForm, setDraftValue, value, }) {
|
|
15
|
+
if (!queryForm) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const normalize = (context) => normalizeValue ? normalizeValue(context) : context.value;
|
|
19
|
+
const commit = (context) => {
|
|
20
|
+
const nextValue = normalize(context);
|
|
21
|
+
setDraftValue(nextValue);
|
|
22
|
+
applyValue({ ...context, value: nextValue });
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
apply: (context) => commit(createQueryFormValueContext(queryForm, context, context.value)),
|
|
26
|
+
reset: (context) => {
|
|
27
|
+
const resetContext = createQueryFormValueContext(queryForm, context, context.value);
|
|
28
|
+
const nextValue = createDefaultValue(resetContext);
|
|
29
|
+
commit({ ...resetContext, value: nextValue });
|
|
30
|
+
},
|
|
31
|
+
setValue: (update, context) => {
|
|
32
|
+
const nextValue = resolveSetStateValue(update, value);
|
|
33
|
+
setDraftValue(nextValue);
|
|
34
|
+
if (context) {
|
|
35
|
+
executeQueryFormDraftChange(queryForm, commit, createQueryFormValueContext(queryForm, context, nextValue));
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
value,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function shouldExecuteQueryFormOnDraftChange(queryForm) {
|
|
42
|
+
return queryForm?.Target.State.Execution.Mode === queryFormExecutionModes.live ||
|
|
43
|
+
queryForm?.Target.State.Execution.Mode === queryFormExecutionModes.debouncedLive;
|
|
44
|
+
}
|
|
45
|
+
function createQueryFormValueContext(queryForm, context, value) {
|
|
46
|
+
return {
|
|
47
|
+
choiceValuesByFieldId: context.choiceValuesByFieldId,
|
|
48
|
+
queryForm,
|
|
49
|
+
value,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function executeQueryFormDraftChange(queryForm, commit, context) {
|
|
53
|
+
const execution = queryForm.Target.State.Execution;
|
|
54
|
+
if (execution.Mode === queryFormExecutionModes.live) {
|
|
55
|
+
commit(context);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (execution.Mode === queryFormExecutionModes.debouncedLive) {
|
|
59
|
+
const key = queryForm.Target.State.StateId || queryForm.Id;
|
|
60
|
+
const previousTimer = debouncedDraftExecutionTimers.get(key);
|
|
61
|
+
if (previousTimer) {
|
|
62
|
+
clearTimeout(previousTimer);
|
|
63
|
+
}
|
|
64
|
+
debouncedDraftExecutionTimers.set(key, setTimeout(() => {
|
|
65
|
+
debouncedDraftExecutionTimers.delete(key);
|
|
66
|
+
commit(context);
|
|
67
|
+
}, execution.DebounceMilliseconds ?? 250));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function resolveSetStateValue(update, current) {
|
|
71
|
+
return typeof update === 'function'
|
|
72
|
+
? update(current)
|
|
73
|
+
: update;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=presentation-query-form-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-runtime.js","sourceRoot":"","sources":["../src/presentation-query-form-runtime.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AAEjF,MAAM,6BAA6B,GAAG,IAAI,GAAG,EAAyC,CAAA;AAUtF,OAAO,EACL,2CAA2C,EAC3C,qCAAqC,EACrC,mCAAmC,GACpC,MAAM,oCAAoC,CAAA;AAiB3C;;;;;;;;;GASG;AACH,MAAM,UAAU,kCAAkC,CAAwB,EACxE,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,GAC6C;IAClD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,SAAS,GAAG,CAAC,OAAkD,EAAE,EAAE,CACvE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAA;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entation-core';
|
|
2
|
+
import type { PresentationQueryFormStateAdapter, PresentationQueryFormStateAdapterRegistry } from './presentation-query-form-state.js';
|
|
3
|
+
export declare function resolvePresentationQueryFormStateAdapters(module: PresentationModuleDefinition | null, registry: PresentationQueryFormStateAdapterRegistry): readonly PresentationQueryFormStateAdapter[];
|
|
4
|
+
//# sourceMappingURL=presentation-query-form-state-adapter-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state-adapter-registry.d.ts","sourceRoot":"","sources":["../src/presentation-query-form-state-adapter-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAA;AACtF,OAAO,KAAK,EACV,iCAAiC,EACjC,yCAAyC,EAC1C,MAAM,iCAAiC,CAAA;AAGxC,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,4BAA4B,GAAG,IAAI,EAC3C,QAAQ,EAAE,yCAAyC,GAClD,SAAS,iCAAiC,EAAE,CAQ9C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createProjectedQueryFormStateAdapter } from './projected-query-form-state-adapter.js';
|
|
2
|
+
export function resolvePresentationQueryFormStateAdapters(module, registry) {
|
|
3
|
+
if (!module) {
|
|
4
|
+
return Object.values(registry).filter(isPresentationQueryFormStateAdapter);
|
|
5
|
+
}
|
|
6
|
+
return module.QueryForms
|
|
7
|
+
.map((queryForm) => registry[queryForm.Id] ?? createProjectedQueryFormStateAdapter(queryForm.Id))
|
|
8
|
+
.filter(isPresentationQueryFormStateAdapter);
|
|
9
|
+
}
|
|
10
|
+
function isPresentationQueryFormStateAdapter(value) {
|
|
11
|
+
return Boolean(value);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=presentation-query-form-state-adapter-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state-adapter-registry.js","sourceRoot":"","sources":["../src/presentation-query-form-state-adapter-registry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAA;AAE3F,MAAM,UAAU,yCAAyC,CACvD,MAA2C,EAC3C,QAAmD;IAEnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAA;IAC5E,CAAC;IAED,OAAO,MAAM,CAAC,UAAU;SACrB,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,oCAAoC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SAChG,MAAM,CAAC,mCAAmC,CAAC,CAAA;AAChD,CAAC;AAED,SAAS,mCAAmC,CAC1C,KAAoD;IAEpD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAA;AACvB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
import type { InputFormDefinition, PresentationQueryFormStateMap, QueryFormDefinition } from '@cohesivesystems/presentation-core';
|
|
3
|
+
export interface PresentationQueryFormStateEntry<TValue = unknown> {
|
|
4
|
+
readonly appliedValue: TValue;
|
|
5
|
+
readonly draftValue: TValue;
|
|
6
|
+
readonly inputForm: InputFormDefinition | null;
|
|
7
|
+
readonly queryForm: QueryFormDefinition | null;
|
|
8
|
+
readonly queryFormId: string;
|
|
9
|
+
readonly setAppliedValue: Dispatch<SetStateAction<TValue>>;
|
|
10
|
+
readonly setDraftValue: Dispatch<SetStateAction<TValue>>;
|
|
11
|
+
}
|
|
12
|
+
export interface PresentationQueryFormStateContextValue {
|
|
13
|
+
readonly entries: Readonly<Record<string, PresentationQueryFormStateEntry>>;
|
|
14
|
+
readonly queryFormStates: PresentationQueryFormStateMap;
|
|
15
|
+
}
|
|
16
|
+
export declare const PresentationQueryFormStateContext: import("react").Context<PresentationQueryFormStateContextValue | null>;
|
|
17
|
+
export declare function usePresentationQueryFormState<TValue = unknown>(queryFormId: string): PresentationQueryFormStateEntry<TValue> | undefined;
|
|
18
|
+
export declare function usePresentationQueryFormStateMap(): Readonly<Record<string, import("@cohesivesystems/presentation-core").PresentationQueryFormState<unknown>>>;
|
|
19
|
+
export declare function usePresentationQueryFormStateEntries(): Readonly<Record<string, PresentationQueryFormStateEntry<unknown>>>;
|
|
20
|
+
//# sourceMappingURL=presentation-query-form-state-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state-context.d.ts","sourceRoot":"","sources":["../src/presentation-query-form-state-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,oCAAoC,CAAA;AAE3C,MAAM,WAAW,+BAA+B,CAAC,MAAM,GAAG,OAAO;IAC/D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;IAC1D,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC,CAAA;IAC3E,QAAQ,CAAC,eAAe,EAAE,6BAA6B,CAAA;CACxD;AAED,eAAO,MAAM,iCAAiC,wEACsB,CAAA;AAEpE,wBAAgB,6BAA6B,CAAC,MAAM,GAAG,OAAO,EAC5D,WAAW,EAAE,MAAM,GAIf,+BAA+B,CAAC,MAAM,CAAC,GACvC,SAAS,CACd;AAED,wBAAgB,gCAAgC,+GAE/C;AAED,wBAAgB,oCAAoC,uEAEnD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext, useContext, } from 'react';
|
|
2
|
+
export const PresentationQueryFormStateContext = createContext(null);
|
|
3
|
+
export function usePresentationQueryFormState(queryFormId) {
|
|
4
|
+
const context = useRequiredPresentationQueryFormStateContext();
|
|
5
|
+
return context.entries[queryFormId];
|
|
6
|
+
}
|
|
7
|
+
export function usePresentationQueryFormStateMap() {
|
|
8
|
+
return useRequiredPresentationQueryFormStateContext().queryFormStates;
|
|
9
|
+
}
|
|
10
|
+
export function usePresentationQueryFormStateEntries() {
|
|
11
|
+
return useRequiredPresentationQueryFormStateContext().entries;
|
|
12
|
+
}
|
|
13
|
+
function useRequiredPresentationQueryFormStateContext() {
|
|
14
|
+
const context = useContext(PresentationQueryFormStateContext);
|
|
15
|
+
if (!context) {
|
|
16
|
+
throw new Error('Presentation query form state must be used inside PresentationQueryFormStateProvider.');
|
|
17
|
+
}
|
|
18
|
+
return context;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=presentation-query-form-state-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state-context.js","sourceRoot":"","sources":["../src/presentation-query-form-state-context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,GAGX,MAAM,OAAO,CAAA;AAuBd,MAAM,CAAC,MAAM,iCAAiC,GAC5C,aAAa,CAAgD,IAAI,CAAC,CAAA;AAEpE,MAAM,UAAU,6BAA6B,CAC3C,WAAmB;IAEnB,MAAM,OAAO,GAAG,4CAA4C,EAAE,CAAA;IAC9D,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAErB,CAAA;AACf,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO,4CAA4C,EAAE,CAAC,eAAe,CAAA;AACvE,CAAC;AAED,MAAM,UAAU,oCAAoC;IAClD,OAAO,4CAA4C,EAAE,CAAC,OAAO,CAAA;AAC/D,CAAC;AAED,SAAS,4CAA4C;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,iCAAiC,CAAC,CAAA;IAC7D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAA;IAC1G,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type InputFormDefinition, type PresentationModuleDefinition, type QueryFormDefinition } from '@cohesivesystems/presentation-core';
|
|
3
|
+
export interface PresentationQueryFormStateAdapter<TValue extends object = object> {
|
|
4
|
+
readonly queryFormId: string;
|
|
5
|
+
createAppliedSearch?(context: PresentationQueryFormAppliedSearchContext<TValue>): string;
|
|
6
|
+
createDefaultValue(context: PresentationQueryFormStateAdapterContext): TValue;
|
|
7
|
+
createSearchKey?(context: PresentationQueryFormStateAdapterContext): string;
|
|
8
|
+
normalizeValue?(context: PresentationQueryFormAdapterValueContext<TValue>): TValue;
|
|
9
|
+
readValueFromSearch?(context: PresentationQueryFormStateAdapterContext): TValue;
|
|
10
|
+
}
|
|
11
|
+
export type PresentationQueryFormStateAdapterRegistry = Readonly<Record<string, PresentationQueryFormStateAdapter | undefined>>;
|
|
12
|
+
export interface PresentationQueryFormStateAdapterContext {
|
|
13
|
+
readonly choiceValuesByFieldId?: Readonly<Record<string, readonly string[]>>;
|
|
14
|
+
readonly inputForm: InputFormDefinition | null;
|
|
15
|
+
readonly module: PresentationModuleDefinition | null;
|
|
16
|
+
readonly queryForm: QueryFormDefinition | null;
|
|
17
|
+
readonly search: string;
|
|
18
|
+
}
|
|
19
|
+
export interface PresentationQueryFormAdapterValueContext<TValue extends object> extends PresentationQueryFormStateAdapterContext {
|
|
20
|
+
readonly choiceValuesByFieldId: Readonly<Record<string, readonly string[]>>;
|
|
21
|
+
readonly value: TValue;
|
|
22
|
+
}
|
|
23
|
+
export type PresentationQueryFormAppliedSearchContext<TValue extends object> = PresentationQueryFormAdapterValueContext<TValue>;
|
|
24
|
+
interface PresentationQueryFormStateProviderProps extends PropsWithChildren {
|
|
25
|
+
readonly adapterRegistry: PresentationQueryFormStateAdapterRegistry;
|
|
26
|
+
}
|
|
27
|
+
export declare function PresentationQueryFormStateProvider({ adapterRegistry, children, }: PresentationQueryFormStateProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=presentation-query-form-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state.d.ts","sourceRoot":"","sources":["../src/presentation-query-form-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,OAAO,CAAA;AAGd,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAA;AAY3C,MAAM,WAAW,iCAAiC,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IAC/E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAE5B,mBAAmB,CAAC,CAAC,OAAO,EAAE,yCAAyC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IACxF,kBAAkB,CAAC,OAAO,EAAE,wCAAwC,GAAG,MAAM,CAAA;IAC7E,eAAe,CAAC,CAAC,OAAO,EAAE,wCAAwC,GAAG,MAAM,CAAA;IAC3E,cAAc,CAAC,CAAC,OAAO,EAAE,wCAAwC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAClF,mBAAmB,CAAC,CAAC,OAAO,EAAE,wCAAwC,GAAG,MAAM,CAAA;CAChF;AAED,MAAM,MAAM,yCAAyC,GAAG,QAAQ,CAC9D,MAAM,CAAC,MAAM,EAAE,iCAAiC,GAAG,SAAS,CAAC,CAC9D,CAAA;AAED,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC5E,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,MAAM,EAAE,4BAA4B,GAAG,IAAI,CAAA;IACpD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,wCAAwC,CAAC,MAAM,SAAS,MAAM,CAC7E,SAAQ,wCAAwC;IAChD,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,yCAAyC,CAAC,MAAM,SAAS,MAAM,IACzE,wCAAwC,CAAC,MAAM,CAAC,CAAA;AAElD,UAAU,uCAAwC,SAAQ,iBAAiB;IACzE,QAAQ,CAAC,eAAe,EAAE,yCAAyC,CAAA;CACpE;AAcD,wBAAgB,kCAAkC,CAAC,EACjD,eAAe,EACf,QAAQ,GACT,EAAE,uCAAuC,2CA8BzC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState, } from 'react';
|
|
3
|
+
import { useLocation } from 'react-router';
|
|
4
|
+
import { findPresentationInputForm, findPresentationQueryForm, } from '@cohesivesystems/presentation-core';
|
|
5
|
+
import { usePresentationModule } from './presentation-module-context.js';
|
|
6
|
+
import { PresentationQueryFormStateContext, } from './presentation-query-form-state-context.js';
|
|
7
|
+
import { resolvePresentationQueryFormStateAdapters } from './presentation-query-form-state-adapter-registry.js';
|
|
8
|
+
export function PresentationQueryFormStateProvider({ adapterRegistry, children, }) {
|
|
9
|
+
const location = useLocation();
|
|
10
|
+
const module = usePresentationModule();
|
|
11
|
+
const adapters = useMemo(() => resolvePresentationQueryFormStateAdapters(module, adapterRegistry), [adapterRegistry, module]);
|
|
12
|
+
const initialStates = useMemo(() => adapters.map((adapter) => createInitialQueryFormState(adapter, module, location.search)), [adapters, location.search, module]);
|
|
13
|
+
const stateKey = useMemo(() => adapters.map((adapter) => createQueryFormStateKey(adapter, module, location.search)).join('|'), [adapters, location.search, module]);
|
|
14
|
+
return (_jsx(PresentationQueryFormStateScope, { initialStates: initialStates, children: children }, stateKey));
|
|
15
|
+
}
|
|
16
|
+
function PresentationQueryFormStateScope({ children, initialStates, }) {
|
|
17
|
+
const [storedStates, setStoredStates] = useState(() => Object.fromEntries(initialStates.map((state) => [
|
|
18
|
+
state.queryFormId,
|
|
19
|
+
{
|
|
20
|
+
appliedValue: state.initialValue,
|
|
21
|
+
draftValue: state.initialValue,
|
|
22
|
+
},
|
|
23
|
+
])));
|
|
24
|
+
const entries = useMemo(() => Object.fromEntries(initialStates.map((state) => {
|
|
25
|
+
const storedState = storedStates[state.queryFormId] ?? {
|
|
26
|
+
appliedValue: state.initialValue,
|
|
27
|
+
draftValue: state.initialValue,
|
|
28
|
+
};
|
|
29
|
+
return [
|
|
30
|
+
state.queryFormId,
|
|
31
|
+
{
|
|
32
|
+
appliedValue: storedState.appliedValue,
|
|
33
|
+
draftValue: storedState.draftValue,
|
|
34
|
+
inputForm: state.inputForm,
|
|
35
|
+
queryForm: state.queryForm,
|
|
36
|
+
queryFormId: state.queryFormId,
|
|
37
|
+
setAppliedValue: (update) => setStoredStates((current) => updateStoredQueryFormState(current, state.queryFormId, 'appliedValue', update)),
|
|
38
|
+
setDraftValue: (update) => setStoredStates((current) => updateStoredQueryFormState(current, state.queryFormId, 'draftValue', update)),
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
})), [initialStates, storedStates]);
|
|
42
|
+
const queryFormStates = useMemo(() => Object.fromEntries(Object.values(entries).flatMap((entry) => entry.queryForm
|
|
43
|
+
? [[
|
|
44
|
+
entry.queryFormId,
|
|
45
|
+
{
|
|
46
|
+
appliedValue: entry.appliedValue,
|
|
47
|
+
draftValue: entry.draftValue,
|
|
48
|
+
queryForm: entry.queryForm,
|
|
49
|
+
queryFormId: entry.queryFormId,
|
|
50
|
+
},
|
|
51
|
+
]]
|
|
52
|
+
: [])), [entries]);
|
|
53
|
+
const value = useMemo(() => ({
|
|
54
|
+
entries,
|
|
55
|
+
queryFormStates,
|
|
56
|
+
}), [entries, queryFormStates]);
|
|
57
|
+
return (_jsx(PresentationQueryFormStateContext.Provider, { value: value, children: children }));
|
|
58
|
+
}
|
|
59
|
+
function createInitialQueryFormState(adapter, module, search) {
|
|
60
|
+
const adapterContext = createAdapterContext(adapter, module, search);
|
|
61
|
+
return {
|
|
62
|
+
initialValue: adapter.readValueFromSearch?.(adapterContext) ??
|
|
63
|
+
adapter.createDefaultValue(adapterContext),
|
|
64
|
+
inputForm: adapterContext.inputForm,
|
|
65
|
+
queryForm: adapterContext.queryForm,
|
|
66
|
+
queryFormId: adapter.queryFormId,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function createQueryFormStateKey(adapter, module, search) {
|
|
70
|
+
const adapterContext = createAdapterContext(adapter, module, search);
|
|
71
|
+
return `${adapter.queryFormId}:${adapter.createSearchKey?.(adapterContext) ?? ''}`;
|
|
72
|
+
}
|
|
73
|
+
function createAdapterContext(adapter, module, search) {
|
|
74
|
+
const queryForm = findPresentationQueryForm(module, adapter.queryFormId);
|
|
75
|
+
return {
|
|
76
|
+
inputForm: queryForm ? findPresentationInputForm(module, queryForm.FormId) : null,
|
|
77
|
+
module,
|
|
78
|
+
queryForm,
|
|
79
|
+
search,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function updateStoredQueryFormState(current, queryFormId, field, update) {
|
|
83
|
+
const currentState = current[queryFormId] ?? {
|
|
84
|
+
appliedValue: {},
|
|
85
|
+
draftValue: {},
|
|
86
|
+
};
|
|
87
|
+
const currentValue = currentState[field];
|
|
88
|
+
const nextValue = typeof update === 'function'
|
|
89
|
+
? update(currentValue)
|
|
90
|
+
: update;
|
|
91
|
+
return {
|
|
92
|
+
...current,
|
|
93
|
+
[queryFormId]: {
|
|
94
|
+
...currentState,
|
|
95
|
+
[field]: nextValue,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=presentation-query-form-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-query-form-state.js","sourceRoot":"","sources":["../src/presentation-query-form-state.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,OAAO,EACP,QAAQ,GAGT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAI1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EACL,iCAAiC,GAElC,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,yCAAyC,EAAE,MAAM,kDAAkD,CAAA;AAqD5G,MAAM,UAAU,kCAAkC,CAAC,EACjD,eAAe,EACf,QAAQ,GACgC;IACxC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,MAAM,GAAG,qBAAqB,EAAE,CAAA;IACtC,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,yCAAyC,CAAC,MAAM,EAAE,eAAe,CAAC,EACxE,CAAC,eAAe,EAAE,MAAM,CAAC,CAC1B,CAAA;IACD,MAAM,aAAa,GAAG,O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AE/B,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI;QAC3C,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,EAAE;KACf,CAAA;IACD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IACxC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,UAAU;QAC5C,CAAC,CAAE,MAAsC,CAAC,YAAY,CAAC;QACvD,CAAC,CAAC,MAAM,CAAA;IAEV,OAAO;QACL,GAAG,OAAO;QACV,CAAC,WAAW,CAAC,EAAE;YACb,GAAG,YAAY;YACf,CAAC,KAAK,CAAC,EAAE,SAAS;SACnB;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type FieldPresentationDefinition, type PresentationDataSourceResolver, type PresentationModuleDefinition, type PresentationSurface, type PresentationCompositeRendererRegistry as CorePresentationCompositeRendererRegistry, type PresentationRendererBindingModuleProjection, type PresentationRendererRegistry as CorePresentationRendererRegistry, type PresentationViewRendererResolution as CorePresentationViewRendererResolution, type PresentationViewRendererResolutionSource, type ViewDefinition } from '@cohesivesystems/presentation-core';
|
|
3
|
+
/**
|
|
4
|
+
* Options that let a view renderer project only selected regions of a view.
|
|
5
|
+
*/
|
|
6
|
+
export interface PresentationViewRegionRenderOptions {
|
|
7
|
+
/** Region ids to render. Omit this to render every region declared by the view. */
|
|
8
|
+
readonly includeRegionIds?: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Runtime context supplied to a concrete renderer for a semantic presentation view.
|
|
12
|
+
*
|
|
13
|
+
* @typeParam TContext - App-specific projection context carried through rendering.
|
|
14
|
+
*/
|
|
15
|
+
export interface PresentationViewRenderContext<TContext> {
|
|
16
|
+
/** Component key resolved from presentation target bindings, when matched. */
|
|
17
|
+
readonly componentKey: string | null;
|
|
18
|
+
/** Component role resolved from presentation target bindings, when matched. */
|
|
19
|
+
readonly componentRole: string | null;
|
|
20
|
+
/** App-specific runtime context supplied by the projection host. */
|
|
21
|
+
readonly context: TContext;
|
|
22
|
+
/** Resolver for semantic data sources referenced by the view or nested renderers. */
|
|
23
|
+
readonly dataSourceResolver: PresentationDataSourceResolver;
|
|
24
|
+
/** Presentation module that owns the projected view graph and bindings. */
|
|
25
|
+
readonly module: PresentationModuleDefinition;
|
|
26
|
+
/** Renders this view's regions, optionally restricted to specific region ids. */
|
|
27
|
+
readonly renderRegions: (view: ViewDefinition, options?: PresentationViewRegionRenderOptions) => ReactNode;
|
|
28
|
+
/** Renders another view from the same presentation module by semantic view id. */
|
|
29
|
+
readonly renderView: (viewId: string) => ReactNode;
|
|
30
|
+
/** Surface on which the current view is being projected. */
|
|
31
|
+
readonly surface: PresentationSurface;
|
|
32
|
+
/** Semantic view definition being adapted to React. */
|
|
33
|
+
readonly view: ViewDefinition;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* React renderer for a semantic presentation view.
|
|
37
|
+
*/
|
|
38
|
+
export type PresentationViewRenderer<TContext> = (context: PresentationViewRenderContext<TContext>) => ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Runtime context supplied when rendering a scalar or structured presentation value.
|
|
41
|
+
*
|
|
42
|
+
* @typeParam TContext - App-specific projection context carried through rendering.
|
|
43
|
+
*/
|
|
44
|
+
export interface PresentationValueRenderContext<TContext> {
|
|
45
|
+
/** App-specific runtime context supplied by the projection host. */
|
|
46
|
+
readonly context: TContext;
|
|
47
|
+
/** Resolver for data sources available to value renderers. */
|
|
48
|
+
readonly dataSourceResolver: PresentationDataSourceResolver;
|
|
49
|
+
/** Field metadata that describes the value, when the value came from a field. */
|
|
50
|
+
readonly field?: FieldPresentationDefinition | null;
|
|
51
|
+
/** Presentation module that owns the value's field and binding definitions. */
|
|
52
|
+
readonly module: PresentationModuleDefinition;
|
|
53
|
+
/** Raw value selected from the semantic data source. */
|
|
54
|
+
readonly value: unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* React renderer for an individual presentation value.
|
|
58
|
+
*/
|
|
59
|
+
export type PresentationValueRenderer<TContext> = (context: PresentationValueRenderContext<TContext>) => ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* Runtime context supplied to presentation controls that are not tied to a single view.
|
|
62
|
+
*
|
|
63
|
+
* @typeParam TContext - App-specific projection context carried through rendering.
|
|
64
|
+
*/
|
|
65
|
+
export interface PresentationControlRenderContext<TContext> {
|
|
66
|
+
/** App-specific runtime context supplied by the projection host. */
|
|
67
|
+
readonly context: TContext;
|
|
68
|
+
/** Resolver for data sources available to control renderers. */
|
|
69
|
+
readonly dataSourceResolver: PresentationDataSourceResolver;
|
|
70
|
+
/** Presentation module that owns the control binding definitions. */
|
|
71
|
+
readonly module: PresentationModuleDefinition;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* React renderer for an auxiliary presentation control.
|
|
75
|
+
*/
|
|
76
|
+
export type PresentationControlRenderer<TContext> = (context: PresentationControlRenderContext<TContext>) => ReactNode;
|
|
77
|
+
export type PresentationCompositeRendererRegistry<TContext> = CorePresentationCompositeRendererRegistry<PresentationViewRenderer<TContext>>;
|
|
78
|
+
/**
|
|
79
|
+
* Complete renderer registry used by the React presentation projection runtime.
|
|
80
|
+
*/
|
|
81
|
+
export interface PresentationRendererRegistry<TContext> extends CorePresentationRendererRegistry<PresentationViewRenderer<TContext>, PresentationControlRenderer<TContext>, PresentationValueRenderer<TContext>> {
|
|
82
|
+
/** Composite renderers that adapt whole semantic views. */
|
|
83
|
+
readonly composites?: PresentationCompositeRendererRegistry<TContext>;
|
|
84
|
+
/** Control renderers keyed by presentation control ids or component keys. */
|
|
85
|
+
readonly controls?: Readonly<Record<string, PresentationControlRenderer<TContext>>>;
|
|
86
|
+
/** Value renderers keyed by semantic value or field renderer ids. */
|
|
87
|
+
readonly values?: Readonly<Record<string, PresentationValueRenderer<TContext>>>;
|
|
88
|
+
}
|
|
89
|
+
export type PresentationViewRendererResolution<TContext> = CorePresentationViewRendererResolution<PresentationViewRenderer<TContext>>;
|
|
90
|
+
export type { PresentationRendererBindingModuleProjection };
|
|
91
|
+
export type { PresentationViewRendererResolutionSource };
|
|
92
|
+
export interface ResolvePresentationViewRendererOptions<TContext, TModule extends PresentationRendererBindingModuleProjection = PresentationRendererBindingModuleProjection> {
|
|
93
|
+
readonly componentSet?: string | null;
|
|
94
|
+
readonly module: TModule;
|
|
95
|
+
readonly registry: PresentationRendererRegistry<TContext>;
|
|
96
|
+
readonly routeId?: string | null;
|
|
97
|
+
readonly view: ViewDefinition;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Combines renderer registries in declaration order, with later registries
|
|
101
|
+
* overriding earlier renderer keys and fallback renderers.
|
|
102
|
+
*/
|
|
103
|
+
export declare function mergePresentationRendererRegistries<TContext>(...registries: readonly PresentationRendererRegistry<TContext>[]): PresentationRendererRegistry<TContext>;
|
|
104
|
+
/**
|
|
105
|
+
* Resolves the React renderer for a semantic view while keeping binding
|
|
106
|
+
* resolution in the framework-neutral core package.
|
|
107
|
+
*/
|
|
108
|
+
export declare function resolvePresentationViewRenderer<TContext, TModule extends PresentationRendererBindingModuleProjection = PresentationRendererBindingModuleProjection>({ componentSet, module, registry, routeId, view, }: ResolvePresentationViewRendererOptions<TContext, TModule>): PresentationViewRendererResolution<TContext>;
|
|
109
|
+
//# sourceMappingURL=presentation-renderer-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-renderer-registry.d.ts","sourceRoot":"","sources":["../src/presentation-renderer-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAIL,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,qCAAqC,IAAI,yCAAyC,EACvF,KAAK,2CAA2C,EAChD,KAAK,4BAA4B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