@abyss-project/commons-front-core 4.1.0 → 5.0.1
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/{CookieConsentSettings.component-B06_BnQP.js → CookieConsentSettings.component-B7HoVxDK.js} +957 -988
- package/dist/auth/components/SecuritySettings/sections/PasswordSection.component.d.ts +0 -2
- package/dist/auth-client.js +1 -1
- package/dist/components/Inputs/CloudImport/CloudImport.component.d.ts +8 -21
- package/dist/components/Inputs/CloudImport/CloudImport.component.spec.d.ts +1 -0
- package/dist/components/Inputs/CloudImport/CloudImportFile.component.spec.d.ts +1 -0
- package/dist/components/Inputs/CloudImport/cloud-accept.d.ts +13 -0
- package/dist/components/Inputs/CloudImport/cloud-accept.spec.d.ts +1 -0
- package/dist/components/Inputs/CloudImport/cloud-picker.types.d.ts +46 -0
- package/dist/components/Inputs/CloudImport/index.d.ts +1 -0
- package/dist/components/Inputs/DropZone/DropZone.component.d.ts +9 -12
- package/dist/components/Inputs/DropZone/DropZone.component.spec.d.ts +1 -0
- package/dist/components/Inputs/index.d.ts +0 -1
- package/dist/components/Modals/ImportFromCloudModal/ImportFromCloudModal.component.d.ts +4 -18
- package/dist/components/Modals/index.d.ts +0 -1
- package/dist/components/PdfEditor/types.d.ts +3 -3
- package/dist/components/Support/support-status-timeline.logic.d.ts +2 -2
- package/dist/components/Support/types.d.ts +12 -22
- package/dist/components/Utils/ImportButton/ImportButton.component.d.ts +6 -27
- package/dist/cookie-consent.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/use-cloud-picker.hook.d.ts +47 -0
- package/dist/hooks/use-cloud-picker.hook.spec.d.ts +1 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +26 -50
- package/dist/{index-Bg9oxmUh.js → index-B9j-3Wv9.js} +2 -2
- package/dist/{index-Dn4ti301.js → index-BCNdS_hZ.js} +2 -2
- package/dist/{index-Bm40A8HL.js → index-BQJ_IibV.js} +2 -2
- package/dist/{index-B2KAC2Gn.js → index-BYFdosUa.js} +3 -3
- package/dist/{index-B_66plIg.js → index-BlzK79bL.js} +3 -3
- package/dist/{index-D9Gusaap.js → index-C-ryoEBt.js} +2 -2
- package/dist/{index-vT5IYPPZ.js → index-CDh8wzu8.js} +3 -3
- package/dist/{index-TZCSR5-0.js → index-CMfXPyXq.js} +4 -4
- package/dist/{index-CvJNzYLZ.js → index-CuhdwbRD.js} +4 -4
- package/dist/{index-CCw90R7H.js → index-D0uOg6A0.js} +4 -4
- package/dist/{index-C2f3Sbgw.js → index-DQAX2wNI.js} +2 -2
- package/dist/{index-bmaZNPBg.js → index-DZ8YTYOY.js} +2 -2
- package/dist/{index-CgKIt_AP.js → index-Db7YwEDm.js} +2 -2
- package/dist/{index-Cgoj2A0t.js → index-DnCvSvTf.js} +2 -2
- package/dist/{index-VQlFvBeS.js → index-DvjhhENb.js} +2 -2
- package/dist/{index-Dtx0T0Bm.js → index-DwOujeYK.js} +2 -2
- package/dist/{index-BIKW48BP.js → index-IWLHhMeY.js} +1 -1
- package/dist/{index-BDQtV9_z.js → index-LoP5aAOy.js} +2 -2
- package/dist/{index-CgrrIrxd.js → index-Pm0jV-Wz.js} +2 -2
- package/dist/{index-maNkgZdF.js → index-PxLJ-vzu.js} +2 -2
- package/dist/{index-D-BuBFP8.js → index-alA0Reco.js} +3 -3
- package/dist/{index-Bx5-VSst.js → index-vc79tKxC.js} +32154 -32919
- package/dist/index.js +218 -219
- package/dist/internal/lazy-value.d.ts +11 -0
- package/dist/internal/lazy-value.spec.d.ts +1 -0
- package/dist/lazy-value-Co76vxsM.js +7 -0
- package/dist/load-safety.spec.d.ts +1 -0
- package/dist/translations/en.d.ts +4 -24
- package/dist/translations/fr.d.ts +4 -24
- package/dist/{use-auth.hook-BLaU_u8T.js → use-auth.hook-DatVLGxS.js} +103 -100
- package/dist/utils/cloud-space-url.utils.d.ts +7 -0
- package/dist/utils/cloud-space-url.utils.spec.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +5 -4
- package/dist/components/Inputs/CloudSave/CloudSave.component.d.ts +0 -17
- package/dist/components/Inputs/CloudSave/index.d.ts +0 -1
- package/dist/components/Modals/SaveCloudModal/SaveCloudModal.component.d.ts +0 -18
- package/dist/components/Modals/SaveCloudModal/index.d.ts +0 -1
- package/dist/hooks/use-cloud.hook.d.ts +0 -8
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** The policy as a password manager reads it when it generates one (ADR-0059). */
|
|
2
|
-
export declare const PASSWORD_RULES: string;
|
|
3
1
|
/**
|
|
4
2
|
* Changing the password asks for the current one (ADR-0059) and a recent proof of identity (the
|
|
5
3
|
* re-authentication dialog opens past 5 minutes). An account without password (signed up by code,
|
package/dist/auth-client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, A as R, R as _, b as s, c as S, s as r } from "./token-storage-CbWrBeIP.js";
|
|
2
|
-
import { g as A, i as T, j as o, A as u, G as L, c as h, L as M, d as O, e as P, a as C, b as I, R as c, U as d, f as H, h as N, u as g } from "./use-auth.hook-
|
|
2
|
+
import { g as A, i as T, j as o, A as u, G as L, c as h, L as M, d as O, e as P, a as C, b as I, R as c, U as d, f as H, h as N, u as g } from "./use-auth.hook-DatVLGxS.js";
|
|
3
3
|
export {
|
|
4
4
|
A as APPLE_ID_SCRIPT_URL,
|
|
5
5
|
e as AuthBridgeError,
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ISpace, IFile
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
5
|
-
avatar?: React.ReactNode;
|
|
6
|
-
subtitle?: string;
|
|
7
|
-
organizationId?: string | null;
|
|
8
|
-
organizationName?: string | null;
|
|
9
|
-
scope?: 'personal' | 'perso-in-org' | 'org-common' | 'project';
|
|
10
|
-
}
|
|
2
|
+
import { ISpace, IFile } from '@abyss-project/cloud';
|
|
3
|
+
import { CloudPicker } from './cloud-picker.types';
|
|
11
4
|
type Props = {
|
|
12
5
|
submitFiles: (cloud: ISpace, files: IFile[]) => void;
|
|
13
6
|
maxSize?: number;
|
|
14
7
|
multiple?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The files offered, as the HTML `accept` attribute lists them: MIME types (`application/pdf`),
|
|
10
|
+
* wildcards (`image/*`) and extensions (`.pdf`). Absent or empty: every file.
|
|
11
|
+
*/
|
|
15
12
|
accept?: string[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getFileThumbnailUrl: (id: string) => string;
|
|
19
|
-
clouds: ISpace[] | null;
|
|
20
|
-
cloudShares: ISpace[] | null;
|
|
21
|
-
isLoadingClouds?: boolean;
|
|
22
|
-
onRefreshClouds: () => Promise<void>;
|
|
23
|
-
fetchCloudRepository: (cloudId: string) => Promise<IGetRepositoryCloudData>;
|
|
24
|
-
onActivateService: () => Promise<void>;
|
|
25
|
-
onCreateCloud: (name: string) => Promise<void>;
|
|
26
|
-
/** Host-supplied resolver: avatar + label for any space. */
|
|
27
|
-
getSpaceDisplay?: (space: ISpace) => CloudImportSpaceDisplay;
|
|
13
|
+
/** Picker state and actions, as returned by `useCloudPicker`. */
|
|
14
|
+
cloudPicker: CloudPicker;
|
|
28
15
|
};
|
|
29
16
|
declare const CloudImport: React.FC<Props>;
|
|
30
17
|
export default CloudImport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** What the accept check reads of a cloud file. */
|
|
2
|
+
export type AcceptCandidate = {
|
|
3
|
+
name: string;
|
|
4
|
+
mimeType: string | null;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Whether a file passes an `accept` list, read as the HTML `accept` attribute reads its tokens:
|
|
8
|
+
* an extension (`.pdf`) matches the end of the file name, `type/*` any subtype of that top-level
|
|
9
|
+
* type (`image/*` accepts `image/png`, not `video/mp4`), the all-types wildcard any file, any other token the exact MIME type. Case
|
|
10
|
+
* is ignored, an entry may hold several comma-separated tokens, and a file is accepted when one
|
|
11
|
+
* token matches. No token at all (no list, an empty list) accepts every file.
|
|
12
|
+
*/
|
|
13
|
+
export declare const isAcceptedFile: (file: AcceptCandidate, accept: readonly string[] | undefined) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFile, IGetRepositoryCloudData, ISpace } from '@abyss-project/cloud';
|
|
3
|
+
import { SpaceScope } from '../../../utils/space-display-name.utils';
|
|
4
|
+
/** Host-resolved presentation of a Space in the picker (avatar, label, org). */
|
|
5
|
+
export interface CloudImportSpaceDisplay {
|
|
6
|
+
label: string;
|
|
7
|
+
avatar?: React.ReactNode;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
organizationId?: string | null;
|
|
10
|
+
organizationName?: string | null;
|
|
11
|
+
scope?: SpaceScope;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Everything the AbyssCloud picker needs, as returned by `useCloudPicker`.
|
|
15
|
+
* A host never builds this by hand: it calls the hook and passes the result.
|
|
16
|
+
*/
|
|
17
|
+
export interface CloudPicker {
|
|
18
|
+
/** Root URL of the AbyssCloud front, used by the "Open in AbyssCloud" link. */
|
|
19
|
+
abyssCloudUrl: string;
|
|
20
|
+
getFileThumbnailUrl: (fileId: string) => string;
|
|
21
|
+
getSpaceDisplay?: (space: ISpace) => CloudImportSpaceDisplay;
|
|
22
|
+
/** Spaces owned by or provisioned for the user; `null` until the first load. */
|
|
23
|
+
clouds: ISpace[] | null;
|
|
24
|
+
/** Spaces shared with the user (accepted shares); `null` until the first load. */
|
|
25
|
+
cloudShares: ISpace[] | null;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
/** True when the last provisioning failed (personal Space, listing or shares). */
|
|
28
|
+
hasError: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Activates AbyssCloud if needed, provisions the Spaces, then lists them.
|
|
31
|
+
* Resolves `true` when that succeeded, `false` when it failed (`hasError`).
|
|
32
|
+
* Called before the host's user is loaded, it waits for that user.
|
|
33
|
+
*/
|
|
34
|
+
refresh: () => Promise<boolean>;
|
|
35
|
+
/** Same provisioning as `refresh`, bound to the "Create my cloud" button. */
|
|
36
|
+
onCreateCloud: () => Promise<boolean>;
|
|
37
|
+
fetchCloudRepository: (spaceId: string) => Promise<IGetRepositoryCloudData>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A picker wired to an import action. Passing it to `ImportButton` or
|
|
41
|
+
* `DropZone` is what makes their AbyssCloud entry exist.
|
|
42
|
+
*/
|
|
43
|
+
export interface CloudImportWiring extends CloudPicker {
|
|
44
|
+
/** Receives the Space the files were picked from, and the files. */
|
|
45
|
+
onImport: (space: ISpace, files: IFile[]) => void | Promise<void>;
|
|
46
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SxProps } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { CloudImportWiring } from '../CloudImport/cloud-picker.types';
|
|
4
4
|
import { Accept } from 'react-dropzone';
|
|
5
5
|
type Props = {
|
|
6
6
|
circular?: boolean;
|
|
7
7
|
title?: React.ReactElement | string;
|
|
8
|
-
|
|
8
|
+
/** Files dropped or picked from the computer. */
|
|
9
|
+
onDrop: (acceptedFiles: File[]) => void;
|
|
9
10
|
multiple?: boolean;
|
|
10
11
|
disableMinHeight?: boolean;
|
|
11
12
|
customContentDropZone?: React.ReactElement;
|
|
@@ -14,17 +15,13 @@ type Props = {
|
|
|
14
15
|
dropzoneSx?: SxProps;
|
|
15
16
|
enableImportFromExternal?: boolean;
|
|
16
17
|
additionalContentDropZone?: React.ReactElement;
|
|
17
|
-
disableExternalImport?: boolean;
|
|
18
|
-
abyssCloudUrl: string;
|
|
19
|
-
getFileThumbnailUrl: (id: string) => string;
|
|
20
18
|
customHelperContent?: React.ReactElement;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onCreateCloud?: (name: string) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* AbyssCloud picker (from `useCloudPicker`) plus the import action, which
|
|
21
|
+
* receives the Space the files were picked from. The cloud import button
|
|
22
|
+
* exists only when this is passed.
|
|
23
|
+
*/
|
|
24
|
+
cloudImport?: CloudImportWiring;
|
|
28
25
|
};
|
|
29
26
|
declare const DropZone: React.FC<Props>;
|
|
30
27
|
export default DropZone;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,6 @@ export * from './PasswordInput';
|
|
|
7
7
|
export * from './AbyssMarkdownEditor';
|
|
8
8
|
export * from './AbyssNumberField';
|
|
9
9
|
export * from './CloudImport';
|
|
10
|
-
export * from './CloudSave';
|
|
11
10
|
export * from './DropZone';
|
|
12
11
|
export * from './AbyssSelectProject';
|
|
13
12
|
export * from './AbyssSelectOrganization';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ISpace, IFile
|
|
2
|
+
import { ISpace, IFile } from '@abyss-project/cloud';
|
|
3
|
+
import { CloudPicker } from '../../Inputs/CloudImport/cloud-picker.types';
|
|
3
4
|
type Props = {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
onCancel: () => Promise<void>;
|
|
@@ -7,23 +8,8 @@ type Props = {
|
|
|
7
8
|
maxSize?: number;
|
|
8
9
|
multiple?: boolean;
|
|
9
10
|
accept?: string[];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
clouds: ISpace[] | null;
|
|
13
|
-
cloudShares: ISpace[] | null;
|
|
14
|
-
isLoadingClouds?: boolean;
|
|
15
|
-
onRefreshClouds: () => Promise<void>;
|
|
16
|
-
fetchCloudRepository: (cloudId: string) => Promise<IGetRepositoryCloudData>;
|
|
17
|
-
onActivateService: () => Promise<void>;
|
|
18
|
-
onCreateCloud: (name: string) => Promise<void>;
|
|
19
|
-
getSpaceDisplay?: (space: ISpace) => {
|
|
20
|
-
label: string;
|
|
21
|
-
avatar?: React.ReactNode;
|
|
22
|
-
subtitle?: string;
|
|
23
|
-
organizationId?: string | null;
|
|
24
|
-
organizationName?: string | null;
|
|
25
|
-
scope?: 'personal' | 'perso-in-org' | 'org-common' | 'project';
|
|
26
|
-
};
|
|
11
|
+
/** Picker state and actions, as returned by `useCloudPicker`. */
|
|
12
|
+
cloudPicker: CloudPicker;
|
|
27
13
|
};
|
|
28
14
|
declare const ImportFromCloudModal: React.FC<Props>;
|
|
29
15
|
export default ImportFromCloudModal;
|
|
@@ -2,6 +2,5 @@ export * from './AbyssModal';
|
|
|
2
2
|
export * from './ConfirmModal';
|
|
3
3
|
export * from './ImportFromCloudModal';
|
|
4
4
|
export * from './QRCodeModal';
|
|
5
|
-
export * from './SaveCloudModal';
|
|
6
5
|
export * from './UserSettingsModal';
|
|
7
6
|
export { default as UserSettings } from './UserSettingsModal/UserSettings.compat';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AssetKind } from '@abyss-project/main';
|
|
3
3
|
import { ISpace, IFile } from '@abyss-project/cloud';
|
|
4
|
-
import {
|
|
4
|
+
import { CloudPicker } from '../Inputs/CloudImport/cloud-picker.types';
|
|
5
5
|
/**
|
|
6
6
|
* Wiring for cloud-backed insertions inside the editor (currently only the
|
|
7
|
-
* "Insert pages" button)
|
|
7
|
+
* "Insert pages" button): the picker returned by `useCloudPicker`, plus a
|
|
8
8
|
* helper to materialize bytes from the picked file.
|
|
9
9
|
*/
|
|
10
|
-
export interface PdfEditorCloudImportProps extends
|
|
10
|
+
export interface PdfEditorCloudImportProps extends CloudPicker {
|
|
11
11
|
/** Resolve the raw bytes for a picked cloud file (e.g. via presigned URL). */
|
|
12
12
|
downloadCloudFile: (cloud: ISpace, file: IFile) => Promise<ArrayBuffer>;
|
|
13
13
|
}
|
|
@@ -11,10 +11,10 @@ export type SupportTimelinePhaseKey = 'open' | 'in-progress' | 'resolved' | 'clo
|
|
|
11
11
|
* "closed". The exact status is surfaced verbatim elsewhere, so collapsing
|
|
12
12
|
* them loses no information.
|
|
13
13
|
*/
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const getSupportTimelineSteps: () => readonly {
|
|
15
15
|
key: SupportTimelinePhaseKey;
|
|
16
16
|
statuses: readonly SupportTicketStatus[];
|
|
17
|
-
}
|
|
17
|
+
}[];
|
|
18
18
|
/**
|
|
19
19
|
* Index (0-3) of the active phase for a given status. Unknown/unmapped values
|
|
20
20
|
* fall back to the first phase rather than -1, so the rail always renders.
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ISupportTicket, ISupportTicketMessage, ISupportTicketActivity, ISupportTicketAttachment, ISupportTicketTag, SupportTicketStatus, SupportTicketCategory, SupportTicketPriority, SupportTicketAction, AbyssService } from '@abyss-project/main';
|
|
3
|
-
import {
|
|
3
|
+
import { CloudImportWiring } from '../Inputs/CloudImport/cloud-picker.types';
|
|
4
4
|
export interface SupportCloudImportProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
clouds?: ISpace[] | null;
|
|
11
|
-
cloudShares?: ISpace[] | null;
|
|
12
|
-
isLoadingClouds?: boolean;
|
|
13
|
-
onRefreshClouds?: () => Promise<void>;
|
|
14
|
-
fetchCloudRepository?: (cloudId: string) => Promise<IGetRepositoryCloudData>;
|
|
15
|
-
onActivateService?: () => Promise<void>;
|
|
16
|
-
onCreateCloud?: (name: string, organizationId?: string) => Promise<void>;
|
|
17
|
-
handleImportFromCloud?: (cloud: ISpace, files: IFile[]) => Promise<void>;
|
|
18
|
-
getSpaceDisplay?: (space: ISpace) => {
|
|
19
|
-
label: string;
|
|
20
|
-
avatar?: ReactNode;
|
|
21
|
-
subtitle?: string;
|
|
22
|
-
organizationId?: string | null;
|
|
23
|
-
organizationName?: string | null;
|
|
24
|
-
scope?: 'personal' | 'perso-in-org' | 'org-common' | 'project';
|
|
25
|
-
};
|
|
5
|
+
/**
|
|
6
|
+
* AbyssCloud picker (from `useCloudPicker`) plus the import action. Without
|
|
7
|
+
* it, the attachment pickers offer no AbyssCloud entry.
|
|
8
|
+
*/
|
|
9
|
+
cloudImport?: CloudImportWiring;
|
|
26
10
|
}
|
|
27
11
|
export interface SupportTicketListFilters {
|
|
28
12
|
status?: SupportTicketStatus[];
|
|
@@ -159,6 +143,8 @@ export interface SupportActionButtonsProps {
|
|
|
159
143
|
}
|
|
160
144
|
export interface SupportAttachmentsPanelProps extends SupportCloudImportProps {
|
|
161
145
|
attachments: ISupportTicketAttachment[];
|
|
146
|
+
/** Thumbnail URL of an attachment's preview image. */
|
|
147
|
+
getFileThumbnailUrl: (id: string) => string;
|
|
162
148
|
onUpload?: (file: File) => void;
|
|
163
149
|
onDelete?: (attachmentId: string) => void;
|
|
164
150
|
onDownload?: (attachment: ISupportTicketAttachment) => void;
|
|
@@ -199,6 +185,8 @@ export interface SupportSidebarUser {
|
|
|
199
185
|
}
|
|
200
186
|
export interface SupportSidebarProps extends SupportCloudImportProps {
|
|
201
187
|
ticket: ISupportTicket;
|
|
188
|
+
/** Thumbnail URL of an attachment's preview image. */
|
|
189
|
+
getFileThumbnailUrl: (id: string) => string;
|
|
202
190
|
isAdmin?: boolean;
|
|
203
191
|
currentUserId?: string;
|
|
204
192
|
onChangePriority?: (priority: SupportTicketPriority) => void;
|
|
@@ -256,6 +244,8 @@ export interface SupportSidebarProps extends SupportCloudImportProps {
|
|
|
256
244
|
}
|
|
257
245
|
export interface SupportTicketDetailProps extends SupportCloudImportProps {
|
|
258
246
|
ticket: ISupportTicket;
|
|
247
|
+
/** Thumbnail URL of an attachment's preview image. */
|
|
248
|
+
getFileThumbnailUrl: (id: string) => string;
|
|
259
249
|
messages: ISupportTicketMessage[];
|
|
260
250
|
currentUserId: string;
|
|
261
251
|
/** Message to scroll to and highlight once, read by the host page from `?messageId=`. */
|
|
@@ -1,40 +1,19 @@
|
|
|
1
1
|
import { default as React, ChangeEvent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CloudImportWiring } from '../../Inputs/CloudImport/cloud-picker.types';
|
|
3
3
|
export declare const MAX_PICTURE_SIZE: number;
|
|
4
4
|
type Props = {
|
|
5
5
|
children: React.ReactElement;
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
handleUploadFromUrl?: (url: string) => Promise<void>;
|
|
8
8
|
handleFileUpload: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
9
|
-
handleImportFromCloud: (cloud: ISpace, files: IFile[]) => Promise<void>;
|
|
10
9
|
multiple?: boolean;
|
|
11
10
|
maxSize?: number;
|
|
12
11
|
accept?: string[];
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getFileThumbnailUrl: (id: string) => string;
|
|
19
|
-
clouds?: ISpace[] | null;
|
|
20
|
-
cloudShares?: ISpace[] | null;
|
|
21
|
-
isLoadingClouds?: boolean;
|
|
22
|
-
onRefreshClouds?: () => Promise<void>;
|
|
23
|
-
fetchCloudRepository?: (cloudId: string) => Promise<IGetRepositoryCloudData>;
|
|
24
|
-
onActivateService?: () => Promise<void>;
|
|
25
|
-
onCreateCloud?: (name: string) => Promise<void>;
|
|
26
|
-
/** If true, show the cloud import option even without full cloud props */
|
|
27
|
-
showCloudOption?: boolean;
|
|
28
|
-
/** Optional resolver injecting avatar + label per ISpace into the cloud
|
|
29
|
-
* picker (so it matches the host's avatar conventions). */
|
|
30
|
-
getSpaceDisplay?: (space: ISpace) => {
|
|
31
|
-
label: string;
|
|
32
|
-
avatar?: React.ReactNode;
|
|
33
|
-
subtitle?: string;
|
|
34
|
-
organizationId?: string | null;
|
|
35
|
-
organizationName?: string | null;
|
|
36
|
-
scope?: 'personal' | 'perso-in-org' | 'org-common' | 'project';
|
|
37
|
-
};
|
|
12
|
+
/**
|
|
13
|
+
* AbyssCloud picker (from `useCloudPicker`) plus the import action. The
|
|
14
|
+
* "AbyssCloud" entry exists only when this is passed.
|
|
15
|
+
*/
|
|
16
|
+
cloudImport?: CloudImportWiring;
|
|
38
17
|
};
|
|
39
18
|
declare const ImportButton: React.FC<Props>;
|
|
40
19
|
export default ImportButton;
|
package/dist/cookie-consent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, c as a, C as n, a as C, D as i, R as t, V as r, d as A, f as k, r as c, e as l, u as D, b as E, w as I } from "./CookieConsentSettings.component-
|
|
1
|
+
import { A as s, c as a, C as n, a as C, D as i, R as t, V as r, d as A, f as k, r as c, e as l, u as D, b as E, w as I } from "./CookieConsentSettings.component-B7HoVxDK.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AbyssCookieConsentProvider,
|
|
4
4
|
a as COOKIE_NAME,
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export * from './confirm-modal';
|
|
|
2
2
|
export * from './use-sse.hook';
|
|
3
3
|
export * from './use-theme-transition.hook';
|
|
4
4
|
export * from './use-rich-intl.hook';
|
|
5
|
-
export * from './use-cloud.hook';
|
|
5
|
+
export * from './use-cloud-picker.hook';
|
|
6
6
|
export * from './use-public-users.hook';
|
|
7
7
|
export * from './use-date-fns-locale.hook';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ISpace } from '@abyss-project/cloud';
|
|
2
|
+
import { CloudImportSpaceDisplay, CloudPicker } from '../components/Inputs/CloudImport/cloud-picker.types';
|
|
3
|
+
/**
|
|
4
|
+
* Every call to abyss-main goes through the host: this package pins its own
|
|
5
|
+
* `@abyss-project/main`, whose `AbyssCore` is never the one a satellite front
|
|
6
|
+
* configures. Only `AbyssCloudCore` (a single copy shared with the host, see the
|
|
7
|
+
* peer dependency) is called directly.
|
|
8
|
+
*/
|
|
9
|
+
export interface UseCloudPickerParams {
|
|
10
|
+
/**
|
|
11
|
+
* The signed-in user. Only `enabledServices` is read: AbyssCloud is activated
|
|
12
|
+
* when it is missing. While it is `null` (user not loaded yet) nothing runs:
|
|
13
|
+
* a `refresh()` called meanwhile waits and runs once the user is known.
|
|
14
|
+
* Anonymous hosts never render the picker.
|
|
15
|
+
*/
|
|
16
|
+
user: {
|
|
17
|
+
enabledServices: readonly string[];
|
|
18
|
+
} | null;
|
|
19
|
+
/**
|
|
20
|
+
* True when the host knows `user` will not arrive (its user query failed,
|
|
21
|
+
* no session, offline). A waiting or new `refresh()` then ends in error
|
|
22
|
+
* (`hasError`, the "Create my cloud" retry) instead of waiting forever; a
|
|
23
|
+
* retry checks again. Required: every host decides what "unavailable" means.
|
|
24
|
+
*/
|
|
25
|
+
isUserUnavailable: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Activates AbyssCloud for the signed-in user with the host's own main SDK
|
|
28
|
+
* (`POST /auth/activate-service`), then reloads the host's user. Called only
|
|
29
|
+
* when `user` lacks `ABYSS_CLOUD`; a rejection puts the picker in error.
|
|
30
|
+
*/
|
|
31
|
+
activateCloudService: () => Promise<unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Ids of the organizations the user is a member of, read with the host's own
|
|
34
|
+
* main SDK. A rejection is treated as no organization.
|
|
35
|
+
*/
|
|
36
|
+
listOrganizationIds: () => Promise<string[]>;
|
|
37
|
+
abyssCloudUrl: string;
|
|
38
|
+
getFileThumbnailUrl: (fileId: string) => string;
|
|
39
|
+
getSpaceDisplay?: (space: ISpace) => CloudImportSpaceDisplay;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Single source of the AbyssCloud picker state for every Abyss front. Nothing
|
|
43
|
+
* runs until the picker opens (`CloudImport` calls `refresh` on mount): it then
|
|
44
|
+
* activates AbyssCloud if the user lacks it, provisions the personal Space and
|
|
45
|
+
* the common + perso Space of each member organization, and lists them.
|
|
46
|
+
*/
|
|
47
|
+
export declare const useCloudPicker: ({ user, isUserUnavailable, activateCloudService, listOrganizationIds, abyssCloudUrl, getFileThumbnailUrl, getSpaceDisplay, }: UseCloudPickerParams) => CloudPicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,6 +21,14 @@ export declare const translations: {
|
|
|
21
21
|
title: string;
|
|
22
22
|
content: string;
|
|
23
23
|
};
|
|
24
|
+
"mcp-connection-approval-requested": {
|
|
25
|
+
title: string;
|
|
26
|
+
content: string;
|
|
27
|
+
};
|
|
28
|
+
"mcp-connection-rejected": {
|
|
29
|
+
title: string;
|
|
30
|
+
content: string;
|
|
31
|
+
};
|
|
24
32
|
"subscription-created": {
|
|
25
33
|
title: string;
|
|
26
34
|
content: string;
|
|
@@ -793,13 +801,6 @@ export declare const translations: {
|
|
|
793
801
|
'open-modal-button': string;
|
|
794
802
|
modal: {
|
|
795
803
|
title: string;
|
|
796
|
-
loading: string;
|
|
797
|
-
'service-not-enabled': string;
|
|
798
|
-
'service-not-enabled-description': string;
|
|
799
|
-
'enable-service-button': string;
|
|
800
|
-
'service-unreachable': string;
|
|
801
|
-
retry: string;
|
|
802
|
-
'no-cloud-available': string;
|
|
803
804
|
'too-big-filtered-file': string;
|
|
804
805
|
'import-button': string;
|
|
805
806
|
'space-label': string;
|
|
@@ -811,27 +812,14 @@ export declare const translations: {
|
|
|
811
812
|
'files-selected': string;
|
|
812
813
|
'open-in-cloud': string;
|
|
813
814
|
refresh: string;
|
|
814
|
-
'
|
|
815
|
+
'refresh-error': string;
|
|
816
|
+
'create-error': {
|
|
815
817
|
title: string;
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
label: string;
|
|
819
|
-
placeholder: string;
|
|
820
|
-
};
|
|
821
|
-
};
|
|
822
|
-
'create-cloud-button': string;
|
|
818
|
+
description: string;
|
|
819
|
+
'create-button': string;
|
|
823
820
|
};
|
|
824
821
|
};
|
|
825
822
|
};
|
|
826
|
-
'save-cloud': {
|
|
827
|
-
modal: {
|
|
828
|
-
title: string;
|
|
829
|
-
'import-button': string;
|
|
830
|
-
'success-toast': string;
|
|
831
|
-
'no-space-toast': string;
|
|
832
|
-
'open-in-cloud': string;
|
|
833
|
-
};
|
|
834
|
-
};
|
|
835
823
|
'import-button': string;
|
|
836
824
|
'import-file-button': string;
|
|
837
825
|
'import-url-button': string;
|
|
@@ -1879,6 +1867,14 @@ export declare const translations: {
|
|
|
1879
1867
|
title: string;
|
|
1880
1868
|
content: string;
|
|
1881
1869
|
};
|
|
1870
|
+
"mcp-connection-approval-requested": {
|
|
1871
|
+
title: string;
|
|
1872
|
+
content: string;
|
|
1873
|
+
};
|
|
1874
|
+
"mcp-connection-rejected": {
|
|
1875
|
+
title: string;
|
|
1876
|
+
content: string;
|
|
1877
|
+
};
|
|
1882
1878
|
"subscription-created": {
|
|
1883
1879
|
title: string;
|
|
1884
1880
|
content: string;
|
|
@@ -2651,13 +2647,6 @@ export declare const translations: {
|
|
|
2651
2647
|
'open-modal-button': string;
|
|
2652
2648
|
modal: {
|
|
2653
2649
|
title: string;
|
|
2654
|
-
loading: string;
|
|
2655
|
-
'service-not-enabled': string;
|
|
2656
|
-
'service-not-enabled-description': string;
|
|
2657
|
-
'enable-service-button': string;
|
|
2658
|
-
'service-unreachable': string;
|
|
2659
|
-
retry: string;
|
|
2660
|
-
'no-cloud-available': string;
|
|
2661
2650
|
'too-big-filtered-file': string;
|
|
2662
2651
|
'import-button': string;
|
|
2663
2652
|
'space-label': string;
|
|
@@ -2669,27 +2658,14 @@ export declare const translations: {
|
|
|
2669
2658
|
'files-selected': string;
|
|
2670
2659
|
'open-in-cloud': string;
|
|
2671
2660
|
refresh: string;
|
|
2672
|
-
'
|
|
2661
|
+
'refresh-error': string;
|
|
2662
|
+
'create-error': {
|
|
2673
2663
|
title: string;
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
label: string;
|
|
2677
|
-
placeholder: string;
|
|
2678
|
-
};
|
|
2679
|
-
};
|
|
2680
|
-
'create-cloud-button': string;
|
|
2664
|
+
description: string;
|
|
2665
|
+
'create-button': string;
|
|
2681
2666
|
};
|
|
2682
2667
|
};
|
|
2683
2668
|
};
|
|
2684
|
-
'save-cloud': {
|
|
2685
|
-
modal: {
|
|
2686
|
-
title: string;
|
|
2687
|
-
'import-button': string;
|
|
2688
|
-
'success-toast': string;
|
|
2689
|
-
'no-space-toast': string;
|
|
2690
|
-
'open-in-cloud': string;
|
|
2691
|
-
};
|
|
2692
|
-
};
|
|
2693
2669
|
'import-button': string;
|
|
2694
2670
|
'import-file-button': string;
|
|
2695
2671
|
'import-url-button': string;
|
|
@@ -3720,8 +3696,8 @@ export declare const translations: {
|
|
|
3720
3696
|
};
|
|
3721
3697
|
};
|
|
3722
3698
|
export declare const flattenTranslations: {
|
|
3723
|
-
fr: Record<string, string>;
|
|
3724
|
-
en: Record<string, string>;
|
|
3699
|
+
readonly fr: Record<string, string>;
|
|
3700
|
+
readonly en: Record<string, string>;
|
|
3725
3701
|
};
|
|
3726
3702
|
type FlattenObjectKeys<T extends Record<string, unknown>, Key = keyof T> = Key extends string ? T[Key] extends Record<string, unknown> ? `${Key}.${FlattenObjectKeys<T[Key]>}` : `${Key}` : never;
|
|
3727
3703
|
export type ExistingTranslationKey = FlattenObjectKeys<(typeof translations)[UserLanguage.FRENCH]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as r } from "./index-
|
|
2
|
-
import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-
|
|
1
|
+
import { L as r } from "./index-IWLHhMeY.js";
|
|
2
|
+
import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-vc79tKxC.js";
|
|
3
3
|
const Z = e({
|
|
4
4
|
null: O.null,
|
|
5
5
|
instanceof: O.operatorKeyword,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as w, E as p, a as Y } from "./index-
|
|
2
|
-
import { s as x, t as r, a as q, L as j, e as G, i as R, f as T, c as E, g as _, o as C, I as U } from "./index-
|
|
1
|
+
import { L as w, E as p, a as Y } from "./index-IWLHhMeY.js";
|
|
2
|
+
import { s as x, t as r, a as q, L as j, e as G, i as R, f as T, c as E, g as _, o as C, I as U } from "./index-vc79tKxC.js";
|
|
3
3
|
const V = 122, g = 1, Z = 123, W = 124, b = 2, N = 125, I = 3, F = 4, X = [
|
|
4
4
|
9,
|
|
5
5
|
10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as W, E as i, C as B } from "./index-
|
|
2
|
-
import { s as U, t as n, a as C, L as b, p as E, i as u, f as M, j as v, g as N } from "./index-
|
|
1
|
+
import { L as W, E as i, C as B } from "./index-IWLHhMeY.js";
|
|
2
|
+
import { s as U, t as n, a as C, L as b, p as E, i as u, f as M, j as v, g as N } from "./index-vc79tKxC.js";
|
|
3
3
|
const c = 63, D = 64, j = 1, A = 2, y = 3, H = 4, Z = 5, F = 6, I = 7, z = 65, K = 66, J = 8, OO = 9, eO = 10, aO = 11, rO = 12, V = 13, tO = 19, nO = 20, oO = 29, PO = 33, QO = 34, sO = 47, lO = 0, T = 1, g = 2, d = 3, m = 4;
|
|
4
4
|
class s {
|
|
5
5
|
constructor(e, a, r) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as d, L as y, h as b, a as _, p as g, e as u, s as S, i as T, f as k, j as W, t } from "./index-
|
|
2
|
-
import { html as j } from "./index-
|
|
3
|
-
import { L as X, E as p } from "./index-
|
|
1
|
+
import { E as d, L as y, h as b, a as _, p as g, e as u, s as S, i as T, f as k, j as W, t } from "./index-vc79tKxC.js";
|
|
2
|
+
import { html as j } from "./index-CMfXPyXq.js";
|
|
3
|
+
import { L as X, E as p } from "./index-IWLHhMeY.js";
|
|
4
4
|
const Y = 1, U = 2, G = 3, R = 179, z = 4, v = 180, x = 5, Z = 181, V = 6;
|
|
5
5
|
function E(O) {
|
|
6
6
|
return O >= 65 && O <= 90 || O >= 97 && O <= 122;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as v, E as i, C as _ } from "./index-
|
|
2
|
-
import { s as W, t as e, a as g, L as x, f as p, i as U, g as V, c as E } from "./index-
|
|
3
|
-
import { defineCSSCompletionSource as N } from "./index-
|
|
1
|
+
import { L as v, E as i, C as _ } from "./index-IWLHhMeY.js";
|
|
2
|
+
import { s as W, t as e, a as g, L as x, f as p, i as U, g as V, c as E } from "./index-vc79tKxC.js";
|
|
3
|
+
import { defineCSSCompletionSource as N } from "./index-BCNdS_hZ.js";
|
|
4
4
|
const j = 168, X = 169, C = 170, I = 1, D = 2, w = 3, L = 171, F = 172, Y = 4, z = 173, K = 5, A = 174, T = 175, Z = 176, s = 177, G = 6, q = 7, B = 8, H = 9, c = 0, R = [
|
|
5
5
|
9,
|
|
6
6
|
10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as te, a as re, i as ae, f as ne, s as ie, c as se, t as i, b as oe, d as le, e as ce } from "./index-
|
|
2
|
-
import { L as de, E as me } from "./index-
|
|
1
|
+
import { L as te, a as re, i as ae, f as ne, s as ie, c as se, t as i, b as oe, d as le, e as ce } from "./index-vc79tKxC.js";
|
|
2
|
+
import { L as de, E as me } from "./index-IWLHhMeY.js";
|
|
3
3
|
const ue = 36, B = 1, pe = 2, y = 3, C = 4, fe = 5, _e = 6, ge = 7, he = 8, ye = 9, be = 10, ve = 11, ke = 12, xe = 13, Oe = 14, we = 15, Qe = 16, Ce = 17, X = 18, Se = 19, A = 20, E = 21, I = 22, qe = 23, Pe = 24;
|
|
4
4
|
function q(t) {
|
|
5
5
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 48 && t <= 57;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as t, L as i, i as n, f as $, c as y, g as P, s as X, t as O } from "./index-
|
|
2
|
-
import { defineCSSCompletionSource as m } from "./index-
|
|
3
|
-
import { L as c, E as S } from "./index-
|
|
1
|
+
import { a as t, L as i, i as n, f as $, c as y, g as P, s as X, t as O } from "./index-vc79tKxC.js";
|
|
2
|
+
import { defineCSSCompletionSource as m } from "./index-BCNdS_hZ.js";
|
|
3
|
+
import { L as c, E as S } from "./index-IWLHhMeY.js";
|
|
4
4
|
const f = 110, l = 1, s = 2, r = [
|
|
5
5
|
9,
|
|
6
6
|
10,
|