Hierarchy

  • Utils

Methods

  • If the price lists have changed this function should be called to clear the internal cache. see getEaiwsPriceLists

    Parameters

    • pSession: EaiwsSession

    Returns void

  • If the project groups have changed this function should be called to clear the internal cache. see getEaiwsProjectGroups

    Parameters

    • pSession: EaiwsSession

    Returns void

  • This function will close the given eaiws session. If the given session is equal to wbkApp.user.eaiwsSession than EaiwsSession.session.loadEmptySession() will be used instead to clear the session.

    Parameters

    • pSession: EaiwsSession
    • Optional pForceClose: boolean

      If true the session will be closed even if it is the user session.

    Returns Promise<void>

  • Creates and initializes a new basket instance.

    Parameters

    • pSession: EaiwsSession

      Session the basket should operate on.

    • Optional pOptions: CreateBasketOptions

      Options for the created basket.

    Returns Promise<Basket>

  • Creates and prepares a new eaiws session using the current application settings. In case of a gatekeeper error a GatekeeperError will be thrown. Note: prepareEaiwsSession() will be also called internally.

    Parameters

    Returns Promise<EaiwsSession>

  • Returns string

  • Returns a download link for the given url using a CORS proxy. This can be used to prevent CORS errors if the server does not support CORS.

    Parameters

    • pUrl: string

    Returns string

  • Returns a list of price lists available for the given session. Note: The server response will be cached to speed up further calls.

    Parameters

    • pSession: EaiwsSession

    Returns Promise<PriceList[]>

  • Returns a list of project groups available for the given session. Note: The server response will be cached to speed up further calls.

    Parameters

    • pSession: EaiwsSession

    Returns Promise<ProjectGroup[]>

  • Returns a file name for the given project and extension.

    Parameters

    • pBasket: Basket

      Basket instance with loaded project

    • pFileExtension: string

      Extension of the file (e.g. ".obk")

    Returns Promise<string>

  • Parameters

    • pLanguage: string
    • pResourceVersion: string
    • pResourcesPath: string

    Returns Promise<i18n>

  • Returns boolean

  • Returns true if the ctrl key is currenty down. For Apple platforms the command (meta) key is checked instead.

    Parameters

    • pEvent: MouseEvent | KeyboardEvent

    Returns boolean

  • Returns boolean

  • Normalizes the given set of user restrictions. E.g. if edit is part of the set, all the other editing restrictions will be added also to the set.

    Parameters

    Returns void

  • Can be used to programmatically open a link.

    Parameters

    • pUrl: string
    • Optional pTarget: string

      Custom target for the link (default: _blank)

    Returns void

  • Should be called after starting a session to setup parameters like data language and locale of the session. Note: Will be called automatically from createEaiwsSession()

    Parameters

    • pSession: EaiwsSession

    Returns Promise<void>

  • Resizes an image if it exeeds the maximum size. The original image will be returned in case it does not need to be resized.

    Parameters

    Returns Promise<Blob>

  • Scrolls an html element into view if necessary.

    Parameters

    • pElement: HTMLElement

    Returns void

  • Starts the download of the given file while preventing the window.beforeunload event to be triggered. Note: This is not guaranteed to work for cross domain urls (e.g. for PDFs). In this case the file will be opened in a new tab.

    Parameters

    • pFileOrUrl: string | Blob | File
    • Optional pDownloadFilename: string

    Returns void

  • Uploads and resizes an image to an eaiws session while showing a progress. The url of the uploaded image will be returned. null will be returned if the upload was aborted by the user. Only PNG and JPG images are supported.

    Parameters

    Returns Promise<null | string>

  • Uploads a file to an eaiws session while showing a progress. The url of the uploaded file will be returned. null will be returned if the upload was aborted by the user.

    Parameters

    Returns Promise<null | string>

Generated using TypeDoc