@cohesivesystems/presentation-react-shadcn 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/document-workspace-surface-slot-renderers.d.ts +58 -0
- package/dist/document-workspace-surface-slot-renderers.d.ts.map +1 -0
- package/dist/document-workspace-surface-slot-renderers.js +206 -0
- package/dist/document-workspace-surface-slot-renderers.js.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts +8 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.js +2 -0
- package/dist/navigation-shell-frame-renderer-registry.js.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts +9 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.js +2 -0
- package/dist/navigation-shell-slot-renderer-registry.js.map +1 -0
- package/dist/page-host-unavailable-renderer.d.ts +10 -0
- package/dist/page-host-unavailable-renderer.d.ts.map +1 -0
- package/dist/page-host-unavailable-renderer.js +27 -0
- package/dist/page-host-unavailable-renderer.js.map +1 -0
- package/dist/presentation-action-group.d.ts +99 -0
- package/dist/presentation-action-group.d.ts.map +1 -0
- package/dist/presentation-action-group.js +214 -0
- package/dist/presentation-action-group.js.map +1 -0
- package/dist/presentation-badge-target-interpreter.d.ts +26 -0
- package/dist/presentation-badge-target-interpreter.d.ts.map +1 -0
- package/dist/presentation-badge-target-interpreter.js +17 -0
- package/dist/presentation-badge-target-interpreter.js.map +1 -0
- package/dist/presentation-component-groups.d.ts +968 -0
- package/dist/presentation-component-groups.d.ts.map +1 -0
- package/dist/presentation-component-groups.js +505 -0
- package/dist/presentation-component-groups.js.map +1 -0
- package/dist/presentation-component-system-diagnostics.d.ts +27 -0
- package/dist/presentation-component-system-diagnostics.d.ts.map +1 -0
- package/dist/presentation-component-system-diagnostics.js +399 -0
- package/dist/presentation-component-system-diagnostics.js.map +1 -0
- package/dist/presentation-component-system.d.ts +31 -0
- package/dist/presentation-component-system.d.ts.map +1 -0
- package/dist/presentation-component-system.js +61 -0
- package/dist/presentation-component-system.js.map +1 -0
- package/dist/presentation-icon-diagnostics.d.ts +12 -0
- package/dist/presentation-icon-diagnostics.d.ts.map +1 -0
- package/dist/presentation-icon-diagnostics.js +17 -0
- package/dist/presentation-icon-diagnostics.js.map +1 -0
- package/dist/presentation-icon-registry.d.ts +28 -0
- package/dist/presentation-icon-registry.d.ts.map +1 -0
- package/dist/presentation-icon-registry.js +80 -0
- package/dist/presentation-icon-registry.js.map +1 -0
- package/dist/presentation-projection-trace-panel.d.ts +10 -0
- package/dist/presentation-projection-trace-panel.d.ts.map +1 -0
- package/dist/presentation-projection-trace-panel.js +48 -0
- package/dist/presentation-projection-trace-panel.js.map +1 -0
- package/dist/presentation-routed-surface-host.d.ts +19 -0
- package/dist/presentation-routed-surface-host.d.ts.map +1 -0
- package/dist/presentation-routed-surface-host.js +12 -0
- package/dist/presentation-routed-surface-host.js.map +1 -0
- package/dist/presentation-shadcn-component-system.d.ts +22 -0
- package/dist/presentation-shadcn-component-system.d.ts.map +1 -0
- package/dist/presentation-shadcn-component-system.js +2 -0
- package/dist/presentation-shadcn-component-system.js.map +1 -0
- package/dist/presentation-standard-renderers.d.ts +168 -0
- package/dist/presentation-standard-renderers.d.ts.map +1 -0
- package/dist/presentation-standard-renderers.js +440 -0
- package/dist/presentation-standard-renderers.js.map +1 -0
- package/dist/presentation-surface-renderer.d.ts +23 -0
- package/dist/presentation-surface-renderer.d.ts.map +1 -0
- package/dist/presentation-surface-renderer.js +119 -0
- package/dist/presentation-surface-renderer.js.map +1 -0
- package/dist/presentation-value-renderers.d.ts +10 -0
- package/dist/presentation-value-renderers.d.ts.map +1 -0
- package/dist/presentation-value-renderers.js +14 -0
- package/dist/presentation-value-renderers.js.map +1 -0
- package/dist/process-task-icons.d.ts +49 -0
- package/dist/process-task-icons.d.ts.map +1 -0
- package/dist/process-task-icons.js +154 -0
- package/dist/process-task-icons.js.map +1 -0
- package/dist/projected-activity-state.d.ts +17 -0
- package/dist/projected-activity-state.d.ts.map +1 -0
- package/dist/projected-activity-state.js +22 -0
- package/dist/projected-activity-state.js.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts +4 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.js +9 -0
- package/dist/projected-collection-action-runtime-diagnostics.js.map +1 -0
- package/dist/projected-collection-view.d.ts +90 -0
- package/dist/projected-collection-view.d.ts.map +1 -0
- package/dist/projected-collection-view.js +532 -0
- package/dist/projected-collection-view.js.map +1 -0
- package/dist/projected-document-action-status-notices.d.ts +15 -0
- package/dist/projected-document-action-status-notices.d.ts.map +1 -0
- package/dist/projected-document-action-status-notices.js +33 -0
- package/dist/projected-document-action-status-notices.js.map +1 -0
- package/dist/projected-document-badges.d.ts +24 -0
- package/dist/projected-document-badges.d.ts.map +1 -0
- package/dist/projected-document-badges.js +53 -0
- package/dist/projected-document-badges.js.map +1 -0
- package/dist/projected-document-editor-surface.d.ts +46 -0
- package/dist/projected-document-editor-surface.d.ts.map +1 -0
- package/dist/projected-document-editor-surface.js +399 -0
- package/dist/projected-document-editor-surface.js.map +1 -0
- package/dist/projected-document-workspace-notices.d.ts +24 -0
- package/dist/projected-document-workspace-notices.d.ts.map +1 -0
- package/dist/projected-document-workspace-notices.js +14 -0
- package/dist/projected-document-workspace-notices.js.map +1 -0
- package/dist/projected-document-workspace-prompt-child-view-registry.d.ts +25 -0
- package/dist/projected-document-workspace-prompt-child-view-registry.d.ts.map +1 -0
- package/dist/projected-document-workspace-prompt-child-view-registry.js +41 -0
- package/dist/projected-document-workspace-prompt-child-view-registry.js.map +1 -0
- package/dist/projected-document-workspace-prompt-child-view-renderers.d.ts +32 -0
- package/dist/projected-document-workspace-prompt-child-view-renderers.d.ts.map +1 -0
- package/dist/projected-document-workspace-prompt-child-view-renderers.js +77 -0
- package/dist/projected-document-workspace-prompt-child-view-renderers.js.map +1 -0
- package/dist/projected-document-workspace-shell.d.ts +100 -0
- package/dist/projected-document-workspace-shell.d.ts.map +1 -0
- package/dist/projected-document-workspace-shell.js +153 -0
- package/dist/projected-document-workspace-shell.js.map +1 -0
- package/dist/projected-document-workspace.d.ts +39 -0
- package/dist/projected-document-workspace.d.ts.map +1 -0
- package/dist/projected-document-workspace.js +63 -0
- package/dist/projected-document-workspace.js.map +1 -0
- package/dist/projected-field-value-rendering.d.ts +94 -0
- package/dist/projected-field-value-rendering.d.ts.map +1 -0
- package/dist/projected-field-value-rendering.js +377 -0
- package/dist/projected-field-value-rendering.js.map +1 -0
- package/dist/projected-inline-list.d.ts +20 -0
- package/dist/projected-inline-list.d.ts.map +1 -0
- package/dist/projected-inline-list.js +149 -0
- package/dist/projected-inline-list.js.map +1 -0
- package/dist/projected-input-form.d.ts +143 -0
- package/dist/projected-input-form.d.ts.map +1 -0
- package/dist/projected-input-form.js +612 -0
- package/dist/projected-input-form.js.map +1 -0
- package/dist/projected-metric-dashboard.d.ts +26 -0
- package/dist/projected-metric-dashboard.d.ts.map +1 -0
- package/dist/projected-metric-dashboard.js +20 -0
- package/dist/projected-metric-dashboard.js.map +1 -0
- package/dist/projected-metric-strip.d.ts +20 -0
- package/dist/projected-metric-strip.d.ts.map +1 -0
- package/dist/projected-metric-strip.js +131 -0
- package/dist/projected-metric-strip.js.map +1 -0
- package/dist/projected-navigation-shell-view-host.d.ts +34 -0
- package/dist/projected-navigation-shell-view-host.d.ts.map +1 -0
- package/dist/projected-navigation-shell-view-host.js +75 -0
- package/dist/projected-navigation-shell-view-host.js.map +1 -0
- package/dist/projected-navigation-shell.d.ts +33 -0
- package/dist/projected-navigation-shell.d.ts.map +1 -0
- package/dist/projected-navigation-shell.js +112 -0
- package/dist/projected-navigation-shell.js.map +1 -0
- package/dist/projected-presentation-badges.d.ts +34 -0
- package/dist/projected-presentation-badges.d.ts.map +1 -0
- package/dist/projected-presentation-badges.js +22 -0
- package/dist/projected-presentation-badges.js.map +1 -0
- package/dist/projected-presentation-diagnostics.d.ts +10 -0
- package/dist/projected-presentation-diagnostics.d.ts.map +1 -0
- package/dist/projected-presentation-diagnostics.js +40 -0
- package/dist/projected-presentation-diagnostics.js.map +1 -0
- package/dist/projected-presentation-flow-layer.d.ts +33 -0
- package/dist/projected-presentation-flow-layer.d.ts.map +1 -0
- package/dist/projected-presentation-flow-layer.js +71 -0
- package/dist/projected-presentation-flow-layer.js.map +1 -0
- package/dist/projected-process-task-notices.d.ts +37 -0
- package/dist/projected-process-task-notices.d.ts.map +1 -0
- package/dist/projected-process-task-notices.js +225 -0
- package/dist/projected-process-task-notices.js.map +1 -0
- package/dist/projected-prompt-child-view-renderer.d.ts +101 -0
- package/dist/projected-prompt-child-view-renderer.d.ts.map +1 -0
- package/dist/projected-prompt-child-view-renderer.js +442 -0
- package/dist/projected-prompt-child-view-renderer.js.map +1 -0
- package/dist/projected-prompt-document-preview.d.ts +39 -0
- package/dist/projected-prompt-document-preview.d.ts.map +1 -0
- package/dist/projected-prompt-document-preview.js +50 -0
- package/dist/projected-prompt-document-preview.js.map +1 -0
- package/dist/projected-prompt-view.d.ts +35 -0
- package/dist/projected-prompt-view.d.ts.map +1 -0
- package/dist/projected-prompt-view.js +292 -0
- package/dist/projected-prompt-view.js.map +1 -0
- package/dist/projected-query-form.d.ts +56 -0
- package/dist/projected-query-form.d.ts.map +1 -0
- package/dist/projected-query-form.js +100 -0
- package/dist/projected-query-form.js.map +1 -0
- package/dist/projected-record-details.d.ts +20 -0
- package/dist/projected-record-details.d.ts.map +1 -0
- package/dist/projected-record-details.js +60 -0
- package/dist/projected-record-details.js.map +1 -0
- package/dist/projected-routed-surface-runtime.d.ts +86 -0
- package/dist/projected-routed-surface-runtime.d.ts.map +1 -0
- package/dist/projected-routed-surface-runtime.js +332 -0
- package/dist/projected-routed-surface-runtime.js.map +1 -0
- package/dist/projected-tabs-view.d.ts +21 -0
- package/dist/projected-tabs-view.d.ts.map +1 -0
- package/dist/projected-tabs-view.js +140 -0
- package/dist/projected-tabs-view.js.map +1 -0
- package/dist/projected-view-chrome.d.ts +15 -0
- package/dist/projected-view-chrome.d.ts.map +1 -0
- package/dist/projected-view-chrome.js +67 -0
- package/dist/projected-view-chrome.js.map +1 -0
- package/dist/projected-view-surface.d.ts +34 -0
- package/dist/projected-view-surface.d.ts.map +1 -0
- package/dist/projected-view-surface.js +40 -0
- package/dist/projected-view-surface.js.map +1 -0
- package/dist/standard-collection-chrome-slot-renderers.d.ts +26 -0
- package/dist/standard-collection-chrome-slot-renderers.d.ts.map +1 -0
- package/dist/standard-collection-chrome-slot-renderers.js +250 -0
- package/dist/standard-collection-chrome-slot-renderers.js.map +1 -0
- package/dist/standard-view-chrome-slot-renderers.d.ts +57 -0
- package/dist/standard-view-chrome-slot-renderers.d.ts.map +1 -0
- package/dist/standard-view-chrome-slot-renderers.js +614 -0
- package/dist/standard-view-chrome-slot-renderers.js.map +1 -0
- package/package.json +68 -0
- package/src/document-workspace-surface-slot-renderers.tsx +395 -0
- package/src/index.ts +53 -0
- package/src/navigation-shell-frame-renderer-registry.ts +29 -0
- package/src/navigation-shell-slot-renderer-registry.ts +46 -0
- package/src/page-host-unavailable-renderer.tsx +79 -0
- package/src/presentation-action-group.tsx +475 -0
- package/src/presentation-badge-target-interpreter.ts +54 -0
- package/src/presentation-component-groups.ts +2505 -0
- package/src/presentation-component-system-diagnostics.ts +848 -0
- package/src/presentation-component-system.ts +365 -0
- package/src/presentation-icon-diagnostics.ts +53 -0
- package/src/presentation-icon-registry.tsx +181 -0
- package/src/presentation-projection-trace-panel.tsx +140 -0
- package/src/presentation-routed-surface-host.tsx +48 -0
- package/src/presentation-shadcn-component-system.ts +102 -0
- package/src/presentation-standard-renderers.tsx +1290 -0
- package/src/presentation-surface-renderer.tsx +263 -0
- package/src/presentation-value-renderers.tsx +40 -0
- package/src/process-task-icons.tsx +258 -0
- package/src/projected-activity-state.tsx +63 -0
- package/src/projected-collection-action-runtime-diagnostics.ts +22 -0
- package/src/projected-collection-view.tsx +1273 -0
- package/src/projected-document-action-status-notices.tsx +66 -0
- package/src/projected-document-badges.tsx +134 -0
- package/src/projected-document-editor-surface.tsx +808 -0
- package/src/projected-document-workspace-notices.tsx +77 -0
- package/src/projected-document-workspace-prompt-child-view-registry.ts +99 -0
- package/src/projected-document-workspace-prompt-child-view-renderers.tsx +205 -0
- package/src/projected-document-workspace-shell.tsx +427 -0
- package/src/projected-document-workspace.tsx +216 -0
- package/src/projected-field-value-rendering.tsx +704 -0
- package/src/projected-inline-list.tsx +434 -0
- package/src/projected-input-form.tsx +1218 -0
- package/src/projected-metric-dashboard.tsx +106 -0
- package/src/projected-metric-strip.tsx +244 -0
- package/src/projected-navigation-shell-view-host.tsx +177 -0
- package/src/projected-navigation-shell.tsx +219 -0
- package/src/projected-presentation-badges.tsx +95 -0
- package/src/projected-presentation-diagnostics.tsx +120 -0
- package/src/projected-presentation-flow-layer.tsx +186 -0
- package/src/projected-process-task-notices.tsx +501 -0
- package/src/projected-prompt-child-view-renderer.tsx +698 -0
- package/src/projected-prompt-document-preview.tsx +197 -0
- package/src/projected-prompt-view.tsx +592 -0
- package/src/projected-query-form.tsx +286 -0
- package/src/projected-record-details.tsx +133 -0
- package/src/projected-routed-surface-runtime.tsx +713 -0
- package/src/projected-tabs-view.tsx +308 -0
- package/src/projected-view-chrome.tsx +148 -0
- package/src/projected-view-surface.tsx +131 -0
- package/src/standard-collection-chrome-slot-renderers.tsx +391 -0
- package/src/standard-view-chrome-slot-renderers.tsx +1064 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createPresentationViewActivityState, createPresentationTestAttributes, createRelationQueryInputFormTarget, defaultPresentationComponentSet, findPresentationQueryForm, findPresentationInputForm, findPresentationInputFormForView, findPresentationQueryFormForView, getRegionViewIds, isViewChromeSlotKind, readPresentationDataSourceItems, resolveCollectionChromeSlotRenderer, } from '@cohesivesystems/presentation-core';
|
|
3
|
+
import { renderStandardCollectionChromeSlot, } from './standard-collection-chrome-slot-renderers.js';
|
|
4
|
+
import { renderStandardViewChromeSlot, } from './standard-view-chrome-slot-renderers.js';
|
|
5
|
+
import { mergePresentationRendererRegistries, } from '@cohesivesystems/presentation-react';
|
|
6
|
+
import { ProjectedActivityStateBoundary, ProjectedStatusBlock, } from './projected-activity-state.js';
|
|
7
|
+
import { ProjectedCollectionView } from './projected-collection-view.js';
|
|
8
|
+
import { ProjectedMetricDashboard } from './projected-metric-dashboard.js';
|
|
9
|
+
import { ProjectedMetricStrip } from './projected-metric-strip.js';
|
|
10
|
+
import { ProjectedRecordDetails, } from './projected-record-details.js';
|
|
11
|
+
import { ProjectedInputForm, } from './projected-input-form.js';
|
|
12
|
+
import { ProjectedInlineList } from './projected-inline-list.js';
|
|
13
|
+
import { ProjectedQueryForm, } from './projected-query-form.js';
|
|
14
|
+
import { ProjectedTabsView } from './projected-tabs-view.js';
|
|
15
|
+
import { ProjectedViewSurface, } from './projected-view-surface.js';
|
|
16
|
+
import { PresentationActionGroup, } from './presentation-action-group.js';
|
|
17
|
+
import { fieldDisplayKinds, viewChromeSlotKinds, viewKindLabels, viewKinds, viewRegionKindLabels, viewRegionKinds, } from '@cohesivesystems/presentation-contracts';
|
|
18
|
+
import { presentationViewComponentRoles, } from '@cohesivesystems/presentation-contracts';
|
|
19
|
+
/**
|
|
20
|
+
* Creates the app-wide default renderer registry for common semantic view
|
|
21
|
+
* constructs: surface roots, dashboards, surfaces, tabbed surfaces, collections,
|
|
22
|
+
* and simple inline lists. Specific apps can layer overrides on top without
|
|
23
|
+
* reimplementing recursive rendering or activity/data-source handling.
|
|
24
|
+
*/
|
|
25
|
+
export function createStandardPresentationRendererRegistry(options) {
|
|
26
|
+
const collectionRenderer = createCollectionRenderer(options);
|
|
27
|
+
const inputFormRenderer = createInputFormRenderer(options);
|
|
28
|
+
const drawerRenderer = createDrawerRenderer();
|
|
29
|
+
const metricDashboardRenderer = createMetricDashboardRenderer(options);
|
|
30
|
+
const queryFormRenderer = createQueryFormRenderer(options);
|
|
31
|
+
const recordDetailRenderer = createRecordDetailRenderer(options);
|
|
32
|
+
const surfaceRenderer = createSurfaceRenderer(options);
|
|
33
|
+
const tabsRenderer = createTabsRenderer(options);
|
|
34
|
+
const registry = {
|
|
35
|
+
composites: {
|
|
36
|
+
byComponentRole: {
|
|
37
|
+
[presentationViewComponentRoles.collectionView]: collectionRenderer,
|
|
38
|
+
[presentationViewComponentRoles.inputForm]: inputFormRenderer,
|
|
39
|
+
[presentationViewComponentRoles.metricDashboard]: metricDashboardRenderer,
|
|
40
|
+
[presentationViewComponentRoles.queryForm]: queryFormRenderer,
|
|
41
|
+
[presentationViewComponentRoles.tabsView]: tabsRenderer,
|
|
42
|
+
[presentationViewComponentRoles.viewSurface]: surfaceRenderer,
|
|
43
|
+
},
|
|
44
|
+
bySemanticRole: {
|
|
45
|
+
collection: collectionRenderer,
|
|
46
|
+
dashboard: metricDashboardRenderer,
|
|
47
|
+
detail: recordDetailRenderer,
|
|
48
|
+
drawer: drawerRenderer,
|
|
49
|
+
form: surfaceRenderer,
|
|
50
|
+
'inline-list': createInlineListRenderer(options),
|
|
51
|
+
'input-form': inputFormRenderer,
|
|
52
|
+
prompt: surfaceRenderer,
|
|
53
|
+
query: queryFormRenderer,
|
|
54
|
+
recordDetail: recordDetailRenderer,
|
|
55
|
+
search: queryFormRenderer,
|
|
56
|
+
summary: metricDashboardRenderer,
|
|
57
|
+
surface: surfaceRenderer,
|
|
58
|
+
'surface-root': renderSurfaceRoot,
|
|
59
|
+
tabs: tabsRenderer,
|
|
60
|
+
'record-detail': recordDetailRenderer,
|
|
61
|
+
},
|
|
62
|
+
byViewKind: createStandardViewKindRenderers({
|
|
63
|
+
collectionRenderer,
|
|
64
|
+
drawerRenderer,
|
|
65
|
+
metricDashboardRenderer,
|
|
66
|
+
queryFormRenderer,
|
|
67
|
+
recordDetailRenderer,
|
|
68
|
+
surfaceRenderer,
|
|
69
|
+
tabsRenderer,
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
return options.overrides
|
|
74
|
+
? mergePresentationRendererRegistries(registry, options.overrides)
|
|
75
|
+
: registry;
|
|
76
|
+
}
|
|
77
|
+
function createStandardViewKindRenderers({ collectionRenderer, drawerRenderer, metricDashboardRenderer, queryFormRenderer, recordDetailRenderer, surfaceRenderer, tabsRenderer, }) {
|
|
78
|
+
const renderers = {};
|
|
79
|
+
addViewKindRenderer(renderers, viewKinds.collection, collectionRenderer);
|
|
80
|
+
addViewKindRenderer(renderers, viewKinds.dashboard, metricDashboardRenderer);
|
|
81
|
+
addViewKindRenderer(renderers, viewKinds.drawer, drawerRenderer);
|
|
82
|
+
addViewKindRenderer(renderers, viewKinds.form, surfaceRenderer);
|
|
83
|
+
addViewKindRenderer(renderers, viewKinds.graph, surfaceRenderer);
|
|
84
|
+
addViewKindRenderer(renderers, viewKinds.page, renderSurfaceRoot);
|
|
85
|
+
addViewKindRenderer(renderers, viewKinds.prompt, surfaceRenderer);
|
|
86
|
+
addViewKindRenderer(renderers, viewKinds.recordDetail, recordDetailRenderer);
|
|
87
|
+
addViewKindRenderer(renderers, viewKinds.search, queryFormRenderer);
|
|
88
|
+
addViewKindRenderer(renderers, viewKinds.surface, surfaceRenderer);
|
|
89
|
+
addViewKindRenderer(renderers, viewKinds.tabbedSurface, tabsRenderer);
|
|
90
|
+
addViewKindRenderer(renderers, viewKinds.timeline, surfaceRenderer);
|
|
91
|
+
return renderers;
|
|
92
|
+
}
|
|
93
|
+
function createDrawerRenderer() {
|
|
94
|
+
return function renderDrawer(context) {
|
|
95
|
+
return _jsx("div", { className: "grid gap-2", children: context.renderRegions(context.view) });
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function addViewKindRenderer(renderers, kind, renderer) {
|
|
99
|
+
const label = viewKindLabels[kind];
|
|
100
|
+
renderers[String(kind)] = renderer;
|
|
101
|
+
renderers[label] = renderer;
|
|
102
|
+
renderers[label.charAt(0).toLowerCase() + label.slice(1)] = renderer;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Root surfaces are structural containers. Their renderer should project child
|
|
106
|
+
* regions and avoid adding visual chrome of its own.
|
|
107
|
+
*/
|
|
108
|
+
function renderSurfaceRoot({ renderView, view, }) {
|
|
109
|
+
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col gap-5", ...createPresentationTestAttributes({ viewId: view.Id }), children: renderSurfaceRegionViews({
|
|
110
|
+
regions: orderSurfaceRegions(view.Regions),
|
|
111
|
+
renderView,
|
|
112
|
+
stretchPrimaryRegions: true,
|
|
113
|
+
}) }));
|
|
114
|
+
}
|
|
115
|
+
function createMetricDashboardRenderer(options) {
|
|
116
|
+
return function renderMetricDashboard(context) {
|
|
117
|
+
const { dataSourceResolver, view } = context;
|
|
118
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
119
|
+
return (_jsx(ProjectedActivityStateBoundary, { state: createPresentationViewActivityState({
|
|
120
|
+
dataSourceResolver,
|
|
121
|
+
pendingLabel: resolveStringOption(options.metricDashboard?.pendingLabel, context) ??
|
|
122
|
+
'Loading view data...',
|
|
123
|
+
view,
|
|
124
|
+
}), children: _jsx(ProjectedMetricDashboard, { action: renderPresentationViewActionFallback({ context, options, view }), className: resolveStringOption(options.metricDashboard?.className, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), dataSourceResolver: dataSourceResolver, description: resolveStringOption(options.metricDashboard?.description, context), iconByFieldId: resolveValueOption(options.metricDashboard?.iconByFieldId, context), renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
125
|
+
context,
|
|
126
|
+
options,
|
|
127
|
+
resource: dataSource?.data,
|
|
128
|
+
}), view: view, viewId: view.Id }) }));
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function createInputFormRenderer(options) {
|
|
132
|
+
return function renderInputForm(context) {
|
|
133
|
+
const { dataSourceResolver, module, view } = context;
|
|
134
|
+
const inputForm = findPresentationInputFormForView(module, view);
|
|
135
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
136
|
+
return (_jsx(ProjectedInputForm, { choiceToggleClassName: resolveValueOption(options.inputForm?.choiceToggleClassName, context), choiceTone: resolveValueOption(options.inputForm?.choiceTone, context), className: resolveStringOption(options.inputForm?.className, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: resolveStringOption(options.inputForm?.contentClassName, context), dataSourceResolver: dataSourceResolver, designSystem: resolveRequiredValueOption(options.designSystem, context), fieldRenderers: resolveValueOption(options.inputForm?.fieldRenderers, context), inputForm: inputForm, module: module, renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
137
|
+
context,
|
|
138
|
+
options,
|
|
139
|
+
resource: dataSource?.data,
|
|
140
|
+
}), runtime: options.inputForm?.runtime(context) ?? null, view: view }));
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function createQueryFormRenderer(options) {
|
|
144
|
+
return function renderQueryForm(context) {
|
|
145
|
+
const { dataSourceResolver, module, view } = context;
|
|
146
|
+
const queryForm = findPresentationQueryFormForView(module, view);
|
|
147
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
148
|
+
if (queryForm && options.queryForm) {
|
|
149
|
+
return (_jsx(ProjectedQueryForm, { choiceToggleClassName: resolveValueOption(options.queryForm.choiceToggleClassName, context), choiceTone: resolveValueOption(options.queryForm.choiceTone, context), className: resolveStringOption(options.queryForm.className, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: resolveStringOption(options.queryForm.contentClassName, context), dataSourceResolver: dataSourceResolver, designSystem: resolveRequiredValueOption(options.designSystem, context), fieldRenderers: resolveValueOption(options.queryForm.fieldRenderers, context), module: module, queryForm: queryForm, renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
150
|
+
context,
|
|
151
|
+
options,
|
|
152
|
+
resource: dataSource?.data,
|
|
153
|
+
}), runtime: options.queryForm.runtime(context), view: view }));
|
|
154
|
+
}
|
|
155
|
+
if (options.inputForm) {
|
|
156
|
+
const inputForm = queryForm
|
|
157
|
+
? findPresentationInputForm(module, queryForm.FormId)
|
|
158
|
+
: findPresentationInputFormForView(module, view);
|
|
159
|
+
const target = queryForm && inputForm
|
|
160
|
+
? createRelationQueryInputFormTarget({
|
|
161
|
+
dataSourceResolver,
|
|
162
|
+
inputForm,
|
|
163
|
+
queryForm,
|
|
164
|
+
view,
|
|
165
|
+
})
|
|
166
|
+
: null;
|
|
167
|
+
return (_jsx(ProjectedInputForm, { choiceToggleClassName: resolveValueOption(options.inputForm.choiceToggleClassName, context), choiceTone: resolveValueOption(options.inputForm.choiceTone, context), className: resolveStringOption(options.inputForm.className, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: resolveStringOption(options.inputForm.contentClassName, context), dataSourceResolver: dataSourceResolver, designSystem: resolveRequiredValueOption(options.designSystem, context), fieldRenderers: resolveValueOption(options.inputForm.fieldRenderers, context), inputForm: inputForm, module: module, renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
168
|
+
context,
|
|
169
|
+
options,
|
|
170
|
+
resource: dataSource?.data,
|
|
171
|
+
}), runtime: options.inputForm.runtime(context), target: target, view: view }));
|
|
172
|
+
}
|
|
173
|
+
return (_jsx(ProjectedQueryForm, { choiceToggleClassName: resolveValueOption(options.queryForm?.choiceToggleClassName, context), choiceTone: resolveValueOption(options.queryForm?.choiceTone, context), className: resolveStringOption(options.queryForm?.className, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: resolveStringOption(options.queryForm?.contentClassName, context), dataSourceResolver: dataSourceResolver, designSystem: resolveRequiredValueOption(options.designSystem, context), fieldRenderers: resolveValueOption(options.queryForm?.fieldRenderers, context), module: module, queryForm: queryForm, renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
174
|
+
context,
|
|
175
|
+
options,
|
|
176
|
+
resource: dataSource?.data,
|
|
177
|
+
}), runtime: options.queryForm?.runtime(context) ?? null, view: view }));
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function createSurfaceRenderer(options) {
|
|
181
|
+
return function renderSurface(context) {
|
|
182
|
+
const { dataSourceResolver, renderView, view } = context;
|
|
183
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
184
|
+
const verticalResize = resolveValueOption(options.surface?.verticalResize, context);
|
|
185
|
+
const isVerticallyResizable = isSurfaceVerticalResizeEnabled(verticalResize);
|
|
186
|
+
const contentClassName = resolveSurfaceContentClassName({
|
|
187
|
+
className: resolveStringOption(options.surface?.contentClassName, context),
|
|
188
|
+
isVerticallyResizable,
|
|
189
|
+
view,
|
|
190
|
+
});
|
|
191
|
+
return (_jsx(ProjectedViewSurface, { action: renderPresentationViewActionFallback({ context, options, view }), className: resolveStringOption(options.surface?.className, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: contentClassName, contentTopInset: resolveValueOption(options.surface?.contentTopInset, context), eyebrow: resolveStringOption(options.surface?.eyebrow, context), renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
192
|
+
context,
|
|
193
|
+
options,
|
|
194
|
+
resource: dataSource?.data,
|
|
195
|
+
}), title: resolveStringOption(options.surface?.title, context), verticalResize: verticalResize, view: view, children: renderSurfaceRegionViews({
|
|
196
|
+
regions: orderSurfaceRegions(view.Regions),
|
|
197
|
+
renderView,
|
|
198
|
+
stretchPrimaryRegions: isVerticallyResizable,
|
|
199
|
+
}) }));
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function createTabsRenderer(options) {
|
|
203
|
+
return function renderTabs(context) {
|
|
204
|
+
const { dataSourceResolver, renderView, view } = context;
|
|
205
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
206
|
+
const componentSystem = resolveRequiredValueOption(options.componentSystem, context);
|
|
207
|
+
return (_jsx(ProjectedTabsView, { componentSystem: componentSystem, iconByRegionId: resolveValueOption(options.tabs?.iconByRegionId, context), renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
208
|
+
context,
|
|
209
|
+
options,
|
|
210
|
+
resource: dataSource?.data,
|
|
211
|
+
}), renderView: renderView, view: view, viewId: view.Id }));
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function createCollectionRenderer(options) {
|
|
215
|
+
return function renderCollection(context) {
|
|
216
|
+
const { dataSourceResolver, view } = context;
|
|
217
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
218
|
+
const items = readPresentationDataSourceItems(dataSource);
|
|
219
|
+
const chromeSlotRenderers = resolveValueOption(options.collection?.chromeSlotRenderers, context);
|
|
220
|
+
const componentSystem = resolveRequiredValueOption(options.componentSystem, context);
|
|
221
|
+
const collectionContext = {
|
|
222
|
+
...context,
|
|
223
|
+
dataSource,
|
|
224
|
+
items,
|
|
225
|
+
};
|
|
226
|
+
return (_jsx(ProjectedActivityStateBoundary, { state: createPresentationViewActivityState({ dataSourceResolver, view }), children: _jsx(ProjectedCollectionView, { actionRuntimeBindings: resolveValueOption(options.collection?.actionRuntimeBindings, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: componentSystem, data: items, detailFieldRenderers: resolveValueOption(options.collection?.detailFieldRenderers, context), emptyMessage: resolveStringOption(options.collection?.emptyMessage, context) ??
|
|
227
|
+
dataSource?.emptyMessage ??
|
|
228
|
+
`No ${view.Name.toLocaleLowerCase()} records are visible.`, fieldRenderers: resolveValueOption(options.collection?.fieldRenderers, context), footer: options.collection?.renderFooter
|
|
229
|
+
? (collectionRuntime) => options.collection?.renderFooter?.({
|
|
230
|
+
...collectionContext,
|
|
231
|
+
collectionRuntime: collectionRuntime,
|
|
232
|
+
})
|
|
233
|
+
: null, pagination: options.collection?.pagination?.(collectionContext), renderChromeSlot: ({ collectionRuntime, slot, ...slotContext }) => renderPresentationCollectionChromeSlot({
|
|
234
|
+
context: {
|
|
235
|
+
...collectionContext,
|
|
236
|
+
...slotContext,
|
|
237
|
+
collectionRuntime: collectionRuntime,
|
|
238
|
+
module: collectionContext.module,
|
|
239
|
+
renderQueryFormSlot: (slot) => renderPresentationCollectionQueryFormSlot({
|
|
240
|
+
context: collectionContext,
|
|
241
|
+
options,
|
|
242
|
+
slot,
|
|
243
|
+
}),
|
|
244
|
+
renderSummarySlot: (slot) => renderPresentationCollectionSummarySlot({
|
|
245
|
+
context: collectionContext,
|
|
246
|
+
options,
|
|
247
|
+
slot,
|
|
248
|
+
}),
|
|
249
|
+
slot,
|
|
250
|
+
},
|
|
251
|
+
registry: chromeSlotRenderers,
|
|
252
|
+
renderFallback: options.collection?.renderChromeSlot,
|
|
253
|
+
}), viewId: view.Id }) }));
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function renderPresentationCollectionChromeSlot({ context, registry, renderFallback, }) {
|
|
257
|
+
const renderer = resolveCollectionChromeSlotRenderer(registry, context.slot);
|
|
258
|
+
return renderer?.(context) ??
|
|
259
|
+
renderStandardCollectionChromeSlot(context) ??
|
|
260
|
+
renderFallback?.(context) ??
|
|
261
|
+
null;
|
|
262
|
+
}
|
|
263
|
+
function renderPresentationCollectionQueryFormSlot({ context, options, slot, }) {
|
|
264
|
+
const { dataSourceResolver, module, view } = context;
|
|
265
|
+
const queryForm = slot.QueryFormId
|
|
266
|
+
? findPresentationQueryForm(module, slot.QueryFormId)
|
|
267
|
+
: findPresentationQueryFormForView(module, view);
|
|
268
|
+
return (_jsx(ProjectedQueryForm, { choiceToggleClassName: resolveValueOption(options.queryForm?.choiceToggleClassName, context), choiceTone: resolveValueOption(options.queryForm?.choiceTone, context), className: resolveStringOption(options.queryForm?.className, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), contentClassName: resolveStringOption(options.queryForm?.contentClassName, context), dataSourceResolver: dataSourceResolver, designSystem: resolveRequiredValueOption(options.designSystem, context), fieldRenderers: resolveValueOption(options.queryForm?.fieldRenderers, context), module: module, queryForm: queryForm, runtime: options.queryForm?.runtime(context) ?? null, view: view }));
|
|
269
|
+
}
|
|
270
|
+
function resolveSurfaceContentClassName({ className, isVerticallyResizable, view, }) {
|
|
271
|
+
if (hasSidecarSurfaceRegions(view.Regions)) {
|
|
272
|
+
return cn('grid min-h-0 flex-1 gap-y-4 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-start lg:gap-x-0 lg:has-[>[data-surface-region-kind=sidecar]:not(:empty)]:gap-x-4', className);
|
|
273
|
+
}
|
|
274
|
+
if (isVerticallyResizable) {
|
|
275
|
+
return cn('flex min-h-0 flex-1 flex-col gap-4 overflow-hidden', className);
|
|
276
|
+
}
|
|
277
|
+
return className ?? (view.Regions.length > 0 ? 'grid w-full min-w-0 gap-4' : undefined);
|
|
278
|
+
}
|
|
279
|
+
function orderSurfaceRegions(regions) {
|
|
280
|
+
if (!hasSidecarSurfaceRegions(regions)) {
|
|
281
|
+
return regions;
|
|
282
|
+
}
|
|
283
|
+
return [
|
|
284
|
+
...regions.filter((region) => isPrimarySurfaceRegionKind(region.Kind)),
|
|
285
|
+
...regions.filter((region) => isSidecarSurfaceRegionKind(region.Kind)),
|
|
286
|
+
...regions.filter((region) => !isPrimarySurfaceRegionKind(region.Kind) &&
|
|
287
|
+
!isSidecarSurfaceRegionKind(region.Kind)),
|
|
288
|
+
];
|
|
289
|
+
}
|
|
290
|
+
function renderSurfaceRegionViews({ regions, renderView, stretchPrimaryRegions, }) {
|
|
291
|
+
return regions.flatMap((region) => getRegionViewIds(region).map((childViewId) => (_jsx("div", { className: resolveSurfaceRegionClassName(region, { stretchPrimaryRegions }), "data-surface-region-kind": resolveSurfaceRegionLayoutKind(region), children: renderView(childViewId) }, `${region.Id}:${childViewId}`))));
|
|
292
|
+
}
|
|
293
|
+
function hasSidecarSurfaceRegions(regions) {
|
|
294
|
+
if (regions.length < 2) {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
return regions.some((region) => isPrimarySurfaceRegionKind(region.Kind)) &&
|
|
298
|
+
regions.some((region) => isSidecarSurfaceRegionKind(region.Kind));
|
|
299
|
+
}
|
|
300
|
+
function resolveSurfaceRegionClassName(region, options = {}) {
|
|
301
|
+
const layoutKind = resolveSurfaceRegionLayoutKind(region);
|
|
302
|
+
if (layoutKind === 'sidecar') {
|
|
303
|
+
return 'min-h-0 min-w-0 empty:hidden lg:w-[clamp(18rem,25vw,24rem)]';
|
|
304
|
+
}
|
|
305
|
+
if (layoutKind === 'primary' && options.stretchPrimaryRegions) {
|
|
306
|
+
return 'flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden';
|
|
307
|
+
}
|
|
308
|
+
return 'min-h-0 w-full min-w-0';
|
|
309
|
+
}
|
|
310
|
+
function resolveSurfaceRegionLayoutKind(region) {
|
|
311
|
+
if (isSidecarSurfaceRegionKind(region.Kind)) {
|
|
312
|
+
return 'sidecar';
|
|
313
|
+
}
|
|
314
|
+
if (isPrimarySurfaceRegionKind(region.Kind)) {
|
|
315
|
+
return 'primary';
|
|
316
|
+
}
|
|
317
|
+
return 'supporting';
|
|
318
|
+
}
|
|
319
|
+
function isPrimarySurfaceRegionKind(kind) {
|
|
320
|
+
return matchesViewRegionKind(kind, viewRegionKinds.primary) ||
|
|
321
|
+
matchesViewRegionKind(kind, viewRegionKinds.content) ||
|
|
322
|
+
matchesViewRegionKind(kind, viewRegionKinds.surface) ||
|
|
323
|
+
matchesViewRegionKind(kind, viewRegionKinds.collection) ||
|
|
324
|
+
matchesViewRegionKind(kind, viewRegionKinds.detail);
|
|
325
|
+
}
|
|
326
|
+
function isSidecarSurfaceRegionKind(kind) {
|
|
327
|
+
return matchesViewRegionKind(kind, viewRegionKinds.sidebar) ||
|
|
328
|
+
matchesViewRegionKind(kind, viewRegionKinds.statusList) ||
|
|
329
|
+
matchesViewRegionKind(kind, viewRegionKinds.list) ||
|
|
330
|
+
matchesViewRegionKind(kind, viewRegionKinds.inspector) ||
|
|
331
|
+
matchesViewRegionKind(kind, viewRegionKinds.panel);
|
|
332
|
+
}
|
|
333
|
+
function matchesViewRegionKind(kind, expected) {
|
|
334
|
+
const expectedLabel = viewRegionKindLabels[expected] ?? expected;
|
|
335
|
+
return kind === expected ||
|
|
336
|
+
normalizeEnumDiscriminator(kind) === normalizeEnumDiscriminator(expectedLabel);
|
|
337
|
+
}
|
|
338
|
+
function renderPresentationCollectionSummarySlot({ context, options, slot, }) {
|
|
339
|
+
const fieldIds = resolveCollectionSummaryFieldIds(context.module, slot);
|
|
340
|
+
if (fieldIds.length === 0) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
return (_jsx(ProjectedMetricStrip, { className: resolveStringOption(options.collection?.summaryClassName, context), componentSystem: resolveRequiredValueOption(options.componentSystem, context), dataSourceResolver: context.dataSourceResolver, fieldIds: fieldIds, iconByFieldId: resolveValueOption(options.metricDashboard?.iconByFieldId, context) }));
|
|
344
|
+
}
|
|
345
|
+
function resolveCollectionSummaryFieldIds(module, slot) {
|
|
346
|
+
if (slot.FieldIds.length > 0) {
|
|
347
|
+
return slot.FieldIds;
|
|
348
|
+
}
|
|
349
|
+
const slotDataSourceIds = new Set(slot.DataSourceIds);
|
|
350
|
+
return module.Fields
|
|
351
|
+
.filter((field) => field.Source?.DataSourceId &&
|
|
352
|
+
slotDataSourceIds.has(field.Source.DataSourceId) &&
|
|
353
|
+
isMetricField(field.DisplayKind))
|
|
354
|
+
.map((field) => field.Id);
|
|
355
|
+
}
|
|
356
|
+
function isMetricField(displayKind) {
|
|
357
|
+
return displayKind === fieldDisplayKinds.metric ||
|
|
358
|
+
String(displayKind).toLocaleLowerCase() === 'metric';
|
|
359
|
+
}
|
|
360
|
+
function createPresentationViewChromeSlotRenderer({ context, options, resource, }) {
|
|
361
|
+
return (slot, view) => renderStandardViewChromeSlot({
|
|
362
|
+
actionContext: context.context,
|
|
363
|
+
actionGroupOptions: options.actionGroup,
|
|
364
|
+
componentSystem: resolveRequiredValueOption(options.componentSystem, context),
|
|
365
|
+
dataSourceResolver: context.dataSourceResolver,
|
|
366
|
+
designSystem: resolveRequiredValueOption(options.designSystem, context),
|
|
367
|
+
documentViewIds: slot.ViewIds,
|
|
368
|
+
module: context.module,
|
|
369
|
+
resource,
|
|
370
|
+
slot,
|
|
371
|
+
view: view ?? context.view,
|
|
372
|
+
workspaceView: view ?? context.view,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function renderPresentationViewActionFallback({ context, options, view, }) {
|
|
376
|
+
if (!options.actionGroup || hasViewActionsChromeSlot(view)) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return (_jsx(PresentationActionGroup, { context: context.context, dataSourceResolver: context.dataSourceResolver, module: context.module, options: options.actionGroup, view: view }));
|
|
380
|
+
}
|
|
381
|
+
function hasViewActionsChromeSlot(view) {
|
|
382
|
+
return view.Chrome?.Slots.some((slot) => isViewChromeSlotKind(slot, viewChromeSlotKinds.actions)) ?? false;
|
|
383
|
+
}
|
|
384
|
+
function createRecordDetailRenderer(options) {
|
|
385
|
+
return function renderRecordDetail(context) {
|
|
386
|
+
const { dataSourceResolver, view } = context;
|
|
387
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
388
|
+
const data = dataSource?.data;
|
|
389
|
+
const componentSystem = resolveRequiredValueOption(options.componentSystem, context);
|
|
390
|
+
return (_jsx(ProjectedActivityStateBoundary, { state: createPresentationViewActivityState({ dataSourceResolver, view }), children: _jsx(ProjectedViewSurface, { action: renderPresentationViewActionFallback({ context, options, view }), className: resolveStringOption(options.recordDetail?.className, context), componentSystem: componentSystem, contentClassName: resolveStringOption(options.recordDetail?.contentClassName, context) ??
|
|
391
|
+
'grid gap-4', renderChromeSlot: createPresentationViewChromeSlotRenderer({
|
|
392
|
+
context,
|
|
393
|
+
options,
|
|
394
|
+
resource: data,
|
|
395
|
+
}), title: resolveStringOption(options.recordDetail?.title, context) ?? view.Name, view: view, children: data && typeof data === 'object' ? (_jsx(ProjectedRecordDetails, { componentSystem: componentSystem, data: data, emptyMessage: resolveStringOption(options.recordDetail?.emptyMessage, context) ??
|
|
396
|
+
dataSource?.emptyMessage, fieldRenderers: resolveValueOption(options.recordDetail?.fieldRenderers, context), hiddenFieldLabels: resolveValueOption(options.recordDetail?.hiddenFieldLabels, context), viewId: view.Id })) : (_jsx(ProjectedStatusBlock, { label: resolveStringOption(options.recordDetail?.emptyMessage, context) ??
|
|
397
|
+
dataSource?.emptyMessage ??
|
|
398
|
+
'No details are available.' })) }) }));
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function createInlineListRenderer(options) {
|
|
402
|
+
return function renderInlineList(context) {
|
|
403
|
+
const { dataSourceResolver, view } = context;
|
|
404
|
+
const dataSource = dataSourceResolver.resolveViewPrimary(view);
|
|
405
|
+
const items = readPresentationDataSourceItems(dataSource);
|
|
406
|
+
const componentSystem = resolveRequiredValueOption(options.componentSystem, context);
|
|
407
|
+
return (_jsx(ProjectedActivityStateBoundary, { state: createPresentationViewActivityState({ dataSourceResolver, view }), children: items.length === 0 && options.inlineList?.renderItems ? (resolveStringOption(options.inlineList?.emptyMessage, context) ??
|
|
408
|
+
dataSource?.emptyMessage ??
|
|
409
|
+
null) : (options.inlineList?.renderItems?.({ ...context, dataSource, items }) ?? (_jsx(ProjectedInlineList, { actionRuntimeBindings: resolveValueOption(options.collection?.actionRuntimeBindings, context), componentSet: resolveStandardPresentationComponentSet(options, context), componentSystem: componentSystem, data: items, emptyMessage: resolveStringOption(options.inlineList?.emptyMessage, context) ??
|
|
410
|
+
dataSource?.emptyMessage, fieldRenderers: resolveValueOption(options.collection?.fieldRenderers, context), title: view.Name, viewId: view.Id }))) }));
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function resolveStandardPresentationComponentSet(options, context) {
|
|
414
|
+
return resolveStringOption(options.componentSet, context) ??
|
|
415
|
+
defaultPresentationComponentSet;
|
|
416
|
+
}
|
|
417
|
+
function resolveStringOption(option, context) {
|
|
418
|
+
return resolveValueOption(option, context);
|
|
419
|
+
}
|
|
420
|
+
function resolveRequiredValueOption(option, context) {
|
|
421
|
+
return typeof option === 'function'
|
|
422
|
+
? option(context)
|
|
423
|
+
: option;
|
|
424
|
+
}
|
|
425
|
+
function resolveValueOption(option, context) {
|
|
426
|
+
return typeof option === 'function'
|
|
427
|
+
? option(context)
|
|
428
|
+
: option;
|
|
429
|
+
}
|
|
430
|
+
function normalizeEnumDiscriminator(value) {
|
|
431
|
+
return String(value).replace(/[-_\s]/g, '').toLocaleLowerCase();
|
|
432
|
+
}
|
|
433
|
+
function isSurfaceVerticalResizeEnabled(value) {
|
|
434
|
+
return value === true ||
|
|
435
|
+
(typeof value === 'object' && value !== null && value.enabled !== false);
|
|
436
|
+
}
|
|
437
|
+
function cn(...values) {
|
|
438
|
+
return values.filter(Boolean).join(' ');
|
|
439
|
+
}
|
|
440
|
+
//# sourceMappingURL=presentation-standard-renderers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-standard-renderers.js","sourceRoot":"","sources":["../src/presentation-standard-renderers.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,kCAAkC,EAClC,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,oBAAoB,EACpB,+BAA+B,EAC/B,mCAAmC,GAWpC,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,kCAAkC,GACnC,MAAM,6CAA6C,CAAA;AAIpD,OAAO,EACL,4BAA4B,GAC7B,MAAM,uCAAuC,CAAA;AAS9C,OAAO,EACL,mCAAmC,GAIp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EAAE,CAAC,GAAG,MAAsD;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type PresentationModuleDefinition, type PresentationDataSourceStateMap, type PresentationSurface, type ViewDefinition } from '@cohesivesystems/presentation-core';
|
|
3
|
+
import { type PresentationRendererRegistry, type PresentationViewRendererResolution } from '@cohesivesystems/presentation-react';
|
|
4
|
+
export interface PresentationSurfaceRendererProps<TContext> {
|
|
5
|
+
readonly componentSet?: string;
|
|
6
|
+
readonly context: TContext;
|
|
7
|
+
readonly dataSources: PresentationDataSourceStateMap;
|
|
8
|
+
readonly rendererRegistry: PresentationRendererRegistry<TContext>;
|
|
9
|
+
readonly renderUnknownView?: PresentationUnknownViewRenderer<TContext>;
|
|
10
|
+
readonly surface: PresentationSurface | null;
|
|
11
|
+
}
|
|
12
|
+
export interface PresentationUnknownViewRenderContext<TContext> {
|
|
13
|
+
readonly context: TContext;
|
|
14
|
+
readonly module: PresentationModuleDefinition | null;
|
|
15
|
+
readonly reason: 'missing-module' | 'missing-renderer' | 'missing-root-view' | 'missing-surface' | 'missing-view';
|
|
16
|
+
readonly resolution?: PresentationViewRendererResolution<TContext>;
|
|
17
|
+
readonly surface: PresentationSurface | null;
|
|
18
|
+
readonly view: ViewDefinition | null;
|
|
19
|
+
readonly viewId: string | null;
|
|
20
|
+
}
|
|
21
|
+
export type PresentationUnknownViewRenderer<TContext> = (context: PresentationUnknownViewRenderContext<TContext>) => ReactNode;
|
|
22
|
+
export declare function PresentationSurfaceRenderer<TContext>({ componentSet, context, dataSources, rendererRegistry, renderUnknownView, surface, }: PresentationSurfaceRendererProps<TContext>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
23
|
+
//# sourceMappingURL=presentation-surface-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-surface-renderer.d.ts","sourceRoot":"","sources":["../src/presentation-surface-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,EAKL,KAAK,4BAA4B,EAEjC,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAGL,KAAK,4BAA4B,EAEjC,KAAK,kCAAkC,EACxC,MAAM,qCAAqC,CAAA;AAG5C,MAAM,WAAW,gCAAgC,CAAC,QAAQ;IACxD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,8BAA8B,CAAA;IACpD,QAAQ,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,QAAQ,CAAC,CAAA;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,+BAA+B,CAAC,QAAQ,CAAC,CAAA;IACtE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;CAC7C;AAED,MAAM,WAAW,oCAAoC,CAAC,QAAQ;IAC5D,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,4BAA4B,GAAG,IAAI,CAAA;IACpD,QAAQ,CAAC,MAAM,EACX,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,cAAc,CAAA;IAClB,QAAQ,CAAC,UAAU,CAAC,EAAE,kCAAkC,CAAC,QAAQ,CAAC,CAAA;IAClE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC5C,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,MAAM,+BAA+B,CAAC,QAAQ,IAAI,CACtD,OAAO,EAAE,oCAAoC,CAAC,QAAQ,CAAC,KACpD,SAAS,CAAA;AAad,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,EACpD,YAA8C,EAC9C,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,iBAA4C,EAC5C,OAAO,GACR,EAAE,gCAAgC,CAAC,QAAQ,CAAC,2UAqD5C"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { createPresentationDataSourceResolver, defaultPresentationComponentSet, findPresentationView, getRegionViewIds, } from '@cohesivesystems/presentation-core';
|
|
4
|
+
import { usePresentationModule, resolvePresentationViewRenderer, } from '@cohesivesystems/presentation-react';
|
|
5
|
+
import { ProjectedStatusBlock } from './projected-activity-state.js';
|
|
6
|
+
export function PresentationSurfaceRenderer({ componentSet = defaultPresentationComponentSet, context, dataSources, rendererRegistry, renderUnknownView = renderDefaultUnknownView, surface, }) {
|
|
7
|
+
const module = usePresentationModule();
|
|
8
|
+
const dataSourceResolver = useMemo(() => createPresentationDataSourceResolver(dataSources), [dataSources]);
|
|
9
|
+
if (!module) {
|
|
10
|
+
return renderUnknownView({
|
|
11
|
+
context,
|
|
12
|
+
module,
|
|
13
|
+
reason: 'missing-module',
|
|
14
|
+
surface,
|
|
15
|
+
view: null,
|
|
16
|
+
viewId: surface?.rootViewId ?? null,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (!surface) {
|
|
20
|
+
return renderUnknownView({
|
|
21
|
+
context,
|
|
22
|
+
module,
|
|
23
|
+
reason: 'missing-surface',
|
|
24
|
+
surface,
|
|
25
|
+
view: null,
|
|
26
|
+
viewId: null,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const rootViewId = surface.rootView?.Id ?? surface.rootViewId;
|
|
30
|
+
if (!rootViewId) {
|
|
31
|
+
return renderUnknownView({
|
|
32
|
+
context,
|
|
33
|
+
module,
|
|
34
|
+
reason: 'missing-root-view',
|
|
35
|
+
surface,
|
|
36
|
+
view: null,
|
|
37
|
+
viewId: null,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return (_jsx(PresentationSurfaceViewRenderer, { componentSet: componentSet, context: context, dataSourceResolver: dataSourceResolver, module: module, rendererRegistry: rendererRegistry, renderUnknownView: renderUnknownView, surface: surface, viewId: rootViewId }));
|
|
41
|
+
}
|
|
42
|
+
function PresentationSurfaceViewRenderer({ componentSet, context, dataSourceResolver, module, rendererRegistry, renderUnknownView, surface, viewId, }) {
|
|
43
|
+
const view = findPresentationView(module, viewId);
|
|
44
|
+
const renderView = useCallback((childViewId) => (_jsx(PresentationSurfaceViewRenderer, { componentSet: componentSet, context: context, dataSourceResolver: dataSourceResolver, module: module, rendererRegistry: rendererRegistry, renderUnknownView: renderUnknownView, surface: surface, viewId: childViewId })), [
|
|
45
|
+
componentSet,
|
|
46
|
+
context,
|
|
47
|
+
dataSourceResolver,
|
|
48
|
+
module,
|
|
49
|
+
rendererRegistry,
|
|
50
|
+
renderUnknownView,
|
|
51
|
+
surface,
|
|
52
|
+
]);
|
|
53
|
+
const renderRegions = useCallback((regionHostView, options) => renderPresentationViewRegions({
|
|
54
|
+
includeRegionIds: options?.includeRegionIds,
|
|
55
|
+
renderView,
|
|
56
|
+
view: regionHostView,
|
|
57
|
+
}), [renderView]);
|
|
58
|
+
if (!view) {
|
|
59
|
+
return renderUnknownView({
|
|
60
|
+
context,
|
|
61
|
+
module,
|
|
62
|
+
reason: 'missing-view',
|
|
63
|
+
surface,
|
|
64
|
+
view,
|
|
65
|
+
viewId,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const resolution = resolvePresentationViewRenderer({
|
|
69
|
+
componentSet,
|
|
70
|
+
module,
|
|
71
|
+
registry: rendererRegistry,
|
|
72
|
+
routeId: surface.navigationTarget.route.Id,
|
|
73
|
+
view,
|
|
74
|
+
});
|
|
75
|
+
if (!resolution.renderer) {
|
|
76
|
+
return renderUnknownView({
|
|
77
|
+
context,
|
|
78
|
+
module,
|
|
79
|
+
reason: 'missing-renderer',
|
|
80
|
+
resolution,
|
|
81
|
+
surface,
|
|
82
|
+
view,
|
|
83
|
+
viewId,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return resolution.renderer({
|
|
87
|
+
componentKey: resolution.componentKey,
|
|
88
|
+
componentRole: resolution.componentRole,
|
|
89
|
+
context,
|
|
90
|
+
dataSourceResolver,
|
|
91
|
+
module,
|
|
92
|
+
renderRegions,
|
|
93
|
+
renderView,
|
|
94
|
+
surface,
|
|
95
|
+
view,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function renderPresentationViewRegions({ includeRegionIds, renderView, view, }) {
|
|
99
|
+
const regions = includeRegionIds
|
|
100
|
+
? view.Regions.filter((region) => includeRegionIds.includes(region.Id))
|
|
101
|
+
: view.Regions;
|
|
102
|
+
return regions.flatMap((region) => getRegionViewIds(region).map((childViewId) => (_jsx("div", { className: "min-h-0 w-full min-w-0", children: renderView(childViewId) }, `${region.Id}:${childViewId}`))));
|
|
103
|
+
}
|
|
104
|
+
function renderDefaultUnknownView({ reason, resolution, view, viewId, }) {
|
|
105
|
+
if (reason === 'missing-module') {
|
|
106
|
+
return _jsx(ProjectedStatusBlock, { label: "Presentation module is not available." });
|
|
107
|
+
}
|
|
108
|
+
if (reason === 'missing-surface') {
|
|
109
|
+
return _jsx(ProjectedStatusBlock, { label: "Presentation surface is not available." });
|
|
110
|
+
}
|
|
111
|
+
if (reason === 'missing-root-view') {
|
|
112
|
+
return _jsx(ProjectedStatusBlock, { label: "Presentation surface has no root view." });
|
|
113
|
+
}
|
|
114
|
+
if (reason === 'missing-view') {
|
|
115
|
+
return _jsx(ProjectedStatusBlock, { label: `Presentation view '${viewId ?? 'unknown'}' is not available.` });
|
|
116
|
+
}
|
|
117
|
+
return (_jsx(ProjectedStatusBlock, { label: `Presentation view '${view?.Name ?? viewId ?? 'unknown'}' has no renderer for semantic role '${resolution?.semanticRole ?? 'unknown'}'.` }));
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=presentation-surface-renderer.js.map
|