From 9db962854e957b85ece6e4f5d3ed94906088e1a4 Mon Sep 17 00:00:00 2001 From: Arturo Manzoli Date: Mon, 13 Jan 2025 19:22:25 -0300 Subject: [PATCH] Input-widgets: Label: Flag component as 'no variable element' Signed-off-by: Arturo Manzoli --- src/components/InputElementConfig.vue | 2 +- .../custom-widget-elements/Label.vue | 26 +++---------------- src/types/widgets.ts | 22 ++++++++-------- 3 files changed, 16 insertions(+), 34 deletions(-) diff --git a/src/components/InputElementConfig.vue b/src/components/InputElementConfig.vue index 03c00c8fa..6b7623d80 100644 --- a/src/components/InputElementConfig.vue +++ b/src/components/InputElementConfig.vue @@ -231,7 +231,7 @@ - {{ miniWidget.options.text || 'Label' }} + {{ miniWidget.options.layout?.text || 'Label' }} diff --git a/src/types/widgets.ts b/src/types/widgets.ts index 9aba68895..773c91644 100644 --- a/src/types/widgets.ts +++ b/src/types/widgets.ts @@ -186,19 +186,19 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable | null /** * Action parameter */ dataLakeVariable: DataLakeVariable - /** - * The label text - */ - text: string /** * Layout options */ layout: { + /** + * The label text + */ + text: string /** * The size of the label's font (in pixels) */ @@ -245,7 +245,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */ @@ -304,7 +304,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */ @@ -351,7 +351,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */ @@ -414,7 +414,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */ @@ -465,7 +465,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */ @@ -536,7 +536,7 @@ export type CustomWidgetElementOptions = { /** * Variable type */ - variableType: 'string' | 'boolean' | 'number' + variableType: DataLakeVariable['type'] | null /** * Action parameter */