@burdenoff/fluidgrids-fe-sdk 2026.1111.17 → 2026.1111.19
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/{AiStudioPage-kJHSsIcj.js → AiStudioPage-htYcXz43.js} +2 -2
- package/dist/{MissingNodesInstallModal-CMybsI8h.js → MissingNodesInstallModal-Dly7T2_7.js} +1 -1
- package/dist/{SettingsPage-CgkRlCM5.js → SettingsPage-CJLZvv4J.js} +1485 -1484
- package/dist/{TemplateCard-DsC0KNH1.js → TemplateCard-BdB087SP.js} +47 -11
- package/dist/{TemplateConfigurationModal-BhGWIzpm.js → TemplateConfigurationModal-CPVcTDSi.js} +1 -1
- package/dist/{TemplateDetailPanel-D4cUVr-m.js → TemplateDetailPanel-DruadMkg.js} +1 -1
- package/dist/{TemplatePreview-GthzCOSo.js → TemplatePreview-CNrYJXw2.js} +2 -2
- package/dist/{TemplatesPage-CsDNT54N.js → TemplatesPage-BU4tSqOo.js} +1 -1
- package/dist/{WorkflowBuilder-DEi_9YOb.js → WorkflowBuilder-BSPGcOfA.js} +2 -2
- package/dist/{WorkflowBuilder-iPqXgbYr.js → WorkflowBuilder-DMonxuoY.js} +4 -4
- package/dist/WorkflowShareDialog-mbIwRQUY.js +168 -0
- package/dist/{WorkflowsList-CA20dVIl.js → WorkflowsList-DiiGyZkT.js} +2 -1
- package/dist/{agentTools-CkRJB7r5.js → agentTools-C7pdNJqE.js} +2 -2
- package/dist/{canvasNoteTools-CQIc7Oxg.js → canvasNoteTools-CqiPTBa1.js} +1 -1
- package/dist/code-editor-field-9-GdVE_8.js +111 -0
- package/dist/{flow-builder-y2Y1iG4Y.js → flow-builder-CV5Zu_Hq.js} +246 -8639
- package/dist/{index-W2o__Nm6.d.ts → index-6JR2vD9J.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -13
- package/dist/{node-detail-view-B91kXzIy.js → node-detail-view-ttMp6H6K.js} +4 -2
- package/dist/node-editor-tab-body-Bqb--pZy.js +174 -0
- package/dist/observability.d.ts +1 -1
- package/dist/popover-BbVOHsfO.js +472 -0
- package/dist/{quick-config-panel-DggPl1vY.js → quick-config-panel-Da4uOVSs.js} +2 -1
- package/dist/schedule-panel-DnFN933b.js +7542 -0
- package/dist/settings.js +1 -1
- package/dist/sidebar-node-editor-lcnIZxdR.js +177 -0
- package/dist/templates.js +2 -2
- package/dist/{useAgentDefinitions-Dpz0HDTq.js → useAgentDefinitions-B0dam3_o.js} +1 -396
- package/dist/useConnections-Cs7LCWEM.js +401 -0
- package/dist/{WorkflowShareDialog-B_gn968c.js → useWorkflowCodeExport-Bu2QYJzA.js} +4 -161
- package/dist/workflow-builder.js +2 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +6 -6
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { _ as throwIfResultError, n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { gql } from "@apollo/client";
|
|
5
|
+
|
|
6
|
+
// src/modules/connections/hooks/useConnections.ts
|
|
7
|
+
/**
|
|
8
|
+
* Custom hooks for fetching connections from the integrations service.
|
|
9
|
+
*
|
|
10
|
+
* These hooks query the wspace-integrations-svc via the federated GraphQL gateway.
|
|
11
|
+
* Connections replace the legacy credentials system for third-party authentication.
|
|
12
|
+
*/
|
|
13
|
+
const PROVIDER_FIELDS = gql`
|
|
14
|
+
fragment ProviderFields on IntegrationProvider {
|
|
15
|
+
id
|
|
16
|
+
key
|
|
17
|
+
name
|
|
18
|
+
description
|
|
19
|
+
category
|
|
20
|
+
authType
|
|
21
|
+
icon
|
|
22
|
+
color
|
|
23
|
+
website
|
|
24
|
+
docsUrl
|
|
25
|
+
isBuiltIn
|
|
26
|
+
isEnabled
|
|
27
|
+
availableScopes
|
|
28
|
+
# How this provider can be authenticated, as data. The builder renders the
|
|
29
|
+
# form from this rather than from a per-provider React component, so a
|
|
30
|
+
# provider or a new method added by an administrator shows up here with no
|
|
31
|
+
# frontend change.
|
|
32
|
+
authMethods {
|
|
33
|
+
key
|
|
34
|
+
displayName
|
|
35
|
+
description
|
|
36
|
+
flow
|
|
37
|
+
authType
|
|
38
|
+
configSchema
|
|
39
|
+
availableScopes
|
|
40
|
+
defaultScopes
|
|
41
|
+
isConfigured
|
|
42
|
+
isEnabled
|
|
43
|
+
displayOrder
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
const CONNECTION_FIELDS = gql`
|
|
48
|
+
${PROVIDER_FIELDS}
|
|
49
|
+
fragment ConnectionFields on IntegrationConnection {
|
|
50
|
+
id
|
|
51
|
+
name
|
|
52
|
+
description
|
|
53
|
+
providerId
|
|
54
|
+
provider {
|
|
55
|
+
...ProviderFields
|
|
56
|
+
}
|
|
57
|
+
status
|
|
58
|
+
lastHealthCheck
|
|
59
|
+
lastUsedAt
|
|
60
|
+
errorMessage
|
|
61
|
+
externalAccountId
|
|
62
|
+
externalAccountEmail
|
|
63
|
+
externalAccountName
|
|
64
|
+
grantedScopes
|
|
65
|
+
createdBy
|
|
66
|
+
createdAt
|
|
67
|
+
updatedAt
|
|
68
|
+
visibility
|
|
69
|
+
myAccess
|
|
70
|
+
canUse
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
const GET_CONNECTIONS = gql`
|
|
74
|
+
${CONNECTION_FIELDS}
|
|
75
|
+
query GetConnections(
|
|
76
|
+
$filter: ConnectionFilterInput
|
|
77
|
+
$pagination: IntegrationsPaginationInput
|
|
78
|
+
) {
|
|
79
|
+
getConnections(filter: $filter, pagination: $pagination) {
|
|
80
|
+
items {
|
|
81
|
+
...ConnectionFields
|
|
82
|
+
}
|
|
83
|
+
total
|
|
84
|
+
hasMore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
const GET_CONNECTION = gql`
|
|
89
|
+
${CONNECTION_FIELDS}
|
|
90
|
+
query GetConnection($id: ID!) {
|
|
91
|
+
getConnection(id: $id) {
|
|
92
|
+
...ConnectionFields
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
const GET_CONNECTIONS_BY_PROVIDER = gql`
|
|
97
|
+
${CONNECTION_FIELDS}
|
|
98
|
+
query GetConnectionsByProvider(
|
|
99
|
+
$providerId: ID!
|
|
100
|
+
$pagination: IntegrationsPaginationInput
|
|
101
|
+
) {
|
|
102
|
+
getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {
|
|
103
|
+
items {
|
|
104
|
+
...ConnectionFields
|
|
105
|
+
}
|
|
106
|
+
total
|
|
107
|
+
hasMore
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
const GET_PROVIDERS = gql`
|
|
112
|
+
${PROVIDER_FIELDS}
|
|
113
|
+
query GetProviders(
|
|
114
|
+
$filter: ProviderFilterInput
|
|
115
|
+
$pagination: IntegrationsPaginationInput
|
|
116
|
+
) {
|
|
117
|
+
getProviders(filter: $filter, pagination: $pagination) {
|
|
118
|
+
items {
|
|
119
|
+
...ProviderFields
|
|
120
|
+
}
|
|
121
|
+
total
|
|
122
|
+
hasMore
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`;
|
|
126
|
+
const INITIATE_OAUTH = gql`
|
|
127
|
+
mutation InitiateOAuth($input: InitiateOAuthInput!) {
|
|
128
|
+
initiateOAuth(input: $input) {
|
|
129
|
+
redirectUrl
|
|
130
|
+
state
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
134
|
+
const CREATE_CONNECTION = gql`
|
|
135
|
+
${CONNECTION_FIELDS}
|
|
136
|
+
mutation CreateConnection($input: CreateConnectionInput!) {
|
|
137
|
+
createConnection(input: $input) {
|
|
138
|
+
...ConnectionFields
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
/** Page size the integrations service allows; it clamps larger limits to 100. */
|
|
143
|
+
const CONNECTIONS_PAGE_SIZE = 100;
|
|
144
|
+
/**
|
|
145
|
+
* Every page of a connection list. A picker that accepts any provider (the
|
|
146
|
+
* HTTP Request node) must offer every saved connection, not the first 100.
|
|
147
|
+
*
|
|
148
|
+
* Reads until the server says there is no more, the reported total is reached,
|
|
149
|
+
* or a page adds no connection it has not already returned, so a server that
|
|
150
|
+
* keeps answering `hasMore` without progressing cannot loop forever.
|
|
151
|
+
*/
|
|
152
|
+
async function fetchAllConnectionPages(fetchPage) {
|
|
153
|
+
const items = [];
|
|
154
|
+
const seen = /* @__PURE__ */ new Set();
|
|
155
|
+
let total = 0;
|
|
156
|
+
let hasMore = false;
|
|
157
|
+
for (let offset = 0;; offset += 100) {
|
|
158
|
+
const result = await fetchPage(offset);
|
|
159
|
+
const fresh = (result?.items ?? []).filter((item) => !seen.has(item.id));
|
|
160
|
+
for (const item of fresh) {
|
|
161
|
+
seen.add(item.id);
|
|
162
|
+
items.push(item);
|
|
163
|
+
}
|
|
164
|
+
total = result?.total ?? items.length;
|
|
165
|
+
hasMore = result?.hasMore ?? false;
|
|
166
|
+
if (!hasMore || fresh.length === 0 || items.length >= total) break;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
items,
|
|
170
|
+
total,
|
|
171
|
+
hasMore: hasMore && items.length < total
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Hook to fetch list of connections from the integrations service.
|
|
176
|
+
*/
|
|
177
|
+
function useConnections(filter) {
|
|
178
|
+
const [connections, setConnections] = useState([]);
|
|
179
|
+
const [total, setTotal] = useState(0);
|
|
180
|
+
const [hasMore, setHasMore] = useState(false);
|
|
181
|
+
const [loading, setLoading] = useState(true);
|
|
182
|
+
const [error, setError] = useState(null);
|
|
183
|
+
const filterKey = JSON.stringify(filter);
|
|
184
|
+
const fetchData = useCallback(async () => {
|
|
185
|
+
setLoading(true);
|
|
186
|
+
setError(null);
|
|
187
|
+
try {
|
|
188
|
+
const client = getFluidGridsClient();
|
|
189
|
+
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
190
|
+
const list = await fetchAllConnectionPages(async (offset) => {
|
|
191
|
+
return (await client.query({
|
|
192
|
+
query: GET_CONNECTIONS,
|
|
193
|
+
variables: {
|
|
194
|
+
filter: parsedFilter,
|
|
195
|
+
pagination: {
|
|
196
|
+
limit: 100,
|
|
197
|
+
offset
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
fetchPolicy: "network-only"
|
|
201
|
+
})).data?.getConnections;
|
|
202
|
+
});
|
|
203
|
+
setConnections(list.items);
|
|
204
|
+
setTotal(list.total);
|
|
205
|
+
setHasMore(list.hasMore);
|
|
206
|
+
} catch (err) {
|
|
207
|
+
setError(err);
|
|
208
|
+
} finally {
|
|
209
|
+
setLoading(false);
|
|
210
|
+
}
|
|
211
|
+
}, [filterKey]);
|
|
212
|
+
useEffect(() => {
|
|
213
|
+
fetchData();
|
|
214
|
+
}, [fetchData]);
|
|
215
|
+
return {
|
|
216
|
+
connections,
|
|
217
|
+
total,
|
|
218
|
+
hasMore,
|
|
219
|
+
loading,
|
|
220
|
+
error,
|
|
221
|
+
refetch: fetchData
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Hook to fetch a single connection by ID.
|
|
226
|
+
*/
|
|
227
|
+
function useConnection(connectionId) {
|
|
228
|
+
const [connection, setConnection] = useState(null);
|
|
229
|
+
const [loading, setLoading] = useState(true);
|
|
230
|
+
const [error, setError] = useState(null);
|
|
231
|
+
const fetchData = useCallback(async () => {
|
|
232
|
+
if (!connectionId) {
|
|
233
|
+
setLoading(false);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
setLoading(true);
|
|
237
|
+
setError(null);
|
|
238
|
+
try {
|
|
239
|
+
const result = await getFluidGridsClient().query({
|
|
240
|
+
query: GET_CONNECTION,
|
|
241
|
+
variables: { id: connectionId },
|
|
242
|
+
fetchPolicy: "cache-first"
|
|
243
|
+
});
|
|
244
|
+
setConnection(result.data?.getConnection ?? null);
|
|
245
|
+
} catch (err) {
|
|
246
|
+
setError(err);
|
|
247
|
+
} finally {
|
|
248
|
+
setLoading(false);
|
|
249
|
+
}
|
|
250
|
+
}, [connectionId]);
|
|
251
|
+
useEffect(() => {
|
|
252
|
+
fetchData();
|
|
253
|
+
}, [fetchData]);
|
|
254
|
+
return {
|
|
255
|
+
connection,
|
|
256
|
+
loading,
|
|
257
|
+
error,
|
|
258
|
+
refetch: fetchData
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Hook to fetch connections for a specific provider.
|
|
263
|
+
*/
|
|
264
|
+
function useConnectionsByProvider(providerId) {
|
|
265
|
+
const [connections, setConnections] = useState([]);
|
|
266
|
+
const [total, setTotal] = useState(0);
|
|
267
|
+
const [loading, setLoading] = useState(true);
|
|
268
|
+
const [error, setError] = useState(null);
|
|
269
|
+
const fetchData = useCallback(async () => {
|
|
270
|
+
if (!providerId) {
|
|
271
|
+
setLoading(false);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
setLoading(true);
|
|
275
|
+
setError(null);
|
|
276
|
+
try {
|
|
277
|
+
const result = await getFluidGridsClient().query({
|
|
278
|
+
query: GET_CONNECTIONS_BY_PROVIDER,
|
|
279
|
+
variables: {
|
|
280
|
+
providerId,
|
|
281
|
+
pagination: { limit: 100 }
|
|
282
|
+
},
|
|
283
|
+
fetchPolicy: "network-only"
|
|
284
|
+
});
|
|
285
|
+
setConnections(result.data?.getConnectionsByProvider?.items ?? []);
|
|
286
|
+
setTotal(result.data?.getConnectionsByProvider?.total ?? 0);
|
|
287
|
+
} catch (err) {
|
|
288
|
+
setError(err);
|
|
289
|
+
} finally {
|
|
290
|
+
setLoading(false);
|
|
291
|
+
}
|
|
292
|
+
}, [providerId]);
|
|
293
|
+
useEffect(() => {
|
|
294
|
+
fetchData();
|
|
295
|
+
}, [fetchData]);
|
|
296
|
+
return {
|
|
297
|
+
connections,
|
|
298
|
+
total,
|
|
299
|
+
loading,
|
|
300
|
+
error,
|
|
301
|
+
refetch: fetchData
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Hook to fetch available integration providers.
|
|
306
|
+
*/
|
|
307
|
+
function useProviders(filter) {
|
|
308
|
+
const [providers, setProviders] = useState([]);
|
|
309
|
+
const [total, setTotal] = useState(0);
|
|
310
|
+
const [loading, setLoading] = useState(true);
|
|
311
|
+
const [error, setError] = useState(null);
|
|
312
|
+
const filterKey = JSON.stringify(filter);
|
|
313
|
+
const fetchData = useCallback(async () => {
|
|
314
|
+
setLoading(true);
|
|
315
|
+
setError(null);
|
|
316
|
+
try {
|
|
317
|
+
const client = getFluidGridsClient();
|
|
318
|
+
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
319
|
+
const result = await client.query({
|
|
320
|
+
query: GET_PROVIDERS,
|
|
321
|
+
variables: {
|
|
322
|
+
filter: parsedFilter,
|
|
323
|
+
pagination: { limit: 100 }
|
|
324
|
+
},
|
|
325
|
+
fetchPolicy: "cache-first"
|
|
326
|
+
});
|
|
327
|
+
setProviders(result.data?.getProviders?.items ?? []);
|
|
328
|
+
setTotal(result.data?.getProviders?.total ?? 0);
|
|
329
|
+
} catch (err) {
|
|
330
|
+
setError(err);
|
|
331
|
+
} finally {
|
|
332
|
+
setLoading(false);
|
|
333
|
+
}
|
|
334
|
+
}, [filterKey]);
|
|
335
|
+
useEffect(() => {
|
|
336
|
+
fetchData();
|
|
337
|
+
}, [fetchData]);
|
|
338
|
+
return {
|
|
339
|
+
providers,
|
|
340
|
+
total,
|
|
341
|
+
loading,
|
|
342
|
+
error,
|
|
343
|
+
refetch: fetchData
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Hook to create a new connection.
|
|
348
|
+
*/
|
|
349
|
+
function useCreateConnection() {
|
|
350
|
+
const [loading, setLoading] = useState(false);
|
|
351
|
+
const [error, setError] = useState(null);
|
|
352
|
+
return {
|
|
353
|
+
createConnection: useCallback(async (input) => {
|
|
354
|
+
setLoading(true);
|
|
355
|
+
setError(null);
|
|
356
|
+
try {
|
|
357
|
+
const client = getFluidGridsClient();
|
|
358
|
+
return throwIfResultError(await client.mutate({
|
|
359
|
+
mutation: CREATE_CONNECTION,
|
|
360
|
+
variables: { input }
|
|
361
|
+
})).data?.createConnection ?? null;
|
|
362
|
+
} catch (err) {
|
|
363
|
+
setError(err);
|
|
364
|
+
return null;
|
|
365
|
+
} finally {
|
|
366
|
+
setLoading(false);
|
|
367
|
+
}
|
|
368
|
+
}, []),
|
|
369
|
+
loading,
|
|
370
|
+
error
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Hook to initiate OAuth flow for a connection.
|
|
375
|
+
*/
|
|
376
|
+
function useInitiateOAuth() {
|
|
377
|
+
const [loading, setLoading] = useState(false);
|
|
378
|
+
const [error, setError] = useState(null);
|
|
379
|
+
return {
|
|
380
|
+
initiateOAuth: useCallback(async (input) => {
|
|
381
|
+
setLoading(true);
|
|
382
|
+
setError(null);
|
|
383
|
+
try {
|
|
384
|
+
const client = getFluidGridsClient();
|
|
385
|
+
return throwIfResultError(await client.mutate({
|
|
386
|
+
mutation: INITIATE_OAUTH,
|
|
387
|
+
variables: { input }
|
|
388
|
+
})).data?.initiateOAuth ?? null;
|
|
389
|
+
} catch (err) {
|
|
390
|
+
setError(err);
|
|
391
|
+
return null;
|
|
392
|
+
} finally {
|
|
393
|
+
setLoading(false);
|
|
394
|
+
}
|
|
395
|
+
}, []),
|
|
396
|
+
loading,
|
|
397
|
+
error
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export { useInitiateOAuth as a, useCreateConnection as i, useConnections as n, useProviders as o, useConnectionsByProvider as r, useConnection as t };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { _ as throwIfResultError, m as describeOperationError, n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
3
3
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
-
import {
|
|
4
|
+
import { dt as ExportWorkflowCodeDocument } from "./graphql-operation-types-kX-MMjgW.js";
|
|
5
5
|
import { t as QuotaExhaustedDialog } from "./QuotaExhaustedDialog-7IFSaLyi.js";
|
|
6
|
-
import { CF as WorkflowExportFormat, Fd as FidelityLevel
|
|
7
|
-
import { useCallback, useEffect,
|
|
6
|
+
import { CF as WorkflowExportFormat, Fd as FidelityLevel } from "./graphql-types-CDKVWH2R.js";
|
|
7
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { ResourceShareDialog, createSharePrincipalLister } from "@burdenoff/fe-libs/connections";
|
|
10
9
|
|
|
11
10
|
// src/components/shared/CreateWorkflowRefusalDialog.tsx
|
|
12
11
|
/**
|
|
@@ -359,91 +358,6 @@ function lineOfNode(source, nodeId) {
|
|
|
359
358
|
return null;
|
|
360
359
|
}
|
|
361
360
|
|
|
362
|
-
// src/utils/workflow-sharing.ts
|
|
363
|
-
/** Whether someone reaching a workflow this way may change who it is shared with. */
|
|
364
|
-
function canShareWorkflow(access) {
|
|
365
|
-
return access === "OWNER" || access === "EDITOR" || access === "ADMINISTRATOR";
|
|
366
|
-
}
|
|
367
|
-
/** Whether someone reaching a workflow this way may change or run it. */
|
|
368
|
-
function canEditWorkflow(access) {
|
|
369
|
-
return access !== "VIEWER";
|
|
370
|
-
}
|
|
371
|
-
const VISIBILITY_OUT = {
|
|
372
|
-
WORKSPACE: "WORKSPACE",
|
|
373
|
-
RESTRICTED: "RESTRICTED"
|
|
374
|
-
};
|
|
375
|
-
const VISIBILITY_IN = {
|
|
376
|
-
["WORKSPACE"]: "WORKSPACE",
|
|
377
|
-
["RESTRICTED"]: "RESTRICTED"
|
|
378
|
-
};
|
|
379
|
-
const PRINCIPAL_OUT = {
|
|
380
|
-
USER: "USER",
|
|
381
|
-
GROUP: "GROUP",
|
|
382
|
-
PROJECT: "PROJECT"
|
|
383
|
-
};
|
|
384
|
-
const PRINCIPAL_IN = {
|
|
385
|
-
["USER"]: "USER",
|
|
386
|
-
["GROUP"]: "GROUP",
|
|
387
|
-
["PROJECT"]: "PROJECT"
|
|
388
|
-
};
|
|
389
|
-
const ROLE_OUT = {
|
|
390
|
-
VIEWER: "VIEWER",
|
|
391
|
-
EDITOR: "EDITOR"
|
|
392
|
-
};
|
|
393
|
-
const ROLE_IN = {
|
|
394
|
-
["VIEWER"]: "VIEWER",
|
|
395
|
-
["EDITOR"]: "EDITOR"
|
|
396
|
-
};
|
|
397
|
-
/** The service's answer as the dialog sees it; `name` is what the title shows. */
|
|
398
|
-
function toResourceSharing(sharing, name = sharing.workflowKey) {
|
|
399
|
-
const shares = sharing.shares.map((share) => ({
|
|
400
|
-
principalType: PRINCIPAL_IN[share.principalType],
|
|
401
|
-
principalId: share.principalId,
|
|
402
|
-
role: ROLE_IN[share.role]
|
|
403
|
-
}));
|
|
404
|
-
return {
|
|
405
|
-
id: sharing.workflowKey,
|
|
406
|
-
name,
|
|
407
|
-
ownerId: sharing.ownerId ?? "",
|
|
408
|
-
visibility: VISIBILITY_IN[sharing.visibility],
|
|
409
|
-
canManage: canShareWorkflow(sharing.myAccess),
|
|
410
|
-
administrator: sharing.canTransferOwnership,
|
|
411
|
-
shares
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
/** The workflow service behind the generic Share dialog. */
|
|
415
|
-
function workflowSharingApi(client, listPrincipals) {
|
|
416
|
-
return {
|
|
417
|
-
async getSharing(workflowKey) {
|
|
418
|
-
const result = await client.query({
|
|
419
|
-
query: WorkflowSharingDocument,
|
|
420
|
-
variables: { workflowKey },
|
|
421
|
-
fetchPolicy: "network-only"
|
|
422
|
-
});
|
|
423
|
-
if (!result.data) throw new Error("Workflow not found");
|
|
424
|
-
return toResourceSharing(result.data.workflowSharing);
|
|
425
|
-
},
|
|
426
|
-
listPrincipals,
|
|
427
|
-
async share(input) {
|
|
428
|
-
const result = await client.mutate({
|
|
429
|
-
mutation: ShareWorkflowDocument,
|
|
430
|
-
variables: { input: {
|
|
431
|
-
workflowKey: input.resourceId,
|
|
432
|
-
visibility: VISIBILITY_OUT[input.visibility],
|
|
433
|
-
shares: input.shares.map((share) => ({
|
|
434
|
-
principalType: PRINCIPAL_OUT[share.principalType],
|
|
435
|
-
principalId: share.principalId,
|
|
436
|
-
role: ROLE_OUT[share.role]
|
|
437
|
-
})),
|
|
438
|
-
...input.ownerId ? { ownerId: input.ownerId } : {}
|
|
439
|
-
} }
|
|
440
|
-
});
|
|
441
|
-
if (!result.data) throw new Error("Workflow not found");
|
|
442
|
-
return toResourceSharing(result.data.shareWorkflow);
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
|
|
447
361
|
// src/utils/workflow-transfer.ts
|
|
448
362
|
function asRecord(value) {
|
|
449
363
|
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
@@ -647,75 +561,4 @@ function useExportWorkflowAs(save = downloadBlob) {
|
|
|
647
561
|
};
|
|
648
562
|
}
|
|
649
563
|
|
|
650
|
-
|
|
651
|
-
/**
|
|
652
|
-
* WorkflowShareDialog — who can reach a workflow (BOFF-9726).
|
|
653
|
-
*
|
|
654
|
-
* The workflow version of fe-libs' ResourceShareDialog: a workflow is shared
|
|
655
|
-
* with people, groups or workspace projects as "Can view" or "Can edit", or
|
|
656
|
-
* left to the whole workspace. The workflow service decides who may change
|
|
657
|
-
* the sharing (its owner, an editor it is shared with, or a workspace admin)
|
|
658
|
-
* and answers NOT_FOUND to anyone else; this dialog only shows what the
|
|
659
|
-
* caller may do and sends the complete new sharing back.
|
|
660
|
-
*/
|
|
661
|
-
function workflowShareCopy(tr, name) {
|
|
662
|
-
return {
|
|
663
|
-
title: (loaded) => tr("fluidgrids.sharing.title", "Share {{name}}", { name: name || loaded }),
|
|
664
|
-
titleLoading: tr("fluidgrids.sharing.titleLoading", "Share workflow"),
|
|
665
|
-
loading: tr("fluidgrids.sharing.loading", "Loading sharing…"),
|
|
666
|
-
readOnly: tr("fluidgrids.sharing.readOnly", "Only the owner, editors and workspace admins can change who can open this workflow."),
|
|
667
|
-
save: tr("fluidgrids.sharing.save", "Save"),
|
|
668
|
-
cancel: tr("fluidgrids.sharing.cancel", "Cancel"),
|
|
669
|
-
close: tr("fluidgrids.sharing.close", "Close"),
|
|
670
|
-
owner: tr("fluidgrids.sharing.owner", "Owner"),
|
|
671
|
-
add: tr("fluidgrids.sharing.add", "Share with people, groups or projects"),
|
|
672
|
-
addPlaceholder: tr("fluidgrids.sharing.addPlaceholder", "Search by name or email"),
|
|
673
|
-
sharedWith: tr("fluidgrids.sharing.sharedWith", "Shared with"),
|
|
674
|
-
onlyOwner: tr("fluidgrids.sharing.onlyOwner", "No one else yet. Only the owner and workspace admins can open it."),
|
|
675
|
-
none: tr("fluidgrids.sharing.none", "No one in particular."),
|
|
676
|
-
principalType: {
|
|
677
|
-
USER: tr("fluidgrids.sharing.type.user", "Person"),
|
|
678
|
-
GROUP: tr("fluidgrids.sharing.type.group", "Group"),
|
|
679
|
-
PROJECT: tr("fluidgrids.sharing.type.project", "Project")
|
|
680
|
-
},
|
|
681
|
-
roleFor: (grantee) => tr("fluidgrids.sharing.roleFor", "Access for {{name}}", { name: grantee }),
|
|
682
|
-
remove: (grantee) => tr("fluidgrids.sharing.remove", "Stop sharing with {{name}}", { name: grantee }),
|
|
683
|
-
visibility: {
|
|
684
|
-
legend: tr("fluidgrids.sharing.visibility.label", "Who can open this workflow"),
|
|
685
|
-
restricted: tr("fluidgrids.sharing.visibility.restricted", "Only people I choose"),
|
|
686
|
-
restrictedHint: tr("fluidgrids.sharing.visibility.restrictedHint", "You, the people, groups or projects you share it with, and workspace admins. Everyone else cannot find it."),
|
|
687
|
-
workspace: tr("fluidgrids.sharing.visibility.workspace", "Everyone in this workspace"),
|
|
688
|
-
workspaceHint: tr("fluidgrids.sharing.visibility.workspaceHint", "Anyone in the workspace can open it, as their workspace role allows.")
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
function WorkflowShareDialog({ open, onClose, workflowKey, workflowName, workspaceId, client, onShared, api: apiOverride }) {
|
|
693
|
-
const tr = useTr();
|
|
694
|
-
const api = useMemo(() => {
|
|
695
|
-
if (apiOverride) return apiOverride;
|
|
696
|
-
const apollo = client ?? getFluidGridsClient();
|
|
697
|
-
return workflowSharingApi(apollo, createSharePrincipalLister(apollo));
|
|
698
|
-
}, [apiOverride, client]);
|
|
699
|
-
const copy = useMemo(() => workflowShareCopy(tr, workflowName), [tr, workflowName]);
|
|
700
|
-
const roles = useMemo(() => [{
|
|
701
|
-
value: "VIEWER",
|
|
702
|
-
label: tr("fluidgrids.sharing.role.viewer", "Can view")
|
|
703
|
-
}, {
|
|
704
|
-
value: "EDITOR",
|
|
705
|
-
label: tr("fluidgrids.sharing.role.editor", "Can edit")
|
|
706
|
-
}], [tr]);
|
|
707
|
-
return /* @__PURE__ */ jsx(ResourceShareDialog, {
|
|
708
|
-
open,
|
|
709
|
-
onClose,
|
|
710
|
-
api,
|
|
711
|
-
resourceId: workflowKey,
|
|
712
|
-
workspaceId,
|
|
713
|
-
roles,
|
|
714
|
-
copy,
|
|
715
|
-
testIdPrefix: "share-workflow",
|
|
716
|
-
translate: tr,
|
|
717
|
-
onShared: onShared ? () => onShared() : void 0
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export { readProjectArchive as C, workflowNameFromFile as D, typeScriptModuleFile as E, CreateWorkflowRefusalDialog as O, primaryImportModule as S, typeScriptImportSource as T, importFileKind as _, downloadWorkflowExport as a, lineOfNode as b, canShareWorkflow as c, MAX_IMPORT_ARCHIVE_BYTES as d, MAX_IMPORT_SOURCE_BYTES as f, importAcceptAttribute as g, fileBaseName as h, useWorkflowCodeExport as i, CODE_EXPORT_FORMATS as l, checkTypeScriptImport as m, downloadWorkflowCodeExport as n, parseWorkflowImport as o, assertImportByteSize as p, useExportWorkflowAs as r, canEditWorkflow as s, WorkflowShareDialog as t, ImportSourceError as u, isLosslessReport as v, sortFidelityItems as w, orderedExportFiles as x, isLossyFidelityItem as y };
|
|
564
|
+
export { typeScriptModuleFile as C, typeScriptImportSource as S, CreateWorkflowRefusalDialog as T, lineOfNode as _, parseWorkflowImport as a, readProjectArchive as b, MAX_IMPORT_ARCHIVE_BYTES as c, checkTypeScriptImport as d, fileBaseName as f, isLossyFidelityItem as g, isLosslessReport as h, downloadWorkflowExport as i, MAX_IMPORT_SOURCE_BYTES as l, importFileKind as m, useExportWorkflowAs as n, CODE_EXPORT_FORMATS as o, importAcceptAttribute as p, useWorkflowCodeExport as r, ImportSourceError as s, downloadWorkflowCodeExport as t, assertImportByteSize as u, orderedExportFiles as v, workflowNameFromFile as w, sortFidelityItems as x, primaryImportModule as y };
|
package/dist/workflow-builder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as WorkflowBuilderCore, t as WorkflowBuilder } from "./WorkflowBuilder-
|
|
3
|
-
import { t as WorkflowBuilder$1 } from "./WorkflowBuilder-
|
|
2
|
+
import { n as WorkflowBuilderCore, t as WorkflowBuilder } from "./WorkflowBuilder-BSPGcOfA.js";
|
|
3
|
+
import { t as WorkflowBuilder$1 } from "./WorkflowBuilder-DMonxuoY.js";
|
|
4
4
|
import { H as useFlowStore } from "./node-operation-selection--oy-yEq_.js";
|
|
5
5
|
import { m as refetchStoreNodes } from "./FluidGridsProvider-dvZSNtSW.js";
|
|
6
6
|
import { t as WorkflowSearchRedirect } from "./WorkflowSearchRedirect-DwDNZ_q5.js";
|
package/dist/workflow-pages.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { n as WorkflowsList_d_exports } from "./WorkflowsList-CcNDQge5.js";
|
|
3
3
|
import { a as WorkflowSearchRedirect_d_exports, o as WorkflowBuilder } from "./index-DjiFgEQl.js";
|
|
4
4
|
import { i as TemplatePreview_d_exports, n as TemplatesPage_d_exports } from "./TemplatesPage-BG3H-6v6.js";
|
|
5
|
-
import { Li as ApprovalInboxPage_d_exports, Qi as RunnersPage_d_exports, Sa as VariablesPage_d_exports, cAa as InsightsPageProps, dAa as DataSinkDashboardPage_d_exports, gi as DataTablesPage_d_exports, jAa as AiStudioPage_d_exports, lAa as InsightsPage_d_exports, qi as TaskQueuesPage_d_exports } from "./index-
|
|
5
|
+
import { Li as ApprovalInboxPage_d_exports, Qi as RunnersPage_d_exports, Sa as VariablesPage_d_exports, cAa as InsightsPageProps, dAa as DataSinkDashboardPage_d_exports, gi as DataTablesPage_d_exports, jAa as AiStudioPage_d_exports, lAa as InsightsPage_d_exports, qi as TaskQueuesPage_d_exports } from "./index-6JR2vD9J.js";
|
|
6
6
|
import { i as ExecutionsListPage_d_exports, n as ExecutionDetailPage_d_exports } from "./ExecutionDetailPage-DvQ667OE.js";
|
|
7
7
|
import { n as HistoryPage_d_exports } from "./HistoryPage-BLoRpJ1R.js";
|
|
8
8
|
import { n as NodesPage_d_exports } from "./NodesPage-DEbnz9iU.js";
|
package/dist/workflow-pages.js
CHANGED
|
@@ -62,17 +62,17 @@ function createWorkflowPages(importers) {
|
|
|
62
62
|
* loader, so it costs a host's first load about a kilobyte.
|
|
63
63
|
*/
|
|
64
64
|
const pages = createWorkflowPages({
|
|
65
|
-
WorkflowsList: () => import("./WorkflowsList-
|
|
66
|
-
WorkflowBuilderPage: () => import("./WorkflowBuilder-
|
|
65
|
+
WorkflowsList: () => import("./WorkflowsList-DiiGyZkT.js").then((n) => n.n),
|
|
66
|
+
WorkflowBuilderPage: () => import("./WorkflowBuilder-DMonxuoY.js").then((n) => n.n).then((m) => ({ WorkflowBuilderPage: m.WorkflowBuilder })),
|
|
67
67
|
WorkflowSearchRedirect: () => import("./WorkflowSearchRedirect-DwDNZ_q5.js").then((n) => n.n),
|
|
68
|
-
TemplatePreview: () => import("./TemplatePreview-
|
|
69
|
-
AiStudioPage: () => import("./AiStudioPage-
|
|
68
|
+
TemplatePreview: () => import("./TemplatePreview-CNrYJXw2.js").then((n) => n.n),
|
|
69
|
+
AiStudioPage: () => import("./AiStudioPage-htYcXz43.js").then((n) => n.n),
|
|
70
70
|
ExecutionsListPage: () => import("./ExecutionsListPage-BCUJoAIE.js").then((n) => n.n),
|
|
71
71
|
ExecutionDetailPage: () => import("./ExecutionDetailPage-BdcZmLT4.js").then((n) => n.n),
|
|
72
72
|
HistoryPage: () => import("./HistoryPage-U0tqupBN.js").then((n) => n.n),
|
|
73
|
-
TemplatesPage: () => import("./TemplatesPage-
|
|
73
|
+
TemplatesPage: () => import("./TemplatesPage-BU4tSqOo.js").then((n) => n.n),
|
|
74
74
|
NodesPage: () => import("./NodesPage-Bf5PhfBK.js").then((n) => n.n),
|
|
75
|
-
SettingsPage: () => import("./SettingsPage-
|
|
75
|
+
SettingsPage: () => import("./SettingsPage-CJLZvv4J.js").then((n) => n.n),
|
|
76
76
|
InsightsPage: () => import("./InsightsPage-CALo16eB.js").then((n) => n.r),
|
|
77
77
|
ErrorAnalyticsPage: () => import("./InsightsPage-CALo16eB.js").then((n) => n.r),
|
|
78
78
|
DataSinkDashboardPage: () => import("./DataSinkDashboardPage-1h2QsMzH.js").then((n) => n.n),
|
package/dist/workflows-list.js
CHANGED