From bf8f022746cd1340e900c8f0f29edea81c19e394 Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Tue, 20 Aug 2024 10:17:32 -0600 Subject: [PATCH] Add empty string as valid _target value, remove target property if value is not set --- properties.schema | 4 ++-- schema/component.schema.json | 1 + templates/graphic.jsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/properties.schema b/properties.schema index 5a506ba..562154c 100644 --- a/properties.schema +++ b/properties.schema @@ -100,12 +100,12 @@ "_target": { "type": "string", "required": false, - "enum": ["_blank", "_self", "_parent", "_top"], + "enum": ["", "_blank", "_self", "_parent", "_top"], "default": "_blank", "title": "Target attribute", "inputType": { "type": "Select", - "options": ["_blank", "_self", "_parent", "_top"] + "options": ["", "_blank", "_self", "_parent", "_top"] }, "validators": [], "help": "This targets where to open the link. Acceptable values are '_blank' (opens the linked document in a new window or tab), '_parent' (opens the linked document in the parent frame), '_top' (opens the linked document in the full body of the window) or '_self' (opens the linked document in the same frame as it was selected. If no value is set, the default is '_blank'." diff --git a/schema/component.schema.json b/schema/component.schema.json index 3b253d3..953e9f4 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -96,6 +96,7 @@ "title": "Target attribute", "description": "This targets where to open the link. Acceptable values are '_blank' (opens the linked document in a new window or tab), '_parent' (opens the linked document in the parent frame), '_top' (opens the linked document in the full body of the window) or '_self' (opens the linked document in the same frame as it was selected. If no value is set, the default is '_blank'.", "enum": [ + "", "_blank", "_self", "_parent", diff --git a/templates/graphic.jsx b/templates/graphic.jsx index 615915e..15e5d62 100644 --- a/templates/graphic.jsx +++ b/templates/graphic.jsx @@ -38,7 +38,7 @@ export default function Graphic(props) {