@burdenoff/fluidgrids-fe-sdk 2026.923.8 → 2026.924.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.
@@ -12015,8 +12015,8 @@ function DesktopSidebarFragment({
12015
12015
  }
12016
12016
  const { getFluidGridsClient: getFluidGridsClient2 } = await import('./client-AMUUS7VE.js');
12017
12017
  const { getFluidGridsConfig: getFluidGridsConfig2 } = await import('./config-5UMLMALY.js');
12018
- const { gql: gql10 } = await import('@apollo/client/core');
12019
- const IMPORT_MUTATION = gql10`
12018
+ const { gql: gql11 } = await import('@apollo/client/core');
12019
+ const IMPORT_MUTATION = gql11`
12020
12020
  mutation ImportWorkflowTemplate(
12021
12021
  $input: ImportWorkflowTemplateInput!
12022
12022
  ) {
@@ -12162,8 +12162,8 @@ function DesktopSidebarFragment({
12162
12162
  { id: "template-load" }
12163
12163
  );
12164
12164
  const { getGlobalStoreClient: getGlobalStoreClient2 } = await import('./global-client-OW43ZRDR.js');
12165
- const { gql: gql10 } = await import('@apollo/client/core');
12166
- const GET_TEMPLATE_DETAIL = gql10`
12165
+ const { gql: gql11 } = await import('@apollo/client/core');
12166
+ const GET_TEMPLATE_DETAIL = gql11`
12167
12167
  query GetWorkflowTemplateDetail($id: ID!) {
12168
12168
  product(id: $id) {
12169
12169
  id
@@ -22339,6 +22339,161 @@ function WebhookUrlField({ webhookUrl, loading }) {
22339
22339
  ) })
22340
22340
  ] });
22341
22341
  }
22342
+ var LIST_WORKFLOWS_QUERY = gql`
22343
+ query ListWorkflowDefinitionsForPicker($limit: Int, $offset: Int) {
22344
+ workflowDefinitions(input: { limit: $limit, offset: $offset }) {
22345
+ items {
22346
+ id
22347
+ workflowKey
22348
+ name
22349
+ version
22350
+ status
22351
+ }
22352
+ }
22353
+ }
22354
+ `;
22355
+ function WorkflowPickerField({
22356
+ value,
22357
+ onChange,
22358
+ testId
22359
+ }) {
22360
+ const tr = useTr();
22361
+ const [workflows, setWorkflows] = useState([]);
22362
+ const [loading, setLoading] = useState(false);
22363
+ const [failed, setFailed] = useState(false);
22364
+ const [search, setSearch] = useState("");
22365
+ const [open, setOpen] = useState(false);
22366
+ const load = useCallback(async () => {
22367
+ const client = getFluidGridsClient();
22368
+ if (!client) {
22369
+ setFailed(true);
22370
+ return;
22371
+ }
22372
+ setLoading(true);
22373
+ try {
22374
+ const result = await client.query({
22375
+ query: LIST_WORKFLOWS_QUERY,
22376
+ variables: { limit: 200, offset: 0 },
22377
+ fetchPolicy: "cache-first"
22378
+ });
22379
+ const data = result.data;
22380
+ setWorkflows(
22381
+ (data?.workflowDefinitions?.items ?? []).map((w) => ({
22382
+ workflowKey: w.workflowKey,
22383
+ name: w.name || w.workflowKey,
22384
+ version: w.version,
22385
+ status: w.status
22386
+ }))
22387
+ );
22388
+ setFailed(false);
22389
+ } catch {
22390
+ setFailed(true);
22391
+ } finally {
22392
+ setLoading(false);
22393
+ }
22394
+ }, []);
22395
+ useEffect(() => {
22396
+ void load();
22397
+ }, [load]);
22398
+ const byKey = /* @__PURE__ */ new Map();
22399
+ for (const workflow of workflows) {
22400
+ const existing = byKey.get(workflow.workflowKey);
22401
+ if (!existing || workflow.status === "ACTIVE" && existing.status !== "ACTIVE") {
22402
+ byKey.set(workflow.workflowKey, workflow);
22403
+ }
22404
+ }
22405
+ const options = [...byKey.values()].filter((w) => {
22406
+ const needle = search.trim().toLowerCase();
22407
+ if (!needle) return true;
22408
+ return w.name.toLowerCase().includes(needle) || w.workflowKey.toLowerCase().includes(needle);
22409
+ });
22410
+ const selected = byKey.get(value);
22411
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", "data-testid": testId, children: [
22412
+ /* @__PURE__ */ jsxs(
22413
+ "button",
22414
+ {
22415
+ type: "button",
22416
+ onClick: () => setOpen((o) => !o),
22417
+ className: "flex items-center justify-between gap-2 rounded-md border border-input bg-background px-2.5 py-1.5 text-left text-sm outline-none transition-colors hover:border-primary",
22418
+ children: [
22419
+ /* @__PURE__ */ jsx("span", { className: cn("truncate", !value && "text-muted-foreground"), children: selected ? `${selected.name} (${selected.workflowKey.slice(0, 8)}\u2026)` : value || tr(
22420
+ "fluidgrids.builder.workflowPicker.placeholder",
22421
+ "Select a workflow to call"
22422
+ ) }),
22423
+ /* @__PURE__ */ jsx(
22424
+ Icon,
22425
+ {
22426
+ icon: open ? "mdi:chevron-up" : "mdi:chevron-down",
22427
+ className: "h-4 w-4 shrink-0 text-muted-foreground"
22428
+ }
22429
+ )
22430
+ ]
22431
+ }
22432
+ ),
22433
+ open && /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border bg-background p-2", children: [
22434
+ /* @__PURE__ */ jsx(
22435
+ "input",
22436
+ {
22437
+ autoFocus: true,
22438
+ value: search,
22439
+ onChange: (e) => setSearch(e.target.value),
22440
+ placeholder: tr(
22441
+ "fluidgrids.builder.workflowPicker.search",
22442
+ "Search workflows"
22443
+ ),
22444
+ className: "mb-2 w-full rounded-md border border-input bg-background px-2 py-1 text-sm outline-none focus:border-primary"
22445
+ }
22446
+ ),
22447
+ loading && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-xs text-muted-foreground", children: tr("fluidgrids.builder.workflowPicker.loading", "Loading\u2026") }),
22448
+ !loading && options.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-xs text-muted-foreground", children: failed ? tr(
22449
+ "fluidgrids.builder.workflowPicker.failed",
22450
+ "Could not load workflows \u2014 enter a workflow key below."
22451
+ ) : tr(
22452
+ "fluidgrids.builder.workflowPicker.empty",
22453
+ "No workflows found"
22454
+ ) }),
22455
+ /* @__PURE__ */ jsx("div", { className: "max-h-48 overflow-y-auto", children: options.map((workflow) => /* @__PURE__ */ jsxs(
22456
+ "button",
22457
+ {
22458
+ type: "button",
22459
+ onClick: () => {
22460
+ onChange(workflow.workflowKey);
22461
+ setOpen(false);
22462
+ setSearch("");
22463
+ },
22464
+ className: cn(
22465
+ "flex w-full flex-col items-start gap-0.5 rounded px-2 py-1.5 text-left hover:bg-muted",
22466
+ workflow.workflowKey === value && "bg-muted"
22467
+ ),
22468
+ children: [
22469
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: workflow.name }),
22470
+ /* @__PURE__ */ jsxs("span", { className: "font-mono text-[10px] text-muted-foreground", children: [
22471
+ workflow.workflowKey,
22472
+ " \xB7 v",
22473
+ workflow.version,
22474
+ " \xB7",
22475
+ " ",
22476
+ workflow.status
22477
+ ] })
22478
+ ]
22479
+ },
22480
+ workflow.workflowKey
22481
+ )) })
22482
+ ] }),
22483
+ /* @__PURE__ */ jsx(
22484
+ "input",
22485
+ {
22486
+ value,
22487
+ onChange: (e) => onChange(e.target.value),
22488
+ placeholder: tr(
22489
+ "fluidgrids.builder.workflowPicker.manual",
22490
+ "\u2026or paste a workflow key"
22491
+ ),
22492
+ className: "w-full rounded-md border border-input bg-background px-2.5 py-1.5 font-mono text-xs outline-none focus:border-primary"
22493
+ }
22494
+ )
22495
+ ] });
22496
+ }
22342
22497
  var LOAD_NODE_OPTIONS = gql`
22343
22498
  query LoadNodeOptions(
22344
22499
  $nodeType: String!
@@ -23023,6 +23178,26 @@ function NodeParamsForm({
23023
23178
  )
23024
23179
  ] }, p.name);
23025
23180
  }
23181
+ if (p.type === "workflow" || nodeType === "internal:subworkflow" && p.name === "workflowKey") {
23182
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
23183
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
23184
+ /* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-foreground", children: tr(
23185
+ "fluidgrids.builder.nodeParamsForm.workflowLabel",
23186
+ "Workflow to call"
23187
+ ) }),
23188
+ p.required && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
23189
+ ] }),
23190
+ /* @__PURE__ */ jsx(
23191
+ WorkflowPickerField,
23192
+ {
23193
+ value: typeof argsState[p.name] === "string" ? argsState[p.name] : "",
23194
+ onChange: (workflowKey) => writeFixed(p.name, workflowKey),
23195
+ testId: `${testIdPrefix}-workflow-picker`
23196
+ }
23197
+ ),
23198
+ p.description && /* @__PURE__ */ jsx("span", { className: "text-[11px] leading-snug text-muted-foreground", children: p.description })
23199
+ ] }, p.name);
23200
+ }
23026
23201
  const mode = modeByField[p.name] ?? (mapping[p.name] !== void 0 ? "expression" : "fixed");
23027
23202
  const exprValue = mapping[p.name] ?? "";
23028
23203
  const fixedValue = argsState[p.name];
@@ -25817,5 +25992,5 @@ var FlowBuilderPage = ({
25817
25992
  };
25818
25993
 
25819
25994
  export { Card2 as Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ConnectionFormDialog, ConnectionSelector, EntityTagPicker, FLUIDGRIDS_ENTITY_TYPES, FlowBuilderPage, FluidGridsProvider, ProviderPicker, SchemaConnectionForm, ScopePicker, TemplateCard, buildNodeCheck, buildRequiredNodeTypes, listCustomBlocks, mergeStickyNotes, refetchStoreNodes, registerCustomBlock, resolveUiSpec, stripSubmitActions, tagLabel, useAvailableTags, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useCreateTag, useDraftEntityTags, useEntityTags, useFluidGridsContext, useImportWorkflowTemplate, useInitiateOAuth, useInstalledNodes, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useReplaceEntityTags, useSearchTags, useTagEntity, useUntagEntity, useWorkflowTemplates };
25820
- //# sourceMappingURL=chunk-LETX2CLF.js.map
25821
- //# sourceMappingURL=chunk-LETX2CLF.js.map
25995
+ //# sourceMappingURL=chunk-E2G2YSD2.js.map
25996
+ //# sourceMappingURL=chunk-E2G2YSD2.js.map