@oomol-lab/open-flow 0.1.0-beta.87 → 0.1.0-beta.89
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/browser/{createResourceDialog-CB3eiK7e.js → createResourceDialog-BstGO0m4.js} +3 -16
- package/dist/browser/{flowChanges-azhepfr-.js → flowChanges-CnOOPJJR.js} +12 -9
- package/dist/browser/{flowWorkspace-Cs2ZGBYK.js → flowWorkspace-d9Ef-aRK.js} +16 -9
- package/dist/browser/preview.css +5 -0
- package/dist/browser/preview.js +15 -24
- package/dist/browser/ui.css +5 -0
- package/dist/browser/workbench-contract.d.ts +4 -2
- package/dist/browser/workbench.css +5 -0
- package/dist/browser/workbench.js +5 -5
- package/dist/command/index.js +32 -32
- package/dist/common/control-api-conformance.js +12 -9
- package/dist/common/control-api.js +12 -9
- package/dist/common/control-requests.js +8 -2
- package/dist/common/flow-semantics.js +7 -1
- package/dist/common/mcp.js +12 -9
- package/dist/render/browser/runtime.css +5 -0
- package/package.json +1 -1
- package/src/control/common/api.ts +13 -9
- package/src/control/common/authoring.ts +2 -1
- package/src/flow/common/graph.ts +10 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { l as useTranslate } from "./dist-BFmpkX4P.js";
|
|
2
2
|
import { xr as Button } from "./tooltip-BZ6tpqnr.js";
|
|
3
|
-
import { a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, hn as Input,
|
|
3
|
+
import { a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, hn as Input, l as Icon, m as FieldGroup, n as DialogClose, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner } from "./dialog-Bi-MVTGj.js";
|
|
4
4
|
import { t as WorkbenchSelect } from "./workbenchSelect-CHOeceKA.js";
|
|
5
5
|
import { useEffect, useRef, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
|
|
8
|
-
function CreateResourceDialog({ disabled, tagField, summary, field, id, issue, label, name, onNameChange, onOpenChange, onSubmit, pending, submitLabel,
|
|
8
|
+
function CreateResourceDialog({ description, disabled, tagField, summary, field, id, issue, label, name, onNameChange, onOpenChange, onSubmit, pending, submitLabel, title }) {
|
|
9
9
|
const t = useTranslate();
|
|
10
10
|
const input = useRef(null);
|
|
11
11
|
const portal = useRef(null);
|
|
@@ -14,11 +14,6 @@ function CreateResourceDialog({ disabled, tagField, summary, field, id, issue, l
|
|
|
14
14
|
const showIssue = name.length > 0 && issue != null;
|
|
15
15
|
const message = showIssue ? t(`resource.nameIssue.${issue}`, { max: 80 }) : t("resource.nameHint", { max: 80 });
|
|
16
16
|
const messageId = `${id}-message`;
|
|
17
|
-
let sourceHref;
|
|
18
|
-
if (sourceUrl != null) try {
|
|
19
|
-
const url = new URL(sourceUrl);
|
|
20
|
-
if (url.protocol == "https:" || url.protocol == "http:") sourceHref = url.href;
|
|
21
|
-
} catch {}
|
|
22
17
|
const fieldId = `${id}-option`;
|
|
23
18
|
useEffect(() => setOpen(true), []);
|
|
24
19
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", { ref: portal }), /* @__PURE__ */ jsx(Dialog, {
|
|
@@ -47,15 +42,7 @@ function CreateResourceDialog({ disabled, tagField, summary, field, id, issue, l
|
|
|
47
42
|
type: "button",
|
|
48
43
|
children: /* @__PURE__ */ jsx(Icon, { name: "close" })
|
|
49
44
|
})]
|
|
50
|
-
}),
|
|
51
|
-
className: "break-all",
|
|
52
|
-
children: sourceHref == null ? sourceUrl : /* @__PURE__ */ jsx("a", {
|
|
53
|
-
href: sourceHref,
|
|
54
|
-
target: "_blank",
|
|
55
|
-
rel: "noreferrer",
|
|
56
|
-
children: sourceUrl
|
|
57
|
-
})
|
|
58
|
-
})] }),
|
|
45
|
+
}), description] }),
|
|
59
46
|
/* @__PURE__ */ jsxs(FieldGroup, {
|
|
60
47
|
className: "gap-4",
|
|
61
48
|
children: [
|
|
@@ -4235,6 +4235,14 @@ function runEvents(value) {
|
|
|
4235
4235
|
};
|
|
4236
4236
|
}
|
|
4237
4237
|
var segment$1 = encodeURIComponent;
|
|
4238
|
+
async function responseJson(response, signal) {
|
|
4239
|
+
try {
|
|
4240
|
+
return await response.json();
|
|
4241
|
+
} catch (error) {
|
|
4242
|
+
if (signal?.aborted) throw signal.reason ?? error;
|
|
4243
|
+
return invalidResponse(`HTTP ${response.status} response body is not JSON.`);
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4238
4246
|
function operationKey(operation) {
|
|
4239
4247
|
return `${operation}-${randomId()}`;
|
|
4240
4248
|
}
|
|
@@ -4533,7 +4541,7 @@ var ControlClient = class {
|
|
|
4533
4541
|
};
|
|
4534
4542
|
return {
|
|
4535
4543
|
modified: true,
|
|
4536
|
-
data: query.decode(await response
|
|
4544
|
+
data: query.decode(await responseJson(response, signal)),
|
|
4537
4545
|
etag: nextETag
|
|
4538
4546
|
};
|
|
4539
4547
|
}
|
|
@@ -4562,7 +4570,7 @@ var ControlClient = class {
|
|
|
4562
4570
|
};
|
|
4563
4571
|
}
|
|
4564
4572
|
return {
|
|
4565
|
-
data: decodeTriggerCatalog(await response
|
|
4573
|
+
data: decodeTriggerCatalog(await responseJson(response, signal)),
|
|
4566
4574
|
etag: response.headers.get("etag")?.trim() || null
|
|
4567
4575
|
};
|
|
4568
4576
|
}
|
|
@@ -5071,7 +5079,7 @@ var ControlClient = class {
|
|
|
5071
5079
|
try {
|
|
5072
5080
|
value = await response.json();
|
|
5073
5081
|
} catch {
|
|
5074
|
-
return invalidResponse();
|
|
5082
|
+
return invalidResponse(`HTTP ${response.status} response did not include a JSON error body.`);
|
|
5075
5083
|
}
|
|
5076
5084
|
const error = record$2(value).error;
|
|
5077
5085
|
const source = error == null ? void 0 : record$2(error);
|
|
@@ -5080,12 +5088,7 @@ var ControlClient = class {
|
|
|
5080
5088
|
return response;
|
|
5081
5089
|
}
|
|
5082
5090
|
async request(path, init = {}) {
|
|
5083
|
-
|
|
5084
|
-
try {
|
|
5085
|
-
return await response.json();
|
|
5086
|
-
} catch {
|
|
5087
|
-
return invalidResponse();
|
|
5088
|
-
}
|
|
5091
|
+
return await responseJson(await this.response(path, init), init.signal);
|
|
5089
5092
|
}
|
|
5090
5093
|
};
|
|
5091
5094
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import { c as useLang, l as useTranslate, o as I18nProvider, r as isPlainObject,
|
|
|
5
5
|
import { $ as useToolbarRootContext, A as string, Bn as transitionStatusMapping, Br as useStableCallback, Cr as cn, Er as useRenderElement, Fr as formatErrorMessage, In as useTransitionStatus, Ir as mergeProps, Ln as useOpenChangeComplete, Lr as useIsoLayoutEffect, Mr as useButton, Nn as useLabelableId, Or as EMPTY_OBJECT, Qt as useStore, Sr as buttonVariants, Un as useValueChanged, Wn as createChangeEventDetails, _r as fieldValidityMapping, a as createTooltipHandle, br as useControlled, c as TooltipPositioner, d as TooltipRoot, dr as useFormContext, fr as useRegisterFieldControl, i as TooltipTrigger, jr as useMergedRefs, l as TooltipPortal, mr as useBaseUiId, mt as triggerOpenStateMapping, n as TooltipContent, nn as require_builtin_esm_external_require_react, o as TooltipArrow, p as timeZoneOffsetMinutes, pr as useFieldRootContext, qn as clearPress, r as TooltipProvider, rr as none, s as TooltipPopup, t as Tooltip, u as TooltipTrigger$1, ur as useLabelableContext, vr as visuallyHidden, wr as cva, xr as Button$1, yr as visuallyHiddenInput, zr as error$1 } from "./tooltip-BZ6tpqnr.js";
|
|
6
6
|
import { $ as waitAutoContinueSchema, $t as SelectGroup, A as comparisonIssue, Bt as schemaObject, D as nodeSystemOutputPorts, Dt as connectorProxyTask, E as nodeErrorSchema, Et as connectorProxySupportsBody, F as operatorsForType, Ft as webhookMethods, It as webhookSupportsBody, J as webhookResponseAllowsBody, K as webhookHeaderValuePort, L as unaryOperator, O as supportsNodeErrorHandling, P as operandHandle, Pt as httpHeaderNameIssue, Q as workflowOutputsPort, Qt as SelectContent, R as valueType, Rt as matchesSchema, St as connectorProxyHeaderSchema, T as workflowToolNameIssue, Tt as connectorProxyQuerySchema, U as decodeRevisionContent, Vt as variableInputCompatible, X as webhookResponseTimeout, Xt as Select$1, Y as webhookResponseInputs, Yt as dequal, Z as webhookStatusCodePort, Zt as SelectChevron, _t as defaultDecisionQuestion, a as DialogFooter, at as httpHeaderSchema, b as nodeNameIssue, c as DialogTrigger, ct as httpRequestIssues, d as Field, en as SelectItem, et as defaultNodeRetry, f as FieldDescription, ft as isHttpHost, gn as ChevronDown, gt as decisionTask, h as FieldLabel, hn as Input, ht as decisionQuestionIssues, i as DialogDescription, l as Icon, lt as httpRequestTask, m as FieldGroup, mn as Label, n as DialogClose, nn as SelectTrigger, nt as retryConfigurationSchema, o as DialogHeader, ot as httpQuerySchema, p as FieldError, pt as decisionLimits, q as webhookHeadersPort, qt as skipDuplicatesConfigSchema, r as DialogContent, rn as SelectValue, rt as supportsNodeRetry, s as DialogTitle, t as Dialog, tn as SelectSeparator, tt as nodeRetryLimits, u as Spinner, vt as limitDecisionQuestions, wt as connectorProxyIssues, xt as connectorProxyHasBody, yt as connectorProxyBodyInput, zt as portsAssignable } from "./dialog-Bi-MVTGj.js";
|
|
7
7
|
import { C as isMac, S as toManifestNodeId, T as flowPngAspectRatios, _ as E$1, a as CanvasNodeIcon, b as toViewEdge, c as collapseAllNested, d as IconStack, f as selectableTimeZones, g as cronDescription, h as timeZoneOffset, i as pasteVideoLink, l as formatDuration, m as timeZoneLongLabel, n as setAddItemId, o as defaultTriggerIcon, p as timeZoneLabel, s as JSONViewer, t as FlowCanvas, u as useDebouncedValue, v as CanvasTooltip, w as isSameViewport, x as toManifestHandleName, y as CanvasStore } from "./FlowCanvas-SqPUBqze.js";
|
|
8
|
-
import { $ as resourceValue, $t as WorkflowExportDialog, A as schemaForEditor, An as TabsTrigger, Ar as serverAddress, B as datePickerValue, Bn as EmptyMedia, Br as ApiError, Cn as selectors, Cr as inputValue, D as defaultValueEditorSchema, Dn as Tabs, Dr as openApiTask, Dt as diagnosticMessage, E as supportsFeishuChatFilter, En as IconPickerButton, Er as openApiFieldIssues, F as calendarChange, Fn as InputGroupInput, Fr as workflowCandidateGroup, G as indexAddNodeOptions, Gn as SourceSelect, H as isDateFormat, Hn as Badge, Hr as eventSourceKind, I as calendarDate, In as Empty, Ir as workflowCapability, Jn as EventSourceSetup, Kn as createI18n, L as dateFromTimeZone, Ln as EmptyContent, Lr as workflowSelectionTask, M as getDefaultValue, Mn as followWorkbenchLink, Mr as sameWorkflowInterface, N as isUnconstrainedSchema, Nn as InputGroup, Nr as workflowAgentTool, O as editorComponent, On as TabsContent, Or as securityOptions, Ot as diagnosticNodeId, P as typeOfSchema, Pn as InputGroupAddon, Q as resourceData, R as dateInTimeZone, Rn as EmptyDescription, Sn as ComboboxRoot, Sr as triggerConfigValues, St as revisionView, T as feishuResourceKind, Tn as useComboboxRootContext, Tr as object$1, V as dateTimeWall, Vn as EmptyTitle, Vr as controlErrorCode, Wn as SourceForm, Y as connectorActionPresentation, Yn as errorNotice, Z as observeResource, Zt as dequal$1, _n as ComboboxList, _t as actionSummary, ar as webhookResponseDiagnostics, bn as ComboboxInputGroup, bt as canCancelRun, cn as selectionMenuItemClass, dn as valueEditor_module_default, dr as isJsonObject, dt as loadJson, en as WorkflowExportMenuItem, er as decodeResultList, fn as ComboboxItemIndicator, ft as designerGraph, gn as ComboboxPortal, gt as triggerNodeIcon, hn as ComboboxPositioner, ht as semanticNodeIcon, ir as resolutionOutputPorts, it as decodeAppCatalogResponse, j as valueForEditor, jr as servers, jt as connectionCatalog, k as editorGroups, kn as TabsList, kr as selectOperation, kt as schemaMismatchMessage, ln as ValueControl, mn as ComboboxPopup, mt as nodeTitle, n as agentTool, nn as IdTooltip, nr as executionReachableNodes, or as sourceOutputLabel, ot as getAppCatalogCache, pn as ComboboxItem, pt as nodeIcon, q as mapSource, qn as FeishuEventPicker, rn as FlowSettingsButton, rr as inputSourceCandidates, sn as selectionMenuContentClass, sr as sourcePort, tn as useWorkflowExportAction, tt as provider, un as ValueEditorFeedback, ur as triggerOutputDefinitions, vn as GroupCollectionProvider, vt as providerIcon, wn as useComboboxInputValueContext, wr as listOperations, xn as ComboboxInput, xr as triggerConfigValue, xt as hasRunFilter, yn as ComboboxTrigger, z as datePickerChange, zn as EmptyHeader } from "./flowChanges-
|
|
8
|
+
import { $ as resourceValue, $t as WorkflowExportDialog, A as schemaForEditor, An as TabsTrigger, Ar as serverAddress, B as datePickerValue, Bn as EmptyMedia, Br as ApiError, Cn as selectors, Cr as inputValue, D as defaultValueEditorSchema, Dn as Tabs, Dr as openApiTask, Dt as diagnosticMessage, E as supportsFeishuChatFilter, En as IconPickerButton, Er as openApiFieldIssues, F as calendarChange, Fn as InputGroupInput, Fr as workflowCandidateGroup, G as indexAddNodeOptions, Gn as SourceSelect, H as isDateFormat, Hn as Badge, Hr as eventSourceKind, I as calendarDate, In as Empty, Ir as workflowCapability, Jn as EventSourceSetup, Kn as createI18n, L as dateFromTimeZone, Ln as EmptyContent, Lr as workflowSelectionTask, M as getDefaultValue, Mn as followWorkbenchLink, Mr as sameWorkflowInterface, N as isUnconstrainedSchema, Nn as InputGroup, Nr as workflowAgentTool, O as editorComponent, On as TabsContent, Or as securityOptions, Ot as diagnosticNodeId, P as typeOfSchema, Pn as InputGroupAddon, Q as resourceData, R as dateInTimeZone, Rn as EmptyDescription, Sn as ComboboxRoot, Sr as triggerConfigValues, St as revisionView, T as feishuResourceKind, Tn as useComboboxRootContext, Tr as object$1, V as dateTimeWall, Vn as EmptyTitle, Vr as controlErrorCode, Wn as SourceForm, Y as connectorActionPresentation, Yn as errorNotice, Z as observeResource, Zt as dequal$1, _n as ComboboxList, _t as actionSummary, ar as webhookResponseDiagnostics, bn as ComboboxInputGroup, bt as canCancelRun, cn as selectionMenuItemClass, dn as valueEditor_module_default, dr as isJsonObject, dt as loadJson, en as WorkflowExportMenuItem, er as decodeResultList, fn as ComboboxItemIndicator, ft as designerGraph, gn as ComboboxPortal, gt as triggerNodeIcon, hn as ComboboxPositioner, ht as semanticNodeIcon, ir as resolutionOutputPorts, it as decodeAppCatalogResponse, j as valueForEditor, jr as servers, jt as connectionCatalog, k as editorGroups, kn as TabsList, kr as selectOperation, kt as schemaMismatchMessage, ln as ValueControl, mn as ComboboxPopup, mt as nodeTitle, n as agentTool, nn as IdTooltip, nr as executionReachableNodes, or as sourceOutputLabel, ot as getAppCatalogCache, pn as ComboboxItem, pt as nodeIcon, q as mapSource, qn as FeishuEventPicker, rn as FlowSettingsButton, rr as inputSourceCandidates, sn as selectionMenuContentClass, sr as sourcePort, tn as useWorkflowExportAction, tt as provider, un as ValueEditorFeedback, ur as triggerOutputDefinitions, vn as GroupCollectionProvider, vt as providerIcon, wn as useComboboxInputValueContext, wr as listOperations, xn as ComboboxInput, xr as triggerConfigValue, xt as hasRunFilter, yn as ComboboxTrigger, z as datePickerChange, zn as EmptyHeader } from "./flowChanges-CnOOPJJR.js";
|
|
9
9
|
import { r as resolveUiLanguage } from "./languages-gYzoQqCi.js";
|
|
10
10
|
import { a as renameObjectField, i as objectValue, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue } from "./value-BbFQZZ_V.js";
|
|
11
11
|
import { n as compile, r as validate } from "./flowRunInputEditorStore-ys1-w9GW.js";
|
|
@@ -3108,7 +3108,7 @@ function ContextPanel({ className, layoutRoot, children, focusOnOpen, actions, h
|
|
|
3108
3108
|
"aria-hidden": "true",
|
|
3109
3109
|
children: /* @__PURE__ */ jsx("span", {
|
|
3110
3110
|
className: `flex items-center justify-center text-2xl [&>svg]:size-full! ${icon === "flow" ? "size-5" : "size-6"}`,
|
|
3111
|
-
children: /* @__PURE__ */ jsx(Icon, { name: icon })
|
|
3111
|
+
children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : icon
|
|
3112
3112
|
})
|
|
3113
3113
|
}), /* @__PURE__ */ jsx("strong", {
|
|
3114
3114
|
id: titleId,
|
|
@@ -31707,7 +31707,8 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
31707
31707
|
return position != null && (position.x !== node.position.x || position.y !== node.position.y);
|
|
31708
31708
|
});
|
|
31709
31709
|
const selection = selected.length === 1 ? revision.node(selected[0]) : void 0;
|
|
31710
|
-
const
|
|
31710
|
+
const selectedNode = selected.length === 1 ? model.nodes.find((node) => node.id === selected[0]) : void 0;
|
|
31711
|
+
const panelTitle = selectedNode?.title ?? (selected.length > 1 ? t("inspector.multipleSelected", { count: selected.length }) : t("inspector.outline"));
|
|
31711
31712
|
const restoreLayout = layoutChanged ? /* @__PURE__ */ jsxs(Button$1, {
|
|
31712
31713
|
className: "ml-auto",
|
|
31713
31714
|
size: "xs",
|
|
@@ -31787,8 +31788,14 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
31787
31788
|
layoutRoot: root,
|
|
31788
31789
|
className: "open-flow-property-panel",
|
|
31789
31790
|
theme,
|
|
31790
|
-
title:
|
|
31791
|
-
icon:
|
|
31791
|
+
title: panelTitle,
|
|
31792
|
+
icon: selectedNode == null ? "flow" : selectedNode.kind === "comment" ? /* @__PURE__ */ jsx("i", {
|
|
31793
|
+
"aria-hidden": "true",
|
|
31794
|
+
className: "i-codicon:note size-full"
|
|
31795
|
+
}) : /* @__PURE__ */ jsx(CanvasNodeIcon, {
|
|
31796
|
+
...selectedNode,
|
|
31797
|
+
className: "size-full"
|
|
31798
|
+
}),
|
|
31792
31799
|
focusOnOpen: true,
|
|
31793
31800
|
onClose: () => setInspectorOpen(false),
|
|
31794
31801
|
children: selection != null ? /* @__PURE__ */ jsx(NodeInspector, {
|
|
@@ -31798,12 +31805,12 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
31798
31805
|
theme,
|
|
31799
31806
|
connectorProviders: providerMetadata,
|
|
31800
31807
|
triggerDisplays
|
|
31801
|
-
}, `${graphId}:${selection.id}`) :
|
|
31802
|
-
title:
|
|
31803
|
-
content:
|
|
31808
|
+
}, `${graphId}:${selection.id}`) : selectedNode?.kind === "comment" ? /* @__PURE__ */ jsx(CommentInspector, {
|
|
31809
|
+
title: selectedNode.title,
|
|
31810
|
+
content: selectedNode.content ?? "",
|
|
31804
31811
|
dark: theme === "dark",
|
|
31805
31812
|
readOnly: true
|
|
31806
|
-
},
|
|
31813
|
+
}, selectedNode.id) : /* @__PURE__ */ jsx(FlowNodeList, {
|
|
31807
31814
|
nodes: selected.length > 1 ? model.nodes.filter((node) => selected.includes(node.id)) : model.nodes,
|
|
31808
31815
|
onSelect: (id) => setSelected([id]),
|
|
31809
31816
|
onFocusNode: (nodeId) => {
|
package/dist/browser/preview.css
CHANGED
|
@@ -1191,6 +1191,11 @@
|
|
|
1191
1191
|
height: 18px;
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .size-full {
|
|
1195
|
+
width: 100%;
|
|
1196
|
+
height: 100%;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1194
1199
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .h-1 {
|
|
1195
1200
|
height: var(--spacing);
|
|
1196
1201
|
}
|
package/dist/browser/preview.js
CHANGED
|
@@ -67646,7 +67646,7 @@ function ContextPanel({ className, layoutRoot, children, focusOnOpen, actions, h
|
|
|
67646
67646
|
"aria-hidden": "true",
|
|
67647
67647
|
children: /* @__PURE__ */ jsx("span", {
|
|
67648
67648
|
className: `flex items-center justify-center text-2xl [&>svg]:size-full! ${icon === "flow" ? "size-5" : "size-6"}`,
|
|
67649
|
-
children: /* @__PURE__ */ jsx(Icon, { name: icon })
|
|
67649
|
+
children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : icon
|
|
67650
67650
|
})
|
|
67651
67651
|
}), /* @__PURE__ */ jsx("strong", {
|
|
67652
67652
|
id: titleId,
|
|
@@ -119316,22 +119316,6 @@ function WebhookResponseEditor({ entries, disabled, readOnly, variables, renderS
|
|
|
119316
119316
|
}
|
|
119317
119317
|
//#endregion
|
|
119318
119318
|
//#region src/workbench/browser/runtime/editor/nodeInspector.tsx
|
|
119319
|
-
function inspectorIcon(node) {
|
|
119320
|
-
if (node?.kind == "trigger") return "trigger";
|
|
119321
|
-
if (node?.kind == "condition") return "condition";
|
|
119322
|
-
if (node?.kind == "value") return "value";
|
|
119323
|
-
if (node?.kind == "approval") return "check";
|
|
119324
|
-
if (node?.kind == "wait") return "wait";
|
|
119325
|
-
if (node?.kind === "webhook-response") return "response";
|
|
119326
|
-
if (node?.kind == "outputs") return "outputs";
|
|
119327
|
-
if (node?.kind == "task" && node.definition != null && "executor" in node.definition) {
|
|
119328
|
-
if (node.definition.executor.kind == "decision") return "decision";
|
|
119329
|
-
if (node.definition.executor.kind == "workflow") return "flow";
|
|
119330
|
-
if (node.definition.executor.kind == "openapi" || node.definition.executor.kind == "http-request" || node.definition.executor.kind == "skip-duplicates") return "task";
|
|
119331
|
-
return node.definition.executor.kind == "connector" || node.definition.executor.kind === "connector-proxy" ? "connection" : "llm";
|
|
119332
|
-
}
|
|
119333
|
-
return "task";
|
|
119334
|
-
}
|
|
119335
119319
|
function nodePurposePlaceholder(selection, t, action, displays) {
|
|
119336
119320
|
switch (selection.kind) {
|
|
119337
119321
|
case "webhook-response": return t("addNode.webhookResponseDescription");
|
|
@@ -120310,7 +120294,8 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
120310
120294
|
return position != null && (position.x !== node.position.x || position.y !== node.position.y);
|
|
120311
120295
|
});
|
|
120312
120296
|
const selection = selected.length === 1 ? revision.node(selected[0]) : void 0;
|
|
120313
|
-
const
|
|
120297
|
+
const selectedNode = selected.length === 1 ? model.nodes.find((node) => node.id === selected[0]) : void 0;
|
|
120298
|
+
const panelTitle = selectedNode?.title ?? (selected.length > 1 ? t("inspector.multipleSelected", { count: selected.length }) : t("inspector.outline"));
|
|
120314
120299
|
const restoreLayout = layoutChanged ? /* @__PURE__ */ jsxs(Button$1, {
|
|
120315
120300
|
className: "ml-auto",
|
|
120316
120301
|
size: "xs",
|
|
@@ -120390,8 +120375,14 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
120390
120375
|
layoutRoot: root,
|
|
120391
120376
|
className: "open-flow-property-panel",
|
|
120392
120377
|
theme,
|
|
120393
|
-
title:
|
|
120394
|
-
icon:
|
|
120378
|
+
title: panelTitle,
|
|
120379
|
+
icon: selectedNode == null ? "flow" : selectedNode.kind === "comment" ? /* @__PURE__ */ jsx("i", {
|
|
120380
|
+
"aria-hidden": "true",
|
|
120381
|
+
className: "i-codicon:note size-full"
|
|
120382
|
+
}) : /* @__PURE__ */ jsx(CanvasNodeIcon, {
|
|
120383
|
+
...selectedNode,
|
|
120384
|
+
className: "size-full"
|
|
120385
|
+
}),
|
|
120395
120386
|
focusOnOpen: true,
|
|
120396
120387
|
onClose: () => setInspectorOpen(false),
|
|
120397
120388
|
children: selection != null ? /* @__PURE__ */ jsx(NodeInspector, {
|
|
@@ -120401,12 +120392,12 @@ function RevisionCanvas({ draft, presentation, theme, interactiveMode$, defaultI
|
|
|
120401
120392
|
theme,
|
|
120402
120393
|
connectorProviders: providerMetadata,
|
|
120403
120394
|
triggerDisplays
|
|
120404
|
-
}, `${graphId}:${selection.id}`) :
|
|
120405
|
-
title:
|
|
120406
|
-
content:
|
|
120395
|
+
}, `${graphId}:${selection.id}`) : selectedNode?.kind === "comment" ? /* @__PURE__ */ jsx(CommentInspector, {
|
|
120396
|
+
title: selectedNode.title,
|
|
120397
|
+
content: selectedNode.content ?? "",
|
|
120407
120398
|
dark: theme === "dark",
|
|
120408
120399
|
readOnly: true
|
|
120409
|
-
},
|
|
120400
|
+
}, selectedNode.id) : /* @__PURE__ */ jsx(FlowNodeList, {
|
|
120410
120401
|
nodes: selected.length > 1 ? model.nodes.filter((node) => selected.includes(node.id)) : model.nodes,
|
|
120411
120402
|
onSelect: (id) => setSelected([id]),
|
|
120412
120403
|
onFocusNode: (nodeId) => {
|
package/dist/browser/ui.css
CHANGED
|
@@ -1191,6 +1191,11 @@
|
|
|
1191
1191
|
height: 18px;
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .size-full {
|
|
1195
|
+
width: 100%;
|
|
1196
|
+
height: 100%;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1194
1199
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .h-1 {
|
|
1195
1200
|
height: var(--spacing);
|
|
1196
1201
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { WorkflowBundleImportResult } from '../common/control-api.js';
|
|
2
3
|
import type { FlowCatalogEvent, FlowChangeEvent } from './flow-notifications.js';
|
|
3
4
|
import type { WorkflowBundle } from '../common/flow-workflowBundle.js';
|
|
@@ -56,11 +57,12 @@ export interface WorkbenchPreferences {
|
|
|
56
57
|
/** The host resolves deployment and Flow scope before rendering navigation links. */
|
|
57
58
|
export type ConnectionHref = (flowId: string, providerId: string, connectionId?: string) => string | undefined;
|
|
58
59
|
/** Object values are complete response/ETag records; implementations must reject failures. */
|
|
59
|
-
/** File content already loaded by the host
|
|
60
|
+
/** File content already loaded by the host. */
|
|
60
61
|
export interface WorkbenchImportInput {
|
|
61
62
|
readonly text: string;
|
|
62
63
|
readonly fileName?: string;
|
|
63
|
-
|
|
64
|
+
/** Host-rendered content below the import dialog title. The host owns its links and presentation. */
|
|
65
|
+
readonly description?: ReactNode;
|
|
64
66
|
}
|
|
65
67
|
export interface OpenFlowWorkbenchHandle {
|
|
66
68
|
/** Opens confirmation on an idle, initialized Flow list. Invalid files notify the host. Does not create a Flow. */
|
|
@@ -3032,6 +3032,11 @@ html[data-overlayscrollbars-viewport~=scrollbarHidden] > body::-webkit-scrollbar
|
|
|
3032
3032
|
height: 18px;
|
|
3033
3033
|
}
|
|
3034
3034
|
|
|
3035
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .size-full {
|
|
3036
|
+
width: 100%;
|
|
3037
|
+
height: 100%;
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3035
3040
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .h-1 {
|
|
3036
3041
|
height: var(--spacing);
|
|
3037
3042
|
}
|
|
@@ -3,7 +3,7 @@ import { a as derive, i as compute, l as val } from "./dist-bO8nvHFH.js";
|
|
|
3
3
|
import { c as useLang, l as useTranslate, o as I18nProvider, u as useVal } from "./dist-BFmpkX4P.js";
|
|
4
4
|
import { Cr as cn, i as TooltipTrigger, n as TooltipContent, t as Tooltip, xr as Button } from "./tooltip-BZ6tpqnr.js";
|
|
5
5
|
import { Bt as schemaObject, C as upgradeManualTrigger, Dt as connectorProxyTask, M as mapConditionSources, N as nodeInputMappings, Rt as matchesSchema, S as resourceNameIssue, Yt as dequal, _ as applyFlowChanges, a as DialogFooter, bt as connectorProxyConfigSchema, d as Field, g as FlowChangeError, h as FieldLabel, hn as Input, i as DialogDescription, l as Icon, m as FieldGroup, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner, v as isTriggerNode, w as upgradeRevisionContent } from "./dialog-Bi-MVTGj.js";
|
|
6
|
-
import { $ as resourceValue, $n as allConnectorConnectionsQuery, $t as WorkflowExportDialog, At as actionWithConnections, Bn as EmptyMedia, Br as ApiError, Bt as setNodeContentHidden, C as updateValue, Ct as flowResourceReferences, Et as diagnosticItems, Fn as InputGroupInput, Ft as removeComments, Gt as setCodeActions, Hn as Badge, Ht as setVerticalNodeWidth, In as Empty, It as restoreCanvasPresentation, J as scopedValue, Jt as setServiceConnections, K as combineSources, Kn as createI18n, Kt as setConnectorConnection, Ln as EmptyContent, Lt as setCanvasLayout, Mn as followWorkbenchLink, Mt as canvasPresentationChange, Nn as InputGroup, Nt as commentIds, Pn as InputGroupAddon, Pr as workflowCandidate, Pt as flowPresentation, Q as resourceData, Qn as randomId, Qt as WorkflowBundleSummary, Rn as EmptyDescription, Rr as invalidResponse, Rt as setComment, S as updateTriggerConfig, St as revisionView, Tt as deriveInspectorDiagnostics, U as addNodeIntent, Un as EventSourcesPage, Ut as repairNodeNames, Vn as EmptyTitle, Vr as controlErrorCode, Vt as setNodePositions, W as deriveAddNodeOptions, Wt as resetInputValues, X as CacheResource, Xn as WorkbenchClient, Xt as updateTriggerSchedule, Y as connectorActionPresentation, Yn as errorNotice, Yt as updateStartInputDefs, Zn as normalizeFlowQuery, Zt as dequal$1, _ as updateRequestParameters, _r as workflowBundleFromPreview, a as nameCreatedNodes, an as FlowTagChips, at as getActionsCache, b as updateTaskAdditionalInputs, br as workflowNameFromFile, c as setInputVariable, cr as normalizeTriggerOutputs, ct as getProvidersCache, d as updateCondition, en as WorkflowExportMenuItem, et as action, f as updateNodeDescription, fr as isJsonValue, ft as designerGraph, g as updateOutputPorts, gr as parseWorkflowImportFile, h as updateNodeSettings, hr as encodeWorkflowBundle, i as deleteSelection, in as FlowSettingsDialog, jn as useFlowQuery, jt as connectionCatalog, l as setTriggerConnection, lr as sampleErrorOutputs, lt as createPersistentCache, m as updateNodeName, mr as connectorActionMetadata, nn as IdTooltip, nt as proxyResponse, o as selectWebhookResponse, on as TagPicker, p as updateNodeIcon, pr as connection, qt as setInputSources, r as applyFlowChanges$1, rt as validateAction, s as setInputValue, st as getConnectionsCache, t as addNode, tn as useWorkflowExportAction, tr as decodeTriggerCatalog, tt as provider, u as setTriggerEventSource, ur as triggerOutputDefinitions, ut as createSessionCache, v as updateResolution, vr as encodeWorkflowFile, vt as providerIcon, w as updateWebhook, wt as Latest, x as updateTaskPorts, y as updateTask, yr as workflowFileName, yt as RunStore, zn as EmptyHeader, zr as record, zt as setFlowViewport } from "./flowChanges-
|
|
6
|
+
import { $ as resourceValue, $n as allConnectorConnectionsQuery, $t as WorkflowExportDialog, At as actionWithConnections, Bn as EmptyMedia, Br as ApiError, Bt as setNodeContentHidden, C as updateValue, Ct as flowResourceReferences, Et as diagnosticItems, Fn as InputGroupInput, Ft as removeComments, Gt as setCodeActions, Hn as Badge, Ht as setVerticalNodeWidth, In as Empty, It as restoreCanvasPresentation, J as scopedValue, Jt as setServiceConnections, K as combineSources, Kn as createI18n, Kt as setConnectorConnection, Ln as EmptyContent, Lt as setCanvasLayout, Mn as followWorkbenchLink, Mt as canvasPresentationChange, Nn as InputGroup, Nt as commentIds, Pn as InputGroupAddon, Pr as workflowCandidate, Pt as flowPresentation, Q as resourceData, Qn as randomId, Qt as WorkflowBundleSummary, Rn as EmptyDescription, Rr as invalidResponse, Rt as setComment, S as updateTriggerConfig, St as revisionView, Tt as deriveInspectorDiagnostics, U as addNodeIntent, Un as EventSourcesPage, Ut as repairNodeNames, Vn as EmptyTitle, Vr as controlErrorCode, Vt as setNodePositions, W as deriveAddNodeOptions, Wt as resetInputValues, X as CacheResource, Xn as WorkbenchClient, Xt as updateTriggerSchedule, Y as connectorActionPresentation, Yn as errorNotice, Yt as updateStartInputDefs, Zn as normalizeFlowQuery, Zt as dequal$1, _ as updateRequestParameters, _r as workflowBundleFromPreview, a as nameCreatedNodes, an as FlowTagChips, at as getActionsCache, b as updateTaskAdditionalInputs, br as workflowNameFromFile, c as setInputVariable, cr as normalizeTriggerOutputs, ct as getProvidersCache, d as updateCondition, en as WorkflowExportMenuItem, et as action, f as updateNodeDescription, fr as isJsonValue, ft as designerGraph, g as updateOutputPorts, gr as parseWorkflowImportFile, h as updateNodeSettings, hr as encodeWorkflowBundle, i as deleteSelection, in as FlowSettingsDialog, jn as useFlowQuery, jt as connectionCatalog, l as setTriggerConnection, lr as sampleErrorOutputs, lt as createPersistentCache, m as updateNodeName, mr as connectorActionMetadata, nn as IdTooltip, nt as proxyResponse, o as selectWebhookResponse, on as TagPicker, p as updateNodeIcon, pr as connection, qt as setInputSources, r as applyFlowChanges$1, rt as validateAction, s as setInputValue, st as getConnectionsCache, t as addNode, tn as useWorkflowExportAction, tr as decodeTriggerCatalog, tt as provider, u as setTriggerEventSource, ur as triggerOutputDefinitions, ut as createSessionCache, v as updateResolution, vr as encodeWorkflowFile, vt as providerIcon, w as updateWebhook, wt as Latest, x as updateTaskPorts, y as updateTask, yr as workflowFileName, yt as RunStore, zn as EmptyHeader, zr as record, zt as setFlowViewport } from "./flowChanges-CnOOPJJR.js";
|
|
7
7
|
import { a as uiLanguages, i as uiLanguageNames, n as isUiLanguage, r as resolveUiLanguage, t as importedWorkflowName } from "./languages-gYzoQqCi.js";
|
|
8
8
|
import { i as objectValue, n as isJsonValue$1, s as valueType, t as initialValue } from "./value-BbFQZZ_V.js";
|
|
9
9
|
import { Suspense, forwardRef, lazy, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -520,7 +520,7 @@ function FlowDeletionDialog({ flow, workspace, container, busy, finalFocus, onCl
|
|
|
520
520
|
}
|
|
521
521
|
//#endregion
|
|
522
522
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
523
|
-
var CreateResourceDialog = lazy(() => import("./createResourceDialog-
|
|
523
|
+
var CreateResourceDialog = lazy(() => import("./createResourceDialog-BstGO0m4.js"));
|
|
524
524
|
var flowIdTooltipAlignOffset = 44;
|
|
525
525
|
var renamePopoverAlignOffset = -12;
|
|
526
526
|
function compactFlowId(flowId) {
|
|
@@ -983,7 +983,7 @@ var FlowBrowser = forwardRef(function FlowBrowser({ catalogWidth, createFlowDisa
|
|
|
983
983
|
kind: "import",
|
|
984
984
|
file,
|
|
985
985
|
key: randomId(),
|
|
986
|
-
|
|
986
|
+
description: input.description
|
|
987
987
|
});
|
|
988
988
|
return "opened";
|
|
989
989
|
}
|
|
@@ -1235,6 +1235,7 @@ var FlowBrowser = forwardRef(function FlowBrowser({ catalogWidth, createFlowDisa
|
|
|
1235
1235
|
creation != null && /* @__PURE__ */ jsx(Suspense, {
|
|
1236
1236
|
fallback: null,
|
|
1237
1237
|
children: /* @__PURE__ */ jsx(CreateResourceDialog, {
|
|
1238
|
+
description: creation.kind == "import" ? creation.description : void 0,
|
|
1238
1239
|
disabled: createFlowDisabled || creatingTag,
|
|
1239
1240
|
tagField: (container) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: t("tags.title") }), /* @__PURE__ */ jsx(TagPicker, {
|
|
1240
1241
|
...tagsContext,
|
|
@@ -1262,7 +1263,6 @@ var FlowBrowser = forwardRef(function FlowBrowser({ catalogWidth, createFlowDisa
|
|
|
1262
1263
|
},
|
|
1263
1264
|
onSubmit: (event) => void create(event),
|
|
1264
1265
|
pending: busy == "flow",
|
|
1265
|
-
sourceUrl: creation.kind == "import" ? creation.sourceUrl : void 0,
|
|
1266
1266
|
submitLabel: creation.kind == "import" ? t("resource.importFlow") : void 0,
|
|
1267
1267
|
title: t(creation.kind == "create" ? "resource.newFlow" : "resource.importFlow")
|
|
1268
1268
|
})
|
|
@@ -7314,7 +7314,7 @@ var WorkbenchStore = class {
|
|
|
7314
7314
|
};
|
|
7315
7315
|
//#endregion
|
|
7316
7316
|
//#region src/workbench/browser/runtime/openFlowWorkbench.tsx
|
|
7317
|
-
var FlowWorkspace = lazy(() => import("./flowWorkspace-
|
|
7317
|
+
var FlowWorkspace = lazy(() => import("./flowWorkspace-d9Ef-aRK.js"));
|
|
7318
7318
|
function OpenFlowSessionGate({ action, description, error, onSubmit, onTokenChange, pending = false, title, token, tokenLabel }) {
|
|
7319
7319
|
const hasToken = token != null && tokenLabel != null && onTokenChange != null;
|
|
7320
7320
|
const tokenValue = token ?? "";
|