@burdenoff/fluidgrids-fe-sdk 2026.1115.8 → 2026.1115.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{AiStudioPage-BoxsR2hy.js → AiStudioPage-CZTaVeQE.js} +4 -4
  2. package/dist/{DataSinkDashboardPage-Ccg_SZmm.js → DataSinkDashboardPage-CPq6-jZM.js} +1 -1
  3. package/dist/{ExecutionDetailPage-DwadwaR0.js → ExecutionDetailPage-d29WPJDN.js} +7 -6
  4. package/dist/ExecutionSettingsFields-DzKJDOjU.js +1003 -0
  5. package/dist/{ExecutionsListPage-D18xVwH7.js → ExecutionsListPage-xQthHGAJ.js} +5 -23
  6. package/dist/{FluidGridsProvider-xFYPchhw.js → FluidGridsProvider-BRC0WlAa.js} +247 -3044
  7. package/dist/{HistoryPage-DjvD1-YA.js → HistoryPage-Drdk9j_Q.js} +1 -1
  8. package/dist/{InsightsPage-eHkVOiJC.js → InsightsPage-mYWZvyGR.js} +1 -1
  9. package/dist/{PaidTemplateConfirm-C4hmka25.js → PaidTemplateConfirm-Dog5moZa.js} +1 -1
  10. package/dist/{agent-form-D0uLvzx4.js → RunLogAppendedDocument-D1_BfMZa.js} +1 -82
  11. package/dist/{SettingsPage-B1DZRkIr.js → SettingsPage-DFnqjkpT.js} +236 -891
  12. package/dist/{TemplateCard-CCz5NW6t.js → TemplateCard-D2zt-kXW.js} +3 -3
  13. package/dist/{TemplatePreview-Kd2FKykc.js → TemplatePreview-BgdkcCF-.js} +4 -4
  14. package/dist/{TemplatesPage-DvRDWMtn.js → TemplatesPage-t7rGU-BP.js} +6 -6
  15. package/dist/{WorkflowBuilder-CrLctwxF.js → WorkflowBuilder-BS9kVcgU.js} +3 -3
  16. package/dist/{WorkflowBuilder-44buoEQ3.js → WorkflowBuilder-CtTM79lP.js} +6 -5
  17. package/dist/{WorkflowSearchRedirect-guNkbQSU.js → WorkflowSearchRedirect-Bqdxr833.js} +1 -1
  18. package/dist/WorkflowSettingsDrawer-BiqTf_tV.js +191 -0
  19. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  20. package/dist/{WorkflowsList-Dqqk_Y-X.js → WorkflowsList-DjKePEwo.js} +2032 -514
  21. package/dist/agent-form-Bfvm32j1.js +83 -0
  22. package/dist/{agentTools-B_Po22sZ.js → agentTools-DrVlHNeP.js} +1 -1
  23. package/dist/{canvasNoteTools-DljlLrdC.js → canvasNoteTools-Bo2QldkD.js} +1 -1
  24. package/dist/executions.js +2 -2
  25. package/dist/{flow-builder-Dkf2pKoQ.js → flow-builder-CWfNAFd8.js} +69 -14
  26. package/dist/history.js +1 -1
  27. package/dist/{index-BFzvT8JS.d.ts → index-C2ehY2Ld.d.ts} +18 -10
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +38 -35
  30. package/dist/{node-detail-view-BxPBWA_k.js → node-detail-view-D_N3kLtA.js} +5 -5
  31. package/dist/{node-editor-tab-body-CfcsbpTx.js → node-editor-tab-body-BQ9JZa72.js} +2 -2
  32. package/dist/observability.d.ts +1 -1
  33. package/dist/observability.js +2 -2
  34. package/dist/{useAgentDefinitions-BCLCgtQt.js → operations-qq_bbgXP.js} +3 -223
  35. package/dist/{popover-DJ91SCN_.js → popover-DZdTN21a.js} +3 -3
  36. package/dist/{quick-config-panel-DnO8kCH6.js → quick-config-panel-BCUY4tQy.js} +3 -3
  37. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  38. package/dist/{schedule-panel-D2nCNyJR.js → schedule-panel-B6FrpX9d.js} +6 -5
  39. package/dist/settings.d.ts +2 -2
  40. package/dist/settings.js +3 -2
  41. package/dist/{sidebar-node-editor-DuE6t-hj.js → sidebar-node-editor-CWrmlFlZ.js} +3 -3
  42. package/dist/templates.js +2 -2
  43. package/dist/useAgentDefinitions-DX5GvEIp.js +223 -0
  44. package/dist/{useDurableParity-BO--Wn7k.js → useDurableParity-BtWk4d-i.js} +1 -1
  45. package/dist/{useExecutions-DG6XbEsa.js → useExecutions-C9pVKexC.js} +2 -1
  46. package/dist/{useGlobalStoreClient-CY3q5xdv.js → useGlobalStoreClient-C2P50Gj5.js} +1 -1
  47. package/dist/{useObservability-CC8fdMQ-.js → useObservability-DsHX86Xl.js} +1 -1
  48. package/dist/{useRunHistory-DIFumHVe.js → useRunHistory-DUNLNOKA.js} +1 -1
  49. package/dist/{useWorkflowCodeExport-CcGfzyh6.js → useWorkflowCodeExport-DSbfcehl.js} +12 -2
  50. package/dist/{useWorkflows-B7ZkOKhh.js → useWorkflows-B13Cp8tk.js} +90 -10
  51. package/dist/workflow-builder.js +4 -4
  52. package/dist/{workflow-description-DIp27SKz.js → workflow-description-F3inwvof.js} +1 -1
  53. package/dist/workflow-pages.d.ts +2 -2
  54. package/dist/workflow-pages.js +13 -13
  55. package/dist/workflow-save-state-DUE9lNwQ.js +2813 -0
  56. package/dist/workflows-list.js +1 -1
  57. package/package.json +3 -3
  58. package/dist/SettingsPage-DMHQFj5-.d.ts +0 -9
@@ -3,7 +3,7 @@ import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
3
3
  import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
4
4
  import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
5
5
  import { n as getGlobalStoreClient } from "./global-client-DP_Wxe5t.js";
6
- import { c as ensureInstalledNodeTypesLoaded, f as ensureRegistryNodeTypesLoaded, fn as useFluidGridsAnalytics, i as AVAILABLE_NODES, o as NODE_CONFIGS, t as FluidGridsContext, x as GetMyNodeInstallationsDocument } from "./FluidGridsProvider-xFYPchhw.js";
6
+ import { c as ensureInstalledNodeTypesLoaded, f as ensureRegistryNodeTypesLoaded, i as AVAILABLE_NODES, o as NODE_CONFIGS, rn as useFluidGridsAnalytics, t as FluidGridsContext, x as GetMyNodeInstallationsDocument } from "./FluidGridsProvider-BRC0WlAa.js";
7
7
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
8
8
  import { n as storeIconCandidates, t as StoreIcon } from "./store-icon-Bgmyn3Lt.js";
9
9
  import { o as isNodeTypeHiddenFromPalette } from "./durable-nodes-DXCCQYWD.js";
@@ -13,12 +13,12 @@ import { a as emitTemplateUsed, s as emitWorkflowCreated, t as emitNodeInstalled
13
13
  import { n as InstallWorkflowNodeDocument } from "./global-operations-7pvXw_j9.js";
14
14
  import { t as cn } from "./cn-QqidFIgr.js";
15
15
  import { t as Button } from "./button-DG7y_FVJ.js";
16
+ import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
16
17
  import { i as SdkPermissionButton, t as FLUIDGRIDS_PERMISSIONS } from "./constants-65QV61nQ.js";
17
- import { t as useGlobalStoreClient } from "./useGlobalStoreClient-CY3q5xdv.js";
18
+ import { t as useGlobalStoreClient } from "./useGlobalStoreClient-C2P50Gj5.js";
18
19
  import { c as templateInstallSource } from "./template-code-9dL1SUji.js";
19
20
  import { t as Badge } from "./badge-CXfPhoMH.js";
20
21
  import { t as templatePreviewCandidates } from "./template-preview-BwOqyuFH.js";
21
- import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
22
22
  import { Suspense, forwardRef, lazy, useCallback, useContext, useMemo, useState } from "react";
23
23
  import { useQuery } from "@apollo/client/react";
24
24
  import { gql } from "@apollo/client/core";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
3
  import { t as ThemeProvider } from "./theme-provider-B3mIuz2d.js";
4
- import { t as FlowBuilderPage } from "./flow-builder-Dkf2pKoQ.js";
5
- import { _ as useInstalledNodes, a as buildNodeCheck, c as useImportWorkflowTemplate, i as useTemplateImportFlow, n as formatTemplatePrice, o as buildRequiredNodeTypes, r as isPaidTemplate } from "./TemplateCard-CCz5NW6t.js";
6
- import { i as QuotaExhaustedDialog } from "./useWorkflowCodeExport-CcGfzyh6.js";
4
+ import { t as FlowBuilderPage } from "./flow-builder-CWfNAFd8.js";
5
+ import { _ as useInstalledNodes, a as buildNodeCheck, c as useImportWorkflowTemplate, i as useTemplateImportFlow, n as formatTemplatePrice, o as buildRequiredNodeTypes, r as isPaidTemplate } from "./TemplateCard-D2zt-kXW.js";
6
+ import { i as QuotaExhaustedDialog } from "./useWorkflowCodeExport-DSbfcehl.js";
7
7
  import { n as WithOpenTemplateAsCode } from "./OpenTemplateAsCodeButton-CQV-YHlJ.js";
8
8
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
9
9
  import { i as SdkPermissionButton, s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-65QV61nQ.js";
@@ -13,7 +13,7 @@ import { t as OfflineIcon } from "./OfflineIcon-DnKb-mo2.js";
13
13
  import { t as describeOperationError } from "./errors-xPZ-IbQd.js";
14
14
  import { t as Disclosure } from "./Disclosure-C3xMLSU-.js";
15
15
  import { c as useVariables, t as useCreateVariable } from "./useVariables-DFdZofLQ.js";
16
- import { t as PaidTemplateConfirm } from "./PaidTemplateConfirm-C4hmka25.js";
16
+ import { t as PaidTemplateConfirm } from "./PaidTemplateConfirm-Dog5moZa.js";
17
17
  import { t as cn } from "./cn-QqidFIgr.js";
18
18
  import { useEffect, useMemo, useState } from "react";
19
19
  import { useLocation, useNavigate, useParams } from "react-router";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
3
  import { t as OfflineIcon } from "./OfflineIcon-DnKb-mo2.js";
4
- import { h as useWorkflowDefinitions, l as useLazyWorkflowDefinition, s as useDuplicateWorkflow } from "./useWorkflows-B7ZkOKhh.js";
5
- import { i as useTemplateImportFlow, l as useWorkflowTemplates, r as isPaidTemplate, t as TemplateCard, v as storeContextHeaders } from "./TemplateCard-CCz5NW6t.js";
4
+ import { c as useDuplicateWorkflow, g as useWorkflowDefinitions, u as useLazyWorkflowDefinition } from "./useWorkflows-B13Cp8tk.js";
5
+ import { i as useTemplateImportFlow, l as useWorkflowTemplates, r as isPaidTemplate, t as TemplateCard, v as storeContextHeaders } from "./TemplateCard-D2zt-kXW.js";
6
6
  import { CL as WorkflowStatus, YI as WorkflowExportFormat } from "./graphql-types-CxkVzQqA.js";
7
7
  import { i as SdkPermissionButton, t as FLUIDGRIDS_PERMISSIONS } from "./constants-65QV61nQ.js";
8
- import { i as QuotaExhaustedDialog, t as fetchWorkflowCodeExport } from "./useWorkflowCodeExport-CcGfzyh6.js";
8
+ import { i as QuotaExhaustedDialog, t as fetchWorkflowCodeExport } from "./useWorkflowCodeExport-DSbfcehl.js";
9
9
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
10
- import { fn as useFluidGridsAnalytics, t as FluidGridsContext } from "./FluidGridsProvider-xFYPchhw.js";
10
+ import { rn as useFluidGridsAnalytics, t as FluidGridsContext } from "./FluidGridsProvider-BRC0WlAa.js";
11
11
  import { a as emitTemplateUsed } from "./fluidgridsEvents-Dm5CaHtr.js";
12
12
  import { n as useFluidGridsPageControls } from "./pageControlsBridge-0pX9s-3k.js";
13
13
  import { r as templatesControls } from "./pageControlSpecs-DZJ9K37m.js";
@@ -18,14 +18,14 @@ import { t as fetchWorkflowCodeSource } from "./use-workflow-code-editor-DJMH7-X
18
18
  import { t as fetchConnectionNames } from "./useConnections-CmnwGk09.js";
19
19
  import { m as isLosslessReport } from "./workflow-transfer-CsXh0mIi.js";
20
20
  import { a as contentTypeOf, n as TemplateCodeError, o as isTier2Definition, r as assertTemplateSources, t as TEMPLATE_SOURCES_MAX_BYTES } from "./template-code-9dL1SUji.js";
21
- import { t as useGlobalStoreClient } from "./useGlobalStoreClient-CY3q5xdv.js";
21
+ import { t as useGlobalStoreClient } from "./useGlobalStoreClient-C2P50Gj5.js";
22
22
  import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
23
23
  import { o as throwIfResultError, t as describeOperationError } from "./errors-xPZ-IbQd.js";
24
24
  import { t as NodeTypeIcon } from "./node-type-icon-BiX35H0z.js";
25
25
  import { n as formatRunVersion } from "./run-display-UjLAoYqQ.js";
26
26
  import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
27
27
  import { t as TechnicalDetails } from "./TechnicalDetails-xQtjIWWx.js";
28
- import { t as PaidTemplateConfirm } from "./PaidTemplateConfirm-C4hmka25.js";
28
+ import { t as PaidTemplateConfirm } from "./PaidTemplateConfirm-Dog5moZa.js";
29
29
  import { t as cn } from "./cn-QqidFIgr.js";
30
30
  import { useCallback, useContext, useEffect, useMemo, useState } from "react";
31
31
  import { useNavigate } from "react-router";
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { mn as useCanvasEdges, n as FluidGridsProvider } from "./FluidGridsProvider-xFYPchhw.js";
2
+ import { an as useCanvasEdges, n as FluidGridsProvider } from "./FluidGridsProvider-BRC0WlAa.js";
3
3
  import { A as useFlowStore } from "./node-operation-selection-sT7nCmDk.js";
4
4
  import { t as Button } from "./button-DG7y_FVJ.js";
5
5
  import { t as Input } from "./input-ChT6Q-Pr.js";
6
- import { y as Card } from "./TemplateCard-CCz5NW6t.js";
6
+ import { y as Card } from "./TemplateCard-D2zt-kXW.js";
7
7
  import { t as cn } from "./cn-QqidFIgr.js";
8
8
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
9
- import { m as FluidGridsMark, p as useNodeSelectedEvent } from "./flow-builder-Dkf2pKoQ.js";
9
+ import { m as FluidGridsMark, p as useNodeSelectedEvent } from "./flow-builder-CWfNAFd8.js";
10
10
  import { useCallback, useEffect, useRef, useState } from "react";
11
11
  import { Background, Controls, Handle, MarkerType, MiniMap, Position, ReactFlow, ReactFlowProvider, useReactFlow } from "@xyflow/react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,21 +1,22 @@
1
1
  "use client";
2
2
  import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
- import { d as releaseLeaseKeptForReload, f as useWorkflowReloadStore, t as FlowBuilderPage } from "./flow-builder-Dkf2pKoQ.js";
3
+ import { d as releaseLeaseKeptForReload, f as useWorkflowReloadStore, t as FlowBuilderPage } from "./flow-builder-CWfNAFd8.js";
4
4
  import { n as registerLiveCanvasHandler } from "./liveCanvas-D5ytXDp8.js";
5
5
  import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
6
6
  import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
7
7
  import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
8
8
  import { t as WorkflowDefinitionDocument } from "./WorkflowDefinitionDocument-DZLbTPUZ.js";
9
9
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
10
- import { Ct as classifyCreateRefusal, Dt as useSaveStatusStore, G as paramsFromOperation, Gt as rememberRevision, P as createConfiguredNode, Xt as codeBuildIdOf, _ as registerNodeManifests, d as ensureNodeTypesLoaded, g as refetchStoreNodes, o as NODE_CONFIGS, tn as workflowFingerprint, un as resolveNodeOperation, v as registerWorkflowNodeTypes, xt as blankWorkflowCreateInput } from "./FluidGridsProvider-xFYPchhw.js";
10
+ import { Ct as classifyCreateRefusal, Dt as useSaveStatusStore, G as paramsFromOperation, Gt as rememberRevision, P as createConfiguredNode, _ as registerNodeManifests, d as ensureNodeTypesLoaded, g as refetchStoreNodes, o as NODE_CONFIGS, tn as resolveNodeOperation, v as registerWorkflowNodeTypes, xt as blankWorkflowCreateInput } from "./FluidGridsProvider-BRC0WlAa.js";
11
11
  import { A as useFlowStore } from "./node-operation-selection-sT7nCmDk.js";
12
+ import { a as codeBuildIdOf, y as workflowFingerprint } from "./workflow-save-state-DUE9lNwQ.js";
12
13
  import { t as canvasFromDefinition } from "./definition-canvas-DL25_6NH.js";
13
- import { l as useLazyWorkflowDefinition, n as useCreateWorkflow } from "./useWorkflows-B7ZkOKhh.js";
14
- import { _ as useInstalledNodes, a as buildNodeCheck, o as buildRequiredNodeTypes, s as getWorkflowNodeTypes } from "./TemplateCard-CCz5NW6t.js";
14
+ import { r as useCreateWorkflow, u as useLazyWorkflowDefinition } from "./useWorkflows-B13Cp8tk.js";
15
+ import { _ as useInstalledNodes, a as buildNodeCheck, o as buildRequiredNodeTypes, s as getWorkflowNodeTypes } from "./TemplateCard-D2zt-kXW.js";
15
16
  import { r as mergeStickyNotes } from "./sticky-notes-23j-wL6Q.js";
16
17
  import { c as withoutGuidedTourIntent, l as decideMissingWorkflow, o as isGuidedTourIntent, s as pickGuidedTour, u as isCreateIntent } from "./firstWorkflow-C_h0KMB2.js";
17
18
  import { t as BILLING_PLANS_PATH } from "./quota-Cdt8yz7N.js";
18
- import { o as CreateWorkflowRefusalDialog } from "./workflow-description-DIp27SKz.js";
19
+ import { o as CreateWorkflowRefusalDialog } from "./workflow-description-F3inwvof.js";
19
20
  import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } from "react";
20
21
  import { useLocation, useNavigate, useParams } from "react-router";
21
22
  import { Icon } from "@iconify/react";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
- import { m as useWorkflowDefinition } from "./useWorkflows-B7ZkOKhh.js";
3
+ import { h as useWorkflowDefinition } from "./useWorkflows-B13Cp8tk.js";
4
4
  import { Navigate, useParams } from "react-router";
5
5
  import { Icon } from "@iconify/react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,191 @@
1
+ "use client";
2
+ import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import { a as RunDataSavingSettings, c as useWorkflowExecutionSettingsForm, g as useWorkflowNotificationSettings, i as RetentionSettings, n as MaxParallelSetting, o as TimeoutSetting, r as OnErrorSetting, t as ErrorWorkflowSetting } from "./ExecutionSettingsFields-DzKJDOjU.js";
5
+ import { useEffect, useId, useState } from "react";
6
+ import { Link } from "react-router";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ import { toast } from "sonner";
9
+ import { Label, OptionalFields, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Switch } from "@burdenoff/fe-libs/ui";
10
+ import { Button as Button$1 } from "@burdenoff/fe-libs/button";
11
+
12
+ // src/modules/settings/components/WorkflowSettingsDrawer.tsx
13
+ /**
14
+ * One workflow's settings in a side drawer (Navigation v2, BOFF-11843).
15
+ *
16
+ * Opened from a row's "⋯ › More options › Settings" on My Workflows and from
17
+ * the builder's header. It always names the workflow it edits.
18
+ *
19
+ * - Level 1: "Tell me when this fails", the workflow's existing failure
20
+ * notification (`notifyOnFailure`, BOFF-9974): in the app and by push.
21
+ * Email for it is backend work (BOFF-13715), so the drawer does not offer it.
22
+ * - Level 2, under "More options": Timeout, Max parallel, On error, Error
23
+ * workflow, keep run data and retention. They are read and saved by the same
24
+ * hook as Settings › Execution (`useWorkflowExecutionSettingsForm`), so the
25
+ * conflict check and its single retry are the same.
26
+ * - "All settings" opens the full page for the workflow.
27
+ *
28
+ * Saving needs workflow:update (both the notification preference and the
29
+ * execution settings are workflow:update at the gateway); without it the
30
+ * drawer is read-only and says so.
31
+ */
32
+ var WorkflowSettingsDrawer_exports = /* @__PURE__ */ __exportAll({ WorkflowSettingsDrawer: () => WorkflowSettingsDrawer });
33
+ function WorkflowSettingsDrawer({ workflowKey, workflowName, onClose, allSettingsHref, onOpenAllSettings }) {
34
+ return /* @__PURE__ */ jsx(Sheet, {
35
+ open: workflowKey !== null,
36
+ onOpenChange: (open) => {
37
+ if (!open) onClose();
38
+ },
39
+ children: /* @__PURE__ */ jsx(SheetContent, {
40
+ side: "right",
41
+ className: "flex w-full flex-col gap-0 overflow-y-auto p-0 sm:max-w-md",
42
+ "data-testid": "workflow-settings-drawer",
43
+ children: workflowKey !== null && /* @__PURE__ */ jsx(DrawerBody, {
44
+ workflowKey,
45
+ workflowName,
46
+ onClose,
47
+ allSettingsHref,
48
+ onOpenAllSettings
49
+ }, workflowKey)
50
+ })
51
+ });
52
+ }
53
+ function DrawerBody({ workflowKey, workflowName, onClose, allSettingsHref, onOpenAllSettings }) {
54
+ const tr = useTr();
55
+ const notifyId = useId();
56
+ const execution = useWorkflowExecutionSettingsForm(workflowKey);
57
+ const notifications = useWorkflowNotificationSettings(workflowKey);
58
+ const [notifyOnFailure, setNotifyOnFailure] = useState(null);
59
+ const [saving, setSaving] = useState(false);
60
+ const storedNotify = notifications.settings?.notifyOnFailure;
61
+ useEffect(() => {
62
+ if (storedNotify !== void 0) setNotifyOnFailure(storedNotify);
63
+ }, [storedNotify]);
64
+ const canEdit = execution.canEdit;
65
+ const notifyChanged = notifyOnFailure !== null && storedNotify !== void 0 && notifyOnFailure !== storedNotify;
66
+ const busy = saving || execution.saving;
67
+ const handleSave = async () => {
68
+ setSaving(true);
69
+ try {
70
+ if (notifyChanged && notifyOnFailure !== null) await notifications.save({ notifyOnFailure });
71
+ if (execution.dirty) await execution.save();
72
+ toast.success(tr("fluidgrids.workflowSettingsDrawer.savedToast", "Settings saved"));
73
+ onClose();
74
+ } catch (err) {
75
+ toast.error(tr("fluidgrids.settings.execution.saveFailedToast", "Failed to save settings"), { description: err instanceof Error ? err.message : void 0 });
76
+ } finally {
77
+ setSaving(false);
78
+ }
79
+ };
80
+ const notifyLabel = tr("fluidgrids.workflowSettingsDrawer.notifyOnFailureLabel", "Tell me when this fails");
81
+ const shownName = workflowName || tr("fluidgrids.builder.flowBuilder.untitledWorkflow", "Untitled Workflow");
82
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
83
+ /* @__PURE__ */ jsxs(SheetHeader, {
84
+ className: "border-b border-border p-4 pr-12",
85
+ children: [/* @__PURE__ */ jsx(SheetTitle, {
86
+ className: "break-words",
87
+ "data-testid": "workflow-settings-drawer-title",
88
+ children: shownName
89
+ }), /* @__PURE__ */ jsx(SheetDescription, { children: tr("fluidgrids.workflowSettingsDrawer.description", "Settings for this workflow") })]
90
+ }),
91
+ /* @__PURE__ */ jsxs("div", {
92
+ className: "flex-1 space-y-4 p-4",
93
+ children: [
94
+ /* @__PURE__ */ jsxs("div", {
95
+ className: "flex items-start justify-between gap-4 rounded-lg border border-border p-3",
96
+ children: [/* @__PURE__ */ jsxs("div", {
97
+ className: "min-w-0 space-y-1",
98
+ children: [/* @__PURE__ */ jsx(Label, {
99
+ htmlFor: notifyId,
100
+ className: "text-sm font-medium",
101
+ children: notifyLabel
102
+ }), /* @__PURE__ */ jsx("p", {
103
+ className: "text-xs text-muted-foreground",
104
+ children: tr("fluidgrids.workflowSettingsDrawer.notifyOnFailureHelp", "When a live run of this workflow fails, you get a notification in the app and a push to your devices. Email alerts aren't available yet.")
105
+ })]
106
+ }), /* @__PURE__ */ jsx(Switch, {
107
+ id: notifyId,
108
+ className: "mt-1 shrink-0",
109
+ checked: notifyOnFailure ?? false,
110
+ onCheckedChange: (checked) => setNotifyOnFailure(checked),
111
+ disabled: !canEdit || busy || notifications.loading || notifyOnFailure === null,
112
+ "data-testid": "workflow-settings-notify-on-failure"
113
+ })]
114
+ }),
115
+ notifications.error && /* @__PURE__ */ jsx("p", {
116
+ className: "text-sm text-destructive",
117
+ role: "alert",
118
+ children: tr("fluidgrids.settings.workflowNotifications.loadFailed", "Could not load this workflow's notification settings.")
119
+ }),
120
+ /* @__PURE__ */ jsx(OptionalFields, {
121
+ storageKey: `workflows.settings.${workflowKey}`,
122
+ children: /* @__PURE__ */ jsxs("div", {
123
+ className: "divide-y divide-border",
124
+ children: [
125
+ /* @__PURE__ */ jsx(TimeoutSetting, {
126
+ ctl: execution,
127
+ stacked: true
128
+ }),
129
+ /* @__PURE__ */ jsx(MaxParallelSetting, {
130
+ ctl: execution,
131
+ stacked: true
132
+ }),
133
+ /* @__PURE__ */ jsx(OnErrorSetting, {
134
+ ctl: execution,
135
+ stacked: true
136
+ }),
137
+ /* @__PURE__ */ jsx(ErrorWorkflowSetting, {
138
+ ctl: execution,
139
+ stacked: true
140
+ }),
141
+ /* @__PURE__ */ jsx(RunDataSavingSettings, {
142
+ ctl: execution,
143
+ stacked: true
144
+ }),
145
+ /* @__PURE__ */ jsx(RetentionSettings, {
146
+ ctl: execution,
147
+ stacked: true
148
+ })
149
+ ]
150
+ })
151
+ }),
152
+ !canEdit && /* @__PURE__ */ jsx("p", {
153
+ className: "text-xs text-muted-foreground",
154
+ role: "note",
155
+ children: tr("fluidgrids.settings.execution.readOnly", "You can see these settings but not change them: changing them needs permission to edit workflows.")
156
+ })
157
+ ]
158
+ }),
159
+ /* @__PURE__ */ jsxs(SheetFooter, {
160
+ className: "flex-row flex-wrap items-center justify-between gap-2 border-t border-border p-4",
161
+ children: [/* @__PURE__ */ jsx(Link, {
162
+ to: allSettingsHref,
163
+ onClick: (event) => {
164
+ if (!onOpenAllSettings) return;
165
+ event.preventDefault();
166
+ onOpenAllSettings(allSettingsHref);
167
+ },
168
+ className: "inline-flex min-h-11 items-center text-sm font-medium text-primary underline-offset-4 hover:underline",
169
+ "data-testid": "workflow-settings-all-settings",
170
+ children: tr("fluidgrids.workflowSettingsDrawer.allSettings", "All settings")
171
+ }), /* @__PURE__ */ jsxs("div", {
172
+ className: "flex gap-2",
173
+ children: [/* @__PURE__ */ jsx(Button$1, {
174
+ variant: "outline",
175
+ onClick: onClose,
176
+ className: "min-h-11",
177
+ children: tr("fluidgrids.workflowSettingsDrawer.cancel", "Cancel")
178
+ }), /* @__PURE__ */ jsx(Button$1, {
179
+ "data-agent": "confirm",
180
+ onClick: () => void handleSave(),
181
+ disabled: !canEdit || busy || execution.loading,
182
+ className: "min-h-11",
183
+ "data-testid": "workflow-settings-save",
184
+ children: busy ? tr("fluidgrids.settings.execution.saving", "Saving…") : tr("fluidgrids.settings.execution.save", "Save")
185
+ })]
186
+ })]
187
+ })
188
+ ] });
189
+ }
190
+
191
+ export { WorkflowSettingsDrawer_exports as n, WorkflowSettingsDrawer as t };
@@ -0,0 +1,18 @@
1
+
2
+ declare namespace SettingsPage_d_exports {
3
+ export { SETTINGS_TAB_PARAM, SettingsPage, SettingsPageProps };
4
+ }
5
+ interface SettingsPageProps {
6
+ workflowKey?: string;
7
+ }
8
+ declare const SETTINGS_TAB_PARAM = "tab";
9
+ declare function SettingsPage({ workflowKey: workflowKeyProp }?: SettingsPageProps): import("react").JSX.Element;
10
+ interface WorkflowSettingsDrawerProps {
11
+ workflowKey: string | null;
12
+ workflowName: string;
13
+ onClose: () => void;
14
+ allSettingsHref: string;
15
+ onOpenAllSettings?: (href: string) => void;
16
+ }
17
+ declare function WorkflowSettingsDrawer({ workflowKey, workflowName, onClose, allSettingsHref, onOpenAllSettings }: WorkflowSettingsDrawerProps): import("react").JSX.Element;
18
+ export { SettingsPageProps as a, SettingsPage as i, WorkflowSettingsDrawerProps as n, SettingsPage_d_exports as o, SETTINGS_TAB_PARAM as r, WorkflowSettingsDrawer as t };