Configurable defaults per workflow and reset

This commit is contained in:
space-nuko
2023-05-25 13:44:37 -05:00
parent ca3957d004
commit ebe798cbf1
5 changed files with 116 additions and 24 deletions

View File

@@ -525,7 +525,37 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
canShow: (di: IDragItem) => di.type === "container"
},
// Combo
{
name: "defaultValue",
type: "string",
location: "nodeProps",
editable: true,
defaultValue: "A",
validNodeTypes: ["ui/combo"],
},
// Checkbox
{
name: "defaultValue",
type: "boolean",
location: "nodeProps",
editable: true,
defaultValue: true,
validNodeTypes: ["ui/checkbox"],
},
// Range
{
name: "defaultValue",
type: "number",
location: "nodeProps",
editable: true,
defaultValue: 0,
min: -2 ^ 16,
max: 2 ^ 16,
validNodeTypes: ["ui/number"],
},
{
name: "min",
type: "number",
@@ -587,6 +617,14 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
},
// Radio
{
name: "defaultValue",
type: "string",
location: "nodeProps",
editable: true,
defaultValue: "Choice A",
validNodeTypes: ["ui/radio"],
},
{
name: "choices",
type: "string",
@@ -598,6 +636,16 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
deserialize: deserializeStringArray,
},
// Text
{
name: "defaultValue",
type: "string",
location: "nodeProps",
editable: true,
defaultValue: "",
validNodeTypes: ["ui/text"],
},
// Workflow
{
name: "title",