From 78c024b247d5bc276e17f3780d83b1b35cb2f4c1 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Thu, 3 Nov 2022 13:04:53 +0100 Subject: [PATCH] refactor(editor): restrict mapping discoverability tooltip showing only on string input (#4496) * refactor(editor): restrict mapping discoverability tooltip showing only on string input * refactor(editor): renaming computed prop because not only string inputs can be mapped, but we want to show tooltips only on string inputs * fix(editor): removing unused prop from ParameterInputWrapper.vue * fix(editor): reorganizing and updating props in ParameterInputFull.vue * fix(editor): proper typings for node related translations * fix(editor): fix typings for input localisation functions * fix(editor): simplifying localisation functions * Revert "fix(editor): simplifying localisation functions" This reverts commit 3d93ccf0cf4f62b07c49871825f4a518766ca470. * fix(editor): move nullish coalescing into called function --- .../src/components/ParameterInput.vue | 4 +- .../src/components/ParameterInputFull.vue | 54 ++++++++++++------ .../src/components/ParameterInputWrapper.vue | 3 - packages/editor-ui/src/plugins/i18n/index.ts | 55 +++++++++---------- 4 files changed, 65 insertions(+), 51 deletions(-) diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index 27f9a92b6d..0baa0d4d33 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -762,12 +762,12 @@ export default mixins( ? this.$locale.credText().placeholder(this.parameter) : this.$locale.nodeText().placeholder(this.parameter, this.path); }, - getOptionsOptionDisplayName(option: { value: string; name: string }): string { + getOptionsOptionDisplayName(option: INodePropertyOptions): string { return this.isForCredential ? this.$locale.credText().optionsOptionDisplayName(this.parameter, option) : this.$locale.nodeText().optionsOptionDisplayName(this.parameter, option, this.path); }, - getOptionsOptionDescription(option: { value: string; description: string }): string { + getOptionsOptionDescription(option: INodePropertyOptions): string { return this.isForCredential ? this.$locale.credText().optionsOptionDescription(this.parameter, option) : this.$locale.nodeText().optionsOptionDescription(this.parameter, option, this.path); diff --git a/packages/editor-ui/src/components/ParameterInputFull.vue b/packages/editor-ui/src/components/ParameterInputFull.vue index 733b438940..c64ff82ae3 100644 --- a/packages/editor-ui/src/components/ParameterInputFull.vue +++ b/packages/editor-ui/src/components/ParameterInputFull.vue @@ -1,7 +1,7 @@