Interface IRenderData

Helper for the provided data:

Hierarchy

Properties

dispatcher: INopeDispatcher
helpers: {
    connection: {
        hostname: string;
        layers: (TSession & {
            connected: boolean;
        })[];
        noExternalConnectionRequired: boolean;
        sessionsConnected: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>;
        addCommunicationLayer(_session) => void;
        connect(options?) => Promise<boolean>;
        removeCommunicationLayer(session) => void;
    };
    data: {
        getData<T>(key, defaultValue) => Promise<T>;
        hasData(key) => Promise<boolean>;
        registerSchema(key, schema) => boolean;
        setData(key, value) => Promise<boolean>;
        store() => Promise<boolean>;
    };
    file: {
        download: ((content, fileName?, option?) => void);
        upload: ((options) => void);
    };
    layout: {
        toolbar: {
            generateRadioMenuEntry<D, T>(options) => void;
            generateSelectMenuEntry<D, T>(options) => void;
        };
        createLayout(panelConfig, options, ...args) => {
            layout: {
                destroy: (() => void);
                element: any;
                layout: any;
            };
            panels: IPossiblePanels;
        };
    };
    logging: {
        log(level, sender, message) => any;
        toast(level, sender, message) => any;
    };
    ui: {
        fullscreen: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>;
        closeFullscreen() => void;
        getTheme() => IUiTheme;
        openFullscreen() => void;
    };
    url: {
        generateLinkWithQueryParams(...objects) => Promise<string>;
        getObjectFromQuery(simpleSchema) => Promise<false | {
            [index: string]: any;
        }>;
        getObjectFromQueryWithSchema(schema) => Promise<false | {
            [index: string]: any;
        }>;
    };
}

Type declaration

  • connection: {
        hostname: string;
        layers: (TSession & {
            connected: boolean;
        })[];
        noExternalConnectionRequired: boolean;
        sessionsConnected: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>;
        addCommunicationLayer(_session) => void;
        connect(options?) => Promise<boolean>;
        removeCommunicationLayer(session) => void;
    }
    • Readonly hostname: string

      Hostname used in the browser.

      Author

      M.Karkowski

    • Readonly layers: (TSession & {
          connected: boolean;
      })[]

      Returns the available layers.

      Author

      M.Karkowski

      Memberof

      NoPEService

    • Readonly noExternalConnectionRequired: boolean

      Flag, to define, whether a external connection is required to set the INoPEConnectService.sessionsConnected to true.

      Memberof

      INoPEConnectService

    • Readonly sessionsConnected: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>

      Flag showing whether the Service is connected to a backend or not

    • addCommunicationLayer:function
    • connect:function
      • Helper Function to establish a connection to a backend. If called, to url is changed to the pages/connect and after a sucessfull connection, the original url is loaded again.

        Use with care, if you get problems reloading the side again.

        Returns

        Parameters

        • Optional options: {
              delay: number;
          }
          • delay: number

        Returns Promise<boolean>

    • removeCommunicationLayer:function
  • data: {
        getData<T>(key, defaultValue) => Promise<T>;
        hasData(key) => Promise<boolean>;
        registerSchema(key, schema) => boolean;
        setData(key, value) => Promise<boolean>;
        store() => Promise<boolean>;
    }
    • getData:function
      • Helper to get the a value from the store, which is related to the key. If the data isn't present, the store must store the provided defaultValue. Afterwards it must return the provided defaultValue

        Returns

        The extracted data / defaultValue

        Memberof

        IDataInterface

        Type Parameters

        • T

          expected type. Is defined by the defaultValue

        Parameters

        • key: string

          The key, under which the data is expected.

        • defaultValue: T

          The default value, which should be used if the data isnt present.

        Returns Promise<T>

    • hasData:function
      • Helper to test if the data exists.

        Author

        M.Karkowski

        Returns

        Parameters

        • key: string

          The key, under which the data is expected.

        Returns Promise<boolean>

    • registerSchema:function
      • Register Schema for data. If you try to store or pull data, the schema will be used to verify the data

        Returns

        Flag to show the shema is stored or not.

        Parameters

        • key: string

          The path of the data which should be observed

        • schema: IJsonSchema

          The schema to store

        Returns boolean

    • setData:function
    • store:function
  • file: {
        download: ((content, fileName?, option?) => void);
        upload: ((options) => void);
    }
    • download: ((content, fileName?, option?) => void)
        • (content, fileName?, option?): void
        • Downloads some content as file.

          Parameters

          • content: string
          • Optional fileName: string
          • Optional option: {
                autoBom: boolean;
            }
            • autoBom: boolean

              Automatically provide Unicode text encoding hints

              Default

              false
              

          Returns void

    • upload: ((options) => void)
        • (options): void
        • Helper to upload data to the browser. (Opens a Popup)

          The data is only available in the Browser.

          Parameters

          • options: {
                height?: number;
                title: string;
                width?: number;
                callback(error, data) => void;
            }
            • Optional height?: number
            • title: string

              Title of the upload form

            • Optional width?: number
            • callback:function
              • Callback which is called after the data has been received.

                Parameters

                • error: any

                  Error, during uploading

                • data: string

                  The data formated as string

                Returns void

          Returns void

  • layout: {
        toolbar: {
            generateRadioMenuEntry<D, T>(options) => void;
            generateSelectMenuEntry<D, T>(options) => void;
        };
        createLayout(panelConfig, options, ...args) => {
            layout: {
                destroy: (() => void);
                element: any;
                layout: any;
            };
            panels: IPossiblePanels;
        };
    }
    • toolbar: {
          generateRadioMenuEntry<D, T>(options) => void;
          generateSelectMenuEntry<D, T>(options) => void;
      }
      • generateRadioMenuEntry:function
        • Helper function, to generate a Radio Menu Entry for a Toolbar.

          Export

          Returns

          Type Parameters

          Parameters

          • options: {
                items: T[];
                onSelect: ((data, item) => void);
                selected?: string;
            }

            The Options to define the radio-menu. Must contain items and a onSelect callback.

            • items: T[]

              The Toolbar Entries.

            • onSelect: ((data, item) => void)
                • (data, item): void
                • Callback, that should be called on selecting a radio-box item.

                  Parameters

                  • data: D
                  • item: T

                  Returns void

            • Optional selected?: string

              The Id of the already selected radio-element

          Returns void

      • generateSelectMenuEntry:function
        • Helper to render a Select Toobar.

          Type Parameters

          Parameters

          • options: {
                items: (string | T)[];
                onSelect: ((data, selection) => void);
                selected?: string;
                text: string;
            }
            • items: (string | T)[]

              The Items which can be selected

            • onSelect: ((data, selection) => void)
                • (data, selection): void
                • Parameters

                  • data: D
                  • selection: {
                        [index: string]: boolean;
                    }
                    • [index: string]: boolean

                  Returns void

            • Optional selected?: string

              The Selected Item

            • text: string

              The Text to Show

          Returns void

    • createLayout:function
      • Helper to create a W2UI Layout

        Returns

        Parameters

        Returns {
            layout: {
                destroy: (() => void);
                element: any;
                layout: any;
            };
            panels: IPossiblePanels;
        }

        • layout: {
              destroy: (() => void);
              element: any;
              layout: any;
          }
          • destroy: (() => void)
              • (): void
              • Returns void

          • element: any
          • layout: any
        • panels: IPossiblePanels
  • logging: {
        log(level, sender, message) => any;
        toast(level, sender, message) => any;
    }
  • ui: {
        fullscreen: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>;
        closeFullscreen() => void;
        getTheme() => IUiTheme;
        openFullscreen() => void;
    }
  • url: {
        generateLinkWithQueryParams(...objects) => Promise<string>;
        getObjectFromQuery(simpleSchema) => Promise<false | {
            [index: string]: any;
        }>;
        getObjectFromQueryWithSchema(schema) => Promise<false | {
            [index: string]: any;
        }>;
    }
    • generateLinkWithQueryParams:function
    • getObjectFromQuery:function
      • Extract the data based on some query parameters. The Parameters to use are provided in the schema object.

        Returns

        Parameters

        Returns Promise<false | {
            [index: string]: any;
        }>

    • getObjectFromQueryWithSchema:function
      • Helper to get an Object from a schema. The Schema must be from type Object and is only allowed to have types "number", "boolean", "integer", "string". If a different type is used an error is thrown.

        Returns

        Parameters

        Returns Promise<false | {
            [index: string]: any;
        }>

libraries: TLibraries
logger: ILogger
session: IUiDefinition

Contains the information about the session.

Generated using TypeDoc