@burdenoff/fluidgrids-fe-sdk 2026.1104.1 → 2026.1104.3
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/ExecutionDetailPage-ND2VMU45.js +25 -0
- package/dist/{ExecutionsListPage-3KSHXY4G.js → ExecutionsListPage-EZ65FXER.js} +9 -9
- package/dist/{TemplateDetailPanel-XJ43LW3G.js → TemplateDetailPanel-7MPY5MYT.js} +1 -1
- package/dist/{WorkflowBuilder-LG7TFPU2.js → WorkflowBuilder-4I44FWII.js} +14 -14
- package/dist/{WorkflowsList-KB23QLNI.js → WorkflowsList-YFD2RKKQ.js} +9 -9
- package/dist/{agentTools-J7A22OD5.js → agentTools-SZZN6TP3.js} +5 -5
- package/dist/{chunk-N3WDPUGC.js → chunk-4EUEKSEQ.js} +1 -1
- package/dist/{chunk-H5WEPFLT.js → chunk-4YCMMBSK.js} +2 -2
- package/dist/{chunk-ZUVFD5KV.js → chunk-5375NUIO.js} +2 -0
- package/dist/{chunk-L2MUO3VU.js → chunk-5D4XS3WJ.js} +2 -2
- package/dist/{chunk-BOTM2YQG.js → chunk-5UHAB75U.js} +1 -1
- package/dist/{chunk-WWR7ZCS5.js → chunk-AAIZ6S6E.js} +2 -2
- package/dist/{chunk-4YB6BMV3.js → chunk-AFX3EKFN.js} +2 -2
- package/dist/{chunk-H3RSOHD5.js → chunk-AVHBWJRY.js} +4 -2
- package/dist/{chunk-VB4STO5K.js → chunk-BIB7IH26.js} +4 -4
- package/dist/{chunk-LQ7KYFAK.js → chunk-D4WA2M2N.js} +2 -2
- package/dist/{chunk-IO2MKIEI.js → chunk-DFIX6YWP.js} +59 -16
- package/dist/{chunk-7GI3457S.js → chunk-F7LQL43U.js} +1 -1
- package/dist/{chunk-D46ZR6XI.js → chunk-GEY7RXRZ.js} +5 -5
- package/dist/{chunk-AOLY5INN.js → chunk-H4ERTSMX.js} +31 -1
- package/dist/{chunk-3HM6SO5A.js → chunk-IK7IGG6T.js} +6 -6
- package/dist/{chunk-YGGPLCJD.js → chunk-KHXRYQYP.js} +2 -2
- package/dist/{chunk-WFDNMJBW.js → chunk-MF7JLSJX.js} +1 -1
- package/dist/{chunk-D7DZB3MU.js → chunk-NGXJHYV5.js} +1 -1
- package/dist/{chunk-PR6QP4R7.js → chunk-NIY6R42C.js} +4 -4
- package/dist/{chunk-B5L7VBDH.js → chunk-NJRCAE6K.js} +4 -4
- package/dist/{chunk-64WNLW7J.js → chunk-NYBL5WHP.js} +2 -2
- package/dist/{chunk-626EGC24.js → chunk-OMB3WMDQ.js} +6 -6
- package/dist/{chunk-PN2XVTLA.js → chunk-ON7LK6QH.js} +5 -5
- package/dist/{chunk-7S6M2BYB.js → chunk-Q72EOY4T.js} +3 -3
- package/dist/{chunk-QH5KODNH.js → chunk-SS7Y66P5.js} +2 -2
- package/dist/{chunk-FSU6LYGU.js → chunk-TBHAZK52.js} +1 -1
- package/dist/{chunk-4C6XRZK6.js → chunk-VDJFTZ2H.js} +1 -1
- package/dist/{chunk-PXVHPGUB.js → chunk-WTV6SQYK.js} +11 -11
- package/dist/{chunk-MJGB6XAP.js → chunk-X6PIU7FE.js} +201 -5
- package/dist/{chunk-QA7O5PUG.js → chunk-XCSCD3IU.js} +261 -217
- package/dist/{chunk-BJ5H5QV4.js → chunk-XNU2PLJ2.js} +4 -4
- package/dist/{chunk-JFG2XCJR.js → chunk-YYVRBROH.js} +1 -1
- package/dist/{chunk-OXDRU5GT.js → chunk-ZDCJPQ5M.js} +1 -1
- package/dist/executions.js +14 -14
- package/dist/history.js +6 -6
- package/dist/index.d.ts +152 -1
- package/dist/index.js +46 -46
- package/dist/{node-detail-view-NWY5PDKY.js → node-detail-view-GAGSLHAO.js} +10 -10
- package/dist/nodes.js +2 -2
- package/dist/observability.js +7 -7
- package/dist/{quick-config-panel-SCNELONP.js → quick-config-panel-44RBX6YR.js} +7 -7
- package/dist/settings.js +7 -7
- package/dist/templates.js +13 -13
- package/dist/workflow-builder.js +15 -15
- package/dist/workflows-list.js +9 -9
- package/package.json +4 -4
- package/dist/ExecutionDetailPage-WNDMCMME.js +0 -25
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { describeOperationError, useFluidGridsAnalytics, emitWorkflowLimitHit, emitUpgradeClicked, WORKFLOWS_QUOTA_NAME, throwIfResultError } from './chunk-
|
|
2
|
-
import { ExportWorkflowCodeDocument } from './chunk-
|
|
1
|
+
import { describeOperationError, useFluidGridsAnalytics, emitWorkflowLimitHit, emitUpgradeClicked, WORKFLOWS_QUOTA_NAME, throwIfResultError } from './chunk-AAIZ6S6E.js';
|
|
2
|
+
import { ExportWorkflowCodeDocument, ShareWorkflowDocument, WorkflowSharingDocument } from './chunk-AVHBWJRY.js';
|
|
3
3
|
import { useTr } from './chunk-UULVIT25.js';
|
|
4
4
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
5
|
-
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
6
|
+
import { createSharePrincipalLister, ResourceShareDialog } from '@burdenoff/fe-libs/connections';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
import { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '@burdenoff/fe-libs/ui';
|
|
8
9
|
|
|
9
10
|
// src/utils/workflow-transfer.ts
|
|
10
11
|
function asRecord(value) {
|
|
@@ -429,6 +430,201 @@ function useExportWorkflowAs(save = downloadBlob) {
|
|
|
429
430
|
);
|
|
430
431
|
return { exportAs, exporting };
|
|
431
432
|
}
|
|
433
|
+
|
|
434
|
+
// src/utils/workflow-sharing.ts
|
|
435
|
+
function canShareWorkflow(access) {
|
|
436
|
+
return access === "OWNER" /* Owner */ || access === "EDITOR" /* Editor */ || access === "ADMINISTRATOR" /* Administrator */;
|
|
437
|
+
}
|
|
438
|
+
function canEditWorkflow(access) {
|
|
439
|
+
return access !== "VIEWER" /* Viewer */;
|
|
440
|
+
}
|
|
441
|
+
var VISIBILITY_OUT = {
|
|
442
|
+
WORKSPACE: "WORKSPACE" /* Workspace */,
|
|
443
|
+
RESTRICTED: "RESTRICTED" /* Restricted */
|
|
444
|
+
};
|
|
445
|
+
var VISIBILITY_IN = {
|
|
446
|
+
["WORKSPACE" /* Workspace */]: "WORKSPACE",
|
|
447
|
+
["RESTRICTED" /* Restricted */]: "RESTRICTED"
|
|
448
|
+
};
|
|
449
|
+
var PRINCIPAL_OUT = {
|
|
450
|
+
USER: "USER" /* User */,
|
|
451
|
+
GROUP: "GROUP" /* Group */,
|
|
452
|
+
PROJECT: "PROJECT" /* Project */
|
|
453
|
+
};
|
|
454
|
+
var PRINCIPAL_IN = {
|
|
455
|
+
["USER" /* User */]: "USER",
|
|
456
|
+
["GROUP" /* Group */]: "GROUP",
|
|
457
|
+
["PROJECT" /* Project */]: "PROJECT"
|
|
458
|
+
};
|
|
459
|
+
var ROLE_OUT = {
|
|
460
|
+
VIEWER: "VIEWER" /* Viewer */,
|
|
461
|
+
EDITOR: "EDITOR" /* Editor */
|
|
462
|
+
};
|
|
463
|
+
var ROLE_IN = {
|
|
464
|
+
["VIEWER" /* Viewer */]: "VIEWER",
|
|
465
|
+
["EDITOR" /* Editor */]: "EDITOR"
|
|
466
|
+
};
|
|
467
|
+
function toResourceSharing(sharing, name = sharing.workflowKey) {
|
|
468
|
+
const shares = sharing.shares.map(
|
|
469
|
+
(share) => ({
|
|
470
|
+
principalType: PRINCIPAL_IN[share.principalType],
|
|
471
|
+
principalId: share.principalId,
|
|
472
|
+
role: ROLE_IN[share.role]
|
|
473
|
+
})
|
|
474
|
+
);
|
|
475
|
+
return {
|
|
476
|
+
id: sharing.workflowKey,
|
|
477
|
+
name,
|
|
478
|
+
ownerId: sharing.ownerId ?? "",
|
|
479
|
+
visibility: VISIBILITY_IN[sharing.visibility],
|
|
480
|
+
canManage: canShareWorkflow(sharing.myAccess),
|
|
481
|
+
administrator: sharing.canTransferOwnership,
|
|
482
|
+
shares
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function workflowSharingApi(client, listPrincipals) {
|
|
486
|
+
return {
|
|
487
|
+
async getSharing(workflowKey) {
|
|
488
|
+
const result = await client.query({
|
|
489
|
+
query: WorkflowSharingDocument,
|
|
490
|
+
variables: { workflowKey },
|
|
491
|
+
fetchPolicy: "network-only"
|
|
492
|
+
});
|
|
493
|
+
if (!result.data) throw new Error("Workflow not found");
|
|
494
|
+
return toResourceSharing(result.data.workflowSharing);
|
|
495
|
+
},
|
|
496
|
+
listPrincipals,
|
|
497
|
+
async share(input) {
|
|
498
|
+
const result = await client.mutate({
|
|
499
|
+
mutation: ShareWorkflowDocument,
|
|
500
|
+
variables: {
|
|
501
|
+
input: {
|
|
502
|
+
workflowKey: input.resourceId,
|
|
503
|
+
visibility: VISIBILITY_OUT[input.visibility],
|
|
504
|
+
shares: input.shares.map((share) => ({
|
|
505
|
+
principalType: PRINCIPAL_OUT[share.principalType],
|
|
506
|
+
principalId: share.principalId,
|
|
507
|
+
role: ROLE_OUT[share.role]
|
|
508
|
+
})),
|
|
509
|
+
...input.ownerId ? { ownerId: input.ownerId } : {}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
if (!result.data) throw new Error("Workflow not found");
|
|
514
|
+
return toResourceSharing(result.data.shareWorkflow);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
function workflowShareCopy(tr, name) {
|
|
519
|
+
return {
|
|
520
|
+
title: (loaded) => tr("fluidgrids.sharing.title", "Share {{name}}", {
|
|
521
|
+
name: name || loaded
|
|
522
|
+
}),
|
|
523
|
+
titleLoading: tr("fluidgrids.sharing.titleLoading", "Share workflow"),
|
|
524
|
+
loading: tr("fluidgrids.sharing.loading", "Loading sharing\u2026"),
|
|
525
|
+
readOnly: tr(
|
|
526
|
+
"fluidgrids.sharing.readOnly",
|
|
527
|
+
"Only the owner, editors and workspace admins can change who can open this workflow."
|
|
528
|
+
),
|
|
529
|
+
save: tr("fluidgrids.sharing.save", "Save"),
|
|
530
|
+
cancel: tr("fluidgrids.sharing.cancel", "Cancel"),
|
|
531
|
+
close: tr("fluidgrids.sharing.close", "Close"),
|
|
532
|
+
owner: tr("fluidgrids.sharing.owner", "Owner"),
|
|
533
|
+
add: tr("fluidgrids.sharing.add", "Share with people, groups or projects"),
|
|
534
|
+
addPlaceholder: tr(
|
|
535
|
+
"fluidgrids.sharing.addPlaceholder",
|
|
536
|
+
"Search by name or email"
|
|
537
|
+
),
|
|
538
|
+
sharedWith: tr("fluidgrids.sharing.sharedWith", "Shared with"),
|
|
539
|
+
onlyOwner: tr(
|
|
540
|
+
"fluidgrids.sharing.onlyOwner",
|
|
541
|
+
"No one else yet. Only the owner and workspace admins can open it."
|
|
542
|
+
),
|
|
543
|
+
none: tr("fluidgrids.sharing.none", "No one in particular."),
|
|
544
|
+
principalType: {
|
|
545
|
+
USER: tr("fluidgrids.sharing.type.user", "Person"),
|
|
546
|
+
GROUP: tr("fluidgrids.sharing.type.group", "Group"),
|
|
547
|
+
PROJECT: tr("fluidgrids.sharing.type.project", "Project")
|
|
548
|
+
},
|
|
549
|
+
roleFor: (grantee) => tr("fluidgrids.sharing.roleFor", "Access for {{name}}", {
|
|
550
|
+
name: grantee
|
|
551
|
+
}),
|
|
552
|
+
remove: (grantee) => tr("fluidgrids.sharing.remove", "Stop sharing with {{name}}", {
|
|
553
|
+
name: grantee
|
|
554
|
+
}),
|
|
555
|
+
visibility: {
|
|
556
|
+
legend: tr(
|
|
557
|
+
"fluidgrids.sharing.visibility.label",
|
|
558
|
+
"Who can open this workflow"
|
|
559
|
+
),
|
|
560
|
+
restricted: tr(
|
|
561
|
+
"fluidgrids.sharing.visibility.restricted",
|
|
562
|
+
"Only people I choose"
|
|
563
|
+
),
|
|
564
|
+
restrictedHint: tr(
|
|
565
|
+
"fluidgrids.sharing.visibility.restrictedHint",
|
|
566
|
+
"You, the people, groups or projects you share it with, and workspace admins. Everyone else cannot find it."
|
|
567
|
+
),
|
|
568
|
+
workspace: tr(
|
|
569
|
+
"fluidgrids.sharing.visibility.workspace",
|
|
570
|
+
"Everyone in this workspace"
|
|
571
|
+
),
|
|
572
|
+
workspaceHint: tr(
|
|
573
|
+
"fluidgrids.sharing.visibility.workspaceHint",
|
|
574
|
+
"Anyone in the workspace can open it, as their workspace role allows."
|
|
575
|
+
)
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
function WorkflowShareDialog({
|
|
580
|
+
open,
|
|
581
|
+
onClose,
|
|
582
|
+
workflowKey,
|
|
583
|
+
workflowName,
|
|
584
|
+
workspaceId,
|
|
585
|
+
client,
|
|
586
|
+
onShared,
|
|
587
|
+
api: apiOverride
|
|
588
|
+
}) {
|
|
589
|
+
const tr = useTr();
|
|
590
|
+
const api = useMemo(() => {
|
|
591
|
+
if (apiOverride) return apiOverride;
|
|
592
|
+
const apollo = client ?? getFluidGridsClient();
|
|
593
|
+
return workflowSharingApi(apollo, createSharePrincipalLister(apollo));
|
|
594
|
+
}, [apiOverride, client]);
|
|
595
|
+
const copy = useMemo(
|
|
596
|
+
() => workflowShareCopy(tr, workflowName),
|
|
597
|
+
[tr, workflowName]
|
|
598
|
+
);
|
|
599
|
+
const roles = useMemo(
|
|
600
|
+
() => [
|
|
601
|
+
{
|
|
602
|
+
value: "VIEWER",
|
|
603
|
+
label: tr("fluidgrids.sharing.role.viewer", "Can view")
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
value: "EDITOR",
|
|
607
|
+
label: tr("fluidgrids.sharing.role.editor", "Can edit")
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
[tr]
|
|
611
|
+
);
|
|
612
|
+
return /* @__PURE__ */ jsx(
|
|
613
|
+
ResourceShareDialog,
|
|
614
|
+
{
|
|
615
|
+
open,
|
|
616
|
+
onClose,
|
|
617
|
+
api,
|
|
618
|
+
resourceId: workflowKey,
|
|
619
|
+
workspaceId,
|
|
620
|
+
roles,
|
|
621
|
+
copy,
|
|
622
|
+
testIdPrefix: "share-workflow",
|
|
623
|
+
translate: tr,
|
|
624
|
+
onShared: onShared ? () => onShared() : void 0
|
|
625
|
+
}
|
|
626
|
+
);
|
|
627
|
+
}
|
|
432
628
|
function QuotaExhaustedDialog({
|
|
433
629
|
open,
|
|
434
630
|
onOpenChange,
|
|
@@ -481,4 +677,4 @@ function QuotaExhaustedDialog({
|
|
|
481
677
|
] }) });
|
|
482
678
|
}
|
|
483
679
|
|
|
484
|
-
export { CODE_EXPORT_FORMATS, ImportSourceError, MAX_IMPORT_ARCHIVE_BYTES, MAX_IMPORT_SOURCE_BYTES, QuotaExhaustedDialog, assertImportByteSize, checkTypeScriptImport, downloadWorkflowCodeExport, downloadWorkflowExport, fileBaseName, importAcceptAttribute, importFileKind, isLosslessReport, isLossyFidelityItem, lineOfNode, orderedExportFiles, parseWorkflowImport, primaryImportModule, readProjectArchive, sortFidelityItems, typeScriptImportSource, typeScriptModuleFile, useExportWorkflowAs, useWorkflowCodeExport, workflowNameFromFile };
|
|
680
|
+
export { CODE_EXPORT_FORMATS, ImportSourceError, MAX_IMPORT_ARCHIVE_BYTES, MAX_IMPORT_SOURCE_BYTES, QuotaExhaustedDialog, WorkflowShareDialog, assertImportByteSize, canEditWorkflow, canShareWorkflow, checkTypeScriptImport, downloadWorkflowCodeExport, downloadWorkflowExport, fileBaseName, importAcceptAttribute, importFileKind, isLosslessReport, isLossyFidelityItem, lineOfNode, orderedExportFiles, parseWorkflowImport, primaryImportModule, readProjectArchive, sortFidelityItems, typeScriptImportSource, typeScriptModuleFile, useExportWorkflowAs, useWorkflowCodeExport, workflowNameFromFile };
|