Overview

UIX

type raw_content

Definition:Blob | Response

type html_content

Definition:Datex.CompatValue | null | raw_content

TODO

type html_content_or_generator

Definition:html_content | html_generator

type html_content_or_generator_or_preset

Definition:html_content_or_generator | RenderPreset

type EntrypointRouteMap

Definition:{}

type Entrypoint

Definition:_Entrypoint | Promise

interface RouteManager

handles routes internally

interface RouteHandler

redirects to other Entrypoints for specific routes

Constructors

constructor(path: Path.representation)

Constructors

constructor(entrypoint: Entrypoint)

transforms entrypoint content to a new entrypoint content

class RenderPresetR

<extends RenderMethod, T extends html_content_or_generato>

Constructors

constructor(__render_method: R, __content: T)

function 

();

Default: Server side prerendering, content hydration over DATEX

  • @param content: HTML element or text content

function 

();

Default: Server side prerendering, replacing with content on frontend

  • @param content: HTML element or text content

function 

();

Just serve static HTML pages to the frontend, + some frontend JS for functionality, but content is not loaded over DATEX

  • @param content: HTML element or text content

function 

();

Just serve static HTML pages to the frontend, no frontend JS at all

  • @param content: HTML element or text content

function 

();

No server side prerendering, loading all content over DATEX

  • @param content: HTML element or text content

function 

();

function provideValue

provideValue(
  value: unknown,
  options?: {type?: Datex.DATEX_FILE_TYPE,formatted?: boolean,}
);

serve a value as raw content (DX, DXB, JSON format)

  • @param value: any JS value (must be JSON compatible if JSON is used as the content type)
  • @param options: optional options: type: Datex.FILE_TYPE (DX, DXB, JSON) formatted: boolean if true, the DX/JSON is formatted with newlines/spaces
  • @return blob containing DATEX/JSON encoded value

function provideContent

provideContent(
  content: string | ArrayBuffer,
  type: mime_type,
  status?: number
);

serve a string/ArrayBuffer with a specific mime type

  • @param content: 'file' content
  • @param type: mime type
  • @return content blob

function provideError

provideError(
  message: string,
  status: any
);

serve an errror with a status code and message

  • @param message: error message
  • @param status: http status code
  • @return content blob

function 

();

Render the current state of the element as HTML and cache for SSR

  • @param content: undefined
  • @param render_method: undefined
  • @return undefined

function 

();

function preloadElementOnBackend

preloadElementOnBackend(
  entrypoint: HTMLElement | DocumentFragment
);

function refetchRoute

refetchRoute(
  route: Path.route_representation,
  entrypoint: Entrypoint,
  context?: UIX.Context
);

gets the part of the route that is calculated without internal routing (RouteManager). Recalculate the current path from the inner Routing Handler if it exists

  • @param route: undefined
  • @param entrypoint: undefined
  • @param context: undefined
  • @return undefined

Did this doc help you?

Privacy Policy

Help us improving our docs

Our documentations are fully open source. Something is wrong or unclear? Edit documentation.

Make a contribution