@openviking/react 0.1.5 → 0.1.7
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/README.md +15 -11
- package/dist/2~0.js +6 -5
- package/dist/37~0.js +27 -0
- package/dist/3c~0.js +24 -12
- package/dist/3~0.js +19 -9
- package/dist/ae~0.js +8 -1
- package/dist/ark-message-list-view~0.js +9 -4
- package/dist/a~0.js +13 -7
- package/dist/c7r~0.js +50 -0
- package/dist/ck~0.js +7 -0
- package/dist/client/paths.d.ts +10 -0
- package/dist/client/provider.d.ts +6 -1
- package/dist/components/agent-connect/style.css +268 -37
- package/dist/components/directory-tour/style.css +265 -21
- package/dist/components/directory-tour.js +1 -1
- package/dist/components/experience-dashboard/dashboard-tabs.d.ts +11 -0
- package/dist/components/experience-dashboard/experience-dashboard.d.ts +2 -0
- package/dist/components/experience-dashboard/experience-impact.d.ts +11 -0
- package/dist/components/experience-dashboard/experience-list.d.ts +9 -0
- package/dist/components/experience-dashboard/experience-pagination.d.ts +8 -0
- package/dist/components/experience-dashboard/experience-tests.d.ts +6 -0
- package/dist/components/experience-dashboard/experience-trajectories.d.ts +6 -0
- package/dist/components/experience-dashboard/index.d.ts +2 -0
- package/dist/components/experience-dashboard/labels.d.ts +2 -0
- package/dist/components/experience-dashboard/style.css +914 -0
- package/dist/components/experience-dashboard/style.js +0 -0
- package/dist/components/experience-dashboard/types.d.ts +106 -0
- package/dist/components/experience-dashboard.js +1 -0
- package/dist/components/file-browser-entries/style.css +463 -86
- package/dist/components/file-preview/style.css +267 -78
- package/dist/components/file-tree/file-tree-toolbar.d.ts +3 -3
- package/dist/components/file-tree/locales/en-US.d.ts +3 -0
- package/dist/components/file-tree/locales/zh-CN.d.ts +3 -0
- package/dist/components/file-tree/style.css +372 -88
- package/dist/components/file-tree/types.d.ts +13 -4
- package/dist/components/scope-switcher/style.css +412 -39
- package/dist/components/style.css +9326 -4553
- package/dist/components/tui/style.css +385 -67
- package/dist/components/viking-bot/interaction/style.css +143 -22
- package/dist/components/viking-bot/style.css +1075 -278
- package/dist/components/wiki-dashboard/index.d.ts +2 -0
- package/dist/components/wiki-dashboard/labels.d.ts +2 -0
- package/dist/components/wiki-dashboard/style.css +956 -0
- package/dist/components/wiki-dashboard/style.js +0 -0
- package/dist/components/wiki-dashboard/types.d.ts +92 -0
- package/dist/components/wiki-dashboard/wiki-action-button.d.ts +9 -0
- package/dist/components/wiki-dashboard/wiki-conflict-card.d.ts +15 -0
- package/dist/components/wiki-dashboard/wiki-dashboard.d.ts +2 -0
- package/dist/components/wiki-dashboard/wiki-file-icon.d.ts +3 -0
- package/dist/components/wiki-dashboard/wiki-severity-filter.d.ts +8 -0
- package/dist/components/wiki-dashboard.js +1 -0
- package/dist/c~0.js +16 -8
- package/dist/ep~0.js +345 -0
- package/dist/e~0.js +33 -328
- package/dist/fj~0.js +507 -0
- package/dist/fl~0.js +709 -0
- package/dist/f~0.js +12 -27
- package/dist/icons/index.d.ts +28 -0
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -1
- package/dist/k~0.js +277 -1
- package/dist/lk~0.js +56 -14
- package/dist/l~0.js +2786 -446
- package/dist/modules/console/index.d.ts +1 -2
- package/dist/modules/console/style.css +1787 -346
- package/dist/modules/console.js +1 -1
- package/dist/modules/file-browser/acl/acl-add-principal.d.ts +12 -0
- package/dist/modules/file-browser/acl/acl-candidate.d.ts +8 -0
- package/dist/modules/file-browser/acl/acl-client.d.ts +13 -0
- package/dist/modules/file-browser/acl/acl-confirmation.d.ts +6 -0
- package/dist/modules/file-browser/acl/acl-entry.d.ts +13 -0
- package/dist/modules/file-browser/acl/acl-labels.d.ts +47 -0
- package/dist/modules/file-browser/acl/acl-menu.d.ts +10 -0
- package/dist/modules/file-browser/acl/acl-modal.d.ts +17 -0
- package/dist/modules/file-browser/acl/acl-model.d.ts +17 -0
- package/dist/modules/file-browser/acl/acl-principal-tabs.d.ts +6 -0
- package/dist/modules/file-browser/acl/acl-tag.d.ts +7 -0
- package/dist/modules/file-browser/acl/locales/en-US.d.ts +44 -0
- package/dist/modules/file-browser/acl/locales/zh-CN.d.ts +44 -0
- package/dist/modules/file-browser/acl/use-acl-principals.d.ts +17 -0
- package/dist/modules/file-browser/acl/use-acl-report.d.ts +27 -0
- package/dist/modules/file-browser/acl-types.d.ts +86 -0
- package/dist/modules/file-browser/dashboard-data.d.ts +9 -0
- package/dist/modules/file-browser/dashboard-indicator.d.ts +8 -0
- package/dist/modules/file-browser/dashboard-labels.d.ts +9 -0
- package/dist/modules/file-browser/dashboard-model.d.ts +17 -0
- package/dist/modules/file-browser/dashboard-resource.d.ts +12 -0
- package/dist/modules/file-browser/experience-dashboard-pane.d.ts +8 -0
- package/dist/modules/file-browser/experience-data.d.ts +31 -0
- package/dist/modules/file-browser/file-browser-detail.d.ts +4 -1
- package/dist/modules/file-browser/file-browser-labels.d.ts +1 -1
- package/dist/modules/file-browser/file-browser-search.d.ts +20 -0
- package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -10
- package/dist/modules/file-browser/file-browser-tree-pane.d.ts +4 -7
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/fs-directories.d.ts +9 -0
- package/dist/modules/file-browser/fs-lines.d.ts +36 -0
- package/dist/modules/file-browser/fs-memory-fields.d.ts +65 -0
- package/dist/modules/file-browser/fs-model.d.ts +15 -3
- package/dist/modules/file-browser/fs-read-file.d.ts +14 -0
- package/dist/modules/file-browser/index.d.ts +3 -2
- package/dist/modules/file-browser/locales/en-US.d.ts +5 -0
- package/dist/modules/file-browser/locales/zh-CN.d.ts +5 -0
- package/dist/modules/file-browser/style.css +4033 -483
- package/dist/modules/file-browser/types.d.ts +82 -20
- package/dist/modules/file-browser/use-browser-dashboards.d.ts +31 -0
- package/dist/modules/file-browser/use-dashboard-query.d.ts +9 -0
- package/dist/modules/file-browser/use-experience-dashboard.d.ts +27 -0
- package/dist/modules/file-browser/use-file-browser-acl.d.ts +15 -0
- package/dist/modules/file-browser/use-file-browser.d.ts +6 -51
- package/dist/modules/file-browser/use-fs-tree.d.ts +3 -0
- package/dist/modules/file-browser/use-wiki-dashboard.d.ts +17 -0
- package/dist/modules/file-browser/wiki-conflicts.d.ts +12 -0
- package/dist/modules/file-browser/wiki-dashboard-pane.d.ts +14 -0
- package/dist/modules/file-browser.js +1 -1
- package/dist/modules/scope-cascade/controller.d.ts +2 -2
- package/dist/modules/scope-cascade/index.d.ts +1 -2
- package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
- package/dist/modules/scope-cascade/style.css +581 -39
- package/dist/modules/scope-cascade/types.d.ts +8 -3
- package/dist/modules/scope-cascade/use-scope-cascade.d.ts +2 -2
- package/dist/modules/scope-cascade.js +1 -1
- package/dist/modules/style.css +13589 -7966
- package/dist/n~0.js +73 -165
- package/dist/rt~0.js +255 -0
- package/dist/r~0.js +18 -39
- package/dist/shared/components/button/button.d.ts +20 -0
- package/dist/shared/components/input/input.d.ts +17 -0
- package/dist/shared/components/modal/locales/en-US.d.ts +4 -0
- package/dist/shared/components/modal/locales/zh-CN.d.ts +4 -0
- package/dist/shared/components/modal/modal.d.ts +2 -0
- package/dist/shared/components/modal/types.d.ts +18 -0
- package/dist/shared/components/overlay/lock-body-scroll.d.ts +1 -0
- package/dist/shared/components/popover/popover.d.ts +1 -1
- package/dist/shared/components/popover/types.d.ts +7 -1
- package/dist/shared/dashboard/dashboard-state.d.ts +12 -0
- package/dist/static/image/dashboard-background.png +0 -0
- package/dist/style.css +16088 -5602
- package/dist/s~0.js +16 -0
- package/dist/u~0.js +15 -6
- package/dist/viking-bot-composer~0.js +30 -12
- package/dist/viking-bot-interaction~0.js +2 -1
- package/package.json +14 -3
- package/dist/o~0.js +0 -106
package/dist/modules/console.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Console
|
|
1
|
+
export { Console } from "../a~0.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OvIdentityValue } from '../../../client/types.js';
|
|
2
|
+
import type { FileBrowserAclContext, FileBrowserAclEntry, FileBrowserAclOptions } from '../acl-types.js';
|
|
3
|
+
import type { AclText } from './acl-labels.js';
|
|
4
|
+
export declare function AclAddPrincipal({ entries, text, disabled, context, accountId, options, onAdd, }: {
|
|
5
|
+
entries: FileBrowserAclEntry[];
|
|
6
|
+
text: AclText;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
context: FileBrowserAclContext;
|
|
9
|
+
accountId?: OvIdentityValue;
|
|
10
|
+
options?: FileBrowserAclOptions;
|
|
11
|
+
onAdd: (entries: FileBrowserAclEntry[]) => void;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FileBrowserAclLevel } from '../acl-types.js';
|
|
2
|
+
import type { AclText } from './acl-labels.js';
|
|
3
|
+
export declare function AclCandidate({ principal, level, text, onChange, }: {
|
|
4
|
+
principal: string;
|
|
5
|
+
level?: FileBrowserAclLevel;
|
|
6
|
+
text: AclText;
|
|
7
|
+
onChange: (level?: FileBrowserAclLevel) => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OvClient, OvIdentityValue, OvRequestOptions } from '../../../client/types.js';
|
|
2
|
+
import type { FileBrowserAclContext, FileBrowserAclPrincipalPage, FileBrowserAclReport } from '../acl-types.js';
|
|
3
|
+
export declare const readAcl: (client: OvClient, uri: string, options: OvRequestOptions) => Promise<FileBrowserAclReport>;
|
|
4
|
+
export declare function readPermission(client: OvClient, uri: string, options: OvRequestOptions): Promise<import("../acl-types.js").FileBrowserAclLevel | undefined>;
|
|
5
|
+
export declare function writeAcl(client: OvClient, uri: string, options: OvRequestOptions, change?: Pick<FileBrowserAclReport, 'direct_entries'> & {
|
|
6
|
+
mode: 'inherit' | 'restricted';
|
|
7
|
+
}): Promise<FileBrowserAclReport>;
|
|
8
|
+
export declare function identityValue(value: OvIdentityValue | undefined): Promise<string>;
|
|
9
|
+
export declare function listPrincipals(query: {
|
|
10
|
+
type: 'user' | 'group';
|
|
11
|
+
keyword: string;
|
|
12
|
+
page: number;
|
|
13
|
+
}, context: FileBrowserAclContext, accountId: OvIdentityValue | undefined): Promise<FileBrowserAclPrincipalPage>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FileBrowserAclEntry, FileBrowserAclLevel } from '../acl-types.js';
|
|
2
|
+
import type { AclText } from './acl-labels.js';
|
|
3
|
+
export declare function AclAvatar({ principal }: {
|
|
4
|
+
principal: string;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function AclEntry({ entry, source, text, disabled, onChange, onRemove, }: {
|
|
7
|
+
entry: FileBrowserAclEntry;
|
|
8
|
+
source?: string;
|
|
9
|
+
text: AclText;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onChange: (level: FileBrowserAclLevel) => void;
|
|
12
|
+
onRemove: () => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type Locale } from '../../../shared/locale.js';
|
|
2
|
+
import type { FileBrowserAclLabels, FileBrowserAclLevel } from '../acl-types.js';
|
|
3
|
+
export type AclText = Required<FileBrowserAclLabels>;
|
|
4
|
+
export declare const aclLabels: (locale: Locale, labels?: FileBrowserAclLabels) => {
|
|
5
|
+
title: string;
|
|
6
|
+
manage: string;
|
|
7
|
+
read: string;
|
|
8
|
+
write: string;
|
|
9
|
+
manageLevel: string;
|
|
10
|
+
readDescription: string;
|
|
11
|
+
writeDescription: string;
|
|
12
|
+
manageDescription: string;
|
|
13
|
+
effectivePermission: string;
|
|
14
|
+
addPrincipal: string;
|
|
15
|
+
search: string;
|
|
16
|
+
users: string;
|
|
17
|
+
groups: string;
|
|
18
|
+
allUsers: string;
|
|
19
|
+
administrator: string;
|
|
20
|
+
administratorDescription: string;
|
|
21
|
+
direct: string;
|
|
22
|
+
inherited: string;
|
|
23
|
+
remove: string;
|
|
24
|
+
add: string;
|
|
25
|
+
cancel: string;
|
|
26
|
+
confirm: string;
|
|
27
|
+
close: string;
|
|
28
|
+
retry: string;
|
|
29
|
+
loadMore: string;
|
|
30
|
+
loading: string;
|
|
31
|
+
saving: string;
|
|
32
|
+
saved: string;
|
|
33
|
+
loadFailed: string;
|
|
34
|
+
saveFailed: string;
|
|
35
|
+
principalsFailed: string;
|
|
36
|
+
empty: string;
|
|
37
|
+
noMatches: string;
|
|
38
|
+
restricted: string;
|
|
39
|
+
restore: string;
|
|
40
|
+
stopTitle: string;
|
|
41
|
+
stopDescription: string;
|
|
42
|
+
restoreTitle: string;
|
|
43
|
+
restoreDescription: string;
|
|
44
|
+
restoreRemoved: string;
|
|
45
|
+
readOnly: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const levelLabel: (level: FileBrowserAclLevel, text: AclText) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileBrowserAclLevel } from '../acl-types.js';
|
|
2
|
+
import { type AclText } from './acl-labels.js';
|
|
3
|
+
export declare function AclMenu({ level, text, name, disabled, onChange, onRemove, }: {
|
|
4
|
+
level: FileBrowserAclLevel;
|
|
5
|
+
text: AclText;
|
|
6
|
+
name: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange: (level: FileBrowserAclLevel) => void;
|
|
9
|
+
onRemove?: () => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { Locale } from '../../../shared/locale.js';
|
|
3
|
+
import type { OvIdentityValue } from '../../../client/types.js';
|
|
4
|
+
import type { FileBrowserAclContext, FileBrowserAclOptions, FileBrowserAclReport } from '../acl-types.js';
|
|
5
|
+
import { type AclText } from './acl-labels.js';
|
|
6
|
+
export declare function AclModal({ uri, open, text, locale, context, triggerRef, accountId, options, onClose, onUpdated, }: {
|
|
7
|
+
uri: string;
|
|
8
|
+
open: boolean;
|
|
9
|
+
text: AclText;
|
|
10
|
+
locale: Locale;
|
|
11
|
+
context: FileBrowserAclContext;
|
|
12
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
13
|
+
accountId?: OvIdentityValue;
|
|
14
|
+
options?: FileBrowserAclOptions;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
onUpdated: (report: FileBrowserAclReport) => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileBrowserAclEntry as Entry, FileBrowserAclLevel as Level, FileBrowserAclReport as Report } from '../acl-types.js';
|
|
2
|
+
export declare const LEVELS: readonly Level[];
|
|
3
|
+
export declare const isLevel: (value: unknown) => value is Level;
|
|
4
|
+
export declare function isAclTarget(uri: string | null): uri is string;
|
|
5
|
+
export declare function normalizeEntries(entries: readonly Entry[]): Entry[];
|
|
6
|
+
export declare function parseReport(value: unknown, uri: string): Report;
|
|
7
|
+
/** Increases preserve inheritance; reducing an inherited grant needs a restricted boundary. */
|
|
8
|
+
export declare function planChange(report: Report, next: Entry[]): {
|
|
9
|
+
entries: Entry[];
|
|
10
|
+
mode: 'restricted';
|
|
11
|
+
confirmation: boolean;
|
|
12
|
+
} | {
|
|
13
|
+
entries: Entry[];
|
|
14
|
+
mode: 'inherit';
|
|
15
|
+
confirmation: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function restoreDiff(report: Report): Entry[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FileBrowserAclLevel } from '../acl-types.js';
|
|
2
|
+
import { type AclText } from './acl-labels.js';
|
|
3
|
+
export declare function AclTag({ level, text, onManage, }: {
|
|
4
|
+
level: FileBrowserAclLevel;
|
|
5
|
+
text: AclText;
|
|
6
|
+
onManage: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
manage: string;
|
|
4
|
+
read: string;
|
|
5
|
+
write: string;
|
|
6
|
+
manageLevel: string;
|
|
7
|
+
readDescription: string;
|
|
8
|
+
writeDescription: string;
|
|
9
|
+
manageDescription: string;
|
|
10
|
+
effectivePermission: string;
|
|
11
|
+
addPrincipal: string;
|
|
12
|
+
search: string;
|
|
13
|
+
users: string;
|
|
14
|
+
groups: string;
|
|
15
|
+
allUsers: string;
|
|
16
|
+
administrator: string;
|
|
17
|
+
administratorDescription: string;
|
|
18
|
+
direct: string;
|
|
19
|
+
inherited: string;
|
|
20
|
+
remove: string;
|
|
21
|
+
add: string;
|
|
22
|
+
cancel: string;
|
|
23
|
+
confirm: string;
|
|
24
|
+
close: string;
|
|
25
|
+
retry: string;
|
|
26
|
+
loadMore: string;
|
|
27
|
+
loading: string;
|
|
28
|
+
saving: string;
|
|
29
|
+
saved: string;
|
|
30
|
+
loadFailed: string;
|
|
31
|
+
saveFailed: string;
|
|
32
|
+
principalsFailed: string;
|
|
33
|
+
empty: string;
|
|
34
|
+
noMatches: string;
|
|
35
|
+
restricted: string;
|
|
36
|
+
restore: string;
|
|
37
|
+
stopTitle: string;
|
|
38
|
+
stopDescription: string;
|
|
39
|
+
restoreTitle: string;
|
|
40
|
+
restoreDescription: string;
|
|
41
|
+
restoreRemoved: string;
|
|
42
|
+
readOnly: string;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
manage: string;
|
|
4
|
+
read: string;
|
|
5
|
+
write: string;
|
|
6
|
+
manageLevel: string;
|
|
7
|
+
readDescription: string;
|
|
8
|
+
writeDescription: string;
|
|
9
|
+
manageDescription: string;
|
|
10
|
+
effectivePermission: string;
|
|
11
|
+
addPrincipal: string;
|
|
12
|
+
search: string;
|
|
13
|
+
users: string;
|
|
14
|
+
groups: string;
|
|
15
|
+
allUsers: string;
|
|
16
|
+
administrator: string;
|
|
17
|
+
administratorDescription: string;
|
|
18
|
+
direct: string;
|
|
19
|
+
inherited: string;
|
|
20
|
+
remove: string;
|
|
21
|
+
add: string;
|
|
22
|
+
cancel: string;
|
|
23
|
+
confirm: string;
|
|
24
|
+
close: string;
|
|
25
|
+
retry: string;
|
|
26
|
+
loadMore: string;
|
|
27
|
+
loading: string;
|
|
28
|
+
saving: string;
|
|
29
|
+
saved: string;
|
|
30
|
+
loadFailed: string;
|
|
31
|
+
saveFailed: string;
|
|
32
|
+
principalsFailed: string;
|
|
33
|
+
empty: string;
|
|
34
|
+
noMatches: string;
|
|
35
|
+
restricted: string;
|
|
36
|
+
restore: string;
|
|
37
|
+
stopTitle: string;
|
|
38
|
+
stopDescription: string;
|
|
39
|
+
restoreTitle: string;
|
|
40
|
+
restoreDescription: string;
|
|
41
|
+
restoreRemoved: string;
|
|
42
|
+
readOnly: string;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OvIdentityValue } from '../../../client/types.js';
|
|
2
|
+
import type { FileBrowserAclContext, FileBrowserAclOptions } from '../acl-types.js';
|
|
3
|
+
export declare function useAclPrincipals({ open, type, keyword, context, accountId, options, }: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
type: 'user' | 'group';
|
|
6
|
+
keyword: string;
|
|
7
|
+
context: FileBrowserAclContext;
|
|
8
|
+
accountId?: OvIdentityValue;
|
|
9
|
+
options?: FileBrowserAclOptions;
|
|
10
|
+
}): {
|
|
11
|
+
items: string[];
|
|
12
|
+
loading: boolean;
|
|
13
|
+
error: Error | undefined;
|
|
14
|
+
hasMore: boolean;
|
|
15
|
+
more: () => void;
|
|
16
|
+
retry: () => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { FileBrowserAclContext, FileBrowserAclEntry, FileBrowserAclReport } from '../acl-types.js';
|
|
2
|
+
type Confirmation = {
|
|
3
|
+
kind: 'restrict';
|
|
4
|
+
entries: FileBrowserAclEntry[];
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'restore';
|
|
7
|
+
};
|
|
8
|
+
export declare function useAclReport({ uri, context, open, readOnly, onUpdated, }: {
|
|
9
|
+
uri: string;
|
|
10
|
+
context: FileBrowserAclContext;
|
|
11
|
+
open: boolean;
|
|
12
|
+
readOnly: boolean;
|
|
13
|
+
onUpdated: (report: FileBrowserAclReport) => void;
|
|
14
|
+
}): {
|
|
15
|
+
report: FileBrowserAclReport | undefined;
|
|
16
|
+
confirmation: Confirmation | undefined;
|
|
17
|
+
error: Error | undefined;
|
|
18
|
+
phase: "loading" | "ready" | "saving";
|
|
19
|
+
saved: boolean;
|
|
20
|
+
retry: () => void;
|
|
21
|
+
change: (entries: FileBrowserAclEntry[]) => void;
|
|
22
|
+
restore: () => void;
|
|
23
|
+
cancel: () => void;
|
|
24
|
+
confirm: () => void;
|
|
25
|
+
};
|
|
26
|
+
export type AclModel = ReturnType<typeof useAclReport>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { OvClient, OvRequestOptions } from '../../client/types.js';
|
|
2
|
+
export type FileBrowserAclLevel = 'read' | 'write' | 'manage';
|
|
3
|
+
export interface FileBrowserAclEntry {
|
|
4
|
+
principal: string;
|
|
5
|
+
level: FileBrowserAclLevel;
|
|
6
|
+
}
|
|
7
|
+
export interface FileBrowserAclReport {
|
|
8
|
+
uri: string;
|
|
9
|
+
acl_mode: 'none' | 'inherit' | 'restricted';
|
|
10
|
+
direct_entries: FileBrowserAclEntry[];
|
|
11
|
+
inherited_entries: FileBrowserAclEntry[];
|
|
12
|
+
effective_entries: FileBrowserAclEntry[];
|
|
13
|
+
}
|
|
14
|
+
export interface FileBrowserAclContext {
|
|
15
|
+
client: OvClient;
|
|
16
|
+
requestOptions: OvRequestOptions;
|
|
17
|
+
}
|
|
18
|
+
export interface FileBrowserAclPrincipalPage {
|
|
19
|
+
principals: string[];
|
|
20
|
+
hasMore: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Optional integration where a service has additional permission metadata. */
|
|
23
|
+
export interface FileBrowserAclOptions {
|
|
24
|
+
/** 禁止授权修改,仍可查看。Prevent mutations while retaining the grant list. */
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 自身有效权限;默认先读 fs/stat.permission,缺失时仅探测管理权限。
|
|
28
|
+
* Own effective level. Defaults to fs/stat.permission, then a manage-only ACL probe.
|
|
29
|
+
* No particular user ID is assumed to be an administrator.
|
|
30
|
+
*/
|
|
31
|
+
resolvePermission?: (uri: string, context: FileBrowserAclContext) => Promise<FileBrowserAclLevel | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* 可选候选目录;默认调用原生账号用户/用户组接口,不读取密钥。
|
|
34
|
+
* Optional principal directory; defaults to native account APIs without credentials.
|
|
35
|
+
*/
|
|
36
|
+
listPrincipals?: (query: {
|
|
37
|
+
type: 'user' | 'group';
|
|
38
|
+
keyword: string;
|
|
39
|
+
page: number;
|
|
40
|
+
}, context: FileBrowserAclContext) => Promise<FileBrowserAclPrincipalPage>;
|
|
41
|
+
/** 保存成功后的通知;失败不触发。Notification after a successful ACL mutation. */
|
|
42
|
+
onChange?: (report: FileBrowserAclReport) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface FileBrowserAclLabels {
|
|
45
|
+
title?: string;
|
|
46
|
+
manage?: string;
|
|
47
|
+
read?: string;
|
|
48
|
+
write?: string;
|
|
49
|
+
manageLevel?: string;
|
|
50
|
+
readDescription?: string;
|
|
51
|
+
writeDescription?: string;
|
|
52
|
+
manageDescription?: string;
|
|
53
|
+
effectivePermission?: string;
|
|
54
|
+
addPrincipal?: string;
|
|
55
|
+
search?: string;
|
|
56
|
+
users?: string;
|
|
57
|
+
groups?: string;
|
|
58
|
+
allUsers?: string;
|
|
59
|
+
administrator?: string;
|
|
60
|
+
administratorDescription?: string;
|
|
61
|
+
direct?: string;
|
|
62
|
+
inherited?: string;
|
|
63
|
+
remove?: string;
|
|
64
|
+
add?: string;
|
|
65
|
+
cancel?: string;
|
|
66
|
+
confirm?: string;
|
|
67
|
+
close?: string;
|
|
68
|
+
retry?: string;
|
|
69
|
+
loadMore?: string;
|
|
70
|
+
loading?: string;
|
|
71
|
+
saving?: string;
|
|
72
|
+
saved?: string;
|
|
73
|
+
loadFailed?: string;
|
|
74
|
+
saveFailed?: string;
|
|
75
|
+
principalsFailed?: string;
|
|
76
|
+
empty?: string;
|
|
77
|
+
noMatches?: string;
|
|
78
|
+
restricted?: string;
|
|
79
|
+
restore?: string;
|
|
80
|
+
stopTitle?: string;
|
|
81
|
+
stopDescription?: string;
|
|
82
|
+
restoreTitle?: string;
|
|
83
|
+
restoreDescription?: string;
|
|
84
|
+
restoreRemoved?: string;
|
|
85
|
+
readOnly?: string;
|
|
86
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OvClient, OvRequestOptions } from '../../client/types.js';
|
|
2
|
+
interface CompileTarget {
|
|
3
|
+
to: string;
|
|
4
|
+
conflicts_num?: number;
|
|
5
|
+
compile_type?: string;
|
|
6
|
+
initialized?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function readCompileTargets(client: OvClient, rootUri: string, options: OvRequestOptions): Promise<CompileTarget[]>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FileBrowserDashboardLabels } from './types.js';
|
|
2
|
+
import type { FileBrowserDashboard } from './dashboard-model.js';
|
|
3
|
+
export declare function DashboardIndicator({ dashboard, locale, labels, onOpen, }: {
|
|
4
|
+
dashboard: FileBrowserDashboard;
|
|
5
|
+
locale?: 'en-US' | 'zh-CN';
|
|
6
|
+
labels?: FileBrowserDashboardLabels;
|
|
7
|
+
onOpen: (uri: string) => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FileBrowserDashboardLabels } from './types.js';
|
|
2
|
+
export declare const dashboardLabels: (locale?: string, labels?: FileBrowserDashboardLabels) => {
|
|
3
|
+
experienceTitle: string;
|
|
4
|
+
wikiTitle: string;
|
|
5
|
+
openExperience: string;
|
|
6
|
+
openWiki: string;
|
|
7
|
+
wikiConflicts: string;
|
|
8
|
+
failed: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FilePreviewTab } from '../../components/file-preview/index.js';
|
|
2
|
+
import type { FileTreeRow } from '../../components/file-tree/index.js';
|
|
3
|
+
export interface FileBrowserDashboard {
|
|
4
|
+
kind: 'experience' | 'wiki';
|
|
5
|
+
uri: string;
|
|
6
|
+
pendingConflicts?: boolean;
|
|
7
|
+
isRoot?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const dashboardKey: (uri: string) => string;
|
|
10
|
+
export declare const within: (uri: string, root: string) => boolean;
|
|
11
|
+
/** Metadata from the resource wins over a missing/stale configuration registry. */
|
|
12
|
+
export declare function resolveDashboard(uri: string, rows: readonly FileTreeRow[], targets: readonly {
|
|
13
|
+
to: string;
|
|
14
|
+
conflicts_num?: number;
|
|
15
|
+
}[]): FileBrowserDashboard | undefined;
|
|
16
|
+
/** Keep the normal tabs when no board is open, and suppress all detail tabs for blocked resources. */
|
|
17
|
+
export declare function mergeDashboardTab(tabs: readonly FilePreviewTab[] | null, dashboard: FilePreviewTab | undefined, blocked: boolean): readonly FilePreviewTab[] | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OvClient, OvRequestOptions } from '../../client/types.js';
|
|
2
|
+
/** Native stat resolves the home alias in the authenticated request scope. */
|
|
3
|
+
export declare function readDashboardStat(client: OvClient, uri: string, options: OvRequestOptions): Promise<{
|
|
4
|
+
uri: string;
|
|
5
|
+
isDir: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function resolveDashboardUri(client: OvClient, uri: string, options: OvRequestOptions): Promise<string>;
|
|
8
|
+
/** Keep native identity and tags together in the query's authenticated scope. */
|
|
9
|
+
export declare function readDashboardHint(client: OvClient, uri: string, options: OvRequestOptions): Promise<{
|
|
10
|
+
uri: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ExperienceDashboardProps } from '../../components/experience-dashboard/index.js';
|
|
2
|
+
import type { OvRequestOptions } from '../../client/types.js';
|
|
3
|
+
type Props = Pick<ExperienceDashboardProps, 'uri' | 'locale' | 'onOpenUri'> & {
|
|
4
|
+
requestOptions?: OvRequestOptions;
|
|
5
|
+
refreshGeneration?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function ExperienceDashboardPane({ uri, locale, requestOptions, refreshGeneration, onOpenUri, }: Props): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { OvClient, OvRequestOptions } from '../../client/types.js';
|
|
2
|
+
import type { ExperienceTrajectory, ExperienceOutcome, ExperienceItem } from '../../components/experience-dashboard/types.js';
|
|
3
|
+
export declare const EXPERIENCE_PAGE_SIZE = 20;
|
|
4
|
+
export declare const isExperienceDirectory: (uri: string) => boolean;
|
|
5
|
+
export declare const isExperienceFile: (uri: string) => boolean;
|
|
6
|
+
/** Native API date bounds are UTC and inclusive. */
|
|
7
|
+
export declare function experienceDateRange(days: number, now?: Date): {
|
|
8
|
+
start_date?: undefined;
|
|
9
|
+
end_date?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
start_date: string;
|
|
12
|
+
end_date: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function readExperiences(client: OvClient, uri: string, page: number, options: OvRequestOptions): Promise<{
|
|
15
|
+
items: (ExperienceItem & {
|
|
16
|
+
isDir?: boolean;
|
|
17
|
+
})[];
|
|
18
|
+
hasMore: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function readExperienceSources(client: OvClient, uri: string, options: OvRequestOptions): Promise<ExperienceTrajectory[]>;
|
|
21
|
+
export interface ExperienceTrajectoryPage {
|
|
22
|
+
items: ExperienceTrajectory[];
|
|
23
|
+
total: number;
|
|
24
|
+
has_more: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ExperienceOutcomeResult {
|
|
27
|
+
outcome_distribution: {
|
|
28
|
+
outcome: ExperienceOutcome;
|
|
29
|
+
count: number;
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Locale } from '../../shared/locale.js';
|
|
2
2
|
import { type FilePreviewTab } from '../../components/file-preview/index.js';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
3
4
|
import type { FileBrowserLabels } from './types.js';
|
|
4
5
|
/**
|
|
5
6
|
* 详情区:页签行与正文。分段器(预览 / 源码)与右侧图标按钮由这里渲染,通过
|
|
@@ -20,6 +21,8 @@ export interface FileBrowserDetailProps {
|
|
|
20
21
|
locale: Locale;
|
|
21
22
|
labels?: FileBrowserLabels['preview'];
|
|
22
23
|
footer?: string;
|
|
24
|
+
titleExtra?: ReactNode;
|
|
25
|
+
extraActions?: ReactNode;
|
|
23
26
|
/** 分段器与图标按钮的文案。Copy for the segmented control and icon buttons. */
|
|
24
27
|
viewLabels: {
|
|
25
28
|
preview: string;
|
|
@@ -31,4 +34,4 @@ export interface FileBrowserDetailProps {
|
|
|
31
34
|
};
|
|
32
35
|
onActiveKeyChange: (key: string) => void;
|
|
33
36
|
}
|
|
34
|
-
export declare function FileBrowserDetail({ tabs, activeKey, locale, labels, footer, viewLabels, onActiveKeyChange, }: FileBrowserDetailProps): import("react").JSX.Element;
|
|
37
|
+
export declare function FileBrowserDetail({ tabs, activeKey, locale, labels, footer, titleExtra, extraActions, viewLabels, onActiveKeyChange, }: FileBrowserDetailProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { FilePreviewLabels } from '../../components/file-preview/index.js';
|
|
|
3
3
|
import type { FileTreeLabels } from '../../components/file-tree/index.js';
|
|
4
4
|
import type { FileBrowserLabels } from './types.js';
|
|
5
5
|
/** 模块外壳自己渲染的文案,其余透传给树与预览。 */
|
|
6
|
-
export type ShellLabels = Omit<FileBrowserLabels, 'tree' | 'preview' | 'entries'>;
|
|
6
|
+
export type ShellLabels = Omit<FileBrowserLabels, 'tree' | 'preview' | 'entries' | 'dashboard' | 'acl'>;
|
|
7
7
|
/**
|
|
8
8
|
* 模块外壳的内置文案。树与预览的默认值留在各自组件里,模块不重复一份。
|
|
9
9
|
* Built-in copy of the module shell. The tree and the preview keep their own
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { OvRequestOptions } from '../../client/types.js';
|
|
3
|
+
import type { Locale } from '../../shared/locale.js';
|
|
4
|
+
import type { ResolvedLabels } from './file-browser-labels.js';
|
|
5
|
+
interface FileBrowserSearchProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
rootUri: string;
|
|
8
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
9
|
+
locale: Locale;
|
|
10
|
+
text: ResolvedLabels;
|
|
11
|
+
requestOptions?: OvRequestOptions;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* TODO: 占位搜索弹窗,目前只提交关键词并展示原生接口结果。
|
|
16
|
+
* 后续补齐筛选、分页、结果定位和快捷键;此视图仅供 FileBrowser 内部使用。
|
|
17
|
+
* Placeholder: query submission and results only; richer search interactions follow.
|
|
18
|
+
*/
|
|
19
|
+
export declare function FileBrowserSearch({ open, rootUri, triggerRef, locale, text, requestOptions, onClose, }: FileBrowserSearchProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 搜索行:搜索框与刷新按钮。内置的连接与导入入口位于上一行。
|
|
3
|
-
*
|
|
4
|
-
* The search row: the search box and refresh button. Built-in connection and import
|
|
5
|
-
* entries occupy the row above.
|
|
6
|
-
*/
|
|
1
|
+
/** Host-owned search intent and module-owned refresh share the file-tree controls. */
|
|
7
2
|
export interface FileBrowserToolbarProps {
|
|
8
|
-
searchId: string;
|
|
9
|
-
query: string;
|
|
10
3
|
refreshing: boolean;
|
|
11
4
|
canRefresh: boolean;
|
|
12
5
|
placeholder: string;
|
|
13
6
|
refreshLabel: string;
|
|
14
|
-
|
|
7
|
+
onSearch?: () => void;
|
|
15
8
|
onRefresh: () => void;
|
|
16
9
|
}
|
|
17
|
-
export declare function FileBrowserToolbar({
|
|
10
|
+
export declare function FileBrowserToolbar({ refreshing, canRefresh, placeholder, refreshLabel, onSearch, onRefresh, }: FileBrowserToolbarProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Locale } from '../../shared/locale.js';
|
|
2
2
|
import type { FileBrowserEntriesProps } from '../../components/file-browser-entries/index.js';
|
|
3
3
|
import type { FileTreeLabels } from '../../components/file-tree/index.js';
|
|
4
|
-
import type { FileBrowserApi } from './types.js';
|
|
4
|
+
import type { FileBrowserApi, FileBrowserDashboardLabels } from './types.js';
|
|
5
5
|
/**
|
|
6
6
|
* 左栏:内置入口条、搜索行与目录树。
|
|
7
7
|
*
|
|
@@ -17,16 +17,13 @@ import type { FileBrowserApi } from './types.js';
|
|
|
17
17
|
export interface FileBrowserTreePaneProps {
|
|
18
18
|
entries: Pick<FileBrowserEntriesProps, 'agentConnect' | 'onImportResources' | 'renderImportResources' | 'labels'>;
|
|
19
19
|
locale: Locale;
|
|
20
|
-
|
|
20
|
+
dashboardLabels?: FileBrowserDashboardLabels;
|
|
21
|
+
onSearch?: () => void;
|
|
21
22
|
browser: FileBrowserApi;
|
|
22
23
|
treeLabels: FileTreeLabels | undefined;
|
|
23
24
|
searchPlaceholder: string;
|
|
24
25
|
refreshLabel: string;
|
|
25
|
-
searchLoading: string;
|
|
26
|
-
searchEmpty: string;
|
|
27
|
-
/** 搜索失败时的结论文案。Conclusion shown when the search request fails. */
|
|
28
|
-
searchErrorLabel: string;
|
|
29
26
|
/** 失败态里的重试按钮。Retry button of the failure state. */
|
|
30
27
|
retryLabel: string;
|
|
31
28
|
}
|
|
32
|
-
export declare function FileBrowserTreePane({ entries, locale,
|
|
29
|
+
export declare function FileBrowserTreePane({ entries, locale, dashboardLabels, onSearch, browser, treeLabels, searchPlaceholder, refreshLabel, retryLabel, }: FileBrowserTreePaneProps): import("react").JSX.Element;
|
|
@@ -12,4 +12,4 @@ export type { FileBrowserActions, FileBrowserApi, FileBrowserLabels, FileBrowser
|
|
|
12
12
|
* tree; loading and coordination live in {@link useFileBrowser}, and this only
|
|
13
13
|
* assembles the view.
|
|
14
14
|
*/
|
|
15
|
-
export declare function FileBrowser({ uri, defaultUri, rootUri, defaultExpandedUri, locale: localeProp, agentConnect, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
|
|
15
|
+
export declare function FileBrowser({ uri, defaultUri, rootUri, defaultExpandedUri, locale: localeProp, agentConnect, dashboardKinds, renderDashboard, acl, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
|
|
@@ -31,3 +31,12 @@ export declare function knownFiles(dirs: Record<string, DirState>): ReadonlySet<
|
|
|
31
31
|
* set, so it stays stable for one load result and can be used as a dependency.
|
|
32
32
|
*/
|
|
33
33
|
export declare function useKnownFile(dirs: Record<string, DirState>): (uri: string) => boolean;
|
|
34
|
+
/** Loaded resource metadata survives collapsed ancestors, unlike the visible rows. */
|
|
35
|
+
export declare function useTreeMetadata(rootUri: string, dirs: Record<string, DirState>): {
|
|
36
|
+
directoryUris: ReadonlySet<string>;
|
|
37
|
+
isKnownFile: (uri: string) => boolean;
|
|
38
|
+
metadataRows: (import("../../components/file-tree/types.js").FileTreeEntryRow & {
|
|
39
|
+
tags?: readonly string[];
|
|
40
|
+
})[];
|
|
41
|
+
accessOf: (uri: string | null) => "container" | "denied" | undefined;
|
|
42
|
+
};
|