Global

Members

Single-point-of truth definition for which routes to be placed in navigation menus. Array order is explicit.

Source:

(constant) Project

Use this for any communication with the backend in regards with Projects.

Source:

(constant) Routes

This is the client-side definition of the app routes. Use this as the single-point-of truth when dealing with routes. Optimally, if changes need to be done, you only have to attempt them in this module.

Source:

(constant) attemptAsync

Wraps any async call into a try/catch directive and fires a flash message when an error occurs

Source:

dragStarter

The id of the item that was used to start the dragging.

Source:

dragTarget

The current target that is dragged over by the one, used to start dragging.

Source:

(constant) flashMessage

Globally available notification (flash-message) invoker.

Source:

(constant) getUserColor

Generates a color code, specifically related to this user's email. Same inputs generate the same color.

Source:

(constant) registerGlobalRequestHook

Source:

(constant) request

Sends an HTTP request to the backend but does not throw on error but instead returns an object that contains a response and error property.

Source:

(constant) segmentize

Transform selections into segments with one or more related code, depending on the overlap (intersection) of selections.

Inspired by Klee's 1D Measure Problem algorithm (union of intervals), the result is a list of segments with related codes, representing overlapping of selections of arbitrary depth.

The input is a list of selections, where each entry contains a start (x), an end (y) and a related code (c).

The time complexity is influenced by two factors

  • the size of the input N
  • the sorting of the 2N-sized point vector
  • the size of the potential range of indexes

Choosing a different sorting (e.g. integer based) one could improve on the overall complexity.

The space complexity

Author:
  • Jan Küster
Source:

(constant) transformSchema

Transforms a given schema into a normalized form that is easily readable and processable by the AutoForm component and it's children

Source:

(constant) useDragTarget

Keeps track of the current drag/drop operation involved entities.

Source:

(constant) useEcho

Helper to initialize and retrieve the Websocket client (Echo).

Source:

(constant) useFiles

Provides upload and download functionality for files (REFI:sources). As a composable it enables to run independent of the current template, which allows to handle uploads, while switching routes, as long as there is no full page reload.

Source:

(constant) useFlashMessage

This is used to listen to incoming flash messages, usually only used by the templates that implement the actual notification components.

Source:

(constant) useProjects

Manage projects across pages.

Source:

(constant) useRange

Composable for editor selection ranges

Source:

(constant) useResizeObserver

Creates a new reactive observer that triggers on window/screen resize. This is useful, if you want to implement responsive visualizations, relative to the current window size.

Source:

(constant) useWebSocketConnection

Exposes the state of the current websocket connection that is a requirement for collaborative features.

Source:

Methods

(async) downloadSource(source) → {Promise.<void>}

Attempts to request a given source as downloadable content and invokes an immediate download by virtually clicking a temporary blob file.

Parameters:
Name Type Description
source object
Source:
Returns:
Type
Promise.<void>

isCurrent(name) → {boolean}

Parameters:
Name Type Description
name
Source:
Returns:
Type
boolean

(async) transcribeFile(file, source, projectId) → {Promise.<*>}

This is specific to audio files, where transcription is expected. TODO: replace with generic transformFile implementation, once plugin protocol is final

Parameters:
Name Type Description
file
source
projectId
Source:
Returns:
Type
Promise.<*>

(async) uploadFile(file, source, projectId) → {Promise.<*>}

Actual file upload request to the backend. Note the source is expected to already exist as part of the optimistic UI.

Parameters:
Name Type Description
file File
source object
projectId string
Source:
Returns:
Type
Promise.<*>

Type Definitions

BackendRequestOptions

Type:
  • object
Properties:
Name Type Attributes Description
url string

the url, use {query} to add url query parameters

type string

the request type (get, post etc.)

body object <nullable>

a dictionary object for body parameters

query object <nullable>

a dictionary object of query parameters

headers object <nullable>

a dictionary object of additional request headers

Source:

Document

A document is an object with at least an id property and optionally more arbitrary properties.

Properties:
Name Type Description
id number

the id of the document

Source:

Route

Type:
  • object
Properties:
Name Type Description
key string

the unique key of the route-resolver

name string

the unique name of this property within the {Route} context

label string

the human-readable label of this route

path function

a function, resolving to a href-path by given optional args

Source:

Segment

Type:
  • object
Properties:
Name Type Description
x number

start index of this segment

y number

end index of this segment

c Set.<any>

the linked codes as deduplicated Set

Source:

SelectionEntry

Type:
  • object
Properties:
Name Type Description
x number

start index of this selection

y number

end index of this selection

c any

the linked code; the actual type is not relevant for operation

Source: