API Overview
The public API surface of ecmind-blue-dashlet — the enaio Dashlet API,
framework-agnostic. Importing the package self-registers
window.osDashletInit and the buffering message listener at import time
(no host event can be missed before configuration); the first statement of
your own top level should then be the
installDashletGlobal call.
1. Entry point and configuration
-
installDashletGlobal(options?)— installs the host-called global and returns theDashlethandle -
DashletOptions—expectedOrigin,timeoutMs,pollIntervalMs,detectionTimeoutMs,window
2. The Dashlet instance
-
the
Dashletobject — full member surface -
init— the promise that resolves exactly once with the normalized context (in every environment, including the standalone degraded state) -
onInit()— subscribe to init emissions -
onUpdate()— the reserved update slot -
onError()— subscribe to failures -
call(method, params?)— thin string-based passthrough to the host (same wire posts as the facade below) -
getWebclientApi()— the webclient handle: the seven endpoints + rawcall, asynchronous (cached) -
getRichClientApi()— the rich-client handle: the fullosjx*bridge +has()+ rawcall, synchronous (cached) -
destroy()— stop polling, remove listeners, detach the wire (documented on theDashletpage)
3. Portable facade (host-agnostic)
One call serves both the webclient and the rich client; the library selects the wire/bridge mapping from the resolved environment. Standalone: every method rejects with the bounded timeout error.
-
openIndexData(options)— index-data view, read-only or editable -
openObject(objectId)— the object in its natural view -
openLocation(options)— the object’s location (folder/register view) -
openHitListByIds(options)— a mixed hit list with the given objects -
refreshHitListObjects(ids)— refresh objects in open hit lists -
getSelectedObjects()— the selection, normalized identically in both clients -
resetSessionTimeout()— session-timeout reset (rich client: documented no-op)
4. Types and error model
-
InitContext— the single normalized context shape, incl. the security note on host strings -
SelectedEntry— the selection element type, themainTypecomputation,SelectedObjectRef -
Error model —
TimeoutError, host errors, descriptive `TypeError`s, bounded semantics
5. Secondary API
Finer-grained primitives for consumers who reach below the facade:
-
WebclientWire— the postMessage wire class -
originMatches()— origin matching for the wire -
withTimeout()— the bounded-await timeout primitive -
Normalization helpers — selection, location, session and payload normalizers
-
Probe helpers — bridge capability probing