diff --git a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node-forms/SourceItem.vue b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node-forms/SourceItem.vue
index 3b7ca98c53..e8bfc35111 100644
--- a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node-forms/SourceItem.vue
+++ b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node-forms/SourceItem.vue
@@ -1,7 +1,7 @@
@@ -13,7 +13,7 @@
import { KUI_COLOR_TEXT_NEUTRAL, KUI_ICON_SIZE_40 } from '@kong/design-tokens'
import type { NodeType } from '../../types'
import type { InputOption } from '../composables/useNodeForm'
-import { NODE_VISUAL } from '../node/node-visual'
+import { getNodeVisual } from '../node/node-visual'
defineProps<{
item: InputOption
diff --git a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/FlowNode.vue b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/FlowNode.vue
index 6b150b2ce6..0ce10d40ff 100644
--- a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/FlowNode.vue
+++ b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/FlowNode.vue
@@ -387,7 +387,11 @@ const branchPosition = computed(() => {
})
const name = computed(() => {
- return isImplicit.value ? t(`plugins.free-form.datakit.flow_editor.node_types.${data.type}.name`) : data.name
+ if (isImplicitNode(data)) {
+ return t(`plugins.free-form.datakit.flow_editor.node_types.${data.type}.name`)
+ }
+
+ return data.name
})
const handleTwigColor = computed(() => {
diff --git a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/NodeBadge.vue b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/NodeBadge.vue
index 0e171f97f7..ae62269c27 100644
--- a/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/NodeBadge.vue
+++ b/packages/entities/entities-plugins/src/components/free-form/Datakit/flow-editor/node/NodeBadge.vue
@@ -14,7 +14,7 @@
>
- {{ nodeName }}
+ {{ type }}
@@ -22,9 +22,8 @@
import { computed } from 'vue'
import type { NodeVisual } from '../../types'
import { type NodeType } from '../../types'
-import { getNodeTypeName } from './node'
+import { getNodeVisual } from './node-visual'
import type { BadgeSize } from '@kong/kongponents'
-import { NODE_VISUAL } from './node-visual'
const { type } = defineProps<{
type: NodeType
@@ -32,9 +31,7 @@ const { type } = defineProps<{
iconOnly?: boolean
}>()
-const visual = computed(() => NODE_VISUAL[type])
-
-const nodeName = computed(() => getNodeTypeName(type))
+const visual = computed(() => getNodeVisual(type))
diff --git a/packages/entities/entities-plugins/src/components/free-form/Datakit/types.ts b/packages/entities/entities-plugins/src/components/free-form/Datakit/types.ts
index 0ba37c75c3..3c15699183 100644
--- a/packages/entities/entities-plugins/src/components/free-form/Datakit/types.ts
+++ b/packages/entities/entities-plugins/src/components/free-form/Datakit/types.ts
@@ -70,12 +70,14 @@ export interface NextMeta {
branches: BranchMeta[]
}
+export interface NodeColors {
+ foreground: string
+ background: string
+}
+
export interface NodeVisual {
icon: Component
- colors?: {
- foreground: string
- background: string
- }
+ colors?: NodeColors
}
export interface NodeMeta extends Partial {
@@ -91,6 +93,32 @@ export interface NodeMeta extends Partial {
hidden?: boolean
}
+export type ConfigNodeGroup =
+ | 'external_interaction'
+ | 'control_flow'
+ | 'data_transformation'
+ | 'data_value'
+ | 'authentication'
+
+export interface ConfigNodeMeta extends NodeMeta {
+ type: ConfigNodeType
+ summary: string
+ description: string
+ icon: Component
+ group: ConfigNodeGroup
+}
+
+export interface ConfigNodeGroupMeta {
+ id: ConfigNodeGroup
+ title: string
+ colors: NodeColors
+ nodeTypes: readonly ConfigNodeType[]
+}
+
+export interface ConfigNodePanelGroup extends ConfigNodeGroupMeta {
+ nodes: readonly ConfigNodeMeta[]
+}
+
/************************************************
* Plugin config types *
************************************************/
diff --git a/packages/entities/entities-plugins/src/components/free-form/README.md b/packages/entities/entities-plugins/src/components/free-form/README.md
index 123430e7d4..2c39fc6c1e 100644
--- a/packages/entities/entities-plugins/src/components/free-form/README.md
+++ b/packages/entities/entities-plugins/src/components/free-form/README.md
@@ -381,3 +381,4 @@ filler.fillField('config.host', 'example.com')
|---|---|
| `KM_2262_CODE_MODE` | Enable form/code editor toggle in CommonForm |
| `KM_2306_CONDITION_FIELD_314` | Show the `condition` field in plugin forms |
+| `KM_2446_DATAKIT_JWT_NODES` | Show the Authentication group in the Datakit flow editor node panel |
diff --git a/packages/entities/entities-plugins/src/constants/index.ts b/packages/entities/entities-plugins/src/constants/index.ts
index e2f22137fa..a07d97e66b 100644
--- a/packages/entities/entities-plugins/src/constants/index.ts
+++ b/packages/entities/entities-plugins/src/constants/index.ts
@@ -3,6 +3,7 @@ export const EXPERIMENTAL_FREE_FORM_PROVIDER = Symbol('EXPERIMENTAL_FREE_FORM_PR
export const FEATURE_FLAGS = {
KM_2262_CODE_MODE: 'KM-2262-code-mode',
KM_2306_CONDITION_FIELD_314: 'KM-2306-condition-field-314',
+ KM_2446_DATAKIT_JWT_NODES: 'KM-2446-Datakit-JWT-nodes',
}
export const TOASTER_PROVIDER = Symbol('TOASTER_PROVIDER')
diff --git a/packages/entities/entities-plugins/src/locales/en.json b/packages/entities/entities-plugins/src/locales/en.json
index a873792c96..558ea368f1 100644
--- a/packages/entities/entities-plugins/src/locales/en.json
+++ b/packages/entities/entities-plugins/src/locales/en.json
@@ -839,7 +839,14 @@
},
"node_panel": {
"title": "Node types",
- "description": "Drag a node onto the canvas to add it to your data flow."
+ "description": "Drag a node onto the canvas to add it to your data flow.",
+ "groups": {
+ "external_interaction": "External interaction",
+ "control_flow": "Control flow",
+ "data_transformation": "Data transformation",
+ "data_value": "Data value",
+ "authentication": "Authentication"
+ }
},
"examples": "Examples",
"debug": {
@@ -861,62 +868,50 @@
},
"node_types": {
"call": {
- "name": "call",
"summary": "Call a third-party API",
"description": "Send an HTTP request and retrieve the response."
},
"jq": {
- "name": "jq",
"summary": "Transform data and cast variables with jq",
"description": "The jq node executes a jq script for processing JSON. See the official jq docs for more details."
},
"exit": {
- "name": "exit",
"summary": "Return directly to the client",
"description": "Trigger an early exit that produces a direct response, rather than forwarding a proxied response."
},
"property": {
- "name": "property",
"summary": "Get and set Kong Gateway-specific data",
"description": "Get and set Kong Gateway host and request properties."
},
"static": {
- "name": "static",
"summary": "Configure static input values ahead of time",
"description": "Emits static values to be used as inputs for other nodes. The static node can help you with hardcoding some known value for an input."
},
"branch": {
- "name": "branch",
"summary": "Execute nodes based on matching input conditions",
"description": "Execute different nodes based on matching input conditions, such as a cache hit or miss."
},
"cache": {
- "name": "cache",
"summary": "Store and fetch cached data",
"description": "Store data into cache and fetch cached data from cache."
},
"xml_to_json": {
- "name": "xml_to_json",
"summary": "Transform XML to JSON",
"description": "Transform XML to JSON."
},
"json_to_xml": {
- "name": "json_to_xml",
"summary": "Transform JSON to XML",
"description": "Transform JSON to XML."
},
"jwt_decode": {
- "name": "jwt_decode",
"summary": "Decode JWT headers and claims",
"description": "Parse a JWT without verifying its signature."
},
"jwt_sign": {
- "name": "jwt_sign",
"summary": "Create and sign JWTs",
"description": "Generate a signed JWT from configured claims and a signing key."
},
"jwt_verify": {
- "name": "jwt_verify",
"summary": "Verify JWT signature and claims",
"description": "Verify a JWT signature and validate claims such as exp, nbf, iss, and aud."
},