@burdenoff/microfe-bigconsole 2026.1004.2 → 2026.1004.4

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 (150) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.d.ts +1 -1
  2. package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
  3. package/dist/bigconsole/BigConsoleRoutes.js +15 -1
  4. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  5. package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
  6. package/dist/bigconsole/components/DrilldownModal.js +54 -53
  7. package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
  8. package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +3 -1
  9. package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts.map +1 -1
  10. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +40 -39
  11. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  12. package/dist/bigconsole/components/dashboard/DashboardCanvas.d.ts.map +1 -1
  13. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +184 -177
  14. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  15. package/dist/bigconsole/components/dashboard/DashboardGrid.d.ts.map +1 -1
  16. package/dist/bigconsole/components/dashboard/DashboardGrid.js +40 -22
  17. package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
  18. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.d.ts.map +1 -1
  19. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +31 -25
  20. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
  21. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts +1 -1
  22. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts.map +1 -1
  23. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +115 -80
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.d.ts.map +1 -1
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +177 -146
  27. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  28. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts +1 -1
  29. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts.map +1 -1
  30. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +375 -325
  31. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
  32. package/dist/bigconsole/components/datasink/CacheTTLSelector.d.ts.map +1 -1
  33. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +7 -1
  34. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  35. package/dist/bigconsole/components/parser/ParserSelector.d.ts +3 -1
  36. package/dist/bigconsole/components/parser/ParserSelector.d.ts.map +1 -1
  37. package/dist/bigconsole/components/parser/ParserSelector.js +94 -94
  38. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  39. package/dist/bigconsole/components/pipeline/PipelineCard.d.ts.map +1 -1
  40. package/dist/bigconsole/components/pipeline/PipelineCard.js +111 -89
  41. package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
  42. package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts +8 -0
  43. package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts.map +1 -0
  44. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +52 -0
  45. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js.map +1 -0
  46. package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
  47. package/dist/bigconsole/components/widgets/PropertiesPanel.js +257 -221
  48. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  49. package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +1 -0
  50. package/dist/bigconsole/components/widgets/WidgetHeader.d.ts.map +1 -1
  51. package/dist/bigconsole/components/widgets/WidgetHeader.js +29 -29
  52. package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
  53. package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts +2 -0
  54. package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts.map +1 -1
  55. package/dist/bigconsole/components/widgets/WidgetWrapper.js +247 -239
  56. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  57. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts.map +1 -1
  58. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +6 -4
  59. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
  60. package/dist/bigconsole/components/widgets/states/EmptyState.d.ts +1 -0
  61. package/dist/bigconsole/components/widgets/states/EmptyState.d.ts.map +1 -1
  62. package/dist/bigconsole/components/widgets/states/EmptyState.js +4 -4
  63. package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
  64. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts +7 -0
  65. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts.map +1 -0
  66. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js +94 -0
  67. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js.map +1 -0
  68. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts +7 -0
  69. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts.map +1 -0
  70. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +101 -0
  71. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js.map +1 -0
  72. package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts +16 -0
  73. package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts.map +1 -0
  74. package/dist/bigconsole/hooks/useBigConsoleSettings.js +57 -0
  75. package/dist/bigconsole/hooks/useBigConsoleSettings.js.map +1 -0
  76. package/dist/bigconsole/hooks/useDashboardOperations.d.ts.map +1 -1
  77. package/dist/bigconsole/hooks/useDashboardOperations.js +102 -79
  78. package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
  79. package/dist/bigconsole/hooks/useExportDashboard.d.ts +3 -1
  80. package/dist/bigconsole/hooks/useExportDashboard.d.ts.map +1 -1
  81. package/dist/bigconsole/hooks/useExportDashboard.js +23 -13
  82. package/dist/bigconsole/hooks/useExportDashboard.js.map +1 -1
  83. package/dist/bigconsole/hooks/useFilterUrlSync.d.ts +18 -0
  84. package/dist/bigconsole/hooks/useFilterUrlSync.d.ts.map +1 -1
  85. package/dist/bigconsole/hooks/useFilterUrlSync.js +87 -57
  86. package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
  87. package/dist/bigconsole/hooks/useGlobalFilters.d.ts.map +1 -1
  88. package/dist/bigconsole/hooks/useGlobalFilters.js +39 -29
  89. package/dist/bigconsole/hooks/useGlobalFilters.js.map +1 -1
  90. package/dist/bigconsole/hooks/usePageOperations.d.ts.map +1 -1
  91. package/dist/bigconsole/hooks/usePageOperations.js +1 -0
  92. package/dist/bigconsole/hooks/usePageOperations.js.map +1 -1
  93. package/dist/bigconsole/hooks/usePipelineOperations.d.ts.map +1 -1
  94. package/dist/bigconsole/hooks/usePipelineOperations.js +114 -112
  95. package/dist/bigconsole/hooks/usePipelineOperations.js.map +1 -1
  96. package/dist/bigconsole/hooks/useShareRecipients.d.ts +22 -0
  97. package/dist/bigconsole/hooks/useShareRecipients.d.ts.map +1 -0
  98. package/dist/bigconsole/hooks/useShareRecipients.js +198 -0
  99. package/dist/bigconsole/hooks/useShareRecipients.js.map +1 -0
  100. package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
  101. package/dist/bigconsole/pages/DashboardBuilderPage.js +198 -193
  102. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  103. package/dist/bigconsole/pages/DashboardViewPage.d.ts.map +1 -1
  104. package/dist/bigconsole/pages/DashboardViewPage.js +171 -167
  105. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  106. package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
  107. package/dist/bigconsole/pages/DashboardsPage.js +313 -266
  108. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  109. package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
  110. package/dist/bigconsole/pages/DataSinkBuilderPage.js +84 -79
  111. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  112. package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
  113. package/dist/bigconsole/pages/DataSinkViewPage.js +267 -257
  114. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  115. package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
  116. package/dist/bigconsole/pages/InsightsPage.js +465 -402
  117. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  118. package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
  119. package/dist/bigconsole/pages/PipelineBuilderPage.js +169 -157
  120. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  121. package/dist/bigconsole/pages/PipelineViewPage.d.ts.map +1 -1
  122. package/dist/bigconsole/pages/PipelineViewPage.js +370 -230
  123. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  124. package/dist/bigconsole/pages/PipelinesPage.d.ts.map +1 -1
  125. package/dist/bigconsole/pages/PipelinesPage.js +181 -151
  126. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  127. package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
  128. package/dist/bigconsole/pages/SettingsPage.js +188 -208
  129. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  130. package/dist/bigconsole/pages/WidgetDemoPage.d.ts.map +1 -1
  131. package/dist/bigconsole/pages/WidgetDemoPage.js +134 -117
  132. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  133. package/dist/bigconsole/pages/WorkflowViewPage.d.ts.map +1 -1
  134. package/dist/bigconsole/pages/WorkflowViewPage.js +315 -267
  135. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  136. package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
  137. package/dist/bigconsole/pages/WorkflowsPage.js +4 -3
  138. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  139. package/dist/bigconsole/types/index.d.ts +4 -0
  140. package/dist/bigconsole/types/index.d.ts.map +1 -1
  141. package/dist/generated/wspace-operations.d.ts +148 -0
  142. package/dist/generated/wspace-operations.d.ts.map +1 -1
  143. package/dist/generated/wspace-operations.js +172 -133
  144. package/dist/generated/wspace-operations.js.map +1 -1
  145. package/dist/generated/wspace-types.d.ts +21 -0
  146. package/dist/generated/wspace-types.d.ts.map +1 -1
  147. package/dist/generated/wspace-types.js.map +1 -1
  148. package/dist/microfe-bigconsole.css +1 -1
  149. package/dist/translations/en.d.ts.map +1 -1
  150. package/package.json +3 -3
@@ -2,582 +2,630 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
3
  import t from "../hooks/useWorkflowOperations.js";
4
4
  import { BOOTSTRAP_RETRY_DELAY_MS as n } from "../constants.js";
5
- import { useBigConsole as r } from "../context/BigConsoleContext.js";
6
- import "../context/index.js";
7
- import { SECTION_FOCUS_RING as i, sectionSurfaceClasses as ee } from "../components/common/sectionStyles.js";
5
+ import { SECTION_FOCUS_RING as r, sectionSurfaceClasses as i } from "../components/common/sectionStyles.js";
8
6
  import { Section as a, SectionStack as o } from "../components/common/Section.js";
9
7
  import "../components/common/index.js";
10
8
  import { BIGCONSOLE_PERMISSIONS as s } from "../../constants/permissions.js";
11
- import { isNative as c, nativeCopyText as te, nativeNotify as l, nativeToast as u } from "../../utils/nativeBridge.js";
9
+ import { isNative as c, nativeCopyText as ee, nativeNotify as l, nativeToast as te } from "../../utils/nativeBridge.js";
12
10
  import ne from "../components/workflow/WorkflowStatusBadge.js";
13
- import d from "../components/workflow/WorkflowDeleteDialog.js";
14
- import { memo as f, useCallback as p, useEffect as re, useState as m } from "react";
15
- import { useParams as h } from "react-router";
16
- import { AccessDenied as g, PermissionButton as _ } from "@burdenoff/fe-libs/shared/components";
17
- import { usePermissions as ie } from "@burdenoff/fe-libs/shared/providers/shell";
18
- import { Button as v, IllustratedEmptyState as y, NextSteps as ae, PagePurpose as oe, Spinner as se } from "@burdenoff/fe-libs/ui";
19
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
20
- import { WorkflowBuilder as ce } from "@burdenoff/fluidgrids-fe-sdk";
21
- import { useI18n as le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { formatDistanceToNow as C } from "date-fns";
11
+ import re from "../components/workflow/WorkflowDeleteDialog.js";
12
+ import { WorkflowSinkLinkForm as ie } from "../components/workflow/WorkflowSinkLinkForm.js";
13
+ import { WorkflowDesignPreview as ae } from "../components/workflow/WorkflowDesignPreview.js";
14
+ import { memo as u, useCallback as d, useEffect as oe, useState as f } from "react";
15
+ import { useParams as se } from "react-router";
16
+ import { AccessDenied as ce, PermissionButton as p } from "@burdenoff/fe-libs/shared/components";
17
+ import { usePermissions as le } from "@burdenoff/fe-libs/shared/providers/shell";
18
+ import { Button as m, IllustratedEmptyState as h, NextSteps as ue, PagePurpose as de, Spinner as g } from "@burdenoff/fe-libs/ui";
19
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
20
+ import { useLazyWorkflowDefinition as fe } from "@burdenoff/fluidgrids-fe-sdk";
21
+ import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { formatDistanceToNow as b } from "date-fns";
23
23
  //#region src/bigconsole/pages/WorkflowViewPage.tsx
24
- var ue = ({ className: e }) => /* @__PURE__ */ x("svg", {
24
+ var me = ({ className: e }) => /* @__PURE__ */ v("svg", {
25
25
  className: e,
26
26
  fill: "none",
27
27
  stroke: "currentColor",
28
28
  viewBox: "0 0 24 24",
29
- children: /* @__PURE__ */ x("path", {
29
+ children: /* @__PURE__ */ v("path", {
30
30
  strokeLinecap: "round",
31
31
  strokeLinejoin: "round",
32
32
  strokeWidth: 2,
33
33
  d: "M15 19l-7-7 7-7"
34
34
  })
35
- }), de = ({ className: e }) => /* @__PURE__ */ x("svg", {
35
+ }), he = ({ className: e }) => /* @__PURE__ */ v("svg", {
36
36
  className: e,
37
37
  fill: "none",
38
38
  stroke: "currentColor",
39
39
  viewBox: "0 0 24 24",
40
- children: /* @__PURE__ */ x("path", {
40
+ children: /* @__PURE__ */ v("path", {
41
41
  strokeLinecap: "round",
42
42
  strokeLinejoin: "round",
43
43
  strokeWidth: 2,
44
44
  d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
45
45
  })
46
- }), fe = ({ className: e }) => /* @__PURE__ */ x("svg", {
46
+ }), ge = ({ className: e }) => /* @__PURE__ */ v("svg", {
47
47
  className: e,
48
48
  fill: "none",
49
49
  stroke: "currentColor",
50
50
  viewBox: "0 0 24 24",
51
- children: /* @__PURE__ */ x("path", {
51
+ children: /* @__PURE__ */ v("path", {
52
52
  strokeLinecap: "round",
53
53
  strokeLinejoin: "round",
54
54
  strokeWidth: 2,
55
55
  d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
56
56
  })
57
- }), pe = ({ className: e }) => /* @__PURE__ */ S("svg", {
57
+ }), _e = ({ className: e }) => /* @__PURE__ */ y("svg", {
58
58
  className: e,
59
59
  fill: "none",
60
60
  stroke: "currentColor",
61
61
  viewBox: "0 0 24 24",
62
- children: [/* @__PURE__ */ x("path", {
62
+ children: [/* @__PURE__ */ v("path", {
63
63
  strokeLinecap: "round",
64
64
  strokeLinejoin: "round",
65
65
  strokeWidth: 2,
66
66
  d: "M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
67
- }), /* @__PURE__ */ x("path", {
67
+ }), /* @__PURE__ */ v("path", {
68
68
  strokeLinecap: "round",
69
69
  strokeLinejoin: "round",
70
70
  strokeWidth: 2,
71
71
  d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
72
72
  })]
73
- }), me = ({ className: e }) => /* @__PURE__ */ x("svg", {
73
+ }), ve = ({ className: e }) => /* @__PURE__ */ v("svg", {
74
74
  className: e,
75
75
  fill: "none",
76
76
  stroke: "currentColor",
77
77
  viewBox: "0 0 24 24",
78
- children: /* @__PURE__ */ x("path", {
78
+ children: /* @__PURE__ */ v("path", {
79
79
  strokeLinecap: "round",
80
80
  strokeLinejoin: "round",
81
81
  strokeWidth: 2,
82
82
  d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
83
83
  })
84
- }), he = ({ className: e }) => /* @__PURE__ */ x("svg", {
84
+ }), ye = ({ className: e }) => /* @__PURE__ */ v("svg", {
85
85
  className: e,
86
86
  fill: "none",
87
87
  stroke: "currentColor",
88
88
  viewBox: "0 0 24 24",
89
- children: /* @__PURE__ */ x("path", {
89
+ children: /* @__PURE__ */ v("path", {
90
90
  strokeLinecap: "round",
91
91
  strokeLinejoin: "round",
92
92
  strokeWidth: 2,
93
93
  d: "M5 13l4 4L19 7"
94
94
  })
95
- }), ge = ({ className: e }) => /* @__PURE__ */ x("svg", {
95
+ }), be = ({ className: e }) => /* @__PURE__ */ v("svg", {
96
96
  className: e,
97
97
  fill: "none",
98
98
  stroke: "currentColor",
99
99
  viewBox: "0 0 24 24",
100
- children: /* @__PURE__ */ x("path", {
100
+ children: /* @__PURE__ */ v("path", {
101
101
  strokeLinecap: "round",
102
102
  strokeLinejoin: "round",
103
103
  strokeWidth: 2,
104
104
  d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"
105
105
  })
106
- }), _e = ({ className: e }) => /* @__PURE__ */ x("svg", {
106
+ }), xe = ({ className: e }) => /* @__PURE__ */ v("svg", {
107
107
  className: e,
108
108
  fill: "none",
109
109
  stroke: "currentColor",
110
110
  viewBox: "0 0 24 24",
111
- children: /* @__PURE__ */ x("path", {
111
+ children: /* @__PURE__ */ v("path", {
112
112
  strokeLinecap: "round",
113
113
  strokeLinejoin: "round",
114
114
  strokeWidth: 2,
115
115
  d: "M19 9l-7 7-7-7"
116
116
  })
117
- }), w = f(function() {
118
- let f = e(), { t: w } = le(), { workflowId: T } = h(), { apiGatewayUrl: ve, authToken: ye, workspaceId: E } = r(), { hasPermission: D, isLoading: O } = ie(), k = D(s.WORKFLOW_READ), A = D(s.WORKFLOW_UPDATE);
119
- D(s.WORKFLOW_DELETE);
120
- let j = D(s.WORKFLOW_EXECUTE), [M, N] = m(null), [P, F] = m(!1), [, I] = m(!1), [L, R] = m(!1), [be, z] = m(!1), [B, V] = m(!1), [xe, H] = m(!1), [U, W] = m(null), { loading: Se, error: G, fetchWorkflow: K, deleteWorkflow: q, executeWorkflow: J, pollWorkflowExecution: Y } = t({ skipFetch: !0 });
121
- re(() => {
122
- if (!T) {
123
- H(!0);
117
+ }), x = u(function() {
118
+ let u = e(), { t: x } = pe(), { workflowId: S } = se(), { hasPermission: C, isLoading: Se } = le(), Ce = C(s.WORKFLOW_READ), w = C(s.WORKFLOW_UPDATE), T = C(s.DATASINK_READ);
119
+ C(s.WORKFLOW_DELETE);
120
+ let we = C(s.WORKFLOW_EXECUTE), [E, D] = f(null), [Te, O] = f(!1), [, k] = f(!1), [A, j] = f(!1), [Ee, M] = f(!1), [N, P] = f(!1), [F, I] = f(null), [De, L] = f(null), { unlinkDataSink: Oe } = t({ skipFetch: !0 }), [R, z] = f(!1), { getWorkflow: ke, workflow: B, loading: Ae, error: je } = fe(), [Me, V] = f(!1), [H, U] = f(null), { loading: Ne, error: W, fetchWorkflow: G, deleteWorkflow: K, executeWorkflow: q, pollWorkflowExecution: J } = t({ skipFetch: !0 });
121
+ oe(() => {
122
+ if (!S) {
123
+ V(!0);
124
124
  return;
125
125
  }
126
126
  let e = !1, t = async (r) => {
127
127
  try {
128
- let i = await K(T);
128
+ let i = await G(S);
129
129
  if (e) return;
130
- i ? (N(i), H(!0)) : r === 0 ? setTimeout(() => {
130
+ i ? (D(i), V(!0)) : r === 0 ? setTimeout(() => {
131
131
  e || t(1);
132
- }, n) : H(!0);
132
+ }, n) : V(!0);
133
133
  } catch {
134
- e || H(!0);
134
+ e || V(!0);
135
135
  }
136
136
  };
137
137
  return t(0), () => {
138
138
  e = !0;
139
139
  };
140
- }, [T, K]);
141
- let Ce = p(() => {
142
- f("/workflows");
143
- }, [f]), X = p(() => {
144
- f(`/workflows/${T}/edit`);
145
- }, [f, T]), we = p(async () => {
146
- if (T) {
147
- I(!0);
140
+ }, [S, G]);
141
+ let Pe = d(() => {
142
+ u("/workflows/feeds");
143
+ }, [u]), Y = d(() => {
144
+ E?.key && u(`/workflows/workflow/${encodeURIComponent(E.key)}/${encodeURIComponent(B?.version ?? "v1")}`);
145
+ }, [
146
+ u,
147
+ E,
148
+ B
149
+ ]), Fe = d(async () => {
150
+ if (S) {
151
+ k(!0);
148
152
  try {
149
- await q(T) ? (c() && l("success"), f("/workflows")) : c() && l("error");
153
+ await K(S) ? (c() && l("success"), u("/workflows/feeds")) : c() && l("error");
150
154
  } catch {
151
155
  c() && l("error");
152
156
  } finally {
153
- I(!1), F(!1);
157
+ k(!1), O(!1);
154
158
  }
155
159
  }
156
160
  }, [
157
- T,
158
- q,
159
- f
160
- ]), Z = p(async () => {
161
- if (!T) return;
162
- R(!0), W(null);
161
+ S,
162
+ K,
163
+ u
164
+ ]), X = d(async () => {
165
+ if (!S) return;
166
+ j(!0), U(null);
163
167
  let e = Date.now();
164
168
  try {
165
- let t = await J(T);
169
+ let t = await q(S);
166
170
  if (t) {
167
171
  let n = Date.now() - e;
168
- t.externalWorkflowId ? (W({
172
+ t.externalWorkflowId ? (U({
169
173
  success: !0,
170
174
  output: {
171
175
  externalWorkflowId: t.externalWorkflowId,
172
176
  executionCount: t.executionCount,
173
- status: w("bigconsole.workflows.view.executionTriggeredPolling", "Triggered — polling for completion...")
177
+ status: x("bigconsole.workflows.view.executionTriggeredPolling", "Triggered — polling for completion...")
174
178
  },
175
179
  error: null,
176
180
  executionTimeMs: n
177
- }), Y(T, {
181
+ }), J(S, {
178
182
  intervalMs: 3e3,
179
183
  timeoutMs: 12e4,
180
184
  onProgress: (e) => {
181
- N(e);
185
+ D(e);
182
186
  }
183
187
  }).then((t) => {
184
- t && (N(t), W((n) => n && {
188
+ t && (D(t), U((n) => n && {
185
189
  ...n,
186
190
  output: {
187
191
  ...n.output || {},
188
- status: t.status === "error" ? w("bigconsole.workflows.view.executionStatusFailed", "Failed") : w("bigconsole.workflows.view.executionStatusCompleted", "Completed"),
192
+ status: t.status === "error" ? x("bigconsole.workflows.view.executionStatusFailed", "Failed") : x("bigconsole.workflows.view.executionStatusCompleted", "Completed"),
189
193
  executionCount: t.executionCount,
190
194
  lastExecutedAt: t.lastExecutedAt
191
195
  },
192
196
  executionTimeMs: Date.now() - e
193
197
  }));
194
- })) : W({
198
+ })) : U({
195
199
  success: !0,
196
200
  output: {
197
201
  executionCount: t.executionCount,
198
202
  lastExecutedAt: t.lastExecutedAt,
199
- status: w("bigconsole.workflows.view.executionStatusCompleted", "Completed")
203
+ status: x("bigconsole.workflows.view.executionStatusCompleted", "Completed")
200
204
  },
201
205
  error: null,
202
206
  executionTimeMs: n
203
207
  });
204
- let r = await K(T);
205
- r && N(r);
208
+ let r = await G(S);
209
+ r && D(r);
206
210
  }
207
211
  } catch (t) {
208
- W({
212
+ U({
209
213
  success: !1,
210
214
  output: null,
211
- error: t instanceof Error ? t.message : w("bigconsole.workflows.errors.executionFailed", "Execution failed"),
215
+ error: t instanceof Error ? t.message : x("bigconsole.workflows.errors.executionFailed", "Execution failed"),
212
216
  executionTimeMs: Date.now() - e
213
217
  });
214
218
  } finally {
215
- R(!1);
219
+ j(!1);
216
220
  }
217
221
  }, [
218
- T,
222
+ S,
223
+ q,
224
+ G,
219
225
  J,
220
- K,
221
- Y,
222
- w
223
- ]), Te = p(async () => {
224
- if (M?.webhookUrl) try {
225
- await te(M.webhookUrl), z(!0), c() && u(w("bigconsole.workflows.view.webhookCopiedToast", "Webhook copied")), setTimeout(() => z(!1), 2e3);
226
+ x
227
+ ]), Ie = d(async () => {
228
+ if (E?.webhookUrl) try {
229
+ await ee(E.webhookUrl), M(!0), c() && te(x("bigconsole.workflows.view.webhookCopiedToast", "Webhook copied")), setTimeout(() => M(!1), 2e3);
226
230
  } catch {}
227
- }, [M?.webhookUrl, w]), Ee = p((e) => {
228
- f(`/datasinks/${e}`);
229
- }, [f]), Q = /* @__PURE__ */ S("button", {
231
+ }, [E?.webhookUrl, x]), Le = d((e) => {
232
+ u(`/datasinks/${e}`);
233
+ }, [u]), Z = /* @__PURE__ */ y("button", {
230
234
  type: "button",
231
- onClick: Ce,
232
- className: `inline-flex min-h-[var(--size-controlHeight-md)] items-center gap-1 rounded-button text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary ${i}`,
233
- children: [/* @__PURE__ */ x(ue, { className: "w-4 h-4" }), w("bigconsole.workflows.view.backToWorkflows", "Back to Workflows")]
235
+ onClick: Pe,
236
+ className: `inline-flex min-h-[var(--size-controlHeight-md)] items-center gap-1 rounded-button text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary ${r}`,
237
+ children: [/* @__PURE__ */ v(me, { className: "w-4 h-4" }), x("bigconsole.workflows.view.backToWorkflows", "Back to Workflows")]
234
238
  });
235
- if (!xe || Se && !M || O) return /* @__PURE__ */ x("div", {
239
+ if (!Me || Ne && !E || Se) return /* @__PURE__ */ v("div", {
236
240
  className: "mx-auto flex min-h-[400px] max-w-5xl items-center justify-center p-4 sm:p-[var(--space-pagePadding)]",
237
- children: /* @__PURE__ */ x(se, { size: "lg" })
241
+ children: /* @__PURE__ */ v(g, { size: "lg" })
238
242
  });
239
- if (!k) return /* @__PURE__ */ x(g, {
240
- title: w("bigconsole.workflows.errors.accessDeniedTitle", "Access Denied"),
241
- description: w("bigconsole.workflows.errors.accessDeniedViewDescription", "You don't have permission to view this workflow.")
243
+ if (!Ce) return /* @__PURE__ */ v(ce, {
244
+ title: x("bigconsole.workflows.errors.accessDeniedTitle", "Access Denied"),
245
+ description: x("bigconsole.workflows.errors.accessDeniedViewDescription", "You don't have permission to view this workflow.")
242
246
  });
243
- if (G || !M) return /* @__PURE__ */ x("div", {
247
+ if (W || !E) return /* @__PURE__ */ v("div", {
244
248
  className: "mx-auto max-w-5xl p-4 sm:p-[var(--space-pagePadding)]",
245
- children: /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ x("div", { children: Q }), /* @__PURE__ */ x("section", {
249
+ children: /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", { children: Z }), /* @__PURE__ */ v("section", {
246
250
  "aria-label": "Workflow not found",
247
251
  "data-section-emphasis": "standard",
248
252
  "data-testid": "workflow-not-found",
249
- className: ee("standard"),
250
- children: /* @__PURE__ */ x(y, {
253
+ className: i("standard"),
254
+ children: /* @__PURE__ */ v(h, {
251
255
  illustration: "empty-data",
252
- title: w("bigconsole.workflows.view.notFoundTitle", "Workflow not found"),
253
- description: G?.message || w("bigconsole.workflows.view.notFoundDescription", "The workflow you are looking for does not exist.")
256
+ title: x("bigconsole.workflows.view.notFoundTitle", "Workflow not found"),
257
+ description: W?.message || x("bigconsole.workflows.view.notFoundDescription", "The workflow you are looking for does not exist.")
254
258
  })
255
259
  })] })
256
260
  });
257
- let $ = M.dataSinkLinks?.length || 0, De = !!M.externalWorkflowId, Oe = [
258
- ...j ? [{
261
+ let Q = E.dataSinkLinks?.length || 0, Re = !!E.externalWorkflowId, $ = B?.id === E.externalWorkflowId ? B.definitionJson?.data : void 0, ze = [
262
+ ...we ? [{
259
263
  id: "execute",
260
- label: w("bigconsole.workflows.view.nextStepExecuteLabel", "Run the workflow"),
261
- description: w("bigconsole.workflows.view.nextStepExecuteDescription", "Trigger an execution to pull fresh data now."),
262
- onClick: Z
264
+ label: x("bigconsole.workflows.view.nextStepExecuteLabel", "Run the workflow"),
265
+ description: x("bigconsole.workflows.view.nextStepExecuteDescription", "Trigger an execution to pull fresh data now."),
266
+ onClick: X
263
267
  }] : [],
264
268
  {
265
269
  id: "design",
266
- label: w("bigconsole.workflows.view.nextStepDesignLabel", "Inspect the design"),
267
- description: w("bigconsole.workflows.view.nextStepDesignDescription", "Expand the read-only preview to see each step."),
268
- onClick: () => V(!0)
270
+ label: x("bigconsole.workflows.view.nextStepDesignLabel", "Inspect the design"),
271
+ description: x("bigconsole.workflows.view.nextStepDesignDescription", "Expand the read-only preview to see each step."),
272
+ onClick: () => z(!0)
269
273
  },
270
- ...A ? [{
274
+ ...w ? [{
271
275
  id: "edit",
272
- label: w("bigconsole.workflows.view.nextStepEditLabel", "Edit in the builder"),
273
- description: w("bigconsole.workflows.view.nextStepEditDescription", "Open the FluidGrids visual builder to change the flow."),
274
- onClick: X
276
+ label: x("bigconsole.workflows.view.nextStepEditLabel", "Edit in the builder"),
277
+ description: x("bigconsole.workflows.view.nextStepEditDescription", "Open the FluidGrids visual builder to change the flow."),
278
+ onClick: Y
275
279
  }] : [],
276
280
  {
277
281
  id: "sinks",
278
- label: w("bigconsole.workflows.view.nextStepSinksLabel", "Check the linked data sinks"),
279
- description: w("bigconsole.workflows.view.nextStepSinksDescription", "See where this workflow writes its output."),
280
- onClick: () => f("/datasinks")
282
+ label: x("bigconsole.workflows.view.nextStepSinksLabel", "Check the linked data sinks"),
283
+ description: x("bigconsole.workflows.view.nextStepSinksDescription", "See where this workflow writes its output."),
284
+ onClick: () => u("/datasinks")
281
285
  }
282
286
  ];
283
- return /* @__PURE__ */ S("div", {
287
+ return /* @__PURE__ */ y("div", {
284
288
  className: "mx-auto max-w-5xl p-4 sm:p-[var(--space-pagePadding)]",
285
- children: [/* @__PURE__ */ S(o, { children: [
286
- /* @__PURE__ */ S("header", {
289
+ children: [/* @__PURE__ */ y(o, { children: [
290
+ /* @__PURE__ */ y("header", {
287
291
  "data-section-emphasis": "bare",
288
292
  className: "min-w-0",
289
- children: [/* @__PURE__ */ x("div", {
293
+ children: [/* @__PURE__ */ v("div", {
290
294
  className: "mb-form-gap",
291
- children: Q
292
- }), /* @__PURE__ */ S("div", {
295
+ children: Z
296
+ }), /* @__PURE__ */ y("div", {
293
297
  className: "flex flex-col gap-form-gap md:flex-row md:items-start md:justify-between",
294
- children: [/* @__PURE__ */ S("div", {
298
+ children: [/* @__PURE__ */ y("div", {
295
299
  className: "min-w-0",
296
300
  children: [
297
- /* @__PURE__ */ S("div", {
301
+ /* @__PURE__ */ y("div", {
298
302
  className: "flex flex-wrap items-center gap-icon-gap",
299
- children: [/* @__PURE__ */ x("h1", {
303
+ children: [/* @__PURE__ */ v("h1", {
300
304
  className: "break-words text-2xl font-bold text-text-primary",
301
- children: M.name
302
- }), /* @__PURE__ */ x(ne, { status: M.status })]
305
+ children: E.name
306
+ }), /* @__PURE__ */ v(ne, { status: E.status })]
303
307
  }),
304
- /* @__PURE__ */ x("p", {
308
+ /* @__PURE__ */ v("p", {
305
309
  className: "mt-1 break-all font-mono text-sm text-text-secondary",
306
- children: M.key
310
+ children: E.key
307
311
  }),
308
- M.externalWorkflowId && /* @__PURE__ */ S("p", {
312
+ E.externalWorkflowId && /* @__PURE__ */ y("p", {
309
313
  className: "mt-1 text-xs text-text-muted",
310
314
  children: [
311
- w("bigconsole.workflows.view.fluidGridsIdLabel", "FluidGrids ID:"),
315
+ x("bigconsole.workflows.view.fluidGridsIdLabel", "FluidGrids ID:"),
312
316
  " ",
313
- /* @__PURE__ */ x("span", {
317
+ /* @__PURE__ */ v("span", {
314
318
  className: "break-all font-mono",
315
- children: M.externalWorkflowId
319
+ children: E.externalWorkflowId
316
320
  })
317
321
  ]
318
322
  })
319
323
  ]
320
- }), /* @__PURE__ */ S("div", {
324
+ }), /* @__PURE__ */ y("div", {
321
325
  className: "flex flex-wrap items-center gap-control-gap",
322
326
  children: [
323
- /* @__PURE__ */ x(_, {
327
+ /* @__PURE__ */ v(p, {
324
328
  permission: s.WORKFLOW_EXECUTE,
325
329
  deniedBehavior: "disable",
326
- children: /* @__PURE__ */ S(v, {
330
+ children: /* @__PURE__ */ y(m, {
327
331
  size: "lg",
328
- onClick: Z,
329
- disabled: L,
330
- children: [/* @__PURE__ */ x(pe, { className: "w-4 h-4" }), L ? w("bigconsole.workflows.actions.executing", "Executing...") : w("bigconsole.workflows.actions.execute", "Execute")]
332
+ onClick: X,
333
+ disabled: A,
334
+ children: [/* @__PURE__ */ v(_e, { className: "w-4 h-4" }), A ? x("bigconsole.workflows.actions.executing", "Executing...") : x("bigconsole.workflows.actions.execute", "Execute")]
331
335
  })
332
336
  }),
333
- /* @__PURE__ */ x(_, {
337
+ /* @__PURE__ */ v(p, {
334
338
  permission: s.WORKFLOW_UPDATE,
335
339
  deniedBehavior: "disable",
336
- children: /* @__PURE__ */ S(v, {
340
+ children: /* @__PURE__ */ y(m, {
337
341
  size: "lg",
338
342
  variant: "outline",
339
- onClick: X,
340
- children: [/* @__PURE__ */ x(de, { className: "w-4 h-4" }), w("bigconsole.workflows.actions.edit", "Edit")]
343
+ onClick: Y,
344
+ children: [/* @__PURE__ */ v(he, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.edit", "Edit")]
341
345
  })
342
346
  }),
343
- /* @__PURE__ */ x(_, {
347
+ /* @__PURE__ */ v(p, {
344
348
  permission: s.WORKFLOW_DELETE,
345
349
  deniedBehavior: "hide",
346
- children: /* @__PURE__ */ S(v, {
350
+ children: /* @__PURE__ */ y(m, {
347
351
  size: "lg",
348
352
  variant: "ghost",
349
- onClick: () => F(!0),
353
+ onClick: () => O(!0),
350
354
  className: "text-[var(--color-status-error-text)] hover:bg-status-error-bg/10 hover:text-[var(--color-status-error-text)]",
351
- children: [/* @__PURE__ */ x(fe, { className: "w-4 h-4" }), w("bigconsole.workflows.actions.delete", "Delete")]
355
+ children: [/* @__PURE__ */ v(ge, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.delete", "Delete")]
352
356
  })
353
357
  })
354
358
  ]
355
359
  })]
356
360
  })]
357
361
  }),
358
- /* @__PURE__ */ x(oe, { children: w("bigconsole.workflows.view.purpose", "A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its webhook trigger, and edit it in the visual builder.") }),
359
- /* @__PURE__ */ x(ae, {
362
+ /* @__PURE__ */ v(de, { children: x("bigconsole.workflows.view.purpose", "A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its webhook trigger, and edit it in the visual builder.") }),
363
+ /* @__PURE__ */ v(ue, {
360
364
  storageKey: "bigconsole-workflow-view",
361
- steps: Oe
365
+ steps: ze
362
366
  }),
363
- U && /* @__PURE__ */ S(a, {
367
+ H && /* @__PURE__ */ y(a, {
364
368
  headingLevel: 2,
365
- tone: U.success ? "success" : "danger",
366
- title: U.success ? w("bigconsole.workflows.view.executionResultTriggered", "Execution Triggered") : w("bigconsole.workflows.view.executionResultFailed", "Execution Failed"),
367
- description: U.success ? "The run was accepted. Results refresh below as the run progresses." : "The run could not be started. The detail below comes straight from the workflow service.",
368
- meta: /* @__PURE__ */ S("span", {
369
+ tone: H.success ? "success" : "danger",
370
+ title: H.success ? x("bigconsole.workflows.view.executionResultTriggered", "Execution Triggered") : x("bigconsole.workflows.view.executionResultFailed", "Execution Failed"),
371
+ description: H.success ? "The run was accepted. Results refresh below as the run progresses." : "The run could not be started. The detail below comes straight from the workflow service.",
372
+ meta: /* @__PURE__ */ y("span", {
369
373
  className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
370
- children: [U.executionTimeMs, "ms"]
374
+ children: [H.executionTimeMs, "ms"]
371
375
  }),
372
376
  "data-testid": "workflow-execution-result",
373
- children: [U.error ? /* @__PURE__ */ x("p", {
377
+ children: [H.error ? /* @__PURE__ */ v("p", {
374
378
  className: "break-words text-sm text-[var(--color-status-error-text)]",
375
- children: U.error
376
- }) : /* @__PURE__ */ x("pre", {
379
+ children: H.error
380
+ }) : /* @__PURE__ */ v("pre", {
377
381
  className: "max-h-[200px] min-w-0 overflow-auto rounded-card bg-bg-sunken p-2 font-mono text-xs text-text-secondary",
378
- children: JSON.stringify(U.output, null, 2)
379
- }), U.runId && /* @__PURE__ */ S("p", {
382
+ children: JSON.stringify(H.output, null, 2)
383
+ }), H.runId && /* @__PURE__ */ y("p", {
380
384
  className: "mt-2 text-xs text-text-muted",
381
385
  children: [
382
- w("bigconsole.workflows.view.runIdLabel", "Run ID:"),
386
+ x("bigconsole.workflows.view.runIdLabel", "Run ID:"),
383
387
  " ",
384
- /* @__PURE__ */ x("span", {
388
+ /* @__PURE__ */ v("span", {
385
389
  className: "break-all font-mono",
386
- children: U.runId
390
+ children: H.runId
387
391
  })
388
392
  ]
389
393
  })]
390
394
  }),
391
- /* @__PURE__ */ S("div", {
395
+ /* @__PURE__ */ y("div", {
392
396
  className: "grid grid-cols-1 gap-section-gap md:grid-cols-2",
393
- children: [/* @__PURE__ */ x(a, {
397
+ children: [/* @__PURE__ */ v(a, {
394
398
  headingLevel: 2,
395
399
  emphasis: "muted",
396
- title: w("bigconsole.workflows.view.descriptionLabel", "Description"),
400
+ title: x("bigconsole.workflows.view.descriptionLabel", "Description"),
397
401
  description: "What this workflow is for, as entered by its author.",
398
- children: /* @__PURE__ */ x("p", {
402
+ children: /* @__PURE__ */ v("p", {
399
403
  className: "break-words text-sm text-text-primary",
400
- children: M.description || w("bigconsole.workflows.view.noDescription", "No description")
404
+ children: E.description || x("bigconsole.workflows.view.noDescription", "No description")
401
405
  })
402
- }), /* @__PURE__ */ x(a, {
406
+ }), /* @__PURE__ */ v(a, {
403
407
  headingLevel: 2,
404
- emphasis: De ? "standard" : "primary",
405
- title: w("bigconsole.workflows.view.executionStatsLabel", "Execution Stats"),
408
+ emphasis: Re ? "standard" : "primary",
409
+ title: x("bigconsole.workflows.view.executionStatsLabel", "Execution Stats"),
406
410
  description: "How often this workflow has run, and when it last did.",
407
411
  "data-testid": "workflow-execution-stats",
408
- children: /* @__PURE__ */ S("div", {
412
+ children: /* @__PURE__ */ y("div", {
409
413
  className: "grid grid-cols-1 gap-form-gap sm:grid-cols-2",
410
- children: [/* @__PURE__ */ S("div", {
414
+ children: [/* @__PURE__ */ y("div", {
411
415
  className: "min-w-0",
412
- children: [/* @__PURE__ */ x("p", {
416
+ children: [/* @__PURE__ */ v("p", {
413
417
  className: "text-2xl font-bold text-text-primary",
414
- children: M.executionCount
415
- }), /* @__PURE__ */ x("p", {
418
+ children: E.executionCount
419
+ }), /* @__PURE__ */ v("p", {
416
420
  className: "text-xs text-text-secondary",
417
- children: w("bigconsole.workflows.view.totalExecutionsLabel", "Total Executions")
421
+ children: x("bigconsole.workflows.view.totalExecutionsLabel", "Total Executions")
418
422
  })]
419
- }), /* @__PURE__ */ S("div", {
423
+ }), /* @__PURE__ */ y("div", {
420
424
  className: "min-w-0",
421
- children: [/* @__PURE__ */ x("p", {
425
+ children: [/* @__PURE__ */ v("p", {
422
426
  className: "text-sm font-medium text-text-primary",
423
- children: M.lastExecutedAt ? C(new Date(M.lastExecutedAt), { addSuffix: !0 }) : w("bigconsole.workflows.view.never", "Never")
424
- }), /* @__PURE__ */ x("p", {
427
+ children: E.lastExecutedAt ? b(new Date(E.lastExecutedAt), { addSuffix: !0 }) : x("bigconsole.workflows.view.never", "Never")
428
+ }), /* @__PURE__ */ v("p", {
425
429
  className: "text-xs text-text-secondary",
426
- children: w("bigconsole.workflows.view.lastExecutedLabel", "Last Executed")
430
+ children: x("bigconsole.workflows.view.lastExecutedLabel", "Last Executed")
427
431
  })]
428
432
  })]
429
433
  })
430
434
  })]
431
435
  }),
432
- M.externalWorkflowId && /* @__PURE__ */ x(a, {
436
+ E.externalWorkflowId && /* @__PURE__ */ v(a, {
433
437
  headingLevel: 2,
434
438
  emphasis: "primary",
435
- title: w("bigconsole.workflows.view.designPreviewTitle", "Workflow Design Preview"),
439
+ title: x("bigconsole.workflows.view.designPreviewTitle", "Workflow Design Preview"),
436
440
  description: "The steps this workflow runs, read-only. Open the builder to change them.",
437
- actions: /* @__PURE__ */ S(v, {
441
+ actions: /* @__PURE__ */ y(m, {
438
442
  variant: "outline",
439
443
  size: "sm",
440
- "aria-expanded": B,
444
+ "aria-expanded": R,
441
445
  "aria-controls": "workflow-design-canvas",
442
- onClick: () => V((e) => !e),
443
- children: [B ? "Hide design" : "Show design", /* @__PURE__ */ x(_e, { className: `w-4 h-4 motion-safe:transition-transform ${B ? "rotate-180" : ""}` })]
446
+ onClick: () => {
447
+ let e = !R;
448
+ z(e), e && E.externalWorkflowId && ke(E.key, E.externalWorkflowId);
449
+ },
450
+ children: [R ? "Hide design" : "Show design", /* @__PURE__ */ v(xe, { className: `w-4 h-4 motion-safe:transition-transform ${R ? "rotate-180" : ""}` })]
444
451
  }),
445
452
  "data-testid": "workflow-design-preview",
446
- children: B ? /* @__PURE__ */ x("div", {
453
+ children: R ? /* @__PURE__ */ v("div", {
447
454
  id: "workflow-design-canvas",
448
455
  className: "h-[320px] min-w-0 overflow-hidden rounded-card border border-[var(--color-border-subtle)] sm:h-[420px] lg:h-[450px]",
449
- children: /* @__PURE__ */ x(ce, {
450
- apiGatewayUrl: ve,
451
- workspaceId: E || "default",
452
- authToken: ye,
453
- workflowId: M.externalWorkflowId,
454
- readonly: !0,
455
- hideHeader: !0,
456
- className: "h-full"
456
+ children: Ae ? /* @__PURE__ */ v("div", {
457
+ role: "status",
458
+ className: "flex h-full items-center justify-center",
459
+ children: /* @__PURE__ */ v(g, {})
460
+ }) : je ? /* @__PURE__ */ v("p", {
461
+ role: "alert",
462
+ className: "p-4 text-sm text-status-error-text",
463
+ children: x("bigconsole.workflows.view.previewError", "Could not load the workflow design. Close and reopen the preview to retry.")
464
+ }) : $ ? /* @__PURE__ */ v(ae, { workflow: $ }, B?.id) : /* @__PURE__ */ v("p", {
465
+ className: "p-4 text-sm text-text-secondary",
466
+ children: x("bigconsole.workflows.view.previewUnavailable", "No saved workflow design is available.")
457
467
  })
458
- }) : /* @__PURE__ */ x("p", {
468
+ }) : /* @__PURE__ */ v("p", {
459
469
  id: "workflow-design-canvas",
460
470
  className: "text-sm text-text-secondary",
461
471
  children: "The canvas is collapsed. Show the design to see every step, its order and its connections."
462
472
  })
463
473
  }),
464
- M.webhookUrl && /* @__PURE__ */ x(a, {
474
+ E.webhookUrl && /* @__PURE__ */ v(a, {
465
475
  headingLevel: 2,
466
476
  emphasis: "muted",
467
- title: w("bigconsole.workflows.view.webhookUrlLabel", "Webhook URL"),
477
+ title: x("bigconsole.workflows.view.webhookUrlLabel", "Webhook URL"),
468
478
  description: "POST to this URL to run the workflow from an external system.",
469
- actions: /* @__PURE__ */ x(v, {
479
+ actions: /* @__PURE__ */ v(m, {
470
480
  variant: "ghost",
471
481
  size: "sm",
472
- onClick: Te,
473
- children: be ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(he, { className: "w-4 h-4 text-status-success-text" }), w("bigconsole.workflows.actions.copied", "Copied!")] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(me, { className: "w-4 h-4" }), w("bigconsole.workflows.actions.copy", "Copy")] })
482
+ onClick: Ie,
483
+ children: Ee ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ye, { className: "w-4 h-4 text-status-success-text" }), x("bigconsole.workflows.actions.copied", "Copied!")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ve, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.copy", "Copy")] })
474
484
  }),
475
- children: /* @__PURE__ */ x("code", {
485
+ children: /* @__PURE__ */ v("code", {
476
486
  className: "block min-w-0 overflow-x-auto break-all rounded-card bg-bg-sunken px-3 py-2 font-mono text-sm text-text-primary",
477
- children: M.webhookUrl
487
+ children: E.webhookUrl
478
488
  })
479
489
  }),
480
- /* @__PURE__ */ x(a, {
490
+ /* @__PURE__ */ y(a, {
481
491
  headingLevel: 2,
482
- title: w("bigconsole.workflows.view.linkedDataSinksTitle", "Linked DataSinks ({{count}})", { count: $ }),
492
+ title: x("bigconsole.workflows.view.linkedDataSinksTitle", "Linked DataSinks ({{count}})", { count: Q }),
483
493
  description: "Where this workflow writes the data it produces.",
494
+ actions: w && T ? /* @__PURE__ */ v(m, {
495
+ variant: "outline",
496
+ "aria-expanded": N,
497
+ onClick: () => P((e) => !e),
498
+ children: N ? x("bigconsole.workflows.links.cancel", "Cancel linking") : x("bigconsole.workflows.links.link", "Link sink")
499
+ }) : void 0,
484
500
  "data-testid": "workflow-linked-datasinks",
485
- children: $ === 0 ? /* @__PURE__ */ x(y, {
486
- illustration: "empty-generic",
487
- title: w("bigconsole.workflows.view.noDataSinksTitle", "No data sinks linked"),
488
- description: w("bigconsole.workflows.view.noDataSinksDescription", "This workflow has no data sinks linked yet — its output isn't being stored.")
489
- }) : /* @__PURE__ */ x("ul", {
490
- className: "flex flex-col gap-list-gap",
491
- children: M.dataSinkLinks?.map((e) => /* @__PURE__ */ S("li", {
492
- className: "flex flex-col gap-control-gap rounded-card bg-bg-sunken px-3 py-2 sm:flex-row sm:items-center sm:justify-between",
493
- children: [/* @__PURE__ */ S("div", {
494
- className: "flex min-w-0 items-center gap-icon-gap",
495
- children: [/* @__PURE__ */ x(ge, { className: "w-4 h-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("div", {
496
- className: "min-w-0",
497
- children: [/* @__PURE__ */ x("p", {
498
- className: "truncate text-sm font-medium text-text-primary",
499
- children: e.dataSink?.name || e.dataSink?.key || e.dataSinkId
500
- }), e.dataSink?.key && /* @__PURE__ */ x("p", {
501
- className: "truncate font-mono text-xs text-text-secondary",
502
- children: e.dataSink.key
501
+ children: [
502
+ F && /* @__PURE__ */ v("p", {
503
+ role: "status",
504
+ className: "mb-3 text-sm text-text-secondary",
505
+ children: F
506
+ }),
507
+ N && w && T && /* @__PURE__ */ v(ie, {
508
+ workflowId: E.id,
509
+ linkedSinkIds: E.dataSinkLinks.map((e) => e.dataSinkId),
510
+ onLinked: async () => {
511
+ let e = await G(E.id);
512
+ e && D(e), P(!1), I(x("bigconsole.workflows.links.linked", "Data sink linked."));
513
+ }
514
+ }),
515
+ Q === 0 ? /* @__PURE__ */ v(h, {
516
+ illustration: "empty-generic",
517
+ title: x("bigconsole.workflows.view.noDataSinksTitle", "No data sinks linked"),
518
+ description: x("bigconsole.workflows.view.noDataSinksDescription", "This workflow has no data sinks linked yet — its output isn't being stored.")
519
+ }) : /* @__PURE__ */ v("ul", {
520
+ className: "flex flex-col gap-list-gap",
521
+ children: [...E.dataSinkLinks].sort((e, t) => e.priority - t.priority).map((e) => /* @__PURE__ */ y("li", {
522
+ className: "flex flex-col gap-control-gap rounded-card bg-bg-sunken px-3 py-2 sm:flex-row sm:items-center sm:justify-between",
523
+ children: [/* @__PURE__ */ y("div", {
524
+ className: "flex min-w-0 items-center gap-icon-gap",
525
+ children: [/* @__PURE__ */ v(be, { className: "w-4 h-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ y("div", {
526
+ className: "min-w-0",
527
+ children: [/* @__PURE__ */ v("p", {
528
+ className: "truncate text-sm font-medium text-text-primary",
529
+ children: e.dataSink?.name || e.dataSink?.key || e.dataSinkId
530
+ }), e.dataSink?.key && /* @__PURE__ */ v("p", {
531
+ className: "truncate font-mono text-xs text-text-secondary",
532
+ children: e.dataSink.key
533
+ })]
503
534
  })]
535
+ }), /* @__PURE__ */ y("div", {
536
+ className: "flex flex-wrap items-center gap-control-gap",
537
+ children: [
538
+ e.isEnabled ? /* @__PURE__ */ v("span", {
539
+ className: "rounded-pill bg-[var(--color-status-success-bgSubtle)] px-2 py-0.5 text-xs font-medium text-status-success-text",
540
+ children: x("bigconsole.workflows.view.dataSinkEnabled", "Enabled")
541
+ }) : /* @__PURE__ */ v("span", {
542
+ className: "rounded-pill bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary",
543
+ children: x("bigconsole.workflows.view.dataSinkDisabled", "Disabled")
544
+ }),
545
+ /* @__PURE__ */ v("span", {
546
+ className: "text-xs text-text-muted",
547
+ children: x("bigconsole.workflows.view.dataSinkPriority", "Priority: {{priority}}", { priority: e.priority })
548
+ }),
549
+ w && /* @__PURE__ */ v(m, {
550
+ variant: "outline",
551
+ size: "sm",
552
+ disabled: De !== null,
553
+ onClick: async () => {
554
+ L(e.dataSinkId);
555
+ try {
556
+ if (await Oe(E.id, e.dataSinkId)) {
557
+ let e = await G(E.id);
558
+ e && D(e), I(x("bigconsole.workflows.links.unlinked", "Data sink unlinked."));
559
+ } else I(x("bigconsole.workflows.links.unlinkError", "The data sink could not be unlinked. Try again."));
560
+ } finally {
561
+ L(null);
562
+ }
563
+ },
564
+ children: x("bigconsole.workflows.links.unlink", "Unlink")
565
+ }),
566
+ e.dataSink && /* @__PURE__ */ v("button", {
567
+ type: "button",
568
+ onClick: () => Le(e.dataSinkId),
569
+ className: "inline-flex min-h-[var(--size-controlHeight-md)] items-center rounded-button px-2 text-xs font-medium text-text-link hover:underline sm:min-h-[var(--size-controlHeight-sm)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
570
+ children: x("bigconsole.workflows.actions.view", "View")
571
+ })
572
+ ]
504
573
  })]
505
- }), /* @__PURE__ */ S("div", {
506
- className: "flex flex-wrap items-center gap-control-gap",
507
- children: [
508
- e.isEnabled ? /* @__PURE__ */ x("span", {
509
- className: "rounded-pill bg-[var(--color-status-success-bgSubtle)] px-2 py-0.5 text-xs font-medium text-status-success-text",
510
- children: w("bigconsole.workflows.view.dataSinkEnabled", "Enabled")
511
- }) : /* @__PURE__ */ x("span", {
512
- className: "rounded-pill bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary",
513
- children: w("bigconsole.workflows.view.dataSinkDisabled", "Disabled")
514
- }),
515
- /* @__PURE__ */ x("span", {
516
- className: "text-xs text-text-muted",
517
- children: w("bigconsole.workflows.view.dataSinkPriority", "Priority: {{priority}}", { priority: e.priority })
518
- }),
519
- e.dataSink && /* @__PURE__ */ x("button", {
520
- type: "button",
521
- onClick: () => Ee(e.dataSinkId),
522
- className: "inline-flex min-h-[var(--size-controlHeight-md)] items-center rounded-button px-2 text-xs font-medium text-text-link hover:underline sm:min-h-[var(--size-controlHeight-sm)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
523
- children: w("bigconsole.workflows.actions.view", "View")
524
- })
525
- ]
526
- })]
527
- }, e.id))
528
- })
574
+ }, e.id))
575
+ })
576
+ ]
529
577
  }),
530
- /* @__PURE__ */ x(a, {
578
+ /* @__PURE__ */ v(a, {
531
579
  headingLevel: 2,
532
580
  emphasis: "muted",
533
581
  title: "Record history",
534
582
  padding: "compact",
535
- children: /* @__PURE__ */ S("dl", {
583
+ children: /* @__PURE__ */ y("dl", {
536
584
  className: "grid grid-cols-1 gap-form-gap sm:grid-cols-2",
537
- children: [/* @__PURE__ */ S("div", {
585
+ children: [/* @__PURE__ */ y("div", {
538
586
  className: "min-w-0",
539
587
  children: [
540
- /* @__PURE__ */ x("dt", {
588
+ /* @__PURE__ */ v("dt", {
541
589
  className: "text-xs text-text-secondary",
542
- children: w("bigconsole.workflows.view.createdLabel", "Created")
590
+ children: x("bigconsole.workflows.view.createdLabel", "Created")
543
591
  }),
544
- /* @__PURE__ */ x("dd", {
592
+ /* @__PURE__ */ v("dd", {
545
593
  className: "text-sm text-text-primary",
546
- children: C(new Date(M.createdAt), { addSuffix: !0 })
594
+ children: b(new Date(E.createdAt), { addSuffix: !0 })
547
595
  }),
548
- /* @__PURE__ */ x("dd", {
596
+ /* @__PURE__ */ v("dd", {
549
597
  className: "truncate text-xs text-text-muted",
550
- children: w("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: M.createdBy })
598
+ children: x("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: E.createdBy })
551
599
  })
552
600
  ]
553
- }), /* @__PURE__ */ S("div", {
601
+ }), /* @__PURE__ */ y("div", {
554
602
  className: "min-w-0",
555
603
  children: [
556
- /* @__PURE__ */ x("dt", {
604
+ /* @__PURE__ */ v("dt", {
557
605
  className: "text-xs text-text-secondary",
558
- children: w("bigconsole.workflows.view.lastUpdatedLabel", "Last Updated")
606
+ children: x("bigconsole.workflows.view.lastUpdatedLabel", "Last Updated")
559
607
  }),
560
- /* @__PURE__ */ x("dd", {
608
+ /* @__PURE__ */ v("dd", {
561
609
  className: "text-sm text-text-primary",
562
- children: C(new Date(M.updatedAt), { addSuffix: !0 })
610
+ children: b(new Date(E.updatedAt), { addSuffix: !0 })
563
611
  }),
564
- /* @__PURE__ */ x("dd", {
612
+ /* @__PURE__ */ v("dd", {
565
613
  className: "truncate text-xs text-text-muted",
566
- children: w("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: M.updatedBy || M.createdBy })
614
+ children: x("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: E.updatedBy || E.createdBy })
567
615
  })
568
616
  ]
569
617
  })]
570
618
  })
571
619
  })
572
- ] }), M && /* @__PURE__ */ x(d, {
573
- workflow: M,
574
- isOpen: P,
575
- onClose: () => F(!1),
576
- onConfirm: we
620
+ ] }), E && /* @__PURE__ */ v(re, {
621
+ workflow: E,
622
+ isOpen: Te,
623
+ onClose: () => O(!1),
624
+ onConfirm: Fe
577
625
  })]
578
626
  });
579
627
  });
580
628
  //#endregion
581
- export { w as WorkflowViewPage };
629
+ export { x as WorkflowViewPage };
582
630
 
583
631
  //# sourceMappingURL=WorkflowViewPage.js.map