@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
@@ -1,347 +0,0 @@
1
- import {
2
- DateCell
3
- } from "./chunk-QZOY6YYT.mjs";
4
- import {
5
- getTransactionState,
6
- getTransactionStateColor
7
- } from "./chunk-RPAL6FHW.mjs";
8
- import {
9
- _DataTable,
10
- useDataTable
11
- } from "./chunk-YLPAZ2DP.mjs";
12
- import {
13
- useQueryParams
14
- } from "./chunk-C76H5USB.mjs";
15
- import "./chunk-DFFLVEZ5.mjs";
16
- import "./chunk-535OVBXR.mjs";
17
- import {
18
- SingleColumnPage
19
- } from "./chunk-22YYMH6M.mjs";
20
- import {
21
- useExtension
22
- } from "./chunk-C5P5PL3E.mjs";
23
- import {
24
- useWorkflowExecutions
25
- } from "./chunk-LKWTBYYC.mjs";
26
- import "./chunk-ITNQKZQQ.mjs";
27
- import "./chunk-S4DMV3ZT.mjs";
28
- import "./chunk-774WSTCC.mjs";
29
- import "./chunk-DTY37DDZ.mjs";
30
- import "./chunk-QZ7TP4HQ.mjs";
31
-
32
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx
33
- import { Container, Heading, Text as Text2 } from "@acmekit/ui";
34
- import { keepPreviousData } from "@tanstack/react-query";
35
- import { useTranslation as useTranslation3 } from "react-i18next";
36
-
37
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx
38
- import { Badge, Copy, Text, clx as clx2 } from "@acmekit/ui";
39
- import { createColumnHelper } from "@tanstack/react-table";
40
- import { useMemo } from "react";
41
- import { useTranslation } from "react-i18next";
42
-
43
- // src/components/data-table/components/data-table-status-cell/data-table-status-cell.tsx
44
- import { clx } from "@acmekit/ui";
45
- import { jsx, jsxs } from "react/jsx-runtime";
46
- var DataTableStatusCell = ({
47
- color,
48
- children
49
- }) => {
50
- return /* @__PURE__ */ jsxs("div", { className: "txt-compact-small text-ui-fg-subtle flex h-full w-full items-center gap-x-2 overflow-hidden", children: [
51
- /* @__PURE__ */ jsx(
52
- "div",
53
- {
54
- role: "presentation",
55
- className: "flex h-5 w-2 items-center justify-center",
56
- children: /* @__PURE__ */ jsx(
57
- "div",
58
- {
59
- className: clx(
60
- "h-2 w-2 rounded-sm shadow-[0px_0px_0px_1px_rgba(0,0,0,0.12)_inset]",
61
- {
62
- "bg-ui-tag-neutral-icon": color === "grey",
63
- "bg-ui-tag-green-icon": color === "green",
64
- "bg-ui-tag-red-icon": color === "red",
65
- "bg-ui-tag-blue-icon": color === "blue",
66
- "bg-ui-tag-orange-icon": color === "orange",
67
- "bg-ui-tag-purple-icon": color === "purple"
68
- }
69
- )
70
- }
71
- )
72
- }
73
- ),
74
- /* @__PURE__ */ jsx("span", { className: "truncate", children })
75
- ] });
76
- };
77
-
78
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx
79
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
80
- var columnHelper = createColumnHelper();
81
- var useWorkflowExecutionTableColumns = () => {
82
- const { t } = useTranslation();
83
- return useMemo(
84
- () => [
85
- columnHelper.accessor("workflow_id", {
86
- header: t("workflowExecutions.workflowIdLabel"),
87
- cell: ({ getValue }) => {
88
- const workflowId = getValue();
89
- return /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
90
- /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", className: "truncate", children: workflowId }),
91
- /* @__PURE__ */ jsx2(Copy, { content: workflowId, className: "text-ui-fg-muted" })
92
- ] });
93
- }
94
- }),
95
- columnHelper.accessor("state", {
96
- header: t("fields.state"),
97
- cell: ({ getValue }) => {
98
- const state = getValue();
99
- const color = getTransactionStateColor(state);
100
- const translatedState = getTransactionState(t, state);
101
- return /* @__PURE__ */ jsx2(DataTableStatusCell, { color, children: /* @__PURE__ */ jsx2("span", { className: "capitalize", children: translatedState }) });
102
- }
103
- }),
104
- columnHelper.accessor("execution", {
105
- header: t("workflowExecutions.progressLabel"),
106
- cell: ({ getValue }) => {
107
- const steps = getValue()?.steps;
108
- if (!steps) {
109
- return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-subtle whitespace-nowrap", children: t("workflowExecutions.stepsCompletedLabel", {
110
- completed: 0,
111
- count: 0
112
- }) });
113
- }
114
- const actionableSteps = Object.values(steps).filter(
115
- (step) => step.id !== ROOT_PREFIX
116
- );
117
- const completedSteps = actionableSteps.filter(
118
- (step) => step.invoke.state === "done" /* DONE */
119
- );
120
- return /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
121
- /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-[3px]", children: actionableSteps.map((step) => /* @__PURE__ */ jsx2(
122
- "div",
123
- {
124
- className: clx2(
125
- "bg-ui-bg-switch-off shadow-details-switch-background h-3 w-1.5 rounded-full",
126
- {
127
- "bg-ui-fg-muted": step.invoke.state === "done" /* DONE */
128
- }
129
- ),
130
- "data-completed": step.invoke.state === "done" /* DONE */
131
- },
132
- step.id
133
- )) }),
134
- /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-subtle whitespace-nowrap", children: t("workflowExecutions.stepsCompletedLabel", {
135
- completed: completedSteps.length,
136
- count: actionableSteps.length
137
- }) })
138
- ] });
139
- }
140
- }),
141
- columnHelper.display({
142
- id: "duration",
143
- header: t("fields.duration"),
144
- cell: ({ row }) => {
145
- const createdAt = row.original.created_at;
146
- const updatedAt = row.original.updated_at;
147
- const state = row.original.state;
148
- if (!createdAt) {
149
- return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
150
- }
151
- const start = new Date(createdAt);
152
- const end = updatedAt && ["done", "failed", "reverted"].includes(state) ? new Date(updatedAt) : /* @__PURE__ */ new Date();
153
- if (isNaN(start.getTime()) || isNaN(end.getTime())) {
154
- return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
155
- }
156
- const ms = end.getTime() - start.getTime();
157
- if (ms < 0) {
158
- return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
159
- }
160
- const seconds = Math.floor(ms / 1e3);
161
- const minutes = Math.floor(seconds / 60);
162
- const hours = Math.floor(minutes / 60);
163
- let label;
164
- if (hours > 0) {
165
- label = `${hours}h ${minutes % 60}m`;
166
- } else if (minutes > 0) {
167
- label = `${minutes}m ${seconds % 60}s`;
168
- } else if (seconds > 0) {
169
- label = `${seconds}s`;
170
- } else if (ms > 0) {
171
- label = "<1s";
172
- } else {
173
- label = "0s";
174
- }
175
- return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: label });
176
- }
177
- }),
178
- columnHelper.accessor("created_at", {
179
- header: t("fields.createdAt"),
180
- cell: ({ getValue }) => {
181
- const date = getValue();
182
- return /* @__PURE__ */ jsx2(DateCell, { date });
183
- }
184
- }),
185
- columnHelper.accessor("updated_at", {
186
- header: t("fields.updatedAt"),
187
- cell: ({ getValue }) => {
188
- const date = getValue();
189
- return /* @__PURE__ */ jsx2(DateCell, { date });
190
- }
191
- })
192
- ],
193
- [t]
194
- );
195
- };
196
- var ROOT_PREFIX = "_root";
197
-
198
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx
199
- import { useTranslation as useTranslation2 } from "react-i18next";
200
- var useWorkflowExecutionTableFilters = () => {
201
- const { t } = useTranslation2();
202
- const stateFilter = {
203
- key: "state",
204
- label: t("fields.status"),
205
- type: "select",
206
- multiple: true,
207
- options: [
208
- {
209
- label: t("workflowExecutions.state.done"),
210
- value: "done"
211
- },
212
- {
213
- label: t("workflowExecutions.state.failed"),
214
- value: "failed"
215
- },
216
- {
217
- label: t("workflowExecutions.state.reverted"),
218
- value: "reverted"
219
- },
220
- {
221
- label: t("workflowExecutions.state.invoking"),
222
- value: "invoking"
223
- },
224
- {
225
- label: t("workflowExecutions.transaction.state.waitingToCompensate"),
226
- value: "waiting_to_compensate"
227
- },
228
- {
229
- label: t("workflowExecutions.state.compensating"),
230
- value: "compensating"
231
- },
232
- {
233
- label: t("workflowExecutions.state.notStarted"),
234
- value: "not_started"
235
- }
236
- ]
237
- };
238
- const dateFilters = [
239
- { key: "created_at", label: t("fields.createdAt"), type: "date" },
240
- { key: "updated_at", label: t("fields.updatedAt"), type: "date" }
241
- ];
242
- return [stateFilter, ...dateFilters];
243
- };
244
-
245
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx
246
- var useWorkflowExecutionTableQuery = ({
247
- pageSize = 20,
248
- prefix
249
- }) => {
250
- const raw = useQueryParams(
251
- ["q", "offset", "order", "state", "created_at", "updated_at"],
252
- prefix
253
- );
254
- const { offset, order, state, created_at, updated_at, ...rest } = raw;
255
- const searchParams = {
256
- limit: pageSize,
257
- offset: offset ? parseInt(offset) : 0,
258
- order: order ?? "-created_at",
259
- state: state ? state.split(",") : void 0,
260
- created_at: created_at ? JSON.parse(created_at) : void 0,
261
- updated_at: updated_at ? JSON.parse(updated_at) : void 0,
262
- ...rest
263
- };
264
- return {
265
- searchParams,
266
- raw
267
- };
268
- };
269
-
270
- // src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx
271
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
272
- var PAGE_SIZE = 20;
273
- var WorkflowExecutionListTable = () => {
274
- const { t } = useTranslation3();
275
- const { searchParams, raw } = useWorkflowExecutionTableQuery({
276
- pageSize: PAGE_SIZE
277
- });
278
- const { workflow_executions, count, isLoading, isError, error } = useWorkflowExecutions(
279
- {
280
- ...searchParams
281
- },
282
- {
283
- placeholderData: keepPreviousData
284
- }
285
- );
286
- const columns = useWorkflowExecutionTableColumns();
287
- const filters = useWorkflowExecutionTableFilters();
288
- const { table } = useDataTable({
289
- data: workflow_executions || [],
290
- columns,
291
- count,
292
- pageSize: PAGE_SIZE,
293
- enablePagination: true,
294
- getRowId: (row) => row.id
295
- });
296
- if (isError) {
297
- throw error;
298
- }
299
- return /* @__PURE__ */ jsxs3(Container, { className: "divide-y p-0", children: [
300
- /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsxs3("div", { children: [
301
- /* @__PURE__ */ jsx3(Heading, { children: t("workflowExecutions.domain") }),
302
- /* @__PURE__ */ jsx3(Text2, { className: "text-ui-fg-subtle", size: "small", children: t(`workflowExecutions.subtitle`) })
303
- ] }) }),
304
- /* @__PURE__ */ jsx3(
305
- _DataTable,
306
- {
307
- table,
308
- columns,
309
- filters,
310
- count,
311
- isLoading,
312
- orderBy: [
313
- { key: "created_at", label: t("fields.createdAt") },
314
- { key: "updated_at", label: t("fields.updatedAt") }
315
- ],
316
- pageSize: PAGE_SIZE,
317
- navigateTo: (row) => `${row.id}`,
318
- search: true,
319
- pagination: true,
320
- queryObject: raw,
321
- noRecords: {
322
- message: t("workflowExecutions.list.noRecordsMessage")
323
- }
324
- }
325
- )
326
- ] });
327
- };
328
-
329
- // src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx
330
- import { jsx as jsx4 } from "react/jsx-runtime";
331
- var WorkflowExcecutionList = () => {
332
- const { getWidgets } = useExtension();
333
- return /* @__PURE__ */ jsx4(
334
- SingleColumnPage,
335
- {
336
- widgets: {
337
- after: getWidgets("workflow.list.after"),
338
- before: getWidgets("workflow.list.before")
339
- },
340
- hasOutlet: false,
341
- children: /* @__PURE__ */ jsx4(WorkflowExecutionListTable, {})
342
- }
343
- );
344
- };
345
- export {
346
- WorkflowExcecutionList as Component
347
- };
File without changes