@arbidocs/blocks 0.5.22 → 0.5.24
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/{WorkspaceTableView-6JVHGDUB.cjs → WorkspaceTableView-GIDGNGBW.cjs} +6 -6
- package/dist/{WorkspaceTableView-6JVHGDUB.cjs.map → WorkspaceTableView-GIDGNGBW.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-ECPHGWHF.js → WorkspaceTableView-S2PTTVHL.js} +4 -4
- package/dist/{WorkspaceTableView-ECPHGWHF.js.map → WorkspaceTableView-S2PTTVHL.js.map} +1 -1
- package/dist/auth/index.cjs +47 -47
- package/dist/auth/index.js +2 -2
- package/dist/{chunk-7DDMF3DZ.cjs → chunk-53T2FY4Z.cjs} +5 -31
- package/dist/chunk-53T2FY4Z.cjs.map +1 -0
- package/dist/chunk-5ZBXFHZW.js +434 -0
- package/dist/chunk-5ZBXFHZW.js.map +1 -0
- package/dist/{chunk-K237IYOD.cjs → chunk-BYJUI4AT.cjs} +54 -2
- package/dist/chunk-BYJUI4AT.cjs.map +1 -0
- package/dist/{chunk-O4EQYPLO.cjs → chunk-C2SZQKX2.cjs} +169 -27
- package/dist/chunk-C2SZQKX2.cjs.map +1 -0
- package/dist/{chunk-MSPNYW6Z.cjs → chunk-DTLVC6MN.cjs} +2 -53
- package/dist/chunk-DTLVC6MN.cjs.map +1 -0
- package/dist/{chunk-RVKVGS72.js → chunk-FDUQQNDT.js} +2 -2
- package/dist/{chunk-RVKVGS72.js.map → chunk-FDUQQNDT.js.map} +1 -1
- package/dist/{chunk-TTJGCJWX.cjs → chunk-H3XAHVDT.cjs} +42 -2
- package/dist/chunk-H3XAHVDT.cjs.map +1 -0
- package/dist/{chunk-XL55UDLO.js → chunk-IJJKUTKM.js} +5 -30
- package/dist/chunk-IJJKUTKM.js.map +1 -0
- package/dist/{chunk-ZX663X3X.cjs → chunk-KNRAKOCO.cjs} +6 -428
- package/dist/chunk-KNRAKOCO.cjs.map +1 -0
- package/dist/chunk-KUQOHPKP.cjs +443 -0
- package/dist/chunk-KUQOHPKP.cjs.map +1 -0
- package/dist/{chunk-F2BYURQZ.cjs → chunk-LYF47OXX.cjs} +5 -5
- package/dist/{chunk-F2BYURQZ.cjs.map → chunk-LYF47OXX.cjs.map} +1 -1
- package/dist/{chunk-PZRTRYPD.js → chunk-MKTEVOC3.js} +44 -5
- package/dist/chunk-MKTEVOC3.js.map +1 -0
- package/dist/{chunk-6XW3CMU4.js → chunk-N3KNAQ55.js} +144 -4
- package/dist/chunk-N3KNAQ55.js.map +1 -0
- package/dist/{chunk-KL6XOSEN.js → chunk-PLAGIVFF.js} +4 -52
- package/dist/chunk-PLAGIVFF.js.map +1 -0
- package/dist/{chunk-FZVAJFRH.cjs → chunk-RHKFCSFC.cjs} +2 -2
- package/dist/{chunk-FZVAJFRH.cjs.map → chunk-RHKFCSFC.cjs.map} +1 -1
- package/dist/{chunk-NVRJ6WTR.js → chunk-RTAYJUQM.js} +3 -3
- package/dist/{chunk-NVRJ6WTR.js.map → chunk-RTAYJUQM.js.map} +1 -1
- package/dist/{chunk-IXBJEQH5.js → chunk-VN4FSGBR.js} +53 -4
- package/dist/chunk-VN4FSGBR.js.map +1 -0
- package/dist/{chunk-SLRVI2YU.js → chunk-X6U6L6BG.js} +29 -4
- package/dist/chunk-X6U6L6BG.js.map +1 -0
- package/dist/{chunk-SQ5F5BFW.cjs → chunk-XDU3HHUU.cjs} +32 -6
- package/dist/chunk-XDU3HHUU.cjs.map +1 -0
- package/dist/{chunk-SKVVOEMX.js → chunk-XXUPUXBF.js} +8 -423
- package/dist/chunk-XXUPUXBF.js.map +1 -0
- package/dist/connect/index.cjs +1203 -624
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +770 -197
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/auth/CompactLogin.d.ts +26 -0
- package/dist/connection/auth/ConnectedLoginPage.d.ts +9 -1
- package/dist/connection/auth/index.d.ts +3 -1
- package/dist/connection/auth/sso-popup.d.ts +13 -0
- package/dist/connection/auth/sso-sign-in.d.ts +38 -0
- package/dist/connection/auth/support.d.ts +17 -0
- package/dist/connection/auth/useLoginActions.d.ts +9 -2
- package/dist/connection/billing/ConnectedQuotaDialog.d.ts +5 -13
- package/dist/connection/billing/index.d.ts +1 -1
- package/dist/connection/connectors/ConnectedSharePointAdminConsentPage.d.ts +26 -0
- package/dist/connection/connectors/index.d.ts +1 -0
- package/dist/connection/projects/ConnectedProjectsPanel.d.ts +9 -1
- package/dist/connection/projects/ProjectsListPage.d.ts +40 -0
- package/dist/connection/projects/index.d.ts +1 -0
- package/dist/connection/settings-page/ConnectedAccountSettings.d.ts +2 -1
- package/dist/connection/settings-page/ConnectedBoxPortalSection.d.ts +6 -0
- package/dist/connection/settings-page/appearanceSection.d.ts +30 -0
- package/dist/connection/settings-page/index.d.ts +1 -0
- package/dist/index.cjs +209 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -50
- package/dist/index.js.map +1 -1
- package/dist/settings/AppearanceSettings.d.ts +1 -2
- package/dist/settings/index.cjs +153 -153
- package/dist/settings/index.d.ts +2 -1
- package/dist/settings/index.js +1 -1
- package/dist/site/index.cjs +82 -74
- package/dist/site/index.d.ts +2 -0
- package/dist/site/index.js +3 -3
- package/dist/studio/index.cjs +73 -73
- package/dist/studio/index.js +5 -5
- package/dist/theme/appearance.d.ts +47 -0
- package/dist/theme/fromCss.d.ts +33 -0
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-6XW3CMU4.js.map +0 -1
- package/dist/chunk-7DDMF3DZ.cjs.map +0 -1
- package/dist/chunk-AMTWY22T.js +0 -11
- package/dist/chunk-AMTWY22T.js.map +0 -1
- package/dist/chunk-IXBJEQH5.js.map +0 -1
- package/dist/chunk-K237IYOD.cjs.map +0 -1
- package/dist/chunk-KL6XOSEN.js.map +0 -1
- package/dist/chunk-MSPNYW6Z.cjs.map +0 -1
- package/dist/chunk-O4EQYPLO.cjs.map +0 -1
- package/dist/chunk-PZRTRYPD.js.map +0 -1
- package/dist/chunk-SKVVOEMX.js.map +0 -1
- package/dist/chunk-SLRVI2YU.js.map +0 -1
- package/dist/chunk-SQ5F5BFW.cjs.map +0 -1
- package/dist/chunk-TTJGCJWX.cjs.map +0 -1
- package/dist/chunk-XL55UDLO.js.map +0 -1
- package/dist/chunk-ZU2B2RZK.cjs +0 -13
- package/dist/chunk-ZU2B2RZK.cjs.map +0 -1
- package/dist/chunk-ZX663X3X.cjs.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The compact sign-in of embedded hosts (an Office task pane, a browser extension): email and
|
|
3
|
+
* password, or SSO in a popup (the host opens it, `onSsoSignIn`) followed by the master password
|
|
4
|
+
* the account's keys are derived from. The same actions as the sign-in page (`useLoginActions`)
|
|
5
|
+
* and the same SSO completion as the callback page (`completeSsoSignIn`), arranged for a narrow
|
|
6
|
+
* pane, with errors shown in place.
|
|
7
|
+
*/
|
|
8
|
+
import { type ReactElement } from 'react';
|
|
9
|
+
import { type SsoUser } from './support';
|
|
10
|
+
export interface CompactLoginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Sign in at the SSO provider in a popup: the provider's token and user, or `null` when the
|
|
13
|
+
* popup closed without one. Absent: no SSO.
|
|
14
|
+
*/
|
|
15
|
+
onSsoSignIn?: () => Promise<{
|
|
16
|
+
accessToken: string;
|
|
17
|
+
user: SsoUser;
|
|
18
|
+
} | null>;
|
|
19
|
+
/** Signed in, with the person's first name. */
|
|
20
|
+
onSignedIn?: (name: string) => void;
|
|
21
|
+
/** The product name in the copy ("Sign in with …", "your … master password"). */
|
|
22
|
+
appName?: string;
|
|
23
|
+
/** The SSO provider's name on its buttons. Default: the product name. */
|
|
24
|
+
ssoName?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function CompactLogin({ onSsoSignIn, onSignedIn, appName, ssoName, }: CompactLoginOptions): ReactElement;
|
|
@@ -6,4 +6,12 @@
|
|
|
6
6
|
* configuration's `auth` (and `sso`), see `./support`.
|
|
7
7
|
*/
|
|
8
8
|
import { type ReactElement } from 'react';
|
|
9
|
-
|
|
9
|
+
import { type CompactLoginOptions } from './CompactLogin';
|
|
10
|
+
export interface ConnectedLoginPageProps extends CompactLoginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* `page` (default): the full sign-in and registration page. `compact`: the sign-in of an embedded
|
|
13
|
+
* host's narrow pane (email and password, or SSO in a popup, `onSsoSignIn`).
|
|
14
|
+
*/
|
|
15
|
+
layout?: 'page' | 'compact';
|
|
16
|
+
}
|
|
17
|
+
export declare function ConnectedLoginPage({ layout, ...compact }?: ConnectedLoginPageProps): ReactElement;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { ConnectedLoginPage } from './ConnectedLoginPage';
|
|
1
|
+
export { ConnectedLoginPage, type ConnectedLoginPageProps } from './ConnectedLoginPage';
|
|
2
|
+
export { type CompactLoginOptions } from './CompactLogin';
|
|
3
|
+
export { openSsoPopup } from './sso-popup';
|
|
2
4
|
export { ConnectedSsoCallback } from './ConnectedSsoCallback';
|
|
3
5
|
export { SsoResendVerificationButton } from './SsoResendVerificationButton';
|
|
4
6
|
export { resolveSsoName, type NameSource, type ResolvedName } from './sso-name';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSO in a popup, for hosts that cannot leave their page (an Office task pane, an extension): open
|
|
3
|
+
* the provider's sign-in, and wait for the callback page in the popup to post the provider's token
|
|
4
|
+
* and user back (`window.opener.postMessage({ accessToken, user }, origin)`). Resolves `null` when
|
|
5
|
+
* the popup is closed first; rejects with the provider's error.
|
|
6
|
+
*/
|
|
7
|
+
import type { SsoUser } from './support';
|
|
8
|
+
export declare function openSsoPopup(url: string, { features }?: {
|
|
9
|
+
features?: string;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
accessToken: string;
|
|
12
|
+
user: SsoUser;
|
|
13
|
+
} | null>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finishing a sign-in through SSO, once the provider has signed the person in: what their account
|
|
3
|
+
* is for the provider's email (`arbi.sso.status`), then, with the master password, register a new
|
|
4
|
+
* account (and back it up), link a local one, or sign in. One implementation for the full-page
|
|
5
|
+
* callback (`ConnectedSsoCallback`) and the compact sign-in of embedded hosts.
|
|
6
|
+
*/
|
|
7
|
+
import type { components, LoginResult } from '@arbidocs/client';
|
|
8
|
+
import type { useArbi } from '@arbidocs/react';
|
|
9
|
+
import type { SsoUser } from './support';
|
|
10
|
+
export type SsoAccountStatus = components['schemas']['SSOStatusResponse'];
|
|
11
|
+
type Arbi = ReturnType<typeof useArbi>;
|
|
12
|
+
/** What the provider's account is on this deployment (`new_user`, `sso_exists`, `local_exists`). */
|
|
13
|
+
export declare function ssoAccountStatus(arbi: Arbi, token: string, user: SsoUser): Promise<{
|
|
14
|
+
status: string;
|
|
15
|
+
email: string;
|
|
16
|
+
given_name?: string | null;
|
|
17
|
+
family_name?: string | null;
|
|
18
|
+
}>;
|
|
19
|
+
export interface CompleteSsoSignIn {
|
|
20
|
+
token: string;
|
|
21
|
+
user: SsoUser;
|
|
22
|
+
status: SsoAccountStatus;
|
|
23
|
+
/** The master password: a new one for `new_user`, the account's otherwise. */
|
|
24
|
+
password: string;
|
|
25
|
+
/** A new account: download its recovery key (default on). */
|
|
26
|
+
saveRecoveryKey?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sign in with the master password by account status. A new account is registered (the SSO token
|
|
30
|
+
* stands in for the verification code), backed up, and signed in with the provider's name and
|
|
31
|
+
* picture; `registered` says so. A local account is linked to SSO (`linked`).
|
|
32
|
+
*/
|
|
33
|
+
export declare function completeSsoSignIn(arbi: Arbi, { token, user, status, password, saveRecoveryKey }: CompleteSsoSignIn): Promise<{
|
|
34
|
+
login: LoginResult | undefined;
|
|
35
|
+
registered: boolean;
|
|
36
|
+
linked: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export {};
|
|
@@ -35,6 +35,23 @@ export interface AuthPagesSupport {
|
|
|
35
35
|
passwordRules?: PasswordRules;
|
|
36
36
|
/** Only SSO: the page hands straight over to the provider. */
|
|
37
37
|
ssoOnly?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Visitors can create an account here. Default: on. Off (a staff-only site whose accounts are
|
|
40
|
+
* made for people): the page signs in only, with no Register tab.
|
|
41
|
+
*/
|
|
42
|
+
allowRegistration?: boolean;
|
|
43
|
+
/** The sign-in heading and the line under it. Default: "Welcome back". */
|
|
44
|
+
heading?: {
|
|
45
|
+
title: string;
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
/** The email field's label on sign-in. Default: "Email". */
|
|
49
|
+
emailLabel?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Sign in from `#email=…&password=…[&next=…]` (mock and demo deployments only; see
|
|
52
|
+
* `useFragmentCredentials`). A `next` path goes to `onReturnPath`. Default: off.
|
|
53
|
+
*/
|
|
54
|
+
fragmentSignIn?: boolean;
|
|
38
55
|
/** The visitor started to sign in: warm what the signed-in app needs. */
|
|
39
56
|
onIntent?: () => void;
|
|
40
57
|
/** An invitation link carries where to go once signed in. */
|
|
@@ -5,16 +5,23 @@
|
|
|
5
5
|
* session in, and the site's sign-in hooks run around it.
|
|
6
6
|
*/
|
|
7
7
|
import type { LoginFormActions, LoginFormState } from './useLoginForm';
|
|
8
|
-
export declare function useLoginActions({ formState, formActions, }: {
|
|
8
|
+
export declare function useLoginActions({ formState, formActions, onError, }: {
|
|
9
9
|
formState: LoginFormState;
|
|
10
10
|
formActions: LoginFormActions;
|
|
11
|
+
/** Show a refusal in the form itself. Default: a notice. */
|
|
12
|
+
onError?: (message: string) => void;
|
|
11
13
|
}): {
|
|
12
14
|
isAuthenticating: boolean;
|
|
13
15
|
isRequestingCode: boolean;
|
|
14
16
|
handleSsoLogin: (connection?: string) => void;
|
|
15
17
|
handleLocalLogin: (opts?: {
|
|
16
18
|
isFreshRegistration?: boolean;
|
|
17
|
-
|
|
19
|
+
/** Sign in with these, not the form's (a sign-in link's). */
|
|
20
|
+
credentials?: {
|
|
21
|
+
email: string;
|
|
22
|
+
password: string;
|
|
23
|
+
};
|
|
24
|
+
}) => Promise<import("@arbidocs/client").LoginResult | undefined>;
|
|
18
25
|
handleRegister: (saveRecoveryKey?: boolean) => Promise<void>;
|
|
19
26
|
handleRequestVerificationCode: () => Promise<void>;
|
|
20
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The dialog shown when a project's AI usage for the month is used up (a 402 `QUOTA_EXCEEDED`: an
|
|
3
3
|
* API call, a chat send, a document's processing). The host decides when (`info`), and what a Box
|
|
4
|
-
* deployment's admin opens (`
|
|
4
|
+
* deployment's admin opens the portal (`runtimeConfig.licenceUrl`); billing opens through
|
|
5
|
+
* `environment.openProject`.
|
|
5
6
|
*
|
|
6
7
|
* One sentence and the actions that get the user going again, by project (the add-on state is only
|
|
7
8
|
* visible to the owner of a Pro project). The usage cap limits automatic top-ups only, so adding AI
|
|
@@ -11,8 +12,8 @@
|
|
|
11
12
|
* - Pro, cap reached → "Usage cap reached: no more automatic top-ups this month." / Add and "Raise cap".
|
|
12
13
|
* - Pro otherwise (the automatic top-up failed) → the billing error / Add.
|
|
13
14
|
* - Free (or not the owner) → "Upgrade", which opens the plan picker of the project.
|
|
14
|
-
* - Box deployment
|
|
15
|
-
* "Open the ARBI portal"
|
|
15
|
+
* - Box deployment → members: "Ask your Box admin to add more." (no purchase); Box admins:
|
|
16
|
+
* "Open the ARBI portal", where the Box is administered. No Box billing here.
|
|
16
17
|
*/
|
|
17
18
|
/** What used up: the project's spend against its budget (£), and the server's message. */
|
|
18
19
|
export interface QuotaExceededInfo {
|
|
@@ -21,18 +22,9 @@ export interface QuotaExceededInfo {
|
|
|
21
22
|
projectExtId: string | null;
|
|
22
23
|
message?: string;
|
|
23
24
|
}
|
|
24
|
-
/** A Box deployment: its AI usage is the firm's, administered in the ARBI portal. */
|
|
25
|
-
export interface QuotaDialogBox {
|
|
26
|
-
/** The viewer administers the Box (else they ask their admin). */
|
|
27
|
-
isAdmin: boolean;
|
|
28
|
-
/** The Box's licence page in the portal. */
|
|
29
|
-
portalUrl: string;
|
|
30
|
-
}
|
|
31
25
|
export interface ConnectedQuotaDialogProps {
|
|
32
26
|
/** Open with what was used up; `null`: closed. */
|
|
33
27
|
info: QuotaExceededInfo | null;
|
|
34
28
|
onClose: () => void;
|
|
35
|
-
/** On a Box deployment. Absent: a project's own billing. */
|
|
36
|
-
box?: QuotaDialogBox;
|
|
37
29
|
}
|
|
38
|
-
export declare function ConnectedQuotaDialog({ info, onClose: close
|
|
30
|
+
export declare function ConnectedQuotaDialog({ info, onClose: close }: ConnectedQuotaDialogProps): import("react").JSX.Element;
|
|
@@ -20,6 +20,6 @@ export { REFERRAL_OFFER, useReferralReward } from './referral-reward';
|
|
|
20
20
|
export { isProProject, planBadgeView, planName } from './plan-badge';
|
|
21
21
|
export { aiUsageResetTimestamp, formatResetDate, getQuotaItems } from './quota-items';
|
|
22
22
|
export { CAP_REACHED_MESSAGE, ZERO_BUDGET_MESSAGE, isAddonBudgetZero } from './addon-pricing';
|
|
23
|
-
export { ConnectedQuotaDialog, type ConnectedQuotaDialogProps, type
|
|
23
|
+
export { ConnectedQuotaDialog, type ConnectedQuotaDialogProps, type QuotaExceededInfo, } from './ConnectedQuotaDialog';
|
|
24
24
|
export { ConnectedWelcomeDialog, type ConnectedWelcomeDialogProps } from './ConnectedWelcomeDialog';
|
|
25
25
|
export { ProjectUsageContent, type ProjectUsageContentProps, type UsageBreakdownKey, } from './ProjectUsageContent';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharePoint org admin-consent page — PUBLIC (no sign-in). Requests go to the environment's API
|
|
3
|
+
* base URL (`runtimeConfig.apiBaseUrl`).
|
|
4
|
+
*
|
|
5
|
+
* The enterprise story: a user wants SharePoint sync, but their Microsoft
|
|
6
|
+
* tenant requires an IT admin to approve the app's Sites.Read.All scope. The
|
|
7
|
+
* admin almost never has (or wants) an ARBI account, so this page gives them a
|
|
8
|
+
* standalone place to grant the org-wide consent:
|
|
9
|
+
*
|
|
10
|
+
* 1. A user copies this page's link from the SharePoint connector row and
|
|
11
|
+
* sends it to their admin.
|
|
12
|
+
* 2. The admin opens it, reviews what will be granted, and clicks Approve —
|
|
13
|
+
* which redirects to Microsoft's admin-consent screen
|
|
14
|
+
* (GET /v1/connectors/microsoft_sharepoint/admin-consent, public endpoint).
|
|
15
|
+
* 3. Microsoft sends them back here with ?result=granted|declined and this
|
|
16
|
+
* page shows the outcome.
|
|
17
|
+
*
|
|
18
|
+
* After the grant, users in that tenant connect SharePoint themselves — this
|
|
19
|
+
* page only unlocks the org-level permission wall; it grants no data access by
|
|
20
|
+
* itself (per-user OAuth + sealed tokens still gate every mailbox/site).
|
|
21
|
+
*/
|
|
22
|
+
export interface ConnectedSharePointAdminConsentPageProps {
|
|
23
|
+
/** The outcome Microsoft sends back (`?result=granted|declined`). Default: the page's query. */
|
|
24
|
+
result?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export declare function ConnectedSharePointAdminConsentPage({ result: givenResult, }?: ConnectedSharePointAdminConsentPageProps): import("react").JSX.Element;
|
|
@@ -2,3 +2,4 @@ export { ConnectedAppsSettings, type ConnectedAppsSettingsProps } from './Connec
|
|
|
2
2
|
export { ConnectedMailboxSyncDialog, type ConnectedMailboxSyncDialogProps, } from './ConnectedMailboxSyncDialog';
|
|
3
3
|
export { ConnectedDriveSyncDialog, type ConnectedDriveSyncDialogProps, } from './ConnectedDriveSyncDialog';
|
|
4
4
|
export { BACKFILL_OPTIONS, windowLabel } from './sync-labels';
|
|
5
|
+
export { ConnectedSharePointAdminConsentPage, type ConnectedSharePointAdminConsentPageProps, } from './ConnectedSharePointAdminConsentPage';
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* (`tabs`); without it the panel keeps them and opens its own projects' tabs.
|
|
9
9
|
*/
|
|
10
10
|
import { type ReactNode } from 'react';
|
|
11
|
+
import { type ProjectsListPageProps } from './ProjectsListPage';
|
|
11
12
|
/** The base tab's id. */
|
|
12
13
|
export declare const PROJECTS_BASE_TAB_ID = "projects";
|
|
13
14
|
/** The panel's project tabs, kept by a host. */
|
|
@@ -21,6 +22,13 @@ export interface ProjectPanelTabs {
|
|
|
21
22
|
onClose: (projectId: string) => void;
|
|
22
23
|
}
|
|
23
24
|
export interface ConnectedProjectsPanelProps {
|
|
25
|
+
/**
|
|
26
|
+
* `panel` (default): the Plan & Usage panel with a tab per open project. `page`: the projects
|
|
27
|
+
* list as a page (`page` options), a row opening the project through `environment.openProject`.
|
|
28
|
+
*/
|
|
29
|
+
layout?: 'panel' | 'page';
|
|
30
|
+
/** The list page's words, columns and header actions (`layout="page"`). */
|
|
31
|
+
page?: ProjectsListPageProps;
|
|
24
32
|
/** Host-kept tabs; the panel keeps its own without. */
|
|
25
33
|
tabs?: ProjectPanelTabs;
|
|
26
34
|
/** A project's storage section, at the foot of its detail. */
|
|
@@ -31,4 +39,4 @@ export interface ConnectedProjectsPanelProps {
|
|
|
31
39
|
headerRight?: ReactNode;
|
|
32
40
|
className?: string;
|
|
33
41
|
}
|
|
34
|
-
export declare function ConnectedProjectsPanel({
|
|
42
|
+
export declare function ConnectedProjectsPanel({ layout, page, ...panel }: ConnectedProjectsPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The projects list as a page (`ConnectedProjectsPanel layout="page"`): every project with its
|
|
3
|
+
* client, stage, documents, threads, people and storage (`useProjectSummaries`), searchable by
|
|
4
|
+
* project or workspace name; a row opens the project (`environment.openProject`). A site names
|
|
5
|
+
* things its own way (`labels`) and picks the columns (`columns`).
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
/** The list's columns, in order. */
|
|
9
|
+
export type ProjectListColumn = 'name' | 'client' | 'stage' | 'documents' | 'conversations' | 'members' | 'storage';
|
|
10
|
+
export declare const DEFAULT_PROJECT_LIST_COLUMNS: readonly ProjectListColumn[];
|
|
11
|
+
export interface ProjectsListLabels {
|
|
12
|
+
eyebrow?: ReactNode;
|
|
13
|
+
title: string;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
searchPlaceholder: string;
|
|
16
|
+
/** Column headers. */
|
|
17
|
+
columns: Record<ProjectListColumn, string>;
|
|
18
|
+
/** "opened 3 Oct 2026" under a project's name. */
|
|
19
|
+
opened: string;
|
|
20
|
+
loadingTitle: string;
|
|
21
|
+
loadingDescription?: string;
|
|
22
|
+
emptyTitle: string;
|
|
23
|
+
emptyDescription?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const DEFAULT_PROJECTS_LIST_LABELS: ProjectsListLabels;
|
|
26
|
+
export interface ProjectsListPageProps {
|
|
27
|
+
/** The site's words; each field falls back to the default. */
|
|
28
|
+
labels?: Partial<Omit<ProjectsListLabels, 'columns'>> & {
|
|
29
|
+
columns?: Partial<Record<ProjectListColumn, string>>;
|
|
30
|
+
};
|
|
31
|
+
/** The columns shown, in order. Default: all. */
|
|
32
|
+
columns?: readonly ProjectListColumn[];
|
|
33
|
+
/** The header's actions (a "new project" button). */
|
|
34
|
+
actions?: ReactNode;
|
|
35
|
+
/** The page's test-id prefix. Default: `projects`. */
|
|
36
|
+
testId?: string;
|
|
37
|
+
}
|
|
38
|
+
/** One decimal GB, or MB when tiny; "—" with nothing stored. */
|
|
39
|
+
export declare function formatStorageGb(gb: number): string;
|
|
40
|
+
export declare function ProjectsListPage({ labels: given, columns: shown, actions, testId, }: ProjectsListPageProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { ConnectedProjectsPanel, PROJECTS_BASE_TAB_ID, type ConnectedProjectsPanelProps, type ProjectPanelTabs, } from './ConnectedProjectsPanel';
|
|
2
2
|
export { buildProjectSummaries, primaryProjectWorkspace, useProjectSummaries, useProjectSummary, type ProjectMemberSummary, type ProjectSummary, type ProjectWorkspaceSummary, } from './useProjectSummaries';
|
|
3
|
+
export { DEFAULT_PROJECT_LIST_COLUMNS, DEFAULT_PROJECTS_LIST_LABELS, formatStorageGb, type ProjectListColumn, type ProjectsListLabels, type ProjectsListPageProps, } from './ProjectsListPage';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The Account section of a settings page, bound to the signed-in account: profile and ID check,
|
|
3
|
-
* security, the session card (server connection, active sessions, sign
|
|
3
|
+
* a Box admin's portal link, security, the session card (server connection, active sessions, sign
|
|
4
|
+
* out) and the danger zone.
|
|
4
5
|
* What only the host knows is a prop: the recovery-key download, its admin links, its socket and
|
|
5
6
|
* its billing page.
|
|
6
7
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Account settings, Box admins only: one row linking to the Box's page in the ARBI portal
|
|
3
|
+
* (`runtimeConfig.licenceUrl`), where the Box is administered (users, storage, AI usage, budget,
|
|
4
|
+
* billing). Nothing for anyone else, or where the host gives no portal.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ConnectedBoxPortalSection(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance, as a settings section a site adds as data (`ConnectedSettingsPage sections`).
|
|
3
|
+
*
|
|
4
|
+
* Two parts, each shown when the site supplies its store:
|
|
5
|
+
* - `appearance`: the reader's colour scheme, text size and typeface on this device
|
|
6
|
+
* ({@link createAppearanceStore});
|
|
7
|
+
* - `theme`: the site's brand tokens, edited live ({@link createThemeStore} + `ThemeEditor`).
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
import type { SettingsPageSection } from '../../settings/SettingsPage';
|
|
11
|
+
import type { AppearanceBundle } from '../../theme/appearance';
|
|
12
|
+
import type { ThemeBundle } from '../../theme/store';
|
|
13
|
+
import { type ThemeEditorProps } from '../../theme/ThemeEditor';
|
|
14
|
+
export interface AppearanceSettingsSectionOptions {
|
|
15
|
+
/** The reader's appearance store: shows colour scheme, text size and typeface. */
|
|
16
|
+
appearance?: AppearanceBundle;
|
|
17
|
+
/** The site's theme bundle: shows the token editor. */
|
|
18
|
+
theme?: ThemeBundle;
|
|
19
|
+
/** The theme editor's live preview card. */
|
|
20
|
+
themePreview?: ThemeEditorProps['preview'];
|
|
21
|
+
/** The theme editor's heading icon (a site's accent). Default: a palette. */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
/** The theme editor's description. */
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Appearance. The tab shows a palette when the section edits the theme's colours, a type glyph
|
|
28
|
+
* when it only sets the reader's own scheme, size and typeface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function appearanceSettingsSection(options: AppearanceSettingsSectionOptions): SettingsPageSection;
|
|
@@ -5,3 +5,4 @@ export { ConnectedPrivacySettings, type ConnectedPrivacySettingsProps, } from '.
|
|
|
5
5
|
export { ConnectedPremiumModels } from './ConnectedPremiumModels';
|
|
6
6
|
export { SessionStatusIcon, renderSessionStatusIcon } from './SessionStatusIcon';
|
|
7
7
|
export { usageSettingsSection, connectionSettingsSection, organisationSettingsSection, type UsageSettingsSectionOptions, type ConnectionSettingsSectionOptions, type OrganisationSettingsSectionOptions, } from './sections';
|
|
8
|
+
export { appearanceSettingsSection, type AppearanceSettingsSectionOptions, } from './appearanceSection';
|