DCCatalogEntryPicker Columns and Customization

DCCatalogEntryPicker column behavior is defined by:

  • sdk/config/flowbox-ui-components/src/DCCatalogEntryPicker/picker-column-helpers.ts

[NOTE!lightbulb/SYSTEM DESIGN] The same column definitions drive both the browse table and selected-tags panel, keeping visual semantics consistent.

Built-in column keys

  • name (text)
  • dataType (pill)
  • labels (multi-label pills)

Defaults:

  • DEFAULT_COLUMNS = ['name', 'dataType', 'labels']
  • DEFAULT_SELECTED_COLUMNS_DISPLAY = ['name', 'dataType', 'labels']

Dot-path dynamic columns

The picker supports dynamic keys without explicit registration:

  • sourceParams.* => code-style rendering
  • metadata.* => pill rendering

Examples:

  • sourceParams.topic
  • sourceParams.nodeId
  • metadata.unit
  • metadata.description

[NOTE!lightbulb/SURPRISING BEHAVIOR] Dot-path keys are generated dynamically at runtime and do not need pre-registration in COLUMN_DEFS.

Custom column definitions

You can extend COLUMN_DEFS at runtime.

<script>
  import { COLUMN_DEFS } from '@industream/flowmaker-flowbox-ui-components';

  COLUMN_DEFS['sourceParams.registerType'] = {
    label: 'Register Type',
    resolve: (e) => e.sourceParams?.registerType ?? '-',
    type: 'pill'
  };
</script>

Real customization example

  • Modbus worker customizes register columns: /home/dja/dsd/dev/boxes-repo/flowmaker-workers/workers/modbus-tcp/frontend/src/source/ConfigForm.svelte

Recommended column sets by scenario

  • MQTT topic selection:
    • columns: ['name', 'sourceParams.topic', 'dataType', 'metadata.unit', 'labels']
    • selectedColumnsDisplay: ['name', 'sourceParams.topic', 'dataType']
  • OPC-UA tag selection:
    • columns: ['name', 'sourceParams.nodeId', 'dataType', 'metadata.unit', 'labels']
    • selectedColumnsDisplay: ['name', 'sourceParams.nodeId', 'dataType']
  • Modbus register selection:
    • columns: ['name', 'dataType', 'sourceParams.address', 'sourceParams.registerType', 'sourceParams.registerWordCount']

Warnings

[WARNING!public/GLOBAL STATE HAZARD] COLUMN_DEFS is global mutable state in the runtime context. If two forms define the same key differently, last write wins.

[WARNING!schedule/CONFIG INTEGRITY] Global overrides make behavior order-dependent across components loaded in the same runtime.

[WARNING!report/DEBUGGABILITY] Unknown keys are silently ignored, which can hide typos in column arrays.

  • sourceType is not a built-in key in picker helpers; use explicit resolver if needed.

Reference

  • sdk/config/flowbox-ui-components/src/DCCatalogEntryPicker/picker-column-helpers.ts
  • sdk/config/flowbox-ui-components/src/DCCatalogEntryPicker/TagBrowser.svelte