@kelpie/ui 0.4.0 → 0.5.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/account.d.ts +5 -0
- package/dist/api/resources/account.d.ts.map +1 -1
- package/dist/api/resources/account.js +11 -0
- package/dist/api/resources/account.js.map +1 -1
- package/dist/api/resources/apiKeys.d.ts +15 -0
- package/dist/api/resources/apiKeys.d.ts.map +1 -0
- package/dist/api/resources/apiKeys.js +50 -0
- package/dist/api/resources/apiKeys.js.map +1 -0
- package/dist/api/resources/invites.d.ts +0 -2
- package/dist/api/resources/invites.d.ts.map +1 -1
- package/dist/api/resources/invites.js +5 -10
- package/dist/api/resources/invites.js.map +1 -1
- package/dist/api/resources/session.d.ts +17 -3
- package/dist/api/resources/session.d.ts.map +1 -1
- package/dist/api/resources/session.js +34 -6
- package/dist/api/resources/session.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/app/SessionGate.d.ts +6 -2
- package/dist/app/SessionGate.d.ts.map +1 -1
- package/dist/app/SessionGate.js +10 -3
- package/dist/app/SessionGate.js.map +1 -1
- package/dist/components/ActivitiesPanel.d.ts.map +1 -1
- package/dist/components/ActivitiesPanel.js +10 -7
- package/dist/components/ActivitiesPanel.js.map +1 -1
- package/dist/components/ApiKeysPanel.d.ts +20 -0
- package/dist/components/ApiKeysPanel.d.ts.map +1 -0
- package/dist/components/ApiKeysPanel.js +70 -0
- package/dist/components/ApiKeysPanel.js.map +1 -0
- package/dist/components/DecisionsPanel.d.ts.map +1 -1
- package/dist/components/DecisionsPanel.js +3 -1
- package/dist/components/DecisionsPanel.js.map +1 -1
- package/dist/components/NotesPanel.d.ts.map +1 -1
- package/dist/components/NotesPanel.js +3 -1
- package/dist/components/NotesPanel.js.map +1 -1
- package/dist/components/Shell.d.ts.map +1 -1
- package/dist/components/Shell.js +1 -0
- package/dist/components/Shell.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/dates.d.ts +25 -5
- package/dist/lib/dates.d.ts.map +1 -1
- package/dist/lib/dates.js +49 -20
- package/dist/lib/dates.js.map +1 -1
- package/dist/pages/DecisionsPage.d.ts.map +1 -1
- package/dist/pages/DecisionsPage.js +4 -2
- package/dist/pages/DecisionsPage.js.map +1 -1
- package/dist/pages/HiringPage.d.ts.map +1 -1
- package/dist/pages/HiringPage.js +3 -1
- package/dist/pages/HiringPage.js.map +1 -1
- package/dist/pages/PlanningPage.js +1 -1
- package/dist/pages/PlanningPage.js.map +1 -1
- package/dist/pages/account/AccountLayout.d.ts.map +1 -1
- package/dist/pages/account/AccountLayout.js +1 -0
- package/dist/pages/account/AccountLayout.js.map +1 -1
- package/dist/pages/account/PersonalApiKeysPage.d.ts +9 -0
- package/dist/pages/account/PersonalApiKeysPage.d.ts.map +1 -0
- package/dist/pages/account/PersonalApiKeysPage.js +14 -0
- package/dist/pages/account/PersonalApiKeysPage.js.map +1 -0
- package/dist/pages/account/PreferencesPage.js +1 -1
- package/dist/pages/account/PreferencesPage.js.map +1 -1
- package/dist/pages/account/SecurityPage.d.ts.map +1 -1
- package/dist/pages/account/SecurityPage.js +3 -2
- package/dist/pages/account/SecurityPage.js.map +1 -1
- package/dist/pages/admin/ApiKeysPage.d.ts +9 -0
- package/dist/pages/admin/ApiKeysPage.d.ts.map +1 -0
- package/dist/pages/admin/ApiKeysPage.js +20 -0
- package/dist/pages/admin/ApiKeysPage.js.map +1 -0
- package/dist/pages/admin/McpPage.d.ts.map +1 -1
- package/dist/pages/admin/McpPage.js +6 -3
- package/dist/pages/admin/McpPage.js.map +1 -1
- package/dist/pages/admin/WebhookDeliveries.d.ts.map +1 -1
- package/dist/pages/admin/WebhookDeliveries.js +4 -2
- package/dist/pages/admin/WebhookDeliveries.js.map +1 -1
- package/dist/pages/admin/WebhooksPage.d.ts.map +1 -1
- package/dist/pages/admin/WebhooksPage.js +5 -3
- package/dist/pages/admin/WebhooksPage.js.map +1 -1
- package/dist/pages/auth/ForgotPasswordPage.js +2 -2
- package/dist/pages/auth/ForgotPasswordPage.js.map +1 -1
- package/dist/pages/auth/SignUpPage.d.ts +5 -3
- package/dist/pages/auth/SignUpPage.d.ts.map +1 -1
- package/dist/pages/auth/SignUpPage.js +12 -6
- package/dist/pages/auth/SignUpPage.js.map +1 -1
- package/dist/pages/auth/VerifyEmailConfirmPage.d.ts +9 -0
- package/dist/pages/auth/VerifyEmailConfirmPage.d.ts.map +1 -0
- package/dist/pages/auth/VerifyEmailConfirmPage.js +58 -0
- package/dist/pages/auth/VerifyEmailConfirmPage.js.map +1 -0
- package/dist/pages/auth/VerifyEmailPendingPage.d.ts +10 -0
- package/dist/pages/auth/VerifyEmailPendingPage.d.ts.map +1 -0
- package/dist/pages/auth/VerifyEmailPendingPage.js +35 -0
- package/dist/pages/auth/VerifyEmailPendingPage.js.map +1 -0
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +6 -4
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/sections.d.ts +6 -3
- package/dist/pages/dashboard/sections.d.ts.map +1 -1
- package/dist/pages/dashboard/sections.js +6 -6
- package/dist/pages/dashboard/sections.js.map +1 -1
- package/dist/pages/forms/SubmissionsTable.d.ts.map +1 -1
- package/dist/pages/forms/SubmissionsTable.js +3 -1
- package/dist/pages/forms/SubmissionsTable.js.map +1 -1
- package/dist/pages/handbook/HandbookPage.d.ts.map +1 -1
- package/dist/pages/handbook/HandbookPage.js +3 -1
- package/dist/pages/handbook/HandbookPage.js.map +1 -1
- package/package.json +2 -2
- package/src/api/resources/account.ts +13 -0
- package/src/api/resources/apiKeys.ts +60 -0
- package/src/api/resources/invites.ts +5 -15
- package/src/api/resources/session.ts +42 -6
- package/src/app/KelpieApp.tsx +11 -2
- package/src/app/SessionGate.tsx +11 -3
- package/src/components/ActivitiesPanel.tsx +15 -4
- package/src/components/ApiKeysPanel.tsx +307 -0
- package/src/components/DecisionsPanel.tsx +5 -2
- package/src/components/NotesPanel.tsx +4 -1
- package/src/components/Shell.tsx +1 -0
- package/src/index.ts +0 -1
- package/src/lib/dates.ts +54 -20
- package/src/pages/DecisionsPage.tsx +6 -2
- package/src/pages/HiringPage.tsx +3 -1
- package/src/pages/PlanningPage.tsx +1 -1
- package/src/pages/account/AccountLayout.tsx +1 -0
- package/src/pages/account/PersonalApiKeysPage.tsx +27 -0
- package/src/pages/account/PreferencesPage.tsx +1 -1
- package/src/pages/account/SecurityPage.tsx +4 -1
- package/src/pages/admin/ApiKeysPage.tsx +43 -0
- package/src/pages/admin/McpPage.tsx +7 -4
- package/src/pages/admin/WebhookDeliveries.tsx +4 -2
- package/src/pages/admin/WebhooksPage.tsx +5 -3
- package/src/pages/auth/ForgotPasswordPage.tsx +2 -2
- package/src/pages/auth/SignUpPage.tsx +12 -6
- package/src/pages/auth/VerifyEmailConfirmPage.tsx +81 -0
- package/src/pages/auth/VerifyEmailPendingPage.tsx +65 -0
- package/src/pages/dashboard/DashboardPage.tsx +14 -4
- package/src/pages/dashboard/sections.tsx +9 -3
- package/src/pages/forms/SubmissionsTable.tsx +3 -1
- package/src/pages/handbook/HandbookPage.tsx +3 -1
|
@@ -46,4 +46,9 @@ export interface ThemeControl {
|
|
|
46
46
|
* the moment either is clicked.
|
|
47
47
|
*/
|
|
48
48
|
export declare function useTheme(): ThemeControl;
|
|
49
|
+
/**
|
|
50
|
+
* The zone dates render in: the account's own choice, falling back to the
|
|
51
|
+
* workspace's while either query is still loading.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useTimezone(): string;
|
|
49
54
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/api/resources/account.ts"],"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FAAqF;AACrF,wBAAgB,kBAAkB,IAAI,oBAAoB,CAYzD;AAED,wBAAgB,uBAAuB,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAWtE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAY7E;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;CACpD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,IAAI,YAAY,CAkCvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAKpC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { accountPreferencesSchema, accountSchema, accountSessionSchema, changePasswordBody, updateAccountBody, updateAccountPreferencesBody, } from '@kelpie/schemas';
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
+
import { resolveTimezone } from '../../lib/dates.js';
|
|
4
5
|
import { applyTheme, getStoredTheme, setStoredTheme, watchSystemTheme } from '../../lib/theme.js';
|
|
5
6
|
import { useApiClient } from '../context.js';
|
|
6
7
|
import { toError } from '../errors.js';
|
|
7
8
|
import { asMutationResult } from './mutation.js';
|
|
9
|
+
import { useWorkspace } from './workspace.js';
|
|
8
10
|
/**
|
|
9
11
|
* The signed-in person, as the `/account/*` pages read and write them.
|
|
10
12
|
*
|
|
@@ -143,4 +145,13 @@ export function useTheme() {
|
|
|
143
145
|
}
|
|
144
146
|
return { theme, setTheme };
|
|
145
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* The zone dates render in: the account's own choice, falling back to the
|
|
150
|
+
* workspace's while either query is still loading.
|
|
151
|
+
*/
|
|
152
|
+
export function useTimezone() {
|
|
153
|
+
const { preferences } = useAccountPreferences();
|
|
154
|
+
const { workspace } = useWorkspace();
|
|
155
|
+
return resolveTimezone(preferences?.timezone, workspace?.timezone);
|
|
156
|
+
}
|
|
146
157
|
//# sourceMappingURL=account.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/api/resources/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,iBAAiB,CAAA;AAUxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/api/resources/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,iBAAiB,CAAA;AAUxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,YAAY,E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AAE,CAAC,CAAA;IAC7B,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,EAAE,WAAW,EAAE,GAAG,qBAAqB,EAAE,CAAA;IAC/C,MAAM,EAAE,SAAS,EAAE,GAAG,YAAY,EAAE,CAAA;IAEpC,OAAO,eAAe,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ApiKey, ApiKeyKind, CreateApiKeyInput, CreatedApiKey } from '@kelpie/schemas';
|
|
2
|
+
import type { MutationResult, RecordListResult } from '../resource.ts';
|
|
3
|
+
export declare function useApiKeys(kind: ApiKeyKind): RecordListResult<ApiKey>;
|
|
4
|
+
/**
|
|
5
|
+
* Mints a key.
|
|
6
|
+
*
|
|
7
|
+
* Written out rather than taken from `createResourceHooks`, because the `201`
|
|
8
|
+
* is the only response that ever carries the secret and the shared hook decodes
|
|
9
|
+
* with the schema that has no such field. The secret has to survive the decode:
|
|
10
|
+
* it cannot be fetched again, so a page that dropped it would have created a key
|
|
11
|
+
* nobody can use.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useCreateApiKey(): MutationResult<CreateApiKeyInput, CreatedApiKey>;
|
|
14
|
+
export declare function useRevokeApiKey(): MutationResult<string, void>;
|
|
15
|
+
//# sourceMappingURL=apiKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiKeys.d.ts","sourceRoot":"","sources":["../../../src/api/resources/apiKeys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAK3F,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAetE,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAErE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAYlF;AAED,wBAAgB,eAAe,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAW9D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { apiKeySchema, createApiKeyBody, createdApiKeySchema } from '@kelpie/schemas';
|
|
2
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { useApiClient } from '../context.js';
|
|
4
|
+
import { createReadOnlyResourceHooks } from '../resource.js';
|
|
5
|
+
import { asMutationResult } from './mutation.js';
|
|
6
|
+
/**
|
|
7
|
+
* `/v1/api-keys`: workspace keys and personal keys, one endpoint told apart by
|
|
8
|
+
* `kind`. `kind` is required on every list request — the server answers `422`
|
|
9
|
+
* without it — so each page asks for exactly the one kind it manages.
|
|
10
|
+
*/
|
|
11
|
+
const { useList } = createReadOnlyResourceHooks({
|
|
12
|
+
name: 'apiKeys',
|
|
13
|
+
path: '/api-keys',
|
|
14
|
+
decode: apiKeySchema.parse,
|
|
15
|
+
});
|
|
16
|
+
export function useApiKeys(kind) {
|
|
17
|
+
return useList({ kind });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Mints a key.
|
|
21
|
+
*
|
|
22
|
+
* Written out rather than taken from `createResourceHooks`, because the `201`
|
|
23
|
+
* is the only response that ever carries the secret and the shared hook decodes
|
|
24
|
+
* with the schema that has no such field. The secret has to survive the decode:
|
|
25
|
+
* it cannot be fetched again, so a page that dropped it would have created a key
|
|
26
|
+
* nobody can use.
|
|
27
|
+
*/
|
|
28
|
+
export function useCreateApiKey() {
|
|
29
|
+
const client = useApiClient();
|
|
30
|
+
const queryClient = useQueryClient();
|
|
31
|
+
const mutation = useMutation({
|
|
32
|
+
mutationFn: (input) => client.post('/api-keys', createApiKeyBody(input), createdApiKeySchema.parse),
|
|
33
|
+
onSettled: () => {
|
|
34
|
+
void queryClient.invalidateQueries({ queryKey: ['apiKeys', 'list'] });
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
return asMutationResult(mutation);
|
|
38
|
+
}
|
|
39
|
+
export function useRevokeApiKey() {
|
|
40
|
+
const client = useApiClient();
|
|
41
|
+
const queryClient = useQueryClient();
|
|
42
|
+
const mutation = useMutation({
|
|
43
|
+
mutationFn: (id) => client.delete(`/api-keys/${id}`),
|
|
44
|
+
onSettled: () => {
|
|
45
|
+
void queryClient.invalidateQueries({ queryKey: ['apiKeys', 'list'] });
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
return asMutationResult(mutation);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=apiKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiKeys.js","sourceRoot":"","sources":["../../../src/api/resources/apiKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD;;;;GAIG;AAEH,MAAM,EAAE,OAAO,EAAE,GAAG,2BAA2B,CAAS;IACtD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,YAAY,CAAC,KAAK;CAC3B,CAAC,CAAA;AAEF,MAAM,UAAU,UAAU,CAAC,IAAgB;IACzC,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC3B,UAAU,EAAE,CAAC,KAAwB,EAAE,EAAE,CACvC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC;QAC9E,SAAS,EAAE,GAAG,EAAE;YACd,KAAK,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;QACvE,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC3B,UAAU,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC;QAC5D,SAAS,EAAE,GAAG,EAAE;YACd,KAAK,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;QACvE,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { InvitableRole, Invite } from '@kelpie/schemas';
|
|
2
2
|
import type { MutationResult } from '../resource.ts';
|
|
3
|
-
/** Where an invitee lands. `JoinPage` reads the token out of the query string. */
|
|
4
|
-
export declare function inviteUrlTemplate(origin: string): string;
|
|
5
3
|
export interface InviteListResult {
|
|
6
4
|
readonly invites: readonly Invite[];
|
|
7
5
|
readonly isLoading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.d.ts","sourceRoot":"","sources":["../../../src/api/resources/invites.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAK5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"invites.d.ts","sourceRoot":"","sources":["../../../src/api/resources/invites.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAK5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAiBpD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAC7B;AAED,wBAAgB,UAAU,IAAI,gBAAgB,CAe7C;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAC7B;AAED,wBAAgB,aAAa,IAAI,cAAc,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAkB3E;AAED,yFAAyF;AACzF,wBAAgB,eAAe,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAchE;AAED,wBAAgB,eAAe,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAa9D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createInviteBody, inviteSchema
|
|
1
|
+
import { createInviteBody, inviteSchema } from '@kelpie/schemas';
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { useApiClient } from '../context.js';
|
|
4
4
|
import { toError } from '../errors.js';
|
|
@@ -11,15 +11,10 @@ import { useSession } from './session.js';
|
|
|
11
11
|
* only renders this half for an admin, which keeps the refusal off screen
|
|
12
12
|
* without the browser being what decides it.
|
|
13
13
|
*
|
|
14
|
-
* The URL the emailed link points at is built
|
|
15
|
-
*
|
|
16
|
-
* the placeholder it fills in.
|
|
14
|
+
* The URL the emailed link points at is built server-side from the deployment's
|
|
15
|
+
* own base URL, so nothing here sends one.
|
|
17
16
|
*/
|
|
18
17
|
const INVITES_KEY = 'invites';
|
|
19
|
-
/** Where an invitee lands. `JoinPage` reads the token out of the query string. */
|
|
20
|
-
export function inviteUrlTemplate(origin) {
|
|
21
|
-
return `${origin}/join?token={token}`;
|
|
22
|
-
}
|
|
23
18
|
export function useInvites() {
|
|
24
19
|
const client = useApiClient();
|
|
25
20
|
const { session } = useSession();
|
|
@@ -41,7 +36,7 @@ export function useSendInvite() {
|
|
|
41
36
|
const { session } = useSession();
|
|
42
37
|
const workspaceId = session?.workspaceId ?? '';
|
|
43
38
|
const mutation = useMutation({
|
|
44
|
-
mutationFn: ({ email, role }) => client.post(`/workspaces/${workspaceId}/invites`, createInviteBody({ email, role
|
|
39
|
+
mutationFn: ({ email, role }) => client.post(`/workspaces/${workspaceId}/invites`, createInviteBody({ email, role }), inviteSchema.parse),
|
|
45
40
|
onSuccess: async () => {
|
|
46
41
|
await queryClient.invalidateQueries({ queryKey: [INVITES_KEY, workspaceId] });
|
|
47
42
|
},
|
|
@@ -55,7 +50,7 @@ export function useResendInvite() {
|
|
|
55
50
|
const { session } = useSession();
|
|
56
51
|
const workspaceId = session?.workspaceId ?? '';
|
|
57
52
|
const mutation = useMutation({
|
|
58
|
-
mutationFn: (inviteId) => client.post(`/workspaces/${workspaceId}/invites/${inviteId}/resend`,
|
|
53
|
+
mutationFn: (inviteId) => client.post(`/workspaces/${workspaceId}/invites/${inviteId}/resend`, {}, inviteSchema.parse),
|
|
59
54
|
onSuccess: async () => {
|
|
60
55
|
await queryClient.invalidateQueries({ queryKey: [INVITES_KEY, workspaceId] });
|
|
61
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../../src/api/resources/invites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../../src/api/resources/invites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;GASG;AAEH,MAAM,WAAW,GAAG,SAAS,CAAA;AAQ7B,MAAM,UAAU,UAAU;IACxB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,SAAS,CAAA;IACrD,MAAM,MAAM,GAAG,QAAQ,CAAC;QACtB,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;QACpC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,WAAW,IAAI,EAAE,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC;QAC1F,OAAO,EAAE,WAAW,KAAK,SAAS;KACnC,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;QACjC,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,W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E,KAAK,IAAI,EAAE;YACpB,MAAM,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC,CAAA;QAC/E,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,EAAE,CAAA;IAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC3B,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,WAAW,YAAY,QAAQ,EAAE,CAAC;QACjG,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,MAAM,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC,CAAA;QAC/E,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfirmPasswordResetInput, CreateWorkspaceInput, LogInInput, RequestPasswordResetInput, Session, SignUpInput, SignedInAccount, Workspace } from '@kelpie/schemas';
|
|
1
|
+
import type { ConfirmEmailVerificationInput, ConfirmPasswordResetInput, CreateWorkspaceInput, LogInInput, RequestPasswordResetInput, Session, SignUpInput, SignedInAccount, Workspace } from '@kelpie/schemas';
|
|
2
2
|
import type { MutationResult } from '../resource.ts';
|
|
3
3
|
export interface SessionState {
|
|
4
4
|
readonly session: Session | undefined;
|
|
@@ -7,6 +7,8 @@ export interface SessionState {
|
|
|
7
7
|
readonly isSignedOut: boolean;
|
|
8
8
|
/** Signed in, but the account has no workspace yet. Every CRM endpoint answers `403` until it does. */
|
|
9
9
|
readonly needsWorkspace: boolean;
|
|
10
|
+
/** No workspace yet, and creating one will answer `403` until the account verifies its email. */
|
|
11
|
+
readonly needsEmailVerification: boolean;
|
|
10
12
|
readonly error: Error | null;
|
|
11
13
|
}
|
|
12
14
|
export declare function useSession(): SessionState;
|
|
@@ -20,8 +22,6 @@ export declare function useLogIn(): MutationResult<LogInInput, SignedInAccount>;
|
|
|
20
22
|
*/
|
|
21
23
|
export declare function useSignUp(): MutationResult<SignUpInput, SignedInAccount>;
|
|
22
24
|
export declare function useLogOut(): MutationResult<void, void>;
|
|
23
|
-
/** Where a reset email lands. `ResetPasswordPage` reads the token out of the query string. */
|
|
24
|
-
export declare function resetUrlTemplate(origin: string): string;
|
|
25
25
|
/**
|
|
26
26
|
* Asks for a reset link.
|
|
27
27
|
*
|
|
@@ -39,6 +39,20 @@ export declare function useRequestPasswordReset(): MutationResult<RequestPasswor
|
|
|
39
39
|
* caller sends the reader to sign in rather than into the app.
|
|
40
40
|
*/
|
|
41
41
|
export declare function useConfirmPasswordReset(): MutationResult<ConfirmPasswordResetInput, void>;
|
|
42
|
+
/**
|
|
43
|
+
* Asks for a fresh verification link. The same call a "resend" button makes,
|
|
44
|
+
* and a no-op once the account is already verified.
|
|
45
|
+
*
|
|
46
|
+
* Nothing in the cache changes: this signs nobody in or out.
|
|
47
|
+
*/
|
|
48
|
+
export declare function useRequestEmailVerification(): MutationResult<void, void>;
|
|
49
|
+
/**
|
|
50
|
+
* Spends a verification token from that email.
|
|
51
|
+
*
|
|
52
|
+
* Unlike a password reset this ends no session, so the caller only needs the
|
|
53
|
+
* session re-read: `needsEmailVerification` flips once it lands.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useConfirmEmailVerification(): MutationResult<ConfirmEmailVerificationInput, void>;
|
|
42
56
|
/**
|
|
43
57
|
* Joins the workspace an invitation names.
|
|
44
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/api/resources/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/api/resources/session.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,oBAAoB,EACpB,UAAU,EACV,yBAAyB,EACzB,OAAO,EACP,WAAW,EACX,eAAe,EACf,SAAS,EACV,MAAM,iBAAiB,CAAA;AAOxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAgCpD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,qFAAqF;IACrF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,uGAAuG;IACvG,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC,iGAAiG;IACjG,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAA;IACxC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAC7B;AAED,wBAAgB,UAAU,IAAI,YAAY,CAczC;AAED,wBAAgB,QAAQ,IAAI,cAAc,CAAC,UAAU,EAAE,eAAe,CAAC,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAAC,WAAW,EAAE,eAAe,CAAC,CAaxE;AAED,wBAAgB,SAAS,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAatD;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,IAAI,cAAc,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAQzF;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,cAAc,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAYzF;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAOxE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,cAAc,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAYjG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,CAAC,CAavF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAapF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { confirmPasswordResetBody, createWorkspaceBody, logInBody, requestPasswordResetBody, sessionSchema, signUpBody, signedInAccountSchema, workspaceSchema, } from '@kelpie/schemas';
|
|
1
|
+
import { confirmEmailVerificationBody, confirmPasswordResetBody, createWorkspaceBody, logInBody, requestPasswordResetBody, sessionSchema, signUpBody, signedInAccountSchema, workspaceSchema, } from '@kelpie/schemas';
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { ApiError } from '../client.js';
|
|
4
4
|
import { useApiClient } from '../context.js';
|
|
@@ -29,11 +29,13 @@ export function useSession() {
|
|
|
29
29
|
const client = useApiClient();
|
|
30
30
|
const result = useQuery(sessionQuery(client));
|
|
31
31
|
const isSignedOut = result.error instanceof ApiError && result.error.status === 401;
|
|
32
|
+
const needsWorkspace = result.data !== undefined && result.data.workspaceId === null;
|
|
32
33
|
return {
|
|
33
34
|
session: result.data,
|
|
34
35
|
isLoading: result.isPending,
|
|
35
36
|
isSignedOut,
|
|
36
|
-
needsWorkspace
|
|
37
|
+
needsWorkspace,
|
|
38
|
+
needsEmailVerification: needsWorkspace && result.data?.emailVerified === false,
|
|
37
39
|
error: isSignedOut ? null : toError(result.error),
|
|
38
40
|
};
|
|
39
41
|
}
|
|
@@ -81,10 +83,6 @@ export function useLogOut() {
|
|
|
81
83
|
});
|
|
82
84
|
return asMutationResult(mutation);
|
|
83
85
|
}
|
|
84
|
-
/** Where a reset email lands. `ResetPasswordPage` reads the token out of the query string. */
|
|
85
|
-
export function resetUrlTemplate(origin) {
|
|
86
|
-
return `${origin}/reset-password?token={token}`;
|
|
87
|
-
}
|
|
88
86
|
/**
|
|
89
87
|
* Asks for a reset link.
|
|
90
88
|
*
|
|
@@ -118,6 +116,36 @@ export function useConfirmPasswordReset() {
|
|
|
118
116
|
});
|
|
119
117
|
return asMutationResult(mutation);
|
|
120
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Asks for a fresh verification link. The same call a "resend" button makes,
|
|
121
|
+
* and a no-op once the account is already verified.
|
|
122
|
+
*
|
|
123
|
+
* Nothing in the cache changes: this signs nobody in or out.
|
|
124
|
+
*/
|
|
125
|
+
export function useRequestEmailVerification() {
|
|
126
|
+
const client = useApiClient();
|
|
127
|
+
const mutation = useMutation({
|
|
128
|
+
mutationFn: () => client.postEmpty('/auth/verify-email'),
|
|
129
|
+
});
|
|
130
|
+
return asMutationResult(mutation);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Spends a verification token from that email.
|
|
134
|
+
*
|
|
135
|
+
* Unlike a password reset this ends no session, so the caller only needs the
|
|
136
|
+
* session re-read: `needsEmailVerification` flips once it lands.
|
|
137
|
+
*/
|
|
138
|
+
export function useConfirmEmailVerification() {
|
|
139
|
+
const client = useApiClient();
|
|
140
|
+
const queryClient = useQueryClient();
|
|
141
|
+
const mutation = useMutation({
|
|
142
|
+
mutationFn: (input) => client.postEmpty('/auth/verify-email/confirm', confirmEmailVerificationBody(input)),
|
|
143
|
+
onSuccess: async () => {
|
|
144
|
+
await queryClient.fetchQuery(sessionQuery(client));
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
return asMutationResult(mutation);
|
|
148
|
+
}
|
|
121
149
|
/**
|
|
122
150
|
* Joins the workspace an invitation names.
|
|
123
151
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/api/resources/session.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/api/resources/session.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,iBAAiB,CAAA;AAYxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD;;;;;;;;;GASG;AAEH,MAAM,WAAW,GAAG,CAAC,SAAS,CAAU,CAAA;AAExC,SAAS,YAAY,CAAC,MAAiB;IAMrC,OAAO;QACL,QAAQ,EAAE,WAAW;QACrB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,CAAC,KAAK,CAAC;QAC1D,wEAAwE;QACxE,gEAAgE;QAChE,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,CAAC;KACb,CAAA;AACH,CAAC;AAcD,MAAM,UAAU,UAAU;IACxB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7C,MAAM,WAAW,GAAG,MAAM,CAA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AAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC;QAClE,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,WAAW,CAAC,KAAK,EAAE,CAAA;YACnB,MAAM,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;QACpD,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC3B,UAAU,EAAE,CAAC,KAA2B,EAAE,EAAE,CAC1C,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,mBAAmB,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC;QAC/E,2EAA2E;QAC3E,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,MAAM,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;QACpD,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KelpieApp.d.ts","sourceRoot":"","sources":["../../src/app/KelpieApp.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KelpieApp.d.ts","sourceRoot":"","sources":["../../src/app/KelpieApp.tsx"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAA;IACjC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAUpF"}
|
package/dist/app/KelpieApp.js
CHANGED
|
@@ -27,9 +27,11 @@ import { RaiseDetail } from '../pages/RaiseDetail.js';
|
|
|
27
27
|
import { RaiseStageSettingsPage } from '../pages/RaiseStageSettingsPage.js';
|
|
28
28
|
import { RoleDetail } from '../pages/RoleDetail.js';
|
|
29
29
|
import { AccountLayout } from '../pages/account/AccountLayout.js';
|
|
30
|
+
import { PersonalApiKeysPage } from '../pages/account/PersonalApiKeysPage.js';
|
|
30
31
|
import { PreferencesPage } from '../pages/account/PreferencesPage.js';
|
|
31
32
|
import { ProfilePage } from '../pages/account/ProfilePage.js';
|
|
32
33
|
import { SecurityPage } from '../pages/account/SecurityPage.js';
|
|
34
|
+
import { ApiKeysPage } from '../pages/admin/ApiKeysPage.js';
|
|
33
35
|
import { DataPage } from '../pages/admin/DataPage.js';
|
|
34
36
|
import { McpPage } from '../pages/admin/McpPage.js';
|
|
35
37
|
import { ModulesPage } from '../pages/admin/ModulesPage.js';
|
|
@@ -41,6 +43,8 @@ import { JoinPage } from '../pages/auth/JoinPage.js';
|
|
|
41
43
|
import { ResetPasswordPage } from '../pages/auth/ResetPasswordPage.js';
|
|
42
44
|
import { SignInPage } from '../pages/auth/SignInPage.js';
|
|
43
45
|
import { SignUpPage } from '../pages/auth/SignUpPage.js';
|
|
46
|
+
import { VerifyEmailConfirmPage } from '../pages/auth/VerifyEmailConfirmPage.js';
|
|
47
|
+
import { VerifyEmailPendingPage } from '../pages/auth/VerifyEmailPendingPage.js';
|
|
44
48
|
import { DashboardPage } from '../pages/dashboard/DashboardPage.js';
|
|
45
49
|
import { HandbookLayout } from '../pages/handbook/HandbookPage.js';
|
|
46
50
|
import { HandbookStepPage } from '../pages/onboarding/HandbookStepPage.js';
|
|
@@ -69,6 +73,6 @@ function AppRoutes() {
|
|
|
69
73
|
const moduleRoutes = useModuleRoutes();
|
|
70
74
|
const accountRoutes = moduleRoutes.filter(isAccountRoute);
|
|
71
75
|
const shellRoutes = moduleRoutes.filter((route) => !isAccountRoute(route));
|
|
72
|
-
return (_jsxs(Routes, { children: [_jsx(Route, { path: "/login", element: _jsx(SignInPage, {}) }), _jsx(Route, { path: "/signup", element: _jsx(SignUpPage, {}) }), _jsx(Route, { path: "/forgot-password", element: _jsx(ForgotPasswordPage, {}) }), _jsx(Route, { path: "/reset-password", element: _jsx(ResetPasswordPage, {}) }), _jsx(Route, { path: "/join", element: _jsx(JoinPage, {}) }), _jsx(Route, { path: "/onboarding/workspace", element: _jsx(WorkspaceStepPage, {}) }), _jsxs(Route, { element: _jsx(SessionGate, {}), children: [_jsx(Route, { path: "/onboarding/invites", element: _jsx(InvitesStepPage, {}) }), _jsx(Route, { path: "/onboarding/handbook", element: _jsx(HandbookStepPage, {}) }), _jsxs(Route, { element: _jsx(Shell, {}), children: [_jsx(Route, { index: true, element: _jsx(Navigate, { to: "/dashboard", replace: true }) }), _jsx(Route, { path: "dashboard", element: _jsx(DashboardPage, {}) }), _jsx(Route, { path: "search", element: _jsx(SearchPage, {}) }), _jsx(Route, { path: "people", element: _jsx(PeoplePage, {}) }), _jsx(Route, { path: "people/:id", element: _jsx(PersonDetail, {}) }), _jsx(Route, { path: "hiring", element: _jsx(HiringPage, {}) }), _jsx(Route, { path: "hiring/:id", element: _jsx(RoleDetail, {}) }), _jsx(Route, { path: "companies", element: _jsx(CompaniesPage, {}) }), _jsx(Route, { path: "companies/:id", element: _jsx(CompanyDetail, {}) }), _jsx(Route, { path: "deals", element: _jsx(DealsPage, {}) }), _jsx(Route, { path: "deals/settings", element: _jsx(DealStageSettingsPage, {}) }), _jsx(Route, { path: "deals/:id", element: _jsx(DealDetail, {}) }), _jsx(Route, { path: "opportunities", element: _jsx(OpportunitiesPage, {}) }), _jsx(Route, { path: "opportunities/settings", element: _jsx(OpportunityStageSettingsPage, {}) }), _jsx(Route, { path: "opportunities/:id", element: _jsx(OpportunityDetail, {}) }), _jsx(Route, { path: "fundraising", element: _jsx(FundraisingPage, {}) }), _jsx(Route, { path: "fundraising/settings", element: _jsx(RaiseStageSettingsPage, {}) }), _jsx(Route, { path: "fundraising/:id", element: _jsx(RaiseDetail, {}) }), _jsx(Route, { path: "partnerships", element: _jsx(PartnershipsPage, {}) }), _jsx(Route, { path: "partnerships/settings", element: _jsx(PartnershipStageSettingsPage, {}) }), _jsx(Route, { path: "partnerships/:id", element: _jsx(PartnershipDetail, {}) }), _jsx(Route, { path: "planning", element: _jsx(PlanningPage, {}) }), _jsx(Route, { path: "decisions", element: _jsx(DecisionsPage, {}) }), _jsx(Route, { path: "forms", element: _jsx(FormsPage, {}) }), _jsx(Route, { path: "forms/:id", element: _jsx(FormDetail, {}) }), _jsx(Route, { path: "handbook", element: _jsx(HandbookLayout, {}) }), _jsx(Route, { path: "handbook/:pageId", element: _jsx(HandbookLayout, {}) }), _jsx(Route, { path: "admin/workspace", element: _jsx(WorkspaceSettingsPage, {}) }), _jsx(Route, { path: "admin/team", element: _jsx(TeamPage, {}) }), _jsx(Route, { path: "admin/data", element: _jsx(DataPage, {}) }), _jsx(Route, { path: "admin/mcp", element: _jsx(McpPage, {}) }), _jsx(Route, { path: "admin/webhooks", element: _jsx(WebhooksPage, {}) }), _jsx(Route, { path: "admin/modules", element: _jsx(ModulesPage, {}) }), _jsxs(Route, { path: "account", element: _jsx(AccountLayout, {}), children: [_jsx(Route, { index: true, element: _jsx(Navigate, { to: "/account/profile", replace: true }) }), _jsx(Route, { path: "profile", element: _jsx(ProfilePage, {}) }), _jsx(Route, { path: "security", element: _jsx(SecurityPage, {}) }), _jsx(Route, { path: "preferences", element: _jsx(PreferencesPage, {}) }), accountRoutes.map((route) => (_jsx(Route, { path: route.path.slice(ACCOUNT_PREFIX.length), element: route.element }, route.path)))] }), shellRoutes.map((route) => (_jsx(Route, { path: route.path, element: route.element }, route.path))), _jsx(Route, { path: "*", element: _jsx(NotFoundPage, {}) })] })] })] }));
|
|
76
|
+
return (_jsxs(Routes, { children: [_jsx(Route, { path: "/login", element: _jsx(SignInPage, {}) }), _jsx(Route, { path: "/signup", element: _jsx(SignUpPage, {}) }), _jsx(Route, { path: "/forgot-password", element: _jsx(ForgotPasswordPage, {}) }), _jsx(Route, { path: "/reset-password", element: _jsx(ResetPasswordPage, {}) }), _jsx(Route, { path: "/join", element: _jsx(JoinPage, {}) }), _jsx(Route, { path: "/onboarding/workspace", element: _jsx(WorkspaceStepPage, {}) }), _jsx(Route, { path: "/verify-email", element: _jsx(VerifyEmailConfirmPage, {}) }), _jsx(Route, { path: "/verify-email/pending", element: _jsx(VerifyEmailPendingPage, {}) }), _jsxs(Route, { element: _jsx(SessionGate, {}), children: [_jsx(Route, { path: "/onboarding/invites", element: _jsx(InvitesStepPage, {}) }), _jsx(Route, { path: "/onboarding/handbook", element: _jsx(HandbookStepPage, {}) }), _jsxs(Route, { element: _jsx(Shell, {}), children: [_jsx(Route, { index: true, element: _jsx(Navigate, { to: "/dashboard", replace: true }) }), _jsx(Route, { path: "dashboard", element: _jsx(DashboardPage, {}) }), _jsx(Route, { path: "search", element: _jsx(SearchPage, {}) }), _jsx(Route, { path: "people", element: _jsx(PeoplePage, {}) }), _jsx(Route, { path: "people/:id", element: _jsx(PersonDetail, {}) }), _jsx(Route, { path: "hiring", element: _jsx(HiringPage, {}) }), _jsx(Route, { path: "hiring/:id", element: _jsx(RoleDetail, {}) }), _jsx(Route, { path: "companies", element: _jsx(CompaniesPage, {}) }), _jsx(Route, { path: "companies/:id", element: _jsx(CompanyDetail, {}) }), _jsx(Route, { path: "deals", element: _jsx(DealsPage, {}) }), _jsx(Route, { path: "deals/settings", element: _jsx(DealStageSettingsPage, {}) }), _jsx(Route, { path: "deals/:id", element: _jsx(DealDetail, {}) }), _jsx(Route, { path: "opportunities", element: _jsx(OpportunitiesPage, {}) }), _jsx(Route, { path: "opportunities/settings", element: _jsx(OpportunityStageSettingsPage, {}) }), _jsx(Route, { path: "opportunities/:id", element: _jsx(OpportunityDetail, {}) }), _jsx(Route, { path: "fundraising", element: _jsx(FundraisingPage, {}) }), _jsx(Route, { path: "fundraising/settings", element: _jsx(RaiseStageSettingsPage, {}) }), _jsx(Route, { path: "fundraising/:id", element: _jsx(RaiseDetail, {}) }), _jsx(Route, { path: "partnerships", element: _jsx(PartnershipsPage, {}) }), _jsx(Route, { path: "partnerships/settings", element: _jsx(PartnershipStageSettingsPage, {}) }), _jsx(Route, { path: "partnerships/:id", element: _jsx(PartnershipDetail, {}) }), _jsx(Route, { path: "planning", element: _jsx(PlanningPage, {}) }), _jsx(Route, { path: "decisions", element: _jsx(DecisionsPage, {}) }), _jsx(Route, { path: "forms", element: _jsx(FormsPage, {}) }), _jsx(Route, { path: "forms/:id", element: _jsx(FormDetail, {}) }), _jsx(Route, { path: "handbook", element: _jsx(HandbookLayout, {}) }), _jsx(Route, { path: "handbook/:pageId", element: _jsx(HandbookLayout, {}) }), _jsx(Route, { path: "admin/workspace", element: _jsx(WorkspaceSettingsPage, {}) }), _jsx(Route, { path: "admin/team", element: _jsx(TeamPage, {}) }), _jsx(Route, { path: "admin/data", element: _jsx(DataPage, {}) }), _jsx(Route, { path: "admin/api-keys", element: _jsx(ApiKeysPage, {}) }), _jsx(Route, { path: "admin/mcp", element: _jsx(McpPage, {}) }), _jsx(Route, { path: "admin/webhooks", element: _jsx(WebhooksPage, {}) }), _jsx(Route, { path: "admin/modules", element: _jsx(ModulesPage, {}) }), _jsxs(Route, { path: "account", element: _jsx(AccountLayout, {}), children: [_jsx(Route, { index: true, element: _jsx(Navigate, { to: "/account/profile", replace: true }) }), _jsx(Route, { path: "profile", element: _jsx(ProfilePage, {}) }), _jsx(Route, { path: "security", element: _jsx(SecurityPage, {}) }), _jsx(Route, { path: "preferences", element: _jsx(PreferencesPage, {}) }), _jsx(Route, { path: "api-keys", element: _jsx(PersonalApiKeysPage, {}) }), accountRoutes.map((route) => (_jsx(Route, { path: route.path.slice(ACCOUNT_PREFIX.length), element: route.element }, route.path)))] }), shellRoutes.map((route) => (_jsx(Route, { path: route.path, element: route.element }, route.path))), _jsx(Route, { path: "*", element: _jsx(NotFoundPage, {}) })] })] })] }));
|
|
73
77
|
}
|
|
74
78
|
//# sourceMappingURL=KelpieApp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KelpieApp.js","sourceRoot":"","sources":["../../src/app/KelpieApp.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAwB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAyB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA4B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAoC,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAwB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA4B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAwB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA8B,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA2B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAAgC,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAAgC,CA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C,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1B,KAAC,KAAK,IAAkB,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAApD,KAAK,CAAC,IAAI,CAA8C,CACrE,CAAC,EAKF,KAAC,KAAK,IAAC,IAAI,EAAC,GAAG,EAAC,OAAO,EAAE,KAAC,YAAY,KAAG,GAAI,IACvC,IACF,IACD,CACV,CAAA;AACH,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What stands between a URL and a page that needs a workspace.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Four answers, and they are not the same thing:
|
|
5
5
|
*
|
|
6
6
|
* - `401` means sign in. That is a redirect.
|
|
7
|
-
* - Signed in
|
|
7
|
+
* - Signed in, no workspace, email unverified means go verify it: creating a
|
|
8
|
+
* workspace answers `403` until then. Checked before `needsWorkspace`,
|
|
9
|
+
* since both are true at once for a fresh direct signup and this is the one
|
|
10
|
+
* that has to happen first.
|
|
11
|
+
* - Signed in, no workspace, verified means create one. Also a redirect, to a
|
|
8
12
|
* different place, because sending someone to a sign-in form they have
|
|
9
13
|
* already passed is a loop.
|
|
10
14
|
* - Anything else is the service being unreachable or broken, and redirecting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionGate.d.ts","sourceRoot":"","sources":["../../src/app/SessionGate.tsx"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"SessionGate.d.ts","sourceRoot":"","sources":["../../src/app/SessionGate.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CA4B/C"}
|
package/dist/app/SessionGate.js
CHANGED
|
@@ -5,17 +5,21 @@ import { ErrorPanel, LoadingPanel } from '../components/QueryState.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* What stands between a URL and a page that needs a workspace.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Four answers, and they are not the same thing:
|
|
9
9
|
*
|
|
10
10
|
* - `401` means sign in. That is a redirect.
|
|
11
|
-
* - Signed in
|
|
11
|
+
* - Signed in, no workspace, email unverified means go verify it: creating a
|
|
12
|
+
* workspace answers `403` until then. Checked before `needsWorkspace`,
|
|
13
|
+
* since both are true at once for a fresh direct signup and this is the one
|
|
14
|
+
* that has to happen first.
|
|
15
|
+
* - Signed in, no workspace, verified means create one. Also a redirect, to a
|
|
12
16
|
* different place, because sending someone to a sign-in form they have
|
|
13
17
|
* already passed is a loop.
|
|
14
18
|
* - Anything else is the service being unreachable or broken, and redirecting
|
|
15
19
|
* on that would hide it behind a sign-in form that will also fail.
|
|
16
20
|
*/
|
|
17
21
|
export function SessionGate() {
|
|
18
|
-
const { isLoading, isSignedOut, needsWorkspace, error } = useSession();
|
|
22
|
+
const { isLoading, isSignedOut, needsWorkspace, needsEmailVerification, error } = useSession();
|
|
19
23
|
if (isSignedOut) {
|
|
20
24
|
return _jsx(Navigate, { to: "/login", replace: true });
|
|
21
25
|
}
|
|
@@ -25,6 +29,9 @@ export function SessionGate() {
|
|
|
25
29
|
if (isLoading) {
|
|
26
30
|
return _jsx(LoadingPanel, {});
|
|
27
31
|
}
|
|
32
|
+
if (needsEmailVerification) {
|
|
33
|
+
return _jsx(Navigate, { to: "/verify-email/pending", replace: true });
|
|
34
|
+
}
|
|
28
35
|
if (needsWorkspace) {
|
|
29
36
|
return _jsx(Navigate, { to: "/onboarding/workspace", replace: true });
|
|
30
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionGate.js","sourceRoot":"","sources":["../../src/app/SessionGate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA8B,CAAA;AAEvE
|
|
1
|
+
{"version":3,"file":"SessionGate.js","sourceRoot":"","sources":["../../src/app/SessionGate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA8B,CAAA;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,sBAAsB,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAA;IAE9F,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAC,QAAQ,EAAC,OAAO,SAAG,CAAA;IACzC,CAAC;IAED,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,CACL,cAAK,SAAS,EAAC,6BAA6B,YAC1C,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,GACxB,CACP,CAAA;IACH,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,KAAC,YAAY,KAAG,CAAA;IACzB,CAAC;IAED,IAAI,sBAAsB,EAAE,CAAC;QAC3B,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAC,uBAAuB,EAAC,OAAO,SAAG,CAAA;IACxD,CAAC;IAED,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAC,uBAAuB,EAAC,OAAO,SAAG,CAAA;IACxD,CAAC;IAED,OAAO,KAAC,MAAM,KAAG,CAAA;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivitiesPanel.d.ts","sourceRoot":"","sources":["../../src/components/ActivitiesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivitiesPanel.d.ts","sourceRoot":"","sources":["../../src/components/ActivitiesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAS/E;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAoDD,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkD1C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,QAAQ,GACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+B1C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTimezone } from '../api/resources/account.js';
|
|
2
3
|
import { useActivities } from '../api/resources/activities.js';
|
|
3
4
|
import { useMembers } from '../api/resources/members.js';
|
|
4
5
|
import { formatRelativeTime, monthLabel } from '../lib/dates.js';
|
|
@@ -26,10 +27,10 @@ const TARGET_TYPE_LABELS = {
|
|
|
26
27
|
candidate: 'Candidate',
|
|
27
28
|
};
|
|
28
29
|
/** Consecutive runs, not a map: the list is already ordered, so a month never recurs. */
|
|
29
|
-
function groupByMonth(activities, now) {
|
|
30
|
+
function groupByMonth(activities, timezone, now) {
|
|
30
31
|
const groups = [];
|
|
31
32
|
for (const activity of activities) {
|
|
32
|
-
const label = monthLabel(activity.createdAt, now);
|
|
33
|
+
const label = monthLabel(activity.createdAt, timezone, now);
|
|
33
34
|
const last = groups.at(-1);
|
|
34
35
|
if (last?.label === label) {
|
|
35
36
|
last.items.push(activity);
|
|
@@ -43,8 +44,9 @@ function groupByMonth(activities, now) {
|
|
|
43
44
|
export function ActivitiesPanel({ targetType, targetId, }) {
|
|
44
45
|
const activities = useActivities({ targetType, targetId });
|
|
45
46
|
const members = useMembers();
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const timezone = useTimezone();
|
|
48
|
+
const groups = groupByMonth(activities.records, timezone, new Date());
|
|
49
|
+
return (_jsxs("section", { children: [_jsx(SectionHeader, { title: "Activity" }), activities.error !== null && _jsx(ErrorPanel, { error: activities.error }), activities.isLoading && _jsx("p", { className: "text-[13px] text-ink-faint", children: "Loading activity\u2026" }), !activities.isLoading && activities.records.length === 0 && activities.error === null && (_jsx("p", { className: "text-[13px] text-ink-faint", children: "No activity yet." })), _jsx("div", { className: "space-y-4", children: groups.map((group) => (_jsxs("div", { children: [_jsx("h3", { className: "mb-2 text-[12px] font-semibold text-ink", children: group.label }), _jsx("ol", { className: "overflow-hidden rounded-md border border-border", children: group.items.map((activity, index) => (_jsx(ActivityEvent, { activity: activity, actorName: actorNameFor(activity, members.nameById), contextType: targetType, contextId: targetId, isLast: index === group.items.length - 1, timezone: timezone }, activity.id))) })] }, group.label))) }), activities.hasMore && (_jsx("button", { type: "button", onClick: activities.loadMore, disabled: activities.isLoadingMore, className: "mt-3 rounded-md border border-border px-3 py-1.5 text-[12px] font-medium text-ink-muted transition hover:border-border-strong hover:text-ink", children: activities.isLoadingMore ? 'Loading…' : 'Load more' }))] }));
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
* The single most recent event, for a record's Overview tab.
|
|
@@ -55,8 +57,9 @@ export function ActivitiesPanel({ targetType, targetId, }) {
|
|
|
55
57
|
export function LatestActivity({ targetType, targetId, }) {
|
|
56
58
|
const activities = useActivities({ targetType, targetId });
|
|
57
59
|
const members = useMembers();
|
|
60
|
+
const timezone = useTimezone();
|
|
58
61
|
const latest = activities.records[0];
|
|
59
|
-
return (_jsxs("section", { children: [_jsx(SectionHeader, { title: "Latest activity" }), activities.error !== null && _jsx(ErrorPanel, { error: activities.error }), activities.isLoading && _jsx("p", { className: "text-[13px] text-ink-faint", children: "Loading activity\u2026" }), !activities.isLoading && latest === undefined && activities.error === null && (_jsx("p", { className: "text-[13px] text-ink-faint", children: "No activity yet." })), latest !== undefined && (_jsx("ol", { className: "overflow-hidden rounded-md border border-border", children: _jsx(ActivityEvent, { activity: latest, actorName: actorNameFor(latest, members.nameById), contextType: targetType, contextId: targetId, isLast: true }) }))] }));
|
|
62
|
+
return (_jsxs("section", { children: [_jsx(SectionHeader, { title: "Latest activity" }), activities.error !== null && _jsx(ErrorPanel, { error: activities.error }), activities.isLoading && _jsx("p", { className: "text-[13px] text-ink-faint", children: "Loading activity\u2026" }), !activities.isLoading && latest === undefined && activities.error === null && (_jsx("p", { className: "text-[13px] text-ink-faint", children: "No activity yet." })), latest !== undefined && (_jsx("ol", { className: "overflow-hidden rounded-md border border-border", children: _jsx(ActivityEvent, { activity: latest, actorName: actorNameFor(latest, members.nameById), contextType: targetType, contextId: targetId, isLast: true, timezone: timezone }) }))] }));
|
|
60
63
|
}
|
|
61
64
|
/**
|
|
62
65
|
* Exactly one of the two actor columns is set. `actorLabel` carries the display
|
|
@@ -68,8 +71,8 @@ function actorNameFor(activity, nameById) {
|
|
|
68
71
|
}
|
|
69
72
|
return nameById.get(activity.actorMemberId) ?? 'Unknown';
|
|
70
73
|
}
|
|
71
|
-
function ActivityEvent({ activity, actorName, contextType, contextId, isLast, }) {
|
|
74
|
+
function ActivityEvent({ activity, actorName, contextType, contextId, isLast, timezone, }) {
|
|
72
75
|
const isRolledUp = activity.targetType !== contextType || activity.targetId !== contextId;
|
|
73
|
-
return (_jsxs("li", { className: "flex gap-2 border-b border-border px-4 py-3 last:border-0", children: [_jsxs("div", { className: "relative flex w-5 shrink-0 justify-center", children: [!isLast && (_jsx("span", { "aria-hidden": true, className: "absolute top-5 bottom-[-12px] left-1/2 w-px -translate-x-1/2 bg-border" })), _jsx("div", { className: "relative z-10 flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-[9px] font-semibold tracking-wide text-ink-muted uppercase", title: activity.kind, children: KIND_GLYPHS[activity.kind] })] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsxs("p", { className: "min-w-0 text-[12px] leading-snug text-ink", children: [_jsx("span", { className: "font-semibold", children: actorName }), ' ', _jsx("span", { className: "text-ink-muted", children: activity.action })] }), _jsx("time", { dateTime: activity.createdAt.toISOString(), className: "shrink-0 text-[11px] text-ink-faint", children: formatRelativeTime(activity.createdAt) })] }), isRolledUp && (_jsxs("p", { className: "text-[11px] leading-snug text-ink-faint", children: ["on ", _jsx("span", { className: "text-ink-muted", children: TARGET_TYPE_LABELS[activity.targetType] })] })), activity.detail !== null && (_jsx("p", { className: "text-[11px] leading-snug text-ink-faint", children: activity.detail }))] })] }));
|
|
76
|
+
return (_jsxs("li", { className: "flex gap-2 border-b border-border px-4 py-3 last:border-0", children: [_jsxs("div", { className: "relative flex w-5 shrink-0 justify-center", children: [!isLast && (_jsx("span", { "aria-hidden": true, className: "absolute top-5 bottom-[-12px] left-1/2 w-px -translate-x-1/2 bg-border" })), _jsx("div", { className: "relative z-10 flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-[9px] font-semibold tracking-wide text-ink-muted uppercase", title: activity.kind, children: KIND_GLYPHS[activity.kind] })] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsxs("p", { className: "min-w-0 text-[12px] leading-snug text-ink", children: [_jsx("span", { className: "font-semibold", children: actorName }), ' ', _jsx("span", { className: "text-ink-muted", children: activity.action })] }), _jsx("time", { dateTime: activity.createdAt.toISOString(), className: "shrink-0 text-[11px] text-ink-faint", children: formatRelativeTime(activity.createdAt, timezone) })] }), isRolledUp && (_jsxs("p", { className: "text-[11px] leading-snug text-ink-faint", children: ["on ", _jsx("span", { className: "text-ink-muted", children: TARGET_TYPE_LABELS[activity.targetType] })] })), activity.detail !== null && (_jsx("p", { className: "text-[11px] leading-snug text-ink-faint", children: activity.detail }))] })] }));
|
|
74
77
|
}
|
|
75
78
|
//# sourceMappingURL=ActivitiesPanel.js.map
|