@powerhousedao/workflow 6.2.3-dev.61 → 6.2.3-dev.63
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-DnBab95a.js → BlockSelector-DnD93PR7.js} +47 -5
- package/dist/browser/BlockSelector-DnD93PR7.js.map +1 -0
- package/dist/browser/{connection-BXV8I017.js → connection-5ri_Ex8F.js} +2 -2
- package/dist/browser/{connection-BXV8I017.js.map → connection-5ri_Ex8F.js.map} +1 -1
- package/dist/browser/{connection-form-Cy2fyFUR.js → connection-form-BqO_qAqo.js} +15 -9
- package/dist/browser/connection-form-BqO_qAqo.js.map +1 -0
- package/dist/browser/{data-tree-BvFLAMyE.js → data-tree-DBw0eqEe.js} +2 -2
- package/dist/browser/{data-tree-BvFLAMyE.js.map → data-tree-DBw0eqEe.js.map} +1 -1
- package/dist/browser/document-models/connection/index.js +1 -1
- package/dist/browser/document-models/workflow/index.js +1 -1
- package/dist/browser/{editor-CEJO-2Ue.js → editor-BUmvL0--.js} +27 -10
- package/dist/browser/editor-BUmvL0--.js.map +1 -0
- package/dist/browser/{editor-DVBnS8YM.js → editor-BiBA_xiQ.js} +64 -41
- package/dist/browser/editor-BiBA_xiQ.js.map +1 -0
- package/dist/browser/{editor-Dc9Q55q1.js → editor-DJUdqEox.js} +8 -7
- package/dist/browser/{editor-Dc9Q55q1.js.map → editor-DJUdqEox.js.map} +1 -1
- package/dist/browser/editors/connection-editor/module.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/icon-components-BZ_bQZmJ-J78zfYCb.js +3188 -0
- package/dist/browser/icon-components-BZ_bQZmJ-J78zfYCb.js.map +1 -0
- package/dist/browser/index.js +3 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{trigger-text-CfRbN-DV.js → trigger-text-BFphirGv.js} +585 -178
- package/dist/browser/trigger-text-BFphirGv.js.map +1 -0
- package/dist/browser/{workflow-C003Wutu.js → workflow-CP_X_Njm.js} +2 -2
- package/dist/browser/{workflow-C003Wutu.js.map → workflow-CP_X_Njm.js.map} +1 -1
- package/dist/node/{BlockSelector-B77i85CO.mjs → BlockSelector-BC98fl49.mjs} +47 -5
- package/dist/node/BlockSelector-BC98fl49.mjs.map +1 -0
- package/dist/node/{connection-BzW9OpKx.mjs → connection-DJFsS9rQ.mjs} +2 -2
- package/dist/node/{connection-BzW9OpKx.mjs.map → connection-DJFsS9rQ.mjs.map} +1 -1
- package/dist/node/{connection-form-BCwEO3ll.mjs → connection-form-DQjfPOyh.mjs} +15 -9
- package/dist/node/connection-form-DQjfPOyh.mjs.map +1 -0
- package/dist/node/{data-tree-CH8KnNSz.mjs → data-tree-h4lrMVVA.mjs} +2 -2
- package/dist/node/{data-tree-CH8KnNSz.mjs.map → data-tree-h4lrMVVA.mjs.map} +1 -1
- package/dist/node/document-models/connection/index.mjs +1 -1
- package/dist/node/document-models/workflow/index.mjs +1 -1
- package/dist/node/{editor-CsMRho-A.mjs → editor-B-ldqwZi.mjs} +64 -41
- package/dist/node/editor-B-ldqwZi.mjs.map +1 -0
- package/dist/node/{editor-BYzFMCB8.mjs → editor-C30aP6mr.mjs} +8 -7
- package/dist/node/{editor-BYzFMCB8.mjs.map → editor-C30aP6mr.mjs.map} +1 -1
- package/dist/node/{editor-DtLyolUn.mjs → editor-MPiCxvJr.mjs} +27 -10
- package/dist/node/editor-MPiCxvJr.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.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/icon-components-BZ_bQZmJ-CCPLG1rH.mjs +3188 -0
- package/dist/node/icon-components-BZ_bQZmJ-CCPLG1rH.mjs.map +1 -0
- package/dist/node/index.mjs +3 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/pieces/reactor/descriptor.json +1 -1
- package/dist/node/pieces/reactor/index.mjs +66 -66
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/{trigger-text-C6BlOwck.mjs → trigger-text-D2WZiW1o.mjs} +585 -178
- package/dist/node/trigger-text-D2WZiW1o.mjs.map +1 -0
- package/dist/node/{workflow-7pmOvHmg.mjs → workflow-CPlqsc5D.mjs} +2 -2
- package/dist/node/{workflow-7pmOvHmg.mjs.map → workflow-CPlqsc5D.mjs.map} +1 -1
- package/dist/powerhouse.manifest.json +1 -1
- package/dist/types/ai/runtime-url.d.ts.map +1 -1
- package/dist/types/ai/tools.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/UsedBy.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
- package/dist/types/editors/shared/document-ref.d.ts.map +1 -1
- package/dist/types/editors/shared/editor-chrome.d.ts +2 -0
- package/dist/types/editors/shared/editor-chrome.d.ts.map +1 -1
- package/dist/types/editors/shared/editor-chrome.test.d.ts +2 -0
- package/dist/types/editors/shared/editor-chrome.test.d.ts.map +1 -0
- package/dist/types/editors/shared/url-param.d.ts +14 -0
- package/dist/types/editors/shared/url-param.d.ts.map +1 -0
- package/dist/types/editors/shared/url-param.test.d.ts +2 -0
- package/dist/types/editors/shared/url-param.test.d.ts.map +1 -0
- 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/model.d.ts +3 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/use-selected-block.d.ts +4 -0
- package/dist/types/editors/workflow-editor/ui/use-selected-block.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/use-selected-block.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/use-selected-block.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +7 -0
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowMenu.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/use-item-selection.d.ts +10 -0
- package/dist/types/editors/workflow-studio/components/use-item-selection.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/use-item-selection.test.d.ts +2 -0
- package/dist/types/editors/workflow-studio/components/use-item-selection.test.d.ts.map +1 -0
- package/package.json +11 -9
- package/dist/browser/BlockSelector-DnBab95a.js.map +0 -1
- package/dist/browser/connection-form-Cy2fyFUR.js.map +0 -1
- package/dist/browser/editor-CEJO-2Ue.js.map +0 -1
- package/dist/browser/editor-DVBnS8YM.js.map +0 -1
- package/dist/browser/trigger-text-CfRbN-DV.js.map +0 -1
- package/dist/node/BlockSelector-B77i85CO.mjs.map +0 -1
- package/dist/node/connection-form-BCwEO3ll.mjs.map +0 -1
- package/dist/node/editor-CsMRho-A.mjs.map +0 -1
- package/dist/node/editor-DtLyolUn.mjs.map +0 -1
- package/dist/node/trigger-text-C6BlOwck.mjs.map +0 -1
- package/dist/types/editors/workflow-studio/components/use-hash-selection.d.ts +0 -5
- package/dist/types/editors/workflow-studio/components/use-hash-selection.d.ts.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { A as setConfigValue, B as ReactorConnectionConfigSchema, C as setAccountLabel, D as removeConfigValue, E as creators_exports, F as isReactorConnectorId, G as SetAccountLabelInputSchema, H as RemoveConfigValueInputSchema, I as parseReactorConnectionConfig, J as SetConnectionNameInputSchema, K as SetConfigInputSchema, L as ConnectionAuthTypeSchema, M as REACTOR_CONNECTOR_ID, N as REACTOR_LOCAL_ENDPOINT, O as removeSecretRef, P as defaultReactorConnectionConfig, Q as isDefinedNonNullAny, R as ConnectionStateSchema, S as creators_exports$1, T as setConnector, U as RemoveSecretRefInputSchema, V as RecordCheckResultInputSchema, W as SecretRefSchema, X as SetSecretRefInputSchema, Y as SetConnectorInputSchema, Z as definedNonNullAnySchema, _ as reducer, b as creators_exports$2, c as ConnectionPHStateSchema, d as isConnectionDocument, f as isConnectionState, g as supportedVersions, h as latestVersion, i as initialLocalState, j as setSecretRef, k as setConfig, l as assertIsConnectionDocument, m as connectionUpgradeManifest, n as utils, o as ConnectionDocumentHeaderSchema, p as connectionDocumentType, q as SetConfigValueInputSchema, r as initialGlobalState, s as ConnectionDocumentSchema, t as Connection, u as assertIsConnectionState, v as documentModel, w as setConnectionName, x as recordCheckResult, y as actions, z as ConnectionStatusSchema } from "../../module-Bl_4mnxR.mjs";
|
|
2
|
-
import { a as createConnectionDocument, c as defaultLocalState, i as useSelectedConnectionDocument, l as defaultPHState, n as useConnectionDocumentsInSelectedDrive, o as createState, r as useConnectionDocumentsInSelectedFolder, s as defaultGlobalState, t as useConnectionDocumentById, u as ConnectionController } from "../../connection-
|
|
2
|
+
import { a as createConnectionDocument, c as defaultLocalState, i as useSelectedConnectionDocument, l as defaultPHState, n as useConnectionDocumentsInSelectedDrive, o as createState, r as useConnectionDocumentsInSelectedFolder, s as defaultGlobalState, t as useConnectionDocumentById, u as ConnectionController } from "../../connection-DJFsS9rQ.mjs";
|
|
3
3
|
export { Connection, ConnectionAuthTypeSchema, ConnectionController, ConnectionDocumentHeaderSchema, ConnectionDocumentSchema, ConnectionPHStateSchema, ConnectionStateSchema, ConnectionStatusSchema, REACTOR_CONNECTOR_ID, REACTOR_LOCAL_ENDPOINT, ReactorConnectionConfigSchema, RecordCheckResultInputSchema, RemoveConfigValueInputSchema, RemoveSecretRefInputSchema, SecretRefSchema, SetAccountLabelInputSchema, SetConfigInputSchema, SetConfigValueInputSchema, SetConnectionNameInputSchema, SetConnectorInputSchema, SetSecretRefInputSchema, actions, assertIsConnectionDocument, assertIsConnectionState, creators_exports as connectionConfigActions, creators_exports$1 as connectionConnectionActions, connectionDocumentType, creators_exports$2 as connectionHealthActions, connectionUpgradeManifest, createConnectionDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, defaultReactorConnectionConfig, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isConnectionDocument, isConnectionState, isDefinedNonNullAny, isReactorConnectorId, latestVersion, parseReactorConnectionConfig, recordCheckResult, reducer, removeConfigValue, removeSecretRef, setAccountLabel, setConfig, setConfigValue, setConnectionName, setConnector, setSecretRef, supportedVersions, useConnectionDocumentById, useConnectionDocumentsInSelectedDrive, useConnectionDocumentsInSelectedFolder, useSelectedConnectionDocument, utils };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $ as AddStepRetryPolicyInputSchema, A as setTriggerConfig, At as SetWorkflowStatusInputSchema, B as setLastTest, Bt as WorkflowStatusSchema, C as setWorkflowStatus, Ct as SetTriggerConnectionInputSchema, D as clearTrigger, Dt as SetVariableInputSchema, E as setVariable, Et as SetTriggerPropertySettingInputSchema, F as removeStep, Ft as UpdateStepRetryPolicyInputSchema, G as setPolicy, H as publishWorkflow, Ht as WorkflowVariableSchema, I as setStepConfig, It as VariableTypeSchema, J as removeEdge, K as addEdge, L as updateStep, Lt as WorkflowEdgeSchema, M as setTriggerPieceVersion, Mt as TriggerBindingSchema, N as addStep, Nt as UpdateStepInputSchema, O as creators_exports$5, Ot as SetWorkflowDescriptionInputSchema, P as creators_exports$4, Pt as UpdateStepPositionInputSchema, Q as AddStepPropertySettingInputSchema, R as creators_exports$3, Rt as WorkflowPolicySchema, S as setWorkflowName, St as SetTriggerConfigPropertySettingInputSchema, T as removeVariable, Tt as SetTriggerPieceVersionInputSchema, U as revertToPublished, Ut as definedNonNullAnySchema, V as creators_exports$2, Vt as WorkflowStepSchema, W as creators_exports$1, Wt as isDefinedNonNullAny, X as AddStepInputSchema, Y as AddEdgeInputSchema, Z as AddStepPositionInputSchema, _ as reducer, _t as SetPolicyInputSchema, at as PropertyModeSchema, b as creators_exports$7, bt as SetStepConfigPropertySettingInputSchema, c as WorkflowPHStateSchema, ct as PublishedWorkflowSchema, d as isWorkflowDocument, dt as RemoveVariableInputSchema, et as BackoffKindSchema, f as isWorkflowState, ft as RetryPolicySchema, g as supportedVersions, gt as SetLastTestInputSchema, h as latestVersion, ht as SetLastRunInputSchema, i as initialLocalState, it as PointSchema, j as setTriggerConnection, jt as StepTestRecordSchema, k as setTrigger, kt as SetWorkflowNameInputSchema, l as assertIsWorkflowDocument, lt as RemoveEdgeInputSchema, m as workflowUpgradeManifest, mt as RunStatusSchema, n as utils, nt as ConcurrencyModeSchema, o as WorkflowDocumentHeaderSchema, ot as PropertySettingSchema, p as workflowDocumentType, pt as RevertToPublishedInputSchema, q as creators_exports, r as initialGlobalState, rt as FailureModeSchema, s as WorkflowDocumentSchema, st as PublishWorkflowInputSchema, t as Workflow, tt as ClearTriggerInputSchema, u as assertIsWorkflowState, ut as RemoveStepInputSchema, v as documentModel, vt as SetPolicyRetryPolicyInputSchema, w as creators_exports$6, wt as SetTriggerInputSchema, x as setWorkflowDescription, xt as SetTriggerConfigInputSchema, y as actions, yt as SetStepConfigInputSchema, z as setLastRun, zt as WorkflowStateSchema } from "../../module-DPg8IYIn.mjs";
|
|
2
|
-
import { a as createState, c as defaultLocalState, i as useWorkflowDocumentsInSelectedFolder, l as defaultPHState, n as useWorkflowDocumentById, o as createWorkflowDocument, r as useWorkflowDocumentsInSelectedDrive, s as defaultGlobalState, t as useSelectedWorkflowDocument, u as WorkflowController } from "../../workflow-
|
|
2
|
+
import { a as createState, c as defaultLocalState, i as useWorkflowDocumentsInSelectedFolder, l as defaultPHState, n as useWorkflowDocumentById, o as createWorkflowDocument, r as useWorkflowDocumentsInSelectedDrive, s as defaultGlobalState, t as useSelectedWorkflowDocument, u as WorkflowController } from "../../workflow-CPlqsc5D.mjs";
|
|
3
3
|
export { AddEdgeInputSchema, AddStepInputSchema, AddStepPositionInputSchema, AddStepPropertySettingInputSchema, AddStepRetryPolicyInputSchema, BackoffKindSchema, ClearTriggerInputSchema, ConcurrencyModeSchema, FailureModeSchema, PointSchema, PropertyModeSchema, PropertySettingSchema, PublishWorkflowInputSchema, PublishedWorkflowSchema, RemoveEdgeInputSchema, RemoveStepInputSchema, RemoveVariableInputSchema, RetryPolicySchema, RevertToPublishedInputSchema, RunStatusSchema, SetLastRunInputSchema, SetLastTestInputSchema, SetPolicyInputSchema, SetPolicyRetryPolicyInputSchema, SetStepConfigInputSchema, SetStepConfigPropertySettingInputSchema, SetTriggerConfigInputSchema, SetTriggerConfigPropertySettingInputSchema, SetTriggerConnectionInputSchema, SetTriggerInputSchema, SetTriggerPieceVersionInputSchema, SetTriggerPropertySettingInputSchema, SetVariableInputSchema, SetWorkflowDescriptionInputSchema, SetWorkflowNameInputSchema, SetWorkflowStatusInputSchema, StepTestRecordSchema, TriggerBindingSchema, UpdateStepInputSchema, UpdateStepPositionInputSchema, UpdateStepRetryPolicyInputSchema, VariableTypeSchema, Workflow, WorkflowController, WorkflowDocumentHeaderSchema, WorkflowDocumentSchema, WorkflowEdgeSchema, WorkflowPHStateSchema, WorkflowPolicySchema, WorkflowStateSchema, WorkflowStatusSchema, WorkflowStepSchema, WorkflowVariableSchema, actions, addEdge, addStep, assertIsWorkflowDocument, assertIsWorkflowState, clearTrigger, createState, createWorkflowDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isWorkflowDocument, isWorkflowState, latestVersion, publishWorkflow, reducer, removeEdge, removeStep, removeVariable, revertToPublished, setLastRun, setLastTest, setPolicy, setStepConfig, setTrigger, setTriggerConfig, setTriggerConnection, setTriggerPieceVersion, setVariable, setWorkflowDescription, setWorkflowName, setWorkflowStatus, supportedVersions, updateStep, useSelectedWorkflowDocument, useWorkflowDocumentById, useWorkflowDocumentsInSelectedDrive, useWorkflowDocumentsInSelectedFolder, utils, workflowDocumentType, creators_exports as workflowEdgesActions, creators_exports$1 as workflowPolicyActions, creators_exports$2 as workflowPublishingActions, creators_exports$3 as workflowRuntimeActions, creators_exports$4 as workflowStepsActions, creators_exports$5 as workflowTriggerActions, workflowUpgradeManifest, creators_exports$6 as workflowVariablesActions, creators_exports$7 as workflowWorkflowActions };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { X as CORE_PIECE, Z as MANUAL_TRIGGER, at as sameBlock, ct as triggerBlock, l as runsOfPages, ot as stepBlock } from "./runtime-queries-CJSpbsBq.mjs";
|
|
2
|
-
import { A as runStats, Bt as
|
|
2
|
+
import { A as runStats, Bt as Icon, C as canRerun, Ct as ITEM_PARAM, D as formatMs, E as formatDuration, Et as Button, F as toneOf, Ht as DocumentErrorBoundary, I as workflowHealth, M as runTimeline, Mt as Select, N as runTone, O as formatTrigger, P as statusLabel, S as TONE_TEXT, T as formatAbsolute, Tt as useSearchParamDraft, Ut as DocumentLoadError, Wt as errorMessage, _ as CONNECTION_TONE, _t as useRunPagesQuery, b as STEP_TONE, f as blockMeta, g as usePieceLogos, j as runStatusLabel, k as formatWhen, pt as WorkflowRuntimeProvider, t as BlockLogo, v as RUN_STATUSES, vt as useRunQuery, w as durationMs, wt as useSearchParam, x as TONE_DOT, xt as useRuntimeActions, y as RUN_TONE, zt as textInputClass } from "./BlockSelector-BC98fl49.mjs";
|
|
3
3
|
import { y as actions } from "./module-DPg8IYIn.mjs";
|
|
4
|
-
import { r as useWorkflowDocumentsInSelectedDrive } from "./workflow-
|
|
5
|
-
import {
|
|
4
|
+
import { r as useWorkflowDocumentsInSelectedDrive } from "./workflow-CPlqsc5D.mjs";
|
|
5
|
+
import { _ as Modal, a as StepError, c as PublishState, d as StatusToggle, i as DataViewer, r as describeTrigger } from "./trigger-text-D2WZiW1o.mjs";
|
|
6
|
+
import { addDocument, addFolder, deleteNode, getPHStore, showDeleteNodeModal, useDispatch, useDocumentSafe, useFileNodesInSelectedDrive, useNodesInSelectedDrive, usePHToast, useSearchParams, useSelectedDrive, useSelectedNode, useSetPHAppConfig, useSetSearchParams, useSetSelectedNode } from "@powerhousedao/reactor-browser";
|
|
6
7
|
import { Fragment, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { generateId } from "document-model";
|
|
9
|
-
import { addDocument, addFolder, deleteNode, setSelectedNode, showDeleteNodeModal, useDispatch, useDocumentSafe, useFileNodesInSelectedDrive, useNodesInSelectedDrive, usePHToast, useSelectedDrive, useSelectedNode, useSetPHAppConfig } from "@powerhousedao/reactor-browser";
|
|
10
10
|
import { addFolder as addFolder$1, moveNode, updateNode } from "@powerhousedao/shared/document-drive";
|
|
11
11
|
import { ConnectTooltip, ConnectTooltipProvider } from "@powerhousedao/design-system/connect";
|
|
12
12
|
//#region editors/workflow-studio/components/step-outline.ts
|
|
@@ -370,6 +370,14 @@ function Fact(props) {
|
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
372
|
//#region editors/workflow-studio/components/RunsTable.tsx
|
|
373
|
+
const STATUS_FILTERS = ["ALL", ...RUN_STATUSES];
|
|
374
|
+
/** The runs table's query params. */
|
|
375
|
+
const RUNS_PARAMS = {
|
|
376
|
+
status: "runs.status",
|
|
377
|
+
query: "runs.q",
|
|
378
|
+
workflow: "runs.workflow",
|
|
379
|
+
trigger: "runs.trigger"
|
|
380
|
+
};
|
|
373
381
|
const DETAIL_POLL_MS = 5e3;
|
|
374
382
|
const CONTROL = "h-8 rounded-md border border-solid border-border bg-card px-2.5 text-[13px] text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
375
383
|
function stringify(value) {
|
|
@@ -662,10 +670,14 @@ function SortHeader(props) {
|
|
|
662
670
|
});
|
|
663
671
|
}
|
|
664
672
|
function RunsTable(props) {
|
|
665
|
-
const [query, setQuery] =
|
|
666
|
-
const [status,
|
|
667
|
-
const
|
|
668
|
-
const [
|
|
673
|
+
const [query, setQuery] = useSearchParamDraft(RUNS_PARAMS.query);
|
|
674
|
+
const [status, setStatusParam] = useSearchParam(RUNS_PARAMS.status, "ALL", STATUS_FILTERS);
|
|
675
|
+
const setStatus = (value) => setStatusParam(value, { replace: true });
|
|
676
|
+
const [workflow, setWorkflowParam] = useSearchParam(RUNS_PARAMS.workflow, "ALL");
|
|
677
|
+
const setWorkflow = (value) => setWorkflowParam(value, { replace: true });
|
|
678
|
+
const [trigger, setTriggerParam] = useSearchParam(RUNS_PARAMS.trigger, "ALL");
|
|
679
|
+
const setTrigger = (value) => setTriggerParam(value, { replace: true });
|
|
680
|
+
const setParams = useSetSearchParams();
|
|
669
681
|
const [sort, setSort] = useState("startedAt");
|
|
670
682
|
const [descending, setDescending] = useState(true);
|
|
671
683
|
const [expanded, setExpanded] = useState(null);
|
|
@@ -728,7 +740,7 @@ function RunsTable(props) {
|
|
|
728
740
|
children: [
|
|
729
741
|
/* @__PURE__ */ jsx("div", {
|
|
730
742
|
className: "flex h-8 items-center gap-0.5 rounded-md bg-muted p-0.5",
|
|
731
|
-
children:
|
|
743
|
+
children: STATUS_FILTERS.map((option) => /* @__PURE__ */ jsxs("button", {
|
|
732
744
|
type: "button",
|
|
733
745
|
"aria-pressed": status === option,
|
|
734
746
|
className: `h-7 rounded px-2.5 text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${status === option ? "bg-card font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
@@ -778,9 +790,11 @@ function RunsTable(props) {
|
|
|
778
790
|
type: "button",
|
|
779
791
|
className: "text-[13px] text-muted-foreground underline underline-offset-2 hover:text-foreground",
|
|
780
792
|
onClick: () => {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
793
|
+
setParams({
|
|
794
|
+
[RUNS_PARAMS.query]: void 0,
|
|
795
|
+
[RUNS_PARAMS.workflow]: void 0,
|
|
796
|
+
[RUNS_PARAMS.trigger]: void 0
|
|
797
|
+
}, { replace: true });
|
|
784
798
|
},
|
|
785
799
|
children: "Clear filters"
|
|
786
800
|
}) : null,
|
|
@@ -1103,9 +1117,10 @@ function reorderActions(ordered, from, to, names = /* @__PURE__ */ new Map()) {
|
|
|
1103
1117
|
//#region editors/workflow-studio/components/WorkflowMenu.tsx
|
|
1104
1118
|
/** Deletes a workflow with its home folder, reading the drive's nodes now. */
|
|
1105
1119
|
async function deleteWorkflow(workflowId) {
|
|
1106
|
-
const
|
|
1120
|
+
const store = getPHStore();
|
|
1121
|
+
const driveId = store?.selectedDriveId;
|
|
1107
1122
|
if (!driveId) throw new Error("No drive is selected");
|
|
1108
|
-
const nodes =
|
|
1123
|
+
const nodes = store?.drives?.find((drive) => drive.header.id === driveId)?.state.global.nodes ?? [];
|
|
1109
1124
|
await deleteNode(driveId, deletionTarget(workflowId, nodes)?.id ?? workflowId);
|
|
1110
1125
|
}
|
|
1111
1126
|
function DeleteWorkflowDialog(props) {
|
|
@@ -1540,29 +1555,42 @@ function Sidebar(props) {
|
|
|
1540
1555
|
});
|
|
1541
1556
|
}
|
|
1542
1557
|
//#endregion
|
|
1543
|
-
//#region editors/workflow-studio/components/use-
|
|
1544
|
-
function
|
|
1558
|
+
//#region editors/workflow-studio/components/use-item-selection.ts
|
|
1559
|
+
function readLegacyHash() {
|
|
1560
|
+
if (typeof window === "undefined") return void 0;
|
|
1545
1561
|
return window.location.hash.replace(/^#/, "") || void 0;
|
|
1546
1562
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1563
|
+
/** The selected item, a setter, and `go`, which also opens or closes the item's
|
|
1564
|
+
* editor; each is one history entry, so back and forward walk the studio. */
|
|
1565
|
+
function useItemSelection(openEditorId) {
|
|
1566
|
+
const params = useSearchParams();
|
|
1567
|
+
const setParams = useSetSearchParams();
|
|
1568
|
+
const setSelectedNode = useSetSelectedNode();
|
|
1569
|
+
const selected = params["item"] || void 0;
|
|
1570
|
+
const select = useCallback((id, options) => {
|
|
1571
|
+
if (id === selected) return;
|
|
1572
|
+
setParams({ [ITEM_PARAM]: id }, options);
|
|
1573
|
+
}, [selected, setParams]);
|
|
1574
|
+
const go = useCallback((id, editor) => {
|
|
1575
|
+
if ((editor ?? null) === (openEditorId ?? null)) {
|
|
1576
|
+
select(id);
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
setSelectedNode(editor, { search: { [ITEM_PARAM]: id } });
|
|
1580
|
+
}, [
|
|
1581
|
+
openEditorId,
|
|
1582
|
+
select,
|
|
1583
|
+
setSelectedNode
|
|
1584
|
+
]);
|
|
1549
1585
|
useEffect(() => {
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1552
|
-
window.addEventListener("popstate", sync);
|
|
1553
|
-
return () => {
|
|
1554
|
-
window.removeEventListener("hashchange", sync);
|
|
1555
|
-
window.removeEventListener("popstate", sync);
|
|
1556
|
-
};
|
|
1586
|
+
const legacy = readLegacyHash();
|
|
1587
|
+
if (legacy && !selected) setParams({ [ITEM_PARAM]: legacy }, { replace: true });
|
|
1557
1588
|
}, []);
|
|
1558
|
-
return [
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
if (options?.replace) window.history.replaceState(null, "", url);
|
|
1564
|
-
else window.history.pushState(null, "", url);
|
|
1565
|
-
}, [])];
|
|
1589
|
+
return [
|
|
1590
|
+
selected,
|
|
1591
|
+
select,
|
|
1592
|
+
go
|
|
1593
|
+
];
|
|
1566
1594
|
}
|
|
1567
1595
|
//#endregion
|
|
1568
1596
|
//#region editors/workflow-studio/components/useRuns.ts
|
|
@@ -2563,7 +2591,7 @@ function Studio(props) {
|
|
|
2563
2591
|
const selectedNode = useSelectedNode();
|
|
2564
2592
|
const selectedNodeId = selectedNode?.id;
|
|
2565
2593
|
const toast = usePHToast();
|
|
2566
|
-
const [selectedId, select] =
|
|
2594
|
+
const [selectedId, select, go] = useItemSelection(selectedNodeId);
|
|
2567
2595
|
const [creating, setCreating] = useState(false);
|
|
2568
2596
|
const driveId = drive.header.id;
|
|
2569
2597
|
const orderedWorkflows = orderWorkflows(fileNodes.filter((node) => node.documentType === WORKFLOW_TYPE), nodes);
|
|
@@ -2587,11 +2615,6 @@ function Studio(props) {
|
|
|
2587
2615
|
if (actions.length === 0) return;
|
|
2588
2616
|
dispatchDrive(actions, (errors) => toast?.(errors[0]?.message ?? "Failed to reorder workflows", { type: "error" }));
|
|
2589
2617
|
};
|
|
2590
|
-
const go = (id, editor) => {
|
|
2591
|
-
const before = window.location.pathname;
|
|
2592
|
-
if ((editor ?? null) !== (selectedNodeId ?? null)) setSelectedNode(editor);
|
|
2593
|
-
select(id, { replace: window.location.pathname !== before });
|
|
2594
|
-
};
|
|
2595
2618
|
const showRuns = (node) => go(node?.id);
|
|
2596
2619
|
const liveTarget = workflows.find((node) => node.id === selectedId) ?? null;
|
|
2597
2620
|
const connectionSelected = connections.some((node) => node.id === selectedId);
|
|
@@ -2648,7 +2671,7 @@ function Studio(props) {
|
|
|
2648
2671
|
children: /* @__PURE__ */ jsx(DocumentErrorBoundary, {
|
|
2649
2672
|
documentId: selectedNodeId,
|
|
2650
2673
|
label: selectedNode?.name,
|
|
2651
|
-
onDismiss: () =>
|
|
2674
|
+
onDismiss: () => go(selectedId),
|
|
2652
2675
|
children: props.children
|
|
2653
2676
|
}, selectedNodeId)
|
|
2654
2677
|
})
|
|
@@ -2703,4 +2726,4 @@ function Editor(props) {
|
|
|
2703
2726
|
//#endregion
|
|
2704
2727
|
export { Editor as default };
|
|
2705
2728
|
|
|
2706
|
-
//# sourceMappingURL=editor-
|
|
2729
|
+
//# sourceMappingURL=editor-B-ldqwZi.mjs.map
|