diff --git a/schemas/analysisschema.yaml b/schemas/analysisschema.yaml index 56ccfcd..047a23b 100644 --- a/schemas/analysisschema.yaml +++ b/schemas/analysisschema.yaml @@ -117,6 +117,7 @@ properties: - Outputs - Pair - Group + - Action required: - name - type diff --git a/schemas/optionschemas.yaml b/schemas/optionschemas.yaml index 3b9158d..b92f0b9 100644 --- a/schemas/optionschemas.yaml +++ b/schemas/optionschemas.yaml @@ -148,6 +148,22 @@ Bool: type: boolean description: *Description +Action: + "$schema": http://json-schema.org/draft-04/schema# + additionalProperties: false + properties: + name: + type: string + type: + type: string + title: + type: string + hidden: + type: boolean + default: + type: boolean + description: *Description + Integer: "$schema": http://json-schema.org/draft-04/schema# additionalProperties: false diff --git a/schemas/uictrlschemas.yaml b/schemas/uictrlschemas.yaml index 7363875..fe87886 100644 --- a/schemas/uictrlschemas.yaml +++ b/schemas/uictrlschemas.yaml @@ -28,6 +28,7 @@ ControlBase: - CustomControl - ModeSelector - Content + - ActionButton name: type: string stage: @@ -538,6 +539,10 @@ ControlInheritance: - ControlBase - GridControl - OptionControl + ActionButton: + - ControlBase + - GridControl + - OptionControl CheckBox: - ControlBase - GridControl diff --git a/uicompiler.js b/uicompiler.js index 15565f5..98ce28a 100644 --- a/uicompiler.js +++ b/uicompiler.js @@ -829,6 +829,21 @@ const constructors = { } }, + Action: { + create: function (item, isTemplate) { + let ctrl = {}; + ctrl.type = 'ActionButton'; + CheckTemplateState(item, ctrl, isTemplate); + return ctrl + }, + toRaw: function (obj, key) { + if (key === undefined || key.length === 0) + return "boolean"; + + return null; + } + }, + Output: { create: function(item, isTemplate) { let ctrl = { }; @@ -1334,6 +1349,21 @@ const uiOptionControl = { } }, + ActionButton: { + usesSingleCell: function (ctrl) { + return true; + }, + isContainerControl: function (ctrl) { + return false; + }, + isOptionControl: function (ctrl) { + return ctrl.isVirtual !== true; + }, + toRaw: function (ctrl) { + return "boolean"; + } + }, + Output: { usesSingleCell: function(ctrl) { return true;