From c1bf0ab92cf4484a237cf99d8580102277ebbaa4 Mon Sep 17 00:00:00 2001 From: Mel Massadian Date: Wed, 5 Jun 2024 14:25:10 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20a=20method=20to=20ext?= =?UTF-8?q?end=20convertable=20widget=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/extensions/core/widgetInputs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js index f1a1d22cd..04ef35b59 100644 --- a/web/extensions/core/widgetInputs.js +++ b/web/extensions/core/widgetInputs.js @@ -12,6 +12,12 @@ export function getWidgetConfig(slot) { return slot.widget[CONFIG] ?? slot.widget[GET_CONFIG](); } +export function addValidType(type) { + if (!VALID_TYPES.includes(type)) { + VALID_TYPES.push(type); + } +} + function getConfig(widgetName) { const { nodeData } = this.constructor; return nodeData?.input?.required[widgetName] ?? nodeData?.input?.optional?.[widgetName];