@runic-artifex/angular

Version 0.7.0-preview.5. Read from the published package.

@runic-artifex/angular

CollectionViewport re-export
export { CollectionViewport } from '@runic-artifex/views'

Re-exported from CollectionViewport.

CollectionViewportOptions re-export
export { CollectionViewportOptions } from '@runic-artifex/views'

Re-exported from CollectionViewportOptions.

CommandHandle interface
injectCollectionViewport function
function injectCollectionViewport(element: Signal<ElementRef<HTMLElement> | HTMLElement | null | undefined>, options: () => CollectionViewportOptions, { injector: provided }?: InjectCollectionViewportOptions): Signal<CollectionViewport>;

Follows a fixed-row-height scroll container and returns the rows to request from .NET as a signal. Pass the container, for example viewChild<ElementRef<HTMLElement>>("scroller"), and the list options as a signal or function, then send start and size to the ViewModel from an effect.

InjectCollectionViewportOptions interface
injectCommand function
function injectCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn, options?: InjectCommandOptions): CommandHandle<TArgs, Awaited<TReturn>>;

Tracks a command's pending state and failure as signals for the lifetime of the injection context. The command may read signals, such as a client:

readonly increment = injectCommand(() => this.counter.client()?.increment());
// <button [disabled]="!counter.client() || increment.pending()" (click)="increment.run()">
InjectCommandOptions interface
injectView function
function injectView<TClient extends ViewClient>(source: Signal<ViewSource<TClient>> | ViewSource<TClient>, options?: InjectViewOptions<TClient>): ViewHandle<TClient>;

Connects a generated View reference for the lifetime of the injection context (normally a component) and exposes its state as signals. Pass a signal, such as a page input, to follow it: a changed reference releases the previous client and connects the new one. A reference is identified by its connect function, so a signal producing a new { connect: connectShell } object does not reconnect.

InjectViewOptions interface
RunicViewOutlet class

Headless host for a selected logical .NET View. A changed reference remounts its component.

ViewClient re-export
export { ViewClient } from '@runic-artifex/views'

Re-exported from ViewClient.

ViewConnector re-export
export { ViewConnector } from '@runic-artifex/views'

Re-exported from ViewConnector.

ViewHandle interface
ViewReference re-export
export { ViewReference } from '@runic-artifex/views'

Re-exported from ViewReference.

ViewRegistry type alias
type ViewRegistry<R extends ViewReference> = {
    readonly [K in R["kind"]]: Type<{
        readonly page: InputSignal<Extract<R, {
            readonly kind: K;
        }>>;
    }>;
};

A build-known map checks each generated reference against its component input.

ViewSource re-export
export { ViewSource } from '@runic-artifex/views'

Re-exported from ViewSource.