@burdenoff/fluidgrids-fe-sdk 2026.1103.2 → 2026.1104.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.
Files changed (53) hide show
  1. package/dist/ExecutionDetailPage-ND2VMU45.js +25 -0
  2. package/dist/{ExecutionsListPage-RC342VCZ.js → ExecutionsListPage-EZ65FXER.js} +9 -9
  3. package/dist/{TemplateDetailPanel-XJ43LW3G.js → TemplateDetailPanel-7MPY5MYT.js} +1 -1
  4. package/dist/{WorkflowBuilder-TCS4JELN.js → WorkflowBuilder-4I44FWII.js} +14 -14
  5. package/dist/{WorkflowsList-6ES2EDGZ.js → WorkflowsList-YFD2RKKQ.js} +9 -9
  6. package/dist/{agentTools-4JT66UQB.js → agentTools-SZZN6TP3.js} +5 -5
  7. package/dist/{chunk-EKB3EIIC.js → chunk-4EUEKSEQ.js} +1 -1
  8. package/dist/{chunk-Y7MQ3LYB.js → chunk-4YCMMBSK.js} +2 -2
  9. package/dist/{chunk-ZUVFD5KV.js → chunk-5375NUIO.js} +2 -0
  10. package/dist/{chunk-6WPW42TX.js → chunk-5D4XS3WJ.js} +2 -2
  11. package/dist/{chunk-742OIXMP.js → chunk-5UHAB75U.js} +1 -1
  12. package/dist/{chunk-YC76QFWZ.js → chunk-AAIZ6S6E.js} +2 -2
  13. package/dist/{chunk-QXACKASD.js → chunk-AFX3EKFN.js} +22 -3
  14. package/dist/{chunk-JTQFBZTV.js → chunk-AVHBWJRY.js} +6 -3
  15. package/dist/{chunk-OBWB73Y7.js → chunk-BIB7IH26.js} +4 -4
  16. package/dist/{chunk-G2FPOWN5.js → chunk-D4WA2M2N.js} +2 -2
  17. package/dist/{chunk-LTINUSLK.js → chunk-DFIX6YWP.js} +59 -16
  18. package/dist/{chunk-PC3CICOW.js → chunk-F7LQL43U.js} +1 -1
  19. package/dist/{chunk-SHYDX2LO.js → chunk-GEY7RXRZ.js} +5 -5
  20. package/dist/{chunk-AOLY5INN.js → chunk-H4ERTSMX.js} +31 -1
  21. package/dist/{chunk-Y7BNGLRI.js → chunk-IK7IGG6T.js} +6 -6
  22. package/dist/{chunk-N6XYVO7N.js → chunk-KHXRYQYP.js} +2 -2
  23. package/dist/{chunk-UH7JKPUF.js → chunk-MF7JLSJX.js} +1 -1
  24. package/dist/{chunk-BVCMAGLJ.js → chunk-NGXJHYV5.js} +1 -1
  25. package/dist/{chunk-UW5GY6LQ.js → chunk-NIY6R42C.js} +4 -4
  26. package/dist/{chunk-BP6YPKNK.js → chunk-NJRCAE6K.js} +4 -4
  27. package/dist/{chunk-LVTOWRAM.js → chunk-NYBL5WHP.js} +2 -2
  28. package/dist/{chunk-UMULDJCK.js → chunk-OMB3WMDQ.js} +6 -6
  29. package/dist/{chunk-M23H4LSY.js → chunk-ON7LK6QH.js} +5 -5
  30. package/dist/{chunk-MY4HMUWU.js → chunk-Q72EOY4T.js} +3 -3
  31. package/dist/{chunk-H2KIJEYM.js → chunk-SS7Y66P5.js} +2 -2
  32. package/dist/{chunk-52OIBKPO.js → chunk-TBHAZK52.js} +1 -1
  33. package/dist/{chunk-VQZEGCRF.js → chunk-VDJFTZ2H.js} +1 -1
  34. package/dist/{chunk-RFOKJE3A.js → chunk-WTV6SQYK.js} +11 -11
  35. package/dist/{chunk-SIVS3XSV.js → chunk-X6PIU7FE.js} +224 -5
  36. package/dist/{chunk-ILPQAQB5.js → chunk-XCSCD3IU.js} +465 -219
  37. package/dist/{chunk-K6HD5GC7.js → chunk-XNU2PLJ2.js} +4 -4
  38. package/dist/{chunk-SUIH376K.js → chunk-YYVRBROH.js} +1 -1
  39. package/dist/{chunk-VFLHURFM.js → chunk-ZDCJPQ5M.js} +1 -1
  40. package/dist/executions.js +14 -14
  41. package/dist/history.js +6 -6
  42. package/dist/index.d.ts +408 -1
  43. package/dist/index.js +46 -46
  44. package/dist/{node-detail-view-CMQ7DUYM.js → node-detail-view-GAGSLHAO.js} +10 -10
  45. package/dist/nodes.js +2 -2
  46. package/dist/observability.js +7 -7
  47. package/dist/{quick-config-panel-NJ72QZPM.js → quick-config-panel-44RBX6YR.js} +7 -7
  48. package/dist/settings.js +7 -7
  49. package/dist/templates.js +13 -13
  50. package/dist/workflow-builder.js +15 -15
  51. package/dist/workflows-list.js +9 -9
  52. package/package.json +4 -4
  53. package/dist/ExecutionDetailPage-JRBUIU5J.js +0 -25
@@ -1,16 +1,16 @@
1
- import { useDurableRunFields, useRunHistory, useDeterminismStatus, useRunStackTrace, RunHistoryView, SignalRunDialog, terminateDurableRun } from './chunk-G2FPOWN5.js';
2
- import { useDurableParityRunFields, useRunMetadata, useRunPending, ExecutionStatusBadge, NodeTimeline, RunLogViewer, setRunVersioningOverride } from './chunk-K6HD5GC7.js';
3
- import { useExecution, useExecutionActions, useAutoRefresh, runChainLinks, shortRunId, callbackTone, parseMetadataDefinition, overrideRequestOf } from './chunk-6WPW42TX.js';
4
- import { fetchRunFailureClusters, OPEN_STATUSES, dismissRunFailureCluster, BUCKET_LABELS } from './chunk-H2KIJEYM.js';
5
- import { useRunPolicyDecisions, RunPolicyDecisions } from './chunk-BVCMAGLJ.js';
6
- import { EntityTagPicker, canSaveRunAsTestCase, useWorkflowProposal, WorkflowProposalCard, MAX_CASE_NAME, saveRunAsTestCase } from './chunk-OBWB73Y7.js';
7
- import { buildNodeDisplayMap, formatRunVersion } from './chunk-PC3CICOW.js';
1
+ import { useDurableRunFields, useRunHistory, useDeterminismStatus, useRunStackTrace, RunHistoryView, SignalRunDialog, terminateDurableRun } from './chunk-D4WA2M2N.js';
2
+ import { useDurableParityRunFields, useRunMetadata, useRunPending, ExecutionStatusBadge, NodeTimeline, RunLogViewer, setRunVersioningOverride } from './chunk-XNU2PLJ2.js';
3
+ import { useExecution, useExecutionActions, useAutoRefresh, runChainLinks, shortRunId, callbackTone, parseMetadataDefinition, overrideRequestOf } from './chunk-5D4XS3WJ.js';
4
+ import { fetchRunFailureClusters, OPEN_STATUSES, dismissRunFailureCluster, BUCKET_LABELS } from './chunk-SS7Y66P5.js';
5
+ import { useRunPolicyDecisions, RunPolicyDecisions } from './chunk-NGXJHYV5.js';
6
+ import { EntityTagPicker, canSaveRunAsTestCase, useWorkflowProposal, WorkflowProposalCard, MAX_CASE_NAME, saveRunAsTestCase } from './chunk-BIB7IH26.js';
7
+ import { buildNodeDisplayMap, formatRunVersion } from './chunk-F7LQL43U.js';
8
8
  import { AiCreditBalanceSlot } from './chunk-Y53CVZVV.js';
9
- import { useWorkflowVersions } from './chunk-QXACKASD.js';
10
- import { throwIfResultError, useDurableFunctionNodesEnabled, useDurableParityEnabled, runSignalTargets, canSignalRun, useWorkflowTestsEnabled, describeOperationError } from './chunk-YC76QFWZ.js';
11
- import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton } from './chunk-ZUVFD5KV.js';
9
+ import { useWorkflowVersions } from './chunk-AFX3EKFN.js';
10
+ import { throwIfResultError, useDurableFunctionNodesEnabled, useDurableParityEnabled, runSignalTargets, canSignalRun, useWorkflowTestsEnabled, describeOperationError } from './chunk-AAIZ6S6E.js';
11
+ import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton } from './chunk-5375NUIO.js';
12
12
  import { getFluidGridsConfig } from './chunk-6AMNEX2Y.js';
13
- import { RunLogsDocument, RunLogAppendedDocument, ExplainRunDocument } from './chunk-JTQFBZTV.js';
13
+ import { RunLogsDocument, RunLogAppendedDocument, ExplainRunDocument } from './chunk-AVHBWJRY.js';
14
14
  import { useTr } from './chunk-UULVIT25.js';
15
15
  import { getFluidGridsClient, getFluidGridsClientSafe } from './chunk-NTWG3CJX.js';
16
16
  import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
@@ -1,10 +1,11 @@
1
- import { describeOperationError, useFluidGridsAnalytics, emitWorkflowLimitHit, emitUpgradeClicked, WORKFLOWS_QUOTA_NAME, throwIfResultError } from './chunk-YC76QFWZ.js';
2
- import { ExportWorkflowCodeDocument } from './chunk-JTQFBZTV.js';
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 { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '@burdenoff/fe-libs/ui';
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) {
@@ -70,13 +71,36 @@ function downloadWorkflowExport(workflow) {
70
71
  blob
71
72
  );
72
73
  }
74
+ function isN8nNodeType(type) {
75
+ return typeof type === "string" && (type.startsWith("n8n-nodes-") || type.startsWith("@n8n/"));
76
+ }
77
+ function isN8nWorkflowJson(value) {
78
+ const root = asRecord(value);
79
+ if (!root || !Array.isArray(root.nodes) || root.nodes.length === 0)
80
+ return false;
81
+ if (root.connections !== void 0 && !asRecord(root.connections))
82
+ return false;
83
+ const nodes = root.nodes.map(asRecord);
84
+ return nodes.every(
85
+ (node) => node !== null && typeof node.name === "string" && typeof node.type === "string" && node.type.length > 0
86
+ ) && nodes.some((node) => isN8nNodeType(node?.type));
87
+ }
73
88
  function parseWorkflowImport(raw) {
74
89
  const parsed = JSON.parse(raw);
75
90
  const root = asRecord(parsed);
76
91
  if (!root) throw new Error("Import must contain a JSON object");
92
+ if (isN8nWorkflowJson(root)) {
93
+ return {
94
+ source: "n8n",
95
+ definitionJson: root,
96
+ name: typeof root.name === "string" && root.name.trim() ? root.name.trim() : "Imported n8n workflow",
97
+ nodeReferences: []
98
+ };
99
+ }
77
100
  const definitionJson = asRecord(root.definitionJson) ?? root;
78
101
  const name = typeof root.name === "string" && root.name.trim() ? root.name : "Imported workflow";
79
102
  return {
103
+ source: "fluidgrids",
80
104
  definitionJson,
81
105
  name,
82
106
  workflowKey: typeof root.workflowKey === "string" ? root.workflowKey : void 0,
@@ -406,6 +430,201 @@ function useExportWorkflowAs(save = downloadBlob) {
406
430
  );
407
431
  return { exportAs, exporting };
408
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
+ }
409
628
  function QuotaExhaustedDialog({
410
629
  open,
411
630
  onOpenChange,
@@ -458,4 +677,4 @@ function QuotaExhaustedDialog({
458
677
  ] }) });
459
678
  }
460
679
 
461
- 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 };