@burdenoff/fe-libs 2026.1029.11 → 2026.1030.2
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/connections/ConnectionDetailsTab.d.ts +4 -1
- package/dist/connections/ConnectionDetailsTab.js +18 -15
- package/dist/connections/ConnectionDialog.d.ts +8 -2
- package/dist/connections/ConnectionDialog.js +18 -17
- package/dist/connections/ConnectionDialogPanel.d.ts +3 -1
- package/dist/connections/ConnectionDialogPanel.js +141 -135
- package/dist/connections/ShareConnectionDialog.d.ts +23 -0
- package/dist/connections/ShareConnectionDialog.js +146 -0
- package/dist/connections/SharePanels.d.ts +32 -0
- package/dist/connections/SharePanels.js +158 -0
- package/dist/connections/VisibilityChoice.d.ts +12 -0
- package/dist/connections/VisibilityChoice.js +60 -0
- package/dist/connections/api.d.ts +12 -1
- package/dist/connections/api.js +1 -1
- package/dist/connections/connectionFlow.d.ts +6 -1
- package/dist/connections/connectionFlow.js +1 -1
- package/dist/connections/index.d.ts +4 -1
- package/dist/connections/sharingApi.d.ts +28 -0
- package/dist/connections/sharingApi.js +215 -0
- package/dist/connections/types.d.ts +31 -0
- package/dist/connections/useConnectionSharingDraft.d.ts +40 -0
- package/dist/connections/useConnectionSharingDraft.js +93 -0
- package/dist/connections.js +12 -9
- package/dist/shared/assistant/i18nManifest.d.ts +18 -0
- package/dist/shared/assistant/i18nManifest.js +18 -0
- package/dist/shared/assistant/index.d.ts +4 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
- package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
- package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
- package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
- package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
- package/dist/shared/assistant/ui/compact/windowView.js +31 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
- package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
- package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
- package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
- package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
- package/dist/shared-assistant.js +266 -262
- package/dist/ui/modal-shell.d.ts +6 -1
- package/dist/ui/modal-shell.js +7 -6
- package/package.json +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { unwrap as e } from "./api.js";
|
|
2
|
+
import { gql as t } from "@apollo/client";
|
|
3
|
+
//#region src/connections/sharingApi.ts
|
|
4
|
+
var n = "\n id\n name\n ownerId\n visibility\n myAccess\n shares {\n principalType\n principalId\n role\n }\n", r = t`
|
|
5
|
+
query ConnectionSharing($id: ID!) {
|
|
6
|
+
getConnection(id: $id) {
|
|
7
|
+
${n}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`, i = t`
|
|
11
|
+
mutation ShareConnection($input: ShareConnectionInput!) {
|
|
12
|
+
shareConnection(input: $input) {
|
|
13
|
+
${n}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`, a = t`
|
|
17
|
+
query ConnectionShareMembers($workspaceId: ID!, $pagination: PaginationInput) {
|
|
18
|
+
workspaceMembers(workspaceId: $workspaceId, pagination: $pagination) {
|
|
19
|
+
items {
|
|
20
|
+
userId
|
|
21
|
+
status
|
|
22
|
+
}
|
|
23
|
+
hasMore
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`, o = t`
|
|
27
|
+
query ConnectionShareMemberIdentities($userIds: [ID!]!, $workspaceId: ID) {
|
|
28
|
+
workspaceMemberIdentities(userIds: $userIds, workspaceId: $workspaceId) {
|
|
29
|
+
userId
|
|
30
|
+
displayName
|
|
31
|
+
email
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`, s = t`
|
|
35
|
+
query ConnectionShareGroups($first: Int, $after: String) {
|
|
36
|
+
groups(first: $first, after: $after) {
|
|
37
|
+
edges {
|
|
38
|
+
node {
|
|
39
|
+
id
|
|
40
|
+
name
|
|
41
|
+
status
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
pageInfo {
|
|
45
|
+
hasNextPage
|
|
46
|
+
endCursor
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`, c = t`
|
|
51
|
+
query ConnectionShareProjects($pagination: PaginationInput) {
|
|
52
|
+
projects(pagination: $pagination) {
|
|
53
|
+
items {
|
|
54
|
+
id
|
|
55
|
+
name
|
|
56
|
+
status
|
|
57
|
+
}
|
|
58
|
+
hasMore
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`, l = 100, u = 1e3, d = ["WORKSPACE", "RESTRICTED"], f = [
|
|
62
|
+
"OWNER",
|
|
63
|
+
"EDITOR",
|
|
64
|
+
"USE",
|
|
65
|
+
"WORKSPACE",
|
|
66
|
+
"ADMINISTRATOR"
|
|
67
|
+
], p = [
|
|
68
|
+
"USER",
|
|
69
|
+
"GROUP",
|
|
70
|
+
"PROJECT"
|
|
71
|
+
], m = ["USE", "EDITOR"], h = (e) => typeof e == "object" && !!e && !Array.isArray(e), g = (e) => typeof e == "string" && e.trim().length > 0 ? e : null;
|
|
72
|
+
function _(e, t) {
|
|
73
|
+
return typeof e == "string" && t.includes(e) ? e : null;
|
|
74
|
+
}
|
|
75
|
+
function v(e) {
|
|
76
|
+
if (!h(e)) return null;
|
|
77
|
+
let t = g(e.id), n = g(e.ownerId), r = _(e.visibility, d);
|
|
78
|
+
if (!t || !n || !r) return null;
|
|
79
|
+
let i = [];
|
|
80
|
+
for (let t of Array.isArray(e.shares) ? e.shares : []) {
|
|
81
|
+
if (!h(t)) continue;
|
|
82
|
+
let e = _(t.principalType, p), n = g(t.principalId), r = _(t.role, m);
|
|
83
|
+
e && n && r && i.push({
|
|
84
|
+
principalType: e,
|
|
85
|
+
principalId: n,
|
|
86
|
+
role: r
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
id: t,
|
|
91
|
+
name: g(e.name) ?? t,
|
|
92
|
+
ownerId: n,
|
|
93
|
+
visibility: r,
|
|
94
|
+
myAccess: _(e.myAccess, f),
|
|
95
|
+
shares: i
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function y(e) {
|
|
99
|
+
return e === "OWNER" || e === "EDITOR" || e === "ADMINISTRATOR";
|
|
100
|
+
}
|
|
101
|
+
function b(e) {
|
|
102
|
+
let t = v(e);
|
|
103
|
+
if (!t) throw Error("Connection not found");
|
|
104
|
+
return t;
|
|
105
|
+
}
|
|
106
|
+
async function x(e) {
|
|
107
|
+
try {
|
|
108
|
+
return await e();
|
|
109
|
+
} catch {
|
|
110
|
+
return [];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
var S = (e) => e == null || String(e).toUpperCase() === "ACTIVE";
|
|
114
|
+
function C(t) {
|
|
115
|
+
let n = async (n, r) => e(await t.query({
|
|
116
|
+
query: n,
|
|
117
|
+
variables: r,
|
|
118
|
+
fetchPolicy: "network-only"
|
|
119
|
+
})), d = async (n, r) => e(await t.mutate({
|
|
120
|
+
mutation: n,
|
|
121
|
+
variables: r
|
|
122
|
+
})), f = async (e) => {
|
|
123
|
+
let t = [];
|
|
124
|
+
for (let n = 0; n < u; n += l) {
|
|
125
|
+
let r = await e({
|
|
126
|
+
limit: l,
|
|
127
|
+
offset: n
|
|
128
|
+
});
|
|
129
|
+
if (t.push(...r.items), !r.hasMore || r.items.length === 0) break;
|
|
130
|
+
}
|
|
131
|
+
return t;
|
|
132
|
+
}, p = async (e) => {
|
|
133
|
+
let t = (await f(async (t) => {
|
|
134
|
+
let r = await n(a, {
|
|
135
|
+
workspaceId: e,
|
|
136
|
+
pagination: t
|
|
137
|
+
});
|
|
138
|
+
return {
|
|
139
|
+
items: r?.workspaceMembers?.items ?? [],
|
|
140
|
+
hasMore: r?.workspaceMembers?.hasMore === !0
|
|
141
|
+
};
|
|
142
|
+
})).filter(h).filter((e) => S(e.status)).map((e) => g(e.userId)).filter((e) => e !== null), r = /* @__PURE__ */ new Map();
|
|
143
|
+
for (let i = 0; i < t.length; i += l) {
|
|
144
|
+
let a = await n(o, {
|
|
145
|
+
userIds: t.slice(i, i + l),
|
|
146
|
+
workspaceId: e
|
|
147
|
+
}).catch(() => null);
|
|
148
|
+
for (let e of (a?.workspaceMemberIdentities ?? []).filter(h)) r.set(String(e.userId), e);
|
|
149
|
+
}
|
|
150
|
+
return t.map((e) => {
|
|
151
|
+
let t = r.get(e), n = g(t?.email) ?? void 0;
|
|
152
|
+
return {
|
|
153
|
+
principalType: "USER",
|
|
154
|
+
principalId: e,
|
|
155
|
+
label: g(t?.displayName) ?? n ?? e,
|
|
156
|
+
...n ? { detail: n } : {}
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
}, m = async () => {
|
|
160
|
+
let e = [], t = null;
|
|
161
|
+
for (; e.length < u;) {
|
|
162
|
+
let r = await n(s, {
|
|
163
|
+
first: l,
|
|
164
|
+
after: t
|
|
165
|
+
});
|
|
166
|
+
for (let t of r?.groups?.edges ?? []) h(t) && h(t.node) && e.push(t.node);
|
|
167
|
+
let i = r?.groups?.pageInfo, a = g(i?.endCursor);
|
|
168
|
+
if (!i?.hasNextPage || !a || a === t) break;
|
|
169
|
+
t = a;
|
|
170
|
+
}
|
|
171
|
+
return e.filter((e) => S(e.status)).flatMap((e) => {
|
|
172
|
+
let t = g(e.id);
|
|
173
|
+
return t ? [{
|
|
174
|
+
principalType: "GROUP",
|
|
175
|
+
principalId: t,
|
|
176
|
+
label: g(e.name) ?? t
|
|
177
|
+
}] : [];
|
|
178
|
+
});
|
|
179
|
+
}, _ = async () => (await f(async (e) => {
|
|
180
|
+
let t = await n(c, { pagination: e });
|
|
181
|
+
return {
|
|
182
|
+
items: t?.projects?.items ?? [],
|
|
183
|
+
hasMore: t?.projects?.hasMore === !0
|
|
184
|
+
};
|
|
185
|
+
})).filter(h).filter((e) => S(e.status)).flatMap((e) => {
|
|
186
|
+
let t = g(e.id);
|
|
187
|
+
return t ? [{
|
|
188
|
+
principalType: "PROJECT",
|
|
189
|
+
principalId: t,
|
|
190
|
+
label: g(e.name) ?? t
|
|
191
|
+
}] : [];
|
|
192
|
+
});
|
|
193
|
+
return {
|
|
194
|
+
async getSharing(e) {
|
|
195
|
+
return b((await n(r, { id: e }))?.getConnection);
|
|
196
|
+
},
|
|
197
|
+
async listPrincipals(e) {
|
|
198
|
+
let [t, n, r] = await Promise.all([
|
|
199
|
+
x(() => p(e)),
|
|
200
|
+
x(m),
|
|
201
|
+
x(_)
|
|
202
|
+
]);
|
|
203
|
+
return [
|
|
204
|
+
...t,
|
|
205
|
+
...n,
|
|
206
|
+
...r
|
|
207
|
+
];
|
|
208
|
+
},
|
|
209
|
+
async share(e) {
|
|
210
|
+
return b((await d(i, { input: e }))?.shareConnection);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
export { u as SHARE_PICKER_LIMIT, y as canManageSharing, C as createConnectionSharingApi, v as mapConnectionSharing };
|
|
@@ -81,3 +81,34 @@ export type ConnectionDialogEvent = {
|
|
|
81
81
|
providerKey: string;
|
|
82
82
|
error: string;
|
|
83
83
|
};
|
|
84
|
+
/** Who can reach a connection beyond its owner (BOFF-9726). */
|
|
85
|
+
export type ConnectionVisibility = 'WORKSPACE' | 'RESTRICTED';
|
|
86
|
+
/** What a connection share is granted to. */
|
|
87
|
+
export type ConnectionSharePrincipalType = 'USER' | 'GROUP' | 'PROJECT';
|
|
88
|
+
/** USE: see it and run workflows with it. EDITOR: also change it and its sharing. */
|
|
89
|
+
export type ConnectionShareRole = 'USE' | 'EDITOR';
|
|
90
|
+
/** How the signed-in person reaches a connection. */
|
|
91
|
+
export type ConnectionAccess = 'OWNER' | 'EDITOR' | 'USE' | 'WORKSPACE' | 'ADMINISTRATOR';
|
|
92
|
+
export interface ConnectionShareGrant {
|
|
93
|
+
principalType: ConnectionSharePrincipalType;
|
|
94
|
+
principalId: string;
|
|
95
|
+
role: ConnectionShareRole;
|
|
96
|
+
}
|
|
97
|
+
/** A connection's sharing, as the Share dialog shows and edits it. */
|
|
98
|
+
export interface ConnectionSharing {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
ownerId: string;
|
|
102
|
+
visibility: ConnectionVisibility;
|
|
103
|
+
/** Null for platform callers. */
|
|
104
|
+
myAccess: ConnectionAccess | null;
|
|
105
|
+
shares: ConnectionShareGrant[];
|
|
106
|
+
}
|
|
107
|
+
/** Someone or something a connection can be shared with. */
|
|
108
|
+
export interface SharePrincipal {
|
|
109
|
+
principalType: ConnectionSharePrincipalType;
|
|
110
|
+
principalId: string;
|
|
111
|
+
label: string;
|
|
112
|
+
/** An email for people, nothing for groups and projects. */
|
|
113
|
+
detail?: string;
|
|
114
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ConnectionSharingApi, ShareConnectionInput } from './sharingApi';
|
|
2
|
+
import { ConnectionShareGrant, ConnectionShareRole, ConnectionSharePrincipalType, ConnectionSharing, ConnectionVisibility, SharePrincipal } from './types';
|
|
3
|
+
export declare const principalKey: (principalType: ConnectionSharePrincipalType, principalId: string) => string;
|
|
4
|
+
/**
|
|
5
|
+
* The one shareConnection change a save sends. Only an admin can hand the
|
|
6
|
+
* connection over, and a new owner rides in the same change, so the owner and
|
|
7
|
+
* the sharing apply together or not at all. The owner never needs a grant.
|
|
8
|
+
*/
|
|
9
|
+
export declare function shareInput(sharing: Pick<ConnectionSharing, 'ownerId' | 'myAccess'>, connectionId: string, visibility: ConnectionVisibility, grants: readonly ConnectionShareGrant[], ownerId: string): ShareConnectionInput;
|
|
10
|
+
/**
|
|
11
|
+
* What the dialog may show from state loaded earlier: only while it is open on
|
|
12
|
+
* the connection it was loaded for. Closed, or reopened on no connection or
|
|
13
|
+
* another one, nothing from before shows.
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadedFor<T extends {
|
|
16
|
+
connectionId: string;
|
|
17
|
+
}>(open: boolean, connectionId: string | null, value: T | null): T | null;
|
|
18
|
+
export interface ConnectionSharingDraft {
|
|
19
|
+
sharing: ConnectionSharing | null;
|
|
20
|
+
principals: SharePrincipal[];
|
|
21
|
+
loadError: string | null;
|
|
22
|
+
/** True for the owner, editors and workspace admins. */
|
|
23
|
+
editable: boolean;
|
|
24
|
+
/** True for a workspace admin, who can also change the owner. */
|
|
25
|
+
administrator: boolean;
|
|
26
|
+
visibility: ConnectionVisibility;
|
|
27
|
+
setVisibility: (value: ConnectionVisibility) => void;
|
|
28
|
+
grants: ConnectionShareGrant[];
|
|
29
|
+
addGrant: (principal: SharePrincipal) => void;
|
|
30
|
+
setRole: (index: number, role: ConnectionShareRole) => void;
|
|
31
|
+
removeGrant: (index: number) => void;
|
|
32
|
+
ownerId: string;
|
|
33
|
+
setOwnerId: (value: string) => void;
|
|
34
|
+
labelOf: (principalType: ConnectionSharePrincipalType, principalId: string) => string;
|
|
35
|
+
saving: boolean;
|
|
36
|
+
saveError: string | null;
|
|
37
|
+
/** Saves and resolves with the saved sharing, or null when it failed (see saveError). */
|
|
38
|
+
save: () => Promise<ConnectionSharing | null>;
|
|
39
|
+
}
|
|
40
|
+
export declare function useConnectionSharingDraft(api: ConnectionSharingApi, open: boolean, connectionId: string | null, workspaceId: string): ConnectionSharingDraft;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { canManageSharing as e } from "./sharingApi.js";
|
|
2
|
+
import { useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
3
|
+
//#region src/connections/useConnectionSharingDraft.ts
|
|
4
|
+
var a = (e, t) => `${e}:${t}`;
|
|
5
|
+
function o(e, t, n, r, i) {
|
|
6
|
+
let a = e.myAccess === "ADMINISTRATOR" && i !== "" && i !== e.ownerId, o = a ? i : e.ownerId;
|
|
7
|
+
return {
|
|
8
|
+
connectionId: t,
|
|
9
|
+
visibility: n,
|
|
10
|
+
shares: r.filter((e) => !(e.principalType === "USER" && e.principalId === o)),
|
|
11
|
+
...a ? { ownerId: i } : {}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function s(e, t, n) {
|
|
15
|
+
return e && n !== null && n.connectionId === t ? n : null;
|
|
16
|
+
}
|
|
17
|
+
function c(c, l, u, d) {
|
|
18
|
+
let [f, p] = i(null), [m, h] = i(null), [g, _] = i("RESTRICTED"), [v, y] = i([]), [b, x] = i(""), [S, C] = i(null), [w, T] = i(null), E = r(0);
|
|
19
|
+
t(() => {
|
|
20
|
+
E.current += 1;
|
|
21
|
+
}, [l, u]), t(() => {
|
|
22
|
+
if (!l || !u) return;
|
|
23
|
+
let e = !0;
|
|
24
|
+
return p(null), h(null), T(null), C(null), Promise.all([c.getSharing(u), c.listPrincipals(d)]).then(([t, n]) => {
|
|
25
|
+
e && (p({
|
|
26
|
+
connectionId: u,
|
|
27
|
+
sharing: t,
|
|
28
|
+
principals: n
|
|
29
|
+
}), _(t.visibility), y(t.shares), x(t.ownerId));
|
|
30
|
+
}).catch((t) => {
|
|
31
|
+
e && h({
|
|
32
|
+
connectionId: u,
|
|
33
|
+
message: t instanceof Error ? t.message : String(t)
|
|
34
|
+
});
|
|
35
|
+
}), () => {
|
|
36
|
+
e = !1;
|
|
37
|
+
};
|
|
38
|
+
}, [
|
|
39
|
+
c,
|
|
40
|
+
u,
|
|
41
|
+
l,
|
|
42
|
+
d
|
|
43
|
+
]);
|
|
44
|
+
let D = s(l, u, f), O = s(l, u, m), k = n(() => new Map((D?.principals ?? []).map((e) => [a(e.principalType, e.principalId), e])), [D]), A = D?.sharing ?? null;
|
|
45
|
+
return {
|
|
46
|
+
sharing: A,
|
|
47
|
+
principals: D?.principals ?? [],
|
|
48
|
+
loadError: O?.message ?? null,
|
|
49
|
+
editable: A !== null && e(A.myAccess),
|
|
50
|
+
administrator: A?.myAccess === "ADMINISTRATOR",
|
|
51
|
+
visibility: g,
|
|
52
|
+
setVisibility: _,
|
|
53
|
+
grants: v,
|
|
54
|
+
addGrant: (e) => y((t) => [...t, {
|
|
55
|
+
principalType: e.principalType,
|
|
56
|
+
principalId: e.principalId,
|
|
57
|
+
role: "USE"
|
|
58
|
+
}]),
|
|
59
|
+
setRole: (e, t) => y((n) => n.map((n, r) => r === e ? {
|
|
60
|
+
...n,
|
|
61
|
+
role: t
|
|
62
|
+
} : n)),
|
|
63
|
+
removeGrant: (e) => y((t) => t.filter((t, n) => n !== e)),
|
|
64
|
+
ownerId: b,
|
|
65
|
+
setOwnerId: x,
|
|
66
|
+
labelOf: (e, t) => k.get(a(e, t))?.label ?? t,
|
|
67
|
+
saving: l && S !== null && S.connectionId === u,
|
|
68
|
+
saveError: s(l, u, w)?.message ?? null,
|
|
69
|
+
save: async () => {
|
|
70
|
+
if (!A || !u) return null;
|
|
71
|
+
let e = u;
|
|
72
|
+
E.current += 1;
|
|
73
|
+
let t = E.current, n = () => E.current === t;
|
|
74
|
+
C({
|
|
75
|
+
connectionId: e,
|
|
76
|
+
save: t
|
|
77
|
+
}), T(null);
|
|
78
|
+
try {
|
|
79
|
+
let t = await c.share(o(A, e, g, v, b));
|
|
80
|
+
return n() ? t : null;
|
|
81
|
+
} catch (t) {
|
|
82
|
+
return n() && T({
|
|
83
|
+
connectionId: e,
|
|
84
|
+
message: t instanceof Error ? t.message : String(t)
|
|
85
|
+
}), null;
|
|
86
|
+
} finally {
|
|
87
|
+
C((e) => e?.save === t ? null : e);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { a as principalKey, c as useConnectionSharingDraft };
|
package/dist/connections.js
CHANGED
|
@@ -3,12 +3,15 @@ import { createConnectionsApi as a, mapProvider as o, normalizeAuthType as s } f
|
|
|
3
3
|
import { buildCreateInput as c, collectsOwnClientId as l, flowForAuthType as u, resolveFlow as d, resolveMethod as f, resolveSchema as p, submitConnection as m, submittedValues as h, validateDraft as g } from "./connections/connectionFlow.js";
|
|
4
4
|
import { authTypeLabel as _, categoryLabel as v } from "./connections/labels.js";
|
|
5
5
|
import { ProviderIcon as y } from "./connections/ProviderIcon.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
6
|
+
import { VisibilityChoice as b } from "./connections/VisibilityChoice.js";
|
|
7
|
+
import { EMPTY_STORAGE as x, compatibleSecrets as S } from "./connections/storage.js";
|
|
8
|
+
import { CredentialStorageSelector as C } from "./connections/CredentialStorageSelector.js";
|
|
9
|
+
import { CONNECTION_DIALOG_FRAME_CLASSES as w } from "./connections/frame.js";
|
|
10
|
+
import { isScopeChecked as T, parseScopeOptions as E, requestedScopes as D, toggleScope as O } from "./connections/scopes.js";
|
|
11
|
+
import { ScopePicker as k } from "./connections/ScopePicker.js";
|
|
12
|
+
import { groupByCategory as A, pickableProviders as j } from "./connections/picker.js";
|
|
13
|
+
import { isOAuthCallbackMessage as M, waitForOAuthCompletion as N } from "./connections/oauthPopup.js";
|
|
14
|
+
import { ConnectionDialog as P } from "./connections/ConnectionDialog.js";
|
|
15
|
+
import { SHARE_PICKER_LIMIT as F, canManageSharing as I, createConnectionSharingApi as L, mapConnectionSharing as R } from "./connections/sharingApi.js";
|
|
16
|
+
import { SHARE_TITLE_ID as z, ShareConnectionDialog as B } from "./connections/ShareConnectionDialog.js";
|
|
17
|
+
export { w as CONNECTION_DIALOG_FRAME_CLASSES, P as ConnectionDialog, C as CredentialStorageSelector, x as EMPTY_STORAGE, y as ProviderIcon, F as SHARE_PICKER_LIMIT, z as SHARE_TITLE_ID, k as ScopePicker, B as ShareConnectionDialog, b as VisibilityChoice, _ as authTypeLabel, c as buildCreateInput, I as canManageSharing, v as categoryLabel, l as collectsOwnClientId, S as compatibleSecrets, L as createConnectionSharingApi, a as createConnectionsApi, u as flowForAuthType, e as getProviderAccent, t as getProviderIconName, n as getProviderImageSource, r as getProviderTextIcon, A as groupByCategory, M as isOAuthCallbackMessage, T as isScopeChecked, R as mapConnectionSharing, o as mapProvider, s as normalizeAuthType, i as normalizeProviderCategory, E as parseScopeOptions, j as pickableProviders, D as requestedScopes, d as resolveFlow, f as resolveMethod, p as resolveSchema, m as submitConnection, h as submittedValues, O as toggleScope, g as validateDraft, N as waitForOAuthCompletion };
|
|
@@ -660,11 +660,29 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
660
660
|
readonly 'voiceSession.transcriptTitle': "Voice transcript";
|
|
661
661
|
readonly 'voiceSession.unmute': "Turn the microphone on";
|
|
662
662
|
readonly 'waitingChange.review': "Review";
|
|
663
|
+
readonly 'waitingChange.reviewInFull': "Review in full assistant";
|
|
663
664
|
readonly 'waitingChange.reviewLabel': "Review the change waiting for your approval";
|
|
664
665
|
readonly 'waitingChange.status': "{{count}} change(s) waiting for your approval";
|
|
666
|
+
readonly 'window.endVoice': "End voice";
|
|
667
|
+
readonly 'window.hideTranscript': "Hide transcript";
|
|
668
|
+
readonly 'window.language': "Language";
|
|
669
|
+
readonly 'window.languageLocked': "Change the language after you end voice";
|
|
670
|
+
readonly 'window.languagePinned': "Replies in {{language}} — change in full assistant";
|
|
665
671
|
readonly 'window.minimize': "Minimize";
|
|
672
|
+
readonly 'window.minimizeEndsVoice': "Minimize (ends voice)";
|
|
673
|
+
readonly 'window.mute': "Mute";
|
|
666
674
|
readonly 'window.openFull': "Open full assistant";
|
|
675
|
+
readonly 'window.showTranscript': "Show transcript";
|
|
676
|
+
readonly 'window.startVoice': "Start voice";
|
|
677
|
+
readonly 'window.stopSpeaking': "Stop speaking";
|
|
667
678
|
readonly 'window.title': "Quick assistant";
|
|
679
|
+
readonly 'window.unmute': "Unmute";
|
|
680
|
+
readonly 'window.view': "View";
|
|
681
|
+
readonly 'window.viewChat': "Chat";
|
|
682
|
+
readonly 'window.viewVoice': "Voice";
|
|
683
|
+
readonly 'window.voiceReadyStatus': "The microphone starts only when you press Start voice.";
|
|
684
|
+
readonly 'window.voiceReadyTitle': "Talk to the assistant";
|
|
685
|
+
readonly 'window.voiceStartedCue': "Started a voice conversation. Your chat is in History.";
|
|
668
686
|
readonly 'writeConsent.body': "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.";
|
|
669
687
|
readonly 'writeConsent.cancel': "Stay in {{mode}}";
|
|
670
688
|
readonly 'writeConsent.confirm': "Enable {{mode}}";
|
|
@@ -553,11 +553,29 @@ var g = {
|
|
|
553
553
|
"voiceSession.transcriptTitle": "Voice transcript",
|
|
554
554
|
"voiceSession.unmute": "Turn the microphone on",
|
|
555
555
|
"waitingChange.review": "Review",
|
|
556
|
+
"waitingChange.reviewInFull": "Review in full assistant",
|
|
556
557
|
"waitingChange.reviewLabel": "Review the change waiting for your approval",
|
|
557
558
|
"waitingChange.status": "{{count}} change(s) waiting for your approval",
|
|
559
|
+
"window.endVoice": "End voice",
|
|
560
|
+
"window.hideTranscript": "Hide transcript",
|
|
561
|
+
"window.language": "Language",
|
|
562
|
+
"window.languageLocked": "Change the language after you end voice",
|
|
563
|
+
"window.languagePinned": "Replies in {{language}} — change in full assistant",
|
|
558
564
|
"window.minimize": "Minimize",
|
|
565
|
+
"window.minimizeEndsVoice": "Minimize (ends voice)",
|
|
566
|
+
"window.mute": "Mute",
|
|
559
567
|
"window.openFull": "Open full assistant",
|
|
568
|
+
"window.showTranscript": "Show transcript",
|
|
569
|
+
"window.startVoice": "Start voice",
|
|
570
|
+
"window.stopSpeaking": "Stop speaking",
|
|
560
571
|
"window.title": "Quick assistant",
|
|
572
|
+
"window.unmute": "Unmute",
|
|
573
|
+
"window.view": "View",
|
|
574
|
+
"window.viewChat": "Chat",
|
|
575
|
+
"window.viewVoice": "Voice",
|
|
576
|
+
"window.voiceReadyStatus": "The microphone starts only when you press Start voice.",
|
|
577
|
+
"window.voiceReadyTitle": "Talk to the assistant",
|
|
578
|
+
"window.voiceStartedCue": "Started a voice conversation. Your chat is in History.",
|
|
561
579
|
"writeConsent.body": "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.",
|
|
562
580
|
"writeConsent.cancel": "Stay in {{mode}}",
|
|
563
581
|
"writeConsent.confirm": "Enable {{mode}}",
|
|
@@ -84,6 +84,7 @@ export * from './voice/captionText';
|
|
|
84
84
|
export * from './voice/languagePair';
|
|
85
85
|
export * from './voice/languages';
|
|
86
86
|
export * from './voice/voiceReopen';
|
|
87
|
+
export * from './voice/voiceStartedCue';
|
|
87
88
|
export * from './pendingWrite';
|
|
88
89
|
export * from './liveTurns';
|
|
89
90
|
export * from './images';
|
|
@@ -381,5 +382,8 @@ export * from './ui/compact/AssistantMenuView';
|
|
|
381
382
|
export * from './ui/compact/AssistantVoiceLanguageSettings';
|
|
382
383
|
export * from './ui/compact/AssistantWaitingChangeRow';
|
|
383
384
|
export * from './ui/compact/AssistantWindowHeader';
|
|
385
|
+
export * from './ui/compact/AssistantLanguagePill';
|
|
386
|
+
export * from './ui/compact/AssistantVoiceReady';
|
|
387
|
+
export * from './ui/compact/windowView';
|
|
384
388
|
export * from './ui/useAssistantVisualViewport';
|
|
385
389
|
export * from './ui/compact/waitingChange';
|
|
@@ -5,7 +5,7 @@ import { AssistantNavigate } from './AssistantMarkdownRenderer';
|
|
|
5
5
|
import { AssistantLiveAvatarSeam } from './assistantLiveAvatarSeam';
|
|
6
6
|
import { AssistantPreviewController } from '../preview/types';
|
|
7
7
|
import { AssistantPresentation } from './composer/AssistantComposer';
|
|
8
|
-
import { AssistantSurface } from './assistantOverlayState';
|
|
8
|
+
import { AssistantSurface, AssistantWindowView } from './assistantOverlayState';
|
|
9
9
|
export type AIAssistantPanelProps = PanelProps & {
|
|
10
10
|
/** When provided, renders a dock/float toggle in the header. */
|
|
11
11
|
docked?: boolean;
|
|
@@ -142,6 +142,14 @@ export type AIAssistantPanelProps = PanelProps & {
|
|
|
142
142
|
* Escape does there: it never asks to discard a draft the hidden window keeps.
|
|
143
143
|
*/
|
|
144
144
|
onMinimize?: () => void;
|
|
145
|
+
/**
|
|
146
|
+
* BOFF-10180 (compact window only): the window's LAST USED view (CW-V), or
|
|
147
|
+
* null when none was ever chosen. The first time the window opens on Voice
|
|
148
|
+
* where voice is available here, else on Chat.
|
|
149
|
+
*/
|
|
150
|
+
windowView?: AssistantWindowView | null;
|
|
151
|
+
/** Compact window: the person chose Chat or Voice, so the host remembers it. */
|
|
152
|
+
onWindowViewChange?: (view: AssistantWindowView) => void;
|
|
145
153
|
};
|
|
146
154
|
/**
|
|
147
155
|
* The panel.
|