@kelpie/ui 0.1.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 +661 -0
- package/README.md +44 -0
- package/dist/ServiceStatus.d.ts +6 -0
- package/dist/ServiceStatus.d.ts.map +1 -0
- package/dist/ServiceStatus.js +35 -0
- package/dist/ServiceStatus.js.map +1 -0
- package/dist/api/ApiProvider.d.ts +19 -0
- package/dist/api/ApiProvider.d.ts.map +1 -0
- package/dist/api/ApiProvider.js +18 -0
- package/dist/api/ApiProvider.js.map +1 -0
- package/dist/api/client.d.ts +83 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +162 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/context.d.ts +14 -0
- package/dist/api/context.d.ts.map +1 -0
- package/dist/api/context.js +20 -0
- package/dist/api/context.js.map +1 -0
- package/dist/api/errors.d.ts +9 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +14 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/health.d.ts +15 -0
- package/dist/api/health.d.ts.map +1 -0
- package/dist/api/health.js +22 -0
- package/dist/api/health.js.map +1 -0
- package/dist/api/json.d.ts +3 -0
- package/dist/api/json.d.ts.map +1 -0
- package/dist/api/json.js +5 -0
- package/dist/api/json.js.map +1 -0
- package/dist/api/queryClient.d.ts +17 -0
- package/dist/api/queryClient.d.ts.map +1 -0
- package/dist/api/queryClient.js +33 -0
- package/dist/api/queryClient.js.map +1 -0
- package/dist/api/resource.d.ts +110 -0
- package/dist/api/resource.d.ts.map +1 -0
- package/dist/api/resource.js +238 -0
- package/dist/api/resource.js.map +1 -0
- package/dist/api/resources/account.d.ts +49 -0
- package/dist/api/resources/account.d.ts.map +1 -0
- package/dist/api/resources/account.js +146 -0
- package/dist/api/resources/account.js.map +1 -0
- package/dist/api/resources/activities.d.ts +8 -0
- package/dist/api/resources/activities.d.ts.map +1 -0
- package/dist/api/resources/activities.js +21 -0
- package/dist/api/resources/activities.js.map +1 -0
- package/dist/api/resources/agentTasks.d.ts +31 -0
- package/dist/api/resources/agentTasks.d.ts.map +1 -0
- package/dist/api/resources/agentTasks.js +103 -0
- package/dist/api/resources/agentTasks.js.map +1 -0
- package/dist/api/resources/candidates.d.ts +17 -0
- package/dist/api/resources/candidates.d.ts.map +1 -0
- package/dist/api/resources/candidates.js +40 -0
- package/dist/api/resources/candidates.js.map +1 -0
- package/dist/api/resources/companies.d.ts +22 -0
- package/dist/api/resources/companies.d.ts.map +1 -0
- package/dist/api/resources/companies.js +36 -0
- package/dist/api/resources/companies.js.map +1 -0
- package/dist/api/resources/dashboard.d.ts +8 -0
- package/dist/api/resources/dashboard.d.ts.map +1 -0
- package/dist/api/resources/dashboard.js +27 -0
- package/dist/api/resources/dashboard.js.map +1 -0
- package/dist/api/resources/deals.d.ts +30 -0
- package/dist/api/resources/deals.d.ts.map +1 -0
- package/dist/api/resources/deals.js +38 -0
- package/dist/api/resources/deals.js.map +1 -0
- package/dist/api/resources/decisions.d.ts +13 -0
- package/dist/api/resources/decisions.d.ts.map +1 -0
- package/dist/api/resources/decisions.js +38 -0
- package/dist/api/resources/decisions.js.map +1 -0
- package/dist/api/resources/forms.d.ts +82 -0
- package/dist/api/resources/forms.d.ts.map +1 -0
- package/dist/api/resources/forms.js +129 -0
- package/dist/api/resources/forms.js.map +1 -0
- package/dist/api/resources/handbookPages.d.ts +33 -0
- package/dist/api/resources/handbookPages.d.ts.map +1 -0
- package/dist/api/resources/handbookPages.js +49 -0
- package/dist/api/resources/handbookPages.js.map +1 -0
- package/dist/api/resources/importJobs.d.ts +72 -0
- package/dist/api/resources/importJobs.d.ts.map +1 -0
- package/dist/api/resources/importJobs.js +145 -0
- package/dist/api/resources/importJobs.js.map +1 -0
- package/dist/api/resources/invites.d.ts +19 -0
- package/dist/api/resources/invites.d.ts.map +1 -0
- package/dist/api/resources/invites.js +78 -0
- package/dist/api/resources/invites.js.map +1 -0
- package/dist/api/resources/mcpTools.d.ts +8 -0
- package/dist/api/resources/mcpTools.d.ts.map +1 -0
- package/dist/api/resources/mcpTools.js +23 -0
- package/dist/api/resources/mcpTools.js.map +1 -0
- package/dist/api/resources/members.d.ts +40 -0
- package/dist/api/resources/members.d.ts.map +1 -0
- package/dist/api/resources/members.js +67 -0
- package/dist/api/resources/members.js.map +1 -0
- package/dist/api/resources/moduleSettings.d.ts +14 -0
- package/dist/api/resources/moduleSettings.d.ts.map +1 -0
- package/dist/api/resources/moduleSettings.js +43 -0
- package/dist/api/resources/moduleSettings.js.map +1 -0
- package/dist/api/resources/mutation.d.ts +18 -0
- package/dist/api/resources/mutation.d.ts.map +1 -0
- package/dist/api/resources/mutation.js +12 -0
- package/dist/api/resources/mutation.js.map +1 -0
- package/dist/api/resources/notes.d.ts +14 -0
- package/dist/api/resources/notes.d.ts.map +1 -0
- package/dist/api/resources/notes.js +39 -0
- package/dist/api/resources/notes.js.map +1 -0
- package/dist/api/resources/opportunities.d.ts +29 -0
- package/dist/api/resources/opportunities.d.ts.map +1 -0
- package/dist/api/resources/opportunities.js +38 -0
- package/dist/api/resources/opportunities.js.map +1 -0
- package/dist/api/resources/partnerships.d.ts +33 -0
- package/dist/api/resources/partnerships.d.ts.map +1 -0
- package/dist/api/resources/partnerships.js +39 -0
- package/dist/api/resources/partnerships.js.map +1 -0
- package/dist/api/resources/people.d.ts +22 -0
- package/dist/api/resources/people.d.ts.map +1 -0
- package/dist/api/resources/people.js +36 -0
- package/dist/api/resources/people.js.map +1 -0
- package/dist/api/resources/pipelineStages.d.ts +22 -0
- package/dist/api/resources/pipelineStages.d.ts.map +1 -0
- package/dist/api/resources/pipelineStages.js +61 -0
- package/dist/api/resources/pipelineStages.js.map +1 -0
- package/dist/api/resources/planItems.d.ts +31 -0
- package/dist/api/resources/planItems.d.ts.map +1 -0
- package/dist/api/resources/planItems.js +60 -0
- package/dist/api/resources/planItems.js.map +1 -0
- package/dist/api/resources/positions.d.ts +23 -0
- package/dist/api/resources/positions.d.ts.map +1 -0
- package/dist/api/resources/positions.js +31 -0
- package/dist/api/resources/positions.js.map +1 -0
- package/dist/api/resources/raises.d.ts +30 -0
- package/dist/api/resources/raises.d.ts.map +1 -0
- package/dist/api/resources/raises.js +38 -0
- package/dist/api/resources/raises.js.map +1 -0
- package/dist/api/resources/roles.d.ts +20 -0
- package/dist/api/resources/roles.d.ts.map +1 -0
- package/dist/api/resources/roles.js +31 -0
- package/dist/api/resources/roles.js.map +1 -0
- package/dist/api/resources/search.d.ts +12 -0
- package/dist/api/resources/search.d.ts.map +1 -0
- package/dist/api/resources/search.js +37 -0
- package/dist/api/resources/search.js.map +1 -0
- package/dist/api/resources/session.d.ts +58 -0
- package/dist/api/resources/session.d.ts.map +1 -0
- package/dist/api/resources/session.js +157 -0
- package/dist/api/resources/session.js.map +1 -0
- package/dist/api/resources/webhooks.d.ts +45 -0
- package/dist/api/resources/webhooks.d.ts.map +1 -0
- package/dist/api/resources/webhooks.js +106 -0
- package/dist/api/resources/webhooks.js.map +1 -0
- package/dist/api/resources/workspace.d.ts +20 -0
- package/dist/api/resources/workspace.d.ts.map +1 -0
- package/dist/api/resources/workspace.js +63 -0
- package/dist/api/resources/workspace.js.map +1 -0
- package/dist/app/KelpieApp.d.ts +18 -0
- package/dist/app/KelpieApp.d.ts.map +1 -0
- package/dist/app/KelpieApp.js +59 -0
- package/dist/app/KelpieApp.js.map +1 -0
- package/dist/app/SessionGate.d.ts +14 -0
- package/dist/app/SessionGate.d.ts.map +1 -0
- package/dist/app/SessionGate.js +33 -0
- package/dist/app/SessionGate.js.map +1 -0
- package/dist/components/ActivitiesPanel.d.ts +28 -0
- package/dist/components/ActivitiesPanel.d.ts.map +1 -0
- package/dist/components/ActivitiesPanel.js +75 -0
- package/dist/components/ActivitiesPanel.js.map +1 -0
- package/dist/components/AgentTasks.d.ts +16 -0
- package/dist/components/AgentTasks.d.ts.map +1 -0
- package/dist/components/AgentTasks.js +166 -0
- package/dist/components/AgentTasks.js.map +1 -0
- package/dist/components/Chip.d.ts +10 -0
- package/dist/components/Chip.d.ts.map +1 -0
- package/dist/components/Chip.js +21 -0
- package/dist/components/Chip.js.map +1 -0
- package/dist/components/CopyButton.d.ts +7 -0
- package/dist/components/CopyButton.d.ts.map +1 -0
- package/dist/components/CopyButton.js +30 -0
- package/dist/components/CopyButton.js.map +1 -0
- package/dist/components/DataTable.d.ts +36 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable.js +43 -0
- package/dist/components/DataTable.js.map +1 -0
- package/dist/components/DecisionsPanel.d.ts +14 -0
- package/dist/components/DecisionsPanel.d.ts.map +1 -0
- package/dist/components/DecisionsPanel.js +73 -0
- package/dist/components/DecisionsPanel.js.map +1 -0
- package/dist/components/DeleteRecord.d.ts +19 -0
- package/dist/components/DeleteRecord.d.ts.map +1 -0
- package/dist/components/DeleteRecord.js +22 -0
- package/dist/components/DeleteRecord.js.map +1 -0
- package/dist/components/EntitySearch.d.ts +33 -0
- package/dist/components/EntitySearch.d.ts.map +1 -0
- package/dist/components/EntitySearch.js +111 -0
- package/dist/components/EntitySearch.js.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +21 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +26 -0
- package/dist/components/ErrorBoundary.js.map +1 -0
- package/dist/components/InlineEdit.d.ts +37 -0
- package/dist/components/InlineEdit.d.ts.map +1 -0
- package/dist/components/InlineEdit.js +77 -0
- package/dist/components/InlineEdit.js.map +1 -0
- package/dist/components/KanbanBoard.d.ts +24 -0
- package/dist/components/KanbanBoard.d.ts.map +1 -0
- package/dist/components/KanbanBoard.js +92 -0
- package/dist/components/KanbanBoard.js.map +1 -0
- package/dist/components/MarkdownView.d.ts +4 -0
- package/dist/components/MarkdownView.d.ts.map +1 -0
- package/dist/components/MarkdownView.js +45 -0
- package/dist/components/MarkdownView.js.map +1 -0
- package/dist/components/NotesPanel.d.ts +17 -0
- package/dist/components/NotesPanel.d.ts.map +1 -0
- package/dist/components/NotesPanel.js +53 -0
- package/dist/components/NotesPanel.js.map +1 -0
- package/dist/components/PageHeader.d.ts +20 -0
- package/dist/components/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader.js +15 -0
- package/dist/components/PageHeader.js.map +1 -0
- package/dist/components/PhonesField.d.ts +7 -0
- package/dist/components/PhonesField.d.ts.map +1 -0
- package/dist/components/PhonesField.js +92 -0
- package/dist/components/PhonesField.js.map +1 -0
- package/dist/components/PlanAttention.d.ts +40 -0
- package/dist/components/PlanAttention.d.ts.map +1 -0
- package/dist/components/PlanAttention.js +86 -0
- package/dist/components/PlanAttention.js.map +1 -0
- package/dist/components/PlanPanel.d.ts +18 -0
- package/dist/components/PlanPanel.d.ts.map +1 -0
- package/dist/components/PlanPanel.js +102 -0
- package/dist/components/PlanPanel.js.map +1 -0
- package/dist/components/QueryState.d.ts +24 -0
- package/dist/components/QueryState.d.ts.map +1 -0
- package/dist/components/QueryState.js +34 -0
- package/dist/components/QueryState.js.map +1 -0
- package/dist/components/RecordTabs.d.ts +16 -0
- package/dist/components/RecordTabs.d.ts.map +1 -0
- package/dist/components/RecordTabs.js +15 -0
- package/dist/components/RecordTabs.js.map +1 -0
- package/dist/components/SectionHeader.d.ts +15 -0
- package/dist/components/SectionHeader.d.ts.map +1 -0
- package/dist/components/SectionHeader.js +14 -0
- package/dist/components/SectionHeader.js.map +1 -0
- package/dist/components/SegmentedControl.d.ts +13 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl.js +14 -0
- package/dist/components/SegmentedControl.js.map +1 -0
- package/dist/components/Shell.d.ts +2 -0
- package/dist/components/Shell.d.ts.map +1 -0
- package/dist/components/Shell.js +143 -0
- package/dist/components/Shell.js.map +1 -0
- package/dist/components/SidebarField.d.ts +8 -0
- package/dist/components/SidebarField.d.ts.map +1 -0
- package/dist/components/SidebarField.js +6 -0
- package/dist/components/SidebarField.js.map +1 -0
- package/dist/components/SocialProfilesField.d.ts +8 -0
- package/dist/components/SocialProfilesField.d.ts.map +1 -0
- package/dist/components/SocialProfilesField.js +176 -0
- package/dist/components/SocialProfilesField.js.map +1 -0
- package/dist/components/StageSettings.d.ts +16 -0
- package/dist/components/StageSettings.d.ts.map +1 -0
- package/dist/components/StageSettings.js +107 -0
- package/dist/components/StageSettings.js.map +1 -0
- package/dist/components/SummaryBlock.d.ts +12 -0
- package/dist/components/SummaryBlock.d.ts.map +1 -0
- package/dist/components/SummaryBlock.js +12 -0
- package/dist/components/SummaryBlock.js.map +1 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/dates.d.ts +26 -0
- package/dist/lib/dates.d.ts.map +1 -0
- package/dist/lib/dates.js +71 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/money.d.ts +7 -0
- package/dist/lib/money.d.ts.map +1 -0
- package/dist/lib/money.js +13 -0
- package/dist/lib/money.js.map +1 -0
- package/dist/lib/names.d.ts +9 -0
- package/dist/lib/names.d.ts.map +1 -0
- package/dist/lib/names.js +13 -0
- package/dist/lib/names.js.map +1 -0
- package/dist/lib/plan.d.ts +67 -0
- package/dist/lib/plan.d.ts.map +1 -0
- package/dist/lib/plan.js +96 -0
- package/dist/lib/plan.js.map +1 -0
- package/dist/lib/theme.d.ts +19 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/theme.js +30 -0
- package/dist/lib/theme.js.map +1 -0
- package/dist/pages/CompaniesPage.d.ts +2 -0
- package/dist/pages/CompaniesPage.d.ts.map +1 -0
- package/dist/pages/CompaniesPage.js +77 -0
- package/dist/pages/CompaniesPage.js.map +1 -0
- package/dist/pages/CompanyDetail.d.ts +2 -0
- package/dist/pages/CompanyDetail.d.ts.map +1 -0
- package/dist/pages/CompanyDetail.js +177 -0
- package/dist/pages/CompanyDetail.js.map +1 -0
- package/dist/pages/DealDetail.d.ts +2 -0
- package/dist/pages/DealDetail.d.ts.map +1 -0
- package/dist/pages/DealDetail.js +192 -0
- package/dist/pages/DealDetail.js.map +1 -0
- package/dist/pages/DealStageSettingsPage.d.ts +7 -0
- package/dist/pages/DealStageSettingsPage.d.ts.map +1 -0
- package/dist/pages/DealStageSettingsPage.js +38 -0
- package/dist/pages/DealStageSettingsPage.js.map +1 -0
- package/dist/pages/DealsPage.d.ts +2 -0
- package/dist/pages/DealsPage.d.ts.map +1 -0
- package/dist/pages/DealsPage.js +177 -0
- package/dist/pages/DealsPage.js.map +1 -0
- package/dist/pages/DecisionsPage.d.ts +2 -0
- package/dist/pages/DecisionsPage.d.ts.map +1 -0
- package/dist/pages/DecisionsPage.js +121 -0
- package/dist/pages/DecisionsPage.js.map +1 -0
- package/dist/pages/FormDetail.d.ts +2 -0
- package/dist/pages/FormDetail.d.ts.map +1 -0
- package/dist/pages/FormDetail.js +56 -0
- package/dist/pages/FormDetail.js.map +1 -0
- package/dist/pages/FormsPage.d.ts +2 -0
- package/dist/pages/FormsPage.d.ts.map +1 -0
- package/dist/pages/FormsPage.js +67 -0
- package/dist/pages/FormsPage.js.map +1 -0
- package/dist/pages/FundraisingPage.d.ts +2 -0
- package/dist/pages/FundraisingPage.d.ts.map +1 -0
- package/dist/pages/FundraisingPage.js +187 -0
- package/dist/pages/FundraisingPage.js.map +1 -0
- package/dist/pages/HiringPage.d.ts +9 -0
- package/dist/pages/HiringPage.d.ts.map +1 -0
- package/dist/pages/HiringPage.js +73 -0
- package/dist/pages/HiringPage.js.map +1 -0
- package/dist/pages/NotFoundPage.d.ts +10 -0
- package/dist/pages/NotFoundPage.d.ts.map +1 -0
- package/dist/pages/NotFoundPage.js +14 -0
- package/dist/pages/NotFoundPage.js.map +1 -0
- package/dist/pages/OpportunitiesPage.d.ts +2 -0
- package/dist/pages/OpportunitiesPage.d.ts.map +1 -0
- package/dist/pages/OpportunitiesPage.js +184 -0
- package/dist/pages/OpportunitiesPage.js.map +1 -0
- package/dist/pages/OpportunityDetail.d.ts +2 -0
- package/dist/pages/OpportunityDetail.d.ts.map +1 -0
- package/dist/pages/OpportunityDetail.js +132 -0
- package/dist/pages/OpportunityDetail.js.map +1 -0
- package/dist/pages/OpportunityStageSettingsPage.d.ts +3 -0
- package/dist/pages/OpportunityStageSettingsPage.d.ts.map +1 -0
- package/dist/pages/OpportunityStageSettingsPage.js +34 -0
- package/dist/pages/OpportunityStageSettingsPage.js.map +1 -0
- package/dist/pages/PartnershipDetail.d.ts +2 -0
- package/dist/pages/PartnershipDetail.d.ts.map +1 -0
- package/dist/pages/PartnershipDetail.js +179 -0
- package/dist/pages/PartnershipDetail.js.map +1 -0
- package/dist/pages/PartnershipStageSettingsPage.d.ts +3 -0
- package/dist/pages/PartnershipStageSettingsPage.d.ts.map +1 -0
- package/dist/pages/PartnershipStageSettingsPage.js +34 -0
- package/dist/pages/PartnershipStageSettingsPage.js.map +1 -0
- package/dist/pages/PartnershipsPage.d.ts +2 -0
- package/dist/pages/PartnershipsPage.d.ts.map +1 -0
- package/dist/pages/PartnershipsPage.js +182 -0
- package/dist/pages/PartnershipsPage.js.map +1 -0
- package/dist/pages/PeoplePage.d.ts +10 -0
- package/dist/pages/PeoplePage.d.ts.map +1 -0
- package/dist/pages/PeoplePage.js +71 -0
- package/dist/pages/PeoplePage.js.map +1 -0
- package/dist/pages/PersonDetail.d.ts +2 -0
- package/dist/pages/PersonDetail.d.ts.map +1 -0
- package/dist/pages/PersonDetail.js +193 -0
- package/dist/pages/PersonDetail.js.map +1 -0
- package/dist/pages/PlanningPage.d.ts +2 -0
- package/dist/pages/PlanningPage.d.ts.map +1 -0
- package/dist/pages/PlanningPage.js +112 -0
- package/dist/pages/PlanningPage.js.map +1 -0
- package/dist/pages/RaiseDetail.d.ts +2 -0
- package/dist/pages/RaiseDetail.d.ts.map +1 -0
- package/dist/pages/RaiseDetail.js +198 -0
- package/dist/pages/RaiseDetail.js.map +1 -0
- package/dist/pages/RaiseStageSettingsPage.d.ts +3 -0
- package/dist/pages/RaiseStageSettingsPage.d.ts.map +1 -0
- package/dist/pages/RaiseStageSettingsPage.js +34 -0
- package/dist/pages/RaiseStageSettingsPage.js.map +1 -0
- package/dist/pages/RoleDetail.d.ts +2 -0
- package/dist/pages/RoleDetail.d.ts.map +1 -0
- package/dist/pages/RoleDetail.js +177 -0
- package/dist/pages/RoleDetail.js.map +1 -0
- package/dist/pages/SearchPage.d.ts +2 -0
- package/dist/pages/SearchPage.d.ts.map +1 -0
- package/dist/pages/SearchPage.js +51 -0
- package/dist/pages/SearchPage.js.map +1 -0
- package/dist/pages/account/AccountLayout.d.ts +2 -0
- package/dist/pages/account/AccountLayout.d.ts.map +1 -0
- package/dist/pages/account/AccountLayout.js +25 -0
- package/dist/pages/account/AccountLayout.js.map +1 -0
- package/dist/pages/account/Field.d.ts +8 -0
- package/dist/pages/account/Field.d.ts.map +1 -0
- package/dist/pages/account/Field.js +6 -0
- package/dist/pages/account/Field.js.map +1 -0
- package/dist/pages/account/PreferencesPage.d.ts +2 -0
- package/dist/pages/account/PreferencesPage.d.ts.map +1 -0
- package/dist/pages/account/PreferencesPage.js +92 -0
- package/dist/pages/account/PreferencesPage.js.map +1 -0
- package/dist/pages/account/ProfilePage.d.ts +14 -0
- package/dist/pages/account/ProfilePage.d.ts.map +1 -0
- package/dist/pages/account/ProfilePage.js +71 -0
- package/dist/pages/account/ProfilePage.js.map +1 -0
- package/dist/pages/account/SecurityPage.d.ts +11 -0
- package/dist/pages/account/SecurityPage.d.ts.map +1 -0
- package/dist/pages/account/SecurityPage.js +78 -0
- package/dist/pages/account/SecurityPage.js.map +1 -0
- package/dist/pages/admin/DataPage.d.ts +3 -0
- package/dist/pages/admin/DataPage.d.ts.map +1 -0
- package/dist/pages/admin/DataPage.js +210 -0
- package/dist/pages/admin/DataPage.js.map +1 -0
- package/dist/pages/admin/McpPage.d.ts +2 -0
- package/dist/pages/admin/McpPage.d.ts.map +1 -0
- package/dist/pages/admin/McpPage.js +128 -0
- package/dist/pages/admin/McpPage.js.map +1 -0
- package/dist/pages/admin/ModulesPage.d.ts +2 -0
- package/dist/pages/admin/ModulesPage.d.ts.map +1 -0
- package/dist/pages/admin/ModulesPage.js +53 -0
- package/dist/pages/admin/ModulesPage.js.map +1 -0
- package/dist/pages/admin/TeamPage.d.ts +2 -0
- package/dist/pages/admin/TeamPage.d.ts.map +1 -0
- package/dist/pages/admin/TeamPage.js +99 -0
- package/dist/pages/admin/TeamPage.js.map +1 -0
- package/dist/pages/admin/WebhookDeliveries.d.ts +4 -0
- package/dist/pages/admin/WebhookDeliveries.d.ts.map +1 -0
- package/dist/pages/admin/WebhookDeliveries.js +88 -0
- package/dist/pages/admin/WebhookDeliveries.js.map +1 -0
- package/dist/pages/admin/WebhooksPage.d.ts +2 -0
- package/dist/pages/admin/WebhooksPage.d.ts.map +1 -0
- package/dist/pages/admin/WebhooksPage.js +152 -0
- package/dist/pages/admin/WebhooksPage.js.map +1 -0
- package/dist/pages/admin/WorkspaceSettingsPage.d.ts +2 -0
- package/dist/pages/admin/WorkspaceSettingsPage.d.ts.map +1 -0
- package/dist/pages/admin/WorkspaceSettingsPage.js +117 -0
- package/dist/pages/admin/WorkspaceSettingsPage.js.map +1 -0
- package/dist/pages/auth/AuthForm.d.ts +46 -0
- package/dist/pages/auth/AuthForm.d.ts.map +1 -0
- package/dist/pages/auth/AuthForm.js +32 -0
- package/dist/pages/auth/AuthForm.js.map +1 -0
- package/dist/pages/auth/AuthLayout.d.ts +24 -0
- package/dist/pages/auth/AuthLayout.d.ts.map +1 -0
- package/dist/pages/auth/AuthLayout.js +19 -0
- package/dist/pages/auth/AuthLayout.js.map +1 -0
- package/dist/pages/auth/ForgotPasswordPage.d.ts +13 -0
- package/dist/pages/auth/ForgotPasswordPage.d.ts.map +1 -0
- package/dist/pages/auth/ForgotPasswordPage.js +39 -0
- package/dist/pages/auth/ForgotPasswordPage.js.map +1 -0
- package/dist/pages/auth/JoinPage.d.ts +12 -0
- package/dist/pages/auth/JoinPage.d.ts.map +1 -0
- package/dist/pages/auth/JoinPage.js +43 -0
- package/dist/pages/auth/JoinPage.js.map +1 -0
- package/dist/pages/auth/ResetPasswordPage.d.ts +13 -0
- package/dist/pages/auth/ResetPasswordPage.d.ts.map +1 -0
- package/dist/pages/auth/ResetPasswordPage.js +58 -0
- package/dist/pages/auth/ResetPasswordPage.js.map +1 -0
- package/dist/pages/auth/SignInPage.d.ts +2 -0
- package/dist/pages/auth/SignInPage.d.ts.map +1 -0
- package/dist/pages/auth/SignInPage.js +38 -0
- package/dist/pages/auth/SignInPage.js.map +1 -0
- package/dist/pages/auth/SignUpPage.d.ts +13 -0
- package/dist/pages/auth/SignUpPage.d.ts.map +1 -0
- package/dist/pages/auth/SignUpPage.js +43 -0
- package/dist/pages/auth/SignUpPage.js.map +1 -0
- package/dist/pages/candidateFields.d.ts +22 -0
- package/dist/pages/candidateFields.d.ts.map +1 -0
- package/dist/pages/candidateFields.js +82 -0
- package/dist/pages/candidateFields.js.map +1 -0
- package/dist/pages/dashboard/DashboardPage.d.ts +2 -0
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/pages/dashboard/DashboardPage.js +40 -0
- package/dist/pages/dashboard/DashboardPage.js.map +1 -0
- package/dist/pages/dashboard/attention.d.ts +41 -0
- package/dist/pages/dashboard/attention.d.ts.map +1 -0
- package/dist/pages/dashboard/attention.js +146 -0
- package/dist/pages/dashboard/attention.js.map +1 -0
- package/dist/pages/dashboard/sections.d.ts +20 -0
- package/dist/pages/dashboard/sections.d.ts.map +1 -0
- package/dist/pages/dashboard/sections.js +60 -0
- package/dist/pages/dashboard/sections.js.map +1 -0
- package/dist/pages/fields.d.ts +11 -0
- package/dist/pages/fields.d.ts.map +1 -0
- package/dist/pages/fields.js +17 -0
- package/dist/pages/fields.js.map +1 -0
- package/dist/pages/forms/EmbedPanel.d.ts +14 -0
- package/dist/pages/forms/EmbedPanel.d.ts.map +1 -0
- package/dist/pages/forms/EmbedPanel.js +19 -0
- package/dist/pages/forms/EmbedPanel.js.map +1 -0
- package/dist/pages/forms/FieldsEditor.d.ts +6 -0
- package/dist/pages/forms/FieldsEditor.d.ts.map +1 -0
- package/dist/pages/forms/FieldsEditor.js +115 -0
- package/dist/pages/forms/FieldsEditor.js.map +1 -0
- package/dist/pages/forms/FormSettings.d.ts +6 -0
- package/dist/pages/forms/FormSettings.d.ts.map +1 -0
- package/dist/pages/forms/FormSettings.js +47 -0
- package/dist/pages/forms/FormSettings.js.map +1 -0
- package/dist/pages/forms/SubmissionsTable.d.ts +8 -0
- package/dist/pages/forms/SubmissionsTable.d.ts.map +1 -0
- package/dist/pages/forms/SubmissionsTable.js +91 -0
- package/dist/pages/forms/SubmissionsTable.js.map +1 -0
- package/dist/pages/forms/fieldList.d.ts +70 -0
- package/dist/pages/forms/fieldList.d.ts.map +1 -0
- package/dist/pages/forms/fieldList.js +126 -0
- package/dist/pages/forms/fieldList.js.map +1 -0
- package/dist/pages/forms/template.d.ts +18 -0
- package/dist/pages/forms/template.d.ts.map +1 -0
- package/dist/pages/forms/template.js +34 -0
- package/dist/pages/forms/template.js.map +1 -0
- package/dist/pages/handbook/HandbookPage.d.ts +2 -0
- package/dist/pages/handbook/HandbookPage.d.ts.map +1 -0
- package/dist/pages/handbook/HandbookPage.js +197 -0
- package/dist/pages/handbook/HandbookPage.js.map +1 -0
- package/dist/pages/handbook/tree.d.ts +62 -0
- package/dist/pages/handbook/tree.d.ts.map +1 -0
- package/dist/pages/handbook/tree.js +222 -0
- package/dist/pages/handbook/tree.js.map +1 -0
- package/dist/pages/hiringDirectory.d.ts +60 -0
- package/dist/pages/hiringDirectory.d.ts.map +1 -0
- package/dist/pages/hiringDirectory.js +81 -0
- package/dist/pages/hiringDirectory.js.map +1 -0
- package/dist/pages/onboarding/HandbookStepPage.d.ts +14 -0
- package/dist/pages/onboarding/HandbookStepPage.d.ts.map +1 -0
- package/dist/pages/onboarding/HandbookStepPage.js +29 -0
- package/dist/pages/onboarding/HandbookStepPage.js.map +1 -0
- package/dist/pages/onboarding/InvitesStepPage.d.ts +2 -0
- package/dist/pages/onboarding/InvitesStepPage.d.ts.map +1 -0
- package/dist/pages/onboarding/InvitesStepPage.js +77 -0
- package/dist/pages/onboarding/InvitesStepPage.js.map +1 -0
- package/dist/pages/onboarding/WorkspaceStepPage.d.ts +2 -0
- package/dist/pages/onboarding/WorkspaceStepPage.d.ts.map +1 -0
- package/dist/pages/onboarding/WorkspaceStepPage.js +72 -0
- package/dist/pages/onboarding/WorkspaceStepPage.js.map +1 -0
- package/dist/pages/positionDirectory.d.ts +20 -0
- package/dist/pages/positionDirectory.d.ts.map +1 -0
- package/dist/pages/positionDirectory.js +58 -0
- package/dist/pages/positionDirectory.js.map +1 -0
- package/dist/registry/UiExtensionProvider.d.ts +12 -0
- package/dist/registry/UiExtensionProvider.d.ts.map +1 -0
- package/dist/registry/UiExtensionProvider.js +10 -0
- package/dist/registry/UiExtensionProvider.js.map +1 -0
- package/dist/registry/context.d.ts +31 -0
- package/dist/registry/context.d.ts.map +1 -0
- package/dist/registry/context.js +45 -0
- package/dist/registry/context.js.map +1 -0
- package/dist/registry/contributions.d.ts +71 -0
- package/dist/registry/contributions.d.ts.map +1 -0
- package/dist/registry/contributions.js +25 -0
- package/dist/registry/contributions.js.map +1 -0
- package/dist/registry/overridable.d.ts +27 -0
- package/dist/registry/overridable.d.ts.map +1 -0
- package/dist/registry/overridable.js +29 -0
- package/dist/registry/overridable.js.map +1 -0
- package/dist/registry/registry.d.ts +68 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +112 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/testing/inputs.d.ts +13 -0
- package/dist/testing/inputs.d.ts.map +1 -0
- package/dist/testing/inputs.js +16 -0
- package/dist/testing/inputs.js.map +1 -0
- package/dist/testing/stubClient.d.ts +42 -0
- package/dist/testing/stubClient.d.ts.map +1 -0
- package/dist/testing/stubClient.js +29 -0
- package/dist/testing/stubClient.js.map +1 -0
- package/package.json +73 -0
- package/src/ServiceStatus.tsx +61 -0
- package/src/api/ApiProvider.tsx +40 -0
- package/src/api/client.ts +267 -0
- package/src/api/context.ts +25 -0
- package/src/api/errors.ts +14 -0
- package/src/api/health.ts +38 -0
- package/src/api/json.ts +4 -0
- package/src/api/queryClient.ts +35 -0
- package/src/api/resource.ts +412 -0
- package/src/api/resources/account.ts +220 -0
- package/src/api/resources/activities.ts +31 -0
- package/src/api/resources/agentTasks.ts +172 -0
- package/src/api/resources/candidates.ts +69 -0
- package/src/api/resources/companies.ts +72 -0
- package/src/api/resources/dashboard.ts +39 -0
- package/src/api/resources/deals.ts +82 -0
- package/src/api/resources/decisions.ts +60 -0
- package/src/api/resources/forms.ts +218 -0
- package/src/api/resources/handbookPages.ts +77 -0
- package/src/api/resources/importJobs.ts +229 -0
- package/src/api/resources/invites.ts +112 -0
- package/src/api/resources/mcpTools.ts +28 -0
- package/src/api/resources/members.ts +105 -0
- package/src/api/resources/moduleSettings.ts +67 -0
- package/src/api/resources/mutation.ts +31 -0
- package/src/api/resources/notes.ts +62 -0
- package/src/api/resources/opportunities.ts +84 -0
- package/src/api/resources/partnerships.ts +89 -0
- package/src/api/resources/people.ts +72 -0
- package/src/api/resources/pipelineStages.ts +93 -0
- package/src/api/resources/planItems.ts +103 -0
- package/src/api/resources/positions.ts +70 -0
- package/src/api/resources/raises.ts +82 -0
- package/src/api/resources/roles.ts +65 -0
- package/src/api/resources/search.ts +49 -0
- package/src/api/resources/session.ts +220 -0
- package/src/api/resources/webhooks.ts +157 -0
- package/src/api/resources/workspace.ts +81 -0
- package/src/app/KelpieApp.tsx +162 -0
- package/src/app/SessionGate.tsx +42 -0
- package/src/components/ActivitiesPanel.tsx +235 -0
- package/src/components/AgentTasks.tsx +473 -0
- package/src/components/Chip.tsx +36 -0
- package/src/components/CopyButton.tsx +48 -0
- package/src/components/DataTable.tsx +209 -0
- package/src/components/DecisionsPanel.tsx +233 -0
- package/src/components/DeleteRecord.tsx +73 -0
- package/src/components/EntitySearch.tsx +268 -0
- package/src/components/ErrorBoundary.tsx +58 -0
- package/src/components/InlineEdit.tsx +179 -0
- package/src/components/KanbanBoard.tsx +234 -0
- package/src/components/MarkdownView.tsx +73 -0
- package/src/components/NotesPanel.tsx +169 -0
- package/src/components/PageHeader.tsx +61 -0
- package/src/components/PhonesField.tsx +204 -0
- package/src/components/PlanAttention.tsx +249 -0
- package/src/components/PlanPanel.tsx +317 -0
- package/src/components/QueryState.tsx +83 -0
- package/src/components/RecordTabs.tsx +69 -0
- package/src/components/SectionHeader.tsx +63 -0
- package/src/components/SegmentedControl.tsx +48 -0
- package/src/components/Shell.tsx +300 -0
- package/src/components/SidebarField.tsx +18 -0
- package/src/components/SocialProfilesField.tsx +356 -0
- package/src/components/StageSettings.tsx +319 -0
- package/src/components/SummaryBlock.tsx +27 -0
- package/src/index.ts +190 -0
- package/src/lib/dates.ts +90 -0
- package/src/lib/money.ts +12 -0
- package/src/lib/names.ts +13 -0
- package/src/lib/plan.ts +147 -0
- package/src/lib/theme.ts +53 -0
- package/src/pages/CompaniesPage.tsx +143 -0
- package/src/pages/CompanyDetail.tsx +502 -0
- package/src/pages/DealDetail.tsx +512 -0
- package/src/pages/DealStageSettingsPage.tsx +67 -0
- package/src/pages/DealsPage.tsx +342 -0
- package/src/pages/DecisionsPage.tsx +211 -0
- package/src/pages/FormDetail.tsx +130 -0
- package/src/pages/FormsPage.tsx +151 -0
- package/src/pages/FundraisingPage.tsx +354 -0
- package/src/pages/HiringPage.tsx +169 -0
- package/src/pages/NotFoundPage.tsx +27 -0
- package/src/pages/OpportunitiesPage.tsx +349 -0
- package/src/pages/OpportunityDetail.tsx +337 -0
- package/src/pages/OpportunityStageSettingsPage.tsx +63 -0
- package/src/pages/PartnershipDetail.tsx +490 -0
- package/src/pages/PartnershipStageSettingsPage.tsx +63 -0
- package/src/pages/PartnershipsPage.tsx +353 -0
- package/src/pages/PeoplePage.tsx +145 -0
- package/src/pages/PersonDetail.tsx +526 -0
- package/src/pages/PlanningPage.tsx +318 -0
- package/src/pages/RaiseDetail.tsx +498 -0
- package/src/pages/RaiseStageSettingsPage.tsx +63 -0
- package/src/pages/RoleDetail.tsx +455 -0
- package/src/pages/SearchPage.tsx +135 -0
- package/src/pages/account/AccountLayout.tsx +38 -0
- package/src/pages/account/Field.tsx +20 -0
- package/src/pages/account/PreferencesPage.tsx +224 -0
- package/src/pages/account/ProfilePage.tsx +147 -0
- package/src/pages/account/SecurityPage.tsx +237 -0
- package/src/pages/admin/DataPage.tsx +772 -0
- package/src/pages/admin/McpPage.tsx +404 -0
- package/src/pages/admin/ModulesPage.tsx +113 -0
- package/src/pages/admin/TeamPage.tsx +386 -0
- package/src/pages/admin/WebhookDeliveries.tsx +184 -0
- package/src/pages/admin/WebhooksPage.tsx +443 -0
- package/src/pages/admin/WorkspaceSettingsPage.tsx +274 -0
- package/src/pages/auth/AuthForm.tsx +118 -0
- package/src/pages/auth/AuthLayout.tsx +74 -0
- package/src/pages/auth/ForgotPasswordPage.tsx +80 -0
- package/src/pages/auth/JoinPage.tsx +85 -0
- package/src/pages/auth/ResetPasswordPage.tsx +124 -0
- package/src/pages/auth/SignInPage.tsx +83 -0
- package/src/pages/auth/SignUpPage.tsx +93 -0
- package/src/pages/candidateFields.tsx +175 -0
- package/src/pages/dashboard/DashboardPage.tsx +108 -0
- package/src/pages/dashboard/attention.ts +206 -0
- package/src/pages/dashboard/sections.tsx +269 -0
- package/src/pages/fields.ts +21 -0
- package/src/pages/forms/EmbedPanel.tsx +95 -0
- package/src/pages/forms/FieldsEditor.tsx +412 -0
- package/src/pages/forms/FormSettings.tsx +159 -0
- package/src/pages/forms/SubmissionsTable.tsx +171 -0
- package/src/pages/forms/fieldList.ts +209 -0
- package/src/pages/forms/template.ts +37 -0
- package/src/pages/handbook/HandbookPage.tsx +500 -0
- package/src/pages/handbook/tree.ts +327 -0
- package/src/pages/hiringDirectory.ts +146 -0
- package/src/pages/onboarding/HandbookStepPage.tsx +75 -0
- package/src/pages/onboarding/InvitesStepPage.tsx +180 -0
- package/src/pages/onboarding/WorkspaceStepPage.tsx +122 -0
- package/src/pages/positionDirectory.ts +98 -0
- package/src/registry/UiExtensionProvider.tsx +20 -0
- package/src/registry/context.ts +67 -0
- package/src/registry/contributions.ts +89 -0
- package/src/registry/overridable.ts +62 -0
- package/src/registry/registry.ts +204 -0
- package/src/styles.css +175 -0
- package/src/testing/inputs.ts +18 -0
- package/src/testing/stubClient.ts +78 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useCandidates } from '../api/resources/candidates.js';
|
|
3
|
+
import { useNotes } from '../api/resources/notes.js';
|
|
4
|
+
import { usePeople } from '../api/resources/people.js';
|
|
5
|
+
import { useRoles } from '../api/resources/roles.js';
|
|
6
|
+
/**
|
|
7
|
+
* The counts and names the hiring pages need beside their own records.
|
|
8
|
+
*
|
|
9
|
+
* A candidacy carries two ids and no words, so every page showing one needs a
|
|
10
|
+
* second resource to render it. `api.md` has no include-expansion; it has
|
|
11
|
+
* repeatable id filters, so each of these asks about exactly the rows on screen:
|
|
12
|
+
* one extra request for the page rather than one per row.
|
|
13
|
+
*/
|
|
14
|
+
/** `api.md`: `?limit=` and an id filter both max out at 200. */
|
|
15
|
+
const MAX_PAGE = 200;
|
|
16
|
+
export function useRoleCandidateCounts(roleIds) {
|
|
17
|
+
const candidates = useCandidates({ roleIds, limit: MAX_PAGE }, { enabled: roleIds.length > 0 });
|
|
18
|
+
const countByRole = useMemo(() => {
|
|
19
|
+
const counts = new Map();
|
|
20
|
+
for (const candidate of candidates.records) {
|
|
21
|
+
counts.set(candidate.roleId, (counts.get(candidate.roleId) ?? 0) + 1);
|
|
22
|
+
}
|
|
23
|
+
return counts;
|
|
24
|
+
}, [candidates.records]);
|
|
25
|
+
return {
|
|
26
|
+
countFor: (roleId) => countByRole.get(roleId) ?? 0,
|
|
27
|
+
isLoading: candidates.isLoading,
|
|
28
|
+
isComplete: !candidates.hasMore,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The most recent note on each candidate in a pipeline.
|
|
33
|
+
*
|
|
34
|
+
* One request for the whole list rather than one per row. `?target_id=` on notes
|
|
35
|
+
* repeats to name a set, so a page rendering a note per candidate resolves them
|
|
36
|
+
* the way every other related column here does.
|
|
37
|
+
*/
|
|
38
|
+
export function useCandidateNotes(candidateIds) {
|
|
39
|
+
const notes = useNotes({ targetType: 'candidate', targetIds: candidateIds, limit: MAX_PAGE }, { enabled: candidateIds.length > 0 });
|
|
40
|
+
const newestByCandidate = useMemo(() => {
|
|
41
|
+
const newest = new Map();
|
|
42
|
+
// `-created_at` is the default sort, so the first note seen for a candidate
|
|
43
|
+
// is theirs to show and anything later is older.
|
|
44
|
+
for (const note of notes.records) {
|
|
45
|
+
if (!newest.has(note.targetId)) {
|
|
46
|
+
newest.set(note.targetId, note);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return newest;
|
|
50
|
+
}, [notes.records]);
|
|
51
|
+
return {
|
|
52
|
+
noteFor: (candidateId) => newestByCandidate.get(candidateId),
|
|
53
|
+
isLoading: notes.isLoading,
|
|
54
|
+
isComplete: !notes.hasMore,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Titles for the roles a person is up for.
|
|
59
|
+
*
|
|
60
|
+
* The whole first page rather than an id filter, because `/v1/roles` has no
|
|
61
|
+
* `?id=` and a workspace's open roles are few. A title missing past that page
|
|
62
|
+
* falls back to the id, which is wrong-looking rather than silently blank.
|
|
63
|
+
*/
|
|
64
|
+
export function useRoleTitles() {
|
|
65
|
+
const roles = useRoles({ limit: MAX_PAGE });
|
|
66
|
+
const titleById = useMemo(() => new Map(roles.records.map((role) => [role.id, role.title])), [roles.records]);
|
|
67
|
+
return { titleFor: (roleId) => titleById.get(roleId), isLoading: roles.isLoading };
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Names for a set of people, from the directory's first page.
|
|
71
|
+
*
|
|
72
|
+
* `/v1/people` has no `?id=` filter, so this is the same compromise
|
|
73
|
+
* `RaiseKeyPeople` makes: past the first page a name is missing rather than
|
|
74
|
+
* wrong, and the caller falls back to the id instead of rendering a blank.
|
|
75
|
+
*/
|
|
76
|
+
export function usePersonNames() {
|
|
77
|
+
const people = usePeople({ limit: MAX_PAGE });
|
|
78
|
+
const nameById = useMemo(() => new Map(people.records.map((person) => [person.id, person.name])), [people.records]);
|
|
79
|
+
return { nameFor: (personId) => nameById.get(personId), isLoading: people.isLoading };
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=hiringDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hiringDirectory.js","sourceRoot":"","sources":["../../src/pages/hiringDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEpD;;;;;;;GAOG;AAEH,gEAAgE;AAChE,MAAM,QAAQ,GAAG,GAAG,CAAA;AAapB,MAAM,UAAU,sBAAsB,CAAC,OAA0B;IAC/D,MAAM,UAAU,GAAG,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAA;IAE/F,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;QAExC,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,CAAC,SA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handbook.
|
|
3
|
+
*
|
|
4
|
+
* The mockup's button created these pages. Against the real API they already
|
|
5
|
+
* exist: `POST /v1/workspaces` seeded them in the same transaction that created
|
|
6
|
+
* the workspace, two steps ago. So this reads them back and shows what is there.
|
|
7
|
+
*
|
|
8
|
+
* That is the deviation, and it is the honest one. A button labelled "create"
|
|
9
|
+
* that creates nothing teaches a reader something false about the product, and
|
|
10
|
+
* the alternative — deleting the step — would drop the one screen that tells a
|
|
11
|
+
* new workspace its handbook is what agents read.
|
|
12
|
+
*/
|
|
13
|
+
export declare function HandbookStepPage(): React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=HandbookStepPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandbookStepPage.d.ts","sourceRoot":"","sources":["../../../src/pages/onboarding/HandbookStepPage.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAuDpD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate } from 'react-router';
|
|
3
|
+
import { useHandbookPages } from '../../api/resources/handbookPages.js';
|
|
4
|
+
import { ErrorPanel, LoadingPanel } from '../../components/QueryState.js';
|
|
5
|
+
import { PrimaryButton } from '../auth/AuthForm.js';
|
|
6
|
+
import { AuthLayout } from '../auth/AuthLayout.js';
|
|
7
|
+
/**
|
|
8
|
+
* Onboarding step 3: the starter handbook.
|
|
9
|
+
*
|
|
10
|
+
* The mockup's button created these pages. Against the real API they already
|
|
11
|
+
* exist: `POST /v1/workspaces` seeded them in the same transaction that created
|
|
12
|
+
* the workspace, two steps ago. So this reads them back and shows what is there.
|
|
13
|
+
*
|
|
14
|
+
* That is the deviation, and it is the honest one. A button labelled "create"
|
|
15
|
+
* that creates nothing teaches a reader something false about the product, and
|
|
16
|
+
* the alternative — deleting the step — would drop the one screen that tells a
|
|
17
|
+
* new workspace its handbook is what agents read.
|
|
18
|
+
*/
|
|
19
|
+
export function HandbookStepPage() {
|
|
20
|
+
const navigate = useNavigate();
|
|
21
|
+
const { records: pages, isLoading, error } = useHandbookPages();
|
|
22
|
+
function finish() {
|
|
23
|
+
// The wizard ends on the dashboard, per `onboarding.md`. It is empty for a
|
|
24
|
+
// brand new workspace, which is the point: it says what there is to fill in.
|
|
25
|
+
navigate('/dashboard', { replace: true });
|
|
26
|
+
}
|
|
27
|
+
return (_jsx(AuthLayout, { step: 3, title: "Your starter handbook", description: "These markdown pages are ready. Agents read them to learn what your company is.", children: _jsxs("div", { className: "mt-5 space-y-4", children: [error !== null && _jsx(ErrorPanel, { error: error }), error === null && isLoading && _jsx(LoadingPanel, { label: "Loading your handbook\u2026" }), error === null && !isLoading && pages.length > 0 && (_jsx("ul", { className: "max-h-56 overflow-y-auto rounded-md border border-border bg-surface", children: pages.map((page) => (_jsx("li", { className: "border-b border-border px-3 py-2 text-[13px] text-ink last:border-0", children: page.title }, page.id))) })), error === null && !isLoading && pages.length === 0 && (_jsx("p", { className: "rounded-md border border-border bg-surface px-3 py-2 text-[13px] text-ink-muted", children: "This workspace has no handbook pages. That is not what a new workspace should look like \u2014 the Handbook tab is where to add them." })), pages.length > 0 && (_jsx("p", { className: "text-[12px] text-ink-muted", children: "Every page starts as a stub. Write them from the Handbook tab whenever you are ready." })), _jsx(PrimaryButton, { label: "Go to Kelpie", onClick: finish })] }) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=HandbookStepPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandbookStepPage.js","sourceRoot":"","sources":["../../../src/pages/onboarding/HandbookStepPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,OAAO,EAAE,UAAU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AG,SAAS,EAAC,4BAA4B,sGAErC,CACL,EAID,KAAC,aAAa,IAAC,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,MAAM,GAAI,IACnD,GACK,CACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitesStepPage.d.ts","sourceRoot":"","sources":["../../../src/pages/onboarding/InvitesStepPage.tsx"],"names":[],"mappings":"AAsCA,wBAAgB,eAAe,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAkGnD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { INVITABLE_ROLES } from '@kelpie/schemas';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useNavigate } from 'react-router';
|
|
5
|
+
import { useSendInvite } from '../../api/resources/invites.js';
|
|
6
|
+
import { AUTH_INPUT_CLASS, SecondaryButton, SubmitButton } from '../auth/AuthForm.js';
|
|
7
|
+
import { AuthLayout } from '../auth/AuthLayout.js';
|
|
8
|
+
function emptyRow() {
|
|
9
|
+
return { email: '', role: 'member', sent: false, failure: null };
|
|
10
|
+
}
|
|
11
|
+
/** A row worth sending: it has an address and has not already been accepted. */
|
|
12
|
+
function isOutstanding(row) {
|
|
13
|
+
return row.email.trim().length > 0 && !row.sent;
|
|
14
|
+
}
|
|
15
|
+
export function InvitesStepPage() {
|
|
16
|
+
const navigate = useNavigate();
|
|
17
|
+
const sendInvite = useSendInvite();
|
|
18
|
+
const [rows, setRows] = useState([emptyRow()]);
|
|
19
|
+
function changeRow(index, changes) {
|
|
20
|
+
setRows((previous) => previous.map((row, at) => (at === index ? { ...row, ...changes } : row)));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sends every outstanding row, one at a time, and reports each result on its
|
|
24
|
+
* own row. Sequential rather than concurrent: a person reading a list of
|
|
25
|
+
* failures wants them in the order they typed the addresses.
|
|
26
|
+
*/
|
|
27
|
+
async function sendOutstanding() {
|
|
28
|
+
let allSent = true;
|
|
29
|
+
for (const [index, row] of rows.entries()) {
|
|
30
|
+
if (!isOutstanding(row)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
await sendInvite.runAsync({ email: row.email.trim(), role: row.role });
|
|
35
|
+
changeRow(index, { sent: true, failure: null });
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
allSent = false;
|
|
39
|
+
changeRow(index, {
|
|
40
|
+
failure: error instanceof Error ? error.message : 'Could not send this invitation.',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return allSent;
|
|
45
|
+
}
|
|
46
|
+
function submit(event) {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
sendOutstanding()
|
|
49
|
+
.then((allSent) => {
|
|
50
|
+
if (allSent) {
|
|
51
|
+
navigate('/onboarding/handbook', { replace: true });
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
.catch(() => undefined);
|
|
55
|
+
}
|
|
56
|
+
const outstanding = rows.filter(isOutstanding).length;
|
|
57
|
+
return (_jsx(AuthLayout, { step: 2, title: "Invite teammates", description: "Optional. You can always invite people later from Admin \u2192 Team.", children: _jsxs("form", { onSubmit: submit, className: "mt-5 space-y-3", children: [rows.map((row, index) => (_jsx(InviteRowFields
|
|
58
|
+
// Rows are only appended, so the position is stable for the life of
|
|
59
|
+
// the page and identifies the row a result belongs to.
|
|
60
|
+
, { row: row, onChange: (changes) => {
|
|
61
|
+
changeRow(index, changes);
|
|
62
|
+
} }, index))), _jsx("button", { type: "button", onClick: () => {
|
|
63
|
+
setRows((previous) => [...previous, emptyRow()]);
|
|
64
|
+
}, className: "text-[12px] font-medium text-accent hover:underline", children: "Add another" }), _jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [_jsx(SubmitButton, { label: outstanding === 0 ? 'Continue' : 'Send invitations', pendingLabel: "Sending\u2026", isPending: sendInvite.isPending }), _jsx(SecondaryButton, { label: "Skip for now", disabled: sendInvite.isPending, onClick: () => {
|
|
65
|
+
navigate('/onboarding/handbook', { replace: true });
|
|
66
|
+
} })] })] }) }));
|
|
67
|
+
}
|
|
68
|
+
function InviteRowFields({ row, onChange, }) {
|
|
69
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2", children: [_jsx("input", { type: "email", value: row.email, onChange: (event) => {
|
|
70
|
+
// Editing an address makes it a different invitation, so a failure
|
|
71
|
+
// recorded against the old one no longer applies.
|
|
72
|
+
onChange({ email: event.target.value, failure: null });
|
|
73
|
+
}, disabled: row.sent, placeholder: "colleague@company.com", className: `min-w-0 flex-1 ${AUTH_INPUT_CLASS} disabled:opacity-60` }), _jsx("select", { value: row.role, onChange: (event) => {
|
|
74
|
+
onChange({ role: event.target.value });
|
|
75
|
+
}, disabled: row.sent, className: "rounded-md border border-border bg-surface px-2 py-2 text-[12px] outline-none focus:border-accent disabled:opacity-60", children: INVITABLE_ROLES.map((role) => (_jsx("option", { value: role, children: role === 'admin' ? 'Admin' : 'Member' }, role))) })] }), row.sent && _jsx("p", { className: "mt-1 text-[11px] font-medium text-success", children: "Invitation sent" }), row.failure !== null && _jsx("p", { className: "mt-1 text-[11px] text-danger", children: row.failure })] }));
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=InvitesStepPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitesStepPage.js","sourceRoot":"","sources":["../../../src/pages/onboarding/InvitesStepPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,E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EAAE,GAAG,CAAC,IAAI,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;4BAClB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAsB,EAAE,CAAC,CAAA;wBACzD,CAAC,EACD,QAAQ,EAAE,GAAG,CAAC,IAAI,EAClB,SAAS,EAAC,uHAAuH,YAEhI,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC7B,iBAAmB,KAAK,EAAE,IAAI,YAC3B,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,IAD3B,IAAI,CAER,CACV,CAAC,GACK,IACL,EACL,GAAG,CAAC,IAAI,IAAI,YAAG,SAAS,EAAC,2CAA2C,gCAAoB,EACxF,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,YAAG,SAAS,EAAC,8BAA8B,YAAE,GAAG,CAAC,OAAO,GAAK,IAClF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceStepPage.d.ts","sourceRoot":"","sources":["../../../src/pages/onboarding/WorkspaceStepPage.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,iBAAiB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CA2ErD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Link, Navigate, useNavigate } from 'react-router';
|
|
4
|
+
import { useCreateWorkspace, useSession } from '../../api/resources/session.js';
|
|
5
|
+
import { ErrorPanel } from '../../components/QueryState.js';
|
|
6
|
+
import { SubmitButton, TextField } from '../auth/AuthForm.js';
|
|
7
|
+
import { AuthLayout } from '../auth/AuthLayout.js';
|
|
8
|
+
/**
|
|
9
|
+
* Onboarding step 1: the workspace, against `POST /v1/workspaces`.
|
|
10
|
+
*
|
|
11
|
+
* This is the step the rest of the app waits on. Signup creates an account and
|
|
12
|
+
* no workspace, so until this succeeds every CRM endpoint answers `403`, and
|
|
13
|
+
* `SessionGate` sends anyone in that state here.
|
|
14
|
+
*
|
|
15
|
+
* One request does the whole thing: the service seeds the starter handbook and
|
|
16
|
+
* the pipeline stages in the same transaction and moves this session into the
|
|
17
|
+
* new workspace. There is nothing to re-login for and nothing to create next.
|
|
18
|
+
*
|
|
19
|
+
* It sits outside `SessionGate`, because being sent here *is* what the gate does
|
|
20
|
+
* with an account that has no workspace, so gating it would loop. That leaves
|
|
21
|
+
* the signed-out case to the page: without this check, somebody arriving here
|
|
22
|
+
* signed out fills in a form whose only possible answer is `401`.
|
|
23
|
+
*/
|
|
24
|
+
/** The rule the API enforces: lowercase letters, digits, and hyphens. */
|
|
25
|
+
function slugify(name) {
|
|
26
|
+
return name
|
|
27
|
+
.toLowerCase()
|
|
28
|
+
.replace(/[^a-z0-9]+/gu, '-')
|
|
29
|
+
.replace(/^-+|-+$/gu, '')
|
|
30
|
+
.slice(0, 63);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The zone the browser is in.
|
|
34
|
+
*
|
|
35
|
+
* The mockup offered a list of five. A guess from the platform is right more
|
|
36
|
+
* often than a five-item list is, and Admin → Workspace is where it gets
|
|
37
|
+
* changed. The value is shown rather than hidden so a wrong guess is visible.
|
|
38
|
+
*/
|
|
39
|
+
function browserTimezone() {
|
|
40
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
41
|
+
}
|
|
42
|
+
export function WorkspaceStepPage() {
|
|
43
|
+
const navigate = useNavigate();
|
|
44
|
+
const { isSignedOut } = useSession();
|
|
45
|
+
const createWorkspace = useCreateWorkspace();
|
|
46
|
+
const [name, setName] = useState('');
|
|
47
|
+
const [slug, setSlug] = useState('');
|
|
48
|
+
const [slugEdited, setSlugEdited] = useState(false);
|
|
49
|
+
const [timezone] = useState(browserTimezone);
|
|
50
|
+
function changeName(value) {
|
|
51
|
+
setName(value);
|
|
52
|
+
if (!slugEdited) {
|
|
53
|
+
setSlug(slugify(value));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function changeSlug(value) {
|
|
57
|
+
setSlugEdited(true);
|
|
58
|
+
setSlug(slugify(value));
|
|
59
|
+
}
|
|
60
|
+
function submit(event) {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
createWorkspace
|
|
63
|
+
.runAsync({ name: name.trim(), slug: slug.trim(), timezone })
|
|
64
|
+
.then(() => navigate('/onboarding/invites', { replace: true }))
|
|
65
|
+
.catch(() => undefined);
|
|
66
|
+
}
|
|
67
|
+
if (isSignedOut) {
|
|
68
|
+
return _jsx(Navigate, { to: "/login", replace: true });
|
|
69
|
+
}
|
|
70
|
+
return (_jsx(AuthLayout, { step: 1, title: "Create your workspace", description: "A workspace is your company brain \u2014 CRM records, handbook, and team.", footer: _jsx(Link, { to: "/login", className: "font-medium text-accent hover:underline", children: "Sign in as somebody else" }), children: _jsxs("form", { onSubmit: submit, className: "mt-5 space-y-3", children: [_jsx(TextField, { label: "Workspace name", value: name, onChange: changeName, placeholder: "Acme Labs", autoComplete: "organization", required: true }), _jsx(TextField, { label: "Slug", value: slug, onChange: changeSlug, hint: "Lowercase letters, digits, and hyphens. It appears in URLs.", mono: true, required: true }), _jsxs("p", { className: "text-[11px] text-ink-faint", children: ["Timezone: ", timezone, ". Change it later in Admin \u2192 Workspace."] }), createWorkspace.error !== null && _jsx(ErrorPanel, { error: createWorkspace.error }), _jsx(SubmitButton, { label: "Continue", pendingLabel: "Creating\u2026", isPending: createWorkspace.isPending })] }) }));
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=WorkspaceStepPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceStepPage.js","sourceRoot":"","sources":["../../../src/pages/onboarding/WorkspaceStepPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,O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,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,6DAA6D,EAClE,IAAI,QACJ,QAAQ,SACR,EACF,aAAG,SAAS,EAAC,4BAA4B,2BAC5B,QAAQ,oDACjB,EACH,eAAe,CAAC,KAAK,KAAK,IAAI,IAAI,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,KAAK,GAAI,EAC/E,KAAC,YAAY,IACX,KAAK,EAAC,UAAU,EAChB,YAAY,EAAC,gBAAW,EACxB,SAAS,EAAE,eAAe,CAAC,SAAS,GACpC,IACG,GACI,CACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface PeopleDirectory {
|
|
2
|
+
/** The first title a person holds, matching the mockup's primary position. */
|
|
3
|
+
titleFor(personId: string): string | undefined;
|
|
4
|
+
companyNamesFor(personId: string): readonly string[];
|
|
5
|
+
readonly isLoading: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* False when these people hold more positions than one page could return.
|
|
8
|
+
* Rare, and the page says so rather than leaving a cell blank, because a blank
|
|
9
|
+
* that means "we did not look" reads the same as one that means "no company".
|
|
10
|
+
*/
|
|
11
|
+
readonly isComplete: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function usePeopleDirectory(personIds: readonly string[]): PeopleDirectory;
|
|
14
|
+
export interface CompanyHeadcounts {
|
|
15
|
+
countFor(companyId: string): number;
|
|
16
|
+
readonly isLoading: boolean;
|
|
17
|
+
readonly isComplete: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function useCompanyHeadcounts(companyIds: readonly string[]): CompanyHeadcounts;
|
|
20
|
+
//# sourceMappingURL=positionDirectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positionDirectory.d.ts","sourceRoot":"","sources":["../../src/pages/positionDirectory.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IAC9C,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;IACpD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe,CAgChF;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAqBrF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useCompanies } from '../api/resources/companies.js';
|
|
3
|
+
import { usePositions } from '../api/resources/positions.js';
|
|
4
|
+
/**
|
|
5
|
+
* Titles and company names for the people on screen, and head counts for the
|
|
6
|
+
* companies on screen.
|
|
7
|
+
*
|
|
8
|
+
* A list row needs data from three resources, and `api.md` has no
|
|
9
|
+
* include-expansion. What it does have is repeatable id filters, so each of
|
|
10
|
+
* these asks about exactly the rows the page is rendering: two extra requests
|
|
11
|
+
* for the page, not one per row, and no cap that a real workspace could grow
|
|
12
|
+
* past.
|
|
13
|
+
*
|
|
14
|
+
* Both hold their request back until the ids are known. Asking with the filter
|
|
15
|
+
* omitted would answer with every record in the workspace, which is the wrong
|
|
16
|
+
* answer rather than a slow one.
|
|
17
|
+
*/
|
|
18
|
+
/** `api.md`: `?limit=` and an id filter both max out at 200. */
|
|
19
|
+
const MAX_PAGE = 200;
|
|
20
|
+
export function usePeopleDirectory(personIds) {
|
|
21
|
+
const enabled = personIds.length > 0;
|
|
22
|
+
const positions = usePositions({ personIds, limit: MAX_PAGE }, { enabled });
|
|
23
|
+
const companies = useCompanies({ personIds, limit: MAX_PAGE }, { enabled });
|
|
24
|
+
const companyNameById = useMemo(() => new Map(companies.records.map((company) => [company.id, company.name])), [companies.records]);
|
|
25
|
+
const byPerson = useMemo(() => {
|
|
26
|
+
const grouped = new Map();
|
|
27
|
+
for (const position of positions.records) {
|
|
28
|
+
const held = grouped.get(position.personId) ?? [];
|
|
29
|
+
held.push({ title: position.title, companyId: position.companyId });
|
|
30
|
+
grouped.set(position.personId, held);
|
|
31
|
+
}
|
|
32
|
+
return grouped;
|
|
33
|
+
}, [positions.records]);
|
|
34
|
+
return {
|
|
35
|
+
titleFor: (personId) => byPerson.get(personId)?.[0]?.title,
|
|
36
|
+
companyNamesFor: (personId) => (byPerson.get(personId) ?? [])
|
|
37
|
+
.map((held) => companyNameById.get(held.companyId))
|
|
38
|
+
.filter((name) => name !== undefined),
|
|
39
|
+
isLoading: positions.isLoading || companies.isLoading,
|
|
40
|
+
isComplete: !positions.hasMore && !companies.hasMore,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function useCompanyHeadcounts(companyIds) {
|
|
44
|
+
const positions = usePositions({ companyIds, limit: MAX_PAGE }, { enabled: companyIds.length > 0 });
|
|
45
|
+
const countByCompany = useMemo(() => {
|
|
46
|
+
const counts = new Map();
|
|
47
|
+
for (const position of positions.records) {
|
|
48
|
+
counts.set(position.companyId, (counts.get(position.companyId) ?? 0) + 1);
|
|
49
|
+
}
|
|
50
|
+
return counts;
|
|
51
|
+
}, [positions.records]);
|
|
52
|
+
return {
|
|
53
|
+
countFor: (companyId) => countByCompany.get(companyId) ?? 0,
|
|
54
|
+
isLoading: positions.isLoading,
|
|
55
|
+
isComplete: !positions.hasMore,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=positionDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positionDirectory.js","sourceRoot":"","sources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AAC,GAAG,CAAC,CAAC,CAAA;QAC3E,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IAEvB,OAAO;QACL,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;QAC3D,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,UAAU,EAAE,CAAC,SAAS,CAAC,OAAO;KAC/B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { UiExtensions } from './registry.ts';
|
|
3
|
+
export interface UiExtensionProviderProps {
|
|
4
|
+
readonly extensions: UiExtensions;
|
|
5
|
+
readonly children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Puts a built registry in reach of the tree below it. The assembly wraps its
|
|
9
|
+
* root in one of these; nothing else should need to.
|
|
10
|
+
*/
|
|
11
|
+
export declare function UiExtensionProvider({ extensions, children, }: UiExtensionProviderProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=UiExtensionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiExtensionProvider.d.ts","sourceRoot":"","sources":["../../src/registry/UiExtensionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,QAAQ,GACT,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAE9C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { UiExtensionContext } from './context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Puts a built registry in reach of the tree below it. The assembly wraps its
|
|
5
|
+
* root in one of these; nothing else should need to.
|
|
6
|
+
*/
|
|
7
|
+
export function UiExtensionProvider({ extensions, children, }) {
|
|
8
|
+
return _jsx(UiExtensionContext, { value: extensions, children: children });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=UiExtensionProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiExtensionProvider.js","sourceRoot":"","sources":["../../src/registry/UiExtensionProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAQjD;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,UAAU,EACV,QAAQ,GACiB;IACzB,OAAO,KAAC,kBAAkB,IAAC,KAAK,EAAE,UAAU,YAAG,QAAQ,GAAsB,CAAA;AAC/E,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { DashboardCard, ExtensibleRecordType, IntegrationProvider, NavItem, NavSlot, RecordSidebarCard, RecordTab, RouteContribution } from './contributions.ts';
|
|
3
|
+
import type { Overridable } from './overridable.ts';
|
|
4
|
+
import type { UiExtensions } from './registry.ts';
|
|
5
|
+
/**
|
|
6
|
+
* Reading the registry from a component.
|
|
7
|
+
*
|
|
8
|
+
* The default is the empty registry rather than an error, so a component tree
|
|
9
|
+
* without a provider behaves exactly like an assembly with no modules: every
|
|
10
|
+
* slot empty, every overridable rendering core's own component. A page under
|
|
11
|
+
* test needs no setup to look right.
|
|
12
|
+
*
|
|
13
|
+
* The provider lives in its own file so Fast Refresh keeps working; a module
|
|
14
|
+
* that exports both a component and a hook loses it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const UiExtensionContext: import("react").Context<UiExtensions>;
|
|
17
|
+
export declare function useUiExtensions(): UiExtensions;
|
|
18
|
+
/** Module nav items for one slot, in order. The shell merges its own items in. */
|
|
19
|
+
export declare function useNavItems(slot: NavSlot): readonly NavItem[];
|
|
20
|
+
/** Whole pages modules contribute, mounted under the shell's chrome. */
|
|
21
|
+
export declare function useModuleRoutes(): readonly RouteContribution[];
|
|
22
|
+
export declare function useRecordTabs(objectType: ExtensibleRecordType): readonly RecordTab[];
|
|
23
|
+
export declare function useRecordSidebarCards(objectType: ExtensibleRecordType): readonly RecordSidebarCard[];
|
|
24
|
+
export declare function useDashboardCards(): readonly DashboardCard[];
|
|
25
|
+
export declare function useIntegrationProviders(): readonly IntegrationProvider[];
|
|
26
|
+
/**
|
|
27
|
+
* The component to render for an overridable: a module's replacement, or core's
|
|
28
|
+
* own. Core calls this instead of rendering its component directly.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useOverridable<Props>(token: Overridable<Props>): ComponentType<Props>;
|
|
31
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/registry/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,uCAA6C,CAAA;AAE5E,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,CAE7D;AAED,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,SAAS,iBAAiB,EAAE,CAE9D;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,oBAAoB,GAAG,SAAS,SAAS,EAAE,CAEpF;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,oBAAoB,GAAG,SAAS,iBAAiB,EAAE,CAEpG;AAED,wBAAgB,iBAAiB,IAAI,SAAS,aAAa,EAAE,CAE5D;AAED,wBAAgB,uBAAuB,IAAI,SAAS,mBAAmB,EAAE,CAExE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAErF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { NO_UI_MODULES } from './registry.js';
|
|
3
|
+
/**
|
|
4
|
+
* Reading the registry from a component.
|
|
5
|
+
*
|
|
6
|
+
* The default is the empty registry rather than an error, so a component tree
|
|
7
|
+
* without a provider behaves exactly like an assembly with no modules: every
|
|
8
|
+
* slot empty, every overridable rendering core's own component. A page under
|
|
9
|
+
* test needs no setup to look right.
|
|
10
|
+
*
|
|
11
|
+
* The provider lives in its own file so Fast Refresh keeps working; a module
|
|
12
|
+
* that exports both a component and a hook loses it.
|
|
13
|
+
*/
|
|
14
|
+
export const UiExtensionContext = createContext(NO_UI_MODULES);
|
|
15
|
+
export function useUiExtensions() {
|
|
16
|
+
return useContext(UiExtensionContext);
|
|
17
|
+
}
|
|
18
|
+
/** Module nav items for one slot, in order. The shell merges its own items in. */
|
|
19
|
+
export function useNavItems(slot) {
|
|
20
|
+
return useUiExtensions().navItems(slot);
|
|
21
|
+
}
|
|
22
|
+
/** Whole pages modules contribute, mounted under the shell's chrome. */
|
|
23
|
+
export function useModuleRoutes() {
|
|
24
|
+
return useUiExtensions().routes();
|
|
25
|
+
}
|
|
26
|
+
export function useRecordTabs(objectType) {
|
|
27
|
+
return useUiExtensions().recordTabs(objectType);
|
|
28
|
+
}
|
|
29
|
+
export function useRecordSidebarCards(objectType) {
|
|
30
|
+
return useUiExtensions().recordSidebarCards(objectType);
|
|
31
|
+
}
|
|
32
|
+
export function useDashboardCards() {
|
|
33
|
+
return useUiExtensions().dashboardCards();
|
|
34
|
+
}
|
|
35
|
+
export function useIntegrationProviders() {
|
|
36
|
+
return useUiExtensions().integrationProviders();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The component to render for an overridable: a module's replacement, or core's
|
|
40
|
+
* own. Core calls this instead of rendering its component directly.
|
|
41
|
+
*/
|
|
42
|
+
export function useOverridable(token) {
|
|
43
|
+
return useUiExtensions().componentFor(token);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/registry/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAcjD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAG7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAe,aAAa,CAAC,CAAA;AAE5E,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAA;AACvC,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,OAAO,eAAe,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,eAAe;IAC7B,OAAO,eAAe,EAAE,CAAC,MAAM,EAAE,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAgC;IAC5D,OAAO,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AACjD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAAgC;IACpE,OAAO,eAAe,EAAE,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAA;AACzD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,eAAe,EAAE,CAAC,cAAc,EAAE,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,OAAO,eAAe,EAAE,CAAC,oBAAoB,EAAE,CAAA;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAQ,KAAyB;IAC7D,OAAO,eAAe,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAC9C,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ExtensibleRecordType } from '@kelpie/schemas';
|
|
2
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* What a UI module may add to the shell, per the slot table in `modules.md`.
|
|
5
|
+
*
|
|
6
|
+
* Every slot renders nothing when empty. A core page has to look finished with
|
|
7
|
+
* no modules loaded at all, because the open-source assembly is exactly that.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NAV_SLOTS: readonly ['primary', 'admin', 'account'];
|
|
10
|
+
export type NavSlot = (typeof NAV_SLOTS)[number];
|
|
11
|
+
export interface NavItem {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
/** Route path, the same string the shell's router matches. */
|
|
15
|
+
readonly to: string;
|
|
16
|
+
/**
|
|
17
|
+
* Where it sits among the core items. Core numbers itself in hundreds, so a
|
|
18
|
+
* module can land between two of them without core renumbering.
|
|
19
|
+
*/
|
|
20
|
+
readonly order?: number;
|
|
21
|
+
readonly icon?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/** A whole page, mounted under the shell's chrome. */
|
|
24
|
+
export interface RouteContribution {
|
|
25
|
+
readonly path: string;
|
|
26
|
+
readonly element: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The record types a detail page exists for, and therefore the ones a module can
|
|
30
|
+
* add a tab or a sidebar card to.
|
|
31
|
+
*
|
|
32
|
+
* Now in `@kelpie/schemas`, which is the shared-schema package this file's
|
|
33
|
+
* previous note was waiting for. Re-exported rather than moved outright: it is
|
|
34
|
+
* part of the contribution vocabulary, and a module author reading this file
|
|
35
|
+
* should not have to follow an import to learn what a record type is.
|
|
36
|
+
*/
|
|
37
|
+
export { EXTENSIBLE_RECORD_TYPES } from '@kelpie/schemas';
|
|
38
|
+
export type { ExtensibleRecordType };
|
|
39
|
+
/** What a tab or card is rendering against. Ids, not records: the contributor fetches its own data. */
|
|
40
|
+
export interface RecordContext {
|
|
41
|
+
readonly objectType: ExtensibleRecordType;
|
|
42
|
+
readonly recordId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RecordTab {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly label: string;
|
|
47
|
+
readonly order?: number;
|
|
48
|
+
readonly render: (context: RecordContext) => ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export interface RecordSidebarCard {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly order?: number;
|
|
53
|
+
readonly render: (context: RecordContext) => ReactNode;
|
|
54
|
+
}
|
|
55
|
+
export interface DashboardCard {
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly order?: number;
|
|
58
|
+
readonly render: () => ReactNode;
|
|
59
|
+
}
|
|
60
|
+
export declare const INTEGRATION_CATEGORIES: readonly ['messaging', 'identity', 'enrichment', 'email', 'calendar'];
|
|
61
|
+
export type IntegrationCategory = (typeof INTEGRATION_CATEGORIES)[number];
|
|
62
|
+
/** A catalog entry on the admin integrations page. Core owns the page and the connection lifecycle. */
|
|
63
|
+
export interface IntegrationProvider {
|
|
64
|
+
readonly id: string;
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly category: IntegrationCategory;
|
|
67
|
+
readonly description: string;
|
|
68
|
+
/** Rendered on the provider's own settings panel once connected. */
|
|
69
|
+
readonly settings?: ComponentType<Record<string, never>>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=contributions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributions.d.ts","sourceRoot":"","sources":["../../src/registry/contributions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD;;;;;GAKG;AAEH,eAAO,MAAM,SAAS,YAAI,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU,CAAA;AAEjE,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhD,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;CAC5B;AAED;;;;;;;;GAQG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,YAAY,EAAE,oBAAoB,EAAE,CAAA;AAEpC,uGAAuG;AACvG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAA;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE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