Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
6b14d7f
feat: add tabIndex to buttons in DataTypeInputControlsComponent for i…
nicosammito Jul 21, 2026
2817b7d
feat: add ButtonGroup to DataTypeSelectInputComponent for improved bu…
nicosammito Jul 21, 2026
3c02c30
feat: increase icon size in FlowFolderComponent for improved visibility
nicosammito Jul 21, 2026
f171823
feat: remove unused SidebarComponent and FlowFolderView from FlowLayo…
nicosammito Jul 21, 2026
d099c42
feat: simplify border radius style in FlowOverviewPage for consistency
nicosammito Jul 21, 2026
c381b25
feat: reorganize button layout in FlowFolderView for improved usabili…
nicosammito Jul 21, 2026
418ff79
feat: replace IconEdit with IconPencil in FunctionNode components for…
nicosammito Jul 21, 2026
18df062
feat: add new page components for RuntimeCreate, ApplicationSettings,…
nicosammito Jul 21, 2026
d70cc17
feat: update @code0-tech/pictor and @radix-ui/react-one-time-password…
nicosammito Jul 21, 2026
4c4e5ac
feat: update NEXT_PUBLIC_PICTOR_VERSION to 0.12.0 for improved functi…
nicosammito Jul 21, 2026
29b1aa7
feat: moved (flow) into (dashboard)
nicosammito Jul 21, 2026
f6119ed
feat: removed old tab and bar
nicosammito Jul 21, 2026
9bf654e
feat: refactor ApplicationLayout to use sidebar and FullScreen component
nicosammito Jul 21, 2026
1a3b1d9
feat: rename flow page and layout files; update icons and layout styles
nicosammito Jul 21, 2026
c80fe3d
feat: rename layout and page files for improved structure
nicosammito Jul 21, 2026
beb73f7
feat: rename runtime page file for improved organization
nicosammito Jul 21, 2026
858ae2d
feat: rename settings page file for improved organization
nicosammito Jul 21, 2026
ae674f7
feat: add new page component for namespace and recent project views
nicosammito Jul 21, 2026
b9a6dae
feat: add default export component
nicosammito Jul 21, 2026
80039c3
feat: add default export component for FlowFolderView
nicosammito Jul 21, 2026
69e6603
feat: refactor UserInvitePage to use UserCreateDialogComponent
nicosammito Jul 21, 2026
fdf19b7
feat: add UserCreateDialogComponent for inviting new users
nicosammito Jul 21, 2026
fab442d
feat: add RuntimeCreateDialogComponent for creating new runtimes
nicosammito Jul 21, 2026
92a5f90
feat: add ProjectRecentListView component for displaying recent projects
nicosammito Jul 21, 2026
fd940b7
feat: add NamespaceListView and NamespaceRowView components for displ…
nicosammito Jul 21, 2026
c514ea0
feat: add ApplicationUsersView component for managing user access and…
nicosammito Jul 21, 2026
cb898a2
feat: add ApplicationServersView component for managing global runtimes
nicosammito Jul 21, 2026
77002ea
feat: enhance ApplicationGeneralSettingsView and ApplicationRestricti…
nicosammito Jul 21, 2026
25a87dd
feat: add ApplicationNavigationView component for user navigation and…
nicosammito Jul 21, 2026
fef2008
feat: add ApplicationLicensesTabTriggerView component for license man…
nicosammito Jul 21, 2026
6dc78fc
feat: refactor ApplicationPage to improve layout and integrate Applic…
nicosammito Jul 21, 2026
b18e35c
feat: replace ApplicationSettingsPage layout with ApplicationSettings…
nicosammito Jul 21, 2026
3b7c18c
feat: add ApplicationAttentionFlowsComponent to display flows needing…
nicosammito Jul 21, 2026
02b7ad5
feat: add ApplicationSettingsDialogComponent for managing application…
nicosammito Jul 21, 2026
b6b3d7b
feat: add ApplicationStatsView component for displaying application s…
nicosammito Jul 21, 2026
e9c9882
feat: removed old code
nicosammito Jul 21, 2026
aeeb6c8
feat: simplify default export to directly use FlowFolderView component
nicosammito Jul 23, 2026
fc7a376
feat: refactor layout components for improved styling and structure
nicosammito Jul 23, 2026
12308fd
feat: enable React Compiler in production builds for improved perform…
nicosammito Jul 23, 2026
7a6493f
feat: update Pictor package version to 0.13.1 in environment and pack…
nicosammito Jul 23, 2026
d17a837
feat: enhance ApplicationAttentionFlowsComponent with improved flow d…
nicosammito Jul 23, 2026
11c2654
feat: implement InputDialog component and refactor UserCreateDialogCo…
nicosammito Jul 23, 2026
f61afae
feat: refactor ApplicationSettingsDialogComponent to use SettingDialo…
nicosammito Jul 24, 2026
8149bea
feat: refactor ApplicationGeneralSettingsView for improved code reada…
nicosammito Jul 24, 2026
7d18840
feat: refactor RuntimeCreateDialogComponent to use InputDialog for im…
nicosammito Jul 24, 2026
c00d0ae
feat: add RuntimeSettingsDialogComponent for managing runtime setting…
nicosammito Jul 24, 2026
bbc271e
feat: integrate RuntimeSettingsDialogComponent into RuntimeSettingsPa…
nicosammito Jul 24, 2026
d68c894
feat: replace Dialog with SettingDialog in UserEditDialogComponent fo…
nicosammito Jul 24, 2026
1d29ff4
feat: add SettingDialog component for enhanced user settings management
nicosammito Jul 24, 2026
caad63e
feat: create page component for RuntimeSettingsPage to manage runtime…
nicosammito Jul 24, 2026
af96efb
feat: update @code0-tech/triangulum dependency to version 0.27.1
nicosammito Jul 24, 2026
3175e76
feat: optimize FlowWorkerProvider to lazily create and manage worker …
nicosammito Jul 24, 2026
c8508f0
feat: refactor NamespaceOverviewPage for improved layout and styling
nicosammito Jul 24, 2026
118051b
feat: create page component for ProjectFlowPage to display project an…
nicosammito Jul 24, 2026
e740f60
feat: add FlowRecentListView and ProjectListView components for displ…
nicosammito Jul 24, 2026
b39dc45
feat: integrate NamespaceMenuView into FlowFolderView layout
nicosammito Jul 24, 2026
c98f099
feat: add NamespaceMenuView to the layout of the main page component
nicosammito Jul 24, 2026
5da3d5d
feat: refactor OrganizationCreatePage to use OrganizationCreateDialog…
nicosammito Jul 24, 2026
3a59147
feat: add OrganizationCreateDialogComponent and NamespaceMenuView com…
nicosammito Jul 24, 2026
e237861
feat: implement MemberAddDialogComponent in MemberAddPage for adding …
nicosammito Jul 25, 2026
66ccf8a
feat: enhance MembersView with filtering and sorting capabilities for…
nicosammito Jul 25, 2026
7a50309
feat: update NamespaceMenuView links to point to settings for members…
nicosammito Jul 25, 2026
83d4233
feat: integrate ProjectCreateDialogComponent in NamespaceProjectsCrea…
nicosammito Jul 25, 2026
8451d44
feat: implement NamespaceSettingsDialogComponent in NamespaceSettings…
nicosammito Jul 25, 2026
7bd2730
feat: remove old pages and views
nicosammito Jul 25, 2026
2196b9a
feat: add MemberAddDialogComponent for bulk inviting members to a nam…
nicosammito Jul 25, 2026
1a9df34
feat: add NamespaceLicensesTabTriggerView component as a placeholder
nicosammito Jul 25, 2026
822db77
feat: add NamespaceLicensesTabTriggerView component for licenses tab
nicosammito Jul 25, 2026
24a66e8
feat: add NamespaceLicensesView component as a placeholder
nicosammito Jul 25, 2026
ee95d58
feat: add NamespaceServersView component for managing namespace runtimes
nicosammito Jul 25, 2026
8a9a758
feat: add NamespaceSettingsDialogComponent for managing workspace set…
nicosammito Jul 25, 2026
513375d
feat: add multiple page components for member, role, and namespace ma…
nicosammito Jul 25, 2026
59dae02
feat: add ProjectCreateDialogComponent for creating new projects with…
nicosammito Jul 25, 2026
eaa5418
feat: add RoleCreateDialogComponent and RoleSettingsDialogComponent f…
nicosammito Jul 25, 2026
e1f485f
feat: fix link path for project creation in ProjectListView
nicosammito Jul 25, 2026
2f8ed18
feat: fix link path for project creation in ProjectsView
nicosammito Jul 25, 2026
807bbdc
feat: integrate RoleCreateDialogComponent into RoleCreatePage for rol…
nicosammito Jul 25, 2026
64ab927
feat: update role management views for improved UI and functionality
nicosammito Jul 25, 2026
aa19689
feat: refactor RuntimeCreateDialog and RuntimeSettingsDialog for impr…
nicosammito Jul 25, 2026
a48e6c6
feat: simplify user creation button layout in UserCreateDialogComponent
nicosammito Jul 25, 2026
7c986be
feat: remove unnecessary pages and views
nicosammito Jul 25, 2026
6d0a659
feat: update Pictor version to 0.14.0 and add border-beam dependency
nicosammito Jul 26, 2026
0889e4e
feat: integrate BorderBeam component for enhanced visual effects in A…
nicosammito Jul 26, 2026
864b6fa
feat: update background gradient in AIGeneratingMessageComponent for …
nicosammito Jul 26, 2026
605c36e
feat: refactor button layout in FlowCreateDialogComponent for improve…
nicosammito Jul 26, 2026
82fd7f2
feat: enhance FlowFolderContextMenuComponent to scope flow types by p…
nicosammito Jul 26, 2026
d44bf19
feat: update routing in FlowFolderView to remove flow from URL after …
nicosammito Jul 26, 2026
070341e
feat: add FlowRecentListIcon component to display flow type icons in …
nicosammito Jul 26, 2026
a105ee8
feat: rename FlowLayout to ProjectLayout for improved project structure
nicosammito Jul 26, 2026
b0f449b
feat: update link in NamespaceMenuView to redirect to settings page
nicosammito Jul 26, 2026
c9c329b
feat: enhance NamespaceOverviewPage to include stats and project comp…
nicosammito Jul 26, 2026
bf34c98
feat: add NamespaceStatsView component to display project and flow st…
nicosammito Jul 26, 2026
ebbe5f2
feat: add ProjectSettingsPage as the default export in page.tsx
nicosammito Jul 26, 2026
9318c71
feat: rename FlowLayout and FlowOverviewPage to ProjectLayout and Pro…
nicosammito Jul 26, 2026
27fbee0
feat: add ProjectMenuView component for project selection and setting…
nicosammito Jul 26, 2026
134cd29
feat: add ProjectSettingsAssignedServersView component for managing a…
nicosammito Jul 26, 2026
a60f38c
feat: add ProjectSettingsDialogComponent for managing project settings
nicosammito Jul 26, 2026
c28aaa0
feat: add ProjectTableView component for displaying and managing proj…
nicosammito Jul 26, 2026
7206ca9
feat: replace Island notifications with Toast notifications across co…
nicosammito Jul 26, 2026
0cb1703
feat: merge user update results with existing user data to preserve c…
nicosammito Jul 26, 2026
51370c8
feat: add descriptive text to UserEditDialog for improved user guidance
nicosammito Jul 26, 2026
b3f2dd0
feat: enhance Avatar color in ProjectTableView based on project name
nicosammito Jul 26, 2026
c8e09ad
feat: replace NamespaceMenuView with ProjectMenuView in default layout
nicosammito Jul 26, 2026
d0e1de8
feat: correct closing on removal
nicosammito Jul 26, 2026
91c3db5
feat: enhance RolePermissionView with improved card styling and butto…
nicosammito Jul 27, 2026
18c7851
feat: remove unnecessary AuroraBackground component from NamespaceOve…
nicosammito Jul 27, 2026
c63ade9
feat: adjust toast width in global styles for better responsiveness
nicosammito Jul 27, 2026
b179ad5
feat: remove AuroraBackground component from ApplicationPage for clea…
nicosammito Jul 27, 2026
c35c358
feat: implement toast suppression for inline AI generation in chat co…
nicosammito Jul 27, 2026
2068ab4
feat: remove redundant toast suppression in UserEditDialogComponent
nicosammito Jul 27, 2026
43905ce
feat: update icon implementation and adjust toast positioning for imp…
nicosammito Jul 27, 2026
3834ae4
feat: update navigation link in ApplicationNavigationView for improve…
nicosammito Jul 27, 2026
e4a6a55
feat: enhance JSON tree component with improved styling and structure
nicosammito Jul 27, 2026
fd401ca
feat: create UserProfileView component and refactor UserPage for impr…
nicosammito Jul 27, 2026
1865e55
feat: add react-markdown and remark-gfm dependencies for enhanced mar…
nicosammito Jul 27, 2026
e5971c9
feat: integrate UserReadmeComponent into UserPage for enhanced user r…
nicosammito Jul 27, 2026
9771bf2
feat: create UserReadmeComponent for enhanced user readme display wit…
nicosammito Jul 27, 2026
7f5befa
feat: update FlowFolderView with new integrations button and improved…
nicosammito Jul 27, 2026
c77c28c
feat: enhance layout of FunctionFile components with improved padding…
nicosammito Jul 27, 2026
7411cb8
feat: add ModuleConfigurationDialogComponent for module configuration…
nicosammito Jul 27, 2026
a048bb9
feat: create page for ModuleConfigurationPage integration
nicosammito Jul 27, 2026
37cbd65
feat: enhance ModulesPage with filter, sort, and integration request …
nicosammito Jul 27, 2026
1283d0d
feat: simplify border radius styles in ResizablePanel components
nicosammito Jul 27, 2026
8c29403
feat: update ProjectMenuView to include navigation back to workspace …
nicosammito Jul 27, 2026
281a3be
feat: refactor ModuleConfigurationDialogComponent to improve runtime …
nicosammito Jul 27, 2026
427fbf0
feat: add updatedAgoOf function to display relative time since last u…
nicosammito Jul 27, 2026
e068725
feat: remove commented-out code in AIGenerationState interface for cl…
nicosammito Jul 27, 2026
10a5ae8
feat: update namespace handling to use index instead of number for im…
nicosammito Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SAGITTARIUS_GRAPHQL_URL=http://localhost:80/graphql
SAGITTARIUS_CABLE_URL=http://localhost:80/cable

NEXT_PUBLIC_SCULPTOR_VERSION=0.0.0
NEXT_PUBLIC_PICTOR_VERSION=0.11.1
NEXT_PUBLIC_PICTOR_VERSION=0.14.0
NEXT_PUBLIC_ALLOWED_REDIRECT_DOMAINS=*.code0.tech,*.codezero.build

NEXT_PUBLIC_OTEL_SERVICE_NAME=#"sculptor-client"
Expand Down
5 changes: 4 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const nextConfig: NextConfig = {
]
},
reactStrictMode: true,
reactCompiler: true,
// Enable React Compiler in production builds only. In dev it forces a
// per-file Babel pass (the compiler is a Babel plugin) which is the
// dominant cost of Turbopack dev compile time and memory here.
reactCompiler: process.env.NODE_ENV === "production",
turbopack: {
resolveAlias: {
"@edition": path.resolve(__dirname, `src/packages/${EDITION}/src`),
Expand Down
1,913 changes: 1,816 additions & 97 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@apollo/client": "^4.0.9",
"@code0-tech/pictor": "^0.11.1",
"@code0-tech/triangulum": "^0.27.0",
"@code0-tech/pictor": "^0.14.0",
"@code0-tech/triangulum": "^0.27.1",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/lint": "^6.9.5",
"@icons-pack/react-simple-icons": "^13.13.0",
Expand All @@ -34,6 +34,7 @@
"@uidotdev/usehooks": "^2.4.1",
"@vercel/otel": "^2.1.1",
"@xyflow/react": "^12.11.0",
"border-beam": "^1.3.0",
"date-fns": "^4.1.0",
"graphql": "^16.12.0",
"graphql-ruby-client": "^1.15.1",
Expand All @@ -45,6 +46,8 @@
"react": "19.2.6",
"react-dom": "19.2.6",
"react-hotkeys-hook": "^5.2.4",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"rxjs": "^7.8.2",
"sass": "^1.93.3",
"use-debounce": "^10.1.1"
Expand Down
5 changes: 0 additions & 5 deletions src/app/(dashboard)/@bar/default.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {MemberAddPage} from "@edition/member/pages/MemberAddPage";

export default MemberAddPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {ModuleConfigurationPage} from "@ce-internal/module/pages/ModuleConfigurationPage";

export default ModuleConfigurationPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {ProjectSettingsPage} from "@edition/project/pages/ProjectSettingsPage";

export default ProjectSettingsPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {NamespaceProjectsCreatePage} from "@edition/namespace/pages/NamespaceProjectsCreatePage";

export default NamespaceProjectsCreatePage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RoleSettingsPage} from "@edition/role/pages/RoleSettingsPage";

export default RoleSettingsPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RoleCreatePage} from "@edition/role/pages/RoleCreatePage";

export default RoleCreatePage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RuntimeSettingsPage} from "@edition/runtime/pages/RuntimeSettingsPage";

export default RuntimeSettingsPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RuntimeCreatePage} from "@edition/runtime/pages/RuntimeCreatePage";

export default RuntimeCreatePage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {NamespaceSettingsPage} from "@edition/namespace/pages/NamespaceSettingsPage";

export default NamespaceSettingsPage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RuntimeSettingsPage} from "@edition/runtime/pages/RuntimeSettingsPage";

export default RuntimeSettingsPage
3 changes: 3 additions & 0 deletions src/app/(dashboard)/@modal/(.)runtimes/create/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {RuntimeCreatePage} from "@edition/runtime/pages/RuntimeCreatePage";

export default RuntimeCreatePage
3 changes: 3 additions & 0 deletions src/app/(dashboard)/@modal/(.)settings/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {ApplicationSettingsPage} from "@edition/application/pages/ApplicationSettingsPage";

export default ApplicationSettingsPage
3 changes: 3 additions & 0 deletions src/app/(dashboard)/@modal/(.)users/invite/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {UserInvitePage} from "@edition/user/pages/UserInvitePage";

export default UserInvitePage
3 changes: 3 additions & 0 deletions src/app/(dashboard)/@modal/(.)workspaces/create/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {OrganizationCreatePage} from "@edition/organization/pages/OrganizationCreatePage";

export default OrganizationCreatePage
3 changes: 3 additions & 0 deletions src/app/(dashboard)/@sidebar/default.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default () => {
return null
}
17 changes: 17 additions & 0 deletions src/app/(dashboard)/@sidebar/namespace/[namespaceId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use client"

import {ProjectListView} from "@edition/project/views/ProjectListView";
import {FlowRecentListView} from "@edition/flow/views/FlowRecentListView";
import {NamespaceMenuView} from "@edition/namespace/views/NamespaceMenuView";
import {Flex} from "@code0-tech/pictor";

export default () => {
return <Flex h={"100%"} pt={0.5} style={{boxSizing: "border-box", flexDirection: 'column', gap: "1.3rem"}}>
<ProjectListView/>
<div style={{borderTop: "1px dashed rgba(255,255,255, .1)"}}/>
<FlowRecentListView/>
<div style={{marginTop: "auto"}}>
<NamespaceMenuView/>
</div>
</Flex>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use client"

import {Flex} from "@code0-tech/pictor";
import {FlowFolderView} from "@edition/flow/views/FlowFolderView";
import {ProjectMenuView} from "@edition/project/views/ProjectMenuView";

export default () => {
return <Flex h={"100%"} style={{boxSizing: "border-box", flexDirection: 'column'}}>
<FlowFolderView/>
<div style={{marginTop: "auto"}}>
<ProjectMenuView/>
</div>
</Flex>
}
13 changes: 13 additions & 0 deletions src/app/(dashboard)/@sidebar/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client"

import {Flex} from "@code0-tech/pictor";
import {NamespaceListView} from "@edition/namespace/views/NamespaceListView";
import {ProjectRecentListView} from "@edition/project/views/ProjectRecentListView";

export default () => {
return <Flex h={"100%"} pt={0.5} style={{boxSizing: "border-box", flexDirection: 'column', gap: "1.3rem"}}>
<NamespaceListView/>
<div style={{borderTop: "1px dashed rgba(255,255,255, .1)"}}/>
<ProjectRecentListView/>
</Flex>
}
5 changes: 5 additions & 0 deletions src/app/(dashboard)/@sidebar/users/[userId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client"

import {UserProfileView} from "@edition/user/views/UserProfileView";

export default UserProfileView
5 changes: 0 additions & 5 deletions src/app/(dashboard)/@tab/default.tsx

This file was deleted.

111 changes: 62 additions & 49 deletions src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,96 +2,109 @@

import React from "react";
import {useApolloClient} from "@apollo/client/react";
import {AuroraBackground, ContextStoreProvider, Flex} from "@code0-tech/pictor";
import {ContextStoreProvider} from "@code0-tech/pictor";
import {UserService} from "@edition/user/services/User.service";
import {GraphqlClient} from "@core/util/graphql-client";
import {usePathname} from "next/navigation";
import {useParams, usePathname} from "next/navigation";
import {OrganizationService} from "@edition/organization/services/Organization.service";
import {MemberService} from "@edition/member/services/Member.service";
import {NamespaceService} from "@edition/namespace/services/Namespace.service";
import {usePersistentReactiveArrayService} from "@/hooks/usePersistentReactiveArrayService";
import {RuntimeService} from "@edition/runtime/services/Runtime.service";
import {ProjectService} from "@edition/project/services/Project.service";
import {RoleService} from "@edition/role/services/Role.service";
import Image from "next/image";
import {Application, ApplicationService} from "@edition/application/services/Application.service";
import {useUserSession} from "@edition/user/hooks/User.session.hook";
import {OrganizationView} from "@edition/organization/services/Organization.view";
import {RoleView} from "@edition/role/services/Role.view";
import {Layout} from "@code0-tech/pictor/dist/components/layout/Layout";
import {Namespace, NamespaceMember, NamespaceProject, Runtime, User} from "@code0-tech/sagittarius-graphql-types";
import {
DataType,
Flow, FlowType,
FunctionDefinition,
Namespace,
NamespaceMember,
NamespaceProject,
Runtime, RuntimeModule,
User
} from "@code0-tech/sagittarius-graphql-types";
import {ApplicationMiddlewareComponent} from "@edition/application/components/ApplicationMiddlewareComponent";
import {FullScreen} from "@code0-tech/pictor/dist/components/fullscreen/FullScreen";
import {ApplicationNavigationView} from "@edition/application/views/ApplicationNavigationView";
import {FlowService} from "@edition/flow/services/Flow.service";
import {FunctionService} from "@edition/function/services/Function.service";
import {DatatypeService} from "@edition/datatype/services/Datatype.service";
import {FlowTypeService} from "@edition/flowtype/services/FlowType.service";
import {ModuleService} from "@edition/module/services/Module.service";
import {AIService, Model} from "@edition/ai/services/AI.service";

interface ApplicationLayoutProps {
children: React.ReactNode
bar: React.ReactNode
tab: React.ReactNode
sidebar: React.ReactNode
modal: React.ReactNode
}

const ApplicationLayout: React.FC<ApplicationLayoutProps> = ({children, bar, tab, modal}) => {
const ApplicationLayout: React.FC<ApplicationLayoutProps> = ({children, sidebar, modal}) => {

const client = useApolloClient()
const pathname = usePathname()
const params = useParams()
const currentSession = useUserSession()

const graphqlClient = React.useMemo(() => new GraphqlClient(client), [client])

const namespaceIndex = params.namespaceId as any as number
const projectIndex = params.projectId as any as number
const flowIndex = params.flowId as any as number
const namespaceId: Namespace['id'] = `gid://sagittarius/Namespace/${namespaceIndex}`
const projectId: NamespaceProject['id'] = `gid://sagittarius/NamespaceProject/${projectIndex}`

const application = usePersistentReactiveArrayService<Application, ApplicationService>(`dashboard::application::${currentSession?.id}`, (store) => new ApplicationService(graphqlClient, store))
const user = usePersistentReactiveArrayService<User, UserService>(`dashboard::users::${currentSession?.id}`, (store) => new UserService(graphqlClient, store))
const organization = usePersistentReactiveArrayService<OrganizationView, OrganizationService>(`dashboard::organizations::${currentSession?.id}`, (store) => new OrganizationService(graphqlClient, store))
const member = usePersistentReactiveArrayService<NamespaceMember, MemberService>(`dashboard::members::${currentSession?.id}`, (store) => new MemberService(graphqlClient, store))
const namespace = usePersistentReactiveArrayService<Namespace, NamespaceService>(`dashboard::namespaces::${currentSession?.id}`, (store) => new NamespaceService(graphqlClient, store))
const runtime = usePersistentReactiveArrayService<Runtime, RuntimeService>(`dashboard::global_runtimes::${currentSession?.id}`, (store) => new RuntimeService(graphqlClient, store))
const project = usePersistentReactiveArrayService<NamespaceProject, ProjectService>(`dashboard::projects::${currentSession?.id}`, (store) => new ProjectService(graphqlClient, store))
const role = usePersistentReactiveArrayService<RoleView, RoleService>(`dashboard::roles::${currentSession?.id}`, (store) => new RoleService(graphqlClient, store))
const application = usePersistentReactiveArrayService<Application, ApplicationService>(`dashboard::application::${currentSession?.id}`, (store) => new ApplicationService(graphqlClient, store))
const flow = usePersistentReactiveArrayService<Flow, FlowService>(`dashboard::flows::${currentSession?.id}`, (store) => new FlowService(graphqlClient, store))
const functions = usePersistentReactiveArrayService<FunctionDefinition, FunctionService>(`dashboard::functions::${currentSession?.id}`, (store) => new FunctionService(graphqlClient, store))
const datatype = usePersistentReactiveArrayService<DataType, DatatypeService>(`dashboard::datatypes::${currentSession?.id}`, (store) => new DatatypeService(graphqlClient, store))
const flowtype = usePersistentReactiveArrayService<FlowType, FlowTypeService>(`dashboard::flowtypes::${currentSession?.id}`, (store) => new FlowTypeService(graphqlClient, store))
const module = usePersistentReactiveArrayService<RuntimeModule, ModuleService>(`dashboard::modules::${currentSession?.id}`, (store) => new ModuleService(graphqlClient, store))
const ai = usePersistentReactiveArrayService<Model, AIService>(`dashboard::ai::${currentSession?.id}`, (store) => new AIService(graphqlClient, store))

const runtimeId = React.useMemo(() => project[1].getById(projectId, {namespaceId})?.primaryRuntime?.id, [projectId, project[0], namespaceId])

React.useEffect(() => {
if (!currentSession || !namespaceId || !projectId) return

flow[1].values({namespaceId, projectId})
functions[1].values({namespaceId, projectId, runtimeId})
datatype[1].values({namespaceId, projectId, runtimeId})
flowtype[1].values({namespaceId, projectId, runtimeId})
module[1].values({namespaceId, projectId, runtimeId})
}, [runtimeId, namespaceId, projectId, currentSession, flow, functions, datatype, flowtype])

const isAddLicensePage = pathname === '/licenses/add';

return <ContextStoreProvider
services={[user, organization, member, namespace, runtime, project, role, application]}>
services={[application, user, organization, member, namespace, runtime, project, role, flow, functions, datatype, flowtype, module, ai]}>
<ApplicationMiddlewareComponent>
<Layout style={{zIndex: 0}} layoutGap={"0"} showLayoutSplitter={false} leftContent={
<Flex p={0.7} pt={1} align={"center"} style={{flexDirection: "column", gap: "0.7rem"}}>
{isAddLicensePage ? (
<AuroraBackground/>
) : (
<div style={{
position: "absolute",
top: 0,
left: 0,
width: "50%",
transform: "scaleX(-1)",
height: "40%",
zIndex: "-1",
}}>
<div style={{
position: "absolute",
top: "0",
left: "0",
width: "100%",
height: "100%",
background: "radial-gradient(circle at top right,rgba(25, 24, 37, 0.25) 0%, rgba(25, 24, 37, 1) 25%)",
zIndex: "1"
}}/>
<AuroraBackground/>

</div>
)}
<Image src={"/CodeZero_Logo.png"} alt={"CodeZero Banner"} width={160} height={0}
style={{width: '38px', height: 'auto'}}/>
{tab}
</Flex>
}>
<Layout showLayoutSplitter={false} pr={0.7} layoutGap={"0"} topContent={<>{bar}</>}>
<>
<Layout>
<>{children}</>
</Layout>
{modal}
</>
<FullScreen bg={"var(--secondary)"}>
<Layout p={1} showLayoutSplitter={false} layoutGap={32} leftContent={<ApplicationNavigationView/>}>
<Layout showLayoutSplitter={false} layoutGap={32} leftContent={<div style={{
height: "100%",
boxSizing: "border-box",
maxWidth: "20vw"
}}>{sidebar}</div>}>
<>
{children}
{modal}
</>
</Layout>
</Layout>
</Layout>
</FullScreen>
</ApplicationMiddlewareComponent>
</ContextStoreProvider>
}
Expand Down
7 changes: 0 additions & 7 deletions src/app/(dashboard)/namespace/[namespaceId]/members/page.tsx

This file was deleted.

Loading