跳到主要内容

ui/build/collection-runtime

ui/build/collection-runtime

Interfaces

CollectionRecordNoticeRegistry

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:57

The slots a record detail's header offers its descendants. The form hands up its record-state notice (the read-only lock, a pending approval) and a RecordShell hands up its state icon and pill, which lead the record label, and its actions, which sit with the header's controls; the header owns placement, so record state sits in the chrome instead of scrolling away with the body.

Methods

registerActions()
registerActions(actions): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:63

The record's own actions (a RecordShell's actions), placed beside the header's controls.

Parameters
Parameter Type
actions Snippet<[]> | null
Returns

void

registerKind()
registerKind(kind): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:61

What the record is, in the reader's words; the header names it instead of the collection.

Parameters
Parameter Type
kind string | null
Returns

void

registerNotice()
registerNotice(notice): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:58

Parameters
Parameter Type
notice Snippet<[]> | null
Returns

void

registerTrailing()
registerTrailing(trailing): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:59

Parameters
Parameter Type
trailing Snippet<[]> | null
Returns

void


CollectionSurface

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:6

Properties

readonly optional banner?: string | null;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:10

Static bolt:banner URL declared on the collection's +representation.svelte, if any.

representation?
readonly optional representation?: Component<{
}, {
}, string>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:7

representationFailure?
readonly optional representationFailure?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:12

Why the authored representation could not be loaded, when there was one and it failed.

representationLoading?
readonly optional representationLoading?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:8


CollectionSurfaceRuntime

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:15

Properties

appId
readonly appId: () => string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:16

Returns

string

surfaces
readonly surfaces: CollectionSurfaceRegistry;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:17

Methods

claimView()
claimView(view): () => void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:18

Parameters
Parameter Type
view string
Returns

() => void

Type Aliases

CollectionClientGetter

type CollectionClientGetter = () => CollectionClient<ErasedCollectionRegistry>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:5

Returns

CollectionClient<ErasedCollectionRegistry>


CollectionSurfaceRegistry

type CollectionSurfaceRegistry = Readonly<Record<string, CollectionSurface>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:14

Functions

getCollectionClientContext()

function getCollectionClientContext(): CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:20

Returns

CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>


getCollectionClientForSurface()

function getCollectionClientForSurface(candidate, surfaceName): CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:31

Parameters

Parameter Type
candidate object
surfaceName string

Returns

CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>


getCollectionRecordScope()

function getCollectionRecordScope(): (() => string | undefined) | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:50

Returns

(() => string | undefined) | undefined


getCollectionSurfaceRuntime()

function getCollectionSurfaceRuntime():
  | CollectionSurfaceRuntime
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:35

Returns

| CollectionSurfaceRuntime | undefined


getOptionalCollectionClientContext()

function getOptionalCollectionClientContext():
  | CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:21

Returns

| CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>> | undefined


getOptionalCollectionClientGetter()

function getOptionalCollectionClientGetter():
  | CollectionClientGetter
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:29

Captures the context capability without freezing the client it currently resolves.

Host projections can replace their in-memory client when asynchronously loaded rows arrive. A record detail therefore keeps this getter and reads it inside derived state, while ordinary callers retain getOptionalCollectionClientContext() as the one-shot convenience.

Returns

| CollectionClientGetter | undefined


getOptionalCollectionRecordNoticeContext()

function getOptionalCollectionRecordNoticeContext():
  | CollectionRecordNoticeRegistry
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:66

Returns

| CollectionRecordNoticeRegistry | undefined


resolveCollectionClient()

function resolveCollectionClient<TCollections>(candidate): CollectionClient<TCollections> | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:30

Type Parameters

Type Parameter Default type
TCollections extends Readonly<Record<string, CollectionType<CollectionRecord, object, object>>> Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>

Parameters

Parameter Type
candidate object

Returns

CollectionClient<TCollections> | undefined


resolveCollectionSurface()

function resolveCollectionSurface(registry, collectionName):
  | CollectionSurface
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:33

Parameters

Parameter Type
registry | Readonly<Record<string, CollectionSurface>> | undefined
collectionName string

Returns

| CollectionSurface | undefined


resolveCollectionViewKey()

function resolveCollectionViewKey(
   view,
   fallback,
   recordScope): string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:73

The persistence key a collection surface saves its view state under.

Composed rather than concatenated at each call site so the table and the board agree on the shape, and so a nested surface inside a record detail cannot accidentally share the outer key.

Parameters

Parameter Type
view string | undefined
fallback string
recordScope string | undefined

Returns

string


setCollectionClientContext()

function setCollectionClientContext(context): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:32

Parameters

Parameter Type
context () => CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord>>>>

Returns

void


setCollectionRecordNoticeContext()

function setCollectionRecordNoticeContext(registry): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:65

Parameters

Parameter Type
registry CollectionRecordNoticeRegistry

Returns

void


setCollectionRecordScope()

function setCollectionRecordScope(scope): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:49

The record a detail surface is currently mounted for, as a view-persistence scope segment.

A table nested inside a +representation.svelte shows one record's children, so its saved columns/filters/sort must be keyed per parent record — otherwise every employee shares one "employments" view. Authored source used to build that key by interpolating the parent's id, which is exactly the system column authored code must not reach into. The surface that mounts the representation already knows the id, so it publishes it here and view stays a readable, stable name the author chose.

A getter rather than a value: the mounting surface's active record is reactive state, and the scope has to follow it without the consumer re-reading context.

Parameters

Parameter Type
scope () => string | undefined

Returns

void


setCollectionSurfaceRuntime()

function setCollectionSurfaceRuntime(runtime): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:34

Parameters

Parameter Type
runtime CollectionSurfaceRuntime

Returns

void

References

getRelationshipDirectoryContext

Re-exports getRelationshipDirectoryContext


setRelationshipDirectoryContext

Re-exports setRelationshipDirectoryContext