mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-05-05 19:09:35 +00:00
feat: migrate AppMainPanel to JSON
Converts AppMainPanel from TSX to pure JSON component. AppMainPanel is a simple container that composes PWAStatusBar, PWAUpdatePrompt, AppHeader, and RouterProvider components. - Create interface in src/lib/json-ui/interfaces/app-main-panel.ts - Create JSON definition in src/components/json-definitions/app-main-panel.json - Export from json-components.ts as pure component - Update registry with AppMainPanel entry - Update interfaces/index.ts to export new interface Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"id": "app-dialogs",
|
||||
"type": "div",
|
||||
"children": [
|
||||
{
|
||||
"id": "global-search-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": null
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": "global-search",
|
||||
"type": "GlobalSearch",
|
||||
"bindings": {
|
||||
"open": { "source": "props.searchOpen" },
|
||||
"onOpenChange": { "source": "props.onSearchOpenChange" },
|
||||
"files": { "source": "props.files" },
|
||||
"models": { "source": "props.models" },
|
||||
"components": { "source": "props.components" },
|
||||
"componentTrees": { "source": "props.componentTrees" },
|
||||
"workflows": { "source": "props.workflows" },
|
||||
"lambdas": { "source": "props.lambdas" },
|
||||
"playwrightTests": { "source": "props.playwrightTests" },
|
||||
"storybookStories": { "source": "props.storybookStories" },
|
||||
"unitTests": { "source": "props.unitTests" },
|
||||
"onNavigate": { "source": "props.onNavigate" },
|
||||
"onFileSelect": { "source": "props.onFileSelect" }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shortcuts-dialog-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": null
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": "shortcuts-dialog",
|
||||
"type": "KeyboardShortcutsDialog",
|
||||
"bindings": {
|
||||
"open": { "source": "props.shortcutsOpen" },
|
||||
"onOpenChange": { "source": "props.onShortcutsOpenChange" }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "preview-dialog-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": null
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": "preview-dialog",
|
||||
"type": "PreviewDialog",
|
||||
"bindings": {
|
||||
"open": { "source": "props.previewOpen" },
|
||||
"onOpenChange": { "source": "props.onPreviewOpenChange" }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pwa-install-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": null
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "PWAInstallPrompt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"id": "app-main-panel",
|
||||
"type": "div",
|
||||
"children": [
|
||||
{
|
||||
"id": "pwa-status-bar-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": {
|
||||
"type": "div",
|
||||
"className": "h-1 bg-primary animate-pulse"
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "PWAStatusBar"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pwa-update-prompt-suspense",
|
||||
"type": "Suspense",
|
||||
"props": {
|
||||
"fallback": null
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "PWAUpdatePrompt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "app-header",
|
||||
"type": "AppHeader",
|
||||
"bindings": {
|
||||
"activeTab": {
|
||||
"source": "props.currentPage"
|
||||
},
|
||||
"onTabChange": {
|
||||
"source": "props.navigateToPage"
|
||||
},
|
||||
"featureToggles": {
|
||||
"source": "props.featureToggles"
|
||||
},
|
||||
"errorCount": {
|
||||
"source": "props.errorCount"
|
||||
},
|
||||
"lastSaved": {
|
||||
"source": "props.lastSaved"
|
||||
},
|
||||
"currentProject": {
|
||||
"source": "props.currentProject"
|
||||
},
|
||||
"onProjectLoad": {
|
||||
"source": "props.onProjectLoad"
|
||||
},
|
||||
"onSearch": {
|
||||
"source": "props.onSearch"
|
||||
},
|
||||
"onShowShortcuts": {
|
||||
"source": "props.onShowShortcuts"
|
||||
},
|
||||
"onGenerateAI": {
|
||||
"source": "props.onGenerateAI"
|
||||
},
|
||||
"onExport": {
|
||||
"source": "props.onExport"
|
||||
},
|
||||
"onPreview": {
|
||||
"source": "props.onPreview"
|
||||
},
|
||||
"onShowErrors": {
|
||||
"source": "props.onShowErrors"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "main-content",
|
||||
"type": "div",
|
||||
"className": "flex-1 overflow-hidden",
|
||||
"children": [
|
||||
{
|
||||
"type": "RouterProvider",
|
||||
"bindings": {
|
||||
"featureToggles": {
|
||||
"source": "props.featureToggles"
|
||||
},
|
||||
"stateContext": {
|
||||
"source": "props.stateContext"
|
||||
},
|
||||
"actionContext": {
|
||||
"source": "props.actionContext"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user