Complete common picker and tree field accessibility

This commit is contained in:
Joseph Doherty
2026-11-13 21:52:00 -05:00
parent 25e78ebe92
commit b990ebe3ea
43 changed files with 2581 additions and 74 deletions
@@ -0,0 +1,24 @@
@page "/common"
@rendermode InteractiveServer
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
<main class="container-fluid p-3"><h1>Common field fixture</h1><p>Synthetic read-only fixture; no connection operations.</p><output id="interactive">@_ready</output>
<EditForm EditContext="_context" OnSubmit="IgnoreSubmit">
@foreach(var type in Types)
{
@for(int copy=0;copy<2;copy++)
{
var key=type.Name+copy;
<section data-common="@type.Name" data-copy="@copy" @key="key"><h2>@type.Name · instance @copy</h2><DynamicComponent Type="type" Parameters="Values(type)" /></section>
}
}
</EditForm></main>
@code {
private readonly EditContext _context=new(new object());
private bool _ready;
protected override void OnAfterRender(bool firstRender){if(firstRender){_ready=true;StateHasChanged();}}
private static readonly Type[] Types=[typeof(DriverIdentitySection),typeof(DriverResilienceSection),typeof(AbCipAddressPickerBody),typeof(AbLegacyAddressPickerBody),typeof(FOCASAddressPickerBody),typeof(GalaxyAddressPickerBody),typeof(ModbusAddressPickerBody),typeof(OpcUaClientAddressPickerBody),typeof(S7AddressPickerBody),typeof(SqlAddressPickerBody),typeof(TwinCATAddressPickerBody)];
private static Dictionary<string,object> Values(Type type)=>type==typeof(DriverIdentitySection)
?new(){["Model"]=new DriverIdentitySection.DriverIdentityModel(),["IsNew"]=true,["ShowDriverType"]=true}:new();
private void IgnoreSubmit(EditContext context){}
}