2025-07-22 18:15:36 +00:00
|
|
|
|
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
|
|
|
|
|
|
|
|
public static class ComponentPropSpecs
|
|
|
|
|
|
{
|
2026-02-24 10:39:17 +00:00
|
|
|
|
public static readonly IReadOnlyDictionary<AssistantComponentType, PropSpec> SPECS =
|
|
|
|
|
|
new Dictionary<AssistantComponentType, PropSpec>
|
2025-07-22 18:15:36 +00:00
|
|
|
|
{
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.FORM] = new(
|
2025-07-22 18:15:36 +00:00
|
|
|
|
required: ["Children"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Class", "Style"]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.TEXT_AREA] = new(
|
2025-07-22 18:15:36 +00:00
|
|
|
|
required: ["Name", "Label"],
|
2026-03-09 17:56:38 +00:00
|
|
|
|
optional: [
|
|
|
|
|
|
"HelperText", "HelperTextOnFocus", "UserPrompt", "PrefillText",
|
|
|
|
|
|
"ReadOnly", "IsSingleLine", "Counter", "MaxLength", "IsImmediate",
|
|
|
|
|
|
"Adornment", "AdornmentIcon", "AdornmentText", "AdornmentColor", "Class", "Style",
|
|
|
|
|
|
]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.BUTTON] = new(
|
2025-07-22 18:15:36 +00:00
|
|
|
|
required: ["Name", "Text", "Action"],
|
2026-03-10 14:43:40 +00:00
|
|
|
|
optional: [
|
2026-03-16 13:15:29 +00:00
|
|
|
|
"IsIconButton", "Variant", "Color", "IsFullWidth", "Size",
|
2026-03-10 14:43:40 +00:00
|
|
|
|
"StartIcon", "EndIcon", "IconColor", "IconSize", "Class", "Style"
|
|
|
|
|
|
]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
2026-03-10 15:12:00 +00:00
|
|
|
|
[AssistantComponentType.BUTTON_GROUP] = new(
|
|
|
|
|
|
required: [],
|
|
|
|
|
|
optional: ["Variant", "Color", "Size", "OverrideStyles", "Vertical", "DropShadow", "Class", "Style"]
|
|
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.DROPDOWN] = new(
|
2025-07-22 18:15:36 +00:00
|
|
|
|
required: ["Name", "Label", "Default", "Items"],
|
2026-03-13 00:14:03 +00:00
|
|
|
|
optional: [
|
2026-03-13 01:19:07 +00:00
|
|
|
|
"UserPrompt", "IsMultiselect", "HasSelectAll", "SelectAllText", "HelperText", "ValueType",
|
2026-03-13 00:14:03 +00:00
|
|
|
|
"OpenIcon", "CloseIcon", "IconColor", "IconPositon", "Variant", "Class", "Style"
|
|
|
|
|
|
]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.PROVIDER_SELECTION] = new(
|
2025-07-22 18:15:36 +00:00
|
|
|
|
required: ["Name", "Label"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Class", "Style"]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.PROFILE_SELECTION] = new(
|
2026-02-23 14:01:00 +00:00
|
|
|
|
required: [],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["ValidationMessage", "Class", "Style"]
|
2026-02-23 14:01:00 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.SWITCH] = new(
|
2026-03-10 10:45:15 +00:00
|
|
|
|
required: ["Name", "Label", "Value"],
|
2026-03-10 12:12:46 +00:00
|
|
|
|
optional: [
|
2026-03-16 13:15:29 +00:00
|
|
|
|
"OnChanged", "LabelOn", "LabelOff", "LabelPlacement", "Icon", "IconColor", "UserPrompt",
|
2026-03-10 12:12:46 +00:00
|
|
|
|
"CheckedColor", "UncheckedColor", "Disabled", "Class", "Style",
|
|
|
|
|
|
]
|
2025-11-11 18:06:44 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.HEADING] = new(
|
2026-02-10 15:12:59 +00:00
|
|
|
|
required: ["Text", "Level"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Class", "Style"]
|
2026-02-10 15:12:59 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.TEXT] = new(
|
2026-02-10 15:12:59 +00:00
|
|
|
|
required: ["Content"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Class", "Style"]
|
2026-02-10 15:12:59 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.LIST] = new(
|
2026-02-10 16:06:45 +00:00
|
|
|
|
required: ["Items"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Class", "Style"]
|
2026-02-10 16:06:45 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.WEB_CONTENT_READER] = new(
|
2026-02-23 15:13:28 +00:00
|
|
|
|
required: ["Name"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["UserPrompt", "Preselect", "PreselectContentCleanerAgent", "Class", "Style"]
|
2026-02-23 15:13:28 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.FILE_CONTENT_READER] = new(
|
2026-02-23 15:33:24 +00:00
|
|
|
|
required: ["Name"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["UserPrompt", "Class", "Style"]
|
2026-02-23 15:33:24 +00:00
|
|
|
|
),
|
2026-02-24 10:39:17 +00:00
|
|
|
|
[AssistantComponentType.IMAGE] = new(
|
2026-02-24 10:31:16 +00:00
|
|
|
|
required: ["Src"],
|
2026-02-24 16:21:50 +00:00
|
|
|
|
optional: ["Alt", "Caption", "Class", "Style"]
|
2026-02-24 10:31:16 +00:00
|
|
|
|
),
|
2026-03-09 12:23:35 +00:00
|
|
|
|
[AssistantComponentType.COLOR_PICKER] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
2026-03-10 16:55:26 +00:00
|
|
|
|
optional: [
|
|
|
|
|
|
"Placeholder", "ShowAlpha", "ShowToolbar", "ShowModeSwitch",
|
|
|
|
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
2026-03-16 19:06:50 +00:00
|
|
|
|
[AssistantComponentType.DATE_PICKER] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"Value", "Placeholder", "HelperText", "DateFormat",
|
|
|
|
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.DATE_RANGE_PICKER] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"Value", "PlaceholderStart", "PlaceholderEnd", "HelperText", "DateFormat",
|
|
|
|
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.TIME_PICKER] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"Value", "Placeholder", "HelperText", "TimeFormat", "AmPm",
|
|
|
|
|
|
"PickerVariant", "UserPrompt", "Class", "Style"
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
2026-03-10 16:55:26 +00:00
|
|
|
|
[AssistantComponentType.LAYOUT_ITEM] = new(
|
|
|
|
|
|
required: ["Name"],
|
|
|
|
|
|
optional: ["Xs", "Sm", "Md", "Lg", "Xl", "Xxl", "Class", "Style"]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.LAYOUT_GRID] = new(
|
|
|
|
|
|
required: ["Name"],
|
|
|
|
|
|
optional: ["Justify", "Spacing", "Class", "Style"]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.LAYOUT_PAPER] = new(
|
|
|
|
|
|
required: ["Name"],
|
|
|
|
|
|
optional: [
|
2026-03-10 17:57:48 +00:00
|
|
|
|
"Elevation", "Height", "MaxHeight", "MinHeight", "Width", "MaxWidth", "MinWidth",
|
2026-03-10 16:55:26 +00:00
|
|
|
|
"IsOutlined", "IsSquare", "Class", "Style"
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.LAYOUT_STACK] = new(
|
|
|
|
|
|
required: ["Name"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"IsRow", "IsReverse", "Breakpoint", "Align", "Justify", "Stretch",
|
|
|
|
|
|
"Wrap", "Spacing", "Class", "Style",
|
|
|
|
|
|
]
|
2026-03-09 12:23:35 +00:00
|
|
|
|
),
|
2026-03-13 22:47:41 +00:00
|
|
|
|
[AssistantComponentType.LAYOUT_ACCORDION] = new(
|
|
|
|
|
|
required: ["Name"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"AllowMultiSelection", "IsDense", "HasOutline", "IsSquare", "Elevation",
|
|
|
|
|
|
"HasSectionPaddings", "Class", "Style",
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantComponentType.LAYOUT_ACCORDION_SECTION] = new(
|
|
|
|
|
|
required: ["Name", "HeaderText"],
|
|
|
|
|
|
optional: [
|
|
|
|
|
|
"IsDisabled", "IsExpanded", "IsDense", "HasInnerPadding", "HideIcon", "HeaderIcon", "HeaderColor",
|
|
|
|
|
|
"HeaderTypo", "HeaderAlign", "MaxHeight","ExpandIcon", "Class", "Style",
|
|
|
|
|
|
]
|
|
|
|
|
|
),
|
2025-07-22 18:15:36 +00:00
|
|
|
|
};
|
2026-02-23 14:01:00 +00:00
|
|
|
|
}
|