Fix onboard BLE admission and stage wireless device enrollment
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type {ComponentType} from 'react';
|
||||
import type {ComponentType,ReactNode} from 'react';
|
||||
import type {IconName} from '@nodedc/ui-react';
|
||||
import type {Sensor, SensorTransport} from './contracts';
|
||||
import type {EnrollmentTransport} from './enrollment';
|
||||
@@ -11,6 +11,7 @@ export interface SensorDetailProps {
|
||||
}
|
||||
export interface SensorEnrollmentProps {
|
||||
transport:EnrollmentTransport; onClose:()=>void; onChange:()=>void;
|
||||
renderWindow:(view:{content:ReactNode;actions?:ReactNode;busy?:boolean})=>ReactNode;
|
||||
}
|
||||
export interface SensorUiContribution {
|
||||
kind:string;
|
||||
@@ -18,6 +19,11 @@ export interface SensorUiContribution {
|
||||
icon:IconName;
|
||||
retainOffline:boolean;
|
||||
supportsPreparation:boolean;
|
||||
wirelessEnrollment?:{label:string;View:ComponentType<SensorEnrollmentProps>};
|
||||
}
|
||||
|
||||
export function wirelessContributions(contributions:readonly SensorUiContribution[]):SensorUiContribution[] {
|
||||
return contributions.filter(value=>value.wirelessEnrollment&&contributions.filter(other=>other.kind===value.kind).length===1);
|
||||
}
|
||||
|
||||
export function sensorContribution(
|
||||
|
||||
Reference in New Issue
Block a user