@burdenoff/fluidgrids-fe-sdk 2026.922.6 → 2026.922.8

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 (57) hide show
  1. package/dist/{ExecutionDetailPage-W7OC3JAA.js → ExecutionDetailPage-WLC63RRK.js} +5 -5
  2. package/dist/{ExecutionDetailPage-W7OC3JAA.js.map → ExecutionDetailPage-WLC63RRK.js.map} +1 -1
  3. package/dist/ExecutionsListPage-P5DRISMN.js +10 -0
  4. package/dist/{ExecutionsListPage-OVBWXB2F.js.map → ExecutionsListPage-P5DRISMN.js.map} +1 -1
  5. package/dist/{WorkflowBuilder-UM2BMGEG.js → WorkflowBuilder-LZ7X2M5Y.js} +8 -7
  6. package/dist/{WorkflowBuilder-UM2BMGEG.js.map → WorkflowBuilder-LZ7X2M5Y.js.map} +1 -1
  7. package/dist/WorkflowsList-QDPC2HVV.js +13 -0
  8. package/dist/{WorkflowsList-ARAFHW6J.js.map → WorkflowsList-QDPC2HVV.js.map} +1 -1
  9. package/dist/{chunk-MGLTXIN5.js → chunk-275FCUOI.js} +3 -39
  10. package/dist/chunk-275FCUOI.js.map +1 -0
  11. package/dist/{chunk-P35U2E2H.js → chunk-4KX6I7PA.js} +5 -5
  12. package/dist/{chunk-P35U2E2H.js.map → chunk-4KX6I7PA.js.map} +1 -1
  13. package/dist/{chunk-2JLRCN25.js → chunk-4LJOUX2R.js} +5 -5
  14. package/dist/{chunk-2JLRCN25.js.map → chunk-4LJOUX2R.js.map} +1 -1
  15. package/dist/{chunk-2OJQPUBC.js → chunk-62OZJC2B.js} +4 -4
  16. package/dist/{chunk-2OJQPUBC.js.map → chunk-62OZJC2B.js.map} +1 -1
  17. package/dist/chunk-AANIWER2.js +41 -0
  18. package/dist/chunk-AANIWER2.js.map +1 -0
  19. package/dist/{chunk-VJDLWE5S.js → chunk-CQOQ6A73.js} +3 -3
  20. package/dist/{chunk-VJDLWE5S.js.map → chunk-CQOQ6A73.js.map} +1 -1
  21. package/dist/{chunk-N4URMBJP.js → chunk-CVNW2EUB.js} +3 -3
  22. package/dist/{chunk-N4URMBJP.js.map → chunk-CVNW2EUB.js.map} +1 -1
  23. package/dist/{chunk-FH5QBQXV.js → chunk-KAMWWBX5.js} +3 -3
  24. package/dist/{chunk-FH5QBQXV.js.map → chunk-KAMWWBX5.js.map} +1 -1
  25. package/dist/{chunk-ELB3LXRJ.js → chunk-OZBZS6DM.js} +3 -3
  26. package/dist/{chunk-ELB3LXRJ.js.map → chunk-OZBZS6DM.js.map} +1 -1
  27. package/dist/{chunk-ACRXNUU2.js → chunk-QWUPHC3K.js} +225 -51
  28. package/dist/chunk-QWUPHC3K.js.map +1 -0
  29. package/dist/{chunk-77S64BTI.js → chunk-REM2BQK5.js} +5 -4
  30. package/dist/chunk-REM2BQK5.js.map +1 -0
  31. package/dist/{chunk-35YDFYV2.js → chunk-VTKT6XDA.js} +801 -24
  32. package/dist/chunk-VTKT6XDA.js.map +1 -0
  33. package/dist/{chunk-5GXAHGJV.js → chunk-WJQSPVU5.js} +11 -6
  34. package/dist/chunk-WJQSPVU5.js.map +1 -0
  35. package/dist/{chunk-NOECWBYH.js → chunk-Z4XRVZZ2.js} +4 -4
  36. package/dist/{chunk-NOECWBYH.js.map → chunk-Z4XRVZZ2.js.map} +1 -1
  37. package/dist/executions.js +5 -5
  38. package/dist/history.js +3 -3
  39. package/dist/index.d.ts +51 -3
  40. package/dist/index.js +21 -20
  41. package/dist/index.js.map +1 -1
  42. package/dist/nodes.js +2 -2
  43. package/dist/settings.d.ts +12 -1
  44. package/dist/settings.js +3 -1
  45. package/dist/templates.js +6 -5
  46. package/dist/{workflow-builder-BNWKK8C7.d.ts → workflow-builder-D9z-_vNX.d.ts} +105 -0
  47. package/dist/workflow-builder.d.ts +1 -1
  48. package/dist/workflow-builder.js +7 -6
  49. package/dist/workflows-list.js +5 -4
  50. package/package.json +1 -1
  51. package/dist/ExecutionsListPage-OVBWXB2F.js +0 -10
  52. package/dist/WorkflowsList-ARAFHW6J.js +0 -12
  53. package/dist/chunk-35YDFYV2.js.map +0 -1
  54. package/dist/chunk-5GXAHGJV.js.map +0 -1
  55. package/dist/chunk-77S64BTI.js.map +0 -1
  56. package/dist/chunk-ACRXNUU2.js.map +0 -1
  57. package/dist/chunk-MGLTXIN5.js.map +0 -1
@@ -1,12 +1,19 @@
1
+ import { useFlowStore } from './chunk-275FCUOI.js';
2
+ import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-WO3AHQVD.js';
1
3
  import { useTr } from './chunk-7YWBH2A5.js';
2
- import { useState, useCallback } from 'react';
3
- import { useNavigate } from 'react-router';
4
+ import { useState, useMemo, useEffect, useCallback } from 'react';
5
+ import { useNavigate, useParams } from 'react-router';
4
6
  import { Icon } from '@iconify/react';
5
7
  import { Button } from '@burdenoff/fe-libs/button';
6
- import { Tabs, TabsList, TabsTrigger, TabsContent, Input, Switch, Card, CardHeader, Label, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@burdenoff/fe-libs/ui';
8
+ import { Tabs, TabsList, TabsTrigger, TabsContent, Input, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Card, CardHeader, Label, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@burdenoff/fe-libs/ui';
7
9
  import { toast } from 'sonner';
8
10
  import { jsxs, jsx } from 'react/jsx-runtime';
9
11
 
12
+ var DEFAULT_EXECUTION_SETTINGS = {
13
+ timeout: 300,
14
+ maxParallelism: 5,
15
+ onError: "stop"
16
+ };
10
17
  var DEFAULT_SETTINGS = {
11
18
  general: {
12
19
  workspaceName: "Default Workspace",
@@ -14,11 +21,7 @@ var DEFAULT_SETTINGS = {
14
21
  autoSaveDrafts: true
15
22
  },
16
23
  execution: {
17
- defaultTimeoutSeconds: 300,
18
- maxRetries: 3,
19
- retryDelaySeconds: 10,
20
- concurrentExecutionLimit: 5
21
- },
24
+ defaultTimeoutSeconds: 300},
22
25
  notifications: {
23
26
  emailOnSuccess: false,
24
27
  emailOnFailure: true,
@@ -158,13 +161,71 @@ function GeneralTab() {
158
161
  ] })
159
162
  ] });
160
163
  }
161
- function ExecutionTab() {
164
+ function ExecutionTab({ workflowKey }) {
162
165
  const tr = useTr();
163
- const settings = DEFAULT_SETTINGS.execution;
164
- return /* @__PURE__ */ jsxs("div", { children: [
165
- /* @__PURE__ */ jsx(ReadOnlyBanner, {}),
166
- /* @__PURE__ */ jsxs("div", { className: "divide-y divide-border-secondary", children: [
167
- /* @__PURE__ */ jsx(
166
+ const { data, loading, refetch } = useWorkflowDefinitionQuery({
167
+ variables: { workflowKey },
168
+ skip: !workflowKey,
169
+ fetchPolicy: "cache-and-network"
170
+ });
171
+ const [updateWorkflowDefinition, { loading: saving }] = useUpdateWorkflowDefinitionMutation();
172
+ const { data: otherWorkflowsData, loading: otherWorkflowsLoading } = useWorkflowDefinitionsQuery({
173
+ variables: { input: { latestOnly: true, limit: 100 } }
174
+ });
175
+ const errorWorkflowOptions = (otherWorkflowsData?.workflowDefinitions?.items ?? []).filter((w) => w.workflowKey !== workflowKey);
176
+ const workflow = data?.workflowDefinition;
177
+ const persistedConfig = useMemo(() => {
178
+ const definitionJson = workflow?.definitionJson;
179
+ const config = definitionJson?.config;
180
+ return config ?? {};
181
+ }, [workflow?.definitionJson]);
182
+ const [form, setForm] = useState(persistedConfig);
183
+ useEffect(() => setForm(persistedConfig), [persistedConfig]);
184
+ const handleSave = useCallback(async () => {
185
+ if (!workflow?.id) return;
186
+ try {
187
+ const definitionJson = {
188
+ ...workflow.definitionJson,
189
+ config: form
190
+ };
191
+ await updateWorkflowDefinition({
192
+ variables: { id: workflow.id, input: { definitionJson } }
193
+ });
194
+ toast.success(
195
+ tr(
196
+ "fluidgrids.settings.execution.savedToast",
197
+ "Execution settings saved"
198
+ )
199
+ );
200
+ void refetch();
201
+ } catch (err) {
202
+ toast.error(
203
+ tr(
204
+ "fluidgrids.settings.execution.saveFailedToast",
205
+ "Failed to save settings"
206
+ ),
207
+ { description: err instanceof Error ? err.message : void 0 }
208
+ );
209
+ }
210
+ }, [workflow, form, updateWorkflowDefinition, refetch, tr]);
211
+ if (!workflowKey) {
212
+ const settings = DEFAULT_SETTINGS.execution;
213
+ return /* @__PURE__ */ jsxs("div", { children: [
214
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6", children: [
215
+ /* @__PURE__ */ jsx(
216
+ Icon,
217
+ {
218
+ icon: "mdi:information",
219
+ width: 18,
220
+ className: "text-amber-400 shrink-0"
221
+ }
222
+ ),
223
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-amber-400", children: tr(
224
+ "fluidgrids.settings.execution.noWorkflowContextBanner",
225
+ "No workflow selected \u2014 open Settings from a specific workflow to edit its execution settings."
226
+ ) })
227
+ ] }),
228
+ /* @__PURE__ */ jsx("div", { className: "divide-y divide-border-secondary", children: /* @__PURE__ */ jsx(
168
229
  SettingRow,
169
230
  {
170
231
  label: tr(
@@ -172,8 +233,8 @@ function ExecutionTab() {
172
233
  "Default Timeout"
173
234
  ),
174
235
  description: tr(
175
- "fluidgrids.settings.execution.defaultTimeoutDescription",
176
- "Maximum time a workflow execution can run (in seconds)"
236
+ "fluidgrids.settings.execution.noWorkflowContextDescription",
237
+ "Open this page from a specific workflow to edit its execution settings."
177
238
  ),
178
239
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
179
240
  /* @__PURE__ */ jsx(
@@ -190,24 +251,67 @@ function ExecutionTab() {
190
251
  ) })
191
252
  ] })
192
253
  }
254
+ ) })
255
+ ] });
256
+ }
257
+ return /* @__PURE__ */ jsxs("div", { children: [
258
+ /* @__PURE__ */ jsxs("div", { className: "divide-y divide-border-secondary", children: [
259
+ /* @__PURE__ */ jsx(
260
+ SettingRow,
261
+ {
262
+ label: tr(
263
+ "fluidgrids.settings.execution.defaultTimeoutLabel",
264
+ "Timeout"
265
+ ),
266
+ description: tr(
267
+ "fluidgrids.settings.execution.defaultTimeoutDescription",
268
+ "Maximum time this workflow's execution can run (in seconds)"
269
+ ),
270
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
271
+ /* @__PURE__ */ jsx(
272
+ Input,
273
+ {
274
+ type: "number",
275
+ min: 1,
276
+ value: form.timeout ?? DEFAULT_EXECUTION_SETTINGS.timeout,
277
+ onChange: (e) => setForm((f) => ({
278
+ ...f,
279
+ timeout: Math.max(1, parseInt(e.target.value, 10) || 1)
280
+ })),
281
+ disabled: loading,
282
+ className: "w-[100px] text-right"
283
+ }
284
+ ),
285
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary", children: tr(
286
+ "fluidgrids.settings.execution.defaultTimeoutUnit",
287
+ "seconds"
288
+ ) })
289
+ ] })
290
+ }
193
291
  ),
194
292
  /* @__PURE__ */ jsx(
195
293
  SettingRow,
196
294
  {
197
295
  label: tr(
198
- "fluidgrids.settings.execution.maxRetriesLabel",
199
- "Max Retries"
296
+ "fluidgrids.settings.execution.concurrencyLimitLabel",
297
+ "Concurrency Limit"
200
298
  ),
201
299
  description: tr(
202
- "fluidgrids.settings.execution.maxRetriesDescription",
203
- "Number of automatic retries on execution failure"
300
+ "fluidgrids.settings.execution.concurrencyLimitDescription",
301
+ "Maximum number of this workflow's executions running simultaneously"
204
302
  ),
205
303
  children: /* @__PURE__ */ jsx(
206
304
  Input,
207
305
  {
208
- value: settings.maxRetries,
209
- readOnly: true,
210
- className: "w-[80px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default"
306
+ type: "number",
307
+ min: 1,
308
+ value: form.maxParallelism ?? DEFAULT_EXECUTION_SETTINGS.maxParallelism,
309
+ onChange: (e) => setForm((f) => ({
310
+ ...f,
311
+ maxParallelism: Math.max(1, parseInt(e.target.value, 10) || 1)
312
+ })),
313
+ disabled: loading,
314
+ className: "w-[80px] text-right"
211
315
  }
212
316
  )
213
317
  }
@@ -216,48 +320,113 @@ function ExecutionTab() {
216
320
  SettingRow,
217
321
  {
218
322
  label: tr(
219
- "fluidgrids.settings.execution.retryDelayLabel",
220
- "Retry Delay"
323
+ "fluidgrids.settings.execution.onErrorLabel",
324
+ "On workflow error"
221
325
  ),
222
326
  description: tr(
223
- "fluidgrids.settings.execution.retryDelayDescription",
224
- "Delay between retry attempts (in seconds)"
327
+ "fluidgrids.settings.execution.onErrorDescription",
328
+ "What to do when this workflow's execution fails"
225
329
  ),
226
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
227
- /* @__PURE__ */ jsx(
228
- Input,
229
- {
230
- value: settings.retryDelaySeconds,
231
- readOnly: true,
232
- className: "w-[100px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default"
233
- }
234
- ),
235
- /* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary", children: tr("fluidgrids.settings.execution.retryDelayUnit", "seconds") })
236
- ] })
330
+ children: /* @__PURE__ */ jsxs(
331
+ "select",
332
+ {
333
+ value: form.onError ?? DEFAULT_EXECUTION_SETTINGS.onError,
334
+ onChange: (e) => setForm((f) => ({
335
+ ...f,
336
+ onError: e.target.value
337
+ })),
338
+ disabled: loading,
339
+ className: "w-[160px] rounded-md border border-border-secondary bg-background-secondary px-2 py-1.5 text-sm text-text-primary",
340
+ children: [
341
+ /* @__PURE__ */ jsx("option", { value: "stop", children: tr("fluidgrids.settings.execution.onErrorStop", "Stop") }),
342
+ /* @__PURE__ */ jsx("option", { value: "continue", children: tr("fluidgrids.settings.execution.onErrorContinue", "Continue") }),
343
+ /* @__PURE__ */ jsx("option", { value: "retry", children: tr("fluidgrids.settings.execution.onErrorRetry", "Retry") })
344
+ ]
345
+ }
346
+ )
237
347
  }
238
348
  ),
239
349
  /* @__PURE__ */ jsx(
240
350
  SettingRow,
241
351
  {
242
352
  label: tr(
243
- "fluidgrids.settings.execution.concurrencyLimitLabel",
244
- "Concurrent Execution Limit"
353
+ "fluidgrids.settings.execution.errorWorkflowLabel",
354
+ "Error workflow"
245
355
  ),
246
356
  description: tr(
247
- "fluidgrids.settings.execution.concurrencyLimitDescription",
248
- "Maximum number of workflow executions running simultaneously"
357
+ "fluidgrids.settings.execution.errorWorkflowDescription",
358
+ "Workflow key to run when this workflow's execution fails (optional)"
359
+ ),
360
+ children: /* @__PURE__ */ jsxs(
361
+ Select,
362
+ {
363
+ value: form.errorWorkflowKey ?? "__none__",
364
+ onValueChange: (val) => setForm((f) => ({
365
+ ...f,
366
+ errorWorkflowKey: val === "__none__" ? void 0 : val
367
+ })),
368
+ disabled: loading || otherWorkflowsLoading,
369
+ children: [
370
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[220px] bg-background-secondary border-border-secondary", children: /* @__PURE__ */ jsx(
371
+ SelectValue,
372
+ {
373
+ placeholder: tr(
374
+ "fluidgrids.settings.execution.errorWorkflowPlaceholder",
375
+ "None"
376
+ )
377
+ }
378
+ ) }),
379
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
380
+ /* @__PURE__ */ jsx(SelectItem, { value: "__none__", children: tr("fluidgrids.settings.execution.errorWorkflowNone", "None") }),
381
+ errorWorkflowOptions.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
382
+ ] })
383
+ ]
384
+ }
385
+ )
386
+ }
387
+ ),
388
+ /* @__PURE__ */ jsx(
389
+ SettingRow,
390
+ {
391
+ label: tr(
392
+ "fluidgrids.settings.execution.saveSuccessLabel",
393
+ "Save successful execution data"
249
394
  ),
250
395
  children: /* @__PURE__ */ jsx(
251
- Input,
396
+ Switch,
252
397
  {
253
- value: settings.concurrentExecutionLimit,
254
- readOnly: true,
255
- className: "w-[80px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default"
398
+ checked: form.dataSaving?.saveSuccessExecutions ?? true,
399
+ onCheckedChange: (checked) => setForm((f) => ({
400
+ ...f,
401
+ dataSaving: { ...f.dataSaving, saveSuccessExecutions: checked }
402
+ })),
403
+ disabled: loading
404
+ }
405
+ )
406
+ }
407
+ ),
408
+ /* @__PURE__ */ jsx(
409
+ SettingRow,
410
+ {
411
+ label: tr(
412
+ "fluidgrids.settings.execution.saveFailedLabel",
413
+ "Save failed execution data"
414
+ ),
415
+ children: /* @__PURE__ */ jsx(
416
+ Switch,
417
+ {
418
+ checked: form.dataSaving?.saveFailedExecutions ?? true,
419
+ onCheckedChange: (checked) => setForm((f) => ({
420
+ ...f,
421
+ dataSaving: { ...f.dataSaving, saveFailedExecutions: checked }
422
+ })),
423
+ disabled: loading
256
424
  }
257
425
  )
258
426
  }
259
427
  )
260
- ] })
428
+ ] }),
429
+ /* @__PURE__ */ jsx("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ jsx(Button, { onClick: () => void handleSave(), disabled: loading || saving, children: saving ? tr("fluidgrids.settings.execution.saving", "Saving\u2026") : tr("fluidgrids.settings.execution.save", "Save") }) })
261
430
  ] });
262
431
  }
263
432
  function NotificationsTab() {
@@ -454,9 +623,14 @@ function ApiTab() {
454
623
  ] }) })
455
624
  ] }) });
456
625
  }
457
- function SettingsPage() {
626
+ function SettingsPage({
627
+ workflowKey: workflowKeyProp
628
+ } = {}) {
458
629
  const tr = useTr();
459
630
  const navigate = useNavigate();
631
+ const routeParams = useParams();
632
+ const activeWorkflowKey = useFlowStore((s) => s.workflow.workflowKey);
633
+ const workflowKey = workflowKeyProp || routeParams.workflowKey || routeParams.id || activeWorkflowKey || void 0;
460
634
  const [activeTab, setActiveTab] = useState("general");
461
635
  return /* @__PURE__ */ jsxs("div", { className: "p-4 sm:p-6 bg-background-primary min-h-screen", children: [
462
636
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6", children: [
@@ -492,7 +666,7 @@ function SettingsPage() {
492
666
  ] })
493
667
  ] }),
494
668
  /* @__PURE__ */ jsx(TabsContent, { value: "general", children: /* @__PURE__ */ jsx(GeneralTab, {}) }),
495
- /* @__PURE__ */ jsx(TabsContent, { value: "execution", children: /* @__PURE__ */ jsx(ExecutionTab, {}) }),
669
+ /* @__PURE__ */ jsx(TabsContent, { value: "execution", children: /* @__PURE__ */ jsx(ExecutionTab, { workflowKey }) }),
496
670
  /* @__PURE__ */ jsx(TabsContent, { value: "notifications", children: /* @__PURE__ */ jsx(NotificationsTab, {}) }),
497
671
  /* @__PURE__ */ jsx(TabsContent, { value: "api", children: /* @__PURE__ */ jsx(ApiTab, {}) })
498
672
  ] })
@@ -500,5 +674,5 @@ function SettingsPage() {
500
674
  }
501
675
 
502
676
  export { SettingsPage };
503
- //# sourceMappingURL=chunk-ACRXNUU2.js.map
504
- //# sourceMappingURL=chunk-ACRXNUU2.js.map
677
+ //# sourceMappingURL=chunk-QWUPHC3K.js.map
678
+ //# sourceMappingURL=chunk-QWUPHC3K.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/modules/settings/pages/SettingsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;AA4DA,IAAM,0BAAA,GAEF;AAAA,EACF,OAAA,EAAS,GAAA;AAAA,EACT,cAAA,EAAgB,CAAA;AAAA,EAChB,OAAA,EAAS;AACX,CAAA;AAMA,IAAM,gBAAA,GAAmB;AAAA,EACvB,OAAA,EAAS;AAAA,IACP,aAAA,EAAe,mBAAA;AAAA,IACf,qBAAA,EAAuB,IAAA;AAAA,IACvB,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,qBAAA,EAAuB,GAIzB,CAAA;AAAA,EACA,aAAA,EAAe;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,cAAA,EAAgB,IAAA;AAAA,IAChB,gBAAA,EAAkB,KAAA;AAAA,IAClB,gBAAA,EAAkB;AAAA,GACpB;AAAA,EACA,GAAA,EAAK;AAAA,IACH,UAAA,EAAY,mBAAA;AAAA,IACZ,gBAAA,EAAkB;AAAA;AAEtB,CAAA;AAMA,SAAS,cAAA,GAAiB;AACxB,EAAA,MAAM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AAAA,UACxC,EAAA,CAAG,6CAA6C,eAAe;AAAA,SAAA,EAClE,CAAA;AAAA,wBACA,IAAA,CAAC,WAAA,EAAA,EAAY,KAAA,EAAM,KAAA,EAAM,WAAU,SAAA,EACjC,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAK,SAAA,EAAU,KAAA,EAAO,EAAA,EAAI,CAAA;AAAA,UAC/B,EAAA,CAAG,mCAAmC,KAAK;AAAA,SAAA,EAC9C;AAAA,OAAA,EACF,CAAA;AAAA,0BAEC,WAAA,EAAA,EAAY,KAAA,EAAM,SAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,cAAW,CAAA,EACd,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,aACjB,QAAA,kBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,aAA0B,CAAA,EAC1C,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,eAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,oBAAiB,CAAA,EACpB,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,KAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,UAAO,CAAA,EACV;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"chunk-QWUPHC3K.js","sourcesContent":["import { useState, useCallback, useEffect, useMemo } from \"react\";\nimport { useNavigate, useParams } from \"react-router\";\nimport { Icon } from \"@iconify/react\";\nimport { Button } from \"@burdenoff/fe-libs/button\";\nimport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n Input,\n Label,\n Switch,\n Card,\n CardHeader,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n TooltipProvider,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from \"@burdenoff/fe-libs/ui\";\nimport { toast } from \"sonner\";\nimport { useTr } from \"../../../hooks/useTr\";\nimport { useFlowStore } from \"../../../builder/stores/flow-store\";\nimport {\n useWorkflowDefinitionQuery,\n useUpdateWorkflowDefinitionMutation,\n useWorkflowDefinitionsQuery,\n} from \"../../../generated/operations\";\n\n// ============================================================================\n// Per-workflow execution settings (BOFF-7512)\n// ============================================================================\n\n/**\n * Mirrors `IWorkflowConfig` on `wspace-workflow-svc`'s\n * `IWorkflowDefinitionJson.config` (a sibling of `data`, not nested inside\n * it), plus two fields the backend type doesn't have yet: `errorWorkflowKey`\n * and `dataSaving`. Per the ticket, \"if the underlying setting doesn't exist\n * yet, add just the schema field and wire the UI\" — `config` on\n * `definitionJson` is already a free-form JSON blob, so these new keys need\n * no backend schema change to round-trip; nothing downstream reads\n * `dataSaving.saveSuccessExecutions`/`saveFailedExecutions` yet (that's\n * execution-lifecycle work tracked separately), but the value now persists.\n */\ninterface WorkflowExecutionSettings {\n timeout?: number; // seconds\n maxParallelism?: number;\n onError?: \"stop\" | \"continue\" | \"retry\";\n /** Workflow key to run when this workflow's execution fails. */\n errorWorkflowKey?: string;\n dataSaving?: {\n saveSuccessExecutions?: boolean;\n saveFailedExecutions?: boolean;\n };\n}\n\nconst DEFAULT_EXECUTION_SETTINGS: Required<\n Pick<WorkflowExecutionSettings, \"timeout\" | \"maxParallelism\" | \"onError\">\n> = {\n timeout: 300,\n maxParallelism: 5,\n onError: \"stop\",\n};\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst DEFAULT_SETTINGS = {\n general: {\n workspaceName: \"Default Workspace\",\n defaultWorkflowPrefix: \"wf\",\n autoSaveDrafts: true,\n },\n execution: {\n defaultTimeoutSeconds: 300,\n maxRetries: 3,\n retryDelaySeconds: 10,\n concurrentExecutionLimit: 5,\n },\n notifications: {\n emailOnSuccess: false,\n emailOnFailure: true,\n webhookOnSuccess: false,\n webhookOnFailure: true,\n },\n api: {\n gatewayUrl: \"/api/v1/workflows\",\n webhookUrlFormat: \"/api/v1/webhooks/workflow/{workflowKey}/trigger\",\n },\n};\n\n// ============================================================================\n// Sub-Components\n// ============================================================================\n\nfunction ReadOnlyBanner() {\n const tr = useTr();\n\n return (\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6\">\n <Icon\n icon=\"mdi:information\"\n width={18}\n className=\"text-amber-400 shrink-0\"\n />\n <p className=\"text-sm text-amber-400\">\n {tr(\n \"fluidgrids.settings.readOnlyBanner.message\",\n \"Settings are managed at workspace level. Contact your workspace administrator to change these values.\",\n )}\n </p>\n </div>\n );\n}\n\nfunction CopyButton({ value, label }: { value: string; label: string }) {\n const tr = useTr();\n\n const handleCopy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(value);\n toast.success(\n `${label} ${tr(\"fluidgrids.settings.copyButton.copiedToast\", \"copied to clipboard\")}`,\n );\n } catch {\n toast.error(\n tr(\n \"fluidgrids.settings.copyButton.copyFailedToast\",\n \"Failed to copy to clipboard\",\n ),\n );\n }\n }, [value, label, tr]);\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={handleCopy}\n className=\"p-1.5 rounded hover:bg-background-tertiary text-text-secondary hover:text-text-primary transition-colors\"\n >\n <Icon icon=\"mdi:content-copy\" width={16} />\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"fluidgrids.settings.copyButton.copyTooltipPrefix\", \"Copy\")}{\" \"}\n {label}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n\nfunction SettingRow({\n label,\n description,\n children,\n}: {\n label: string;\n description?: string;\n children: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 py-4\">\n <div className=\"flex-1 min-w-0\">\n <Label className=\"text-sm font-medium text-text-primary\">{label}</Label>\n {description && (\n <p className=\"text-xs text-text-secondary mt-0.5\">{description}</p>\n )}\n </div>\n <div className=\"shrink-0\">{children}</div>\n </div>\n );\n}\n\n// ============================================================================\n// Tab Content Components\n// ============================================================================\n\nfunction GeneralTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.general;\n\n return (\n <div>\n <ReadOnlyBanner />\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workspaceNameLabel\",\n \"Workspace Name\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workspaceNameDescription\",\n \"The name of your workspace\",\n )}\n >\n <Input\n value={settings.workspaceName}\n readOnly\n className=\"w-[250px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workflowPrefixLabel\",\n \"Default Workflow Prefix\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workflowPrefixDescription\",\n \"Prefix used when generating new workflow keys\",\n )}\n >\n <Input\n value={settings.defaultWorkflowPrefix}\n readOnly\n className=\"w-[120px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.autoSaveDraftsLabel\",\n \"Auto-save Drafts\",\n )}\n description={tr(\n \"fluidgrids.settings.general.autoSaveDraftsDescription\",\n \"Automatically save draft workflows while editing\",\n )}\n >\n <Switch checked={settings.autoSaveDrafts} disabled />\n </SettingRow>\n </div>\n </div>\n );\n}\n\n/**\n * Editable, per-WORKFLOW execution settings (BOFF-7512) — replaces the old\n * global/read-only tab. Resolves the target workflow from (in order) an\n * explicit `workflowKey` prop, the `:id` route param, or the flow store's\n * currently-loaded workflow (set when the user arrived here from the\n * builder). When none of those resolve, falls back to the previous\n * read-only static display rather than a broken/blank editor.\n */\nfunction ExecutionTab({ workflowKey }: Readonly<{ workflowKey?: string }>) {\n const tr = useTr();\n\n const { data, loading, refetch } = useWorkflowDefinitionQuery({\n variables: { workflowKey },\n skip: !workflowKey,\n fetchPolicy: \"cache-and-network\",\n });\n const [updateWorkflowDefinition, { loading: saving }] =\n useUpdateWorkflowDefinitionMutation();\n\n // \"Error workflow\" picker — reuses the same list-workflows query the\n // history/list pages already use (`workflowDefinitions`), latest version\n // per key, excluding the workflow being edited (running itself as its own\n // error handler on every failure risks an infinite loop).\n const { data: otherWorkflowsData, loading: otherWorkflowsLoading } =\n useWorkflowDefinitionsQuery({\n variables: { input: { latestOnly: true, limit: 100 } },\n });\n const errorWorkflowOptions = (\n otherWorkflowsData?.workflowDefinitions?.items ?? []\n ).filter((w) => w.workflowKey !== workflowKey);\n\n const workflow = data?.workflowDefinition;\n const persistedConfig = useMemo(() => {\n const definitionJson = workflow?.definitionJson as\n Record<string, unknown> | undefined;\n const config = definitionJson?.config as\n WorkflowExecutionSettings | undefined;\n return config ?? {};\n }, [workflow?.definitionJson]);\n\n const [form, setForm] = useState<WorkflowExecutionSettings>(persistedConfig);\n // Re-seed the form whenever the fetched workflow (or its persisted config)\n // changes — e.g. on first load, or after switching workflows.\n useEffect(() => setForm(persistedConfig), [persistedConfig]);\n\n const handleSave = useCallback(async () => {\n if (!workflow?.id) return;\n try {\n const definitionJson = {\n ...(workflow.definitionJson as Record<string, unknown>),\n config: form,\n };\n await updateWorkflowDefinition({\n variables: { id: workflow.id, input: { definitionJson } },\n });\n toast.success(\n tr(\n \"fluidgrids.settings.execution.savedToast\",\n \"Execution settings saved\",\n ),\n );\n void refetch();\n } catch (err) {\n toast.error(\n tr(\n \"fluidgrids.settings.execution.saveFailedToast\",\n \"Failed to save settings\",\n ),\n { description: err instanceof Error ? err.message : undefined },\n );\n }\n }, [workflow, form, updateWorkflowDefinition, refetch, tr]);\n\n if (!workflowKey) {\n // No workflow context resolvable — keep the previous static display so\n // the page still renders something useful rather than an empty form.\n // NOT the workspace-level `ReadOnlyBanner` copy: this isn't a policy\n // restriction, just a missing route/store context, so it gets its own\n // message rather than implying \"contact your admin\".\n const settings = DEFAULT_SETTINGS.execution;\n return (\n <div>\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6\">\n <Icon\n icon=\"mdi:information\"\n width={18}\n className=\"text-amber-400 shrink-0\"\n />\n <p className=\"text-sm text-amber-400\">\n {tr(\n \"fluidgrids.settings.execution.noWorkflowContextBanner\",\n \"No workflow selected — open Settings from a specific workflow to edit its execution settings.\",\n )}\n </p>\n </div>\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Default Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.noWorkflowContextDescription\",\n \"Open this page from a specific workflow to edit its execution settings.\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n value={settings.defaultTimeoutSeconds}\n readOnly\n className=\"w-[100px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.defaultTimeoutDescription\",\n \"Maximum time this workflow's execution can run (in seconds)\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n type=\"number\"\n min={1}\n value={form.timeout ?? DEFAULT_EXECUTION_SETTINGS.timeout}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n timeout: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[100px] text-right\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.concurrencyLimitLabel\",\n \"Concurrency Limit\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.concurrencyLimitDescription\",\n \"Maximum number of this workflow's executions running simultaneously\",\n )}\n >\n <Input\n type=\"number\"\n min={1}\n value={\n form.maxParallelism ?? DEFAULT_EXECUTION_SETTINGS.maxParallelism\n }\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n maxParallelism: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[80px] text-right\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.onErrorLabel\",\n \"On workflow error\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.onErrorDescription\",\n \"What to do when this workflow's execution fails\",\n )}\n >\n <select\n value={form.onError ?? DEFAULT_EXECUTION_SETTINGS.onError}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n onError: e.target.value as WorkflowExecutionSettings[\"onError\"],\n }))\n }\n disabled={loading}\n className=\"w-[160px] rounded-md border border-border-secondary bg-background-secondary px-2 py-1.5 text-sm text-text-primary\"\n >\n <option value=\"stop\">\n {tr(\"fluidgrids.settings.execution.onErrorStop\", \"Stop\")}\n </option>\n <option value=\"continue\">\n {tr(\"fluidgrids.settings.execution.onErrorContinue\", \"Continue\")}\n </option>\n <option value=\"retry\">\n {tr(\"fluidgrids.settings.execution.onErrorRetry\", \"Retry\")}\n </option>\n </select>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.errorWorkflowLabel\",\n \"Error workflow\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.errorWorkflowDescription\",\n \"Workflow key to run when this workflow's execution fails (optional)\",\n )}\n >\n <Select\n value={form.errorWorkflowKey ?? \"__none__\"}\n onValueChange={(val) =>\n setForm((f) => ({\n ...f,\n errorWorkflowKey: val === \"__none__\" ? undefined : val,\n }))\n }\n disabled={loading || otherWorkflowsLoading}\n >\n <SelectTrigger className=\"w-[220px] bg-background-secondary border-border-secondary\">\n <SelectValue\n placeholder={tr(\n \"fluidgrids.settings.execution.errorWorkflowPlaceholder\",\n \"None\",\n )}\n />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"__none__\">\n {tr(\"fluidgrids.settings.execution.errorWorkflowNone\", \"None\")}\n </SelectItem>\n {errorWorkflowOptions.map((w) => (\n <SelectItem key={w.workflowKey} value={w.workflowKey}>\n {w.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveSuccessLabel\",\n \"Save successful execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveSuccessExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveSuccessExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveFailedLabel\",\n \"Save failed execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveFailedExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveFailedExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n </div>\n <div className=\"mt-4 flex justify-end\">\n <Button onClick={() => void handleSave()} disabled={loading || saving}>\n {saving\n ? tr(\"fluidgrids.settings.execution.saving\", \"Saving…\")\n : tr(\"fluidgrids.settings.execution.save\", \"Save\")}\n </Button>\n </div>\n </div>\n );\n}\n\nfunction NotificationsTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.notifications;\n\n return (\n <div>\n <ReadOnlyBanner />\n\n {/* Email Notifications */}\n <div className=\"mb-6\">\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:email-outline\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.emailSectionTitle\",\n \"Email Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessDescription\",\n \"Send email when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.emailOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnFailureDescription\",\n \"Send email when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.emailOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n\n {/* Webhook Notifications */}\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:webhook\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.webhookSectionTitle\",\n \"Webhook Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessDescription\",\n \"Send webhook when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.webhookOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureDescription\",\n \"Send webhook when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.webhookOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n </div>\n );\n}\n\nfunction ApiTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.api;\n\n return (\n <div>\n <div className=\"space-y-4\">\n {/* API Gateway URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon icon=\"mdi:api\" width={20} className=\"text-text-secondary\" />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlTitle\",\n \"API Gateway URL\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlDescription\",\n \"Base URL for workflow API operations. Use this to trigger, list, and manage workflows programmatically.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.gatewayUrl}\n </code>\n <CopyButton\n value={settings.gatewayUrl}\n label={tr(\n \"fluidgrids.settings.api.gatewayUrlCopyLabel\",\n \"API Gateway URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Webhook URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:webhook\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlTitle\",\n \"Webhook URL Format\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionPrefix\",\n \"URL format for triggering workflows via webhook. Replace\",\n )}{\" \"}\n <code className=\"text-text-primary\">{\"{workflowKey}\"}</code>{\" \"}\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionSuffix\",\n \"with the actual workflow key.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.webhookUrlFormat}\n </code>\n <CopyButton\n value={settings.webhookUrlFormat}\n label={tr(\n \"fluidgrids.settings.api.webhookUrlCopyLabel\",\n \"Webhook URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Example cURL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:console\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.curlExampleTitle\",\n \"Example: Trigger via cURL\",\n )}\n </h3>\n </div>\n <div className=\"relative rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <pre className=\"text-xs text-text-primary overflow-x-auto whitespace-pre-wrap\">\n {`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\n -H \"Content-Type: application/json\" \\\\\n -H \"Authorization: Bearer <token>\" \\\\\n -d '{\"input\": {}}'`}\n </pre>\n <div className=\"absolute top-2 right-2\">\n <CopyButton\n value={`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\\n -H \"Content-Type: application/json\" \\\\\\n -H \"Authorization: Bearer <token>\" \\\\\\n -d '{\"input\": {}}'`}\n label={tr(\n \"fluidgrids.settings.api.curlCopyLabel\",\n \"cURL command\",\n )}\n />\n </div>\n </div>\n </CardHeader>\n </Card>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport interface SettingsPageProps {\n /**\n * Explicit workflow key to scope the Execution tab to (BOFF-7512). When\n * omitted, falls back to the `:id`/`:workflowKey` route param (for hosts\n * that mount this page under a per-workflow path), then to the workflow\n * currently loaded in the builder's flow store (for hosts that navigate\n * here from the builder without a route param). If none resolve, the\n * Execution tab falls back to its previous static display.\n */\n workflowKey?: string;\n}\n\nexport function SettingsPage({\n workflowKey: workflowKeyProp,\n}: SettingsPageProps = {}) {\n const tr = useTr();\n const navigate = useNavigate();\n const routeParams = useParams<{ id?: string; workflowKey?: string }>();\n const activeWorkflowKey = useFlowStore((s) => s.workflow.workflowKey);\n const workflowKey =\n workflowKeyProp ||\n routeParams.workflowKey ||\n routeParams.id ||\n activeWorkflowKey ||\n undefined;\n const [activeTab, setActiveTab] = useState(\"general\");\n\n return (\n <div className=\"p-4 sm:p-6 bg-background-primary min-h-screen\">\n {/* Header */}\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6\">\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr(\"fluidgrids.settings.page.title\", \"Settings\")}\n </h1>\n <p className=\"text-text-secondary mt-1\">\n {tr(\n \"fluidgrids.settings.page.subtitle\",\n \"Configure workflow execution and notification preferences\",\n )}\n </p>\n </div>\n <Button variant=\"outline\" onClick={() => navigate(\"../list\")}>\n <Icon icon=\"mdi:arrow-left\" className=\"mr-2\" width={16} />\n {tr(\"fluidgrids.settings.page.backToWorkflows\", \"Back to Workflows\")}\n </Button>\n </div>\n\n {/* Tabs */}\n <Tabs value={activeTab} onValueChange={setActiveTab} className=\"w-full\">\n <TabsList className=\"bg-background-secondary border border-border-secondary mb-6\">\n <TabsTrigger value=\"general\" className=\"gap-1.5\">\n <Icon icon=\"mdi:cog\" width={16} />\n {tr(\"fluidgrids.settings.page.generalTab\", \"General\")}\n </TabsTrigger>\n <TabsTrigger value=\"execution\" className=\"gap-1.5\">\n <Icon icon=\"mdi:play-circle\" width={16} />\n {tr(\"fluidgrids.settings.page.executionTab\", \"Execution\")}\n </TabsTrigger>\n <TabsTrigger value=\"notifications\" className=\"gap-1.5\">\n <Icon icon=\"mdi:bell-outline\" width={16} />\n {tr(\"fluidgrids.settings.page.notificationsTab\", \"Notifications\")}\n </TabsTrigger>\n <TabsTrigger value=\"api\" className=\"gap-1.5\">\n <Icon icon=\"mdi:api\" width={16} />\n {tr(\"fluidgrids.settings.page.apiTab\", \"API\")}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"general\">\n <GeneralTab />\n </TabsContent>\n <TabsContent value=\"execution\">\n <ExecutionTab workflowKey={workflowKey} />\n </TabsContent>\n <TabsContent value=\"notifications\">\n <NotificationsTab />\n </TabsContent>\n <TabsContent value=\"api\">\n <ApiTab />\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"]}
@@ -1,7 +1,8 @@
1
- import { useFlowStore, QuotaExhaustedDialog } from './chunk-MGLTXIN5.js';
1
+ import { QuotaExhaustedDialog } from './chunk-AANIWER2.js';
2
2
  import { SdkPermissionButton, FLUIDGRIDS_PERMISSIONS, SdkPermissionGate } from './chunk-UIY2HBWA.js';
3
- import { useWorkflowDefinitions, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-ELB3LXRJ.js';
3
+ import { useWorkflowDefinitions, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-OZBZS6DM.js';
4
4
  import { config } from './chunk-WWU2O2SR.js';
5
+ import { useFlowStore } from './chunk-275FCUOI.js';
5
6
  import { useTr } from './chunk-7YWBH2A5.js';
6
7
  import { useState, useMemo } from 'react';
7
8
  import { useNavigate } from 'react-router';
@@ -800,5 +801,5 @@ function WorkflowsList() {
800
801
  }
801
802
 
802
803
  export { WorkflowsList };
803
- //# sourceMappingURL=chunk-77S64BTI.js.map
804
- //# sourceMappingURL=chunk-77S64BTI.js.map
804
+ //# sourceMappingURL=chunk-REM2BQK5.js.map
805
+ //# sourceMappingURL=chunk-REM2BQK5.js.map