@burdenoff/fluidgrids-fe-sdk 2026.629.1 → 2026.701.2

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.
@@ -7315,7 +7315,91 @@ function NodePropertyPanel({
7315
7315
  ),
7316
7316
  [operationsArray, data?.operation_name]
7317
7317
  );
7318
- const connectionAdapters = currentOperation?.connectionAdapters || currentOperation?.credentialAdapters || data?.nodeData?.connectionAdapters || data?.nodeData?.credentialAdapters || [];
7318
+ const effectiveCurrentOperation = useMemo(() => {
7319
+ const nodeType = String(type);
7320
+ if (nodeType === "store/bigconsole_datasink" && currentOperation?.name === "postDataToDataSink") {
7321
+ return {
7322
+ ...currentOperation,
7323
+ // Force the DataSink-key card below to win even if an older registry
7324
+ // manifest already has a block-based `ui` declaration. resolveUiSpec()
7325
+ // prefers `ui` over `adaptive_card`, so leaving it in place would keep
7326
+ // rendering the stale connection-oriented form.
7327
+ ui: void 0,
7328
+ description: "Push data to a BigConsole DataSink. Data is taken from the previous node's output; choose the target DataSink key and the BigConsole connection is handled automatically.",
7329
+ input_fields: {
7330
+ ...currentOperation.input_fields,
7331
+ dataSinkKey: {
7332
+ type: "string",
7333
+ required: true,
7334
+ description: "Target DataSink key. The workflow writes directly to this DataSink and auto-links on first run."
7335
+ }
7336
+ },
7337
+ adaptive_card: {
7338
+ type: "AdaptiveCard",
7339
+ version: "1.5",
7340
+ body: [
7341
+ {
7342
+ type: "TextBlock",
7343
+ text: "Send Data to BigConsole DataSink",
7344
+ weight: "bolder",
7345
+ size: "medium"
7346
+ },
7347
+ {
7348
+ type: "TextBlock",
7349
+ text: "Choose the DataSink key. Data is taken automatically from the previous node, and the BigConsole connection is handled automatically.",
7350
+ wrap: true,
7351
+ size: "small",
7352
+ isSubtle: true
7353
+ },
7354
+ {
7355
+ type: "Input.Text",
7356
+ placeholder: "Target DataSink key (e.g., users_analytics)",
7357
+ id: "args.state.dataSinkKey",
7358
+ label: "DataSink Key",
7359
+ isRequired: true,
7360
+ value: "${dataSinkKey}"
7361
+ },
7362
+ {
7363
+ type: "ActionSet",
7364
+ actions: [
7365
+ {
7366
+ type: "Action.Submit",
7367
+ title: "Save Configuration"
7368
+ }
7369
+ ]
7370
+ }
7371
+ ],
7372
+ defaultValue: { dataSinkKey: "" }
7373
+ }
7374
+ };
7375
+ }
7376
+ return currentOperation;
7377
+ }, [currentOperation, type]);
7378
+ const connectionAdapters = useMemo(
7379
+ () => effectiveCurrentOperation?.connectionAdapters || effectiveCurrentOperation?.credentialAdapters || data?.nodeData?.connectionAdapters || data?.nodeData?.credentialAdapters || [],
7380
+ [
7381
+ effectiveCurrentOperation?.connectionAdapters,
7382
+ effectiveCurrentOperation?.credentialAdapters,
7383
+ data?.nodeData?.connectionAdapters,
7384
+ data?.nodeData?.credentialAdapters
7385
+ ]
7386
+ );
7387
+ const isAutoManagedAdapter = useCallback(
7388
+ (adapter) => {
7389
+ const nodeType = String(type);
7390
+ const isBigConsoleDataSinkAutoAdapter = nodeType === "store/bigconsole_datasink" && adapter.name === "bigconsole" && adapter.provider === "bigconsole";
7391
+ return isBigConsoleDataSinkAutoAdapter || adapter.mode === "auto" || adapter.autoProvision === true || adapter.autoManaged === true || adapter.hidden === true;
7392
+ },
7393
+ [type]
7394
+ );
7395
+ const visibleConnectionAdapters = useMemo(
7396
+ () => connectionAdapters.filter((adapter) => !isAutoManagedAdapter(adapter)),
7397
+ [connectionAdapters, isAutoManagedAdapter]
7398
+ );
7399
+ const hasAutoManagedConnections = useMemo(
7400
+ () => connectionAdapters.some(isAutoManagedAdapter),
7401
+ [connectionAdapters, isAutoManagedAdapter]
7402
+ );
7319
7403
  const selectedConnections = useMemo(() => {
7320
7404
  if (data?.args?.connections && data.args.connections.length > 0) {
7321
7405
  return data.args.connections.map((conn) => ({
@@ -7369,8 +7453,8 @@ function NodePropertyPanel({
7369
7453
  });
7370
7454
  };
7371
7455
  const resolvedUi = useMemo(
7372
- () => resolveUiSpec(currentOperation),
7373
- [currentOperation]
7456
+ () => resolveUiSpec(effectiveCurrentOperation),
7457
+ [effectiveCurrentOperation]
7374
7458
  );
7375
7459
  const sampleData2 = useMemo(() => {
7376
7460
  return data?.args?.state ?? {};
@@ -7421,18 +7505,25 @@ function NodePropertyPanel({
7421
7505
  }, [searchTerm, scheduledJobs]);
7422
7506
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4.5 p-4", children: [
7423
7507
  /* @__PURE__ */ jsx("div", { className: "text-xs text-card-foreground/20 self-end ", children: id }),
7424
- connectionAdapters.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7508
+ visibleConnectionAdapters.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7425
7509
  /* @__PURE__ */ jsx("div", { className: "text-xs text-card-foreground/60 font-semibold", children: "Connections" }),
7426
7510
  /* @__PURE__ */ jsx(
7427
7511
  ConnectionSelector,
7428
7512
  {
7429
- adapters: connectionAdapters,
7513
+ adapters: visibleConnectionAdapters,
7430
7514
  selectedConnections,
7431
7515
  onChange: handleConnectionsChange,
7432
7516
  compact: true
7433
7517
  }
7434
7518
  )
7435
7519
  ] }),
7520
+ hasAutoManagedConnections && visibleConnectionAdapters.length === 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground", children: [
7521
+ /* @__PURE__ */ jsx(Icon, { icon: "mdi:shield-check", className: "mt-0.5 h-4 w-4 shrink-0" }),
7522
+ /* @__PURE__ */ jsxs("div", { children: [
7523
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-card-foreground", children: "Connection handled automatically" }),
7524
+ /* @__PURE__ */ jsx("div", { children: "This node uses the workspace BigConsole app connection at run time. You only need to configure the DataSink target below." })
7525
+ ] })
7526
+ ] }),
7436
7527
  /* @__PURE__ */ jsxs("div", { className: "flex pt-5 flex-col", children: [
7437
7528
  /* @__PURE__ */ jsx("div", { className: "text-xs text-card-foreground/60 font-semibold", children: "Properties" }),
7438
7529
  resolvedUi ? /* @__PURE__ */ jsx(
@@ -20761,6 +20852,46 @@ function NodeDetailView() {
20761
20852
  const args = asRecord(data?.args);
20762
20853
  return asRecord(args?.state) ?? {};
20763
20854
  }, [node]);
20855
+ const connectionAdapters = useMemo(() => {
20856
+ const op = asRecord(currentOp);
20857
+ const manifest = asRecord(asRecord(node?.data)?.nodeData);
20858
+ const raw = op?.connectionAdapters ?? op?.credentialAdapters ?? manifest?.connectionAdapters ?? manifest?.credentialAdapters;
20859
+ if (!Array.isArray(raw)) return [];
20860
+ return raw.map((a) => asRecord(a)).filter((a) => !!a).map((a) => ({
20861
+ name: String(a.name ?? ""),
20862
+ provider: String(a.provider ?? "")
20863
+ })).filter((a) => a.name && a.provider);
20864
+ }, [currentOp, node]);
20865
+ const selectedConnections = useMemo(() => {
20866
+ const args = asRecord(asRecord(node?.data)?.args);
20867
+ const fromList = (list, idKey) => {
20868
+ if (!Array.isArray(list)) return [];
20869
+ return list.map((c) => asRecord(c)).filter((c) => !!c).map((c) => ({
20870
+ connectionId: String(c[idKey] ?? ""),
20871
+ adapter: String(c.adapter ?? "")
20872
+ })).filter((c) => c.connectionId);
20873
+ };
20874
+ const connections = fromList(args?.connections, "connectionId");
20875
+ if (connections.length > 0) return connections;
20876
+ return fromList(args?.credentials, "id");
20877
+ }, [node]);
20878
+ const handleConnectionsChange = (connections) => {
20879
+ if (!ndv) return;
20880
+ const store = useFlowStore.getState();
20881
+ const next = store.workflow.nodes.map((n) => {
20882
+ if (n.id !== ndv.nodeId) return n;
20883
+ const data = { ...asRecord(n.data) ?? {} };
20884
+ const args = { ...asRecord(data.args) ?? {} };
20885
+ delete args.credentials;
20886
+ args.connections = connections.map((c) => ({
20887
+ connectionId: c.connectionId,
20888
+ adapter: c.adapter
20889
+ }));
20890
+ data.args = args;
20891
+ return { ...n, data };
20892
+ });
20893
+ store.actions.nodes.setNodes(next);
20894
+ };
20764
20895
  const writeMapping = (field, value) => {
20765
20896
  if (!currentEdge) return;
20766
20897
  const store = useFlowStore.getState();
@@ -20949,6 +21080,18 @@ function NodeDetailView() {
20949
21080
  className: "min-h-0 flex-1 space-y-4 overflow-auto p-4",
20950
21081
  "data-testid": "ndv-params",
20951
21082
  children: [
21083
+ connectionAdapters.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", "data-testid": "ndv-connections", children: [
21084
+ /* @__PURE__ */ jsx("div", { className: SECTION_LABEL, children: "Connections" }),
21085
+ /* @__PURE__ */ jsx(
21086
+ ConnectionSelector,
21087
+ {
21088
+ adapters: connectionAdapters,
21089
+ selectedConnections,
21090
+ onChange: handleConnectionsChange,
21091
+ compact: true
21092
+ }
21093
+ )
21094
+ ] }),
20952
21095
  !currentEdge && /* @__PURE__ */ jsx("div", { className: "rounded-md border border-dashed border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: "No upstream node connected \u2014 set fixed values below, or connect a node to map fields with expressions." }),
20953
21096
  params.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-xs text-muted-foreground", children: "This operation has no input parameters." }) : params.map((p) => {
20954
21097
  const mode = modeByField[p.name] ?? (mapping[p.name] !== void 0 ? "expression" : "fixed");
@@ -21555,8 +21698,10 @@ var FlowBuilder = () => {
21555
21698
  Button,
21556
21699
  {
21557
21700
  onClick: () => {
21558
- navigate(`../runs/${id}`);
21701
+ if (!id) return;
21702
+ navigate(`../runs?workflowKey=${encodeURIComponent(id)}`);
21559
21703
  },
21704
+ disabled: !id,
21560
21705
  variant: "outline",
21561
21706
  size: "sm",
21562
21707
  className: "flex gap-4",
@@ -21708,7 +21853,7 @@ var FlowBuilderPage = ({
21708
21853
  }
21709
21854
  return /* @__PURE__ */ jsxs(ReactFlowProvider, { children: [
21710
21855
  /* @__PURE__ */ jsx(IntegrationReturnHandler, {}),
21711
- /* @__PURE__ */ jsx("div", { className: "flex flex-col h-full", children: /* @__PURE__ */ jsxs("div", { className: "flex grow divide-x divide-card-foreground/10", children: [
21856
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col h-full", children: /* @__PURE__ */ jsxs("div", { className: "flex grow min-h-0 divide-x divide-card-foreground/10", children: [
21712
21857
  /* @__PURE__ */ jsx("div", { className: "grow bg-card md:bg-transparent", children: /* @__PURE__ */ jsx(FlowBuilder, {}) }),
21713
21858
  !isReadOnly && /* @__PURE__ */ jsx(SidebarModule, {})
21714
21859
  ] }) })
@@ -21885,5 +22030,5 @@ function WorkflowBuilder() {
21885
22030
  }
21886
22031
 
21887
22032
  export { Card2 as Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, FluidGridsProvider, ProviderPicker, TemplateCard, WorkflowBuilder, getProviderForm, listCustomBlocks, registerCustomBlock, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useFluidGridsContext, useImportWorkflowTemplate, useInitiateOAuth, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useWorkflowTemplates };
21888
- //# sourceMappingURL=chunk-YMHXH7ZK.js.map
21889
- //# sourceMappingURL=chunk-YMHXH7ZK.js.map
22033
+ //# sourceMappingURL=chunk-5LQLF5FT.js.map
22034
+ //# sourceMappingURL=chunk-5LQLF5FT.js.map