mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Evaluation Metrics Node): Add Evaluation Metrics node (no-changelog) (#14050)
This commit is contained in:
@@ -5,6 +5,7 @@ import { useNDVStore } from '@/stores/ndv.store';
|
||||
import type {
|
||||
AssignmentCollectionValue,
|
||||
AssignmentValue,
|
||||
FieldTypeMap,
|
||||
INode,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
@@ -20,11 +21,17 @@ interface Props {
|
||||
parameter: INodeProperties;
|
||||
value: AssignmentCollectionValue;
|
||||
path: string;
|
||||
defaultType?: keyof FieldTypeMap;
|
||||
disableType?: boolean;
|
||||
node: INode | null;
|
||||
isReadOnly?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), { isReadOnly: false });
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
isReadOnly: false,
|
||||
defaultType: undefined,
|
||||
disableType: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
valueChanged: [value: { name: string; node: string; value: AssignmentCollectionValue }];
|
||||
@@ -82,7 +89,7 @@ function addAssignment(): void {
|
||||
id: crypto.randomUUID(),
|
||||
name: '',
|
||||
value: '',
|
||||
type: 'string',
|
||||
type: props.defaultType ?? 'string',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,7 +98,7 @@ function dropAssignment(expression: string): void {
|
||||
id: crypto.randomUUID(),
|
||||
name: propertyNameFromExpression(expression),
|
||||
value: `=${expression}`,
|
||||
type: typeFromExpression(expression),
|
||||
type: props.defaultType ?? typeFromExpression(expression),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -157,6 +164,7 @@ function optionSelected(action: string) {
|
||||
:issues="getIssues(index)"
|
||||
:class="$style.assignment"
|
||||
:is-read-only="isReadOnly"
|
||||
:disable-type="disableType"
|
||||
@update:model-value="(value) => onAssignmentUpdate(index, value)"
|
||||
@remove="() => onAssignmentRemove(index)"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user