@burdenoff/fluidgrids-fe-sdk 2026.1023.4 → 2026.1024.1

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 (37) hide show
  1. package/dist/{ExecutionDetailPage-FDX242B5.js → ExecutionDetailPage-4F3ISGXV.js} +7 -7
  2. package/dist/{ExecutionsListPage-DYKEZ4KN.js → ExecutionsListPage-LJ2HMBAY.js} +7 -7
  3. package/dist/{WorkflowBuilder-OSJOMNH5.js → WorkflowBuilder-IXOOUZCW.js} +9 -9
  4. package/dist/{WorkflowsList-62SQ2QQF.js → WorkflowsList-YQK3OMRB.js} +7 -7
  5. package/dist/{chunk-KAOLPDNX.js → chunk-3UOOUYP4.js} +1 -1
  6. package/dist/{chunk-IGIZORB3.js → chunk-45HX7XHR.js} +74 -59
  7. package/dist/{chunk-3BK65TDZ.js → chunk-5WDRCN5X.js} +77 -5
  8. package/dist/{chunk-LLPLOWMA.js → chunk-6CLELP3G.js} +2 -2
  9. package/dist/{chunk-J3XDX5HG.js → chunk-7IYAPG6P.js} +2 -2
  10. package/dist/{chunk-XCQROWIZ.js → chunk-B4W6NV7T.js} +2 -2
  11. package/dist/{chunk-CZURRUDX.js → chunk-GD7CSKFD.js} +4 -1
  12. package/dist/{chunk-N4QNTQKQ.js → chunk-ILM5U2RT.js} +3 -3
  13. package/dist/{chunk-DUIUT2TB.js → chunk-KUCDVRDZ.js} +594 -64
  14. package/dist/{chunk-OKWH2CHF.js → chunk-NIFAR6KU.js} +3 -3
  15. package/dist/{chunk-MR4OTF7D.js → chunk-NXHZUXDF.js} +1 -1
  16. package/dist/{chunk-VMVY65DC.js → chunk-OJYIB5TL.js} +5 -5
  17. package/dist/{chunk-HAYSY6TZ.js → chunk-OQEQ3AIA.js} +1 -1
  18. package/dist/{chunk-OD2XBMS6.js → chunk-STCOBJBN.js} +5 -4
  19. package/dist/{chunk-2QTKDR23.js → chunk-SYTBUKYQ.js} +1 -1
  20. package/dist/{chunk-TP2I5FQJ.js → chunk-UC4RGMSC.js} +293 -229
  21. package/dist/{chunk-UKMXGBU3.js → chunk-W36YJI7F.js} +1 -1
  22. package/dist/{chunk-IULOX3NQ.js → chunk-XFVNTWM2.js} +1 -1
  23. package/dist/{chunk-NJZAWUGC.js → chunk-XXAVXVBW.js} +1 -1
  24. package/dist/chunk-YBEIPW7J.js +184 -0
  25. package/dist/{chunk-EB344COE.js → chunk-Z27IYJSA.js} +3 -3
  26. package/dist/executions.js +9 -9
  27. package/dist/history.js +4 -4
  28. package/dist/index.d.ts +932 -25
  29. package/dist/index.js +31 -31
  30. package/dist/nodes.js +2 -2
  31. package/dist/observability.js +4 -4
  32. package/dist/settings.js +4 -4
  33. package/dist/templates.js +8 -8
  34. package/dist/workflow-builder.js +10 -10
  35. package/dist/workflows-list.js +7 -7
  36. package/package.json +1 -1
  37. package/dist/chunk-YGBDZ424.js +0 -64
@@ -1,13 +1,13 @@
1
- import { NEW_WORKFLOW_NAV, firstWorkflowProgress, builderPathFor, GUIDED_FIRST_WORKFLOW_NAV } from './chunk-YGBDZ424.js';
2
- import { useExecutions } from './chunk-LLPLOWMA.js';
3
- import { QuotaExhaustedDialog } from './chunk-OD2XBMS6.js';
4
- import { useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-J3XDX5HG.js';
1
+ import { createThenOpen, CreateWorkflowRefusalDialog, firstWorkflowProgress, GUIDED_TOUR_STATE, builderPathFor } from './chunk-YBEIPW7J.js';
2
+ import { useExecutions } from './chunk-6CLELP3G.js';
3
+ import { QuotaExhaustedDialog } from './chunk-STCOBJBN.js';
4
+ import { useCreateWorkflow, useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-7IYAPG6P.js';
5
5
  import { workflowsListControls } from './chunk-D3UWK7GY.js';
6
6
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
7
7
  import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
8
- import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton, useFlowStore, SdkPermissionGate, BILLING_PLANS_PATH, isQuotaExhaustedFailure } from './chunk-MR4OTF7D.js';
8
+ import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton, BILLING_PLANS_PATH, useFlowStore, SdkPermissionGate, isQuotaExhaustedFailure } from './chunk-NXHZUXDF.js';
9
9
  import { useTr } from './chunk-UULVIT25.js';
10
- import { useState, useMemo } from 'react';
10
+ import { useState, useRef, useCallback, useMemo } from 'react';
11
11
  import { useNavigate } from 'react-router';
12
12
  import { v4 } from 'uuid';
13
13
  import { Icon } from '@iconify/react';
@@ -16,7 +16,39 @@ import { cn } from '@burdenoff/fe-libs/utils';
16
16
  import { TagBadge } from '@burdenoff/fe-libs/tag';
17
17
  import { toast } from 'sonner';
18
18
  import { Share2, Copy } from 'lucide-react';
19
- import { jsx, jsxs } from 'react/jsx-runtime';
19
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
+
21
+ function useCreateWorkflowFirst(options = {}) {
22
+ const navigate = useNavigate();
23
+ const { createWorkflow } = useCreateWorkflow();
24
+ const [creating, setCreating] = useState(false);
25
+ const [refusal, setRefusal] = useState(null);
26
+ const inFlightRef = useRef(false);
27
+ const { basePath, state } = options;
28
+ const start = useCallback(async () => {
29
+ if (inFlightRef.current) return null;
30
+ inFlightRef.current = true;
31
+ setCreating(true);
32
+ setRefusal(null);
33
+ try {
34
+ const result = await createThenOpen(
35
+ {
36
+ create: createWorkflow,
37
+ navigate: (path, navOptions) => navigate(path, navOptions),
38
+ mintKey: v4
39
+ },
40
+ { basePath, state }
41
+ );
42
+ if (result.status === "refused") setRefusal(result.refusal);
43
+ return result;
44
+ } finally {
45
+ inFlightRef.current = false;
46
+ setCreating(false);
47
+ }
48
+ }, [basePath, createWorkflow, navigate, state]);
49
+ const clearRefusal = useCallback(() => setRefusal(null), []);
50
+ return { start, creating, refusal, clearRefusal };
51
+ }
20
52
 
21
53
  // src/components/share-target.ts
22
54
  var PLACEHOLDER_SEGMENTS = /* @__PURE__ */ new Set(["undefined", "null"]);
@@ -1051,50 +1083,68 @@ function FirstWorkflowChecklistView(props) {
1051
1083
  }
1052
1084
  function useChecklistHandlers() {
1053
1085
  const navigate = useNavigate();
1054
- return useMemo(
1086
+ const createFirst = useCreateWorkflowFirst({ state: GUIDED_TOUR_STATE });
1087
+ const { start } = createFirst;
1088
+ const handlers = useMemo(
1055
1089
  () => ({
1056
- onCreate: () => navigate(`../workflow/${v4()}/v1`, GUIDED_FIRST_WORKFLOW_NAV),
1090
+ onCreate: () => void start(),
1057
1091
  onOpen: (workflow) => navigate(builderPathFor(workflow)),
1058
1092
  onTemplates: () => navigate("../templates")
1059
1093
  }),
1060
- [navigate]
1094
+ [navigate, start]
1061
1095
  );
1096
+ const refusalDialog = /* @__PURE__ */ jsx(
1097
+ CreateWorkflowRefusalDialog,
1098
+ {
1099
+ surface: "builder-create",
1100
+ refusal: createFirst.refusal,
1101
+ onClose: createFirst.clearRefusal,
1102
+ onUpgrade: () => navigate(BILLING_PLANS_PATH)
1103
+ }
1104
+ );
1105
+ return { handlers, refusalDialog };
1062
1106
  }
1063
1107
  function ChecklistWithRuns({
1064
1108
  workflows,
1065
1109
  canCreate
1066
1110
  }) {
1067
1111
  const tr = useTr();
1068
- const handlers = useChecklistHandlers();
1112
+ const { handlers, refusalDialog } = useChecklistHandlers();
1069
1113
  const { total, loading, error } = useExecutions({ limit: 1 });
1070
1114
  const runsTotal = loading || error ? null : total;
1071
1115
  const progress = useMemo(
1072
1116
  () => firstWorkflowProgress(workflows, runsTotal),
1073
1117
  [workflows, runsTotal]
1074
1118
  );
1075
- return /* @__PURE__ */ jsx(
1076
- FirstWorkflowChecklistView,
1077
- {
1078
- progress,
1079
- canCreate,
1080
- tr,
1081
- ...handlers
1082
- }
1083
- );
1119
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1120
+ /* @__PURE__ */ jsx(
1121
+ FirstWorkflowChecklistView,
1122
+ {
1123
+ progress,
1124
+ canCreate,
1125
+ tr,
1126
+ ...handlers
1127
+ }
1128
+ ),
1129
+ refusalDialog
1130
+ ] });
1084
1131
  }
1085
1132
  function ChecklistWithoutWorkflows({ canCreate }) {
1086
1133
  const tr = useTr();
1087
- const handlers = useChecklistHandlers();
1134
+ const { handlers, refusalDialog } = useChecklistHandlers();
1088
1135
  const progress = useMemo(() => firstWorkflowProgress([], 0), []);
1089
- return /* @__PURE__ */ jsx(
1090
- FirstWorkflowChecklistView,
1091
- {
1092
- progress,
1093
- canCreate,
1094
- tr,
1095
- ...handlers
1096
- }
1097
- );
1136
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1137
+ /* @__PURE__ */ jsx(
1138
+ FirstWorkflowChecklistView,
1139
+ {
1140
+ progress,
1141
+ canCreate,
1142
+ tr,
1143
+ ...handlers
1144
+ }
1145
+ ),
1146
+ refusalDialog
1147
+ ] });
1098
1148
  }
1099
1149
  function FirstWorkflowChecklist({
1100
1150
  workflows,
@@ -1226,6 +1276,7 @@ function WorkflowsList() {
1226
1276
  console.error("Unable to export workflow", error2);
1227
1277
  }
1228
1278
  };
1279
+ const createFirst = useCreateWorkflowFirst();
1229
1280
  const createButton = /* @__PURE__ */ jsx(
1230
1281
  SdkPermissionButton,
1231
1282
  {
@@ -1240,7 +1291,9 @@ function WorkflowsList() {
1240
1291
  variant: "default",
1241
1292
  size: "default",
1242
1293
  className: "font-bold text-primary-foreground",
1243
- onClick: () => navigate(`../workflow/${v4()}/v1`, NEW_WORKFLOW_NAV),
1294
+ onClick: () => void createFirst.start(),
1295
+ disabled: createFirst.creating,
1296
+ "aria-busy": createFirst.creating,
1244
1297
  "data-tour": "fluidgrids-list-create",
1245
1298
  children: [
1246
1299
  /* @__PURE__ */ jsx(Icon, { icon: "mynaui:plus", className: "size-5 text-primary-foreground" }),
@@ -1253,214 +1306,225 @@ function WorkflowsList() {
1253
1306
  return (
1254
1307
  // min-h-screen (matching the sibling pages) makes short content still fill
1255
1308
  // the viewport, keeping the shell footer below the fold.
1256
- /* @__PURE__ */ jsx("main", { className: "flex min-h-screen w-full flex-col bg-background-primary", children: /* @__PURE__ */ jsxs(
1257
- "div",
1258
- {
1259
- className: "flex flex-1 flex-col gap-5 p-4 sm:p-6",
1260
- "data-tour": "fluidgrids-list-results",
1261
- children: [
1262
- /* @__PURE__ */ jsxs(
1263
- "div",
1264
- {
1265
- className: "flex flex-wrap items-start justify-between gap-3",
1266
- "data-tour": "fluidgrids-list-header",
1267
- children: [
1268
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1269
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
1270
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold tracking-tight", children: tr("fluidgrids.workflowsList.title", "Workflows") }),
1271
- !loading && !error && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "font-mono", children: workflows.length })
1309
+ /* @__PURE__ */ jsxs("main", { className: "flex min-h-screen w-full flex-col bg-background-primary", children: [
1310
+ /* @__PURE__ */ jsxs(
1311
+ "div",
1312
+ {
1313
+ className: "flex flex-1 flex-col gap-5 p-4 sm:p-6",
1314
+ "data-tour": "fluidgrids-list-results",
1315
+ children: [
1316
+ /* @__PURE__ */ jsxs(
1317
+ "div",
1318
+ {
1319
+ className: "flex flex-wrap items-start justify-between gap-3",
1320
+ "data-tour": "fluidgrids-list-header",
1321
+ children: [
1322
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1323
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
1324
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold tracking-tight", children: tr("fluidgrids.workflowsList.title", "Workflows") }),
1325
+ !loading && !error && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "font-mono", children: workflows.length })
1326
+ ] }),
1327
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: tr(
1328
+ "fluidgrids.workflowsList.subtitle",
1329
+ "Build, run, and manage your automations. Open a workflow to edit it in the visual builder."
1330
+ ) }),
1331
+ /* @__PURE__ */ jsx(FluidGridsDocsLink, { topic: "workflows", className: "mt-1" })
1272
1332
  ] }),
1273
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: tr(
1274
- "fluidgrids.workflowsList.subtitle",
1275
- "Build, run, and manage your automations. Open a workflow to edit it in the visual builder."
1276
- ) }),
1277
- /* @__PURE__ */ jsx(FluidGridsDocsLink, { topic: "workflows", className: "mt-1" })
1278
- ] }),
1279
- createButton,
1280
- /* @__PURE__ */ jsx(WorkflowImportDialog, { onImported: () => void refetch() })
1281
- ]
1282
- }
1283
- ),
1284
- !loading && !error && /* @__PURE__ */ jsx(FirstWorkflowChecklist, { workflows, canCreate }),
1285
- !loading && !error && workflows.length > 0 && /* @__PURE__ */ jsxs(
1286
- "div",
1287
- {
1288
- className: "flex flex-wrap items-center gap-3",
1289
- "data-tour": "fluidgrids-list-toolbar",
1290
- children: [
1291
- /* @__PURE__ */ jsxs("div", { className: "relative w-full max-w-xs", children: [
1292
- /* @__PURE__ */ jsx(
1293
- Icon,
1294
- {
1295
- icon: "mynaui:search",
1296
- className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
1297
- }
1298
- ),
1299
- /* @__PURE__ */ jsx(
1300
- Input,
1301
- {
1302
- value: search,
1303
- onChange: (e) => setSearch(e.target.value),
1304
- placeholder: tr(
1305
- "fluidgrids.workflowsList.searchPlaceholder",
1306
- "Search workflows\u2026"
1307
- ),
1308
- "aria-label": tr(
1309
- "fluidgrids.workflowsList.searchAriaLabel",
1310
- "Search workflows"
1311
- ),
1312
- className: "pl-8"
1313
- }
1314
- )
1315
- ] }),
1316
- presentStatuses.length > 1 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1317
- /* @__PURE__ */ jsx(
1318
- "button",
1319
- {
1320
- type: "button",
1321
- onClick: () => setStatusFilter(null),
1322
- className: cn(
1323
- "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1324
- statusFilter === null ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1325
- ),
1326
- children: tr("fluidgrids.workflowsList.statusFilterAll", "All")
1327
- }
1328
- ),
1329
- presentStatuses.map((s) => /* @__PURE__ */ jsx(
1330
- "button",
1331
- {
1332
- type: "button",
1333
- onClick: () => setStatusFilter(
1334
- (cur) => cur === s.value ? null : s.value
1335
- ),
1336
- className: cn(
1337
- "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1338
- statusFilter === s.value ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1339
- ),
1340
- children: s.label
1341
- },
1342
- s.value
1343
- ))
1344
- ] }),
1345
- presentTags.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1346
- /* @__PURE__ */ jsx(
1347
- Icon,
1348
- {
1349
- icon: "mdi:tag-outline",
1350
- className: "size-4 text-muted-foreground",
1351
- "aria-hidden": "true"
1352
- }
1353
- ),
1354
- presentTags.map((t) => /* @__PURE__ */ jsx(
1355
- "button",
1356
- {
1357
- type: "button",
1358
- onClick: () => setTagFilter((cur) => cur === t.id ? null : t.id),
1359
- className: cn(
1360
- "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1361
- tagFilter === t.id ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1362
- ),
1363
- children: t.label
1364
- },
1365
- t.id
1366
- ))
1367
- ] })
1368
- ]
1369
- }
1370
- ),
1371
- loading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx(SkeletonCard, {}, i)) }) : error ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-md flex-col items-center gap-3 rounded-xl border border-border bg-card p-8 text-center", children: [
1372
- /* @__PURE__ */ jsx(
1373
- Icon,
1333
+ createButton,
1334
+ /* @__PURE__ */ jsx(WorkflowImportDialog, { onImported: () => void refetch() })
1335
+ ]
1336
+ }
1337
+ ),
1338
+ !loading && !error && /* @__PURE__ */ jsx(FirstWorkflowChecklist, { workflows, canCreate }),
1339
+ !loading && !error && workflows.length > 0 && /* @__PURE__ */ jsxs(
1340
+ "div",
1374
1341
  {
1375
- icon: "mynaui:danger-triangle",
1376
- className: "size-8 text-destructive"
1342
+ className: "flex flex-wrap items-center gap-3",
1343
+ "data-tour": "fluidgrids-list-toolbar",
1344
+ children: [
1345
+ /* @__PURE__ */ jsxs("div", { className: "relative w-full max-w-xs", children: [
1346
+ /* @__PURE__ */ jsx(
1347
+ Icon,
1348
+ {
1349
+ icon: "mynaui:search",
1350
+ className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
1351
+ }
1352
+ ),
1353
+ /* @__PURE__ */ jsx(
1354
+ Input,
1355
+ {
1356
+ value: search,
1357
+ onChange: (e) => setSearch(e.target.value),
1358
+ placeholder: tr(
1359
+ "fluidgrids.workflowsList.searchPlaceholder",
1360
+ "Search workflows\u2026"
1361
+ ),
1362
+ "aria-label": tr(
1363
+ "fluidgrids.workflowsList.searchAriaLabel",
1364
+ "Search workflows"
1365
+ ),
1366
+ className: "pl-8"
1367
+ }
1368
+ )
1369
+ ] }),
1370
+ presentStatuses.length > 1 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1371
+ /* @__PURE__ */ jsx(
1372
+ "button",
1373
+ {
1374
+ type: "button",
1375
+ onClick: () => setStatusFilter(null),
1376
+ className: cn(
1377
+ "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1378
+ statusFilter === null ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1379
+ ),
1380
+ children: tr("fluidgrids.workflowsList.statusFilterAll", "All")
1381
+ }
1382
+ ),
1383
+ presentStatuses.map((s) => /* @__PURE__ */ jsx(
1384
+ "button",
1385
+ {
1386
+ type: "button",
1387
+ onClick: () => setStatusFilter(
1388
+ (cur) => cur === s.value ? null : s.value
1389
+ ),
1390
+ className: cn(
1391
+ "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1392
+ statusFilter === s.value ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1393
+ ),
1394
+ children: s.label
1395
+ },
1396
+ s.value
1397
+ ))
1398
+ ] }),
1399
+ presentTags.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1400
+ /* @__PURE__ */ jsx(
1401
+ Icon,
1402
+ {
1403
+ icon: "mdi:tag-outline",
1404
+ className: "size-4 text-muted-foreground",
1405
+ "aria-hidden": "true"
1406
+ }
1407
+ ),
1408
+ presentTags.map((t) => /* @__PURE__ */ jsx(
1409
+ "button",
1410
+ {
1411
+ type: "button",
1412
+ onClick: () => setTagFilter((cur) => cur === t.id ? null : t.id),
1413
+ className: cn(
1414
+ "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
1415
+ tagFilter === t.id ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
1416
+ ),
1417
+ children: t.label
1418
+ },
1419
+ t.id
1420
+ ))
1421
+ ] })
1422
+ ]
1377
1423
  }
1378
1424
  ),
1379
- /* @__PURE__ */ jsxs("div", { children: [
1380
- /* @__PURE__ */ jsx("p", { className: "font-semibold", children: tr(
1381
- "fluidgrids.workflowsList.loadErrorTitle",
1382
- "Couldn't load workflows"
1383
- ) }),
1384
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: error.message })
1385
- ] }),
1386
- /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: () => refetch(), children: [
1387
- /* @__PURE__ */ jsx(Icon, { icon: "mynaui:refresh", className: "size-4" }),
1388
- tr("fluidgrids.workflowsList.tryAgainButton", "Try again")
1389
- ] })
1390
- ] }) }) : workflows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsx(
1391
- IllustratedEmptyState,
1392
- {
1393
- illustration: "onboarding",
1394
- title: tr(
1395
- "fluidgrids.workflowsList.emptyStateTitle",
1396
- "Create your first workflow"
1397
- ),
1398
- description: tr(
1399
- "fluidgrids.workflowsList.emptyStateDescription",
1400
- "Workflows automate multi-step processes \u2014 sync signups into your CRM, post alerts to Slack, or transform data between apps. Start from a blank canvas or a template."
1425
+ loading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx(SkeletonCard, {}, i)) }) : error ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-md flex-col items-center gap-3 rounded-xl border border-border bg-card p-8 text-center", children: [
1426
+ /* @__PURE__ */ jsx(
1427
+ Icon,
1428
+ {
1429
+ icon: "mynaui:danger-triangle",
1430
+ className: "size-8 text-destructive"
1431
+ }
1401
1432
  ),
1402
- action: createButton
1403
- }
1404
- ) }) : filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
1405
- /* @__PURE__ */ jsx(
1406
- Icon,
1433
+ /* @__PURE__ */ jsxs("div", { children: [
1434
+ /* @__PURE__ */ jsx("p", { className: "font-semibold", children: tr(
1435
+ "fluidgrids.workflowsList.loadErrorTitle",
1436
+ "Couldn't load workflows"
1437
+ ) }),
1438
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: error.message })
1439
+ ] }),
1440
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: () => refetch(), children: [
1441
+ /* @__PURE__ */ jsx(Icon, { icon: "mynaui:refresh", className: "size-4" }),
1442
+ tr("fluidgrids.workflowsList.tryAgainButton", "Try again")
1443
+ ] })
1444
+ ] }) }) : workflows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsx(
1445
+ IllustratedEmptyState,
1407
1446
  {
1408
- icon: "mynaui:search",
1409
- className: "size-8 text-muted-foreground"
1447
+ illustration: "onboarding",
1448
+ title: tr(
1449
+ "fluidgrids.workflowsList.emptyStateTitle",
1450
+ "Create your first workflow"
1451
+ ),
1452
+ description: tr(
1453
+ "fluidgrids.workflowsList.emptyStateDescription",
1454
+ "Workflows automate multi-step processes \u2014 sync signups into your CRM, post alerts to Slack, or transform data between apps. Start from a blank canvas or a template."
1455
+ ),
1456
+ action: createButton
1410
1457
  }
1411
- ),
1412
- /* @__PURE__ */ jsx("p", { className: "font-medium", children: tr(
1413
- "fluidgrids.workflowsList.noFilterMatchTitle",
1414
- "No workflows match your filters"
1415
- ) }),
1416
- /* @__PURE__ */ jsx(
1417
- Button,
1458
+ ) }) : filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "grid flex-1 place-items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
1459
+ /* @__PURE__ */ jsx(
1460
+ Icon,
1461
+ {
1462
+ icon: "mynaui:search",
1463
+ className: "size-8 text-muted-foreground"
1464
+ }
1465
+ ),
1466
+ /* @__PURE__ */ jsx("p", { className: "font-medium", children: tr(
1467
+ "fluidgrids.workflowsList.noFilterMatchTitle",
1468
+ "No workflows match your filters"
1469
+ ) }),
1470
+ /* @__PURE__ */ jsx(
1471
+ Button,
1472
+ {
1473
+ variant: "outline",
1474
+ size: "sm",
1475
+ onClick: () => {
1476
+ setSearch("");
1477
+ setStatusFilter(null);
1478
+ setTagFilter(null);
1479
+ },
1480
+ children: tr(
1481
+ "fluidgrids.workflowsList.clearFiltersButton",
1482
+ "Clear filters"
1483
+ )
1484
+ }
1485
+ )
1486
+ ] }) }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4", children: filtered.map((workflow) => /* @__PURE__ */ jsx(
1487
+ CardWorkflow,
1418
1488
  {
1419
- variant: "outline",
1420
- size: "sm",
1421
- onClick: () => {
1422
- setSearch("");
1423
- setStatusFilter(null);
1424
- setTagFilter(null);
1489
+ workflow: {
1490
+ id: workflow.id,
1491
+ workflow_key: workflow.workflowKey,
1492
+ version: workflow.version,
1493
+ name: workflow.name,
1494
+ description: workflow.description ?? void 0,
1495
+ status: workflow.status ?? void 0,
1496
+ alias: workflow.alias ?? void 0,
1497
+ updated_at: workflow.updatedAt ?? void 0,
1498
+ created_at: workflow.createdAt ?? void 0,
1499
+ total_versions: workflow.totalVersions ?? void 0,
1500
+ tags: (tagsByKey[workflow.workflowKey] ?? []).map((a) => ({
1501
+ id: a.tagId,
1502
+ label: a.tagInfo?.label ?? a.tagInfo?.key ?? tr(
1503
+ "fluidgrids.workflowsList.cardTagFallbackLabel",
1504
+ "Tag"
1505
+ ),
1506
+ color: a.tagInfo?.color ?? void 0
1507
+ }))
1425
1508
  },
1426
- children: tr(
1427
- "fluidgrids.workflowsList.clearFiltersButton",
1428
- "Clear filters"
1429
- )
1430
- }
1431
- )
1432
- ] }) }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4", children: filtered.map((workflow) => /* @__PURE__ */ jsx(
1433
- CardWorkflow,
1434
- {
1435
- workflow: {
1436
- id: workflow.id,
1437
- workflow_key: workflow.workflowKey,
1438
- version: workflow.version,
1439
- name: workflow.name,
1440
- description: workflow.description ?? void 0,
1441
- status: workflow.status ?? void 0,
1442
- alias: workflow.alias ?? void 0,
1443
- updated_at: workflow.updatedAt ?? void 0,
1444
- created_at: workflow.createdAt ?? void 0,
1445
- total_versions: workflow.totalVersions ?? void 0,
1446
- tags: (tagsByKey[workflow.workflowKey] ?? []).map((a) => ({
1447
- id: a.tagId,
1448
- label: a.tagInfo?.label ?? a.tagInfo?.key ?? tr(
1449
- "fluidgrids.workflowsList.cardTagFallbackLabel",
1450
- "Tag"
1451
- ),
1452
- color: a.tagInfo?.color ?? void 0
1453
- }))
1509
+ onUpdateSuccess: () => refetch(),
1510
+ onExport: () => void handleExport(workflow.id)
1454
1511
  },
1455
- onUpdateSuccess: () => refetch(),
1456
- onExport: () => void handleExport(workflow.id)
1457
- },
1458
- workflow.id
1459
- )) })
1460
- ]
1461
- }
1462
- ) })
1512
+ workflow.id
1513
+ )) })
1514
+ ]
1515
+ }
1516
+ ),
1517
+ /* @__PURE__ */ jsx(
1518
+ CreateWorkflowRefusalDialog,
1519
+ {
1520
+ surface: "builder-create",
1521
+ refusal: createFirst.refusal,
1522
+ onClose: createFirst.clearRefusal,
1523
+ onUpgrade: () => navigate(BILLING_PLANS_PATH)
1524
+ }
1525
+ )
1526
+ ] })
1463
1527
  );
1464
1528
  }
1465
1529
 
1466
- export { FirstWorkflowChecklist, FirstWorkflowChecklistView, WorkflowsList };
1530
+ export { FirstWorkflowChecklist, FirstWorkflowChecklistView, WorkflowsList, useCreateWorkflowFirst };
@@ -1,4 +1,4 @@
1
- import { useWorkflowDefinitions } from './chunk-J3XDX5HG.js';
1
+ import { useWorkflowDefinitions } from './chunk-7IYAPG6P.js';
2
2
  import { historyControls } from './chunk-D3UWK7GY.js';
3
3
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
4
4
  import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
@@ -1,4 +1,4 @@
1
- import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-NJZAWUGC.js';
1
+ import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-XXAVXVBW.js';
2
2
  import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
3
3
  import { useState, useRef, useEffect, useCallback } from 'react';
4
4
  import { TagBadge, TagsWidget } from '@burdenoff/fe-libs/tag';
@@ -1,4 +1,4 @@
1
- import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-CZURRUDX.js';
1
+ import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-GD7CSKFD.js';
2
2
  import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
3
3
  import { useState, useCallback, useEffect } from 'react';
4
4