2019-06-23 03:35:23 -07:00
|
|
|
<template>
|
2021-10-27 12:55:37 -07:00
|
|
|
<n8n-input-label
|
2021-11-15 02:19:43 -08:00
|
|
|
:label="$nodeText.topParameterDisplayName(parameter)"
|
|
|
|
:tooltipText="$nodeText.topParameterDescription(parameter)"
|
2021-10-27 12:55:37 -07:00
|
|
|
:showTooltip="focused"
|
|
|
|
:bold="false"
|
|
|
|
size="small"
|
|
|
|
>
|
|
|
|
<parameter-input
|
|
|
|
:parameter="parameter"
|
|
|
|
:value="value"
|
|
|
|
:displayOptions="displayOptions"
|
|
|
|
:path="path"
|
|
|
|
:isReadOnly="isReadOnly"
|
|
|
|
@valueChanged="valueChanged"
|
|
|
|
@focus="focused = true"
|
|
|
|
@blur="focused = false"
|
|
|
|
inputSize="small" />
|
|
|
|
</n8n-input-label>
|
2019-06-23 03:35:23 -07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
import {
|
|
|
|
IUpdateInformation,
|
|
|
|
} from '@/Interface';
|
|
|
|
|
|
|
|
import ParameterInput from '@/components/ParameterInput.vue';
|
2021-11-15 02:19:43 -08:00
|
|
|
import { renderText } from '@/components/mixins/renderText';
|
|
|
|
import mixins from 'vue-typed-mixins';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-11-15 02:19:43 -08:00
|
|
|
export default mixins(renderText)
|
2019-06-23 03:35:23 -07:00
|
|
|
.extend({
|
|
|
|
name: 'ParameterInputFull',
|
|
|
|
components: {
|
|
|
|
ParameterInput,
|
|
|
|
},
|
2021-10-27 12:55:37 -07:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
focused: false,
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
props: [
|
|
|
|
'displayOptions',
|
2021-09-11 01:15:36 -07:00
|
|
|
'isReadOnly',
|
2019-06-23 03:35:23 -07:00
|
|
|
'parameter',
|
|
|
|
'path',
|
|
|
|
'value',
|
|
|
|
],
|
|
|
|
methods: {
|
|
|
|
getArgument (argumentName: string): string | number | boolean | undefined {
|
|
|
|
if (this.parameter.typeOptions === undefined) {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.parameter.typeOptions[argumentName] === undefined) {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
return this.parameter.typeOptions[argumentName];
|
|
|
|
},
|
|
|
|
valueChanged (parameterData: IUpdateInformation) {
|
|
|
|
this.$emit('valueChanged', parameterData);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|