@powerhousedao/workflow 6.2.3-dev.80 → 6.2.3-dev.81
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/{BlockSelector-DFX-DZHl.js → BlockSelector-DHVzUGjW.js} +3 -3
- package/dist/browser/BlockSelector-DHVzUGjW.js.map +1 -0
- package/dist/browser/{connection-Ci_pI3kD.js → connection-PaKXHYz9.js} +2 -2
- package/dist/browser/{connection-Ci_pI3kD.js.map → connection-PaKXHYz9.js.map} +1 -1
- package/dist/browser/{connection-form-BuW6qOAF.js → connection-form-D2qAEHsl.js} +33 -13
- package/dist/browser/connection-form-D2qAEHsl.js.map +1 -0
- package/dist/browser/{data-tree-BLn565V5.js → data-tree-BOuPR-2J.js} +2 -2
- package/dist/browser/{data-tree-BLn565V5.js.map → data-tree-BOuPR-2J.js.map} +1 -1
- package/dist/browser/document-models/connection/index.js +2 -2
- package/dist/browser/document-models/index.js +3 -3
- package/dist/browser/document-models/workflow/index.js +2 -2
- package/dist/browser/{document-models-DUSvG-I2.js → document-models-DSK5cn8B.js} +6 -3
- package/dist/browser/{document-models-DUSvG-I2.js.map → document-models-DSK5cn8B.js.map} +1 -1
- package/dist/browser/{editor-NLSJ5rWx.js → editor--59WtNaj.js} +265 -84
- package/dist/browser/editor--59WtNaj.js.map +1 -0
- package/dist/browser/{editor-BhHN0OWh.js → editor-0XPrGeLT.js} +8 -8
- package/dist/browser/{editor-BhHN0OWh.js.map → editor-0XPrGeLT.js.map} +1 -1
- package/dist/browser/{editor-CnW8q20z.js → editor-BD-5ClkW.js} +6 -6
- package/dist/browser/{editor-CnW8q20z.js.map → editor-BD-5ClkW.js.map} +1 -1
- package/dist/browser/editors/connection-editor/module.js +1 -1
- package/dist/browser/editors/runtime/index.js +1 -1
- package/dist/browser/editors/workflow-editor/module.js +1 -1
- package/dist/browser/editors/workflow-studio/module.js +1 -1
- package/dist/browser/index.js +5 -5
- package/dist/browser/{module-FuSfFXPT.js → module-DJz6oTX0.js} +56 -56
- package/dist/browser/module-DJz6oTX0.js.map +1 -0
- package/dist/browser/{module-DxRdnkW2.js → module-eOpxJVIl.js} +2 -2
- package/dist/browser/{module-DxRdnkW2.js.map → module-eOpxJVIl.js.map} +1 -1
- package/dist/{node/piece-auth-BS5CtQOG.mjs → browser/piece-auth-63iuNFTs.js} +11 -3
- package/dist/browser/piece-auth-63iuNFTs.js.map +1 -0
- package/dist/browser/reactor/index.js +2 -2
- package/dist/browser/{runtime-queries-C9SoXGm2.js → runtime-queries-LAcyniYz.js} +18 -7
- package/dist/browser/runtime-queries-LAcyniYz.js.map +1 -0
- package/dist/browser/{trigger-text-BIeZ9W1H.js → trigger-text-Co-dn9x-.js} +4 -4
- package/dist/browser/trigger-text-Co-dn9x-.js.map +1 -0
- package/dist/browser/upgrade-manifests-CLYUPqBs.js +8 -0
- package/dist/browser/{upgrade-manifests-bahiFXsr.js.map → upgrade-manifests-CLYUPqBs.js.map} +1 -1
- package/dist/browser/{workflow-DZt1eS1f.js → workflow-Cn1UP-eJ.js} +2 -2
- package/dist/browser/{workflow-DZt1eS1f.js.map → workflow-Cn1UP-eJ.js.map} +1 -1
- package/dist/node/{BlockSelector-DosVPXzD.mjs → BlockSelector-D2UAnFpN.mjs} +3 -3
- package/dist/node/{BlockSelector-DosVPXzD.mjs.map → BlockSelector-D2UAnFpN.mjs.map} +1 -1
- package/dist/node/{connection-i6ISRY0F.mjs → connection-BZxipUlb.mjs} +2 -2
- package/dist/node/{connection-i6ISRY0F.mjs.map → connection-BZxipUlb.mjs.map} +1 -1
- package/dist/node/{connection-form-Z-pLxxrT.mjs → connection-form-Btmejfyn.mjs} +33 -13
- package/dist/node/connection-form-Btmejfyn.mjs.map +1 -0
- package/dist/node/{data-tree-CqBvXMpm.mjs → data-tree-rZiK2Ev-.mjs} +2 -2
- package/dist/node/{data-tree-CqBvXMpm.mjs.map → data-tree-rZiK2Ev-.mjs.map} +1 -1
- package/dist/node/document-models/connection/index.mjs +2 -2
- package/dist/node/document-models/index.mjs +2 -2
- package/dist/node/{editor-D9S3pWvR.mjs → editor-C_eWGGi8.mjs} +5 -5
- package/dist/node/{editor-D9S3pWvR.mjs.map → editor-C_eWGGi8.mjs.map} +1 -1
- package/dist/node/{editor-D4-ZHfHJ.mjs → editor-ChJMxbeM.mjs} +7 -7
- package/dist/node/{editor-D4-ZHfHJ.mjs.map → editor-ChJMxbeM.mjs.map} +1 -1
- package/dist/node/{editor-C3OhQ_xs.mjs → editor-U6trS0QO.mjs} +263 -82
- package/dist/node/editor-U6trS0QO.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.mjs +1 -1
- package/dist/node/editors/runtime/index.mjs +1 -1
- package/dist/node/editors/workflow-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-studio/module.mjs +1 -1
- package/dist/node/index.mjs +7 -4
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-weVJEMpP.mjs → module-BEEASith.mjs} +56 -56
- package/dist/node/module-BEEASith.mjs.map +1 -0
- package/dist/{browser/piece-auth-BS5CtQOG.js → node/piece-auth-C0u0XTO8.mjs} +11 -3
- package/dist/node/piece-auth-C0u0XTO8.mjs.map +1 -0
- package/dist/node/pieces/ai/descriptor.json +788 -0
- package/dist/node/pieces/ai/index.mjs +401 -0
- package/dist/node/pieces/ai/package.json +9 -0
- package/dist/node/pieces/index.mjs +3 -0
- package/dist/node/pieces/index.mjs.map +1 -1
- package/dist/node/pieces/reactor/descriptor.json +1 -1
- package/dist/node/pieces/reactor/index.mjs +39 -250
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/{runtime-queries-CJSpbsBq.mjs → runtime-queries-CmrHBPRw.mjs} +18 -7
- package/dist/node/runtime-queries-CmrHBPRw.mjs.map +1 -0
- package/dist/node/{trigger-text-CmYejeFN.mjs → trigger-text-CAiRCG2X.mjs} +4 -4
- package/dist/node/trigger-text-CAiRCG2X.mjs.map +1 -0
- package/dist/node/{upgrade-manifests-VF8Jt_YR.mjs → upgrade-manifests-C4akaA_X.mjs} +2 -2
- package/dist/node/{upgrade-manifests-VF8Jt_YR.mjs.map → upgrade-manifests-C4akaA_X.mjs.map} +1 -1
- package/dist/powerhouse.manifest.json +9 -1
- package/dist/style.css +1 -1
- package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/piece-auth.d.ts +6 -1
- package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-client.d.ts +3 -1
- package/dist/types/editors/workflow-editor/runtime-client.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-context.d.ts +1 -1
- package/dist/types/editors/workflow-editor/runtime-context.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PanelResizer.d.ts +12 -0
- package/dist/types/editors/workflow-editor/ui/PanelResizer.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/forms.d.ts +5 -0
- package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/item-summary.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/item-summary.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/retry-policy.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/retry-policy.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/retry-policy.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/retry-policy.test.d.ts.map +1 -0
- package/dist/types/pieces/ai/ai-actions.test.d.ts +2 -0
- package/dist/types/pieces/ai/ai-actions.test.d.ts.map +1 -0
- package/dist/types/pieces/ai/ai-documents.test.d.ts +2 -0
- package/dist/types/pieces/ai/ai-documents.test.d.ts.map +1 -0
- package/dist/types/pieces/ai/ai.test.d.ts +2 -0
- package/dist/types/pieces/ai/ai.test.d.ts.map +1 -0
- package/dist/types/pieces/ai/index.d.ts +7 -0
- package/dist/types/pieces/ai/index.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/action-schema.d.ts +11 -0
- package/dist/types/pieces/ai/lib/action-schema.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/ask-ai.d.ts +38 -0
- package/dist/types/pieces/ai/lib/actions/ask-ai.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/decide-on-documents.d.ts +45 -0
- package/dist/types/pieces/ai/lib/actions/decide-on-documents.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/decide.d.ts +39 -0
- package/dist/types/pieces/ai/lib/actions/decide.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/extract.d.ts +41 -0
- package/dist/types/pieces/ai/lib/actions/extract.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/propose-actions.d.ts +55 -0
- package/dist/types/pieces/ai/lib/actions/propose-actions.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/actions/summarize.d.ts +38 -0
- package/dist/types/pieces/ai/lib/actions/summarize.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/auth.d.ts +16 -0
- package/dist/types/pieces/ai/lib/auth.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/decision-model.d.ts +17 -0
- package/dist/types/pieces/ai/lib/decision-model.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/documents.d.ts +11 -0
- package/dist/types/pieces/ai/lib/documents.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/model-list.d.ts +8 -0
- package/dist/types/pieces/ai/lib/model-list.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/models.d.ts +19 -0
- package/dist/types/pieces/ai/lib/models.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/props.d.ts +16 -0
- package/dist/types/pieces/ai/lib/props.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/providers.d.ts +9 -0
- package/dist/types/pieces/ai/lib/providers.d.ts.map +1 -0
- package/dist/types/pieces/ai/lib/questions.d.ts +7 -0
- package/dist/types/pieces/ai/lib/questions.d.ts.map +1 -0
- package/dist/types/pieces/index.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-find.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/document-find.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-types.d.ts +3 -1
- package/dist/types/pieces/reactor/lib/actions/document-types.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/index-query.d.ts +4 -2
- package/dist/types/pieces/reactor/lib/actions/index-query.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/input-schema.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/reactor.d.ts +12 -0
- package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/writes.d.ts +7 -0
- package/dist/types/pieces/reactor/lib/writes.d.ts.map +1 -0
- package/dist/types/scripts/ui-stack.d.ts +8 -2
- package/dist/types/scripts/ui-stack.d.ts.map +1 -1
- package/package.json +15 -8
- package/dist/browser/BlockSelector-DFX-DZHl.js.map +0 -1
- package/dist/browser/connection-form-BuW6qOAF.js.map +0 -1
- package/dist/browser/editor-NLSJ5rWx.js.map +0 -1
- package/dist/browser/module-FuSfFXPT.js.map +0 -1
- package/dist/browser/piece-auth-BS5CtQOG.js.map +0 -1
- package/dist/browser/runtime-queries-C9SoXGm2.js.map +0 -1
- package/dist/browser/trigger-text-BIeZ9W1H.js.map +0 -1
- package/dist/browser/upgrade-manifests-bahiFXsr.js +0 -8
- package/dist/node/connection-form-Z-pLxxrT.mjs.map +0 -1
- package/dist/node/editor-C3OhQ_xs.mjs.map +0 -1
- package/dist/node/module-weVJEMpP.mjs.map +0 -1
- package/dist/node/piece-auth-BS5CtQOG.mjs.map +0 -1
- package/dist/node/runtime-queries-CJSpbsBq.mjs.map +0 -1
- package/dist/node/trigger-text-CmYejeFN.mjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { y as actions$1 } from "./module-
|
|
6
|
-
import { t as useSelectedWorkflowDocument } from "./workflow-
|
|
7
|
-
import { $ as useTestStepRunner, At as IconButton, B as useBlockForms, Bt as Icon, Dt as FieldError, E as formatDuration, Et as Button, F as toneOf, G as useDesignTime, H as useBlockResolutions, Ht as DocumentErrorBoundary, J as useDynamicPrefetch, K as useDynamicCache, L as DesignTimeProvider, Lt as invalidClass, Mt as Select, Nt as Switch, Ot as FieldLabel, Pt as Tabs, Q as useRunById, R as useBlockForm, Rt as textAreaClass, S as TONE_TEXT, T as formatAbsolute, U as useCachedBlockForm, V as useBlockPorts, Vt as isIconName, W as useConnectionList, X as useOptionSearch, Y as useLatestRun, Z as useResolvedProp, a as BlockResolutionsProvider, at as parsePropList, bt as useRuntime, c as runsDifferentVersion, ct as storedSchema, d as versionBadge, dt as withSetting, et as useTestTrigger, f as blockMeta, ft as workflowReadiness, g as usePieceLogos, h as useBlockMeta, i as PickerPopover, it as isPropVisible, jt as Segmented, k as formatWhen, kt as Hint, l as updateVersion, lt as stripOptions, m as pieceLogo, n as BlockSelector, nt as blockMissing, o as VersionSummary, ot as resolverInputFor, p as pieceDisplayName, pt as WorkflowRuntimeProvider, q as useDynamicLookup, r as PICKER_SIZE, rt as isEmptyValue, s as resolutionText, st as settingFor, t as BlockLogo, tt as useWebhookEndpoint, u as useResolution, ut as undeclaredPortIssues, wt as useSearchParam, x as TONE_DOT, xt as useRuntimeActions, y as RUN_TONE, yt as useRunsQuery, z as useBlockFormLoader, zt as textInputClass } from "./BlockSelector-
|
|
8
|
-
import { a as useSignInGate, f as connectionCallbacks, g as newUndoGroup, h as groupedAction, i as useReactorAccessDenial, l as reactorConnections, m as UndoRedo, n as SignInPrompt, o as missingInPublished, p as BackButton, r as usePublisher, s as runsAsText, t as ConnectionForm } from "./connection-form-
|
|
9
|
-
import { _ as uniqueStepKey, a as StepError, c as PublishButton, d as ReactorDenialNote, f as StatusToggle, g as hasDraftChanges, h as VARIABLES_VIEW, i as DataViewer, l as PublishState, m as STEP_PARAM, n as describeSchedule, o as DraftBanner, p as usePublish, r as describeTrigger, s as ManagedBanner, t as describeCron, u as PublishedMissingNote } from "./trigger-text-
|
|
1
|
+
import { h as REACTOR_CONNECTOR_ID, x as actions } from "./module-DJz6oTX0.js";
|
|
2
|
+
import { t as useConnectionDocumentById } from "./connection-PaKXHYz9.js";
|
|
3
|
+
import { i as connectorIdForPiece, l as planFromAuth, s as packageFromConnectorId } from "./piece-auth-63iuNFTs.js";
|
|
4
|
+
import { B as stepFields, H as triggerFields, I as isCoreBlock, N as STEP_PRESETS, P as TRIGGER_PRESETS, R as sameBlock, V as triggerBlock, f as stepOutputTreeQuery, h as blockRefKey, i as outputTreeQuery, n as catalogQuery, u as runsQuery, v as TEST_TRIGGER_KIND, y as realRuns, z as stepBlock } from "./runtime-queries-LAcyniYz.js";
|
|
5
|
+
import { y as actions$1 } from "./module-eOpxJVIl.js";
|
|
6
|
+
import { t as useSelectedWorkflowDocument } from "./workflow-Cn1UP-eJ.js";
|
|
7
|
+
import { $ as useTestStepRunner, At as IconButton, B as useBlockForms, Bt as Icon, Dt as FieldError, E as formatDuration, Et as Button, F as toneOf, G as useDesignTime, H as useBlockResolutions, Ht as DocumentErrorBoundary, J as useDynamicPrefetch, K as useDynamicCache, L as DesignTimeProvider, Lt as invalidClass, Mt as Select, Nt as Switch, Ot as FieldLabel, Pt as Tabs, Q as useRunById, R as useBlockForm, Rt as textAreaClass, S as TONE_TEXT, T as formatAbsolute, U as useCachedBlockForm, V as useBlockPorts, Vt as isIconName, W as useConnectionList, X as useOptionSearch, Y as useLatestRun, Z as useResolvedProp, a as BlockResolutionsProvider, at as parsePropList, bt as useRuntime, c as runsDifferentVersion, ct as storedSchema, d as versionBadge, dt as withSetting, et as useTestTrigger, f as blockMeta, ft as workflowReadiness, g as usePieceLogos, h as useBlockMeta, i as PickerPopover, it as isPropVisible, jt as Segmented, k as formatWhen, kt as Hint, l as updateVersion, lt as stripOptions, m as pieceLogo, n as BlockSelector, nt as blockMissing, o as VersionSummary, ot as resolverInputFor, p as pieceDisplayName, pt as WorkflowRuntimeProvider, q as useDynamicLookup, r as PICKER_SIZE, rt as isEmptyValue, s as resolutionText, st as settingFor, t as BlockLogo, tt as useWebhookEndpoint, u as useResolution, ut as undeclaredPortIssues, wt as useSearchParam, x as TONE_DOT, xt as useRuntimeActions, y as RUN_TONE, yt as useRunsQuery, z as useBlockFormLoader, zt as textInputClass } from "./BlockSelector-DHVzUGjW.js";
|
|
8
|
+
import { a as useSignInGate, f as connectionCallbacks, g as newUndoGroup, h as groupedAction, i as useReactorAccessDenial, l as reactorConnections, m as UndoRedo, n as SignInPrompt, o as missingInPublished, p as BackButton, r as usePublisher, s as runsAsText, t as ConnectionForm } from "./connection-form-D2qAEHsl.js";
|
|
9
|
+
import { _ as uniqueStepKey, a as StepError, c as PublishButton, d as ReactorDenialNote, f as StatusToggle, g as hasDraftChanges, h as VARIABLES_VIEW, i as DataViewer, l as PublishState, m as STEP_PARAM, n as describeSchedule, o as DraftBanner, p as usePublish, r as describeTrigger, s as ManagedBanner, t as describeCron, u as PublishedMissingNote } from "./trigger-text-Co-dn9x-.js";
|
|
10
10
|
import { addDocument, dispatchActions, useDocumentModelModules, useDocumentSafe, useFileNodesInSelectedDrive, useSelectedDriveId } from "@powerhousedao/reactor-browser";
|
|
11
|
-
import { DEFAULT_TIMEZONE, NEXT_PORT, documentRefsIn, expandDocumentRefs, flowPorts, knownPorts, parseScheduleConfig, scheduleConfigIssue } from "@powerhousedao/pieces-framework/workflow";
|
|
12
11
|
import { generateId } from "document-model";
|
|
12
|
+
import { DEFAULT_TIMEZONE, NEXT_PORT, documentRefsIn, expandDocumentRefs, flowPorts, knownPorts, parseScheduleConfig, scheduleConfigIssue } from "@powerhousedao/pieces-framework/workflow";
|
|
13
13
|
import { Fragment, Suspense, createContext, lazy, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
14
14
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { createPortal } from "react-dom";
|
|
@@ -98,6 +98,7 @@ function toModel(state) {
|
|
|
98
98
|
description: state.description ?? null,
|
|
99
99
|
status: state.status,
|
|
100
100
|
version: state.version,
|
|
101
|
+
defaultRetryAttempts: state.policy.defaultRetry.maxAttempts,
|
|
101
102
|
published: state.published ? {
|
|
102
103
|
version: state.published.version,
|
|
103
104
|
publishedAt: state.published.publishedAt,
|
|
@@ -1185,6 +1186,83 @@ function ExpressionTokenLine(props) {
|
|
|
1185
1186
|
}, index))
|
|
1186
1187
|
});
|
|
1187
1188
|
}
|
|
1189
|
+
const PANEL_DEFAULT_WIDTH = 416;
|
|
1190
|
+
const PANEL_MAX_SHARE = .7;
|
|
1191
|
+
const KEY_STEP = 16;
|
|
1192
|
+
const STORAGE_KEY = "workflow-editor:panel-width";
|
|
1193
|
+
function clampWidth(width) {
|
|
1194
|
+
const max = Math.max(352, Math.floor(window.innerWidth * PANEL_MAX_SHARE));
|
|
1195
|
+
return Math.min(max, Math.max(352, Math.round(width)));
|
|
1196
|
+
}
|
|
1197
|
+
function storedWidth() {
|
|
1198
|
+
try {
|
|
1199
|
+
const stored = Number(window.localStorage.getItem(STORAGE_KEY));
|
|
1200
|
+
return stored > 0 ? clampWidth(stored) : PANEL_DEFAULT_WIDTH;
|
|
1201
|
+
} catch {
|
|
1202
|
+
return PANEL_DEFAULT_WIDTH;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
function storeWidth(width) {
|
|
1206
|
+
try {
|
|
1207
|
+
window.localStorage.setItem(STORAGE_KEY, String(width));
|
|
1208
|
+
} catch {}
|
|
1209
|
+
}
|
|
1210
|
+
/** The side panel's width, remembered per browser. */
|
|
1211
|
+
function usePanelWidth() {
|
|
1212
|
+
const [width, setWidth] = useState(storedWidth);
|
|
1213
|
+
const resize = (next, persist) => {
|
|
1214
|
+
const clamped = clampWidth(next);
|
|
1215
|
+
setWidth(clamped);
|
|
1216
|
+
if (persist) storeWidth(clamped);
|
|
1217
|
+
};
|
|
1218
|
+
return {
|
|
1219
|
+
width,
|
|
1220
|
+
resize
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
/** A drag handle on the panel's left edge; arrow keys resize it too. */
|
|
1224
|
+
function PanelResizer(props) {
|
|
1225
|
+
const [dragging, setDragging] = useState(false);
|
|
1226
|
+
const onPointerDown = (event) => {
|
|
1227
|
+
if (event.button !== 0) return;
|
|
1228
|
+
event.preventDefault();
|
|
1229
|
+
const handle = event.currentTarget;
|
|
1230
|
+
handle.setPointerCapture(event.pointerId);
|
|
1231
|
+
const startX = event.clientX;
|
|
1232
|
+
const startWidth = props.width;
|
|
1233
|
+
const widthAt = (x) => startWidth + (startX - x);
|
|
1234
|
+
const move = (e) => props.onResize(widthAt(e.clientX), false);
|
|
1235
|
+
const up = (e) => {
|
|
1236
|
+
props.onResize(widthAt(e.clientX), true);
|
|
1237
|
+
setDragging(false);
|
|
1238
|
+
handle.removeEventListener("pointermove", move);
|
|
1239
|
+
handle.removeEventListener("pointerup", up);
|
|
1240
|
+
handle.removeEventListener("pointercancel", up);
|
|
1241
|
+
};
|
|
1242
|
+
setDragging(true);
|
|
1243
|
+
handle.addEventListener("pointermove", move);
|
|
1244
|
+
handle.addEventListener("pointerup", up);
|
|
1245
|
+
handle.addEventListener("pointercancel", up);
|
|
1246
|
+
};
|
|
1247
|
+
const onKeyDown = (event) => {
|
|
1248
|
+
const delta = event.key === "ArrowLeft" ? KEY_STEP : event.key === "ArrowRight" ? -16 : 0;
|
|
1249
|
+
if (!delta) return;
|
|
1250
|
+
event.preventDefault();
|
|
1251
|
+
props.onResize(props.width + delta, true);
|
|
1252
|
+
};
|
|
1253
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1254
|
+
role: "separator",
|
|
1255
|
+
"aria-orientation": "vertical",
|
|
1256
|
+
"aria-label": "Resize panel",
|
|
1257
|
+
"aria-valuenow": props.width,
|
|
1258
|
+
"aria-valuemin": 352,
|
|
1259
|
+
tabIndex: 0,
|
|
1260
|
+
onPointerDown,
|
|
1261
|
+
onKeyDown,
|
|
1262
|
+
onDoubleClick: () => props.onResize(PANEL_DEFAULT_WIDTH, true),
|
|
1263
|
+
className: `absolute inset-y-0 -left-1 z-20 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-0 after:left-[3px] after:w-0.5 after:transition-colors hover:after:bg-ring/60 focus-visible:after:bg-ring ${dragging ? "after:bg-ring" : ""}`
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1188
1266
|
//#endregion
|
|
1189
1267
|
//#region editors/workflow-editor/ui/ap-layout.ts
|
|
1190
1268
|
function reachableFrom(start, edges) {
|
|
@@ -2646,35 +2724,81 @@ function OptionSelect(props) {
|
|
|
2646
2724
|
onQueryChange: props.onQueryChange
|
|
2647
2725
|
});
|
|
2648
2726
|
}
|
|
2727
|
+
const SUMMARY_CHARS = 60;
|
|
2728
|
+
function itemSummary(fields, row) {
|
|
2729
|
+
const parts = [];
|
|
2730
|
+
for (const field of fields) {
|
|
2731
|
+
const value = row[field.name];
|
|
2732
|
+
if (value === true) {
|
|
2733
|
+
parts.push(field.displayName.toLowerCase());
|
|
2734
|
+
continue;
|
|
2735
|
+
}
|
|
2736
|
+
if (value === void 0 || value === null || value === false) continue;
|
|
2737
|
+
const option = field.staticOptions?.find((o) => o.value === value);
|
|
2738
|
+
const text = option ? option.label : stringifyValue$1(value).trim();
|
|
2739
|
+
if (!text) continue;
|
|
2740
|
+
parts.push(text.length > SUMMARY_CHARS ? `${text.slice(0, SUMMARY_CHARS)}…` : text);
|
|
2741
|
+
}
|
|
2742
|
+
return parts.join(" · ");
|
|
2743
|
+
}
|
|
2649
2744
|
function ArrayRows(props) {
|
|
2650
2745
|
const fields = props.prop.properties ?? [];
|
|
2651
2746
|
const rows = Array.isArray(props.value) ? props.value.map((item) => item !== null && typeof item === "object" ? item : {}) : [];
|
|
2747
|
+
const [open, setOpen] = useState(() => /* @__PURE__ */ new Set());
|
|
2748
|
+
const toggle = (index) => setOpen((current) => {
|
|
2749
|
+
const next = new Set(current);
|
|
2750
|
+
if (!next.delete(index)) next.add(index);
|
|
2751
|
+
return next;
|
|
2752
|
+
});
|
|
2652
2753
|
const update = (next) => props.onCommit(next.length > 0 ? next : void 0);
|
|
2754
|
+
const remove = (index) => {
|
|
2755
|
+
update(rows.filter((_, i) => i !== index));
|
|
2756
|
+
setOpen((current) => new Set([...current].filter((i) => i !== index).map((i) => i > index ? i - 1 : i)));
|
|
2757
|
+
};
|
|
2653
2758
|
return /* @__PURE__ */ jsxs("div", {
|
|
2654
|
-
className: `flex flex-col gap-
|
|
2655
|
-
children: [rows.map((row, index) =>
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2759
|
+
className: `flex flex-col gap-1.5 ${props.invalid ? "rounded-md ring-1 ring-wf-warn/50" : ""}`,
|
|
2760
|
+
children: [rows.map((row, index) => {
|
|
2761
|
+
const expanded = open.has(index);
|
|
2762
|
+
const summary = itemSummary(fields, row);
|
|
2763
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2764
|
+
className: "rounded-md border border-solid border-foreground/10 bg-muted/40",
|
|
2765
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2766
|
+
className: "flex items-center gap-1 py-1 pl-1 pr-1",
|
|
2767
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
2768
|
+
type: "button",
|
|
2769
|
+
"aria-expanded": expanded,
|
|
2770
|
+
onClick: () => toggle(index),
|
|
2771
|
+
className: "flex min-w-0 flex-1 items-center gap-1.5 rounded px-1 py-0.5 text-left text-[13px] hover:bg-foreground/5",
|
|
2772
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
2773
|
+
name: expanded ? "chevronDown" : "chevron",
|
|
2774
|
+
className: "h-3.5 w-3.5 shrink-0 text-muted-foreground"
|
|
2775
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2776
|
+
className: `truncate ${summary ? "text-foreground" : "text-muted-foreground"}`,
|
|
2777
|
+
children: summary || `Item ${index + 1}`
|
|
2778
|
+
})]
|
|
2779
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
2780
|
+
icon: "trash",
|
|
2781
|
+
label: `Remove item ${index + 1}`,
|
|
2782
|
+
onClick: () => remove(index)
|
|
2783
|
+
})]
|
|
2784
|
+
}), expanded ? /* @__PURE__ */ jsx("div", {
|
|
2785
|
+
className: "border-t border-solid border-foreground/10 px-3 pb-3 pt-2",
|
|
2786
|
+
children: /* @__PURE__ */ jsx(PropertyForm, {
|
|
2787
|
+
props: fields,
|
|
2788
|
+
value: row,
|
|
2789
|
+
onChange: (next) => update(rows.map((entry, i) => i === index ? next : entry)),
|
|
2790
|
+
scopeStepId: props.scopeStepId,
|
|
2791
|
+
nested: true
|
|
2792
|
+
})
|
|
2793
|
+
}) : null]
|
|
2794
|
+
}, index);
|
|
2795
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
2675
2796
|
size: "sm",
|
|
2676
2797
|
className: "self-start",
|
|
2677
|
-
onClick: () =>
|
|
2798
|
+
onClick: () => {
|
|
2799
|
+
update([...rows, withPropDefaults(fields, {})]);
|
|
2800
|
+
setOpen((current) => new Set(current).add(rows.length));
|
|
2801
|
+
},
|
|
2678
2802
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
2679
2803
|
name: "plus",
|
|
2680
2804
|
className: "h-3.5 w-3.5"
|
|
@@ -3566,7 +3690,7 @@ function PropertyForm(props) {
|
|
|
3566
3690
|
webhookUrl: props.webhookUrl
|
|
3567
3691
|
}, prop.name);
|
|
3568
3692
|
return /* @__PURE__ */ jsxs("div", {
|
|
3569
|
-
className: `flex flex-col ${props.nested ? "gap-
|
|
3693
|
+
className: `flex flex-col ${props.nested ? "gap-3" : "gap-5"}`,
|
|
3570
3694
|
onBlur: echo.onBlur,
|
|
3571
3695
|
children: [/* @__PURE__ */ jsx(PropLayout, {
|
|
3572
3696
|
props: essential,
|
|
@@ -3606,6 +3730,37 @@ function PropertyForm(props) {
|
|
|
3606
3730
|
}) : null]
|
|
3607
3731
|
});
|
|
3608
3732
|
}
|
|
3733
|
+
const DEFAULT_RETRY = {
|
|
3734
|
+
maxAttempts: 3,
|
|
3735
|
+
backoff: "EXPONENTIAL",
|
|
3736
|
+
initialDelaySeconds: 5,
|
|
3737
|
+
maxDelaySeconds: 300,
|
|
3738
|
+
retryOn: []
|
|
3739
|
+
};
|
|
3740
|
+
function clampInt(value, min, max) {
|
|
3741
|
+
if (!Number.isFinite(value)) return min;
|
|
3742
|
+
return Math.min(max, Math.max(min, Math.trunc(value)));
|
|
3743
|
+
}
|
|
3744
|
+
function normalizeRetry(policy) {
|
|
3745
|
+
const initialDelaySeconds = clampInt(policy.initialDelaySeconds, 0, 300);
|
|
3746
|
+
return {
|
|
3747
|
+
maxAttempts: clampInt(policy.maxAttempts, 1, 10),
|
|
3748
|
+
backoff: policy.backoff === "EXPONENTIAL" ? "EXPONENTIAL" : "FIXED",
|
|
3749
|
+
initialDelaySeconds,
|
|
3750
|
+
maxDelaySeconds: clampInt(policy.maxDelaySeconds, initialDelaySeconds, 300),
|
|
3751
|
+
retryOn: policy.retryOn.map((entry) => entry.trim()).filter(Boolean)
|
|
3752
|
+
};
|
|
3753
|
+
}
|
|
3754
|
+
function inheritedRetryHint(workflowAttempts, actionAttempts) {
|
|
3755
|
+
if (actionAttempts === void 0) return null;
|
|
3756
|
+
const workflow = clampInt(workflowAttempts ?? 1, 1, 10);
|
|
3757
|
+
if (workflow > 1) return `The workflow's default retry (up to ${workflow} attempts) applies, not this action's.`;
|
|
3758
|
+
const action = clampInt(actionAttempts, 1, 10);
|
|
3759
|
+
return action === 1 ? "This action runs once unless the step sets a retry." : `This action makes up to ${action} attempts unless the step sets a retry.`;
|
|
3760
|
+
}
|
|
3761
|
+
function parseRetryOn(raw) {
|
|
3762
|
+
return raw.split(",").map((entry) => entry.trim()).filter((entry) => entry !== "");
|
|
3763
|
+
}
|
|
3609
3764
|
//#endregion
|
|
3610
3765
|
//#region editors/workflow-editor/ui/schedule-draft.ts
|
|
3611
3766
|
const DEFAULT_TIME = "09:00";
|
|
@@ -4553,13 +4708,6 @@ function PanelHeader(props) {
|
|
|
4553
4708
|
]
|
|
4554
4709
|
});
|
|
4555
4710
|
}
|
|
4556
|
-
const DEFAULT_RETRY = {
|
|
4557
|
-
maxAttempts: 3,
|
|
4558
|
-
backoff: "EXPONENTIAL",
|
|
4559
|
-
initialDelaySeconds: 5,
|
|
4560
|
-
maxDelaySeconds: 300,
|
|
4561
|
-
retryOn: []
|
|
4562
|
-
};
|
|
4563
4711
|
function intOrUndefined(raw) {
|
|
4564
4712
|
const parsed = Number.parseInt(raw.trim(), 10);
|
|
4565
4713
|
return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
|
|
@@ -4574,13 +4722,18 @@ function NumberField(props) {
|
|
|
4574
4722
|
children: [/* @__PURE__ */ jsx("input", {
|
|
4575
4723
|
type: "number",
|
|
4576
4724
|
min: props.min,
|
|
4725
|
+
max: props.max,
|
|
4577
4726
|
className: `${textInputClass} ${props.unit ? "pr-16" : ""}`,
|
|
4578
4727
|
defaultValue: props.value ?? "",
|
|
4579
4728
|
placeholder: props.placeholder,
|
|
4580
4729
|
onBlur: (event) => {
|
|
4581
4730
|
const raw = event.target.value.trim();
|
|
4582
4731
|
if (raw === "") return props.onCommit(null);
|
|
4583
|
-
|
|
4732
|
+
let next = intOrUndefined(raw);
|
|
4733
|
+
if (next !== void 0 && props.max !== void 0 && next > props.max) {
|
|
4734
|
+
next = props.max;
|
|
4735
|
+
event.target.value = String(next);
|
|
4736
|
+
}
|
|
4584
4737
|
if (next !== void 0 && next >= (props.min ?? 0)) props.onCommit(next);
|
|
4585
4738
|
}
|
|
4586
4739
|
}, `${props.label}-${props.value ?? ""}`), props.unit ? /* @__PURE__ */ jsx("span", {
|
|
@@ -4594,10 +4747,10 @@ function NumberField(props) {
|
|
|
4594
4747
|
}
|
|
4595
4748
|
function RetryEditor(props) {
|
|
4596
4749
|
const retry = props.value;
|
|
4597
|
-
const patch = (partial) => props.onChange({
|
|
4750
|
+
const patch = (partial) => props.onChange(normalizeRetry({
|
|
4598
4751
|
...retry ?? DEFAULT_RETRY,
|
|
4599
4752
|
...partial
|
|
4600
|
-
});
|
|
4753
|
+
}));
|
|
4601
4754
|
return /* @__PURE__ */ jsxs("div", {
|
|
4602
4755
|
className: "flex flex-col gap-4",
|
|
4603
4756
|
children: [/* @__PURE__ */ jsx(Switch, {
|
|
@@ -4612,6 +4765,8 @@ function RetryEditor(props) {
|
|
|
4612
4765
|
label: "Attempts",
|
|
4613
4766
|
value: retry.maxAttempts,
|
|
4614
4767
|
min: 1,
|
|
4768
|
+
max: 10,
|
|
4769
|
+
hint: `Including the first run; up to 10.`,
|
|
4615
4770
|
onCommit: (next) => {
|
|
4616
4771
|
if (next !== null) patch({ maxAttempts: next });
|
|
4617
4772
|
}
|
|
@@ -4634,6 +4789,7 @@ function RetryEditor(props) {
|
|
|
4634
4789
|
label: "First delay",
|
|
4635
4790
|
unit: "seconds",
|
|
4636
4791
|
value: retry.initialDelaySeconds,
|
|
4792
|
+
max: 300,
|
|
4637
4793
|
onCommit: (next) => {
|
|
4638
4794
|
if (next !== null) patch({ initialDelaySeconds: next });
|
|
4639
4795
|
}
|
|
@@ -4642,6 +4798,8 @@ function RetryEditor(props) {
|
|
|
4642
4798
|
label: "Longest delay",
|
|
4643
4799
|
unit: "seconds",
|
|
4644
4800
|
value: retry.maxDelaySeconds,
|
|
4801
|
+
max: 300,
|
|
4802
|
+
hint: `Up to 300.`,
|
|
4645
4803
|
onCommit: (next) => {
|
|
4646
4804
|
if (next !== null) patch({ maxDelaySeconds: next });
|
|
4647
4805
|
}
|
|
@@ -4657,7 +4815,7 @@ function RetryEditor(props) {
|
|
|
4657
4815
|
className: `${textInputClass} font-mono text-xs`,
|
|
4658
4816
|
defaultValue: retry.retryOn.join(", "),
|
|
4659
4817
|
placeholder: "TRANSIENT, RATE_LIMIT",
|
|
4660
|
-
onBlur: (event) => patch({ retryOn: event.target.value
|
|
4818
|
+
onBlur: (event) => patch({ retryOn: parseRetryOn(event.target.value) })
|
|
4661
4819
|
}, `on-${retry.retryOn.join(",")}`),
|
|
4662
4820
|
/* @__PURE__ */ jsx(Hint, { children: "Error classes, comma-separated. Empty retries every error." })
|
|
4663
4821
|
]
|
|
@@ -4921,6 +5079,7 @@ function PieceVersionSection(props) {
|
|
|
4921
5079
|
}
|
|
4922
5080
|
function StepSettings(props) {
|
|
4923
5081
|
const { step, callbacks } = props;
|
|
5082
|
+
const retryHint = step.retry ? null : inheritedRetryHint(props.model.defaultRetryAttempts, props.actionDefaults?.retryAttempts);
|
|
4924
5083
|
return /* @__PURE__ */ jsxs("div", {
|
|
4925
5084
|
className: "flex flex-col gap-6",
|
|
4926
5085
|
children: [
|
|
@@ -4974,7 +5133,7 @@ function StepSettings(props) {
|
|
|
4974
5133
|
unit: "seconds",
|
|
4975
5134
|
min: 1,
|
|
4976
5135
|
value: step.timeoutSeconds,
|
|
4977
|
-
placeholder: "Runtime default",
|
|
5136
|
+
placeholder: props.actionDefaults?.timeoutSeconds ? `Action default: ${props.actionDefaults.timeoutSeconds}` : "Runtime default",
|
|
4978
5137
|
onCommit: (next) => {
|
|
4979
5138
|
if (next === 0) return;
|
|
4980
5139
|
if (next !== step.timeoutSeconds) callbacks.updateStep({
|
|
@@ -4983,26 +5142,28 @@ function StepSettings(props) {
|
|
|
4983
5142
|
});
|
|
4984
5143
|
}
|
|
4985
5144
|
}),
|
|
4986
|
-
|
|
5145
|
+
retryHint ? /* @__PURE__ */ jsx(Hint, { children: retryHint }) : null,
|
|
5146
|
+
props.errorHandling?.retryOnFailure?.defaultValue && props.actionDefaults?.retryAttempts === void 0 ? /* @__PURE__ */ jsx(Hint, { children: "This piece suggests retrying the step when it fails." }) : null,
|
|
5147
|
+
props.errorHandling?.retryOnFailure?.hide === true ? null : /* @__PURE__ */ jsx(RetryEditor, {
|
|
5148
|
+
value: step.retry,
|
|
5149
|
+
onChange: (retry) => callbacks.updateStep({
|
|
5150
|
+
id: step.id,
|
|
5151
|
+
retry
|
|
5152
|
+
})
|
|
5153
|
+
}),
|
|
4987
5154
|
/* @__PURE__ */ jsxs("fieldset", {
|
|
4988
5155
|
hidden: props.errorHandling?.retryOnFailure?.hide === true,
|
|
4989
5156
|
disabled: true,
|
|
4990
5157
|
className: "m-0 flex min-w-0 flex-col gap-4 rounded-lg border border-dashed border-foreground/15 p-3",
|
|
4991
5158
|
children: [/* @__PURE__ */ jsx("legend", {
|
|
4992
5159
|
className: "px-1",
|
|
4993
|
-
children: /* @__PURE__ */ jsx(AvailableSoon, { children: "
|
|
4994
|
-
}), /* @__PURE__ */
|
|
4995
|
-
className: "
|
|
4996
|
-
children:
|
|
4997
|
-
value: step.retry,
|
|
4998
|
-
onChange: (retry) => callbacks.updateStep({
|
|
4999
|
-
id: step.id,
|
|
5000
|
-
retry
|
|
5001
|
-
})
|
|
5002
|
-
}), /* @__PURE__ */ jsx(IdempotencyField, {
|
|
5160
|
+
children: /* @__PURE__ */ jsx(AvailableSoon, { children: "idempotency" })
|
|
5161
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
5162
|
+
className: "opacity-70",
|
|
5163
|
+
children: /* @__PURE__ */ jsx(IdempotencyField, {
|
|
5003
5164
|
step,
|
|
5004
5165
|
callbacks
|
|
5005
|
-
})
|
|
5166
|
+
})
|
|
5006
5167
|
})]
|
|
5007
5168
|
})
|
|
5008
5169
|
]
|
|
@@ -5244,6 +5405,7 @@ function StepPanel(props) {
|
|
|
5244
5405
|
model: props.model,
|
|
5245
5406
|
callbacks,
|
|
5246
5407
|
errorHandling: form && form !== "loading" ? form.errorHandling : void 0,
|
|
5408
|
+
actionDefaults: form && form !== "loading" ? form.actionDefaults : void 0,
|
|
5247
5409
|
onRemoved: props.onClose
|
|
5248
5410
|
})
|
|
5249
5411
|
})]
|
|
@@ -6506,6 +6668,7 @@ function WorkflowCanvas({ model, callbacks, onSelect }) {
|
|
|
6506
6668
|
function WorkflowEditorApp(props) {
|
|
6507
6669
|
const { model, callbacks } = props;
|
|
6508
6670
|
const [selectedId, setSelectedId] = useSelectedBlock();
|
|
6671
|
+
const panel = usePanelWidth();
|
|
6509
6672
|
const { publishing, error: publishError, publish } = usePublish(callbacks);
|
|
6510
6673
|
const { readiness } = useWorkflowCheck(model);
|
|
6511
6674
|
const selectedStep = model.steps.find((step) => step.id === selectedId);
|
|
@@ -6658,36 +6821,51 @@ function WorkflowEditorApp(props) {
|
|
|
6658
6821
|
})
|
|
6659
6822
|
})]
|
|
6660
6823
|
}),
|
|
6661
|
-
showVariables ? /* @__PURE__ */
|
|
6662
|
-
className: "min-h-0
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
})
|
|
6824
|
+
showVariables ? /* @__PURE__ */ jsxs("aside", {
|
|
6825
|
+
className: "relative flex min-h-0 shrink-0 flex-col border-l border-solid border-foreground/10 bg-card",
|
|
6826
|
+
style: { width: panel.width },
|
|
6827
|
+
children: [/* @__PURE__ */ jsx(PanelResizer, {
|
|
6828
|
+
width: panel.width,
|
|
6829
|
+
onResize: panel.resize
|
|
6830
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
6831
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
6832
|
+
children: /* @__PURE__ */ jsx(VariablesEditor, {
|
|
6833
|
+
variables: model.variables,
|
|
6834
|
+
callbacks,
|
|
6835
|
+
onClose: () => setSelectedId(null)
|
|
6836
|
+
})
|
|
6837
|
+
})]
|
|
6668
6838
|
}) : null,
|
|
6669
6839
|
selectedStep || selectedTrigger ? /* @__PURE__ */ jsx(ExpressionTargetProvider, {
|
|
6670
6840
|
stepBlocks,
|
|
6671
6841
|
triggerBlock: trigger,
|
|
6672
6842
|
children: /* @__PURE__ */ jsxs("aside", {
|
|
6673
|
-
className: "flex min-h-0
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6843
|
+
className: "relative flex min-h-0 shrink-0 flex-col border-l border-solid border-foreground/10 bg-card",
|
|
6844
|
+
style: { width: panel.width },
|
|
6845
|
+
children: [
|
|
6846
|
+
/* @__PURE__ */ jsx(PanelResizer, {
|
|
6847
|
+
width: panel.width,
|
|
6848
|
+
onResize: panel.resize
|
|
6849
|
+
}),
|
|
6850
|
+
/* @__PURE__ */ jsxs("div", {
|
|
6851
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
6852
|
+
children: [selectedStep ? /* @__PURE__ */ jsx(StepPanel, {
|
|
6853
|
+
step: selectedStep,
|
|
6854
|
+
model,
|
|
6855
|
+
callbacks,
|
|
6856
|
+
onClose: () => setSelectedId(null),
|
|
6857
|
+
onSelect: setSelectedId,
|
|
6858
|
+
readOnly: model.readOnly
|
|
6859
|
+
}, selectedStep.id) : null, selectedTrigger ? /* @__PURE__ */ jsx(TriggerPanel, {
|
|
6860
|
+
trigger: selectedTrigger,
|
|
6861
|
+
callbacks,
|
|
6862
|
+
onClose: () => setSelectedId(null),
|
|
6863
|
+
readOnly: model.readOnly,
|
|
6864
|
+
publishedVersion: model.published?.version
|
|
6865
|
+
}, selectedTrigger.id) : null]
|
|
6866
|
+
}),
|
|
6867
|
+
/* @__PURE__ */ jsx(ExpressionPickerPopup, {})
|
|
6868
|
+
]
|
|
6691
6869
|
})
|
|
6692
6870
|
}, selectedId) : null
|
|
6693
6871
|
]
|
|
@@ -6770,7 +6948,10 @@ function WorkflowEditor() {
|
|
|
6770
6948
|
fetchRun: (runId) => client.fetchRun(runId),
|
|
6771
6949
|
blockResolutions: () => client.blockResolutions(workflowId),
|
|
6772
6950
|
secrets: {
|
|
6773
|
-
save: ({ ref, value, label }) =>
|
|
6951
|
+
save: async ({ ref, value, label }) => {
|
|
6952
|
+
const stat = ref ? await client.fetchSecretStat(ref) : null;
|
|
6953
|
+
return ref && stat?.ownerId === workflowId && stat.manageable ? actions.rotateSecret(ref, value) : actions.createSecret(workflowId, value, label);
|
|
6954
|
+
},
|
|
6774
6955
|
stat: (ref) => client.fetchSecretStat(ref)
|
|
6775
6956
|
}
|
|
6776
6957
|
}), [
|
|
@@ -6847,4 +7028,4 @@ function Editor({ document }) {
|
|
|
6847
7028
|
//#endregion
|
|
6848
7029
|
export { Editor as default };
|
|
6849
7030
|
|
|
6850
|
-
//# sourceMappingURL=editor
|
|
7031
|
+
//# sourceMappingURL=editor--59WtNaj.js.map
|