@burdenoff/fluidgrids-fe-sdk 2026.1029.2 → 2026.1029.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-EDS22IQG.js → ExecutionDetailPage-Y4K35GJ7.js} +7 -7
- package/dist/{ExecutionsListPage-5PYZX3HU.js → ExecutionsListPage-KC3KRBNS.js} +5 -5
- package/dist/{WorkflowBuilder-K3EQXB52.js → WorkflowBuilder-JXBWQG63.js} +8 -8
- package/dist/{WorkflowsList-MIXZRAXD.js → WorkflowsList-2OYIXGWQ.js} +6 -6
- package/dist/{chunk-YEKEEGZN.js → chunk-2U56452G.js} +23 -3
- package/dist/{chunk-WJFZBZK3.js → chunk-35SQULD5.js} +1 -1
- package/dist/{chunk-NA3UNXY2.js → chunk-5ITN7CKS.js} +1 -1
- package/dist/{chunk-TH5LA5X2.js → chunk-6Y6I2ODM.js} +6 -6
- package/dist/{chunk-54CEDDLL.js → chunk-DASEJQ4G.js} +3 -3
- package/dist/{chunk-RFHATUK5.js → chunk-E2OQHCFG.js} +309 -17
- package/dist/{chunk-7W3XSNF5.js → chunk-EAJB5BNF.js} +1 -1
- package/dist/{chunk-LPBQ67DL.js → chunk-HYFLZNRK.js} +8 -5
- package/dist/{chunk-OJ2ELVXV.js → chunk-LGGHQ7UE.js} +1 -1
- package/dist/{chunk-4SX5KNE3.js → chunk-NM5L7MBJ.js} +3 -3
- package/dist/{chunk-HR36AXP3.js → chunk-R4SBXQ2K.js} +1 -1
- package/dist/{chunk-TWF7YD5G.js → chunk-REY7BCWM.js} +4 -4
- package/dist/{chunk-ZDCCT7BZ.js → chunk-SRE2JVSJ.js} +1 -1
- package/dist/{chunk-FEGCLCVZ.js → chunk-UZMLMPFJ.js} +1 -1
- package/dist/{chunk-DOI6P5V7.js → chunk-VYH65RLH.js} +1 -1
- package/dist/{chunk-IQMHZHNZ.js → chunk-WDTO6ATM.js} +1 -1
- package/dist/{chunk-4ATOGNE2.js → chunk-WJ3XAHT2.js} +3 -3
- package/dist/{chunk-HLCUB3UN.js → chunk-X3LQJLV7.js} +1 -1
- package/dist/{chunk-S6NUWA4F.js → chunk-XRHZ3IEL.js} +4 -4
- package/dist/{chunk-QN7W4CFQ.js → chunk-XTXT4NHE.js} +5 -5
- package/dist/{chunk-HGZGKNGD.js → chunk-ZDFDC5YW.js} +1 -1
- package/dist/executions.js +9 -9
- package/dist/history.js +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +30 -30
- package/dist/observability.js +4 -4
- package/dist/settings.js +5 -5
- package/dist/templates.js +7 -7
- package/dist/{workflow-builder-BxyapBo5.d.ts → workflow-builder-CZFczcE7.d.ts} +9 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +9 -9
- package/dist/workflows-list.js +6 -6
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { ExecutionDetailPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
1
|
+
export { ExecutionDetailPage } from './chunk-6Y6I2ODM.js';
|
|
2
|
+
import './chunk-EAJB5BNF.js';
|
|
3
|
+
import './chunk-UZMLMPFJ.js';
|
|
4
|
+
import './chunk-R4SBXQ2K.js';
|
|
5
|
+
import './chunk-35SQULD5.js';
|
|
6
6
|
import './chunk-5ERAJC2I.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-ZDFDC5YW.js';
|
|
8
8
|
import './chunk-5GD6OXYW.js';
|
|
9
9
|
import './chunk-Y53CVZVV.js';
|
|
10
10
|
import './chunk-D3UWK7GY.js';
|
|
11
11
|
import './chunk-PJAWNFJV.js';
|
|
12
12
|
import './chunk-U6KI4AKI.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-2U56452G.js';
|
|
14
14
|
import './chunk-JL7CASN5.js';
|
|
15
15
|
import './chunk-PXIFUMLA.js';
|
|
16
16
|
import './chunk-CY6KX4RG.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { ExecutionsListPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { ExecutionsListPage } from './chunk-DASEJQ4G.js';
|
|
2
|
+
import './chunk-EAJB5BNF.js';
|
|
3
|
+
import './chunk-UZMLMPFJ.js';
|
|
4
4
|
import './chunk-5ERAJC2I.js';
|
|
5
5
|
import './chunk-5GD6OXYW.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-SRE2JVSJ.js';
|
|
7
7
|
import './chunk-D3UWK7GY.js';
|
|
8
8
|
import './chunk-PJAWNFJV.js';
|
|
9
9
|
import './chunk-4VJ3MDOV.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-2U56452G.js';
|
|
11
11
|
import './chunk-JL7CASN5.js';
|
|
12
12
|
import './chunk-PXIFUMLA.js';
|
|
13
13
|
import './chunk-CY6KX4RG.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { WorkflowBuilder } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { WorkflowBuilder } from './chunk-HYFLZNRK.js';
|
|
2
|
+
import './chunk-LGGHQ7UE.js';
|
|
3
|
+
import './chunk-E2OQHCFG.js';
|
|
4
4
|
import './chunk-GEMNVFPK.js';
|
|
5
5
|
import './chunk-IEVSFCFS.js';
|
|
6
6
|
import './chunk-YXMFRQYV.js';
|
|
7
7
|
import './chunk-BQXVT32O.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-X3LQJLV7.js';
|
|
9
|
+
import './chunk-ZDFDC5YW.js';
|
|
10
10
|
import './chunk-5GD6OXYW.js';
|
|
11
11
|
import './chunk-Y53CVZVV.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-SRE2JVSJ.js';
|
|
13
13
|
import './chunk-U6KI4AKI.js';
|
|
14
|
-
import './chunk-
|
|
14
|
+
import './chunk-5ITN7CKS.js';
|
|
15
15
|
import './chunk-4VJ3MDOV.js';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-2U56452G.js';
|
|
17
17
|
import './chunk-JL7CASN5.js';
|
|
18
18
|
import './chunk-PXIFUMLA.js';
|
|
19
19
|
import './chunk-CY6KX4RG.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { WorkflowsList } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { WorkflowsList } from './chunk-XTXT4NHE.js';
|
|
2
|
+
import './chunk-LGGHQ7UE.js';
|
|
3
|
+
import './chunk-UZMLMPFJ.js';
|
|
4
4
|
import './chunk-5ERAJC2I.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-X3LQJLV7.js';
|
|
6
|
+
import './chunk-SRE2JVSJ.js';
|
|
7
7
|
import './chunk-D3UWK7GY.js';
|
|
8
8
|
import './chunk-PJAWNFJV.js';
|
|
9
9
|
import './chunk-U6KI4AKI.js';
|
|
10
10
|
import './chunk-4VJ3MDOV.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-2U56452G.js';
|
|
12
12
|
import './chunk-JL7CASN5.js';
|
|
13
13
|
import './chunk-PXIFUMLA.js';
|
|
14
14
|
import './chunk-CY6KX4RG.js';
|
|
@@ -626,6 +626,7 @@ var useFlowStore = create()((set, get) => {
|
|
|
626
626
|
alias: "",
|
|
627
627
|
dbId: void 0,
|
|
628
628
|
status: void 0,
|
|
629
|
+
codeBuildId: void 0,
|
|
629
630
|
edges: [],
|
|
630
631
|
nodes: [],
|
|
631
632
|
ndv: null,
|
|
@@ -6514,8 +6515,22 @@ function workflowFingerprint(workflow) {
|
|
|
6514
6515
|
})
|
|
6515
6516
|
);
|
|
6516
6517
|
}
|
|
6518
|
+
function codeBuildIdOf(definitionJson) {
|
|
6519
|
+
if (typeof definitionJson !== "object" || definitionJson === null || Array.isArray(definitionJson)) {
|
|
6520
|
+
return void 0;
|
|
6521
|
+
}
|
|
6522
|
+
const code = definitionJson.code;
|
|
6523
|
+
if (typeof code !== "object" || code === null || Array.isArray(code)) {
|
|
6524
|
+
return void 0;
|
|
6525
|
+
}
|
|
6526
|
+
const buildId = code.buildId;
|
|
6527
|
+
return typeof buildId === "string" && buildId !== "" ? buildId : void 0;
|
|
6528
|
+
}
|
|
6529
|
+
function savesInPlace(workflow) {
|
|
6530
|
+
return !!workflow.dbId && (!workflow.status || workflow.status === "DRAFT") && !workflow.codeBuildId;
|
|
6531
|
+
}
|
|
6517
6532
|
function canAutosave(workflow) {
|
|
6518
|
-
return
|
|
6533
|
+
return savesInPlace(workflow);
|
|
6519
6534
|
}
|
|
6520
6535
|
var AUTOSAVE_RETRY_DELAYS_MS = [2e3, 5e3, 15e3];
|
|
6521
6536
|
var AUTOSAVE_DEBOUNCE_MS = 2e3;
|
|
@@ -6613,6 +6628,10 @@ function writeAutosavePreference(storage, enabled) {
|
|
|
6613
6628
|
function leaveNeedsConfirmation(state) {
|
|
6614
6629
|
return state.dirty && (!state.autosaveAllowed || state.incomplete || state.failed);
|
|
6615
6630
|
}
|
|
6631
|
+
function runPreparationOf(state) {
|
|
6632
|
+
if (!state.dirty) return "run";
|
|
6633
|
+
return leaveNeedsConfirmation(state) ? "confirm" : "save-first";
|
|
6634
|
+
}
|
|
6616
6635
|
function inAppLeaveTarget(link, click, location) {
|
|
6617
6636
|
if (click.button !== 0 || click.modified) return null;
|
|
6618
6637
|
if (link.download) return null;
|
|
@@ -6645,6 +6664,7 @@ function snapshotForSave(workflow, generation, route = {}) {
|
|
|
6645
6664
|
alias: workflow.alias,
|
|
6646
6665
|
dbId: workflow.dbId,
|
|
6647
6666
|
status: workflow.status,
|
|
6667
|
+
codeBuildId: workflow.codeBuildId,
|
|
6648
6668
|
nodes: workflow.nodes,
|
|
6649
6669
|
edges: workflow.edges
|
|
6650
6670
|
};
|
|
@@ -6839,7 +6859,7 @@ function useSaveWorkflow() {
|
|
|
6839
6859
|
let savedVersion = workflow.version;
|
|
6840
6860
|
let savedDbId = workflow.dbId;
|
|
6841
6861
|
let operation = "updated";
|
|
6842
|
-
if (
|
|
6862
|
+
if (workflow.dbId && savesInPlace(workflow)) {
|
|
6843
6863
|
const { data } = throwIfResultError(
|
|
6844
6864
|
await client.mutate({
|
|
6845
6865
|
mutation: UpdateWorkflowDefinitionDocument,
|
|
@@ -9529,4 +9549,4 @@ function useNodeExecution() {
|
|
|
9529
9549
|
};
|
|
9530
9550
|
}
|
|
9531
9551
|
|
|
9532
|
-
export { ALLOW_ALL_PERMISSIONS, AUTOSAVE_DEBOUNCE_MS, AUTOSAVE_RETRY_DELAYS_MS, AVAILABLE_NODES, BILLING_PLANS_PATH, CODE_WORKFLOW_NODE_TYPE, ConnectionFormDialog, ConnectionSelector, DURABLE_FUNCTION_NODE_TYPES, ExpressionEditor, FLUIDGRIDS_FLAGS, FLUIDGRIDS_FLAG_DEFAULTS, FLUIDGRIDS_PERMISSIONS, FluidGridsContext, FluidGridsPermissionsProvider, FluidGridsProvider, NODES, NODES_METADATA, NODE_CONFIGS, NODE_OPERATION_DRAG_DATA_FORMAT, NODE_TYPES, NODE_TYPE_DRAG_DATA_FORMAT, NodePropertyPanel, NodeTypeIcon, RUNS_QUOTA_NAME, STICKY_NOTE_TYPE, SdkPermissionButton, SdkPermissionGate, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WORKFLOWS_QUOTA_NAME, blankWorkflowCreateInput, buildOperationSeed, buildStickyNode, canAutosave, canRenderOperationPanel, canSignalRun, changedSourceFiles, childRunIdOf, classifyCreateRefusal, clearCodeWorkflowDefinitionCache, components_default, createConfiguredNode, createThenOpen, declaredOutputFields, declaredSignals, defaultSourcePath, describeOperationError, diagnosticsByPath, editStateOf, emitNodeInstalled, emitRunFailed, emitRunLimitHit, emitRunStarted, emitTemplateUsed, emitUpgradeClicked, emitWorkflowCreated, emitWorkflowLimitHit, emitWorkflowPublished, ensureNodeConfigsLoaded, evaluatePermissionCheck, fieldsFromIO, fieldsFromValue, filterPaletteNodes, findQuotaRefusal, formatParameterValue, getNodeDetail, getNodeMetadata, inAppLeaveTarget, interfaceFields, interfaceHandlers, isDurableFunctionNodeType, isEditableSourcePath, isImageIcon, isNodeConfigsInitialized, isNodeTrigger, isNodeTypeHiddenFromPalette, isParamVisible, isQuotaExhaustedFailure, isTriggerOperation, leaveNeedsConfirmation, listCustomBlocks, liveInternalOperations, mergeStickyNotes, nodeAccent, nodesOf, onNodeTypesUpdate, openRunQuotaUpgradePrompt, parseParameterValue, parseRawSignalPayload, pathToExpression, payloadFromCardValues, projectLanguage, readCodeWorkflowState, readDisplayOptions, refetchStoreNodes, registerCustomBlock, registerWorkflowNodeTypes, resolveInputHandles, resolveNodeOperation, resolveOperationName, resolveOutputHandles, resolveUiSpec, runSignalTargets, runTriggerFromMode, saveIndicatorOf, signalPayloadCard, snapshotForSave, sourceLanguageOf, stripSubmitActions, structuredParameterType, subscribeWorkflowSaved, synchronizeOperationUpdate, throwIfResultError, toCodeMirrorDiagnostics, useAgentDefinitionList, useAgentDefinitions, useCodeWorkflowInterface, useConnection, useConnections, useConnectionsByProvider, useCreateConnection, useDurableFunctionNodesEnabled, useFlowStore, useFluidGridsAnalytics, useFluidGridsContext, useFluidGridsFlag, useFluidGridsPermission, useInitiateOAuth, useInsertNode, useIsValidConnection, useNodeExecution, useNodeRegistryRevision, useProviders, useSaveStatusStore, useSaveWorkflow, workflowFingerprint };
|
|
9552
|
+
export { ALLOW_ALL_PERMISSIONS, AUTOSAVE_DEBOUNCE_MS, AUTOSAVE_RETRY_DELAYS_MS, AVAILABLE_NODES, BILLING_PLANS_PATH, CODE_WORKFLOW_NODE_TYPE, ConnectionFormDialog, ConnectionSelector, DURABLE_FUNCTION_NODE_TYPES, ExpressionEditor, FLUIDGRIDS_FLAGS, FLUIDGRIDS_FLAG_DEFAULTS, FLUIDGRIDS_PERMISSIONS, FluidGridsContext, FluidGridsPermissionsProvider, FluidGridsProvider, NODES, NODES_METADATA, NODE_CONFIGS, NODE_OPERATION_DRAG_DATA_FORMAT, NODE_TYPES, NODE_TYPE_DRAG_DATA_FORMAT, NodePropertyPanel, NodeTypeIcon, RUNS_QUOTA_NAME, STICKY_NOTE_TYPE, SdkPermissionButton, SdkPermissionGate, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WORKFLOWS_QUOTA_NAME, blankWorkflowCreateInput, buildOperationSeed, buildStickyNode, canAutosave, canRenderOperationPanel, canSignalRun, changedSourceFiles, childRunIdOf, classifyCreateRefusal, clearCodeWorkflowDefinitionCache, codeBuildIdOf, components_default, createConfiguredNode, createThenOpen, declaredOutputFields, declaredSignals, defaultSourcePath, describeOperationError, diagnosticsByPath, editStateOf, emitNodeInstalled, emitRunFailed, emitRunLimitHit, emitRunStarted, emitTemplateUsed, emitUpgradeClicked, emitWorkflowCreated, emitWorkflowLimitHit, emitWorkflowPublished, ensureNodeConfigsLoaded, evaluatePermissionCheck, fieldsFromIO, fieldsFromValue, filterPaletteNodes, findQuotaRefusal, formatParameterValue, getNodeDetail, getNodeMetadata, inAppLeaveTarget, interfaceFields, interfaceHandlers, isDurableFunctionNodeType, isEditableSourcePath, isImageIcon, isNodeConfigsInitialized, isNodeTrigger, isNodeTypeHiddenFromPalette, isParamVisible, isQuotaExhaustedFailure, isTriggerOperation, leaveNeedsConfirmation, listCustomBlocks, liveInternalOperations, mergeStickyNotes, nodeAccent, nodesOf, onNodeTypesUpdate, openRunQuotaUpgradePrompt, parseParameterValue, parseRawSignalPayload, pathToExpression, payloadFromCardValues, projectLanguage, readCodeWorkflowState, readDisplayOptions, refetchStoreNodes, registerCustomBlock, registerWorkflowNodeTypes, resolveInputHandles, resolveNodeOperation, resolveOperationName, resolveOutputHandles, resolveUiSpec, runPreparationOf, runSignalTargets, runTriggerFromMode, saveIndicatorOf, savesInPlace, signalPayloadCard, snapshotForSave, sourceLanguageOf, stripSubmitActions, structuredParameterType, subscribeWorkflowSaved, synchronizeOperationUpdate, throwIfResultError, toCodeMirrorDiagnostics, useAgentDefinitionList, useAgentDefinitions, useCodeWorkflowInterface, useConnection, useConnections, useConnectionsByProvider, useCreateConnection, useDurableFunctionNodesEnabled, useFlowStore, useFluidGridsAnalytics, useFluidGridsContext, useFluidGridsFlag, useFluidGridsPermission, useInitiateOAuth, useInsertNode, useIsValidConnection, useNodeExecution, useNodeRegistryRevision, useProviders, useSaveStatusStore, useSaveWorkflow, workflowFingerprint };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { throwIfResultError, describeOperationError } from './chunk-
|
|
1
|
+
import { throwIfResultError, describeOperationError } from './chunk-2U56452G.js';
|
|
2
2
|
import { useTr } from './chunk-UULVIT25.js';
|
|
3
3
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
4
4
|
import { useState, useCallback, useEffect, useMemo } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAgentDefinitions, useAgentDefinitionList, useConnections, describeOperationError } from './chunk-
|
|
1
|
+
import { useAgentDefinitions, useAgentDefinitionList, useConnections, describeOperationError } from './chunk-2U56452G.js';
|
|
2
2
|
import { useTr } from './chunk-UULVIT25.js';
|
|
3
3
|
import { useState, useCallback, useEffect } from 'react';
|
|
4
4
|
import { Icon } from '@iconify/react';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { buildNodeDisplayMap, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-
|
|
2
|
-
import { useExecution, useExecutionActions, useAutoRefresh } from './chunk-
|
|
3
|
-
import { fetchRunFailureClusters, OPEN_STATUSES, dismissRunFailureCluster, BUCKET_LABELS } from './chunk-
|
|
4
|
-
import { useRunPolicyDecisions, RunPolicyDecisions } from './chunk-
|
|
5
|
-
import { useDurableRunFields, useRunHistory, useDeterminismStatus, useRunStackTrace, EntityTagPicker, RunHistoryView, SignalRunDialog, terminateDurableRun, useWorkflowProposal, WorkflowProposalCard } from './chunk-
|
|
1
|
+
import { buildNodeDisplayMap, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-EAJB5BNF.js';
|
|
2
|
+
import { useExecution, useExecutionActions, useAutoRefresh } from './chunk-UZMLMPFJ.js';
|
|
3
|
+
import { fetchRunFailureClusters, OPEN_STATUSES, dismissRunFailureCluster, BUCKET_LABELS } from './chunk-R4SBXQ2K.js';
|
|
4
|
+
import { useRunPolicyDecisions, RunPolicyDecisions } from './chunk-35SQULD5.js';
|
|
5
|
+
import { useDurableRunFields, useRunHistory, useDeterminismStatus, useRunStackTrace, EntityTagPicker, RunHistoryView, SignalRunDialog, terminateDurableRun, useWorkflowProposal, WorkflowProposalCard } from './chunk-ZDFDC5YW.js';
|
|
6
6
|
import { AiCreditBalanceSlot } from './chunk-Y53CVZVV.js';
|
|
7
|
-
import { throwIfResultError, useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, useDurableFunctionNodesEnabled, runSignalTargets, canSignalRun } from './chunk-
|
|
7
|
+
import { throwIfResultError, useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, useDurableFunctionNodesEnabled, runSignalTargets, canSignalRun } from './chunk-2U56452G.js';
|
|
8
8
|
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
9
9
|
import { RunLogsDocument, RunLogAppendedDocument, ExplainRunDocument } from './chunk-7PP6CRXS.js';
|
|
10
10
|
import { useTr } from './chunk-UULVIT25.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination } from './chunk-
|
|
2
|
-
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh } from './chunk-
|
|
3
|
-
import { useWorkflowDefinitions } from './chunk-
|
|
1
|
+
import { ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination } from './chunk-EAJB5BNF.js';
|
|
2
|
+
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh } from './chunk-UZMLMPFJ.js';
|
|
3
|
+
import { useWorkflowDefinitions } from './chunk-SRE2JVSJ.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
5
|
import { useExecutionsStore } from './chunk-CY6KX4RG.js';
|
|
6
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
@@ -2,13 +2,13 @@ import { deepClone, applyTemplateInputs } from './chunk-GEMNVFPK.js';
|
|
|
2
2
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
3
3
|
import { Dialog as Dialog$1, DialogContent as DialogContent$1, DialogHeader as DialogHeader$1, DialogTitle as DialogTitle$1, DialogDescription as DialogDescription$1, DialogFooter } from './chunk-YXMFRQYV.js';
|
|
4
4
|
import { Badge as Badge$1, Button } from './chunk-BQXVT32O.js';
|
|
5
|
-
import { QuotaExhaustedDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-
|
|
6
|
-
import { EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useRunHistory, RunHistoryView, SignalRunDialog } from './chunk-
|
|
5
|
+
import { QuotaExhaustedDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-X3LQJLV7.js';
|
|
6
|
+
import { EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useRunHistory, RunHistoryView, SignalRunDialog } from './chunk-ZDFDC5YW.js';
|
|
7
7
|
import { AiCreditBalanceSlot } from './chunk-Y53CVZVV.js';
|
|
8
|
-
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useLazyWorkflowDefinition, useDeactivateWorkflow } from './chunk-
|
|
9
|
-
import { isAgentNodeType, AgentDefinitionSelectField } from './chunk-
|
|
8
|
+
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useLazyWorkflowDefinition, useDeactivateWorkflow } from './chunk-SRE2JVSJ.js';
|
|
9
|
+
import { isAgentNodeType, AgentDefinitionSelectField } from './chunk-5ITN7CKS.js';
|
|
10
10
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
11
|
-
import { NODE_CONFIGS, createConfiguredNode, resolveOutputHandles, resolveInputHandles, isNodeConfigsInitialized, useFlowStore, getNodeDetail, useSaveStatusStore, isNodeTypeHiddenFromPalette, liveInternalOperations, resolveNodeOperation, readDisplayOptions, parseParameterValue, canAutosave, STICKY_NOTE_TYPE, isNodeTrigger, resolveUiSpec, RUNS_QUOTA_NAME, throwIfResultError, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, ensureNodeConfigsLoaded, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, useDurableFunctionNodesEnabled, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, refetchStoreNodes, AVAILABLE_NODES, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, CODE_WORKFLOW_NODE_TYPE, fieldsFromValue, filterPaletteNodes, useFluidGridsAnalytics, useSaveWorkflow, workflowFingerprint, buildStickyNode, useNodeRegistryRevision, fieldsFromIO, useFluidGridsPermission,
|
|
11
|
+
import { NODE_CONFIGS, createConfiguredNode, resolveOutputHandles, resolveInputHandles, isNodeConfigsInitialized, useFlowStore, getNodeDetail, useSaveStatusStore, isNodeTypeHiddenFromPalette, liveInternalOperations, resolveNodeOperation, readDisplayOptions, parseParameterValue, canAutosave, STICKY_NOTE_TYPE, isNodeTrigger, resolveUiSpec, RUNS_QUOTA_NAME, throwIfResultError, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, ensureNodeConfigsLoaded, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, useDurableFunctionNodesEnabled, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, refetchStoreNodes, AVAILABLE_NODES, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, CODE_WORKFLOW_NODE_TYPE, SdkPermissionButton, FLUIDGRIDS_PERMISSIONS, fieldsFromValue, filterPaletteNodes, useFluidGridsAnalytics, useSaveWorkflow, workflowFingerprint, buildStickyNode, useNodeRegistryRevision, fieldsFromIO, useFluidGridsPermission, readCodeWorkflowState, useCodeWorkflowInterface, clearCodeWorkflowDefinitionCache, isParamVisible, ConnectionSelector, structuredParameterType, nodeAccent, NodeTypeIcon, NODES_METADATA, useConnections, ConnectionFormDialog, useFluidGridsFlag, FLUIDGRIDS_FLAGS, saveIndicatorOf, inAppLeaveTarget, declaredOutputFields, subscribeWorkflowSaved, pathToExpression, diagnosticsByPath, interfaceHandlers, declaredSignals, ExpressionEditor, toCodeMirrorDiagnostics, formatParameterValue, leaveNeedsConfirmation, buildOperationSeed, snapshotForSave, editStateOf, childRunIdOf, defaultSourcePath, describeOperationError, projectLanguage, changedSourceFiles, isEditableSourcePath, sourceLanguageOf, interfaceFields, isImageIcon, NODES, synchronizeOperationUpdate, NodePropertyPanel, openRunQuotaUpgradePrompt, isTriggerOperation, canRenderOperationPanel, runPreparationOf, resolveOperationName, savesInPlace, AUTOSAVE_RETRY_DELAYS_MS, AUTOSAVE_DEBOUNCE_MS } from './chunk-2U56452G.js';
|
|
12
12
|
import { cn } from './chunk-JL7CASN5.js';
|
|
13
13
|
import { getGlobalStoreClient } from './chunk-PXIFUMLA.js';
|
|
14
14
|
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
@@ -21778,16 +21778,22 @@ function departingSave(state) {
|
|
|
21778
21778
|
function touchesSavedFields(state, previous) {
|
|
21779
21779
|
return state.workflow.nodes !== previous.workflow.nodes || state.workflow.edges !== previous.workflow.edges || state.workflow.name !== previous.workflow.name || state.workflow.alias !== previous.workflow.alias || state.workflow.status !== previous.workflow.status || state.loadGeneration !== previous.loadGeneration;
|
|
21780
21780
|
}
|
|
21781
|
-
function
|
|
21781
|
+
function unsavedState() {
|
|
21782
21782
|
const flow = useFlowStore.getState();
|
|
21783
21783
|
const status = useSaveStatusStore.getState();
|
|
21784
|
-
return
|
|
21784
|
+
return {
|
|
21785
21785
|
// Checked fresh: the dirty flag trails the last edit by a moment.
|
|
21786
21786
|
dirty: status.dirty || editStateFor(flow) === "dirty",
|
|
21787
21787
|
autosaveAllowed: autosaveAllowedFor(flow.workflow),
|
|
21788
21788
|
incomplete: status.incomplete || !isFlowComplete(flow.workflow.nodes, flow.workflow.edges),
|
|
21789
21789
|
failed: status.failure !== null
|
|
21790
|
-
}
|
|
21790
|
+
};
|
|
21791
|
+
}
|
|
21792
|
+
function leavingLosesChanges() {
|
|
21793
|
+
return leaveNeedsConfirmation(unsavedState());
|
|
21794
|
+
}
|
|
21795
|
+
function runPreparation() {
|
|
21796
|
+
return runPreparationOf(unsavedState());
|
|
21791
21797
|
}
|
|
21792
21798
|
function savedEverythingBeforeLeaving() {
|
|
21793
21799
|
return editStateFor(useFlowStore.getState()) !== "dirty";
|
|
@@ -40866,8 +40872,14 @@ function NodeDetailView() {
|
|
|
40866
40872
|
outputFields
|
|
40867
40873
|
} = config2;
|
|
40868
40874
|
const [tab, setTab] = useState(
|
|
40869
|
-
"parameters"
|
|
40875
|
+
() => ndv?.tab ?? "parameters"
|
|
40870
40876
|
);
|
|
40877
|
+
const requestedTab = ndv?.tab ? `${ndv.nodeId}:${ndv.tab}` : void 0;
|
|
40878
|
+
const [shownRequest, setShownRequest] = useState(requestedTab);
|
|
40879
|
+
if (requestedTab !== shownRequest) {
|
|
40880
|
+
setShownRequest(requestedTab);
|
|
40881
|
+
if (ndv?.tab) setTab(ndv.tab);
|
|
40882
|
+
}
|
|
40871
40883
|
const durableEnabled = useDurableFunctionNodesEnabled();
|
|
40872
40884
|
const isCodeWorkflow = durableEnabled && node2?.type === CODE_WORKFLOW_NODE_TYPE;
|
|
40873
40885
|
const [outputView, setOutputView] = useState("schema");
|
|
@@ -42463,13 +42475,24 @@ function FailedStatus({ className, compact }) {
|
|
|
42463
42475
|
}
|
|
42464
42476
|
function useUnsavedHint() {
|
|
42465
42477
|
const tr = useTr();
|
|
42466
|
-
const [dbId, status] = useFlowStore(
|
|
42467
|
-
useShallow((s) => [
|
|
42478
|
+
const [dbId, status, codeBuildId] = useFlowStore(
|
|
42479
|
+
useShallow((s) => [
|
|
42480
|
+
s.workflow.dbId,
|
|
42481
|
+
s.workflow.status,
|
|
42482
|
+
s.workflow.codeBuildId
|
|
42483
|
+
])
|
|
42468
42484
|
);
|
|
42469
42485
|
const [autosaveEnabled, incomplete] = useSaveStatusStore(
|
|
42470
42486
|
useShallow((s) => [s.autosaveEnabled, s.incomplete])
|
|
42471
42487
|
);
|
|
42472
|
-
if (
|
|
42488
|
+
if (codeBuildId) {
|
|
42489
|
+
return tr(
|
|
42490
|
+
"fluidgrids.builder.saveStatus.unsavedCodeVersionHint",
|
|
42491
|
+
"This version runs code and never changes. Save ({{shortcut}}) to keep your changes as a new version.",
|
|
42492
|
+
{ shortcut: SAVE_SHORTCUT }
|
|
42493
|
+
);
|
|
42494
|
+
}
|
|
42495
|
+
if (!canAutosave({ dbId, status, codeBuildId })) {
|
|
42473
42496
|
return tr(
|
|
42474
42497
|
"fluidgrids.builder.saveStatus.unsavedVersionHint",
|
|
42475
42498
|
"This version is not a draft. Save ({{shortcut}}) to keep your changes as a new draft version.",
|
|
@@ -42572,6 +42595,7 @@ function SaveStatusIndicator({
|
|
|
42572
42595
|
var SaveFlowButton = ({ className }) => {
|
|
42573
42596
|
const tr = useTr();
|
|
42574
42597
|
const { saveToBackend, isSaving } = useSaveWorkflow();
|
|
42598
|
+
const runsCode = useFlowStore((s) => !!s.workflow.codeBuildId);
|
|
42575
42599
|
const [isValidating, validateFlow] = useFlowValidator(async (isValid) => {
|
|
42576
42600
|
if (isValid) {
|
|
42577
42601
|
await saveToBackend();
|
|
@@ -42613,7 +42637,10 @@ var SaveFlowButton = ({ className }) => {
|
|
|
42613
42637
|
className: cn$1("flex gap-4", className),
|
|
42614
42638
|
children: [
|
|
42615
42639
|
/* @__PURE__ */ jsx(Icon, { icon: "fluent:save-28-filled" }),
|
|
42616
|
-
isSaving ? tr("fluidgrids.builder.saveFlowButton.savingLabel", "Saving...") : tr(
|
|
42640
|
+
isSaving ? tr("fluidgrids.builder.saveFlowButton.savingLabel", "Saving...") : runsCode ? tr(
|
|
42641
|
+
"fluidgrids.builder.saveFlowButton.saveAsNewVersionLabel",
|
|
42642
|
+
"Save as new version"
|
|
42643
|
+
) : tr("fluidgrids.builder.saveFlowButton.saveLabel", "Save")
|
|
42617
42644
|
]
|
|
42618
42645
|
}
|
|
42619
42646
|
)
|
|
@@ -42709,7 +42736,7 @@ function TriggerDataDialog({
|
|
|
42709
42736
|
),
|
|
42710
42737
|
parseError && /* @__PURE__ */ jsx("p", { className: "text-sm text-[var(--color-status-error-text)]", children: parseError }),
|
|
42711
42738
|
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
42712
|
-
"This data is available to nodes as trigger input. For example, a
|
|
42739
|
+
"This data is available to nodes as trigger input. For example, a BotManor node expects",
|
|
42713
42740
|
" ",
|
|
42714
42741
|
/* @__PURE__ */ jsx("code", { className: "bg-muted px-1 rounded", children: "message" }),
|
|
42715
42742
|
" and",
|
|
@@ -42751,6 +42778,146 @@ function TriggerDataDialog({
|
|
|
42751
42778
|
] })
|
|
42752
42779
|
] }) });
|
|
42753
42780
|
}
|
|
42781
|
+
function useRunGuard(startRun) {
|
|
42782
|
+
const { saveToBackend } = useSaveWorkflow();
|
|
42783
|
+
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
42784
|
+
const [preparing, setPreparing] = useState(false);
|
|
42785
|
+
const requestRun = useCallback(async () => {
|
|
42786
|
+
const preparation = runPreparation();
|
|
42787
|
+
if (preparation === "run") {
|
|
42788
|
+
startRun();
|
|
42789
|
+
return;
|
|
42790
|
+
}
|
|
42791
|
+
if (preparation === "save-first") {
|
|
42792
|
+
setPreparing(true);
|
|
42793
|
+
let saved = false;
|
|
42794
|
+
try {
|
|
42795
|
+
saved = await saveToBackend({ silent: true }) && savedEverythingBeforeLeaving();
|
|
42796
|
+
} finally {
|
|
42797
|
+
setPreparing(false);
|
|
42798
|
+
}
|
|
42799
|
+
if (saved) {
|
|
42800
|
+
startRun();
|
|
42801
|
+
return;
|
|
42802
|
+
}
|
|
42803
|
+
}
|
|
42804
|
+
setConfirmOpen(true);
|
|
42805
|
+
}, [saveToBackend, startRun]);
|
|
42806
|
+
const dialog = /* @__PURE__ */ jsx(
|
|
42807
|
+
UnsavedRunDialog,
|
|
42808
|
+
{
|
|
42809
|
+
open: confirmOpen,
|
|
42810
|
+
onOpenChange: setConfirmOpen,
|
|
42811
|
+
onRunSaved: () => {
|
|
42812
|
+
setConfirmOpen(false);
|
|
42813
|
+
startRun();
|
|
42814
|
+
},
|
|
42815
|
+
onSavedAndRunnable: () => {
|
|
42816
|
+
setConfirmOpen(false);
|
|
42817
|
+
startRun();
|
|
42818
|
+
}
|
|
42819
|
+
}
|
|
42820
|
+
);
|
|
42821
|
+
return { requestRun, preparing, dialog };
|
|
42822
|
+
}
|
|
42823
|
+
function UnsavedRunDialog({
|
|
42824
|
+
open: open2,
|
|
42825
|
+
onOpenChange,
|
|
42826
|
+
onRunSaved,
|
|
42827
|
+
onSavedAndRunnable
|
|
42828
|
+
}) {
|
|
42829
|
+
const tr = useTr();
|
|
42830
|
+
const manualSave = useManualSave();
|
|
42831
|
+
const [version2, dbId, status, codeBuildId] = useFlowStore(
|
|
42832
|
+
useShallow((s) => [
|
|
42833
|
+
s.workflow.version,
|
|
42834
|
+
s.workflow.dbId,
|
|
42835
|
+
s.workflow.status,
|
|
42836
|
+
s.workflow.codeBuildId
|
|
42837
|
+
])
|
|
42838
|
+
);
|
|
42839
|
+
const [saving, setSaving] = useState(false);
|
|
42840
|
+
const hasSavedVersion = !!dbId;
|
|
42841
|
+
const runsAfterSave = !hasSavedVersion || savesInPlace({ dbId, status, codeBuildId });
|
|
42842
|
+
const save = useCallback(async () => {
|
|
42843
|
+
setSaving(true);
|
|
42844
|
+
try {
|
|
42845
|
+
const saved = await manualSave();
|
|
42846
|
+
if (!saved) return;
|
|
42847
|
+
if (!runsAfterSave) {
|
|
42848
|
+
onOpenChange(false);
|
|
42849
|
+
return;
|
|
42850
|
+
}
|
|
42851
|
+
if (savedEverythingBeforeLeaving()) onSavedAndRunnable();
|
|
42852
|
+
} finally {
|
|
42853
|
+
setSaving(false);
|
|
42854
|
+
}
|
|
42855
|
+
}, [runsAfterSave, manualSave, onOpenChange, onSavedAndRunnable]);
|
|
42856
|
+
return /* @__PURE__ */ jsx(
|
|
42857
|
+
AlertDialog,
|
|
42858
|
+
{
|
|
42859
|
+
open: open2,
|
|
42860
|
+
onOpenChange: (next) => {
|
|
42861
|
+
if (!next && saving) return;
|
|
42862
|
+
onOpenChange(next);
|
|
42863
|
+
},
|
|
42864
|
+
children: /* @__PURE__ */ jsxs(AlertDialogContent, { "data-testid": "fluidgrids-unsaved-run-dialog", children: [
|
|
42865
|
+
/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
|
|
42866
|
+
/* @__PURE__ */ jsx(AlertDialogTitle, { children: tr(
|
|
42867
|
+
"fluidgrids.builder.runGuard.title",
|
|
42868
|
+
"Run without your unsaved changes?"
|
|
42869
|
+
) }),
|
|
42870
|
+
/* @__PURE__ */ jsxs(AlertDialogDescription, { children: [
|
|
42871
|
+
hasSavedVersion ? tr(
|
|
42872
|
+
"fluidgrids.builder.runGuard.description",
|
|
42873
|
+
"This workflow has changes that are not saved. A run uses the saved version {{version}}, without them.",
|
|
42874
|
+
{ version: version2 }
|
|
42875
|
+
) : tr(
|
|
42876
|
+
"fluidgrids.builder.runGuard.descriptionNotSaved",
|
|
42877
|
+
"This workflow has not been saved yet. Save it before you run it."
|
|
42878
|
+
),
|
|
42879
|
+
" ",
|
|
42880
|
+
runsAfterSave ? null : tr(
|
|
42881
|
+
"fluidgrids.builder.runGuard.newVersionHint",
|
|
42882
|
+
"Saving keeps your changes as a new version and opens it; run that version."
|
|
42883
|
+
)
|
|
42884
|
+
] })
|
|
42885
|
+
] }),
|
|
42886
|
+
/* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
|
|
42887
|
+
/* @__PURE__ */ jsx(AlertDialogCancel, { disabled: saving, children: tr("fluidgrids.builder.runGuard.cancelButton", "Cancel") }),
|
|
42888
|
+
hasSavedVersion && /* @__PURE__ */ jsx(
|
|
42889
|
+
Button$2,
|
|
42890
|
+
{
|
|
42891
|
+
"data-agent": "confirm",
|
|
42892
|
+
variant: "outline",
|
|
42893
|
+
onClick: onRunSaved,
|
|
42894
|
+
disabled: saving,
|
|
42895
|
+
children: tr(
|
|
42896
|
+
"fluidgrids.builder.runGuard.runSavedButton",
|
|
42897
|
+
"Run saved version"
|
|
42898
|
+
)
|
|
42899
|
+
}
|
|
42900
|
+
),
|
|
42901
|
+
/* @__PURE__ */ jsx(
|
|
42902
|
+
Button$2,
|
|
42903
|
+
{
|
|
42904
|
+
"data-agent": "confirm",
|
|
42905
|
+
onClick: () => void save(),
|
|
42906
|
+
disabled: saving,
|
|
42907
|
+
children: saving ? tr("fluidgrids.builder.runGuard.savingButton", "Saving\u2026") : runsAfterSave ? tr(
|
|
42908
|
+
"fluidgrids.builder.runGuard.saveAndRunButton",
|
|
42909
|
+
"Save and run"
|
|
42910
|
+
) : tr(
|
|
42911
|
+
"fluidgrids.builder.runGuard.saveAsNewVersionButton",
|
|
42912
|
+
"Save as new version"
|
|
42913
|
+
)
|
|
42914
|
+
}
|
|
42915
|
+
)
|
|
42916
|
+
] })
|
|
42917
|
+
] })
|
|
42918
|
+
}
|
|
42919
|
+
);
|
|
42920
|
+
}
|
|
42754
42921
|
var ExecuteWorkflowButton = ({
|
|
42755
42922
|
className
|
|
42756
42923
|
}) => {
|
|
@@ -42799,9 +42966,11 @@ var ExecuteWorkflowButton = ({
|
|
|
42799
42966
|
},
|
|
42800
42967
|
[executeFullWorkflow, tr]
|
|
42801
42968
|
);
|
|
42969
|
+
const openTriggerDialog = useCallback(() => setDialogOpen(true), []);
|
|
42970
|
+
const runGuard = useRunGuard(openTriggerDialog);
|
|
42802
42971
|
const [isValidating, validateFlow] = useFlowValidator(async (isValid) => {
|
|
42803
42972
|
if (isValid) {
|
|
42804
|
-
|
|
42973
|
+
await runGuard.requestRun();
|
|
42805
42974
|
} else {
|
|
42806
42975
|
toast.error(
|
|
42807
42976
|
tr(
|
|
@@ -42831,7 +43000,7 @@ var ExecuteWorkflowButton = ({
|
|
|
42831
43000
|
{
|
|
42832
43001
|
"data-agent": "confirm",
|
|
42833
43002
|
onClick: validateFlow,
|
|
42834
|
-
disabled: isValidating || isExecuting,
|
|
43003
|
+
disabled: isValidating || isExecuting || runGuard.preparing,
|
|
42835
43004
|
variant: "default",
|
|
42836
43005
|
size: "sm",
|
|
42837
43006
|
className: cn$1(
|
|
@@ -42843,7 +43012,7 @@ var ExecuteWorkflowButton = ({
|
|
|
42843
43012
|
isExecuting ? tr(
|
|
42844
43013
|
"fluidgrids.builder.executeWorkflowButton.runningLabel",
|
|
42845
43014
|
"Running..."
|
|
42846
|
-
) : isValidating ? tr(
|
|
43015
|
+
) : isValidating || runGuard.preparing ? tr(
|
|
42847
43016
|
"fluidgrids.builder.executeWorkflowButton.validatingLabel",
|
|
42848
43017
|
"Validating..."
|
|
42849
43018
|
) : tr("fluidgrids.builder.executeWorkflowButton.runLabel", "Run")
|
|
@@ -42852,6 +43021,7 @@ var ExecuteWorkflowButton = ({
|
|
|
42852
43021
|
)
|
|
42853
43022
|
}
|
|
42854
43023
|
),
|
|
43024
|
+
runGuard.dialog,
|
|
42855
43025
|
/* @__PURE__ */ jsx(
|
|
42856
43026
|
TriggerDataDialog,
|
|
42857
43027
|
{
|
|
@@ -46959,6 +47129,127 @@ function BuilderHeader() {
|
|
|
46959
47129
|
}
|
|
46960
47130
|
);
|
|
46961
47131
|
}
|
|
47132
|
+
function useCodeWorkflowNodeId() {
|
|
47133
|
+
return useFlowStore(
|
|
47134
|
+
(s) => s.workflow.nodes.find((node2) => node2.type === CODE_WORKFLOW_NODE_TYPE)?.id
|
|
47135
|
+
);
|
|
47136
|
+
}
|
|
47137
|
+
function CodeVersionNotice() {
|
|
47138
|
+
const tr = useTr();
|
|
47139
|
+
const [codeBuildId, version2] = useFlowStore(
|
|
47140
|
+
useShallow((s) => [s.workflow.codeBuildId, s.workflow.version])
|
|
47141
|
+
);
|
|
47142
|
+
const openNdv = useFlowStore((s) => s.actions.ndv.open);
|
|
47143
|
+
const dirty = useSaveStatusStore((s) => s.dirty);
|
|
47144
|
+
const saving = useSaveStatusStore((s) => s.saving);
|
|
47145
|
+
const manualSave = useManualSave();
|
|
47146
|
+
const durableEnabled = useDurableFunctionNodesEnabled();
|
|
47147
|
+
const codeNodeId = useCodeWorkflowNodeId();
|
|
47148
|
+
const editSource = useCallback(() => {
|
|
47149
|
+
if (!codeNodeId) return;
|
|
47150
|
+
openNdv({
|
|
47151
|
+
nodeId: codeNodeId,
|
|
47152
|
+
type: CODE_WORKFLOW_NODE_TYPE,
|
|
47153
|
+
tab: "source"
|
|
47154
|
+
});
|
|
47155
|
+
}, [codeNodeId, openNdv]);
|
|
47156
|
+
if (!codeBuildId) return null;
|
|
47157
|
+
const canEditSource = durableEnabled && !!codeNodeId;
|
|
47158
|
+
return /* @__PURE__ */ jsxs(
|
|
47159
|
+
"div",
|
|
47160
|
+
{
|
|
47161
|
+
role: "note",
|
|
47162
|
+
"data-testid": "fluidgrids-code-version-notice",
|
|
47163
|
+
className: "flex flex-wrap items-start gap-x-3 gap-y-2 border-b border-[var(--color-status-info-border)] bg-[var(--color-status-info-bg-subtle)] px-4 py-2 text-sm text-[var(--color-status-info-text)]",
|
|
47164
|
+
children: [
|
|
47165
|
+
/* @__PURE__ */ jsx(Icon, { icon: "mynaui:lock", className: "mt-0.5 size-4 shrink-0", "aria-hidden": true }),
|
|
47166
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 basis-64", children: [
|
|
47167
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium", children: tr(
|
|
47168
|
+
"fluidgrids.builder.codeVersionNotice.title",
|
|
47169
|
+
"Version {{version}} runs code and is read-only",
|
|
47170
|
+
{ version: version2 }
|
|
47171
|
+
) }),
|
|
47172
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs", children: [
|
|
47173
|
+
tr(
|
|
47174
|
+
"fluidgrids.builder.codeVersionNotice.reason",
|
|
47175
|
+
"A version that runs code never changes, so its runs always have the code they started with."
|
|
47176
|
+
),
|
|
47177
|
+
" ",
|
|
47178
|
+
canEditSource ? tr(
|
|
47179
|
+
"fluidgrids.builder.codeVersionNotice.howToEditWithSource",
|
|
47180
|
+
"Change the code in the Source tab of the Code Workflow node or with fluidgrids push. Canvas changes are kept as a new version with the same code when you save."
|
|
47181
|
+
) : tr(
|
|
47182
|
+
"fluidgrids.builder.codeVersionNotice.howToEdit",
|
|
47183
|
+
"Change the code with fluidgrids push. Canvas changes are kept as a new version with the same code when you save."
|
|
47184
|
+
)
|
|
47185
|
+
] }),
|
|
47186
|
+
/* @__PURE__ */ jsx(
|
|
47187
|
+
"p",
|
|
47188
|
+
{
|
|
47189
|
+
className: "mt-0.5 truncate font-mono text-[11px]",
|
|
47190
|
+
title: codeBuildId,
|
|
47191
|
+
children: tr(
|
|
47192
|
+
"fluidgrids.builder.codeVersionNotice.build",
|
|
47193
|
+
"Build {{buildId}}",
|
|
47194
|
+
{
|
|
47195
|
+
buildId: codeBuildId
|
|
47196
|
+
}
|
|
47197
|
+
)
|
|
47198
|
+
}
|
|
47199
|
+
)
|
|
47200
|
+
] }),
|
|
47201
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
47202
|
+
canEditSource && /* @__PURE__ */ jsxs(
|
|
47203
|
+
Button$1,
|
|
47204
|
+
{
|
|
47205
|
+
"data-agent": "confirm",
|
|
47206
|
+
variant: "outline",
|
|
47207
|
+
size: "sm",
|
|
47208
|
+
onClick: editSource,
|
|
47209
|
+
children: [
|
|
47210
|
+
/* @__PURE__ */ jsx(Icon, { icon: "mynaui:code", className: "mr-1 size-4", "aria-hidden": true }),
|
|
47211
|
+
tr(
|
|
47212
|
+
"fluidgrids.builder.codeVersionNotice.editSource",
|
|
47213
|
+
"Edit source"
|
|
47214
|
+
)
|
|
47215
|
+
]
|
|
47216
|
+
}
|
|
47217
|
+
),
|
|
47218
|
+
/* @__PURE__ */ jsx(
|
|
47219
|
+
SdkPermissionButton,
|
|
47220
|
+
{
|
|
47221
|
+
permission: [
|
|
47222
|
+
FLUIDGRIDS_PERMISSIONS.WORKFLOW_UPDATE,
|
|
47223
|
+
FLUIDGRIDS_PERMISSIONS.WORKFLOW_CREATE
|
|
47224
|
+
],
|
|
47225
|
+
deniedTooltip: tr(
|
|
47226
|
+
"fluidgrids.builder.saveFlowButton.permissionDeniedTooltip",
|
|
47227
|
+
"You don't have permission to save workflows"
|
|
47228
|
+
),
|
|
47229
|
+
children: /* @__PURE__ */ jsx(
|
|
47230
|
+
Button$1,
|
|
47231
|
+
{
|
|
47232
|
+
"data-agent": "confirm",
|
|
47233
|
+
size: "sm",
|
|
47234
|
+
onClick: () => void manualSave(),
|
|
47235
|
+
disabled: !dirty || saving,
|
|
47236
|
+
title: dirty ? void 0 : tr(
|
|
47237
|
+
"fluidgrids.builder.codeVersionNotice.nothingToSave",
|
|
47238
|
+
"Change the canvas first; there is nothing to save yet."
|
|
47239
|
+
),
|
|
47240
|
+
children: saving ? tr("fluidgrids.builder.codeVersionNotice.saving", "Saving\u2026") : tr(
|
|
47241
|
+
"fluidgrids.builder.codeVersionNotice.saveAsNewVersion",
|
|
47242
|
+
"Save as new version"
|
|
47243
|
+
)
|
|
47244
|
+
}
|
|
47245
|
+
)
|
|
47246
|
+
}
|
|
47247
|
+
)
|
|
47248
|
+
] })
|
|
47249
|
+
]
|
|
47250
|
+
}
|
|
47251
|
+
);
|
|
47252
|
+
}
|
|
46962
47253
|
var edgeTypes2 = {
|
|
46963
47254
|
deletable: CustomDeletableEdge
|
|
46964
47255
|
};
|
|
@@ -47083,6 +47374,7 @@ var FlowBuilder = ({ readOnly = false }) => {
|
|
|
47083
47374
|
);
|
|
47084
47375
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full w-full overflow-hidden", children: [
|
|
47085
47376
|
!isReadOnly && /* @__PURE__ */ jsx(BuilderHeader, {}),
|
|
47377
|
+
!isReadOnly && /* @__PURE__ */ jsx(CodeVersionNotice, {}),
|
|
47086
47378
|
/* @__PURE__ */ jsx(BuilderSaveController, { readOnly: isReadOnly }),
|
|
47087
47379
|
/* @__PURE__ */ jsxs(
|
|
47088
47380
|
"div",
|