@acmekit/dashboard 2.13.33 → 2.13.35

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 (87) hide show
  1. package/dist/{api-key-management-create-4AG76FJV.mjs → api-key-management-create-U37VC624.mjs} +3 -3
  2. package/dist/{api-key-management-detail-T2TB4KST.mjs → api-key-management-detail-ZYKL4ATI.mjs} +10 -10
  3. package/dist/{api-key-management-edit-R44OHS7B.mjs → api-key-management-edit-TSZGMIBL.mjs} +3 -3
  4. package/dist/{api-key-management-list-QK4Q7Y5I.mjs → api-key-management-list-HCJFJWWB.mjs} +3 -3
  5. package/dist/app.css +31 -0
  6. package/dist/app.js +3726 -1386
  7. package/dist/app.mjs +240 -38
  8. package/dist/{chunk-GBFVWROS.mjs → chunk-5IEHCYJO.mjs} +1 -1
  9. package/dist/{chunk-DQCEH3X2.mjs → chunk-7F3CWXUH.mjs} +1 -1
  10. package/dist/chunk-A7ULKHDE.mjs +126 -0
  11. package/dist/{chunk-DN3MIYQH.mjs → chunk-FKTMBR44.mjs} +1 -1
  12. package/dist/chunk-GBPAZAJK.mjs +34 -0
  13. package/dist/{chunk-YRWSG3YM.mjs → chunk-HHPPTD3B.mjs} +1 -1
  14. package/dist/chunk-LP6CPB7N.mjs +213 -0
  15. package/dist/{chunk-EFRMWHRX.mjs → chunk-PFZQYK7R.mjs} +1 -1
  16. package/dist/{chunk-XIM7X4FB.mjs → chunk-SYACY6AL.mjs} +1 -1
  17. package/dist/{chunk-2U3RK3JG.mjs → chunk-VEI6HW6L.mjs} +3 -5
  18. package/dist/{chunk-ST2YB7JN.mjs → chunk-WLRJXEKL.mjs} +1 -1
  19. package/dist/{chunk-ULSPL3DR.mjs → chunk-XIP35KXF.mjs} +1 -1
  20. package/dist/{chunk-DTY37DDZ.mjs → chunk-YKIWIMJX.mjs} +1 -0
  21. package/dist/en.json +132 -3
  22. package/dist/{invite-XGPZZBUP.mjs → invite-3JSNOA2B.mjs} +3 -3
  23. package/dist/{login-GNP3QIPI.mjs → login-BEJ5EFGE.mjs} +9 -9
  24. package/dist/{profile-detail-YX27F7N6.mjs → profile-detail-QVTJC4JC.mjs} +3 -3
  25. package/dist/{profile-edit-2VRDU75O.mjs → profile-edit-MIO62TWH.mjs} +3 -3
  26. package/dist/{reset-password-TWRNZO6Z.mjs → reset-password-BN4KAJQL.mjs} +2 -2
  27. package/dist/{settings-3XWLL5LG.mjs → settings-GH5IWXHE.mjs} +3 -3
  28. package/dist/{translation-list-CCEQJNED.mjs → translation-list-JA22BUKN.mjs} +10 -10
  29. package/dist/{translations-edit-E57GVUFV.mjs → translations-edit-STTMANVT.mjs} +11 -11
  30. package/dist/{user-detail-KUSRRVNX.mjs → user-detail-WCXBFRGS.mjs} +3 -3
  31. package/dist/{user-edit-HTN3ZGCL.mjs → user-edit-XDVMJOS4.mjs} +3 -3
  32. package/dist/{user-invite-E3FAAU3V.mjs → user-invite-73ZDSDFC.mjs} +3 -3
  33. package/dist/{user-list-KNJ5S3IM.mjs → user-list-MPJXE3CA.mjs} +5 -5
  34. package/dist/{user-metadata-5GQK75DT.mjs → user-metadata-ADNTL3LT.mjs} +10 -10
  35. package/dist/workflow-analytics-4WCI4ODQ.mjs +152 -0
  36. package/dist/workflow-definition-detail-GI6CFBMG.mjs +94 -0
  37. package/dist/workflow-definition-list-GF3XAEPS.mjs +142 -0
  38. package/dist/workflow-execution-complete-step-WSRLO572.mjs +245 -0
  39. package/dist/workflow-execution-detail-3RH6EQSS.mjs +1411 -0
  40. package/dist/workflow-execution-list-AQEGAME4.mjs +596 -0
  41. package/dist/workflow-execution-rerun-WCYLYL3Q.mjs +138 -0
  42. package/dist/workflow-execution-run-MWN5KWNY.mjs +135 -0
  43. package/dist/workflow-scheduled-list-ZPXR7CZM.mjs +174 -0
  44. package/package.json +9 -9
  45. package/src/components/layout/main-layout/main-layout.tsx +28 -1
  46. package/src/dashboard-app/routes/get-route.map.tsx +71 -0
  47. package/src/hooks/api/workflow-definitions.tsx +79 -0
  48. package/src/hooks/api/workflow-executions.tsx +145 -1
  49. package/src/hooks/api/workflow-metrics.tsx +48 -0
  50. package/src/hooks/use-workflow-sse.tsx +78 -0
  51. package/src/i18n/translations/$schema.json +534 -4
  52. package/src/i18n/translations/en.json +132 -3
  53. package/src/routes/workflow-analytics/workflow-analytics.tsx +167 -0
  54. package/src/routes/workflow-definitions/workflow-definition-detail/workflow-definition-detail.tsx +98 -0
  55. package/src/routes/workflow-definitions/workflow-definition-list/components/workflow-definition-list-table/use-workflow-definition-table-columns.tsx +78 -0
  56. package/src/routes/workflow-definitions/workflow-definition-list/components/workflow-definition-list-table/workflow-definition-list-table.tsx +65 -0
  57. package/src/routes/workflow-definitions/workflow-definition-list/workflow-definition-list.tsx +15 -0
  58. package/src/routes/workflow-executions/constants.ts +16 -0
  59. package/src/routes/workflow-executions/utils.ts +170 -14
  60. package/src/routes/workflow-executions/workflow-execution-complete-step/workflow-execution-complete-step.tsx +270 -0
  61. package/src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx +7 -1
  62. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-action-bar/index.ts +1 -0
  63. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-action-bar/workflow-execution-action-bar.tsx +212 -0
  64. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-error-card/index.ts +1 -0
  65. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-error-card/workflow-execution-error-card.tsx +59 -0
  66. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx +157 -6
  67. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx +122 -6
  68. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +7 -1
  69. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-waiting-banner/index.ts +1 -0
  70. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-waiting-banner/workflow-execution-waiting-banner.tsx +63 -0
  71. package/src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx +46 -1
  72. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +7 -0
  73. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx +7 -1
  74. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +4 -2
  75. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-auto-refresh.tsx +73 -0
  76. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +17 -1
  77. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-row-actions.tsx +116 -0
  78. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-saved-views.tsx +84 -0
  79. package/src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx +1 -1
  80. package/src/routes/workflow-executions/workflow-execution-rerun/workflow-execution-rerun.tsx +159 -0
  81. package/src/routes/workflow-executions/workflow-execution-run/workflow-execution-run.tsx +139 -0
  82. package/src/routes/workflow-scheduled/workflow-scheduled-list.tsx +269 -0
  83. package/dist/chunk-LKWTBYYC.mjs +0 -35
  84. package/dist/chunk-RPAL6FHW.mjs +0 -73
  85. package/dist/workflow-execution-detail-5O5VCXL3.mjs +0 -870
  86. package/dist/workflow-execution-list-DETG4MRT.mjs +0 -347
  87. /package/dist/{chunk-22YYMH6M.mjs → chunk-RISX76YT.mjs} +0 -0
@@ -0,0 +1,245 @@
1
+ import {
2
+ getWaitingSteps
3
+ } from "./chunk-LP6CPB7N.mjs";
4
+ import {
5
+ useSetStepFailure,
6
+ useSetStepSuccess,
7
+ useWorkflowExecution
8
+ } from "./chunk-A7ULKHDE.mjs";
9
+ import "./chunk-IUCDCPJU.mjs";
10
+ import {
11
+ KeyboundForm,
12
+ RouteDrawer,
13
+ useRouteModal
14
+ } from "./chunk-VEI6HW6L.mjs";
15
+ import {
16
+ Form
17
+ } from "./chunk-ND3ODI36.mjs";
18
+ import "./chunk-FXYH54JP.mjs";
19
+ import "./chunk-774WSTCC.mjs";
20
+ import "./chunk-YKIWIMJX.mjs";
21
+ import "./chunk-QZ7TP4HQ.mjs";
22
+
23
+ // src/routes/workflow-executions/workflow-execution-complete-step/workflow-execution-complete-step.tsx
24
+ import { zodResolver } from "@hookform/resolvers/zod";
25
+ import { Button, Heading, Select, Textarea, toast } from "@acmekit/ui";
26
+ import { useForm } from "react-hook-form";
27
+ import { useTranslation } from "react-i18next";
28
+ import { useParams } from "react-router-dom";
29
+ import * as zod from "zod";
30
+ import { jsx, jsxs } from "react/jsx-runtime";
31
+ var CompleteStepSchema = zod.object({
32
+ step_id: zod.string().min(1, "Step is required"),
33
+ outcome: zod.enum(["success", "failure"]),
34
+ response: zod.string().refine(
35
+ (val) => {
36
+ if (!val.trim()) return true;
37
+ try {
38
+ JSON.parse(val);
39
+ return true;
40
+ } catch {
41
+ return false;
42
+ }
43
+ },
44
+ { message: "Must be valid JSON" }
45
+ )
46
+ });
47
+ var WorkflowExecutionCompleteStep = () => {
48
+ const { t } = useTranslation();
49
+ const { id } = useParams();
50
+ const { handleSuccess } = useRouteModal();
51
+ const {
52
+ workflow_execution,
53
+ isPending: isLoading,
54
+ isError,
55
+ error
56
+ } = useWorkflowExecution(id);
57
+ if (isError) {
58
+ throw error;
59
+ }
60
+ if (isLoading || !workflow_execution) {
61
+ return /* @__PURE__ */ jsx(RouteDrawer, { children: /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(Heading, { children: t("workflowExecutions.actions.completeStep") }) }) });
62
+ }
63
+ const waitingSteps = getWaitingSteps(workflow_execution);
64
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
65
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(Heading, { children: t("workflowExecutions.actions.completeStep") }) }),
66
+ /* @__PURE__ */ jsx(
67
+ CompleteStepForm,
68
+ {
69
+ workflowId: workflow_execution.workflow_id,
70
+ transactionId: workflow_execution.transaction_id,
71
+ waitingSteps,
72
+ onSuccess: handleSuccess
73
+ }
74
+ )
75
+ ] });
76
+ };
77
+ var CompleteStepForm = ({
78
+ workflowId,
79
+ transactionId,
80
+ waitingSteps,
81
+ onSuccess
82
+ }) => {
83
+ const { t } = useTranslation();
84
+ const form = useForm({
85
+ defaultValues: {
86
+ step_id: waitingSteps[0]?.stepId || "",
87
+ outcome: "success",
88
+ response: "{}"
89
+ },
90
+ resolver: zodResolver(CompleteStepSchema)
91
+ });
92
+ const outcome = form.watch("outcome");
93
+ const { mutateAsync: setSuccess, isPending: isSettingSuccess } = useSetStepSuccess(workflowId);
94
+ const { mutateAsync: setFailure, isPending: isSettingFailure } = useSetStepFailure(workflowId);
95
+ const isPending = isSettingSuccess || isSettingFailure;
96
+ const handleSubmit = form.handleSubmit(async (values) => {
97
+ const response = values.response.trim() ? JSON.parse(values.response) : {};
98
+ if (values.outcome === "success") {
99
+ await setSuccess(
100
+ { transaction_id: transactionId, step_id: values.step_id, response },
101
+ {
102
+ onSuccess: () => {
103
+ toast.success(
104
+ t("workflowExecutions.asyncStep.completedSuccess")
105
+ );
106
+ onSuccess();
107
+ },
108
+ onError: (err) => {
109
+ toast.error(err.message);
110
+ }
111
+ }
112
+ );
113
+ } else {
114
+ await setFailure(
115
+ { transaction_id: transactionId, step_id: values.step_id, response },
116
+ {
117
+ onSuccess: () => {
118
+ toast.success(
119
+ t("workflowExecutions.asyncStep.completedSuccess")
120
+ );
121
+ onSuccess();
122
+ },
123
+ onError: (err) => {
124
+ toast.error(err.message);
125
+ }
126
+ }
127
+ );
128
+ }
129
+ });
130
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
131
+ KeyboundForm,
132
+ {
133
+ onSubmit: handleSubmit,
134
+ className: "flex flex-1 flex-col overflow-hidden",
135
+ children: [
136
+ /* @__PURE__ */ jsxs(RouteDrawer.Body, { className: "flex max-w-full flex-1 flex-col gap-y-4 overflow-y-auto", children: [
137
+ /* @__PURE__ */ jsx(
138
+ Form.Field,
139
+ {
140
+ control: form.control,
141
+ name: "step_id",
142
+ render: ({ field }) => {
143
+ return /* @__PURE__ */ jsxs(Form.Item, { children: [
144
+ /* @__PURE__ */ jsx(Form.Label, { children: t("workflowExecutions.asyncStep.stepLabel") }),
145
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsxs(
146
+ Select,
147
+ {
148
+ value: field.value,
149
+ onValueChange: field.onChange,
150
+ children: [
151
+ /* @__PURE__ */ jsx(Select.Trigger, { children: /* @__PURE__ */ jsx(
152
+ Select.Value,
153
+ {
154
+ placeholder: t(
155
+ "workflowExecutions.asyncStep.stepLabel"
156
+ )
157
+ }
158
+ ) }),
159
+ /* @__PURE__ */ jsx(Select.Content, { children: waitingSteps.map((step) => /* @__PURE__ */ jsx(
160
+ Select.Item,
161
+ {
162
+ value: step.stepId,
163
+ children: step.stepId
164
+ },
165
+ step.stepId
166
+ )) })
167
+ ]
168
+ }
169
+ ) }),
170
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
171
+ ] });
172
+ }
173
+ }
174
+ ),
175
+ /* @__PURE__ */ jsx(
176
+ Form.Field,
177
+ {
178
+ control: form.control,
179
+ name: "outcome",
180
+ render: ({ field }) => {
181
+ return /* @__PURE__ */ jsxs(Form.Item, { children: [
182
+ /* @__PURE__ */ jsx(Form.Label, { children: t("workflowExecutions.asyncStep.outcomeLabel") }),
183
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsxs(
184
+ Select,
185
+ {
186
+ value: field.value,
187
+ onValueChange: field.onChange,
188
+ children: [
189
+ /* @__PURE__ */ jsx(Select.Trigger, { children: /* @__PURE__ */ jsx(Select.Value, {}) }),
190
+ /* @__PURE__ */ jsxs(Select.Content, { children: [
191
+ /* @__PURE__ */ jsx(Select.Item, { value: "success", children: t("workflowExecutions.asyncStep.success") }),
192
+ /* @__PURE__ */ jsx(Select.Item, { value: "failure", children: t("workflowExecutions.asyncStep.failure") })
193
+ ] })
194
+ ]
195
+ }
196
+ ) }),
197
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
198
+ ] });
199
+ }
200
+ }
201
+ ),
202
+ /* @__PURE__ */ jsx(
203
+ Form.Field,
204
+ {
205
+ control: form.control,
206
+ name: "response",
207
+ render: ({ field }) => {
208
+ return /* @__PURE__ */ jsxs(Form.Item, { children: [
209
+ /* @__PURE__ */ jsx(Form.Label, { children: t("workflowExecutions.asyncStep.responsePayload") }),
210
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
211
+ Textarea,
212
+ {
213
+ ...field,
214
+ className: "font-mono text-xs",
215
+ rows: 10
216
+ }
217
+ ) }),
218
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
219
+ ] });
220
+ }
221
+ }
222
+ )
223
+ ] }),
224
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
225
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
226
+ /* @__PURE__ */ jsx(
227
+ Button,
228
+ {
229
+ size: "small",
230
+ type: "submit",
231
+ isLoading: isPending,
232
+ variant: outcome === "failure" ? "danger" : "primary",
233
+ children: outcome === "failure" ? t("workflowExecutions.asyncStep.markFailure") : t("workflowExecutions.asyncStep.markSuccess")
234
+ }
235
+ )
236
+ ] }) })
237
+ ]
238
+ }
239
+ ) });
240
+ };
241
+ var Component = WorkflowExecutionCompleteStep;
242
+ export {
243
+ Component,
244
+ WorkflowExecutionCompleteStep
245
+ };