@burdenoff/fluidgrids-fe-sdk 2026.930.2 → 2026.930.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.
Files changed (44) hide show
  1. package/dist/{ExecutionDetailPage-RK3KJ46E.js → ExecutionDetailPage-TDE7OEEM.js} +4 -4
  2. package/dist/{ExecutionDetailPage-RK3KJ46E.js.map → ExecutionDetailPage-TDE7OEEM.js.map} +1 -1
  3. package/dist/{ExecutionsListPage-NXINADRN.js → ExecutionsListPage-CJGHZKBU.js} +4 -4
  4. package/dist/{ExecutionsListPage-NXINADRN.js.map → ExecutionsListPage-CJGHZKBU.js.map} +1 -1
  5. package/dist/{WorkflowBuilder-EXHCYJFW.js → WorkflowBuilder-AG3FKWVF.js} +5 -5
  6. package/dist/{WorkflowBuilder-EXHCYJFW.js.map → WorkflowBuilder-AG3FKWVF.js.map} +1 -1
  7. package/dist/{WorkflowsList-AFTTUUHX.js → WorkflowsList-BLTHWPFH.js} +4 -4
  8. package/dist/{WorkflowsList-AFTTUUHX.js.map → WorkflowsList-BLTHWPFH.js.map} +1 -1
  9. package/dist/{chunk-IJSJOTIZ.js → chunk-2GG7H3TG.js} +3 -3
  10. package/dist/{chunk-IJSJOTIZ.js.map → chunk-2GG7H3TG.js.map} +1 -1
  11. package/dist/{chunk-USFSPC6S.js → chunk-37BHUNJW.js} +2 -2
  12. package/dist/chunk-37BHUNJW.js.map +1 -0
  13. package/dist/{chunk-NTJTPYCD.js → chunk-3B5YEXSW.js} +3 -7
  14. package/dist/chunk-3B5YEXSW.js.map +1 -0
  15. package/dist/{chunk-R5ZYOIZG.js → chunk-BNSM27CU.js} +3 -3
  16. package/dist/{chunk-R5ZYOIZG.js.map → chunk-BNSM27CU.js.map} +1 -1
  17. package/dist/{chunk-2FUWCGY6.js → chunk-HDNAP62F.js} +43 -6
  18. package/dist/chunk-HDNAP62F.js.map +1 -0
  19. package/dist/{chunk-NHZQE7ZB.js → chunk-JYBARIVZ.js} +3 -3
  20. package/dist/{chunk-NHZQE7ZB.js.map → chunk-JYBARIVZ.js.map} +1 -1
  21. package/dist/{chunk-N7D4IAYM.js → chunk-KMMWQTDC.js} +4 -4
  22. package/dist/{chunk-N7D4IAYM.js.map → chunk-KMMWQTDC.js.map} +1 -1
  23. package/dist/{chunk-C4YEGUY2.js → chunk-OYQRLWHB.js} +3 -3
  24. package/dist/{chunk-C4YEGUY2.js.map → chunk-OYQRLWHB.js.map} +1 -1
  25. package/dist/{chunk-GBXVY4MJ.js → chunk-PVK74X2D.js} +113 -25
  26. package/dist/chunk-PVK74X2D.js.map +1 -0
  27. package/dist/{chunk-7SX5OWZR.js → chunk-QOZASRIB.js} +20 -3
  28. package/dist/chunk-QOZASRIB.js.map +1 -0
  29. package/dist/executions.js +3 -3
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +16 -16
  32. package/dist/index.js.map +1 -1
  33. package/dist/settings.js +2 -2
  34. package/dist/templates.js +3 -3
  35. package/dist/{workflow-builder-DqInt43T.d.ts → workflow-builder-CpdCzzst.d.ts} +2 -0
  36. package/dist/workflow-builder.d.ts +1 -1
  37. package/dist/workflow-builder.js +4 -4
  38. package/dist/workflows-list.js +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-2FUWCGY6.js.map +0 -1
  41. package/dist/chunk-7SX5OWZR.js.map +0 -1
  42. package/dist/chunk-GBXVY4MJ.js.map +0 -1
  43. package/dist/chunk-NTJTPYCD.js.map +0 -1
  44. package/dist/chunk-USFSPC6S.js.map +0 -1
@@ -9,7 +9,7 @@ import { SdkPermissionGate, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton } from '
9
9
  import { cn as cn$1 } from './chunk-3ZYUGTIT.js';
10
10
  import { useWorkflowVersions, useRestoreWorkflowVersion, useActivateWorkflow, useDeleteWorkflow, useLazyWorkflowDefinition, useDeactivateWorkflow } from './chunk-GKSXZFDY.js';
11
11
  import { config, getFluidGridsConfig, validateTrustedOrigin, setFluidGridsConfig, resetFluidGridsConfig } from './chunk-U4AJLVHA.js';
12
- import { useFlowStore } from './chunk-NTJTPYCD.js';
12
+ import { useFlowStore } from './chunk-3B5YEXSW.js';
13
13
  import { NodeEndpointConfigsDocument, NodeManifestDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, ExecuteStepDocument, TriggerWorkflowDocument, RunFromNodeDocument, ExecutionDetailDocument, WorkflowRunDocument, FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, NodeSchemaIntrospectionDocument, useWorkflowPinnedDataQuery, usePinNodeDataMutation, useUnpinNodeDataMutation, useRunFromNodeEligibilityQuery, EventRegistrationsDocument, NodeUsageStatusDocument, RemoveNodeFromWorkflowsDocument } from './chunk-3P4YQ7DO.js';
14
14
  import { throwIfResultError, describeOperationError } from './chunk-LMO5ASOE.js';
15
15
  import { useTr, FluidGridsTranslationProvider, ENGLISH_FALLBACK_TRANSLATOR } from './chunk-7YWBH2A5.js';
@@ -3694,6 +3694,7 @@ function useNodeExecution() {
3694
3694
  const pollTimerRef = useRef(null);
3695
3695
  const pollStartRef = useRef(0);
3696
3696
  const activeRunIdRef = useRef(null);
3697
+ const loadRequestRef = useRef(0);
3697
3698
  const workflow = useFlowStore((s) => s.workflow);
3698
3699
  const startExecution = useFlowStore(
3699
3700
  (s) => s.actions.execution.startExecution
@@ -3714,6 +3715,7 @@ function useNodeExecution() {
3714
3715
  const clearLogs = useFlowStore((s) => s.actions.execution.clearLogs);
3715
3716
  const loadDebugRun = useFlowStore((s) => s.actions.execution.loadDebugRun);
3716
3717
  const cleanup = useCallback(() => {
3718
+ loadRequestRef.current += 1;
3717
3719
  if (pollTimerRef.current) {
3718
3720
  clearTimeout(pollTimerRef.current);
3719
3721
  pollTimerRef.current = null;
@@ -3868,7 +3870,8 @@ function useNodeExecution() {
3868
3870
  setRunMetadata({
3869
3871
  runId,
3870
3872
  workflowKey: run.workflowKey,
3871
- version: run.version
3873
+ version: run.version,
3874
+ sourceMode: run.mode
3872
3875
  });
3873
3876
  if (run.nodeStates?.length) {
3874
3877
  processNodeStates(runId, run.nodeStates);
@@ -3926,7 +3929,8 @@ function useNodeExecution() {
3926
3929
  const backendRunId = stepResult.runId;
3927
3930
  startExecution(nodeId, backendRunId, {
3928
3931
  workflowKey: stepResult.workflowKey,
3929
- version: stepResult.version
3932
+ version: stepResult.version,
3933
+ sourceMode: "TEST"
3930
3934
  });
3931
3935
  setStepPlan({
3932
3936
  runId: backendRunId,
@@ -4037,7 +4041,8 @@ function useNodeExecution() {
4037
4041
  const backendRunId = triggerResult.runId;
4038
4042
  startExecution(triggerNode.id, backendRunId, {
4039
4043
  workflowKey: triggerResult.workflowKey,
4040
- version: triggerResult.version
4044
+ version: triggerResult.version,
4045
+ sourceMode: "TEST"
4041
4046
  });
4042
4047
  pollRunUpdates(backendRunId);
4043
4048
  return { success: true, runId: backendRunId };
@@ -4108,7 +4113,8 @@ function useNodeExecution() {
4108
4113
  const backendRunId = runFromNodeResult.runId;
4109
4114
  startExecution(nodeId, backendRunId, {
4110
4115
  workflowKey: runFromNodeResult.workflowKey,
4111
- version: runFromNodeResult.version
4116
+ version: runFromNodeResult.version,
4117
+ sourceMode: "TEST"
4112
4118
  });
4113
4119
  pollRunUpdates(backendRunId);
4114
4120
  return { success: true, runId: backendRunId };
@@ -4136,6 +4142,7 @@ function useNodeExecution() {
4136
4142
  const loadExecution = useCallback(
4137
4143
  async (runId) => {
4138
4144
  cleanup();
4145
+ const requestId = ++loadRequestRef.current;
4139
4146
  try {
4140
4147
  const client = getFluidGridsClient();
4141
4148
  const result = throwIfResultError(
@@ -4149,6 +4156,29 @@ function useNodeExecution() {
4149
4156
  if (!run) {
4150
4157
  return { success: false, error: "Execution not found" };
4151
4158
  }
4159
+ if (run.mode !== "TEST") {
4160
+ return {
4161
+ success: false,
4162
+ error: "Only TEST runs can be loaded for continuation."
4163
+ };
4164
+ }
4165
+ if (!TERMINAL_STATUSES.has(run.status)) {
4166
+ return {
4167
+ success: false,
4168
+ error: "Only terminal TEST runs can be loaded for continuation."
4169
+ };
4170
+ }
4171
+ if (requestId !== loadRequestRef.current) {
4172
+ return { success: false, error: "Execution load superseded." };
4173
+ }
4174
+ const currentWorkflow = useFlowStore.getState().workflow;
4175
+ const currentWorkflowKey = currentWorkflow.workflowKey || currentWorkflow.id;
4176
+ if (run.workflowKey !== currentWorkflowKey || run.version !== currentWorkflow.version) {
4177
+ return {
4178
+ success: false,
4179
+ error: "The selected run belongs to a different workflow version."
4180
+ };
4181
+ }
4152
4182
  const logs = (run.nodeStates ?? []).map((nodeState) => {
4153
4183
  const rawStatus = nodeState.status.toLowerCase();
4154
4184
  const status = rawStatus === "completed" ? "completed" : rawStatus === "failed" || rawStatus === "timeout" ? "failed" : rawStatus === "running" || rawStatus === "waiting" || rawStatus === "delayed" || rawStatus === "waiting_subworkflow" ? "running" : "pending";
@@ -4171,7 +4201,8 @@ function useNodeExecution() {
4171
4201
  });
4172
4202
  loadDebugRun(runId, logs, {
4173
4203
  workflowKey: run.workflowKey,
4174
- version: run.version
4204
+ version: run.version,
4205
+ sourceMode: run.mode
4175
4206
  });
4176
4207
  return { success: true, runId };
4177
4208
  } catch (error) {
@@ -13585,8 +13616,8 @@ var reducer = (state, action) => {
13585
13616
  if (toastId) {
13586
13617
  addToRemoveQueue(toastId);
13587
13618
  } else {
13588
- state.toasts.forEach((toast11) => {
13589
- addToRemoveQueue(toast11.id);
13619
+ state.toasts.forEach((toast12) => {
13620
+ addToRemoveQueue(toast12.id);
13590
13621
  });
13591
13622
  }
13592
13623
  return {
@@ -14989,7 +15020,7 @@ function VisualMapperContent({
14989
15020
  mapping,
14990
15021
  onMappingChange
14991
15022
  }) {
14992
- const { toast: toast11 } = useToast();
15023
+ const { toast: toast12 } = useToast();
14993
15024
  const tr = useTr();
14994
15025
  const reactFlowWrapper = useRef(null);
14995
15026
  const [selectedSourceNode, setSelectedSourceNode] = useState(null);
@@ -15009,7 +15040,7 @@ function VisualMapperContent({
15009
15040
  targetOperation
15010
15041
  );
15011
15042
  if (generatedNodes.length === 0) {
15012
- toast11({
15043
+ toast12({
15013
15044
  title: tr(
15014
15045
  "fluidgrids.builder.visualMapper.noFieldsFoundTitle",
15015
15046
  "No fields found"
@@ -15035,7 +15066,7 @@ function VisualMapperContent({
15035
15066
  targetNode,
15036
15067
  targetOperation,
15037
15068
  setNodes,
15038
- toast11,
15069
+ toast12,
15039
15070
  tr
15040
15071
  ]);
15041
15072
  useEffect(() => {
@@ -15142,7 +15173,7 @@ function VisualMapperContent({
15142
15173
  }
15143
15174
  onMappingChange(updatedMapping);
15144
15175
  if (isCompatible) {
15145
- toast11({
15176
+ toast12({
15146
15177
  title: tr(
15147
15178
  "fluidgrids.builder.visualMapper.mappingCreatedTitle",
15148
15179
  "Mapping created"
@@ -15150,7 +15181,7 @@ function VisualMapperContent({
15150
15181
  description: `Mapped ${sourcePath} (${sourceType}) to ${targetPath} (${targetType})`
15151
15182
  });
15152
15183
  } else {
15153
- toast11({
15184
+ toast12({
15154
15185
  title: tr(
15155
15186
  "fluidgrids.builder.visualMapper.typeMismatchTitle",
15156
15187
  "Type mismatch warning"
@@ -15160,7 +15191,7 @@ function VisualMapperContent({
15160
15191
  });
15161
15192
  }
15162
15193
  } else {
15163
- toast11({
15194
+ toast12({
15164
15195
  title: tr(
15165
15196
  "fluidgrids.builder.visualMapper.invalidMappingTitle",
15166
15197
  "Invalid mapping"
@@ -15173,7 +15204,7 @@ function VisualMapperContent({
15173
15204
  });
15174
15205
  }
15175
15206
  },
15176
- [nodes, mapping, onMappingChange, toast11, tr, setEdges]
15207
+ [nodes, mapping, onMappingChange, toast12, tr, setEdges]
15177
15208
  );
15178
15209
  const onEdgeDelete = useCallback(
15179
15210
  (edge) => {
@@ -15230,7 +15261,7 @@ function VisualMapperContent({
15230
15261
  const handleSaveMappingDialog = (expression, targetFieldName) => {
15231
15262
  const targetPath = targetFieldName || selectedTargetNode?.data?.path;
15232
15263
  if (!targetPath) {
15233
- toast11({
15264
+ toast12({
15234
15265
  title: tr(
15235
15266
  "fluidgrids.builder.visualMapper.noTargetFieldTitle",
15236
15267
  "No target field specified"
@@ -15262,7 +15293,7 @@ function VisualMapperContent({
15262
15293
  }
15263
15294
  onMappingChange(updatedMapping);
15264
15295
  const mappingType = detectMappingType(expression);
15265
- toast11({
15296
+ toast12({
15266
15297
  title: `${mappingType.charAt(0).toUpperCase() + mappingType.slice(1)} mapping created`,
15267
15298
  description: `${tr("fluidgrids.builder.visualMapper.appliedMappingTo", "Applied mapping to")} ${targetPath}`
15268
15299
  });
@@ -15561,7 +15592,7 @@ function MappingEditor({
15561
15592
  setEdges,
15562
15593
  edgeId
15563
15594
  }) {
15564
- const { toast: toast11 } = useToast();
15595
+ const { toast: toast12 } = useToast();
15565
15596
  const tr = useTr();
15566
15597
  const [mappingJson, setMappingJson] = useState({});
15567
15598
  const [jsonDataString, setJsonDataString] = useState(
@@ -15685,7 +15716,7 @@ function MappingEditor({
15685
15716
  const handleSaveMapping = () => {
15686
15717
  try {
15687
15718
  checkJsonValidity();
15688
- toast11({
15719
+ toast12({
15689
15720
  title: tr(
15690
15721
  "fluidgrids.builder.mappingEditor.mappingSavedTitle",
15691
15722
  "Mapping saved"
@@ -15696,7 +15727,7 @@ function MappingEditor({
15696
15727
  )
15697
15728
  });
15698
15729
  } catch (error) {
15699
- toast11({
15730
+ toast12({
15700
15731
  title: tr(
15701
15732
  "fluidgrids.builder.mappingEditor.errorSavingTitle",
15702
15733
  "Error saving mapping"
@@ -15715,7 +15746,7 @@ function MappingEditor({
15715
15746
  const parsedData = checkJsonValidity();
15716
15747
  const result = await applyMapping(parsedData, sampleInput);
15717
15748
  setPreviewOutput(result);
15718
- toast11({
15749
+ toast12({
15719
15750
  title: tr(
15720
15751
  "fluidgrids.builder.mappingEditor.mappingTestedTitle",
15721
15752
  "Mapping tested"
@@ -15727,7 +15758,7 @@ function MappingEditor({
15727
15758
  });
15728
15759
  } catch (error) {
15729
15760
  console.error("Test mapping error:", error);
15730
- toast11({
15761
+ toast12({
15731
15762
  title: tr(
15732
15763
  "fluidgrids.builder.mappingEditor.mappingTestFailedTitle",
15733
15764
  "Mapping test failed"
@@ -23927,7 +23958,8 @@ function sourceMetadata(input) {
23927
23958
  return {
23928
23959
  runId: source?.runId ?? input.sourceRunId ?? null,
23929
23960
  workflowKey: source?.workflowKey ?? input.sourceRunWorkflowKey ?? null,
23930
- version: source?.version ?? source?.workflowVersion ?? input.sourceRunVersion ?? null
23961
+ version: source?.version ?? source?.workflowVersion ?? input.sourceRunVersion ?? null,
23962
+ sourceMode: source?.sourceMode ?? null
23931
23963
  };
23932
23964
  }
23933
23965
  function getContinuationEligibility(input) {
@@ -23938,6 +23970,12 @@ function getContinuationEligibility(input) {
23938
23970
  "Load a completed or failed run before continuing from this node."
23939
23971
  );
23940
23972
  }
23973
+ if (source.sourceMode === "PRODUCTION") {
23974
+ return blocked(
23975
+ "production-source-run",
23976
+ "Production run output cannot be reused for TEST continuation."
23977
+ );
23978
+ }
23941
23979
  if (!source.workflowKey || !source.version || source.workflowKey !== input.workflowKey || source.version !== input.workflowVersion) {
23942
23980
  return blocked(
23943
23981
  "incompatible-source-run",
@@ -26552,6 +26590,55 @@ function IntegrationReturnHandler() {
26552
26590
  }, [getNodes, setNodes, zustandSetNodes]);
26553
26591
  return null;
26554
26592
  }
26593
+ function HistoricalRunLoader() {
26594
+ const loadRunId = new URLSearchParams(window.location.search).get("loadRun");
26595
+ const workflowKey = useFlowStore(
26596
+ (s) => s.workflow.workflowKey || s.workflow.id
26597
+ );
26598
+ const workflowVersion = useFlowStore((s) => s.workflow.version);
26599
+ const { loadExecution } = useNodeExecution();
26600
+ const tr = useTr();
26601
+ const requestedRunRef = useRef(null);
26602
+ const requestKey = loadRunId && workflowKey && workflowVersion ? `${workflowKey}:${workflowVersion}:${loadRunId}` : null;
26603
+ useEffect(() => {
26604
+ if (!requestKey || !loadRunId || requestedRunRef.current === requestKey) {
26605
+ return;
26606
+ }
26607
+ requestedRunRef.current = requestKey;
26608
+ let active = true;
26609
+ void loadExecution(loadRunId).then((result) => {
26610
+ if (!active) return;
26611
+ const params = new URLSearchParams(window.location.search);
26612
+ params.delete("loadRun");
26613
+ const search = params.toString();
26614
+ window.history.replaceState(
26615
+ null,
26616
+ "",
26617
+ `${window.location.pathname}${search ? `?${search}` : ""}${window.location.hash}`
26618
+ );
26619
+ if (result.success) {
26620
+ toast.success(
26621
+ tr(
26622
+ "fluidgrids.builder.historicalRunLoaded",
26623
+ "TEST run loaded in the builder"
26624
+ )
26625
+ );
26626
+ return;
26627
+ }
26628
+ requestedRunRef.current = null;
26629
+ toast.error(
26630
+ result.error ?? tr(
26631
+ "fluidgrids.builder.historicalRunLoadFailed",
26632
+ "Could not load the TEST run"
26633
+ )
26634
+ );
26635
+ });
26636
+ return () => {
26637
+ active = false;
26638
+ };
26639
+ }, [loadExecution, loadRunId, requestKey, tr]);
26640
+ return null;
26641
+ }
26555
26642
  var FlowBuilderPage = ({
26556
26643
  workflow,
26557
26644
  readOnly = false
@@ -26596,6 +26683,7 @@ var FlowBuilderPage = ({
26596
26683
  }
26597
26684
  return /* @__PURE__ */ jsxs(ReactFlowProvider, { children: [
26598
26685
  /* @__PURE__ */ jsx(IntegrationReturnHandler, {}),
26686
+ /* @__PURE__ */ jsx(HistoricalRunLoader, {}),
26599
26687
  /* @__PURE__ */ jsx("div", { className: "flex flex-col h-full", children: /* @__PURE__ */ jsxs("div", { className: "relative flex grow min-h-0 divide-x divide-card-foreground/10", children: [
26600
26688
  /* @__PURE__ */ jsx("div", { className: "grow min-w-0 bg-card md:bg-transparent", children: /* @__PURE__ */ jsx(FlowBuilder, { readOnly: isReadOnly }) }),
26601
26689
  !isReadOnly && /* @__PURE__ */ jsx(SidebarModule, {})
@@ -26604,5 +26692,5 @@ var FlowBuilderPage = ({
26604
26692
  };
26605
26693
 
26606
26694
  export { Card2 as Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ConnectionFormDialog, ConnectionSelector, EntityTagPicker, FLUIDGRIDS_ENTITY_TYPES, FlowBuilderPage, FluidGridsMark, FluidGridsProvider, ProviderPicker, SchemaConnectionForm, ScopePicker, TemplateCard, buildNodeCheck, buildRequiredNodeTypes, listCustomBlocks, mergeStickyNotes, refetchStoreNodes, registerCustomBlock, resolveUiSpec, stripSubmitActions, tagLabel, useAvailableTags, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useCreateTag, useDraftEntityTags, useEntityTags, useFluidGridsContext, useImportWorkflowTemplate, useInitiateOAuth, useInstalledNodes, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useReplaceEntityTags, useSearchTags, useTagEntity, useUntagEntity, useWorkflowTemplates };
26607
- //# sourceMappingURL=chunk-GBXVY4MJ.js.map
26608
- //# sourceMappingURL=chunk-GBXVY4MJ.js.map
26695
+ //# sourceMappingURL=chunk-PVK74X2D.js.map
26696
+ //# sourceMappingURL=chunk-PVK74X2D.js.map