@kelpie/ui 0.11.0 → 0.13.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/dist/api/resources/attendances.d.ts +13 -0
- package/dist/api/resources/attendances.d.ts.map +1 -0
- package/dist/api/resources/attendances.js +34 -0
- package/dist/api/resources/attendances.js.map +1 -0
- package/dist/api/resources/eventAssociations.d.ts +12 -0
- package/dist/api/resources/eventAssociations.d.ts.map +1 -0
- package/dist/api/resources/eventAssociations.js +25 -0
- package/dist/api/resources/eventAssociations.js.map +1 -0
- package/dist/api/resources/events.d.ts +17 -0
- package/dist/api/resources/events.d.ts.map +1 -0
- package/dist/api/resources/events.js +40 -0
- package/dist/api/resources/events.js.map +1 -0
- package/dist/api/resources/handbookSeed.d.ts +11 -0
- package/dist/api/resources/handbookSeed.d.ts.map +1 -0
- package/dist/api/resources/handbookSeed.js +43 -0
- package/dist/api/resources/handbookSeed.js.map +1 -0
- package/dist/api/resources/moduleSettings.d.ts +10 -0
- package/dist/api/resources/moduleSettings.d.ts.map +1 -1
- package/dist/api/resources/moduleSettings.js +21 -0
- package/dist/api/resources/moduleSettings.js.map +1 -1
- package/dist/api/resources/planItems.d.ts +4 -4
- package/dist/api/resources/planItems.d.ts.map +1 -1
- package/dist/api/resources/planItems.js +1 -1
- package/dist/api/resources/planItems.js.map +1 -1
- package/dist/api/resources/publicConfig.js +3 -3
- package/dist/api/resources/sampleData.d.ts.map +1 -1
- package/dist/api/resources/sampleData.js +2 -0
- package/dist/api/resources/sampleData.js.map +1 -1
- package/dist/api/resources/session.d.ts +22 -1
- package/dist/api/resources/session.d.ts.map +1 -1
- package/dist/api/resources/session.js +43 -1
- package/dist/api/resources/session.js.map +1 -1
- package/dist/api/resources/workspace.d.ts.map +1 -1
- package/dist/api/resources/workspace.js +2 -3
- package/dist/api/resources/workspace.js.map +1 -1
- package/dist/app/KelpieApp.d.ts.map +1 -1
- package/dist/app/KelpieApp.js +5 -1
- package/dist/app/KelpieApp.js.map +1 -1
- package/dist/components/ActivitiesPanel.d.ts.map +1 -1
- package/dist/components/ActivitiesPanel.js +2 -0
- package/dist/components/ActivitiesPanel.js.map +1 -1
- package/dist/components/AddressesField.d.ts +23 -0
- package/dist/components/AddressesField.d.ts.map +1 -0
- package/dist/components/AddressesField.js +215 -0
- package/dist/components/AddressesField.js.map +1 -0
- package/dist/components/CountrySearch.d.ts +16 -0
- package/dist/components/CountrySearch.d.ts.map +1 -0
- package/dist/components/CountrySearch.js +30 -0
- package/dist/components/CountrySearch.js.map +1 -0
- package/dist/components/EnvironmentBanner.d.ts +0 -12
- package/dist/components/EnvironmentBanner.d.ts.map +1 -1
- package/dist/components/EnvironmentBanner.js +21 -6
- package/dist/components/EnvironmentBanner.js.map +1 -1
- package/dist/components/InlineEdit.d.ts +7 -1
- package/dist/components/InlineEdit.d.ts.map +1 -1
- package/dist/components/InlineEdit.js +8 -1
- package/dist/components/InlineEdit.js.map +1 -1
- package/dist/components/LinkedEventsPanel.d.ts +11 -0
- package/dist/components/LinkedEventsPanel.d.ts.map +1 -0
- package/dist/components/LinkedEventsPanel.js +18 -0
- package/dist/components/LinkedEventsPanel.js.map +1 -0
- package/dist/components/NotesPanel.d.ts +4 -6
- package/dist/components/NotesPanel.d.ts.map +1 -1
- package/dist/components/NotesPanel.js +39 -3
- package/dist/components/NotesPanel.js.map +1 -1
- package/dist/components/PlanAttention.d.ts.map +1 -1
- package/dist/components/PlanAttention.js +3 -2
- package/dist/components/PlanAttention.js.map +1 -1
- package/dist/components/PlanPanel.d.ts +3 -3
- package/dist/components/PlanPanel.d.ts.map +1 -1
- package/dist/components/Shell.d.ts.map +1 -1
- package/dist/components/Shell.js +8 -2
- package/dist/components/Shell.js.map +1 -1
- package/dist/components/SocialNetworkIcon.d.ts +17 -0
- package/dist/components/SocialNetworkIcon.d.ts.map +1 -0
- package/dist/components/SocialNetworkIcon.js +39 -0
- package/dist/components/SocialNetworkIcon.js.map +1 -0
- package/dist/components/SocialProfilesField.d.ts +8 -0
- package/dist/components/SocialProfilesField.d.ts.map +1 -1
- package/dist/components/SocialProfilesField.js +19 -5
- package/dist/components/SocialProfilesField.js.map +1 -1
- package/dist/components/TimezoneSearch.d.ts +21 -0
- package/dist/components/TimezoneSearch.d.ts.map +1 -0
- package/dist/components/TimezoneSearch.js +27 -0
- package/dist/components/TimezoneSearch.js.map +1 -0
- package/dist/components/WorkspaceSwitcher.d.ts +8 -0
- package/dist/components/WorkspaceSwitcher.d.ts.map +1 -0
- package/dist/components/WorkspaceSwitcher.js +67 -0
- package/dist/components/WorkspaceSwitcher.js.map +1 -0
- package/dist/components/environmentTone.d.ts +10 -0
- package/dist/components/environmentTone.d.ts.map +1 -0
- package/dist/components/environmentTone.js +35 -0
- package/dist/components/environmentTone.js.map +1 -0
- package/dist/index.d.ts +25 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/timezones.d.ts +17 -0
- package/dist/lib/timezones.d.ts.map +1 -0
- package/dist/lib/timezones.js +39 -0
- package/dist/lib/timezones.js.map +1 -0
- package/dist/pages/CompaniesPage.d.ts.map +1 -1
- package/dist/pages/CompaniesPage.js +12 -11
- package/dist/pages/CompaniesPage.js.map +1 -1
- package/dist/pages/CompanyDetail.d.ts.map +1 -1
- package/dist/pages/CompanyDetail.js +23 -12
- package/dist/pages/CompanyDetail.js.map +1 -1
- package/dist/pages/DealDetail.d.ts.map +1 -1
- package/dist/pages/DealDetail.js +5 -1
- package/dist/pages/DealDetail.js.map +1 -1
- package/dist/pages/DecisionsPage.d.ts.map +1 -1
- package/dist/pages/DecisionsPage.js +7 -0
- package/dist/pages/DecisionsPage.js.map +1 -1
- package/dist/pages/EnquiryDetail.d.ts.map +1 -1
- package/dist/pages/EnquiryDetail.js +5 -1
- package/dist/pages/EnquiryDetail.js.map +1 -1
- package/dist/pages/EventDetail.d.ts +2 -0
- package/dist/pages/EventDetail.d.ts.map +1 -0
- package/dist/pages/EventDetail.js +332 -0
- package/dist/pages/EventDetail.js.map +1 -0
- package/dist/pages/EventsPage.d.ts +2 -0
- package/dist/pages/EventsPage.d.ts.map +1 -0
- package/dist/pages/EventsPage.js +176 -0
- package/dist/pages/EventsPage.js.map +1 -0
- package/dist/pages/ListDetail.d.ts.map +1 -1
- package/dist/pages/ListDetail.js +17 -0
- package/dist/pages/ListDetail.js.map +1 -1
- package/dist/pages/OpportunityDetail.d.ts.map +1 -1
- package/dist/pages/OpportunityDetail.js +5 -1
- package/dist/pages/OpportunityDetail.js.map +1 -1
- package/dist/pages/PartnershipDetail.d.ts.map +1 -1
- package/dist/pages/PartnershipDetail.js +5 -1
- package/dist/pages/PartnershipDetail.js.map +1 -1
- package/dist/pages/PeoplePage.d.ts.map +1 -1
- package/dist/pages/PeoplePage.js +13 -5
- package/dist/pages/PeoplePage.js.map +1 -1
- package/dist/pages/PersonDetail.d.ts.map +1 -1
- package/dist/pages/PersonDetail.js +94 -28
- package/dist/pages/PersonDetail.js.map +1 -1
- package/dist/pages/PlanningPage.d.ts.map +1 -1
- package/dist/pages/PlanningPage.js +6 -3
- package/dist/pages/PlanningPage.js.map +1 -1
- package/dist/pages/RaiseDetail.d.ts.map +1 -1
- package/dist/pages/RaiseDetail.js +5 -1
- package/dist/pages/RaiseDetail.js.map +1 -1
- package/dist/pages/RoleDetail.d.ts.map +1 -1
- package/dist/pages/RoleDetail.js +4 -1
- package/dist/pages/RoleDetail.js.map +1 -1
- package/dist/pages/SearchPage.d.ts.map +1 -1
- package/dist/pages/SearchPage.js +2 -1
- package/dist/pages/SearchPage.js.map +1 -1
- package/dist/pages/account/PreferencesPage.d.ts.map +1 -1
- package/dist/pages/account/PreferencesPage.js +2 -28
- package/dist/pages/account/PreferencesPage.js.map +1 -1
- package/dist/pages/account/SecurityPage.js +2 -2
- package/dist/pages/account/SecurityPage.js.map +1 -1
- package/dist/pages/admin/DataPage.js +10 -9
- package/dist/pages/admin/DataPage.js.map +1 -1
- package/dist/pages/admin/FieldsPage.js +1 -1
- package/dist/pages/admin/FieldsPage.js.map +1 -1
- package/dist/pages/admin/ModulesPage.d.ts.map +1 -1
- package/dist/pages/admin/ModulesPage.js +1 -0
- package/dist/pages/admin/ModulesPage.js.map +1 -1
- package/dist/pages/admin/WorkspaceSettingsPage.d.ts +12 -0
- package/dist/pages/admin/WorkspaceSettingsPage.d.ts.map +1 -1
- package/dist/pages/admin/WorkspaceSettingsPage.js +2 -21
- package/dist/pages/admin/WorkspaceSettingsPage.js.map +1 -1
- package/dist/pages/auth/AuthForm.d.ts +18 -0
- package/dist/pages/auth/AuthForm.d.ts.map +1 -1
- package/dist/pages/auth/AuthForm.js +17 -0
- package/dist/pages/auth/AuthForm.js.map +1 -1
- package/dist/pages/auth/AuthLayout.d.ts +5 -4
- package/dist/pages/auth/AuthLayout.d.ts.map +1 -1
- package/dist/pages/auth/AuthLayout.js +7 -5
- package/dist/pages/auth/AuthLayout.js.map +1 -1
- package/dist/pages/auth/AuthMethods.d.ts +12 -0
- package/dist/pages/auth/AuthMethods.d.ts.map +1 -0
- package/dist/pages/auth/AuthMethods.js +20 -0
- package/dist/pages/auth/AuthMethods.js.map +1 -0
- package/dist/pages/auth/RegionSwitcher.d.ts +10 -0
- package/dist/pages/auth/RegionSwitcher.d.ts.map +1 -0
- package/dist/pages/auth/RegionSwitcher.js +28 -0
- package/dist/pages/auth/RegionSwitcher.js.map +1 -0
- package/dist/pages/auth/SignInPage.d.ts +7 -0
- package/dist/pages/auth/SignInPage.d.ts.map +1 -1
- package/dist/pages/auth/SignInPage.js +5 -8
- package/dist/pages/auth/SignInPage.js.map +1 -1
- package/dist/pages/auth/SignUpPage.d.ts.map +1 -1
- package/dist/pages/auth/SignUpPage.js +9 -1
- package/dist/pages/auth/SignUpPage.js.map +1 -1
- package/dist/pages/auth/nextPath.d.ts +15 -0
- package/dist/pages/auth/nextPath.d.ts.map +1 -0
- package/dist/pages/auth/nextPath.js +17 -0
- package/dist/pages/auth/nextPath.js.map +1 -0
- package/dist/pages/auth/regionHref.d.ts +6 -0
- package/dist/pages/auth/regionHref.d.ts.map +1 -0
- package/dist/pages/auth/regionHref.js +8 -0
- package/dist/pages/auth/regionHref.js.map +1 -0
- package/dist/pages/dashboard/DashboardPage.d.ts +8 -0
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +5 -13
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/attention.d.ts +1 -8
- package/dist/pages/dashboard/attention.d.ts.map +1 -1
- package/dist/pages/dashboard/attention.js +21 -54
- package/dist/pages/dashboard/attention.js.map +1 -1
- package/dist/pages/dashboard/sections.d.ts.map +1 -1
- package/dist/pages/dashboard/sections.js +3 -2
- package/dist/pages/dashboard/sections.js.map +1 -1
- package/dist/pages/forms/FormActions.d.ts.map +1 -1
- package/dist/pages/forms/FormActions.js +7 -3
- package/dist/pages/forms/FormActions.js.map +1 -1
- package/dist/pages/onboarding/HandbookStepPage.d.ts +4 -8
- package/dist/pages/onboarding/HandbookStepPage.d.ts.map +1 -1
- package/dist/pages/onboarding/HandbookStepPage.js +13 -13
- package/dist/pages/onboarding/HandbookStepPage.js.map +1 -1
- package/dist/pages/onboarding/InvitesStepPage.d.ts.map +1 -1
- package/dist/pages/onboarding/InvitesStepPage.js +13 -7
- package/dist/pages/onboarding/InvitesStepPage.js.map +1 -1
- package/dist/pages/onboarding/ModulesStepPage.d.ts +11 -0
- package/dist/pages/onboarding/ModulesStepPage.d.ts.map +1 -0
- package/dist/pages/onboarding/ModulesStepPage.js +80 -0
- package/dist/pages/onboarding/ModulesStepPage.js.map +1 -0
- package/dist/pages/onboarding/OnboardingNav.d.ts +17 -0
- package/dist/pages/onboarding/OnboardingNav.d.ts.map +1 -0
- package/dist/pages/onboarding/OnboardingNav.js +37 -0
- package/dist/pages/onboarding/OnboardingNav.js.map +1 -0
- package/dist/pages/onboarding/OrganisationStepPage.d.ts +13 -0
- package/dist/pages/onboarding/OrganisationStepPage.d.ts.map +1 -0
- package/dist/pages/onboarding/OrganisationStepPage.js +59 -0
- package/dist/pages/onboarding/OrganisationStepPage.js.map +1 -0
- package/dist/pages/onboarding/WorkspaceStepPage.d.ts.map +1 -1
- package/dist/pages/onboarding/WorkspaceStepPage.js +25 -20
- package/dist/pages/onboarding/WorkspaceStepPage.js.map +1 -1
- package/dist/pages/onboarding/handbookTemplates.d.ts +19 -0
- package/dist/pages/onboarding/handbookTemplates.d.ts.map +1 -0
- package/dist/pages/onboarding/handbookTemplates.js +57 -0
- package/dist/pages/onboarding/handbookTemplates.js.map +1 -0
- package/dist/pages/onboarding/onboardingModules.d.ts +23 -0
- package/dist/pages/onboarding/onboardingModules.d.ts.map +1 -0
- package/dist/pages/onboarding/onboardingModules.js +153 -0
- package/dist/pages/onboarding/onboardingModules.js.map +1 -0
- package/dist/pages/onboarding/onboardingRerun.d.ts +21 -0
- package/dist/pages/onboarding/onboardingRerun.d.ts.map +1 -0
- package/dist/pages/onboarding/onboardingRerun.js +33 -0
- package/dist/pages/onboarding/onboardingRerun.js.map +1 -0
- package/dist/registry/context.d.ts +3 -1
- package/dist/registry/context.d.ts.map +1 -1
- package/dist/registry/context.js +4 -0
- package/dist/registry/context.js.map +1 -1
- package/dist/registry/contributions.d.ts +24 -0
- package/dist/registry/contributions.d.ts.map +1 -1
- package/dist/registry/contributions.js.map +1 -1
- package/dist/registry/registry.d.ts +4 -1
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +6 -0
- package/dist/registry/registry.js.map +1 -1
- package/package.json +4 -3
- package/src/api/resources/attendances.ts +54 -0
- package/src/api/resources/eventAssociations.ts +43 -0
- package/src/api/resources/events.ts +70 -0
- package/src/api/resources/handbookSeed.ts +63 -0
- package/src/api/resources/moduleSettings.ts +25 -0
- package/src/api/resources/planItems.ts +5 -5
- package/src/api/resources/publicConfig.ts +3 -3
- package/src/api/resources/sampleData.ts +2 -0
- package/src/api/resources/session.ts +59 -0
- package/src/api/resources/workspace.ts +2 -3
- package/src/app/KelpieApp.tsx +11 -3
- package/src/components/ActivitiesPanel.tsx +2 -0
- package/src/components/AddressesField.tsx +502 -0
- package/src/components/CountrySearch.tsx +71 -0
- package/src/components/EnvironmentBanner.tsx +23 -6
- package/src/components/InlineEdit.tsx +35 -1
- package/src/components/LinkedEventsPanel.tsx +50 -0
- package/src/components/NotesPanel.tsx +132 -15
- package/src/components/PlanAttention.tsx +5 -4
- package/src/components/PlanPanel.tsx +3 -3
- package/src/components/Shell.tsx +16 -1
- package/src/components/SocialNetworkIcon.tsx +88 -0
- package/src/components/SocialProfilesField.tsx +57 -10
- package/src/components/TimezoneSearch.tsx +67 -0
- package/src/components/WorkspaceSwitcher.tsx +136 -0
- package/src/components/environmentTone.ts +40 -0
- package/src/index.ts +49 -3
- package/src/lib/timezones.ts +43 -0
- package/src/pages/CompaniesPage.tsx +14 -13
- package/src/pages/CompanyDetail.tsx +59 -27
- package/src/pages/DealDetail.tsx +5 -0
- package/src/pages/DecisionsPage.tsx +7 -0
- package/src/pages/EnquiryDetail.tsx +7 -0
- package/src/pages/EventDetail.tsx +794 -0
- package/src/pages/EventsPage.tsx +382 -0
- package/src/pages/ListDetail.tsx +24 -0
- package/src/pages/OpportunityDetail.tsx +7 -0
- package/src/pages/PartnershipDetail.tsx +7 -0
- package/src/pages/PeoplePage.tsx +18 -5
- package/src/pages/PersonDetail.tsx +300 -100
- package/src/pages/PlanningPage.tsx +17 -14
- package/src/pages/RaiseDetail.tsx +5 -0
- package/src/pages/RoleDetail.tsx +8 -0
- package/src/pages/SearchPage.tsx +2 -1
- package/src/pages/account/PreferencesPage.tsx +2 -37
- package/src/pages/account/SecurityPage.tsx +6 -1
- package/src/pages/admin/DataPage.tsx +63 -21
- package/src/pages/admin/FieldsPage.tsx +1 -1
- package/src/pages/admin/ModulesPage.tsx +1 -0
- package/src/pages/admin/WorkspaceSettingsPage.tsx +10 -33
- package/src/pages/auth/AuthForm.tsx +38 -0
- package/src/pages/auth/AuthLayout.tsx +8 -4
- package/src/pages/auth/AuthMethods.tsx +29 -0
- package/src/pages/auth/RegionSwitcher.tsx +56 -0
- package/src/pages/auth/SignInPage.tsx +13 -14
- package/src/pages/auth/SignUpPage.tsx +32 -0
- package/src/pages/auth/nextPath.ts +17 -0
- package/src/pages/auth/regionHref.ts +10 -0
- package/src/pages/dashboard/DashboardPage.tsx +16 -48
- package/src/pages/dashboard/attention.ts +24 -78
- package/src/pages/dashboard/sections.tsx +8 -2
- package/src/pages/forms/FormActions.tsx +14 -8
- package/src/pages/onboarding/HandbookStepPage.tsx +21 -24
- package/src/pages/onboarding/InvitesStepPage.tsx +27 -19
- package/src/pages/onboarding/ModulesStepPage.tsx +145 -0
- package/src/pages/onboarding/OnboardingNav.tsx +97 -0
- package/src/pages/onboarding/OrganisationStepPage.tsx +130 -0
- package/src/pages/onboarding/WorkspaceStepPage.tsx +53 -38
- package/src/pages/onboarding/handbookTemplates.ts +77 -0
- package/src/pages/onboarding/onboardingModules.ts +202 -0
- package/src/pages/onboarding/onboardingRerun.ts +41 -0
- package/src/registry/context.ts +6 -0
- package/src/registry/contributions.ts +26 -0
- package/src/registry/registry.ts +12 -0
- package/src/styles.css +30 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { OrganisationChoiceId } from './handbookTemplates.ts'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The six optional modules the setup wizard offers. Other toggleable modules
|
|
5
|
+
* stay on; Admin → Modules is where they change later.
|
|
6
|
+
*
|
|
7
|
+
* Ids match the server module catalog (`deals`, `raises`, …). The wizard is
|
|
8
|
+
* what writes the first `workspace_module_settings` rows for these six.
|
|
9
|
+
*
|
|
10
|
+
* Labels stay the domain names. Defaults and explanations follow the
|
|
11
|
+
* organisation type chosen on the previous step (`onboarding.md`).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export type OnboardingModuleId =
|
|
15
|
+
| 'deals'
|
|
16
|
+
| 'opportunities'
|
|
17
|
+
| 'raises'
|
|
18
|
+
| 'partnerships'
|
|
19
|
+
| 'events'
|
|
20
|
+
| 'forms'
|
|
21
|
+
|
|
22
|
+
export interface OnboardingModuleChoice {
|
|
23
|
+
readonly id: OnboardingModuleId
|
|
24
|
+
readonly label: string
|
|
25
|
+
readonly description: string
|
|
26
|
+
readonly defaultEnabled: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ModulePreset {
|
|
30
|
+
readonly enabled: Readonly<Record<OnboardingModuleId, boolean>>
|
|
31
|
+
readonly descriptions: Readonly<Record<OnboardingModuleId, string>>
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const LABELS: Readonly<Record<OnboardingModuleId, string>> = {
|
|
35
|
+
deals: 'Deals',
|
|
36
|
+
opportunities: 'Opportunities',
|
|
37
|
+
raises: 'Fundraising',
|
|
38
|
+
partnerships: 'Partnerships',
|
|
39
|
+
events: 'Events',
|
|
40
|
+
forms: 'Forms',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const MODULE_ORDER: readonly OnboardingModuleId[] = [
|
|
44
|
+
'deals',
|
|
45
|
+
'opportunities',
|
|
46
|
+
'raises',
|
|
47
|
+
'partnerships',
|
|
48
|
+
'events',
|
|
49
|
+
'forms',
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
/** Startup / Choose later — every optional module starts on. */
|
|
53
|
+
const STARTUP: ModulePreset = {
|
|
54
|
+
enabled: {
|
|
55
|
+
deals: true,
|
|
56
|
+
opportunities: true,
|
|
57
|
+
raises: true,
|
|
58
|
+
partnerships: true,
|
|
59
|
+
events: true,
|
|
60
|
+
forms: true,
|
|
61
|
+
},
|
|
62
|
+
descriptions: {
|
|
63
|
+
deals: 'Track sales you are trying to close, from first chat to won or lost.',
|
|
64
|
+
opportunities: 'Chase things that are not sales — grants, awards, press, a speaking slot.',
|
|
65
|
+
raises: 'Run a funding round: who you are talking to, and where each one is up to.',
|
|
66
|
+
partnerships: 'Keep tabs on the people you work with long-term, and when to check in next.',
|
|
67
|
+
events: 'Plan meetups, dinners, and webinars, and see who is coming.',
|
|
68
|
+
forms: 'Put a form on your site. New sign-ups land in Kelpie on their own.',
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const AGENCY: ModulePreset = {
|
|
73
|
+
enabled: {
|
|
74
|
+
deals: true,
|
|
75
|
+
opportunities: false,
|
|
76
|
+
raises: false,
|
|
77
|
+
partnerships: true,
|
|
78
|
+
events: true,
|
|
79
|
+
forms: true,
|
|
80
|
+
},
|
|
81
|
+
descriptions: {
|
|
82
|
+
deals: 'Track pitches, retainers, and projects you are trying to close.',
|
|
83
|
+
opportunities: 'Chase RFPs, awards, press, and speaking slots that are not billed work.',
|
|
84
|
+
raises: 'Run a funding round: who you are talking to, and where each one is up to.',
|
|
85
|
+
partnerships: 'Keep tabs on subcontractors, channel partners, and when to check in next.',
|
|
86
|
+
events: 'Plan workshops, client dinners, and webinars, and see who is coming.',
|
|
87
|
+
forms: 'Put a form on your site. New enquiries land in Kelpie on their own.',
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const NONPROFIT: ModulePreset = {
|
|
92
|
+
enabled: {
|
|
93
|
+
deals: false,
|
|
94
|
+
opportunities: true,
|
|
95
|
+
raises: true,
|
|
96
|
+
partnerships: true,
|
|
97
|
+
events: true,
|
|
98
|
+
forms: true,
|
|
99
|
+
},
|
|
100
|
+
descriptions: {
|
|
101
|
+
deals: 'Track sponsorships or earned-income work you are trying to close.',
|
|
102
|
+
opportunities: 'Chase grants, awards, press, and speaking slots.',
|
|
103
|
+
raises: 'Track who you are raising from, and where each conversation is up to.',
|
|
104
|
+
partnerships: 'Keep tabs on the organisations you work with long-term, and when to check in next.',
|
|
105
|
+
events: 'Plan fundraisers, volunteer days, and community gatherings, and see who is coming.',
|
|
106
|
+
forms: 'Put a form on your site. New supporters land in Kelpie on their own.',
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const COMMUNITY: ModulePreset = {
|
|
111
|
+
enabled: {
|
|
112
|
+
deals: false,
|
|
113
|
+
opportunities: true,
|
|
114
|
+
raises: true,
|
|
115
|
+
partnerships: true,
|
|
116
|
+
events: true,
|
|
117
|
+
forms: true,
|
|
118
|
+
},
|
|
119
|
+
descriptions: {
|
|
120
|
+
deals: 'Track sponsorships or paid programmes you are trying to close.',
|
|
121
|
+
opportunities: 'Chase grants, press, and speaking slots that are not membership sales.',
|
|
122
|
+
raises: 'Track who you are raising from, and where each conversation is up to.',
|
|
123
|
+
partnerships: 'Keep tabs on sister organisations and long-term collaborators, and when to check in next.',
|
|
124
|
+
events: 'Plan meetups, dinners, and member gatherings, and see who is coming.',
|
|
125
|
+
forms: 'Put a join or contact form on your site. New sign-ups land in Kelpie on their own.',
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const PROFESSIONAL_SERVICES: ModulePreset = {
|
|
130
|
+
enabled: {
|
|
131
|
+
deals: true,
|
|
132
|
+
opportunities: false,
|
|
133
|
+
raises: false,
|
|
134
|
+
partnerships: false,
|
|
135
|
+
events: true,
|
|
136
|
+
forms: true,
|
|
137
|
+
},
|
|
138
|
+
descriptions: {
|
|
139
|
+
deals: 'Track engagements from first conversation to won or lost.',
|
|
140
|
+
opportunities: 'Chase tenders, panels, press, and speaking slots.',
|
|
141
|
+
raises: 'Run a funding round: who you are talking to, and where each one is up to.',
|
|
142
|
+
partnerships: 'Keep tabs on referral sources and when to check in next.',
|
|
143
|
+
events: 'Plan client seminars, dinners, and webinars, and see who is coming.',
|
|
144
|
+
forms: 'Put a form on your site. New enquiries land in Kelpie on their own.',
|
|
145
|
+
},
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const CREATOR: ModulePreset = {
|
|
149
|
+
enabled: {
|
|
150
|
+
deals: true,
|
|
151
|
+
opportunities: true,
|
|
152
|
+
raises: false,
|
|
153
|
+
partnerships: false,
|
|
154
|
+
events: false,
|
|
155
|
+
forms: true,
|
|
156
|
+
},
|
|
157
|
+
descriptions: {
|
|
158
|
+
deals: 'Track brand deals and client work from first chat to won or lost.',
|
|
159
|
+
opportunities: 'Chase press, speaking, and other chances that are not billed work.',
|
|
160
|
+
raises: 'Run a funding round: who you are talking to, and where each one is up to.',
|
|
161
|
+
partnerships: 'Keep tabs on the brands you work with long-term, and when to check in next.',
|
|
162
|
+
events: 'Plan meetups, launches, and webinars, and see who is coming.',
|
|
163
|
+
forms: 'Put a form on your site. New enquiries land in Kelpie on their own.',
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const PRESETS: Readonly<Record<Exclude<OrganisationChoiceId, 'later'>, ModulePreset>> = {
|
|
168
|
+
startup: STARTUP,
|
|
169
|
+
agency: AGENCY,
|
|
170
|
+
nonprofit: NONPROFIT,
|
|
171
|
+
community: COMMUNITY,
|
|
172
|
+
'professional-services': PROFESSIONAL_SERVICES,
|
|
173
|
+
creator: CREATOR,
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function presetForChoice(choice: OrganisationChoiceId): ModulePreset {
|
|
177
|
+
return choice === 'later' ? STARTUP : PRESETS[choice]
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Startup catalog. Prefer `onboardingModulesForChoice` when a type is known. */
|
|
181
|
+
export const ONBOARDING_MODULES: readonly OnboardingModuleChoice[] = modulesFromPreset(STARTUP)
|
|
182
|
+
|
|
183
|
+
export function onboardingModulesForChoice(
|
|
184
|
+
choice: OrganisationChoiceId,
|
|
185
|
+
): readonly OnboardingModuleChoice[] {
|
|
186
|
+
return modulesFromPreset(presetForChoice(choice))
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function defaultOnboardingModuleState(
|
|
190
|
+
choice: OrganisationChoiceId = 'startup',
|
|
191
|
+
): Record<OnboardingModuleId, boolean> {
|
|
192
|
+
return { ...presetForChoice(choice).enabled }
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function modulesFromPreset(preset: ModulePreset): readonly OnboardingModuleChoice[] {
|
|
196
|
+
return MODULE_ORDER.map((id) => ({
|
|
197
|
+
id,
|
|
198
|
+
label: LABELS[id],
|
|
199
|
+
description: preset.descriptions[id],
|
|
200
|
+
defaultEnabled: preset.enabled[id],
|
|
201
|
+
}))
|
|
202
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A finished workspace can walk the wizard again from the account menu.
|
|
3
|
+
*
|
|
4
|
+
* `?rerun=1` marks that path. Organisation still runs so the reader can pick
|
|
5
|
+
* a type, but handbook pages are not seeded or replaced. The handbook review
|
|
6
|
+
* step is skipped: workspace → organisation → modules → invites → dashboard.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const ONBOARDING_RERUN_PARAM = 'rerun'
|
|
10
|
+
export const ONBOARDING_RERUN_VALUE = '1'
|
|
11
|
+
|
|
12
|
+
/** Organisation type chosen on step 2 — drives module defaults on step 3. */
|
|
13
|
+
export const ONBOARDING_ORG_PARAM = 'org'
|
|
14
|
+
|
|
15
|
+
/** Entry URL the account menu opens for a rerun. */
|
|
16
|
+
export const ONBOARDING_RERUN_ENTRY = `/onboarding/workspace?${ONBOARDING_RERUN_PARAM}=${ONBOARDING_RERUN_VALUE}`
|
|
17
|
+
|
|
18
|
+
export function isOnboardingRerun(searchParams: URLSearchParams): boolean {
|
|
19
|
+
return searchParams.get(ONBOARDING_RERUN_PARAM) === ONBOARDING_RERUN_VALUE
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Keep the rerun flag and the organisation type when moving between onboarding
|
|
24
|
+
* routes. `org` is how the modules step knows which defaults to offer; nothing
|
|
25
|
+
* else is held in the browser (`onboarding.md`).
|
|
26
|
+
*/
|
|
27
|
+
export function onboardingPath(path: string, rerun: boolean, org?: string | null): string {
|
|
28
|
+
const params = new URLSearchParams()
|
|
29
|
+
|
|
30
|
+
if (rerun) {
|
|
31
|
+
params.set(ONBOARDING_RERUN_PARAM, ONBOARDING_RERUN_VALUE)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (org !== undefined && org !== null && org !== '') {
|
|
35
|
+
params.set(ONBOARDING_ORG_PARAM, org)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const query = params.toString()
|
|
39
|
+
|
|
40
|
+
return query === '' ? path : `${path}?${query}`
|
|
41
|
+
}
|
package/src/registry/context.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { createContext, useContext } from 'react'
|
|
|
2
2
|
import type { ComponentType } from 'react'
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
|
+
AuthMethod,
|
|
5
6
|
DashboardCard,
|
|
6
7
|
ExtensibleRecordType,
|
|
7
8
|
NavItem,
|
|
@@ -53,6 +54,11 @@ export function useDashboardCards(): readonly DashboardCard[] {
|
|
|
53
54
|
return useUiExtensions().dashboardCards()
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
/** Extra ways to sign in, for the signed-out pages to render beside their form. */
|
|
58
|
+
export function useAuthMethods(): readonly AuthMethod[] {
|
|
59
|
+
return useUiExtensions().authMethods()
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
/**
|
|
57
63
|
* The component to render for an overridable: a module's replacement, or core's
|
|
58
64
|
* own. Core calls this instead of rendering its component directly.
|
|
@@ -25,6 +25,32 @@ export interface NavItem {
|
|
|
25
25
|
readonly icon?: ReactNode
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* What a sign-in method is rendering against.
|
|
30
|
+
*
|
|
31
|
+
* `intent` because the same button reads differently on the two pages, and
|
|
32
|
+
* `next` because where the browser lands afterwards is the page's to decide,
|
|
33
|
+
* not the module's. The page has already checked it is a path within the app.
|
|
34
|
+
*/
|
|
35
|
+
export interface AuthMethodContext {
|
|
36
|
+
readonly intent: 'login' | 'signup'
|
|
37
|
+
readonly next: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Another way to sign in, offered beside the password form.
|
|
42
|
+
*
|
|
43
|
+
* Core renders whatever a module returns and nothing around it: no divider, no
|
|
44
|
+
* heading. A module cannot always tell at build time whether it has anything to
|
|
45
|
+
* offer (an unconfigured provider renders nothing at all), and core framing
|
|
46
|
+
* would then decorate an empty space.
|
|
47
|
+
*/
|
|
48
|
+
export interface AuthMethod {
|
|
49
|
+
readonly id: string
|
|
50
|
+
readonly order?: number
|
|
51
|
+
readonly render: (context: AuthMethodContext) => ReactNode
|
|
52
|
+
}
|
|
53
|
+
|
|
28
54
|
/** A whole page, mounted under the shell's chrome. */
|
|
29
55
|
export interface RouteContribution {
|
|
30
56
|
readonly path: string
|
package/src/registry/registry.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentType } from 'react'
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
|
+
AuthMethod,
|
|
4
5
|
DashboardCard,
|
|
5
6
|
ExtensibleRecordType,
|
|
6
7
|
NavItem,
|
|
@@ -31,6 +32,8 @@ export interface UiModuleContext {
|
|
|
31
32
|
recordTab(objectType: ExtensibleRecordType, tab: RecordTab): void
|
|
32
33
|
recordSidebarCard(objectType: ExtensibleRecordType, card: RecordSidebarCard): void
|
|
33
34
|
dashboardCard(card: DashboardCard): void
|
|
35
|
+
/** Another way to sign in, rendered beside the password form on `/login` and `/signup`. */
|
|
36
|
+
authMethod(method: AuthMethod): void
|
|
34
37
|
/** Replaces a core component. Prefer a slot; see `modules.md`. */
|
|
35
38
|
override<Props>(token: Overridable<Props>, component: ComponentType<Props>): void
|
|
36
39
|
}
|
|
@@ -47,6 +50,7 @@ export interface UiExtensions {
|
|
|
47
50
|
recordTabs(objectType: ExtensibleRecordType): readonly RecordTab[]
|
|
48
51
|
recordSidebarCards(objectType: ExtensibleRecordType): readonly RecordSidebarCard[]
|
|
49
52
|
dashboardCards(): readonly DashboardCard[]
|
|
53
|
+
authMethods(): readonly AuthMethod[]
|
|
50
54
|
componentFor<Props>(token: Overridable<Props>): ComponentType<Props>
|
|
51
55
|
}
|
|
52
56
|
|
|
@@ -70,6 +74,7 @@ interface Accumulator {
|
|
|
70
74
|
readonly recordTabs: Map<ExtensibleRecordType, RecordTab[]>
|
|
71
75
|
readonly recordSidebarCards: Map<ExtensibleRecordType, RecordSidebarCard[]>
|
|
72
76
|
readonly dashboardCards: DashboardCard[]
|
|
77
|
+
readonly authMethods: AuthMethod[]
|
|
73
78
|
readonly overrides: OverrideStore
|
|
74
79
|
}
|
|
75
80
|
|
|
@@ -134,6 +139,11 @@ function createModuleContext(
|
|
|
134
139
|
accumulator.dashboardCards.push(card)
|
|
135
140
|
},
|
|
136
141
|
|
|
142
|
+
authMethod(method) {
|
|
143
|
+
claim(taken, module.id, 'auth.methods', method.id)
|
|
144
|
+
accumulator.authMethods.push(method)
|
|
145
|
+
},
|
|
146
|
+
|
|
137
147
|
override(token, component) {
|
|
138
148
|
if (accumulator.overrides.has(token.key)) {
|
|
139
149
|
throw new UiModuleError(
|
|
@@ -158,6 +168,7 @@ export function registerUiModules(modules: readonly UiModule[]): UiExtensions {
|
|
|
158
168
|
recordTabs: new Map(),
|
|
159
169
|
recordSidebarCards: new Map(),
|
|
160
170
|
dashboardCards: [],
|
|
171
|
+
authMethods: [],
|
|
161
172
|
overrides: createOverrideStore(),
|
|
162
173
|
}
|
|
163
174
|
const taken = new Set<string>()
|
|
@@ -179,6 +190,7 @@ export function registerUiModules(modules: readonly UiModule[]): UiExtensions {
|
|
|
179
190
|
recordSidebarCards: (objectType) =>
|
|
180
191
|
inSlotOrder(accumulator.recordSidebarCards.get(objectType) ?? []),
|
|
181
192
|
dashboardCards: () => inSlotOrder(accumulator.dashboardCards),
|
|
193
|
+
authMethods: () => inSlotOrder(accumulator.authMethods),
|
|
182
194
|
componentFor: (token) => accumulator.overrides.get(token),
|
|
183
195
|
}
|
|
184
196
|
}
|
package/src/styles.css
CHANGED
|
@@ -41,6 +41,16 @@
|
|
|
41
41
|
--color-success-soft: var(--success-soft);
|
|
42
42
|
--color-warning: var(--warning);
|
|
43
43
|
--color-warning-soft: var(--warning-soft);
|
|
44
|
+
--color-env-dev: var(--env-dev);
|
|
45
|
+
--color-env-dev-fg: var(--env-dev-fg);
|
|
46
|
+
--color-env-demo: var(--env-demo);
|
|
47
|
+
--color-env-demo-fg: var(--env-demo-fg);
|
|
48
|
+
--color-env-staging: var(--env-staging);
|
|
49
|
+
--color-env-staging-fg: var(--env-staging-fg);
|
|
50
|
+
--color-env-test: var(--env-test);
|
|
51
|
+
--color-env-test-fg: var(--env-test-fg);
|
|
52
|
+
--color-env-cloud: var(--env-cloud);
|
|
53
|
+
--color-env-cloud-fg: var(--env-cloud-fg);
|
|
44
54
|
--color-sidebar: var(--sidebar);
|
|
45
55
|
--color-sidebar-ink: var(--sidebar-ink);
|
|
46
56
|
--color-sidebar-muted: var(--sidebar-muted);
|
|
@@ -73,6 +83,16 @@
|
|
|
73
83
|
--success-soft: #ecfdf5;
|
|
74
84
|
--warning: #d97706;
|
|
75
85
|
--warning-soft: #fffbeb;
|
|
86
|
+
--env-dev: #d97706;
|
|
87
|
+
--env-dev-fg: #18181b;
|
|
88
|
+
--env-demo: var(--accent);
|
|
89
|
+
--env-demo-fg: var(--accent-fg);
|
|
90
|
+
--env-staging: #6d28d9;
|
|
91
|
+
--env-staging-fg: #ffffff;
|
|
92
|
+
--env-test: #475569;
|
|
93
|
+
--env-test-fg: #ffffff;
|
|
94
|
+
--env-cloud: #1d4ed8;
|
|
95
|
+
--env-cloud-fg: #ffffff;
|
|
76
96
|
--sidebar: #fafafa;
|
|
77
97
|
--sidebar-ink: #18181b;
|
|
78
98
|
--sidebar-muted: #52525b;
|
|
@@ -105,6 +125,16 @@
|
|
|
105
125
|
--success-soft: #064e3b;
|
|
106
126
|
--warning: #fbbf24;
|
|
107
127
|
--warning-soft: #451a03;
|
|
128
|
+
--env-dev: #fbbf24;
|
|
129
|
+
--env-dev-fg: #451a03;
|
|
130
|
+
--env-demo: var(--accent);
|
|
131
|
+
--env-demo-fg: var(--accent-fg);
|
|
132
|
+
--env-staging: #a78bfa;
|
|
133
|
+
--env-staging-fg: #1e1b4b;
|
|
134
|
+
--env-test: #94a3b8;
|
|
135
|
+
--env-test-fg: #0f172a;
|
|
136
|
+
--env-cloud: #60a5fa;
|
|
137
|
+
--env-cloud-fg: #1e3a8a;
|
|
108
138
|
--sidebar: #0c0c0d;
|
|
109
139
|
--sidebar-ink: #fafafa;
|
|
110
140
|
--sidebar-muted: #a1a1aa;
|