mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-04-09 18:01:37 +00:00
Some checks are pending
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,deb,updater, appimage,deb) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,deb,updater, appimage,deb) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
168 lines
7.8 KiB
C#
168 lines
7.8 KiB
C#
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
public static class ComponentPropSpecs
|
|
{
|
|
public static readonly IReadOnlyDictionary<AssistantComponentType, PropSpec> SPECS =
|
|
new Dictionary<AssistantComponentType, PropSpec>
|
|
{
|
|
[AssistantComponentType.FORM] = new(
|
|
required: ["Children"],
|
|
optional: ["Class", "Style"]
|
|
),
|
|
[AssistantComponentType.TEXT_AREA] = new(
|
|
required: ["Name", "Label"],
|
|
optional: [
|
|
"HelperText", "HelperTextOnFocus", "UserPrompt", "PrefillText",
|
|
"ReadOnly", "IsSingleLine", "Counter", "MaxLength", "IsImmediate",
|
|
"Adornment", "AdornmentIcon", "AdornmentText", "AdornmentColor", "Class", "Style",
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.BUTTON] = new(
|
|
required: ["Name", "Action"],
|
|
optional: [
|
|
"Text", "IsIconButton", "Variant", "Color", "IsFullWidth", "Size",
|
|
"StartIcon", "EndIcon", "IconColor", "IconSize", "Class", "Style"
|
|
],
|
|
confidential: ["Action"],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.BUTTON_GROUP] = new(
|
|
required: ["Name"],
|
|
optional: ["Variant", "Color", "Size", "OverrideStyles", "Vertical", "DropShadow", "Class", "Style"],
|
|
nonWriteable: ["Class", "Style" ]
|
|
|
|
),
|
|
[AssistantComponentType.DROPDOWN] = new(
|
|
required: ["Name", "Label", "Default", "Items"],
|
|
optional: [
|
|
"UserPrompt", "IsMultiselect", "HasSelectAll", "SelectAllText", "HelperText", "ValueType",
|
|
"OpenIcon", "CloseIcon", "IconColor", "IconPositon", "Variant", "Class", "Style"
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "ValueType", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.PROVIDER_SELECTION] = new(
|
|
required: ["Name", "Label"],
|
|
optional: ["Class", "Style"],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.PROFILE_SELECTION] = new(
|
|
required: [],
|
|
optional: ["ValidationMessage", "Class", "Style"],
|
|
nonWriteable: ["Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.SWITCH] = new(
|
|
required: ["Name", "Value"],
|
|
optional: [
|
|
"Label", "OnChanged", "LabelOn", "LabelOff", "LabelPlacement", "Icon", "IconColor",
|
|
"UserPrompt", "CheckedColor", "UncheckedColor", "Disabled", "Class", "Style",
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ],
|
|
confidential: ["OnChanged"]
|
|
),
|
|
[AssistantComponentType.HEADING] = new(
|
|
required: ["Text", "Level"],
|
|
optional: ["Class", "Style"],
|
|
nonWriteable: ["Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.TEXT] = new(
|
|
required: ["Content"],
|
|
optional: ["Class", "Style"],
|
|
nonWriteable: ["Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LIST] = new(
|
|
required: ["Items"],
|
|
optional: ["Class", "Style"],
|
|
nonWriteable: ["Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.WEB_CONTENT_READER] = new(
|
|
required: ["Name"],
|
|
optional: ["UserPrompt", "Preselect", "PreselectContentCleanerAgent", "Class", "Style"],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.FILE_CONTENT_READER] = new(
|
|
required: ["Name"],
|
|
optional: ["UserPrompt", "Class", "Style"],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.IMAGE] = new(
|
|
required: ["Src"],
|
|
optional: ["Alt", "Caption", "Class", "Style"],
|
|
nonWriteable: ["Src", "Alt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.COLOR_PICKER] = new(
|
|
required: ["Name", "Label"],
|
|
optional: [
|
|
"Placeholder", "ShowAlpha", "ShowToolbar", "ShowModeSwitch",
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.DATE_PICKER] = new(
|
|
required: ["Name", "Label"],
|
|
optional: [
|
|
"Value", "Placeholder", "HelperText", "DateFormat", "Color", "Elevation",
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.DATE_RANGE_PICKER] = new(
|
|
required: ["Name", "Label"],
|
|
optional: [
|
|
"Value", "PlaceholderStart", "PlaceholderEnd", "HelperText", "DateFormat",
|
|
"Elevation", "Color", "PickerVariant", "UserPrompt", "Class", "Style"
|
|
],
|
|
nonWriteable: ["Name", "UserPrompt", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.TIME_PICKER] = new(
|
|
required: ["Name", "Label"],
|
|
optional: [
|
|
"Value", "Placeholder", "HelperText", "TimeFormat", "AmPm", "Color",
|
|
"Elevation", "PickerVariant", "UserPrompt", "Class", "Style"
|
|
]
|
|
),
|
|
[AssistantComponentType.LAYOUT_ITEM] = new(
|
|
required: ["Name"],
|
|
optional: ["Xs", "Sm", "Md", "Lg", "Xl", "Xxl", "Class", "Style"],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LAYOUT_GRID] = new(
|
|
required: ["Name"],
|
|
optional: ["Justify", "Spacing", "Class", "Style"],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LAYOUT_PAPER] = new(
|
|
required: ["Name"],
|
|
optional: [
|
|
"Elevation", "Height", "MaxHeight", "MinHeight", "Width", "MaxWidth", "MinWidth",
|
|
"IsOutlined", "IsSquare", "Class", "Style"
|
|
],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LAYOUT_STACK] = new(
|
|
required: ["Name"],
|
|
optional: [
|
|
"IsRow", "IsReverse", "Breakpoint", "Align", "Justify", "Stretch",
|
|
"Wrap", "Spacing", "Class", "Style",
|
|
],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LAYOUT_ACCORDION] = new(
|
|
required: ["Name"],
|
|
optional: [
|
|
"AllowMultiSelection", "IsDense", "HasOutline", "IsSquare", "Elevation",
|
|
"HasSectionPaddings", "Class", "Style",
|
|
],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
[AssistantComponentType.LAYOUT_ACCORDION_SECTION] = new(
|
|
required: ["Name", "HeaderText"],
|
|
optional: [
|
|
"IsDisabled", "IsExpanded", "IsDense", "HasInnerPadding", "HideIcon", "HeaderIcon", "HeaderColor",
|
|
"HeaderTypo", "HeaderAlign", "MaxHeight","ExpandIcon", "Class", "Style",
|
|
],
|
|
nonWriteable: ["Name", "Class", "Style" ]
|
|
),
|
|
};
|
|
}
|