Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Wizarding Addon is responsible for displaying wizards in OpenSCD. Wizarding could be made in many ways. Libraries allow plug-in editors to choose their own experiences. Plug-in authors can use the OSCD wizard component to make life easier.




Some wizards that are could be frequently used:

Form wizard

Webforms to enter/modify information.

SCL wizard

Can generate wizards based on the SCL XSD schema (not build yet).


Code wizard

Could be used to display plain SCL files


Overview of the different aspects

draw.io Diagram
bordertrue
diagramNameOscd-Wizarding
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth781
revision1



Technical working

The Wizarding Addon listens to the oscd-wizard  CustomEvent.

The oscd-wizard  events contains the OscdWizard  reference.


Code Block
languagejs
themeConfluence
titleoscd-wizard
export interface OscdWizardEventDetail {
    wizard: OscdWizard;
}

export interface OscdWizardEvent extends Event {
    detail: OscdWizardEventDetail;
}


The OscdWizard  must be an HTMLElement that contains the open()  and close() functions.

The OscdWizard can be viewed below


Code Block
languagejs
themeConfluence
titleOscdWizard
export type OscdWizard = HTMLElement & { open(): Promise<void>, close(): Promise<void> }


If you want to create your own wizard, you must adhere to this API.


Wizarding flows from OpenSCD-Core plug-in en OpenSCD-Core plug.

draw.io Diagram
bordertrue
diagramNameOscd-Wizard Actions
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth921
revision2