@burdenoff/fluidgrids-fe-sdk 2026.1112.2 → 2026.1112.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.
- package/dist/{HistoryPage-BdijEOHp.js → HistoryPage-DktteURI.js} +199 -33
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/history.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -3
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +1 -1
- package/package.json +5 -1
|
@@ -7,7 +7,8 @@ import { x as getFluidGridsConfig } from "./client-C9XSzSXr.js";
|
|
|
7
7
|
import { n as useFluidGridsPageControls } from "./pageControlsBridge-0pX9s-3k.js";
|
|
8
8
|
import { n as historyControls } from "./pageControlSpecs-DZJ9K37m.js";
|
|
9
9
|
import { t as FluidGridsDocsLink } from "./FluidGridsDocsLink-JxkBpOeb.js";
|
|
10
|
-
import {
|
|
10
|
+
import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
|
|
11
|
+
import { useCallback, useEffect, useId, useMemo, useState } from "react";
|
|
11
12
|
import { useNavigate } from "react-router";
|
|
12
13
|
import { Icon } from "@iconify/react";
|
|
13
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,6 +17,41 @@ import { Badge, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectV
|
|
|
16
17
|
import { Button as Button$1 } from "@burdenoff/fe-libs/button";
|
|
17
18
|
import { buildActorFallback, useActorProfiles } from "@burdenoff/fe-libs/shared";
|
|
18
19
|
|
|
20
|
+
// src/modules/history/components/TechnicalDetails.tsx
|
|
21
|
+
/**
|
|
22
|
+
* TechnicalDetails: a small "Show technical details" disclosure for the raw
|
|
23
|
+
* text a person does not need first (an error message, an id).
|
|
24
|
+
*
|
|
25
|
+
* LOCAL PLACEHOLDER for the shared "Show technical details" piece that
|
|
26
|
+
* BOFF-11841 builds in fe-libs. The props are deliberately the ones that piece
|
|
27
|
+
* is expected to take (`label`, `hideLabel`, `children`), so it can be swapped
|
|
28
|
+
* for it without touching the call sites.
|
|
29
|
+
*/
|
|
30
|
+
function TechnicalDetails({ label, hideLabel, children, className }) {
|
|
31
|
+
const [open, setOpen] = useState(false);
|
|
32
|
+
const panelId = useId();
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className,
|
|
35
|
+
"data-testid": "fluidgrids-technical-details",
|
|
36
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
"aria-expanded": open,
|
|
39
|
+
"aria-controls": panelId,
|
|
40
|
+
onClick: () => setOpen((value) => !value),
|
|
41
|
+
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary underline-offset-2 hover:underline",
|
|
42
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
43
|
+
icon: open ? "mdi:chevron-down" : "mdi:chevron-right",
|
|
44
|
+
width: 14
|
|
45
|
+
}), open ? hideLabel : label]
|
|
46
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
47
|
+
id: panelId,
|
|
48
|
+
hidden: !open,
|
|
49
|
+
className: "mt-1 text-xs break-words",
|
|
50
|
+
children
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
19
55
|
// src/modules/history/pages/HistoryPage.tsx
|
|
20
56
|
/**
|
|
21
57
|
* HistoryPage — cross-workflow version history.
|
|
@@ -29,9 +65,26 @@ var HistoryPage_exports = /* @__PURE__ */ __exportAll({ HistoryPage: () => Histo
|
|
|
29
65
|
const PAGE_SIZE = 20;
|
|
30
66
|
/** Upper bound on version rows fetched for the screen (newest first). */
|
|
31
67
|
const FETCH_LIMIT = 500;
|
|
32
|
-
function useStatusStyles() {
|
|
68
|
+
function useStatusStyles(v2) {
|
|
33
69
|
const tr = useTr();
|
|
34
|
-
return useMemo(() =>
|
|
70
|
+
return useMemo(() => v2 ? {
|
|
71
|
+
ACTIVE: {
|
|
72
|
+
label: tr("fluidgrids.history.historyPage.statusOn", "On"),
|
|
73
|
+
variant: "default"
|
|
74
|
+
},
|
|
75
|
+
DRAFT: {
|
|
76
|
+
label: tr("fluidgrids.history.historyPage.statusOffDraft", "Off (draft)"),
|
|
77
|
+
variant: "secondary"
|
|
78
|
+
},
|
|
79
|
+
ARCHIVED: {
|
|
80
|
+
label: tr("fluidgrids.history.historyPage.statusArchived", "Archived"),
|
|
81
|
+
variant: "outline"
|
|
82
|
+
},
|
|
83
|
+
DEPRECATED: {
|
|
84
|
+
label: tr("fluidgrids.history.historyPage.statusRetired", "Retired"),
|
|
85
|
+
variant: "destructive"
|
|
86
|
+
}
|
|
87
|
+
} : {
|
|
35
88
|
ACTIVE: {
|
|
36
89
|
label: tr("fluidgrids.history.historyPage.statusActive", "Active"),
|
|
37
90
|
variant: "default"
|
|
@@ -48,7 +101,12 @@ function useStatusStyles() {
|
|
|
48
101
|
label: tr("fluidgrids.history.historyPage.statusDeprecated", "Deprecated"),
|
|
49
102
|
variant: "destructive"
|
|
50
103
|
}
|
|
51
|
-
}
|
|
104
|
+
}, [tr, v2]);
|
|
105
|
+
}
|
|
106
|
+
/** The page's language (the app's, when it sets one), else the browser's. */
|
|
107
|
+
function pageLocale() {
|
|
108
|
+
if (typeof document === "undefined") return void 0;
|
|
109
|
+
return document.documentElement.lang || void 0;
|
|
52
110
|
}
|
|
53
111
|
function HistoryTableSkeleton() {
|
|
54
112
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -80,8 +138,41 @@ function EmptyState() {
|
|
|
80
138
|
]
|
|
81
139
|
});
|
|
82
140
|
}
|
|
83
|
-
function ErrorState({ message, onRetry }) {
|
|
141
|
+
function ErrorState({ message, onRetry, v2 }) {
|
|
84
142
|
const tr = useTr();
|
|
143
|
+
if (v2) return /* @__PURE__ */ jsxs("div", {
|
|
144
|
+
role: "alert",
|
|
145
|
+
className: "p-4 bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)] rounded-lg",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsxs("div", {
|
|
148
|
+
className: "flex items-center gap-2 text-[var(--color-status-error-text)]",
|
|
149
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
150
|
+
icon: "mdi:alert-circle",
|
|
151
|
+
width: 20
|
|
152
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
153
|
+
className: "font-medium",
|
|
154
|
+
children: tr("fluidgrids.history.historyPage.errorHeadingPlain", "We couldn't load your versions")
|
|
155
|
+
})]
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ jsx("p", {
|
|
158
|
+
className: "mt-1 text-sm text-[var(--color-status-error-text)]",
|
|
159
|
+
children: tr("fluidgrids.history.historyPage.errorPlain", "Something went wrong while loading. Try again in a moment.")
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ jsx(TechnicalDetails, {
|
|
162
|
+
className: "mt-2 text-[var(--color-status-error-text)]",
|
|
163
|
+
label: tr("fluidgrids.history.historyPage.showTechnicalDetails", "Show technical details"),
|
|
164
|
+
hideLabel: tr("fluidgrids.history.historyPage.hideTechnicalDetails", "Hide technical details"),
|
|
165
|
+
children: message
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx(Button$1, {
|
|
168
|
+
variant: "outline",
|
|
169
|
+
size: "sm",
|
|
170
|
+
onClick: onRetry,
|
|
171
|
+
className: "mt-3 border-[var(--color-status-error-border)] text-[var(--color-status-error-text)] hover:bg-[var(--color-status-error-bg-subtle)]",
|
|
172
|
+
children: tr("fluidgrids.history.historyPage.errorRetry", "Retry")
|
|
173
|
+
})
|
|
174
|
+
]
|
|
175
|
+
});
|
|
85
176
|
return /* @__PURE__ */ jsxs("div", {
|
|
86
177
|
className: "p-4 bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)] rounded-lg",
|
|
87
178
|
children: [
|
|
@@ -124,12 +215,59 @@ function StatCard({ label, value, valueClassName }) {
|
|
|
124
215
|
function HistoryPage() {
|
|
125
216
|
const tr = useTr();
|
|
126
217
|
const navigate = useNavigate();
|
|
127
|
-
const
|
|
218
|
+
const v2 = useNavigationV2();
|
|
219
|
+
const STATUS_STYLES = useStatusStyles(v2);
|
|
128
220
|
const [search, setSearch] = useState("");
|
|
129
221
|
const [workflowFilter, setWorkflowFilter] = useState("all");
|
|
130
222
|
const [page, setPage] = useState(0);
|
|
131
|
-
const
|
|
132
|
-
const
|
|
223
|
+
const [windowOffset, setWindowOffset] = useState(0);
|
|
224
|
+
const [windows, setWindows] = useState({});
|
|
225
|
+
const { workflows: versionRows, total, hasMore, loading, error, refetch } = useWorkflowDefinitions(v2 && windowOffset > 0 ? {
|
|
226
|
+
limit: FETCH_LIMIT,
|
|
227
|
+
offset: windowOffset
|
|
228
|
+
} : { limit: FETCH_LIMIT });
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
if (!v2 || loading || error) return;
|
|
231
|
+
setWindows((prev) => ({
|
|
232
|
+
...prev,
|
|
233
|
+
[windowOffset]: versionRows
|
|
234
|
+
}));
|
|
235
|
+
}, [
|
|
236
|
+
v2,
|
|
237
|
+
loading,
|
|
238
|
+
error,
|
|
239
|
+
versionRows,
|
|
240
|
+
windowOffset
|
|
241
|
+
]);
|
|
242
|
+
const loadedRows = useMemo(() => {
|
|
243
|
+
if (!v2) return versionRows;
|
|
244
|
+
const seen = /* @__PURE__ */ new Set();
|
|
245
|
+
const merged = [];
|
|
246
|
+
for (const offset of Object.keys(windows).map(Number).sort((a, b) => a - b)) for (const row of windows[offset]) {
|
|
247
|
+
if (seen.has(row.id)) continue;
|
|
248
|
+
seen.add(row.id);
|
|
249
|
+
merged.push(row);
|
|
250
|
+
}
|
|
251
|
+
return merged;
|
|
252
|
+
}, [
|
|
253
|
+
v2,
|
|
254
|
+
versionRows,
|
|
255
|
+
windows
|
|
256
|
+
]);
|
|
257
|
+
const handleRefresh = useCallback(() => {
|
|
258
|
+
if (v2 && windowOffset > 0) {
|
|
259
|
+
setWindows({});
|
|
260
|
+
setWindowOffset(0);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (v2) setWindows({});
|
|
264
|
+
refetch();
|
|
265
|
+
}, [
|
|
266
|
+
v2,
|
|
267
|
+
windowOffset,
|
|
268
|
+
refetch
|
|
269
|
+
]);
|
|
270
|
+
const allRows = useMemo(() => [...loadedRows].sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()), [loadedRows]);
|
|
133
271
|
const distinctWorkflows = useMemo(() => {
|
|
134
272
|
const byKey = /* @__PURE__ */ new Map();
|
|
135
273
|
for (const row of allRows) if (!byKey.has(row.workflowKey)) byKey.set(row.workflowKey, {
|
|
@@ -168,7 +306,7 @@ function HistoryPage() {
|
|
|
168
306
|
setPage(0);
|
|
169
307
|
}, []);
|
|
170
308
|
const assistantControls = useMemo(() => historyControls({
|
|
171
|
-
page: tr("fluidgrids.history.historyPage.title", "Version History"),
|
|
309
|
+
page: tr("fluidgrids.history.historyPage.title", v2 ? "Version history" : "Version History"),
|
|
172
310
|
search: handleSearchChange,
|
|
173
311
|
workflow: {
|
|
174
312
|
label: tr("fluidgrids.executions.executionTable.colWorkflow", "Workflow"),
|
|
@@ -183,6 +321,7 @@ function HistoryPage() {
|
|
|
183
321
|
}
|
|
184
322
|
}), [
|
|
185
323
|
tr,
|
|
324
|
+
v2,
|
|
186
325
|
distinctWorkflows,
|
|
187
326
|
workflowFilter,
|
|
188
327
|
handleSearchChange,
|
|
@@ -240,7 +379,7 @@ function HistoryPage() {
|
|
|
240
379
|
};
|
|
241
380
|
const formatDate = (dateStr) => {
|
|
242
381
|
try {
|
|
243
|
-
return new Intl.DateTimeFormat(
|
|
382
|
+
return new Intl.DateTimeFormat(pageLocale(), {
|
|
244
383
|
month: "short",
|
|
245
384
|
day: "numeric",
|
|
246
385
|
year: "numeric",
|
|
@@ -252,6 +391,7 @@ function HistoryPage() {
|
|
|
252
391
|
}
|
|
253
392
|
};
|
|
254
393
|
const countByStatus = (status) => allRows.filter((r) => r.status === status).length;
|
|
394
|
+
const showOlder = () => setWindowOffset(windowOffset + FETCH_LIMIT);
|
|
255
395
|
return /* @__PURE__ */ jsxs("div", {
|
|
256
396
|
className: "p-4 sm:p-6 bg-background-primary min-h-screen",
|
|
257
397
|
children: [
|
|
@@ -261,7 +401,7 @@ function HistoryPage() {
|
|
|
261
401
|
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
262
402
|
/* @__PURE__ */ jsx("h1", {
|
|
263
403
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
264
|
-
children: tr("fluidgrids.history.historyPage.title", "Version History")
|
|
404
|
+
children: tr("fluidgrids.history.historyPage.title", v2 ? "Version history" : "Version History")
|
|
265
405
|
}),
|
|
266
406
|
/* @__PURE__ */ jsx("p", {
|
|
267
407
|
className: "text-text-secondary mt-1",
|
|
@@ -275,13 +415,13 @@ function HistoryPage() {
|
|
|
275
415
|
className: "flex flex-wrap items-center gap-3",
|
|
276
416
|
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
277
417
|
variant: "outline",
|
|
278
|
-
onClick:
|
|
418
|
+
onClick: handleRefresh,
|
|
279
419
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
280
420
|
icon: "mdi:refresh",
|
|
281
421
|
className: "mr-2",
|
|
282
422
|
width: 16
|
|
283
423
|
}), tr("fluidgrids.history.historyPage.refreshButton", "Refresh")]
|
|
284
|
-
}), /* @__PURE__ */ jsxs(Button$1, {
|
|
424
|
+
}), !v2 && /* @__PURE__ */ jsxs(Button$1, {
|
|
285
425
|
variant: "outline",
|
|
286
426
|
onClick: () => navigate("../list"),
|
|
287
427
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -302,7 +442,8 @@ function HistoryPage() {
|
|
|
302
442
|
width: 18,
|
|
303
443
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
304
444
|
}), /* @__PURE__ */ jsx(Input, {
|
|
305
|
-
placeholder: tr("fluidgrids.history.historyPage.searchPlaceholder", "Search by name, version, key, or author..."),
|
|
445
|
+
placeholder: tr("fluidgrids.history.historyPage.searchPlaceholder", v2 ? "Search by workflow or person" : "Search by name, version, key, or author..."),
|
|
446
|
+
"aria-label": tr("fluidgrids.history.historyPage.searchLabel", "Search versions"),
|
|
306
447
|
value: search,
|
|
307
448
|
onChange: (e) => handleSearchChange(e.target.value),
|
|
308
449
|
className: "pl-10 bg-background-secondary border-border-secondary"
|
|
@@ -324,29 +465,33 @@ function HistoryPage() {
|
|
|
324
465
|
})]
|
|
325
466
|
}),
|
|
326
467
|
/* @__PURE__ */ jsxs("div", {
|
|
327
|
-
className:
|
|
468
|
+
className: `grid grid-cols-2 ${v2 ? "sm:grid-cols-3 lg:grid-cols-6" : "sm:grid-cols-5"} gap-3 mb-6`,
|
|
328
469
|
children: [
|
|
329
470
|
/* @__PURE__ */ jsx(StatCard, {
|
|
330
471
|
label: tr("fluidgrids.history.historyPage.statTotalVersions", "Total Versions"),
|
|
331
|
-
value: total || allRows.length
|
|
472
|
+
value: v2 ? allRows.length : total || allRows.length
|
|
332
473
|
}),
|
|
333
474
|
/* @__PURE__ */ jsx(StatCard, {
|
|
334
475
|
label: tr("fluidgrids.history.historyPage.statWorkflows", "Workflows"),
|
|
335
476
|
value: distinctWorkflows.length
|
|
336
477
|
}),
|
|
337
478
|
/* @__PURE__ */ jsx(StatCard, {
|
|
338
|
-
label: tr("fluidgrids.history.historyPage.statActive", "Active"),
|
|
479
|
+
label: v2 ? tr("fluidgrids.history.historyPage.statOn", "On") : tr("fluidgrids.history.historyPage.statActive", "Active"),
|
|
339
480
|
value: countByStatus("ACTIVE"),
|
|
340
481
|
valueClassName: "text-[var(--color-status-success-text)]"
|
|
341
482
|
}),
|
|
342
483
|
/* @__PURE__ */ jsx(StatCard, {
|
|
343
|
-
label: tr("fluidgrids.history.historyPage.statDraft", "Draft"),
|
|
484
|
+
label: v2 ? tr("fluidgrids.history.historyPage.statOffDraft", "Off (draft)") : tr("fluidgrids.history.historyPage.statDraft", "Draft"),
|
|
344
485
|
value: countByStatus("DRAFT"),
|
|
345
486
|
valueClassName: "text-[var(--color-status-warning-text)]"
|
|
346
487
|
}),
|
|
347
488
|
/* @__PURE__ */ jsx(StatCard, {
|
|
348
489
|
label: tr("fluidgrids.history.historyPage.statArchived", "Archived"),
|
|
349
490
|
value: countByStatus("ARCHIVED")
|
|
491
|
+
}),
|
|
492
|
+
v2 && /* @__PURE__ */ jsx(StatCard, {
|
|
493
|
+
label: tr("fluidgrids.history.historyPage.statRetired", "Retired"),
|
|
494
|
+
value: countByStatus("DEPRECATED")
|
|
350
495
|
})
|
|
351
496
|
]
|
|
352
497
|
}),
|
|
@@ -361,10 +506,11 @@ function HistoryPage() {
|
|
|
361
506
|
className: "mb-6",
|
|
362
507
|
children: /* @__PURE__ */ jsx(ErrorState, {
|
|
363
508
|
message: error.message,
|
|
364
|
-
onRetry:
|
|
509
|
+
onRetry: handleRefresh,
|
|
510
|
+
v2
|
|
365
511
|
})
|
|
366
512
|
}),
|
|
367
|
-
loading ? /* @__PURE__ */ jsx(HistoryTableSkeleton, {}) : filteredRows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {}) : /* @__PURE__ */ jsx("div", {
|
|
513
|
+
loading && !(v2 && allRows.length > 0) ? /* @__PURE__ */ jsx(HistoryTableSkeleton, {}) : filteredRows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {}) : /* @__PURE__ */ jsx("div", {
|
|
368
514
|
className: "overflow-x-auto rounded-lg border border-border-secondary",
|
|
369
515
|
children: /* @__PURE__ */ jsxs("table", {
|
|
370
516
|
className: "w-full text-sm",
|
|
@@ -385,11 +531,11 @@ function HistoryPage() {
|
|
|
385
531
|
}),
|
|
386
532
|
/* @__PURE__ */ jsx("th", {
|
|
387
533
|
className: "text-left px-4 py-3 font-medium text-text-secondary",
|
|
388
|
-
children: tr("fluidgrids.history.historyPage.columnChangedBy", "Changed By")
|
|
534
|
+
children: v2 ? tr("fluidgrids.history.historyPage.columnCreatedBy", "Created by") : tr("fluidgrids.history.historyPage.columnChangedBy", "Changed By")
|
|
389
535
|
}),
|
|
390
536
|
/* @__PURE__ */ jsx("th", {
|
|
391
537
|
className: "text-left px-4 py-3 font-medium text-text-secondary",
|
|
392
|
-
children: tr("fluidgrids.history.historyPage.columnChangedAt", "Changed At")
|
|
538
|
+
children: v2 ? tr("fluidgrids.history.historyPage.columnLastChanged", "Last changed") : tr("fluidgrids.history.historyPage.columnChangedAt", "Changed At")
|
|
393
539
|
}),
|
|
394
540
|
/* @__PURE__ */ jsx("th", {
|
|
395
541
|
className: "text-right px-4 py-3 font-medium text-text-secondary",
|
|
@@ -399,8 +545,20 @@ function HistoryPage() {
|
|
|
399
545
|
}) }), /* @__PURE__ */ jsx("tbody", { children: paginatedRows.map((row) => {
|
|
400
546
|
const statusStyle = STATUS_STYLES[row.status] ?? STATUS_STYLES.DRAFT;
|
|
401
547
|
return /* @__PURE__ */ jsxs("tr", {
|
|
402
|
-
className: "border-b border-border-secondary last:border-0 hover:bg-background-secondary/50 cursor-pointer transition-colors",
|
|
548
|
+
className: "border-b border-border-secondary last:border-0 hover:bg-background-secondary/50 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
549
|
+
tabIndex: 0,
|
|
550
|
+
"aria-label": tr("fluidgrids.history.historyPage.openVersionLabel", "Open {{name}} {{version}} in the builder", {
|
|
551
|
+
name: row.name,
|
|
552
|
+
version: row.version
|
|
553
|
+
}),
|
|
403
554
|
onClick: () => handleNavigateToVersion(row.workflowKey, row.version),
|
|
555
|
+
onKeyDown: (e) => {
|
|
556
|
+
if (e.target !== e.currentTarget) return;
|
|
557
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
558
|
+
e.preventDefault();
|
|
559
|
+
handleNavigateToVersion(row.workflowKey, row.version);
|
|
560
|
+
}
|
|
561
|
+
},
|
|
404
562
|
children: [
|
|
405
563
|
/* @__PURE__ */ jsx("td", {
|
|
406
564
|
className: "px-4 py-3",
|
|
@@ -479,6 +637,8 @@ function HistoryPage() {
|
|
|
479
637
|
}), /* @__PURE__ */ jsx(TooltipContent, { children: tr("fluidgrids.history.historyPage.compareTooltip", "Compare with the previous version") })] }), /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
480
638
|
asChild: true,
|
|
481
639
|
children: /* @__PURE__ */ jsx("button", {
|
|
640
|
+
type: "button",
|
|
641
|
+
"aria-label": tr("fluidgrids.history.historyPage.openInBuilderTooltip", "Open in builder"),
|
|
482
642
|
onClick: (e) => {
|
|
483
643
|
e.stopPropagation();
|
|
484
644
|
handleNavigateToVersion(row.workflowKey, row.version);
|
|
@@ -508,19 +668,25 @@ function HistoryPage() {
|
|
|
508
668
|
onRestore: (version) => handleRestoreFromDiff(diffTarget.workflowKey, version),
|
|
509
669
|
onOpenVersion: (version) => handleNavigateToVersion(diffTarget.workflowKey, version)
|
|
510
670
|
}),
|
|
671
|
+
v2 && hasMore && !error && /* @__PURE__ */ jsx("div", {
|
|
672
|
+
className: "mt-4 flex justify-center",
|
|
673
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
674
|
+
variant: "outline",
|
|
675
|
+
onClick: showOlder,
|
|
676
|
+
disabled: loading,
|
|
677
|
+
"data-testid": "fluidgrids-history-show-older",
|
|
678
|
+
children: tr("fluidgrids.history.historyPage.showOlderVersions", "Show older versions")
|
|
679
|
+
})
|
|
680
|
+
}),
|
|
511
681
|
filteredRows.length > PAGE_SIZE && /* @__PURE__ */ jsxs("div", {
|
|
512
682
|
className: "flex items-center justify-between mt-4 px-1",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
683
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
514
684
|
className: "text-sm text-text-secondary",
|
|
515
|
-
children:
|
|
516
|
-
|
|
517
|
-
page * PAGE_SIZE
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
" of",
|
|
521
|
-
" ",
|
|
522
|
-
filteredRows.length
|
|
523
|
-
]
|
|
685
|
+
children: tr("fluidgrids.history.historyPage.rangeSummary", "Showing {{from}}–{{to}} of {{total}}", {
|
|
686
|
+
from: page * PAGE_SIZE + 1,
|
|
687
|
+
to: Math.min((page + 1) * PAGE_SIZE, filteredRows.length),
|
|
688
|
+
total: filteredRows.length
|
|
689
|
+
})
|
|
524
690
|
}), /* @__PURE__ */ jsxs("div", {
|
|
525
691
|
className: "flex gap-2",
|
|
526
692
|
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as NavigationV2Context } from "./useNavigationV2-C2WeqN7d.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
// src/navigation-v2/NavigationV2Provider.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Turns the FluidGrids Navigation v2 page variants on (or, nested, off) for
|
|
8
|
+
* the SDK pages rendered inside. See `useNavigationV2`.
|
|
9
|
+
*/
|
|
10
|
+
function NavigationV2Provider({ enabled, children }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(NavigationV2Context.Provider, {
|
|
12
|
+
value: enabled,
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { NavigationV2Provider as t };
|
package/dist/history.js
CHANGED