Client-side Webconsole Alpine JS based renderer
    Preparing search index...

    Class default

    Hierarchy

    • Renderer
      • default
    Index
    • get console(): Console

      Returns the console object passed to the constructor.

      Returns Console

    • Called from the Console when a new conlet type is added.

      Parameters

      • conletType: string

        the conlet type

      • displayNames: Map<string, string>

        the display names for the conlet type by lang

      • renderModes: RenderMode[]

        the render modes

      • pageComponents: PageComponentSpecification[]

        of components to be added to the page

      Returns void

    • Called from the console when the connection to the server is suspended. The default implementation logs a warning message. Should be overridden by a method that displays a modal dialog.

      The connection can be resumed by invoking the function passed as argument.

      Parameters

      • resume: () => void

        called when resuming

      Returns void

    • Find the conlet representations that display content. The default implementation wraps all nodes that match body .conlet.conlet-content. If a conletId is specified, the the result set is restricted to conlets with this id.

      Parameters

      • OptionalconletId: string

        the conlet id

      Returns Conlet[]

      the conlets found

    • Find the conlet representation that displays the preview of the conlet with the given id. The default implementation wraps the node with .conlet-preview[data-conlet-id='<conletId>'.

      Parameters

      • conletId: string

        the conlet id

      Returns Conlet | null

      the conlet or null

    • Find the conlets that display the preview, view or content of the conlet with the given id. The default implementation wraps all nodes with .conlet[data-conlet-id='<conletId>' in DefaultConlets.

      Parameters

      • conletId: string

        the conlet id

      Returns Conlet[]

      the conlets found

    • Find the conlet representation that displays the view of the conlet with the given id. The default implementation returns all nodes with .conlet-view[data-conlet-id='<conletId>'.

      Parameters

      • conletId: string

        the conlet id

      Returns Conlet | null

      the conlet

    • Find conlet representations that display content and are embedded in the given conlet (which is most likely a view or preview, but may also be a content representation). The default implementation wraps all nodes (with the exception of the argument's element) that match .conlet.conlet-content and returns them in a depth first order.

      Parameters

      • conlet: Conlet

        the containing conlet

      Returns Conlet[]

      the conlets found

    • Find the HTML element that displays a modal dialog associated with the conlet with the given id. The default implementation returns all nodes with .conlet-modal-dialog[data-conlet-id='<conletId>'.

      Parameters

      • conletId: string

        the conlet id

      Returns HTMLElement | null

      the HTML element or null

    • Return all conlet preview representations. The default implementation wraps all elements with .conlet-preview[data-conlet-id].

      Returns Conlet[]

    • Return all conlet view representations. The default implementation wraps all nodes with .conlet-view[data-conlet-id].

      Returns Conlet[]

    • Called from the Console when the console layout is received from the server.

      Parameters

      • previewLayout: string[]

        the conlet ids from top left to bottom right

      • tabsLayout: string[]

        the ids of the conlets viewable in tabs

      • xtraInfo: Object

        extra information spcific to the console implementation

      Returns void

    • Called by the Console to open a modal dialog.

      The container has a generated dialog id and attributes data-conlet-type and data-conlet-id. If ModalDialogOptions.useSubmit is true, the submit button generated by the console must be linked to the form in the content. By convention, this is done using the dialog's id with "-form" appended (i.e. used as the form's id ans the button's form attribute).

      Parameters

      • container: HTMLElement

        the container for the dialog

      • options: ModalDialogOptions

        the options

      • content: string

        the content as HTML

      Returns void

    • Called from the Console to update a conlet that is used to provide content. The default implementation removes all children from the container and inserts the new content.

      Parameters

      • conlet: Conlet

        the conlet as returned from e.g. Renderer.findConletContents

      • content: HTMLElement[]

        the component content as DOM received from the server, usually inserted into the container

      Returns void

    • Called from the Console to update the preview of the given conlet. If the preview is new (no preview with the given conlet id exists), the console provides DOM for the container as a convenience. Implementations of this method are free to extract the data from the container argument and provide their own markup for a new container.

      Parameters

      • isNew: boolean

        true if it is a new (not yet existing) conlet preview

      • conlet: Conlet

        the container for the preview representation. Either the result from Renderer.findConletPreview, if an existing preview is updated, or a prepared container for the preview, provided as:

        <section class='conlet conlet-preview'
        data-conlet-type='...' data-conlet-id='...'
        data-conlet-grid-columns='...' data-conlet-grid-rows=' '></section>
      • modes: RenderMode[]

        the supported conlet modes

      • content: HTMLElement[]

        the preview content as DOM received from the server, usually inserted into the container

      • foreground: boolean

        true if the preview (i.e. the overview plane) is to be made the active tab

      Returns void

    • Called from the Console when a conlet type is removed.

      The expected action of the renderer is to remove the conlet type from e.g. a menu that allows adding conlets. However, front-ends can also force a reload of the application.

      Parameters

      • conletType: string

        the conlet type

      • renderModes: RenderMode[]

        the render modes

      Returns void

    • Called from the Console to update the view of the given conlet. If the view is new (no view with the given conlet id exists), the console provides DOM for the container as a convenience. Implementations of this method are free to extract the data from the conatiner argument and provide their own markup for a new container

      Parameters

      • isNew: boolean

        true if it is a new conlet view

      • conlet: Conlet

        the container for the view representation. Either the result from Renderer.findConletView, if an existing preview is updated, or a new container provided as:

        <article class="conlet conlet-view
        data-conlet-type='...' data-conlet-id='...'"></article>"
      • modes: string[]

        the supported conlet modes

      • content: HTMLElement[]

        the view content, usually inserted into the container

      • foreground: boolean

        true if the view is to be made the active tab

      Returns void

    • Some renderers may not be able to generate the DOM for a conlet immediately. Therefore, after requesting a conlet to be rendered, the console wraps subsequent operations that require the conlet in a function that is passed to this method.

      The renderer may execute this function immediately (default behavior) or delay the execution until the conlet is rendered.

      Parameters

      • todo: () => void

      Returns void

    • Wraps a node (HTMLElement) in a Conlets. If the argumnet is null, returns null.

      Parameters

      • node: HTMLElement | null

      Returns Conlet | null

    • Wraps a node list of HTMLElements in Conlets.

      Parameters

      • nodes: NodeListOf<HTMLElement>

      Returns Conlet[]