@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,28 @@
|
|
|
1
|
+
import type { Workspace } from '../../domain/types/workspace';
|
|
2
|
+
/** A member as `GET /api/workspaces` returns it (presentation fields derived). */
|
|
3
|
+
export interface WorkspaceMemberView {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
email: string;
|
|
7
|
+
}
|
|
8
|
+
/** A workspace as `GET /api/workspaces` returns it. */
|
|
9
|
+
export interface WorkspaceView {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
description: string;
|
|
14
|
+
color: string;
|
|
15
|
+
status: 'active' | 'archived';
|
|
16
|
+
members: WorkspaceMemberView[];
|
|
17
|
+
/** Granted content-type slugs; absent on older responses. */
|
|
18
|
+
content?: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Anti-corruption layer for the workspaces API: maps a server workspace view to
|
|
22
|
+
* the admin's `Workspace`, deriving the presentation-only member initials/colors
|
|
23
|
+
* the server doesn't store. The single wire→model translation the gateway routes
|
|
24
|
+
* every workspace response through, so no hook or component ever touches the wire
|
|
25
|
+
* shape.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toWorkspace(view: WorkspaceView): Workspace;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/workspaceMapper/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,SAAS,EAGZ,MAAM,8BAA8B,CAAC;AAEtC,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,uDAAuD;AACvD,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAmBD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAW1D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { initialsOf } from '@orthacms/utils-admin';
|
|
2
|
+
import { AVATAR_COLORS } from '@orthacms/design-system';
|
|
3
|
+
const STATUS = {
|
|
4
|
+
active: 'Active',
|
|
5
|
+
archived: 'Archived'
|
|
6
|
+
};
|
|
7
|
+
/** Derives an admin member (initials + a stable avatar color) from a server row. */
|
|
8
|
+
function toMember(view, index) {
|
|
9
|
+
const name = view.name ?? view.email;
|
|
10
|
+
return {
|
|
11
|
+
id: view.id,
|
|
12
|
+
name,
|
|
13
|
+
email: view.email,
|
|
14
|
+
initials: initialsOf(name),
|
|
15
|
+
color: AVATAR_COLORS[index % AVATAR_COLORS.length]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Anti-corruption layer for the workspaces API: maps a server workspace view to
|
|
20
|
+
* the admin's `Workspace`, deriving the presentation-only member initials/colors
|
|
21
|
+
* the server doesn't store. The single wire→model translation the gateway routes
|
|
22
|
+
* every workspace response through, so no hook or component ever touches the wire
|
|
23
|
+
* shape.
|
|
24
|
+
*/
|
|
25
|
+
export function toWorkspace(view) {
|
|
26
|
+
return {
|
|
27
|
+
id: view.id,
|
|
28
|
+
slug: view.slug,
|
|
29
|
+
name: view.name,
|
|
30
|
+
description: view.description,
|
|
31
|
+
color: view.color,
|
|
32
|
+
status: STATUS[view.status],
|
|
33
|
+
members: view.members.map(toMember),
|
|
34
|
+
content: view.content ?? []
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-page wizard for creating a workspace. Owns navigation and submission;
|
|
3
|
+
* all form state lives in {@link useWizard}, and each step body is
|
|
4
|
+
* presentational. Rendered at `/workspaces/new` inside the authenticated shell.
|
|
5
|
+
*/
|
|
6
|
+
export declare function CreateWorkspacePage(): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/CreateWorkspacePage/index.tsx"],"names":[],"mappings":"AAiKA;;;;GAIG;AACH,wBAAgB,mBAAmB,gCAoRlC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace settings, mounted inside the shell at `/workspaces/:id/settings/*`.
|
|
3
|
+
* A tabbed layout — General, Members, Content, and a Danger zone — each its own
|
|
4
|
+
* nested route under the {@link WorkspaceSettingsTabs} underline tab bar,
|
|
5
|
+
* mirroring the user-detail page. The page width is the shared `Container`.
|
|
6
|
+
*
|
|
7
|
+
* Reads the open workspace from context; edits are gated by `workspaces:update`
|
|
8
|
+
* / `workspaces:delete`, so a viewer sees a read-only page and the Danger
|
|
9
|
+
* section (rail entry + route) only exists when the user can act on it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function WorkspaceSettingsPage(): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/WorkspaceSettingsPage/index.tsx"],"names":[],"mappings":"AA4BA;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,gCAkGpC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Workspaces management page: a searchable, status-filterable grid of
|
|
3
|
+
* workspace cards with a create flow. Rendered at `/workspaces` inside the
|
|
4
|
+
* authenticated shell.
|
|
5
|
+
*/
|
|
6
|
+
export declare function WorkspacesPage(): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/WorkspacesPage/index.tsx"],"names":[],"mappings":"AAgEA;;;;GAIG;AACH,wBAAgB,cAAc,gCAwH7B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link BlockingConfirmDialog}. */
|
|
3
|
+
export type BlockingConfirmDialogProps = {
|
|
4
|
+
/** Whether the dialog is open. */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Dialog heading. */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** Supporting copy under the heading. */
|
|
9
|
+
description: ReactNode;
|
|
10
|
+
/** Whether the backing entry-count query is still loading. */
|
|
11
|
+
isChecking: boolean;
|
|
12
|
+
/** Whether the entry-count query errored (blocks the action). */
|
|
13
|
+
isError: boolean;
|
|
14
|
+
/** The entry count once known; `undefined` while checking/errored. */
|
|
15
|
+
count: number | undefined;
|
|
16
|
+
/** Shown while the count is loading. */
|
|
17
|
+
checkingLabel: string;
|
|
18
|
+
/** Shown when the count couldn't be read. */
|
|
19
|
+
checkErrorLabel: string;
|
|
20
|
+
/** Shown when the count is `> 0` — the caller formats it with the count. */
|
|
21
|
+
blockedLabel: ReactNode;
|
|
22
|
+
/** Label for the destructive confirm button. */
|
|
23
|
+
confirmLabel: string;
|
|
24
|
+
/** Label for the cancel button. */
|
|
25
|
+
cancelLabel: string;
|
|
26
|
+
/** Close callback; ignored while the action is in flight. */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
/** Runs the destructive action (reachable only once the count is zero). */
|
|
29
|
+
onConfirm: () => void;
|
|
30
|
+
/** Whether the destructive action is in flight. */
|
|
31
|
+
busy?: boolean;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The shared "block-before-you-act" confirm dialog: on open the caller reads an
|
|
35
|
+
* entry-count query, and this renders the checking / error / blocked states and
|
|
36
|
+
* **enables the destructive button only once the count is known to be zero**.
|
|
37
|
+
* Used for both revoking a content grant and deleting a workspace, which differ
|
|
38
|
+
* only in their copy and which count hook backs them.
|
|
39
|
+
*/
|
|
40
|
+
export declare function BlockingConfirmDialog({ open, title, description, isChecking, isError, count, checkingLabel, checkErrorLabel, blockedLabel, confirmLabel, cancelLabel, onClose, onConfirm, busy }: BlockingConfirmDialogProps): import("react").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/BlockingConfirmDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAcvC,+CAA+C;AAC/C,MAAM,MAAM,0BAA0B,GAAG;IACrC,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sBAAsB;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,WAAW,EAAE,SAAS,CAAC;IACvB,8DAA8D;IAC9D,UAAU,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,YAAY,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,UAAU,EACV,OAAO,EACP,KAAK,EACL,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAY,EACf,EAAE,0BAA0B,+BAgD5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, AlertDescription, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Spinner } from '@orthacms/design-system';
|
|
3
|
+
/**
|
|
4
|
+
* The shared "block-before-you-act" confirm dialog: on open the caller reads an
|
|
5
|
+
* entry-count query, and this renders the checking / error / blocked states and
|
|
6
|
+
* **enables the destructive button only once the count is known to be zero**.
|
|
7
|
+
* Used for both revoking a content grant and deleting a workspace, which differ
|
|
8
|
+
* only in their copy and which count hook backs them.
|
|
9
|
+
*/
|
|
10
|
+
export function BlockingConfirmDialog({ open, title, description, isChecking, isError, count, checkingLabel, checkErrorLabel, blockedLabel, confirmLabel, cancelLabel, onClose, onConfirm, busy = false }) {
|
|
11
|
+
const hasEntries = typeof count === 'number' && count > 0;
|
|
12
|
+
const canConfirm = open && !isError && !isChecking && count === 0;
|
|
13
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (next) => {
|
|
14
|
+
if (!next && !busy)
|
|
15
|
+
onClose();
|
|
16
|
+
}, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), isChecking ? (_jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [_jsx(Spinner, { className: "size-4" }), checkingLabel] })) : isError ? (_jsx(Alert, { variant: "destructive", role: "alert", children: _jsx(AlertDescription, { children: checkErrorLabel }) })) : hasEntries ? (_jsx(Alert, { variant: "destructive", role: "alert", children: _jsx(AlertDescription, { children: blockedLabel }) })) : null, _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: onClose, disabled: busy, children: cancelLabel }), _jsxs(Button, { variant: "destructive", onClick: onConfirm, disabled: !canConfirm || busy, children: [busy ? _jsx(Spinner, {}) : null, confirmLabel] })] })] }) }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type AvatarColor } from '@orthacms/design-system';
|
|
2
|
+
/** Props for {@link ColorSwatchRow}. */
|
|
3
|
+
export type ColorSwatchRowProps = {
|
|
4
|
+
/** Currently selected accent. */
|
|
5
|
+
value: AvatarColor;
|
|
6
|
+
/** Called when a swatch is chosen. */
|
|
7
|
+
onChange: (color: AvatarColor) => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The accent-color picker for the basics step: a single-select row of the
|
|
11
|
+
* shared avatar palette, exposed as a radio group for keyboard + screen-reader
|
|
12
|
+
* users. The selected swatch shows a check.
|
|
13
|
+
*
|
|
14
|
+
* It implements the **roving tabindex** the `radiogroup` role promises: the
|
|
15
|
+
* group is a single tab stop (only the checked swatch is tabbable) and ←/→/↑/↓
|
|
16
|
+
* move the selection, wrapping, with Home/End jumping to the ends. Without that
|
|
17
|
+
* the role was a promise the widget didn't keep — seven separate tab stops, and
|
|
18
|
+
* arrow keys that did nothing for the screen-reader users the role tells to
|
|
19
|
+
* reach for them.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ColorSwatchRow({ value, onChange }: ColorSwatchRowProps): import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/presentation/components/ColorSwatchRow/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIH,KAAK,WAAW,EACnB,MAAM,yBAAyB,CAAC;AAajC,wCAAwC;AACxC,MAAM,MAAM,mBAAmB,GAAG;IAC9B,iCAAiC;IACjC,KAAK,EAAE,WAAW,CAAC;IACnB,sCAAsC;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA8EtE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { Check } from 'lucide-react';
|
|
5
|
+
import { AVATAR_COLORS, avatarColorVar, cn } from '@orthacms/design-system';
|
|
6
|
+
const messages = defineMessages({
|
|
7
|
+
label: {
|
|
8
|
+
id: 'workspaces.create.basics.colorLabel',
|
|
9
|
+
defaultMessage: 'Avatar color'
|
|
10
|
+
},
|
|
11
|
+
swatch: {
|
|
12
|
+
id: 'workspaces.create.basics.colorSwatch',
|
|
13
|
+
defaultMessage: 'Use the {color} accent'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* The accent-color picker for the basics step: a single-select row of the
|
|
18
|
+
* shared avatar palette, exposed as a radio group for keyboard + screen-reader
|
|
19
|
+
* users. The selected swatch shows a check.
|
|
20
|
+
*
|
|
21
|
+
* It implements the **roving tabindex** the `radiogroup` role promises: the
|
|
22
|
+
* group is a single tab stop (only the checked swatch is tabbable) and ←/→/↑/↓
|
|
23
|
+
* move the selection, wrapping, with Home/End jumping to the ends. Without that
|
|
24
|
+
* the role was a promise the widget didn't keep — seven separate tab stops, and
|
|
25
|
+
* arrow keys that did nothing for the screen-reader users the role tells to
|
|
26
|
+
* reach for them.
|
|
27
|
+
*/
|
|
28
|
+
export function ColorSwatchRow({ value, onChange }) {
|
|
29
|
+
const intl = useIntl();
|
|
30
|
+
const label = intl.formatMessage(messages.label);
|
|
31
|
+
const refs = useRef([]);
|
|
32
|
+
// Moving the selection also moves focus, which is what a radio group does:
|
|
33
|
+
// arrowing through the options *is* choosing between them.
|
|
34
|
+
const move = (from, delta) => {
|
|
35
|
+
const next = (from + delta + AVATAR_COLORS.length) % AVATAR_COLORS.length;
|
|
36
|
+
onChange(AVATAR_COLORS[next]);
|
|
37
|
+
refs.current[next]?.focus();
|
|
38
|
+
};
|
|
39
|
+
const onKeyDown = (event, i) => {
|
|
40
|
+
const jump = {
|
|
41
|
+
ArrowRight: 1,
|
|
42
|
+
ArrowDown: 1,
|
|
43
|
+
ArrowLeft: -1,
|
|
44
|
+
ArrowUp: -1
|
|
45
|
+
};
|
|
46
|
+
const delta = jump[event.key];
|
|
47
|
+
if (delta !== undefined) {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
move(i, delta);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (event.key === 'Home' || event.key === 'End') {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
const target = event.key === 'Home' ? 0 : AVATAR_COLORS.length - 1;
|
|
55
|
+
onChange(AVATAR_COLORS[target]);
|
|
56
|
+
refs.current[target]?.focus();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
// A group with nothing selected still needs one reachable stop, or Tab
|
|
60
|
+
// would skip the control entirely.
|
|
61
|
+
const activeIndex = Math.max(0, AVATAR_COLORS.indexOf(value));
|
|
62
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { className: "text-sm font-medium leading-snug", children: label }), _jsx("div", { role: "radiogroup", "aria-label": label, className: "flex flex-wrap gap-2", children: AVATAR_COLORS.map((color, i) => {
|
|
63
|
+
const selected = value === color;
|
|
64
|
+
return (_jsx("button", { ref: (node) => {
|
|
65
|
+
refs.current[i] = node;
|
|
66
|
+
}, type: "button", role: "radio", "aria-checked": selected, tabIndex: i === activeIndex ? 0 : -1, "aria-label": intl.formatMessage(messages.swatch, {
|
|
67
|
+
color
|
|
68
|
+
}), onClick: () => onChange(color), onKeyDown: (event) => onKeyDown(event, i), className: cn('flex size-9 items-center justify-center rounded-xl text-white transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', selected && 'ring-2 ring-ring ring-offset-2'), style: { backgroundColor: avatarColorVar(color) }, children: selected ? _jsx(Check, { className: "size-4" }) : null }, color));
|
|
69
|
+
}) })] }));
|
|
70
|
+
}
|
package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ContentMode } from '../../../../../domain/types/wizard';
|
|
2
|
+
/** Props for {@link ModeTiles}. */
|
|
3
|
+
export type ModeTilesProps = {
|
|
4
|
+
/** Current content mode. */
|
|
5
|
+
value: ContentMode;
|
|
6
|
+
/** Called when a tile is chosen. */
|
|
7
|
+
onChange: (mode: ContentMode) => void;
|
|
8
|
+
};
|
|
9
|
+
/** Two radio tiles choosing between full access and a specific selection. */
|
|
10
|
+
export declare function ModeTiles({ value, onChange }: ModeTilesProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ModeTiles/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AA2CtE,mCAAmC;AACnC,MAAM,MAAM,cAAc,GAAG;IACzB,4BAA4B;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,oCAAoC;IACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,cAAc,+BAoC5D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
+
import { cn, RadioGroup, RadioGroupItem } from '@orthacms/design-system';
|
|
4
|
+
const messages = defineMessages({
|
|
5
|
+
groupLabel: {
|
|
6
|
+
id: 'workspaces.create.content.modeLabel',
|
|
7
|
+
defaultMessage: 'Content access'
|
|
8
|
+
},
|
|
9
|
+
allTitle: {
|
|
10
|
+
id: 'workspaces.create.content.allTitle',
|
|
11
|
+
defaultMessage: 'All content'
|
|
12
|
+
},
|
|
13
|
+
allDescription: {
|
|
14
|
+
id: 'workspaces.create.content.allDescription',
|
|
15
|
+
defaultMessage: 'Access every collection and page, including ones added later.'
|
|
16
|
+
},
|
|
17
|
+
specificTitle: {
|
|
18
|
+
id: 'workspaces.create.content.specificTitle',
|
|
19
|
+
defaultMessage: 'Specific content'
|
|
20
|
+
},
|
|
21
|
+
specificDescription: {
|
|
22
|
+
id: 'workspaces.create.content.specificDescription',
|
|
23
|
+
defaultMessage: 'Choose exactly which collections and pages to grant.'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const TILES = [
|
|
27
|
+
{
|
|
28
|
+
value: 'all',
|
|
29
|
+
title: messages.allTitle,
|
|
30
|
+
description: messages.allDescription
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: 'specific',
|
|
34
|
+
title: messages.specificTitle,
|
|
35
|
+
description: messages.specificDescription
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
/** Two radio tiles choosing between full access and a specific selection. */
|
|
39
|
+
export function ModeTiles({ value, onChange }) {
|
|
40
|
+
const intl = useIntl();
|
|
41
|
+
return (_jsx(RadioGroup, { value: value, onValueChange: (next) => onChange(next), "aria-label": intl.formatMessage(messages.groupLabel), className: "grid gap-3 sm:grid-cols-2", children: TILES.map((tile) => {
|
|
42
|
+
const selected = value === tile.value;
|
|
43
|
+
return (_jsxs("label", { className: cn('flex cursor-pointer items-start gap-3 rounded-xl border p-4 transition-colors', selected
|
|
44
|
+
? 'border-primary bg-primary/5'
|
|
45
|
+
: 'hover:bg-accent'), children: [_jsx(RadioGroupItem, { value: tile.value, className: "mt-0.5" }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: intl.formatMessage(tile.title) }), _jsx("span", { className: "text-sm text-muted-foreground", children: intl.formatMessage(tile.description) })] })] }, tile.value));
|
|
46
|
+
}) }));
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import { type MessageDescriptor } from 'react-intl';
|
|
3
|
+
import type { ResourceSelection } from '../../../../../domain/types/wizard';
|
|
4
|
+
/** A selectable row in a {@link ResourceSection}. */
|
|
5
|
+
export type ResourceRow = {
|
|
6
|
+
/** Stable id (the content type name). */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Primary label. */
|
|
9
|
+
primary: string;
|
|
10
|
+
/** Secondary line (description or path), also searched. */
|
|
11
|
+
secondary?: string;
|
|
12
|
+
};
|
|
13
|
+
/** The i18n strings a {@link ResourceSection} needs. */
|
|
14
|
+
export type ResourceSectionMessages = {
|
|
15
|
+
heading: MessageDescriptor;
|
|
16
|
+
help: MessageDescriptor;
|
|
17
|
+
searchPlaceholder: MessageDescriptor;
|
|
18
|
+
allLabel: MessageDescriptor;
|
|
19
|
+
empty: MessageDescriptor;
|
|
20
|
+
noResults: MessageDescriptor;
|
|
21
|
+
/** Plural — receives `{count}`. */
|
|
22
|
+
countSpecific: MessageDescriptor;
|
|
23
|
+
countAll: MessageDescriptor;
|
|
24
|
+
/** Plural — receives `{count}` excluded. */
|
|
25
|
+
countAllExcluded: MessageDescriptor;
|
|
26
|
+
};
|
|
27
|
+
/** Props for {@link ResourceSection}. */
|
|
28
|
+
export type ResourceSectionProps = {
|
|
29
|
+
/** Section copy. */
|
|
30
|
+
messages: ResourceSectionMessages;
|
|
31
|
+
/** Leading icon for every row. */
|
|
32
|
+
icon: ComponentType<{
|
|
33
|
+
className?: string;
|
|
34
|
+
}>;
|
|
35
|
+
/** All rows (filtering affects only what's rendered). */
|
|
36
|
+
rows: ResourceRow[];
|
|
37
|
+
/** Current selection. */
|
|
38
|
+
selection: ResourceSelection;
|
|
39
|
+
/** Replace the selection. */
|
|
40
|
+
onChange: (next: ResourceSelection) => void;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A generic "specific vs all" selection panel — used for both collections and
|
|
44
|
+
* pages. Owns local search; the caller owns the selection state and supplies
|
|
45
|
+
* rows, icon, and copy.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ResourceSection({ messages, icon: Icon, rows, selection, onChange }: ResourceSectionProps): import("react").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAW,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAU7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG;IACtB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,mCAAmC;IACnC,aAAa,EAAE,iBAAiB,CAAC;IACjC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,4CAA4C;IAC5C,gBAAgB,EAAE,iBAAiB,CAAC;CACvC,CAAC;AAEF,yCAAyC;AACzC,MAAM,MAAM,oBAAoB,GAAG;IAC/B,oBAAoB;IACpB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,kCAAkC;IAClC,IAAI,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,yDAAyD;IACzD,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,yBAAyB;IACzB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,6BAA6B;IAC7B,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC5B,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EACX,EAAE,oBAAoB,+BAwGtB"}
|
package/dist/lib/presentation/components/CreateWorkspaceWizard/ContentStep/ResourceSection/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import { Checkbox, cn, InputGroup, InputGroupAddon, InputGroupInput } from '@orthacms/design-system';
|
|
5
|
+
import { Search } from 'lucide-react';
|
|
6
|
+
import { useResourceSelection } from '../../../../hooks/useResourceSelection';
|
|
7
|
+
/**
|
|
8
|
+
* A generic "specific vs all" selection panel — used for both collections and
|
|
9
|
+
* pages. Owns local search; the caller owns the selection state and supplies
|
|
10
|
+
* rows, icon, and copy.
|
|
11
|
+
*/
|
|
12
|
+
export function ResourceSection({ messages, icon: Icon, rows, selection, onChange }) {
|
|
13
|
+
const intl = useIntl();
|
|
14
|
+
const [search, setSearch] = useState('');
|
|
15
|
+
const controller = useResourceSelection(selection, onChange, rows.length);
|
|
16
|
+
const filtered = useMemo(() => {
|
|
17
|
+
const q = search.trim().toLowerCase();
|
|
18
|
+
if (!q)
|
|
19
|
+
return rows;
|
|
20
|
+
return rows.filter((row) => `${row.primary} ${row.secondary ?? ''}`.toLowerCase().includes(q));
|
|
21
|
+
}, [rows, search]);
|
|
22
|
+
const countLabel = selection.mode === 'all'
|
|
23
|
+
? selection.excludedIds.length === 0
|
|
24
|
+
? intl.formatMessage(messages.countAll)
|
|
25
|
+
: intl.formatMessage(messages.countAllExcluded, {
|
|
26
|
+
count: selection.excludedIds.length
|
|
27
|
+
})
|
|
28
|
+
: intl.formatMessage(messages.countSpecific, {
|
|
29
|
+
count: controller.count
|
|
30
|
+
});
|
|
31
|
+
return (_jsxs("section", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("h3", { className: "text-sm font-medium", children: intl.formatMessage(messages.heading) }), _jsx("p", { className: "text-sm text-muted-foreground", children: intl.formatMessage(messages.help) })] }), _jsxs("label", { className: "flex items-center gap-3 rounded-lg border px-3 py-2", children: [_jsx(Checkbox, { checked: controller.isAll, onCheckedChange: (checked) => controller.setAll(checked === true) }), _jsx("span", { className: "text-sm font-medium", children: intl.formatMessage(messages.allLabel) })] }), _jsxs(InputGroup, { className: "shadow-none", children: [_jsx(InputGroupAddon, { children: _jsx(Search, {}) }), _jsx(InputGroupInput, { type: "search", value: search, onChange: (event) => setSearch(event.target.value), placeholder: intl.formatMessage(messages.searchPlaceholder), "aria-label": intl.formatMessage(messages.searchPlaceholder) })] }), rows.length === 0 ? (_jsx("p", { className: "px-1 py-2 text-sm text-muted-foreground", children: intl.formatMessage(messages.empty) })) : filtered.length === 0 ? (_jsx("p", { className: "px-1 py-2 text-sm text-muted-foreground", children: intl.formatMessage(messages.noResults) })) : (_jsx("ul", { className: "flex flex-col rounded-lg border", children: filtered.map((row, index) => (_jsx("li", { children: _jsxs("label", { className: cn('flex cursor-pointer items-center gap-3 px-3 py-2', index > 0 && 'border-t'), children: [_jsx(Checkbox, { checked: controller.isSelected(row.id), onCheckedChange: () => controller.toggle(row.id) }), _jsx(Icon, { className: "size-4 shrink-0 text-muted-foreground" }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium", children: row.primary }), row.secondary ? (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: row.secondary })) : null] })] }) }, row.id))) })), _jsx("p", { className: "text-xs text-muted-foreground", children: countLabel })] }));
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ContentMode, ResourceSelection } from '../../../../domain/types/wizard';
|
|
2
|
+
/** Props for {@link ContentStep}. */
|
|
3
|
+
export type ContentStepProps = {
|
|
4
|
+
/** Page-level content mode. */
|
|
5
|
+
contentMode: ContentMode;
|
|
6
|
+
/** Set the content mode. */
|
|
7
|
+
setContentMode: (mode: ContentMode) => void;
|
|
8
|
+
/** Collection selection. */
|
|
9
|
+
collections: ResourceSelection;
|
|
10
|
+
/** Replace the collection selection. */
|
|
11
|
+
setCollections: (selection: ResourceSelection) => void;
|
|
12
|
+
/** Page selection. */
|
|
13
|
+
pages: ResourceSelection;
|
|
14
|
+
/** Replace the page selection. */
|
|
15
|
+
setPages: (selection: ResourceSelection) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The content step body: the All-vs-Specific mode tiles, then either a
|
|
19
|
+
* reassuring full-access alert or the collections + pages selection panels
|
|
20
|
+
* (with loading and error states for the content-types query).
|
|
21
|
+
*/
|
|
22
|
+
export declare function ContentStep({ contentMode, setContentMode, collections, setCollections, pages, setPages }: ContentStepProps): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/presentation/components/CreateWorkspaceWizard/ContentStep/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,WAAW,EACX,iBAAiB,EACpB,MAAM,iCAAiC,CAAC;AA+GzC,qCAAqC;AACrC,MAAM,MAAM,gBAAgB,GAAG;IAC3B,+BAA+B;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,4BAA4B;IAC5B,cAAc,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,4BAA4B;IAC5B,WAAW,EAAE,iBAAiB,CAAC;IAC/B,wCAAwC;IACxC,cAAc,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACvD,sBAAsB;IACtB,KAAK,EAAE,iBAAiB,CAAC;IACzB,kCAAkC;IAClC,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EACxB,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,KAAK,EACL,QAAQ,EACX,EAAE,gBAAgB,+BAyElB"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { AlertCircle, Database, FileText } from 'lucide-react';
|
|
5
|
+
import { Alert, AlertDescription, AlertTitle } from '@orthacms/design-system';
|
|
6
|
+
import { useContentTypes } from '../../../../application/useContentTypes';
|
|
7
|
+
import { ContentTypesSkeleton } from '../../WorkspacesSkeleton';
|
|
8
|
+
import { ModeTiles } from './ModeTiles';
|
|
9
|
+
import { ResourceSection } from './ResourceSection';
|
|
10
|
+
const messages = defineMessages({
|
|
11
|
+
errorTitle: {
|
|
12
|
+
id: 'workspaces.create.content.errorTitle',
|
|
13
|
+
defaultMessage: 'Could not load content types'
|
|
14
|
+
},
|
|
15
|
+
errorBody: {
|
|
16
|
+
id: 'workspaces.create.content.errorBody',
|
|
17
|
+
defaultMessage: 'Try again in a moment, or skip this step and grant content access later.'
|
|
18
|
+
},
|
|
19
|
+
allAlertTitle: {
|
|
20
|
+
id: 'workspaces.create.content.allAlertTitle',
|
|
21
|
+
defaultMessage: 'Full access'
|
|
22
|
+
},
|
|
23
|
+
allAlertBody: {
|
|
24
|
+
id: 'workspaces.create.content.allAlertBody',
|
|
25
|
+
defaultMessage: 'This workspace can access every collection and page, including any added later.'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const collectionMessages = defineMessages({
|
|
29
|
+
heading: {
|
|
30
|
+
id: 'workspaces.create.content.collectionsHeading',
|
|
31
|
+
defaultMessage: 'Collections'
|
|
32
|
+
},
|
|
33
|
+
help: {
|
|
34
|
+
id: 'workspaces.create.content.collectionsHelp',
|
|
35
|
+
defaultMessage: 'Structured content types — e.g. blog posts, products, authors.'
|
|
36
|
+
},
|
|
37
|
+
searchPlaceholder: {
|
|
38
|
+
id: 'workspaces.create.content.collectionsSearch',
|
|
39
|
+
defaultMessage: 'Search collections by name'
|
|
40
|
+
},
|
|
41
|
+
allLabel: {
|
|
42
|
+
id: 'workspaces.create.content.collectionsAll',
|
|
43
|
+
defaultMessage: 'All collections'
|
|
44
|
+
},
|
|
45
|
+
empty: {
|
|
46
|
+
id: 'workspaces.create.content.collectionsEmpty',
|
|
47
|
+
defaultMessage: 'No collections defined yet.'
|
|
48
|
+
},
|
|
49
|
+
noResults: {
|
|
50
|
+
id: 'workspaces.create.content.collectionsNoResults',
|
|
51
|
+
defaultMessage: 'No collections match your search.'
|
|
52
|
+
},
|
|
53
|
+
countSpecific: {
|
|
54
|
+
id: 'workspaces.create.content.collectionsCountSpecific',
|
|
55
|
+
defaultMessage: '{count, plural, =0 {No collections selected} one {# collection selected} other {# collections selected}}'
|
|
56
|
+
},
|
|
57
|
+
countAll: {
|
|
58
|
+
id: 'workspaces.create.content.collectionsCountAll',
|
|
59
|
+
defaultMessage: 'All collections selected'
|
|
60
|
+
},
|
|
61
|
+
countAllExcluded: {
|
|
62
|
+
id: 'workspaces.create.content.collectionsCountAllExcluded',
|
|
63
|
+
defaultMessage: 'All collections selected — {count, plural, one {# excluded} other {# excluded}}'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const pageMessages = defineMessages({
|
|
67
|
+
heading: {
|
|
68
|
+
id: 'workspaces.create.content.pagesHeading',
|
|
69
|
+
defaultMessage: 'Pages'
|
|
70
|
+
},
|
|
71
|
+
help: {
|
|
72
|
+
id: 'workspaces.create.content.pagesHelp',
|
|
73
|
+
defaultMessage: 'Standalone pages — e.g. home, about, contact.'
|
|
74
|
+
},
|
|
75
|
+
searchPlaceholder: {
|
|
76
|
+
id: 'workspaces.create.content.pagesSearch',
|
|
77
|
+
defaultMessage: 'Search pages by name or path'
|
|
78
|
+
},
|
|
79
|
+
allLabel: {
|
|
80
|
+
id: 'workspaces.create.content.pagesAll',
|
|
81
|
+
defaultMessage: 'All pages'
|
|
82
|
+
},
|
|
83
|
+
empty: {
|
|
84
|
+
id: 'workspaces.create.content.pagesEmpty',
|
|
85
|
+
defaultMessage: 'No pages defined yet.'
|
|
86
|
+
},
|
|
87
|
+
noResults: {
|
|
88
|
+
id: 'workspaces.create.content.pagesNoResults',
|
|
89
|
+
defaultMessage: 'No pages match your search.'
|
|
90
|
+
},
|
|
91
|
+
countSpecific: {
|
|
92
|
+
id: 'workspaces.create.content.pagesCountSpecific',
|
|
93
|
+
defaultMessage: '{count, plural, =0 {No pages selected} one {# page selected} other {# pages selected}}'
|
|
94
|
+
},
|
|
95
|
+
countAll: {
|
|
96
|
+
id: 'workspaces.create.content.pagesCountAll',
|
|
97
|
+
defaultMessage: 'All pages selected'
|
|
98
|
+
},
|
|
99
|
+
countAllExcluded: {
|
|
100
|
+
id: 'workspaces.create.content.pagesCountAllExcluded',
|
|
101
|
+
defaultMessage: 'All pages selected — {count, plural, one {# excluded} other {# excluded}}'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* The content step body: the All-vs-Specific mode tiles, then either a
|
|
106
|
+
* reassuring full-access alert or the collections + pages selection panels
|
|
107
|
+
* (with loading and error states for the content-types query).
|
|
108
|
+
*/
|
|
109
|
+
export function ContentStep({ contentMode, setContentMode, collections, setCollections, pages, setPages }) {
|
|
110
|
+
const intl = useIntl();
|
|
111
|
+
const query = useContentTypes();
|
|
112
|
+
const allTypes = useMemo(() => query.data ?? [], [query.data]);
|
|
113
|
+
const collectionRows = useMemo(() => allTypes
|
|
114
|
+
.filter((ct) => ct.kind === 'collection')
|
|
115
|
+
.map((ct) => ({
|
|
116
|
+
id: ct.name,
|
|
117
|
+
primary: ct.label ?? ct.name,
|
|
118
|
+
secondary: ct.description
|
|
119
|
+
})), [allTypes]);
|
|
120
|
+
const pageRows = useMemo(() => allTypes
|
|
121
|
+
.filter((ct) => ct.kind === 'single')
|
|
122
|
+
.map((ct) => ({
|
|
123
|
+
id: ct.name,
|
|
124
|
+
primary: ct.label ?? ct.name,
|
|
125
|
+
secondary: ct.path ?? ct.description
|
|
126
|
+
})), [allTypes]);
|
|
127
|
+
return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsx(ModeTiles, { value: contentMode, onChange: setContentMode }), contentMode === 'all' ? (_jsxs(Alert, { children: [_jsx(AlertTitle, { children: intl.formatMessage(messages.allAlertTitle) }), _jsx(AlertDescription, { children: intl.formatMessage(messages.allAlertBody) })] })) : query.isPending ? (_jsx(ContentTypesSkeleton, {})) : query.isError ? (_jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "size-4" }), _jsx(AlertTitle, { children: intl.formatMessage(messages.errorTitle) }), _jsx(AlertDescription, { children: intl.formatMessage(messages.errorBody) })] })) : (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsx(ResourceSection, { messages: collectionMessages, icon: Database, rows: collectionRows, selection: collections, onChange: setCollections }), _jsx(ResourceSection, { messages: pageMessages, icon: FileText, rows: pageRows, selection: pages, onChange: setPages })] }))] }));
|
|
128
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UseSlugResult } from '../../../hooks/useSlug';
|
|
2
|
+
import type { WizardData } from '../../../../domain/types/wizard';
|
|
3
|
+
/** Props for {@link IdentityFields}. */
|
|
4
|
+
export type IdentityFieldsProps = {
|
|
5
|
+
/** Current basics data. */
|
|
6
|
+
data: WizardData;
|
|
7
|
+
/** Merge a partial patch into the basics data. */
|
|
8
|
+
update: (patch: Partial<WizardData>) => void;
|
|
9
|
+
/** Slug controller (status + handlers) owned by the page. */
|
|
10
|
+
slug: UseSlugResult;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The basics step body: a live workspace monogram beside the name, the accent
|
|
14
|
+
* color picker, the slug field with availability, and an optional description.
|
|
15
|
+
*/
|
|
16
|
+
export declare function IdentityFields({ data, update, slug }: IdentityFieldsProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/presentation/components/CreateWorkspaceWizard/IdentityFields/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AA2ClE,wCAAwC;AACxC,MAAM,MAAM,mBAAmB,GAAG;IAC9B,2BAA2B;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,kDAAkD;IAClD,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7C,6DAA6D;IAC7D,IAAI,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,mBAAmB,+BA6GzE"}
|