@orthacms/workspaces-admin 0.0.0-reserve.0
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 +21 -0
- package/README.md +7 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/lib/api/useAddWorkspaceContent/index.d.ts +15 -0
- package/dist/lib/api/useAddWorkspaceContent/index.d.ts.map +1 -0
- package/dist/lib/api/useAddWorkspaceMember/index.d.ts +14 -0
- package/dist/lib/api/useAddWorkspaceMember/index.d.ts.map +1 -0
- package/dist/lib/api/useContentTypes/index.d.ts +10 -0
- package/dist/lib/api/useContentTypes/index.d.ts.map +1 -0
- package/dist/lib/api/useCreateWorkspace/index.d.ts +20 -0
- package/dist/lib/api/useCreateWorkspace/index.d.ts.map +1 -0
- package/dist/lib/api/useDeleteWorkspace/index.d.ts +13 -0
- package/dist/lib/api/useDeleteWorkspace/index.d.ts.map +1 -0
- package/dist/lib/api/useRemoveWorkspaceContent/index.d.ts +15 -0
- package/dist/lib/api/useRemoveWorkspaceContent/index.d.ts.map +1 -0
- package/dist/lib/api/useRemoveWorkspaceMember/index.d.ts +13 -0
- package/dist/lib/api/useRemoveWorkspaceMember/index.d.ts.map +1 -0
- package/dist/lib/api/useSetWorkspaceStatus/index.d.ts +14 -0
- package/dist/lib/api/useSetWorkspaceStatus/index.d.ts.map +1 -0
- package/dist/lib/api/useSlugAvailability/index.d.ts +10 -0
- package/dist/lib/api/useSlugAvailability/index.d.ts.map +1 -0
- package/dist/lib/api/useUpdateWorkspace/index.d.ts +23 -0
- package/dist/lib/api/useUpdateWorkspace/index.d.ts.map +1 -0
- package/dist/lib/api/useUsersSearch/index.d.ts +17 -0
- package/dist/lib/api/useUsersSearch/index.d.ts.map +1 -0
- package/dist/lib/api/useWorkspaceContentCount/index.d.ts +8 -0
- package/dist/lib/api/useWorkspaceContentCount/index.d.ts.map +1 -0
- package/dist/lib/api/useWorkspaceEntryCount/index.d.ts +8 -0
- package/dist/lib/api/useWorkspaceEntryCount/index.d.ts.map +1 -0
- package/dist/lib/api/useWorkspaces/index.d.ts +30 -0
- package/dist/lib/api/useWorkspaces/index.d.ts.map +1 -0
- package/dist/lib/application/useAddWorkspaceContent/index.d.ts +9 -0
- package/dist/lib/application/useAddWorkspaceContent/index.d.ts.map +1 -0
- package/dist/lib/application/useAddWorkspaceContent/index.js +15 -0
- package/dist/lib/application/useAddWorkspaceMember/index.d.ts +8 -0
- package/dist/lib/application/useAddWorkspaceMember/index.d.ts.map +1 -0
- package/dist/lib/application/useAddWorkspaceMember/index.js +14 -0
- package/dist/lib/application/useContentTypes/index.d.ts +9 -0
- package/dist/lib/application/useContentTypes/index.d.ts.map +1 -0
- package/dist/lib/application/useContentTypes/index.js +16 -0
- package/dist/lib/application/useCreateWorkspace/index.d.ts +20 -0
- package/dist/lib/application/useCreateWorkspace/index.d.ts.map +1 -0
- package/dist/lib/application/useCreateWorkspace/index.js +44 -0
- package/dist/lib/application/useCreateWorkspaceFlow/index.d.ts +23 -0
- package/dist/lib/application/useCreateWorkspaceFlow/index.d.ts.map +1 -0
- package/dist/lib/application/useCreateWorkspaceFlow/index.js +81 -0
- package/dist/lib/application/useDeleteWorkspace/index.d.ts +13 -0
- package/dist/lib/application/useDeleteWorkspace/index.d.ts.map +1 -0
- package/dist/lib/application/useDeleteWorkspace/index.js +23 -0
- package/dist/lib/application/useRemoveWorkspaceContent/index.d.ts +9 -0
- package/dist/lib/application/useRemoveWorkspaceContent/index.d.ts.map +1 -0
- package/dist/lib/application/useRemoveWorkspaceContent/index.js +15 -0
- package/dist/lib/application/useRemoveWorkspaceMember/index.d.ts +8 -0
- package/dist/lib/application/useRemoveWorkspaceMember/index.d.ts.map +1 -0
- package/dist/lib/application/useRemoveWorkspaceMember/index.js +14 -0
- package/dist/lib/application/useSetWorkspaceStatus/index.d.ts +9 -0
- package/dist/lib/application/useSetWorkspaceStatus/index.d.ts.map +1 -0
- package/dist/lib/application/useSetWorkspaceStatus/index.js +15 -0
- package/dist/lib/application/useSlugAvailability/index.d.ts +18 -0
- package/dist/lib/application/useSlugAvailability/index.d.ts.map +1 -0
- package/dist/lib/application/useSlugAvailability/index.js +39 -0
- package/dist/lib/application/useUpdateWorkspace/index.d.ts +9 -0
- package/dist/lib/application/useUpdateWorkspace/index.d.ts.map +1 -0
- package/dist/lib/application/useUpdateWorkspace/index.js +15 -0
- package/dist/lib/application/useUsersSearch/index.d.ts +18 -0
- package/dist/lib/application/useUsersSearch/index.d.ts.map +1 -0
- package/dist/lib/application/useUsersSearch/index.js +24 -0
- package/dist/lib/application/useWorkspaceContentCount/index.d.ts +8 -0
- package/dist/lib/application/useWorkspaceContentCount/index.d.ts.map +1 -0
- package/dist/lib/application/useWorkspaceContentCount/index.js +17 -0
- package/dist/lib/application/useWorkspaceEntryCount/index.d.ts +8 -0
- package/dist/lib/application/useWorkspaceEntryCount/index.d.ts.map +1 -0
- package/dist/lib/application/useWorkspaceEntryCount/index.js +17 -0
- package/dist/lib/application/useWorkspaces/index.d.ts +5 -0
- package/dist/lib/application/useWorkspaces/index.d.ts.map +1 -0
- package/dist/lib/application/useWorkspaces/index.js +11 -0
- package/dist/lib/components/BlockingConfirmDialog/index.d.ts +41 -0
- package/dist/lib/components/BlockingConfirmDialog/index.d.ts.map +1 -0
- package/dist/lib/components/ColorSwatchRow/index.d.ts +15 -0
- package/dist/lib/components/ColorSwatchRow/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/ColorSwatchRow/index.d.ts +15 -0
- package/dist/lib/components/CreateWorkspaceWizard/ColorSwatchRow/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts +11 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.d.ts +48 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/index.d.ts +23 -0
- package/dist/lib/components/CreateWorkspaceWizard/ContentStep/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/IdentityFields/index.d.ts +17 -0
- package/dist/lib/components/CreateWorkspaceWizard/IdentityFields/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/MemberRow/index.d.ts +14 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/MemberRow/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/MemberTypeahead/index.d.ts +15 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/MemberTypeahead/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/index.d.ts +17 -0
- package/dist/lib/components/CreateWorkspaceWizard/MembersStep/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/Monogram/index.d.ts +17 -0
- package/dist/lib/components/CreateWorkspaceWizard/Monogram/index.d.ts.map +1 -0
- package/dist/lib/components/CreateWorkspaceWizard/SlugField/index.d.ts +23 -0
- package/dist/lib/components/CreateWorkspaceWizard/SlugField/index.d.ts.map +1 -0
- package/dist/lib/components/StatusChip/index.d.ts +9 -0
- package/dist/lib/components/StatusChip/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceAvatar/index.d.ts +20 -0
- package/dist/lib/components/WorkspaceAvatar/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceCard/MemberStack/MemberListPopover/index.d.ts +9 -0
- package/dist/lib/components/WorkspaceCard/MemberStack/MemberListPopover/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceCard/MemberStack/index.d.ts +11 -0
- package/dist/lib/components/WorkspaceCard/MemberStack/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceCard/StatusChip/index.d.ts +9 -0
- package/dist/lib/components/WorkspaceCard/StatusChip/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceCard/index.d.ts +15 -0
- package/dist/lib/components/WorkspaceCard/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceCommands/index.d.ts +8 -0
- package/dist/lib/components/WorkspaceCommands/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceContentSettings/AddContentDialog/index.d.ts +26 -0
- package/dist/lib/components/WorkspaceContentSettings/AddContentDialog/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceContentSettings/GrantedContentGroup/index.d.ts +21 -0
- package/dist/lib/components/WorkspaceContentSettings/GrantedContentGroup/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceContentSettings/GrantedContentRow/index.d.ts +26 -0
- package/dist/lib/components/WorkspaceContentSettings/GrantedContentRow/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceContentSettings/RemoveContentDialog/index.d.ts +25 -0
- package/dist/lib/components/WorkspaceContentSettings/RemoveContentDialog/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceContentSettings/index.d.ts +25 -0
- package/dist/lib/components/WorkspaceContentSettings/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceDangerSettings/DeleteWorkspaceDialog/index.d.ts +22 -0
- package/dist/lib/components/WorkspaceDangerSettings/DeleteWorkspaceDialog/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceDangerSettings/index.d.ts +18 -0
- package/dist/lib/components/WorkspaceDangerSettings/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceGeneralSettings/index.d.ts +18 -0
- package/dist/lib/components/WorkspaceGeneralSettings/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceMembersSettings/MemberDirectorySearch/index.d.ts +18 -0
- package/dist/lib/components/WorkspaceMembersSettings/MemberDirectorySearch/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceMembersSettings/MemberListRow/index.d.ts +17 -0
- package/dist/lib/components/WorkspaceMembersSettings/MemberListRow/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceMembersSettings/index.d.ts +16 -0
- package/dist/lib/components/WorkspaceMembersSettings/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceNav/WorkspaceNavButton/index.d.ts +14 -0
- package/dist/lib/components/WorkspaceNav/WorkspaceNavButton/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceNav/WorkspaceSwitcher/index.d.ts +16 -0
- package/dist/lib/components/WorkspaceNav/WorkspaceSwitcher/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceNav/index.d.ts +14 -0
- package/dist/lib/components/WorkspaceNav/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceSettingsRail/index.d.ts +14 -0
- package/dist/lib/components/WorkspaceSettingsRail/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceSettingsTabs/index.d.ts +14 -0
- package/dist/lib/components/WorkspaceSettingsTabs/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceSettingsTopBar/index.d.ts +8 -0
- package/dist/lib/components/WorkspaceSettingsTopBar/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/NewWorkspaceButton/index.d.ts +7 -0
- package/dist/lib/components/WorkspaceShell/NewWorkspaceButton/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/RailTooltip/index.d.ts +22 -0
- package/dist/lib/components/WorkspaceShell/RailTooltip/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceRail/index.d.ts +17 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceRail/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSidebarButton/index.d.ts +17 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSidebarButton/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSwitcher/WorkspaceSwitcherPopover/index.d.ts +26 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSwitcher/WorkspaceSwitcherPopover/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSwitcher/index.d.ts +17 -0
- package/dist/lib/components/WorkspaceShell/WorkspaceSwitcher/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceShell/index.d.ts +16 -0
- package/dist/lib/components/WorkspaceShell/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceStats/index.d.ts +9 -0
- package/dist/lib/components/WorkspaceStats/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspaceToolbar/index.d.ts +22 -0
- package/dist/lib/components/WorkspaceToolbar/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspacesEmpty/index.d.ts +18 -0
- package/dist/lib/components/WorkspacesEmpty/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspacesHomePanel/index.d.ts +7 -0
- package/dist/lib/components/WorkspacesHomePanel/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspacesNavSection/index.d.ts +9 -0
- package/dist/lib/components/WorkspacesNavSection/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspacesSkeleton/index.d.ts +36 -0
- package/dist/lib/components/WorkspacesSkeleton/index.d.ts.map +1 -0
- package/dist/lib/components/WorkspacesTable/index.d.ts +12 -0
- package/dist/lib/components/WorkspacesTable/index.d.ts.map +1 -0
- package/dist/lib/domain/isActiveWorkspace/index.d.ts +9 -0
- package/dist/lib/domain/isActiveWorkspace/index.d.ts.map +1 -0
- package/dist/lib/domain/isActiveWorkspace/index.js +9 -0
- package/dist/lib/domain/permissions/index.d.ts +7 -0
- package/dist/lib/domain/permissions/index.d.ts.map +1 -0
- package/dist/lib/domain/permissions/index.js +6 -0
- package/dist/lib/domain/resourceSelection/index.d.ts +18 -0
- package/dist/lib/domain/resourceSelection/index.d.ts.map +1 -0
- package/dist/lib/domain/resourceSelection/index.js +49 -0
- package/dist/lib/domain/slug/index.d.ts +25 -0
- package/dist/lib/domain/slug/index.d.ts.map +1 -0
- package/dist/lib/domain/slug/index.js +45 -0
- package/dist/lib/domain/types/wizard/index.d.ts +126 -0
- package/dist/lib/domain/types/wizard/index.d.ts.map +1 -0
- package/dist/lib/domain/types/wizard/index.js +21 -0
- package/dist/lib/domain/types/workspace/index.d.ts +42 -0
- package/dist/lib/domain/types/workspace/index.d.ts.map +1 -0
- package/dist/lib/domain/types/workspace/index.js +1 -0
- package/dist/lib/domain/workspaceLimits/index.d.ts +23 -0
- package/dist/lib/domain/workspaceLimits/index.d.ts.map +1 -0
- package/dist/lib/domain/workspaceLimits/index.js +22 -0
- package/dist/lib/hooks/useBasicsSchema/index.d.ts +14 -0
- package/dist/lib/hooks/useBasicsSchema/index.d.ts.map +1 -0
- package/dist/lib/hooks/useResourceSelection/index.d.ts +21 -0
- package/dist/lib/hooks/useResourceSelection/index.d.ts.map +1 -0
- package/dist/lib/hooks/useSlug/index.d.ts +28 -0
- package/dist/lib/hooks/useSlug/index.d.ts.map +1 -0
- package/dist/lib/hooks/useWizard/index.d.ts +57 -0
- package/dist/lib/hooks/useWizard/index.d.ts.map +1 -0
- package/dist/lib/hooks/useWorkspaceProfileSchema/index.d.ts +13 -0
- package/dist/lib/hooks/useWorkspaceProfileSchema/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/buildCreateWorkspaceBody/index.d.ts +12 -0
- package/dist/lib/infrastructure/buildCreateWorkspaceBody/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/buildCreateWorkspaceBody/index.js +27 -0
- package/dist/lib/infrastructure/httpWorkspaceGateway/index.d.ts +10 -0
- package/dist/lib/infrastructure/httpWorkspaceGateway/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/httpWorkspaceGateway/index.js +149 -0
- package/dist/lib/infrastructure/isConflict/index.d.ts +8 -0
- package/dist/lib/infrastructure/isConflict/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/isConflict/index.js +12 -0
- package/dist/lib/infrastructure/workspaceGateway/index.d.ts +90 -0
- package/dist/lib/infrastructure/workspaceGateway/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/workspaceGateway/index.js +1 -0
- package/dist/lib/infrastructure/workspaceMapper/index.d.ts +28 -0
- package/dist/lib/infrastructure/workspaceMapper/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/workspaceMapper/index.js +36 -0
- package/dist/lib/pages/CreateWorkspacePage/index.d.ts +7 -0
- package/dist/lib/pages/CreateWorkspacePage/index.d.ts.map +1 -0
- package/dist/lib/pages/WorkspaceSettingsPage/index.d.ts +12 -0
- package/dist/lib/pages/WorkspaceSettingsPage/index.d.ts.map +1 -0
- package/dist/lib/pages/WorkspacesPage/index.d.ts +7 -0
- package/dist/lib/pages/WorkspacesPage/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/BlockingConfirmDialog/index.d.ts +41 -0
- package/dist/lib/presentation/components/BlockingConfirmDialog/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/BlockingConfirmDialog/index.js +17 -0
- package/dist/lib/presentation/components/ColorSwatchRow/index.d.ts +22 -0
- package/dist/lib/presentation/components/ColorSwatchRow/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/ColorSwatchRow/index.js +70 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts +11 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.js +47 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.d.ts +48 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.js +32 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/index.d.ts +23 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/index.js +128 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/IdentityFields/index.d.ts +17 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/IdentityFields/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/IdentityFields/index.js +70 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberRow/index.d.ts +14 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberRow/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberRow/index.js +25 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberTypeahead/index.d.ts +15 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberTypeahead/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/MemberTypeahead/index.js +112 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/index.d.ts +17 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/MembersStep/index.js +35 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/Monogram/index.d.ts +17 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/Monogram/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/Monogram/index.js +11 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/SlugField/index.d.ts +23 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/SlugField/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/CreateWorkspaceWizard/SlugField/index.js +68 -0
- package/dist/lib/presentation/components/StatusChip/index.d.ts +9 -0
- package/dist/lib/presentation/components/StatusChip/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/StatusChip/index.js +23 -0
- package/dist/lib/presentation/components/WorkspaceAvatar/index.d.ts +20 -0
- package/dist/lib/presentation/components/WorkspaceAvatar/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceAvatar/index.js +10 -0
- package/dist/lib/presentation/components/WorkspaceCommands/index.d.ts +8 -0
- package/dist/lib/presentation/components/WorkspaceCommands/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceCommands/index.js +34 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/AddContentDialog/index.d.ts +26 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/AddContentDialog/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/AddContentDialog/index.js +89 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentGroup/index.d.ts +21 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentGroup/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentGroup/index.js +11 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentRow/index.d.ts +26 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentRow/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/GrantedContentRow/index.js +31 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/RemoveContentDialog/index.d.ts +25 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/RemoveContentDialog/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/RemoveContentDialog/index.js +48 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/index.d.ts +25 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceContentSettings/index.js +173 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/DeleteWorkspaceDialog/index.d.ts +22 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/DeleteWorkspaceDialog/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/DeleteWorkspaceDialog/index.js +52 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/index.d.ts +18 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceDangerSettings/index.js +150 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/WorkspaceIdField/index.d.ts +19 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/WorkspaceIdField/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/WorkspaceIdField/index.js +72 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/index.d.ts +18 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceGeneralSettings/index.js +131 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberDirectorySearch/index.d.ts +18 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberDirectorySearch/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberDirectorySearch/index.js +65 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberListRow/index.d.ts +17 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberListRow/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/MemberListRow/index.js +22 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/index.d.ts +16 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceMembersSettings/index.js +127 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceNavButton/index.d.ts +14 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceNavButton/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceNavButton/index.js +30 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceSwitcher/index.d.ts +16 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceSwitcher/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceNav/WorkspaceSwitcher/index.js +81 -0
- package/dist/lib/presentation/components/WorkspaceNav/index.d.ts +14 -0
- package/dist/lib/presentation/components/WorkspaceNav/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceNav/index.js +51 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTabs/index.d.ts +14 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTabs/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTabs/index.js +66 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTopBar/index.d.ts +8 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTopBar/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceSettingsTopBar/index.js +57 -0
- package/dist/lib/presentation/components/WorkspaceShell/index.d.ts +16 -0
- package/dist/lib/presentation/components/WorkspaceShell/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceShell/index.js +100 -0
- package/dist/lib/presentation/components/WorkspaceStats/index.d.ts +9 -0
- package/dist/lib/presentation/components/WorkspaceStats/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceStats/index.js +48 -0
- package/dist/lib/presentation/components/WorkspaceToolbar/index.d.ts +22 -0
- package/dist/lib/presentation/components/WorkspaceToolbar/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspaceToolbar/index.js +73 -0
- package/dist/lib/presentation/components/WorkspacesEmpty/index.d.ts +18 -0
- package/dist/lib/presentation/components/WorkspacesEmpty/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspacesEmpty/index.js +42 -0
- package/dist/lib/presentation/components/WorkspacesHomePanel/index.d.ts +7 -0
- package/dist/lib/presentation/components/WorkspacesHomePanel/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspacesHomePanel/index.js +50 -0
- package/dist/lib/presentation/components/WorkspacesNavSection/index.d.ts +15 -0
- package/dist/lib/presentation/components/WorkspacesNavSection/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspacesNavSection/index.js +76 -0
- package/dist/lib/presentation/components/WorkspacesSkeleton/index.d.ts +49 -0
- package/dist/lib/presentation/components/WorkspacesSkeleton/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspacesSkeleton/index.js +94 -0
- package/dist/lib/presentation/components/WorkspacesTable/index.d.ts +12 -0
- package/dist/lib/presentation/components/WorkspacesTable/index.d.ts.map +1 -0
- package/dist/lib/presentation/components/WorkspacesTable/index.js +58 -0
- package/dist/lib/presentation/currentWorkspace/index.d.ts +17 -0
- package/dist/lib/presentation/currentWorkspace/index.d.ts.map +1 -0
- package/dist/lib/presentation/currentWorkspace/index.js +44 -0
- package/dist/lib/presentation/hooks/useBasicsSchema/index.d.ts +17 -0
- package/dist/lib/presentation/hooks/useBasicsSchema/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useBasicsSchema/index.js +71 -0
- package/dist/lib/presentation/hooks/useComboboxList/index.d.ts +44 -0
- package/dist/lib/presentation/hooks/useComboboxList/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useComboboxList/index.js +62 -0
- package/dist/lib/presentation/hooks/useRedirectNotice/index.d.ts +24 -0
- package/dist/lib/presentation/hooks/useRedirectNotice/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useRedirectNotice/index.js +37 -0
- package/dist/lib/presentation/hooks/useResourceSelection/index.d.ts +21 -0
- package/dist/lib/presentation/hooks/useResourceSelection/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useResourceSelection/index.js +16 -0
- package/dist/lib/presentation/hooks/useSlug/index.d.ts +28 -0
- package/dist/lib/presentation/hooks/useSlug/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useSlug/index.js +18 -0
- package/dist/lib/presentation/hooks/useWizard/index.d.ts +60 -0
- package/dist/lib/presentation/hooks/useWizard/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useWizard/index.js +93 -0
- package/dist/lib/presentation/hooks/useWorkspaceProfileSchema/index.d.ts +16 -0
- package/dist/lib/presentation/hooks/useWorkspaceProfileSchema/index.d.ts.map +1 -0
- package/dist/lib/presentation/hooks/useWorkspaceProfileSchema/index.js +53 -0
- package/dist/lib/presentation/pages/CreateWorkspacePage/index.d.ts +7 -0
- package/dist/lib/presentation/pages/CreateWorkspacePage/index.d.ts.map +1 -0
- package/dist/lib/presentation/pages/CreateWorkspacePage/index.js +248 -0
- package/dist/lib/presentation/pages/WorkspaceSettingsPage/index.d.ts +12 -0
- package/dist/lib/presentation/pages/WorkspaceSettingsPage/index.d.ts.map +1 -0
- package/dist/lib/presentation/pages/WorkspaceSettingsPage/index.js +69 -0
- package/dist/lib/presentation/pages/WorkspacesPage/index.d.ts +7 -0
- package/dist/lib/presentation/pages/WorkspacesPage/index.d.ts.map +1 -0
- package/dist/lib/presentation/pages/WorkspacesPage/index.js +112 -0
- package/dist/lib/presentation/slots/workspaceSlots/index.d.ts +101 -0
- package/dist/lib/presentation/slots/workspaceSlots/index.d.ts.map +1 -0
- package/dist/lib/presentation/slots/workspaceSlots/index.js +25 -0
- package/dist/lib/presentation/workspacesPlugin/index.d.ts +31 -0
- package/dist/lib/presentation/workspacesPlugin/index.d.ts.map +1 -0
- package/dist/lib/presentation/workspacesPlugin/index.js +151 -0
- package/dist/lib/slots/workspaceSlots/index.d.ts +101 -0
- package/dist/lib/slots/workspaceSlots/index.d.ts.map +1 -0
- package/dist/lib/types/wizard/index.d.ts +119 -0
- package/dist/lib/types/wizard/index.d.ts.map +1 -0
- package/dist/lib/types/workspace/index.d.ts +42 -0
- package/dist/lib/types/workspace/index.d.ts.map +1 -0
- package/dist/lib/utils/buildCreateWorkspaceBody/index.d.ts +12 -0
- package/dist/lib/utils/buildCreateWorkspaceBody/index.d.ts.map +1 -0
- package/dist/lib/utils/currentWorkspace/index.d.ts +17 -0
- package/dist/lib/utils/currentWorkspace/index.d.ts.map +1 -0
- package/dist/lib/utils/isActiveWorkspace/index.d.ts +9 -0
- package/dist/lib/utils/isActiveWorkspace/index.d.ts.map +1 -0
- package/dist/lib/utils/isConflict/index.d.ts +8 -0
- package/dist/lib/utils/isConflict/index.d.ts.map +1 -0
- package/dist/lib/utils/permissions/index.d.ts +7 -0
- package/dist/lib/utils/permissions/index.d.ts.map +1 -0
- package/dist/lib/utils/radioGroupKeydown/index.d.ts +15 -0
- package/dist/lib/utils/radioGroupKeydown/index.d.ts.map +1 -0
- package/dist/lib/utils/resourceSelection/index.d.ts +18 -0
- package/dist/lib/utils/resourceSelection/index.d.ts.map +1 -0
- package/dist/lib/utils/workspacesPlugin/index.d.ts +31 -0
- package/dist/lib/utils/workspacesPlugin/index.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The home dashboard's workspace stat tiles: active-workspace count, the number
|
|
3
|
+
* of distinct members across all workspaces, and the number of distinct content
|
|
4
|
+
* types granted — all derived from the real `GET /api/workspaces` payload (no
|
|
5
|
+
* separate metrics API yet). Rendered as a `display: contents` group so the
|
|
6
|
+
* three tiles flow directly into the home page's stat grid.
|
|
7
|
+
*/
|
|
8
|
+
export declare function WorkspaceStats(): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspaceStats/index.tsx"],"names":[],"mappings":"AA6BA;;;;;;GAMG;AACH,wBAAgB,cAAc,gCA2C7B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
+
import { FileStack, Layers, Users } from 'lucide-react';
|
|
4
|
+
import { StatTile } from '@orthacms/design-system';
|
|
5
|
+
import { useWorkspaces } from '../../../application/useWorkspaces';
|
|
6
|
+
import { isActiveWorkspace } from '../../../domain/isActiveWorkspace';
|
|
7
|
+
/** Intl descriptors for {@link WorkspaceStats}, co-located here. */
|
|
8
|
+
const messages = defineMessages({
|
|
9
|
+
activeWorkspaces: {
|
|
10
|
+
id: 'workspaces.stats.active',
|
|
11
|
+
defaultMessage: 'Active workspaces'
|
|
12
|
+
},
|
|
13
|
+
members: {
|
|
14
|
+
id: 'workspaces.stats.members',
|
|
15
|
+
defaultMessage: 'Members'
|
|
16
|
+
},
|
|
17
|
+
contentTypes: {
|
|
18
|
+
id: 'workspaces.stats.contentTypes',
|
|
19
|
+
defaultMessage: 'Content types'
|
|
20
|
+
},
|
|
21
|
+
error: {
|
|
22
|
+
id: 'workspaces.stats.error',
|
|
23
|
+
defaultMessage: 'Couldn’t load workspace stats.'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
/** A placeholder shown for a metric while the list query is in flight. */
|
|
27
|
+
const LOADING = '—';
|
|
28
|
+
/**
|
|
29
|
+
* The home dashboard's workspace stat tiles: active-workspace count, the number
|
|
30
|
+
* of distinct members across all workspaces, and the number of distinct content
|
|
31
|
+
* types granted — all derived from the real `GET /api/workspaces` payload (no
|
|
32
|
+
* separate metrics API yet). Rendered as a `display: contents` group so the
|
|
33
|
+
* three tiles flow directly into the home page's stat grid.
|
|
34
|
+
*/
|
|
35
|
+
export function WorkspaceStats() {
|
|
36
|
+
const intl = useIntl();
|
|
37
|
+
const { data: workspaces, isPending, isError } = useWorkspaces();
|
|
38
|
+
// A failed load must not read as real zeros — surface it distinctly so the
|
|
39
|
+
// operator doesn't mistake "couldn't load" for "nothing here".
|
|
40
|
+
if (isError) {
|
|
41
|
+
return (_jsx("p", { role: "alert", className: "col-span-full rounded-xl border border-destructive/40 bg-destructive/5 px-4 py-3 text-sm text-destructive", children: intl.formatMessage(messages.error) }));
|
|
42
|
+
}
|
|
43
|
+
const active = workspaces?.filter(isActiveWorkspace).length ?? 0;
|
|
44
|
+
const members = new Set((workspaces ?? []).flatMap((w) => w.members.map((m) => m.id))).size;
|
|
45
|
+
const contentTypes = new Set((workspaces ?? []).flatMap((w) => w.content))
|
|
46
|
+
.size;
|
|
47
|
+
return (_jsxs("div", { className: "contents", children: [_jsx(StatTile, { value: isPending ? LOADING : active, label: intl.formatMessage(messages.activeWorkspaces), icon: Layers }), _jsx(StatTile, { value: isPending ? LOADING : members, label: intl.formatMessage(messages.members), icon: Users }), _jsx(StatTile, { value: isPending ? LOADING : contentTypes, label: intl.formatMessage(messages.contentTypes), icon: FileStack })] }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The status the list is filtered by. `Active` is the default view. */
|
|
2
|
+
export type StatusFilter = 'All' | 'Active' | 'Archived';
|
|
3
|
+
/** The default status filter. */
|
|
4
|
+
export declare const DEFAULT_STATUS: StatusFilter;
|
|
5
|
+
type WorkspaceToolbarProps = {
|
|
6
|
+
search: string;
|
|
7
|
+
onSearchChange: (value: string) => void;
|
|
8
|
+
status: StatusFilter;
|
|
9
|
+
onStatusChange: (value: StatusFilter) => void;
|
|
10
|
+
/** How many workspaces fall under each status (for the chip counts). */
|
|
11
|
+
counts: Record<StatusFilter, number>;
|
|
12
|
+
shown: number;
|
|
13
|
+
total: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The list toolbar: a search box, the status filter as a segmented chip group
|
|
17
|
+
* (All / Active / Archived, each badged with its count), and a live
|
|
18
|
+
* "{shown} of {total}" count. Wraps to multiple rows on narrow viewports.
|
|
19
|
+
*/
|
|
20
|
+
export declare function WorkspaceToolbar({ search, onSearchChange, status, onStatusChange, counts, shown, total }: WorkspaceToolbarProps): import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspaceToolbar/index.tsx"],"names":[],"mappings":"AAWA,wEAAwE;AACxE,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEzD,iCAAiC;AACjC,eAAO,MAAM,cAAc,EAAE,YAAuB,CAAC;AA8CrD,KAAK,qBAAqB,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,MAAM,EACN,cAAc,EACd,MAAM,EACN,cAAc,EACd,MAAM,EACN,KAAK,EACL,KAAK,EACR,EAAE,qBAAqB,+BAyEvB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
+
import { Search } from 'lucide-react';
|
|
4
|
+
import { InputGroup, InputGroupAddon, InputGroupInput, SegmentedControl, SegmentedControlCount, SegmentedControlItem } from '@orthacms/design-system';
|
|
5
|
+
/** The default status filter. */
|
|
6
|
+
export const DEFAULT_STATUS = 'Active';
|
|
7
|
+
/** Intl descriptors for {@link WorkspaceToolbar}, co-located with the component. */
|
|
8
|
+
const messages = defineMessages({
|
|
9
|
+
searchLabel: {
|
|
10
|
+
id: 'workspaces.toolbar.searchLabel',
|
|
11
|
+
defaultMessage: 'Search workspaces'
|
|
12
|
+
},
|
|
13
|
+
searchPlaceholder: {
|
|
14
|
+
id: 'workspaces.toolbar.searchPlaceholder',
|
|
15
|
+
defaultMessage: 'Search workspaces'
|
|
16
|
+
},
|
|
17
|
+
statusLegend: {
|
|
18
|
+
id: 'workspaces.toolbar.statusLegend',
|
|
19
|
+
defaultMessage: 'Filter by status'
|
|
20
|
+
},
|
|
21
|
+
statusAll: {
|
|
22
|
+
id: 'workspaces.toolbar.statusAll',
|
|
23
|
+
defaultMessage: 'All'
|
|
24
|
+
},
|
|
25
|
+
statusActive: {
|
|
26
|
+
id: 'workspaces.toolbar.statusActive',
|
|
27
|
+
defaultMessage: 'Active'
|
|
28
|
+
},
|
|
29
|
+
statusArchived: {
|
|
30
|
+
id: 'workspaces.toolbar.statusArchived',
|
|
31
|
+
defaultMessage: 'Archived'
|
|
32
|
+
},
|
|
33
|
+
count: {
|
|
34
|
+
id: 'workspaces.toolbar.count',
|
|
35
|
+
defaultMessage: '{shown} of {total}'
|
|
36
|
+
},
|
|
37
|
+
countAnnouncement: {
|
|
38
|
+
id: 'workspaces.toolbar.countAnnouncement',
|
|
39
|
+
defaultMessage: '{shown, plural, one {# workspace shown} other {# workspaces shown}} of {total}.'
|
|
40
|
+
},
|
|
41
|
+
statusOption: {
|
|
42
|
+
id: 'workspaces.toolbar.statusOption',
|
|
43
|
+
defaultMessage: '{label}, {count, plural, one {# workspace} other {# workspaces}}'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const STATUS_OPTIONS = ['All', 'Active', 'Archived'];
|
|
47
|
+
/**
|
|
48
|
+
* The list toolbar: a search box, the status filter as a segmented chip group
|
|
49
|
+
* (All / Active / Archived, each badged with its count), and a live
|
|
50
|
+
* "{shown} of {total}" count. Wraps to multiple rows on narrow viewports.
|
|
51
|
+
*/
|
|
52
|
+
export function WorkspaceToolbar({ search, onSearchChange, status, onStatusChange, counts, shown, total }) {
|
|
53
|
+
const intl = useIntl();
|
|
54
|
+
const statusLabel = {
|
|
55
|
+
All: intl.formatMessage(messages.statusAll),
|
|
56
|
+
Active: intl.formatMessage(messages.statusActive),
|
|
57
|
+
Archived: intl.formatMessage(messages.statusArchived)
|
|
58
|
+
};
|
|
59
|
+
return (_jsxs("div", { className: "mb-4 flex flex-wrap items-center gap-3", children: [_jsxs(InputGroup, { className: "w-full shadow-none sm:max-w-[360px]", children: [_jsx(InputGroupAddon, { children: _jsx(Search, {}) }), _jsx(InputGroupInput, { type: "search", value: search, onChange: (event) => onSearchChange(event.target.value), "aria-label": intl.formatMessage(messages.searchLabel), placeholder: intl.formatMessage(messages.searchPlaceholder) })] }), _jsx(SegmentedControl, { value: status,
|
|
60
|
+
// Radix single-toggle can emit '' when the active chip is
|
|
61
|
+
// re-clicked; ignore that so a status is always selected.
|
|
62
|
+
onValueChange: (value) => {
|
|
63
|
+
if (value) {
|
|
64
|
+
onStatusChange(value);
|
|
65
|
+
}
|
|
66
|
+
}, "aria-label": intl.formatMessage(messages.statusLegend), children: STATUS_OPTIONS.map((option) => (_jsxs(SegmentedControlItem, { value: option, "aria-label": intl.formatMessage(messages.statusOption, {
|
|
67
|
+
label: statusLabel[option],
|
|
68
|
+
count: counts[option]
|
|
69
|
+
}), children: [statusLabel[option], _jsx(SegmentedControlCount, { "aria-hidden": true, children: counts[option] })] }, option))) }), _jsx("span", { "aria-hidden": true, className: "ml-auto text-sm text-muted-foreground", children: intl.formatMessage(messages.count, { shown, total }) }), _jsx("span", { role: "status", "aria-live": "polite", className: "sr-only", children: intl.formatMessage(messages.countAnnouncement, {
|
|
70
|
+
shown,
|
|
71
|
+
total
|
|
72
|
+
}) })] }));
|
|
73
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type WorkspacesEmptyProps = {
|
|
2
|
+
/** Whether a search or non-default filter is currently narrowing the list. */
|
|
3
|
+
filtered: boolean;
|
|
4
|
+
/** Whether the user may create a workspace (gates the create CTA). */
|
|
5
|
+
canCreate: boolean;
|
|
6
|
+
/** Resets the search and status filter back to their defaults. */
|
|
7
|
+
onClear: () => void;
|
|
8
|
+
/** Opens the create-workspace flow. */
|
|
9
|
+
onCreate: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The empty state for the grid. When filters are active it offers to clear
|
|
13
|
+
* them; otherwise it invites creating the first workspace — but only when the
|
|
14
|
+
* user holds `workspaces:create`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function WorkspacesEmpty({ filtered, canCreate, onClear, onCreate }: WorkspacesEmptyProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspacesEmpty/index.tsx"],"names":[],"mappings":"AA0CA,KAAK,oBAAoB,GAAG;IACxB,8EAA8E;IAC9E,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,SAAS,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACX,EAAE,oBAAoB,+BAwCtB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
+
import { Layers, Plus } from 'lucide-react';
|
|
4
|
+
import { Button, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@orthacms/design-system';
|
|
5
|
+
/** Intl descriptors for {@link WorkspacesEmpty}, co-located with the component. */
|
|
6
|
+
const messages = defineMessages({
|
|
7
|
+
filteredTitle: {
|
|
8
|
+
id: 'workspaces.empty.filtered.title',
|
|
9
|
+
defaultMessage: 'No workspaces match'
|
|
10
|
+
},
|
|
11
|
+
filteredDescription: {
|
|
12
|
+
id: 'workspaces.empty.filtered.description',
|
|
13
|
+
defaultMessage: 'Try a different search, or clear the filters to see them all.'
|
|
14
|
+
},
|
|
15
|
+
clear: {
|
|
16
|
+
id: 'workspaces.empty.clear',
|
|
17
|
+
defaultMessage: 'Clear filters'
|
|
18
|
+
},
|
|
19
|
+
emptyTitle: {
|
|
20
|
+
id: 'workspaces.empty.none.title',
|
|
21
|
+
defaultMessage: 'No workspaces yet'
|
|
22
|
+
},
|
|
23
|
+
emptyDescription: {
|
|
24
|
+
id: 'workspaces.empty.none.description',
|
|
25
|
+
defaultMessage: 'Create your first workspace to group content, members, and plugins.'
|
|
26
|
+
},
|
|
27
|
+
create: {
|
|
28
|
+
id: 'workspaces.empty.create',
|
|
29
|
+
defaultMessage: 'New workspace'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* The empty state for the grid. When filters are active it offers to clear
|
|
34
|
+
* them; otherwise it invites creating the first workspace — but only when the
|
|
35
|
+
* user holds `workspaces:create`.
|
|
36
|
+
*/
|
|
37
|
+
export function WorkspacesEmpty({ filtered, canCreate, onClear, onCreate }) {
|
|
38
|
+
const intl = useIntl();
|
|
39
|
+
return (_jsxs(Empty, { className: "border", children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: _jsx(Layers, {}) }), _jsx(EmptyTitle, { children: intl.formatMessage(filtered ? messages.filteredTitle : messages.emptyTitle) }), _jsx(EmptyDescription, { children: intl.formatMessage(filtered
|
|
40
|
+
? messages.filteredDescription
|
|
41
|
+
: messages.emptyDescription) })] }), _jsx(EmptyContent, { children: filtered ? (_jsx(Button, { variant: "outline", className: "shadow-none", onClick: onClear, children: intl.formatMessage(messages.clear) })) : canCreate ? (_jsxs(Button, { onClick: onCreate, children: [_jsx(Plus, {}), intl.formatMessage(messages.create)] })) : null })] }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The home dashboard's Workspaces panel: a preview list of the active
|
|
3
|
+
* workspaces (each a link into its shell) with a "View all" link to the full
|
|
4
|
+
* list. Backed by the real `GET /api/workspaces`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function WorkspacesHomePanel(): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspacesHomePanel/index.tsx"],"names":[],"mappings":"AA2CA;;;;GAIG;AACH,wBAAgB,mBAAmB,gCA+ElC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { ChevronRight } from 'lucide-react';
|
|
5
|
+
import { Card, CardContent, CardHeader, CardTitle, Skeleton } from '@orthacms/design-system';
|
|
6
|
+
import { initialsOf } from '@orthacms/utils-admin';
|
|
7
|
+
import { useWorkspaces } from '../../../application/useWorkspaces';
|
|
8
|
+
import { isActiveWorkspace } from '../../../domain/isActiveWorkspace';
|
|
9
|
+
import { WorkspaceAvatar } from '../WorkspaceAvatar';
|
|
10
|
+
/** Intl descriptors for {@link WorkspacesHomePanel}, co-located here. */
|
|
11
|
+
const messages = defineMessages({
|
|
12
|
+
title: {
|
|
13
|
+
id: 'workspaces.home.title',
|
|
14
|
+
defaultMessage: 'Workspaces'
|
|
15
|
+
},
|
|
16
|
+
viewAll: {
|
|
17
|
+
id: 'workspaces.home.viewAll',
|
|
18
|
+
defaultMessage: 'View all'
|
|
19
|
+
},
|
|
20
|
+
meta: {
|
|
21
|
+
id: 'workspaces.home.meta',
|
|
22
|
+
defaultMessage: '{members, plural, one {# member} other {# members}} · {types, plural, one {# type} other {# types}}'
|
|
23
|
+
},
|
|
24
|
+
empty: {
|
|
25
|
+
id: 'workspaces.home.empty',
|
|
26
|
+
defaultMessage: 'No workspaces yet.'
|
|
27
|
+
},
|
|
28
|
+
error: {
|
|
29
|
+
id: 'workspaces.home.error',
|
|
30
|
+
defaultMessage: 'Couldn’t load workspaces.'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
/** How many workspaces the home panel previews before "View all". */
|
|
34
|
+
const PREVIEW_LIMIT = 5;
|
|
35
|
+
/**
|
|
36
|
+
* The home dashboard's Workspaces panel: a preview list of the active
|
|
37
|
+
* workspaces (each a link into its shell) with a "View all" link to the full
|
|
38
|
+
* list. Backed by the real `GET /api/workspaces`.
|
|
39
|
+
*/
|
|
40
|
+
export function WorkspacesHomePanel() {
|
|
41
|
+
const intl = useIntl();
|
|
42
|
+
const { data: workspaces, isPending, isError } = useWorkspaces();
|
|
43
|
+
const active = (workspaces ?? [])
|
|
44
|
+
.filter(isActiveWorkspace)
|
|
45
|
+
.slice(0, PREVIEW_LIMIT);
|
|
46
|
+
return (_jsxs(Card, { className: "shadow-none", children: [_jsxs(CardHeader, { className: "flex-row items-center justify-between gap-2 space-y-0", children: [_jsx(CardTitle, { asChild: true, className: "text-base", children: _jsx("h2", { children: intl.formatMessage(messages.title) }) }), _jsx(Link, { to: "/workspaces", className: "text-sm text-muted-foreground transition-colors hover:text-foreground", children: intl.formatMessage(messages.viewAll) })] }), _jsx(CardContent, { className: "flex flex-col gap-1", children: isPending ? (Array.from({ length: 3 }).map((_, index) => (_jsxs("div", { className: "flex items-center gap-3 rounded-lg px-2 py-2", children: [_jsx(Skeleton, { className: "size-9 shrink-0 rounded-lg" }), _jsxs("div", { className: "flex flex-1 flex-col gap-1.5", children: [_jsx(Skeleton, { className: "h-4 w-32" }), _jsx(Skeleton, { className: "h-3 w-40" })] })] }, index)))) : isError ? (_jsx("p", { role: "alert", className: "px-2 py-6 text-center text-sm text-destructive", children: intl.formatMessage(messages.error) })) : active.length === 0 ? (_jsx("p", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: intl.formatMessage(messages.empty) })) : (active.map((workspace) => (_jsxs(Link, { to: `/workspaces/${workspace.id}`, className: "flex items-center gap-3 rounded-lg px-2 py-2 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [_jsx(WorkspaceAvatar, { initials: initialsOf(workspace.name), color: workspace.color, className: "size-9 shrink-0 rounded-lg text-xs" }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium", children: workspace.name }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: intl.formatMessage(messages.meta, {
|
|
47
|
+
members: workspace.members.length,
|
|
48
|
+
types: workspace.content.length
|
|
49
|
+
}) })] }), _jsx(ChevronRight, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true })] }, workspace.id)))) })] }));
|
|
50
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Workspaces" quick-list in the global sidebar: the active workspaces as
|
|
3
|
+
* direct links, so a member can jump into one without the Workspaces list page.
|
|
4
|
+
* Contributed to the shell's `SIDEBAR_SECTION_SLOT` by `workspaces-admin`.
|
|
5
|
+
* Renders nothing while loading or when there are no active workspaces, so it
|
|
6
|
+
* never shows an empty section.
|
|
7
|
+
*
|
|
8
|
+
* The heading doubles as a **collapse trigger** (Radix `Collapsible`, so
|
|
9
|
+
* `aria-expanded` + `data-state` come for free), open by default: with a long
|
|
10
|
+
* membership the list crowded out the sections below it in the sidebar. With no
|
|
11
|
+
* rows to reveal — loading, or create permission but no workspaces yet — the
|
|
12
|
+
* heading stays a plain label and no `Collapsible` is rendered at all.
|
|
13
|
+
*/
|
|
14
|
+
export declare function WorkspacesNavSection(): import("react").JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspacesNavSection/index.tsx"],"names":[],"mappings":"AA8DA;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,uCA6FnC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link, useMatch } from 'react-router-dom';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { ChevronRight, Plus } from 'lucide-react';
|
|
5
|
+
import { useHasPermission } from '@orthacms/identity-admin';
|
|
6
|
+
import { initialsOf } from '@orthacms/utils-admin';
|
|
7
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@orthacms/design-system';
|
|
8
|
+
import { useWorkspaces } from '../../../application/useWorkspaces';
|
|
9
|
+
import { isActiveWorkspace } from '../../../domain/isActiveWorkspace';
|
|
10
|
+
import { WORKSPACES_CREATE } from '../../../domain/permissions';
|
|
11
|
+
import { WorkspaceAvatar } from '../WorkspaceAvatar';
|
|
12
|
+
/** Intl descriptors for {@link WorkspacesNavSection}, co-located here. */
|
|
13
|
+
const messages = defineMessages({
|
|
14
|
+
heading: {
|
|
15
|
+
id: 'workspaces.sidebar.heading',
|
|
16
|
+
defaultMessage: 'Workspaces'
|
|
17
|
+
},
|
|
18
|
+
newWorkspace: {
|
|
19
|
+
id: 'workspaces.sidebar.newWorkspace',
|
|
20
|
+
defaultMessage: 'New workspace'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
/** One workspace row: a link to the workspace, active on any of its sub-paths. */
|
|
24
|
+
function WorkspaceNavRow({ workspace }) {
|
|
25
|
+
const match = useMatch(`/workspaces/${workspace.id}/*`);
|
|
26
|
+
return (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, isActive: Boolean(match), tooltip: workspace.name, children: _jsxs(Link, { to: `/workspaces/${workspace.id}`, "aria-current": match ? 'page' : undefined, children: [_jsx(WorkspaceAvatar, { initials: initialsOf(workspace.name), color: workspace.color, className: "size-5 rounded-[5px] text-[10px]" }), _jsx("span", { children: workspace.name })] }) }) }));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The "Workspaces" quick-list in the global sidebar: the active workspaces as
|
|
30
|
+
* direct links, so a member can jump into one without the Workspaces list page.
|
|
31
|
+
* Contributed to the shell's `SIDEBAR_SECTION_SLOT` by `workspaces-admin`.
|
|
32
|
+
* Renders nothing while loading or when there are no active workspaces, so it
|
|
33
|
+
* never shows an empty section.
|
|
34
|
+
*
|
|
35
|
+
* The heading doubles as a **collapse trigger** (Radix `Collapsible`, so
|
|
36
|
+
* `aria-expanded` + `data-state` come for free), open by default: with a long
|
|
37
|
+
* membership the list crowded out the sections below it in the sidebar. With no
|
|
38
|
+
* rows to reveal — loading, or create permission but no workspaces yet — the
|
|
39
|
+
* heading stays a plain label and no `Collapsible` is rendered at all.
|
|
40
|
+
*/
|
|
41
|
+
export function WorkspacesNavSection() {
|
|
42
|
+
const intl = useIntl();
|
|
43
|
+
const { data: workspaces } = useWorkspaces();
|
|
44
|
+
const canCreate = useHasPermission(WORKSPACES_CREATE);
|
|
45
|
+
const active = (workspaces ?? []).filter(isActiveWorkspace);
|
|
46
|
+
// Nothing to show and nothing to do → skip the section entirely. With create
|
|
47
|
+
// permission we still show it (the "+" invites creating the first one).
|
|
48
|
+
if (active.length === 0 && !canCreate) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const heading = intl.formatMessage(messages.heading);
|
|
52
|
+
const newWorkspace = intl.formatMessage(messages.newWorkspace);
|
|
53
|
+
const createAction = canCreate ? (_jsx(SidebarGroupAction, { asChild: true, title: newWorkspace, children: _jsx(Link, { to: "/workspaces/new", "aria-label": newWorkspace, children: _jsx(Plus, {}) }) })) : null;
|
|
54
|
+
// Nothing to reveal (create permission but no workspaces yet, and every
|
|
55
|
+
// moment the list query is still in flight) → a plain heading, no
|
|
56
|
+
// Collapsible at all. Two reasons, and the second is the load-bearing one:
|
|
57
|
+
//
|
|
58
|
+
// 1. A disclosure whose body is empty is not a control.
|
|
59
|
+
// 2. Radix puts `aria-controls={contentId}` on the trigger **whenever it is
|
|
60
|
+
// open** — and this group is `defaultOpen`. With the content not
|
|
61
|
+
// mounted that idref dangles, which axe flags as `aria-valid-attr-value`
|
|
62
|
+
// (critical) on every page carrying the sidebar. Marking the trigger
|
|
63
|
+
// `disabled` does not help: Radix keys the attribute off `open`, not off
|
|
64
|
+
// `disabled`. The closed case is safe for the same reason — closed means
|
|
65
|
+
// no `aria-controls` at all.
|
|
66
|
+
if (active.length === 0) {
|
|
67
|
+
return (_jsxs(SidebarGroup, { children: [_jsx(SidebarGroupLabel, { children: heading }), createAction] }));
|
|
68
|
+
}
|
|
69
|
+
return (
|
|
70
|
+
// `defaultOpen`: the quick-list is a primary nav aid, so it starts
|
|
71
|
+
// expanded and the collapse is an opt-out. The choice is deliberately
|
|
72
|
+
// **not** persisted — the shell already owns one cookie-backed sidebar
|
|
73
|
+
// state, and a second, per-section one is scope this section doesn't
|
|
74
|
+
// need.
|
|
75
|
+
_jsx(Collapsible, { defaultOpen: true, className: "group/workspaces", children: _jsxs(SidebarGroup, { children: [_jsx(SidebarGroupLabel, { asChild: true, className: "w-fit gap-1 pr-1 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground [&>svg]:size-3.5", children: _jsxs(CollapsibleTrigger, { children: [_jsx(ChevronRight, { "aria-hidden": true, className: "transition-transform duration-200 group-data-[state=open]/workspaces:rotate-90" }), heading] }) }), createAction, _jsx(CollapsibleContent, { children: _jsx(SidebarGroupContent, { children: _jsx("nav", { "aria-label": heading, children: _jsx(SidebarMenu, { children: active.map((workspace) => (_jsx(WorkspaceNavRow, { workspace: workspace }, workspace.id))) }) }) }) })] }) }));
|
|
76
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The table placeholder shown while {@link useWorkspaces} resolves. Drops into
|
|
3
|
+
* the page body in place of the real table (header + toolbar stay live), so it
|
|
4
|
+
* owns the single `role="status"` announcement; the rows themselves are
|
|
5
|
+
* `aria-hidden`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function WorkspacesTableSkeleton({ count }: {
|
|
8
|
+
count?: number;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Full-page placeholder for the lazy-route `Suspense` fallback — before
|
|
12
|
+
* {@link WorkspacesPage} mounts there is no header or toolbar yet, so this
|
|
13
|
+
* sketches the whole page (header, toolbar, table) to hold the layout steady
|
|
14
|
+
* while the chunk loads. Reuses {@link WorkspacesTableSkeleton} for the body.
|
|
15
|
+
*/
|
|
16
|
+
export declare function WorkspacesPageSkeleton(): import("react").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder for the workspace shell's content area — shown both as the
|
|
19
|
+
* lazy-route `Suspense` fallback and while {@link useWorkspaces} resolves inside
|
|
20
|
+
* the shell (the per-workspace nav lives in the app sidebar, injected once the
|
|
21
|
+
* workspace resolves). Owns the single `role="status"` announcement.
|
|
22
|
+
*/
|
|
23
|
+
export declare function WorkspaceShellSkeleton(): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Lazy-route `Suspense` fallback for {@link CreateWorkspacePage}. Wraps the
|
|
26
|
+
* shared {@link WizardPageSkeleton} so the `sr-only` status stays localized.
|
|
27
|
+
*/
|
|
28
|
+
export declare function CreateWorkspacePageSkeleton(): import("react").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Section placeholder shown while {@link useContentTypes} resolves in the
|
|
31
|
+
* create-workspace wizard's "specific content" mode — two resource sections
|
|
32
|
+
* (collections and pages). Replaces the inline spinner so the step keeps its
|
|
33
|
+
* shape. Owns a single `role="status"`; the sections are `aria-hidden`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ContentTypesSkeleton(): import("react").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Full-page placeholder for the workspace-settings lazy-route `Suspense`
|
|
38
|
+
* fallback, mounted in the workspace shell at `/workspaces/:id/settings/*`.
|
|
39
|
+
*
|
|
40
|
+
* The bar is **real**, not a skeleton: it is the page's identity, it hosts the
|
|
41
|
+
* sidebar-reveal trigger when the app sidebar is collapsed, and it derives its
|
|
42
|
+
* crumbs from the URL rather than from data — so the very same
|
|
43
|
+
* {@link WorkspaceSettingsTopBar} the page renders can paint before the chunk
|
|
44
|
+
* arrives, already naming the section being opened. Below it the header, the
|
|
45
|
+
* tab bar and the section card are sketched, so the page slots into a layout
|
|
46
|
+
* that is already the right shape.
|
|
47
|
+
*/
|
|
48
|
+
export declare function WorkspaceSettingsPageSkeleton(): import("react").JSX.Element;
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspacesSkeleton/index.tsx"],"names":[],"mappings":"AA2CA;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,KAAS,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAexE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,gCAoBrC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,gCAcrC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,gCAM1C;AAuBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,gCAcnC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,gCAoD5C"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
+
import { Container, Skeleton, WizardPageSkeleton } from '@orthacms/design-system';
|
|
4
|
+
import { WorkspaceSettingsTopBar } from '../WorkspaceSettingsTopBar';
|
|
5
|
+
/** Intl descriptors for the workspaces skeletons, co-located here. */
|
|
6
|
+
const messages = defineMessages({
|
|
7
|
+
loading: {
|
|
8
|
+
id: 'workspaces.skeleton.loading',
|
|
9
|
+
defaultMessage: 'Loading workspaces…'
|
|
10
|
+
},
|
|
11
|
+
loadingForm: {
|
|
12
|
+
id: 'workspaces.skeleton.loadingForm',
|
|
13
|
+
defaultMessage: 'Loading…'
|
|
14
|
+
},
|
|
15
|
+
loadingContent: {
|
|
16
|
+
id: 'workspaces.skeleton.loadingContent',
|
|
17
|
+
defaultMessage: 'Loading content types…'
|
|
18
|
+
},
|
|
19
|
+
loadingSettings: {
|
|
20
|
+
id: 'workspaces.skeleton.loadingSettings',
|
|
21
|
+
defaultMessage: 'Loading workspace settings…'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
/** A single placeholder row mirroring {@link WorkspacesTable}'s row structure. */
|
|
25
|
+
function WorkspaceRowSkeleton() {
|
|
26
|
+
return (_jsxs("div", { className: "flex items-center gap-3 border-b px-4 py-3 last:border-b-0", children: [_jsx(Skeleton, { className: "size-9 shrink-0 rounded-xl" }), _jsxs("div", { className: "min-w-0 flex-1 flex-col gap-1.5", children: [_jsx(Skeleton, { className: "h-4 w-40" }), _jsx(Skeleton, { className: "mt-1.5 h-3 w-64 max-w-full" })] }), _jsx(Skeleton, { className: "h-4 w-20 shrink-0" }), _jsx(Skeleton, { className: "h-5 w-16 shrink-0 rounded-xl" })] }));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The table placeholder shown while {@link useWorkspaces} resolves. Drops into
|
|
30
|
+
* the page body in place of the real table (header + toolbar stay live), so it
|
|
31
|
+
* owns the single `role="status"` announcement; the rows themselves are
|
|
32
|
+
* `aria-hidden`.
|
|
33
|
+
*/
|
|
34
|
+
export function WorkspacesTableSkeleton({ count = 6 }) {
|
|
35
|
+
const intl = useIntl();
|
|
36
|
+
return (_jsxs("div", { role: "status", children: [_jsx("span", { className: "sr-only", children: intl.formatMessage(messages.loading) }), _jsx("div", { "aria-hidden": true, className: "rounded-xl border", children: Array.from({ length: count }).map((_, index) => (_jsx(WorkspaceRowSkeleton, {}, index))) })] }));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Full-page placeholder for the lazy-route `Suspense` fallback — before
|
|
40
|
+
* {@link WorkspacesPage} mounts there is no header or toolbar yet, so this
|
|
41
|
+
* sketches the whole page (header, toolbar, table) to hold the layout steady
|
|
42
|
+
* while the chunk loads. Reuses {@link WorkspacesTableSkeleton} for the body.
|
|
43
|
+
*/
|
|
44
|
+
export function WorkspacesPageSkeleton() {
|
|
45
|
+
return (_jsxs(Container, { children: [_jsxs("div", { className: "mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-8 w-48" }), _jsx(Skeleton, { className: "h-4 w-80 max-w-full" })] }), _jsx(Skeleton, { className: "h-9 w-36 shrink-0" })] }), _jsxs("div", { className: "mb-4 flex flex-wrap items-center gap-3", children: [_jsx(Skeleton, { className: "h-9 w-full sm:max-w-[360px]" }), _jsx(Skeleton, { className: "h-9 w-56" }), _jsx(Skeleton, { className: "ml-auto h-4 w-16" })] }), _jsx(WorkspacesTableSkeleton, {})] }));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Placeholder for the workspace shell's content area — shown both as the
|
|
49
|
+
* lazy-route `Suspense` fallback and while {@link useWorkspaces} resolves inside
|
|
50
|
+
* the shell (the per-workspace nav lives in the app sidebar, injected once the
|
|
51
|
+
* workspace resolves). Owns the single `role="status"` announcement.
|
|
52
|
+
*/
|
|
53
|
+
export function WorkspaceShellSkeleton() {
|
|
54
|
+
const intl = useIntl();
|
|
55
|
+
return (_jsxs("div", { role: "status", className: "min-h-svh p-8", children: [_jsx("span", { className: "sr-only", children: intl.formatMessage(messages.loading) }), _jsxs("div", { "aria-hidden": true, children: [_jsx(Skeleton, { className: "h-8 w-48" }), _jsx(Skeleton, { className: "mt-3 h-4 w-80 max-w-full" })] })] }));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Lazy-route `Suspense` fallback for {@link CreateWorkspacePage}. Wraps the
|
|
59
|
+
* shared {@link WizardPageSkeleton} so the `sr-only` status stays localized.
|
|
60
|
+
*/
|
|
61
|
+
export function CreateWorkspacePageSkeleton() {
|
|
62
|
+
const intl = useIntl();
|
|
63
|
+
return (_jsx(WizardPageSkeleton, { label: intl.formatMessage(messages.loadingForm) }));
|
|
64
|
+
}
|
|
65
|
+
/** A placeholder resource section: a header row over a few selectable rows. */
|
|
66
|
+
function ResourceSectionSkeleton() {
|
|
67
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton, { className: "size-5 rounded" }), _jsx(Skeleton, { className: "h-4 w-28" })] }), Array.from({ length: 3 }).map((_, index) => (_jsxs("div", { className: "flex items-center gap-3 rounded-xl border p-3", children: [_jsx(Skeleton, { className: "size-5 shrink-0 rounded" }), _jsx(Skeleton, { className: "h-4 w-40" })] }, index)))] }));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Section placeholder shown while {@link useContentTypes} resolves in the
|
|
71
|
+
* create-workspace wizard's "specific content" mode — two resource sections
|
|
72
|
+
* (collections and pages). Replaces the inline spinner so the step keeps its
|
|
73
|
+
* shape. Owns a single `role="status"`; the sections are `aria-hidden`.
|
|
74
|
+
*/
|
|
75
|
+
export function ContentTypesSkeleton() {
|
|
76
|
+
const intl = useIntl();
|
|
77
|
+
return (_jsxs("div", { role: "status", children: [_jsx("span", { className: "sr-only", children: intl.formatMessage(messages.loadingContent) }), _jsxs("div", { "aria-hidden": true, className: "flex flex-col gap-6", children: [_jsx(ResourceSectionSkeleton, {}), _jsx(ResourceSectionSkeleton, {})] })] }));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Full-page placeholder for the workspace-settings lazy-route `Suspense`
|
|
81
|
+
* fallback, mounted in the workspace shell at `/workspaces/:id/settings/*`.
|
|
82
|
+
*
|
|
83
|
+
* The bar is **real**, not a skeleton: it is the page's identity, it hosts the
|
|
84
|
+
* sidebar-reveal trigger when the app sidebar is collapsed, and it derives its
|
|
85
|
+
* crumbs from the URL rather than from data — so the very same
|
|
86
|
+
* {@link WorkspaceSettingsTopBar} the page renders can paint before the chunk
|
|
87
|
+
* arrives, already naming the section being opened. Below it the header, the
|
|
88
|
+
* tab bar and the section card are sketched, so the page slots into a layout
|
|
89
|
+
* that is already the right shape.
|
|
90
|
+
*/
|
|
91
|
+
export function WorkspaceSettingsPageSkeleton() {
|
|
92
|
+
const intl = useIntl();
|
|
93
|
+
return (_jsxs(_Fragment, { children: [_jsx(WorkspaceSettingsTopBar, {}), _jsxs(Container, { className: "space-y-6 py-8", role: "status", children: [_jsx("span", { className: "sr-only", children: intl.formatMessage(messages.loadingSettings) }), _jsxs("div", { "aria-hidden": true, className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-8 w-56" }), _jsx(Skeleton, { className: "h-4 w-80 max-w-full" })] }), _jsxs("div", { "aria-hidden": true, className: "flex flex-col gap-6", children: [_jsx("div", { className: "flex gap-2 border-b pb-2", children: ['w-16', 'w-20', 'w-16', 'w-24'].map((width, index) => (_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5", children: [_jsx(Skeleton, { className: "size-4 shrink-0 rounded" }), _jsx(Skeleton, { className: `h-4 ${width}` })] }, index))) }), _jsxs("div", { className: "flex min-w-0 flex-col gap-6 rounded-xl border p-6", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-5 w-40" }), _jsx(Skeleton, { className: "h-4 w-72 max-w-full" })] }), Array.from({ length: 3 }).map((_, index) => (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-4 w-28" }), _jsx(Skeleton, { className: "h-9 w-full" })] }, index))), _jsx("div", { className: "flex justify-end border-t pt-4", children: _jsx(Skeleton, { className: "h-9 w-28" }) })] })] })] })] }));
|
|
94
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Workspace } from '../../../domain/types/workspace';
|
|
2
|
+
/**
|
|
3
|
+
* The workspaces list as a table (mirroring the members table): each row is a
|
|
4
|
+
* workspace — avatar + name + description, its member and content-type counts,
|
|
5
|
+
* and a status pill. The whole row opens the workspace (its shell redirects to
|
|
6
|
+
* the first section); the name is a real link for keyboard users, and stops the
|
|
7
|
+
* click from bubbling so it navigates exactly once. Archived rows read muted.
|
|
8
|
+
*/
|
|
9
|
+
export declare function WorkspacesTable({ workspaces }: {
|
|
10
|
+
workspaces: Workspace[];
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/WorkspacesTable/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAkCjE;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,+BAkF1E"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link, useNavigate } from 'react-router-dom';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { initialsOf } from '@orthacms/utils-admin';
|
|
5
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, cn } from '@orthacms/design-system';
|
|
6
|
+
import { WorkspaceAvatar } from '../WorkspaceAvatar';
|
|
7
|
+
import { StatusChip } from '../StatusChip';
|
|
8
|
+
import { isActiveWorkspace } from '../../../domain/isActiveWorkspace';
|
|
9
|
+
/** Intl descriptors for {@link WorkspacesTable}, co-located with the component. */
|
|
10
|
+
const messages = defineMessages({
|
|
11
|
+
caption: {
|
|
12
|
+
id: 'workspaces.table.caption',
|
|
13
|
+
defaultMessage: 'Workspaces'
|
|
14
|
+
},
|
|
15
|
+
workspace: {
|
|
16
|
+
id: 'workspaces.table.workspace',
|
|
17
|
+
defaultMessage: 'Workspace'
|
|
18
|
+
},
|
|
19
|
+
members: {
|
|
20
|
+
id: 'workspaces.table.members',
|
|
21
|
+
defaultMessage: 'Members'
|
|
22
|
+
},
|
|
23
|
+
types: {
|
|
24
|
+
id: 'workspaces.table.types',
|
|
25
|
+
defaultMessage: 'Content types'
|
|
26
|
+
},
|
|
27
|
+
status: {
|
|
28
|
+
id: 'workspaces.table.status',
|
|
29
|
+
defaultMessage: 'Status'
|
|
30
|
+
},
|
|
31
|
+
memberCount: {
|
|
32
|
+
id: 'workspaces.table.memberCount',
|
|
33
|
+
defaultMessage: '{count, plural, one {# member} other {# members}}'
|
|
34
|
+
},
|
|
35
|
+
typeCount: {
|
|
36
|
+
id: 'workspaces.table.typeCount',
|
|
37
|
+
defaultMessage: '{count, plural, one {# type} other {# types}}'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* The workspaces list as a table (mirroring the members table): each row is a
|
|
42
|
+
* workspace — avatar + name + description, its member and content-type counts,
|
|
43
|
+
* and a status pill. The whole row opens the workspace (its shell redirects to
|
|
44
|
+
* the first section); the name is a real link for keyboard users, and stops the
|
|
45
|
+
* click from bubbling so it navigates exactly once. Archived rows read muted.
|
|
46
|
+
*/
|
|
47
|
+
export function WorkspacesTable({ workspaces }) {
|
|
48
|
+
const intl = useIntl();
|
|
49
|
+
const navigate = useNavigate();
|
|
50
|
+
return (_jsx("div", { className: "overflow-hidden rounded-xl border bg-card shadow-xs", children: _jsxs(Table, { "aria-label": intl.formatMessage(messages.caption), children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { scope: "col", className: "whitespace-nowrap", children: intl.formatMessage(messages.workspace) }), _jsx(TableHead, { scope: "col", className: "whitespace-nowrap", children: intl.formatMessage(messages.members) }), _jsx(TableHead, { scope: "col", className: "whitespace-nowrap", children: intl.formatMessage(messages.types) }), _jsx(TableHead, { scope: "col", className: "whitespace-nowrap", children: intl.formatMessage(messages.status) })] }) }), _jsx(TableBody, { children: workspaces.map((workspace) => {
|
|
51
|
+
const isArchived = !isActiveWorkspace(workspace);
|
|
52
|
+
return (_jsxs(TableRow, { onClick: () => navigate(`/workspaces/${workspace.id}`), className: cn('cursor-pointer', isArchived && 'bg-muted/30'), children: [_jsx(TableCell, { children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(WorkspaceAvatar, { initials: initialsOf(workspace.name), color: workspace.color, className: "size-9 shrink-0 text-xs" }), _jsxs("div", { className: "min-w-0 max-w-md", children: [_jsx(Link, { to: `/workspaces/${workspace.id}`, className: "block truncate text-sm font-medium hover:underline", onClick: (event) => event.stopPropagation(), children: workspace.name }), _jsx("p", { className: "line-clamp-3 text-xs break-words text-muted-foreground", children: workspace.description })] })] }) }), _jsx(TableCell, { className: "whitespace-nowrap text-sm text-muted-foreground", children: intl.formatMessage(messages.memberCount, {
|
|
53
|
+
count: workspace.members.length
|
|
54
|
+
}) }), _jsx(TableCell, { className: "whitespace-nowrap text-sm text-muted-foreground", children: intl.formatMessage(messages.typeCount, {
|
|
55
|
+
count: workspace.content.length
|
|
56
|
+
}) }), _jsx(TableCell, { children: _jsx(StatusChip, { status: workspace.status }) })] }, workspace.id));
|
|
57
|
+
}) })] }) }));
|
|
58
|
+
}
|