Svelte · Screens
RecordScreen
No summary has been written for RecordScreen. Everything below is generated from the declaration shipped in 0.57.40 and describes the real contract.Public export
typescript
import { RecordScreen } from '@happyvertical/smrt-svelte/screens';- Import path
@happyvertical/smrt-svelte/screens- Props
- 36
- Props described
- 32 of 36
- Bindable state
- 0
- Callback events
- 5
- Verified release
- 0.57.40
Props
NameTypeRequiredDescription
definitionScreenCollectionDefinitionYesNot describedpolicyScreenPolicy | nullNoResolved field policy for the same object; omit for the code seed.recordScreenRecordYesNot describedrelationsreadonly ScreenRelation[]NoRelations of this model (`deriveScreenRelations`).modeRecordScreenModeYesNot describedloadersCoreWidgetLoadersNoLoaders of the core widgets; the shell registers them on a registry of its own and runs them in the browser with the record context. A widget without a loader is not offered (and a default using it is dropped).registryWidgetRegistryNoAn explicit registry (recipe widgets included) instead of one built from `loaders`.widgetContextOmit<WidgetLoadContext, 'overviewId' | 'record'>NoHost capabilities for the widget loads (a `fetch`, a client, the locale). `overviewId` and `record` are set by the screen.overviewOverviewDefinitionNoThe overview to render; defaults to `recordOverview(definition, relations)`.overrideOverviewOverride | nullNoThe stored layout override for this model kind (host-owned when given).onoverviewchange(override: OverviewOverride | null) => void | Promise<void>NoReceives the override after each layout edit (`null` = defaults).layoutEditingbooleanNoLayout edit mode; omit to follow the shell's layout editor.canCustomizebooleanNoWhether the viewer may customize the layout (default true).hrefFor(field: ScreenField, id: string) => string | undefinedNoLink for a reference field's value.labelsReadonly<Record<string, (id: string) => string | undefined>>NoDisplay labels for referenced records, keyed by target model id.viewAllHref(relation: ScreenRelation) => string | undefinedNo"View all" link of a related-records panel; `undefined` renders none.titlestringNoPage title. Defaults to the first basic text field, else the class name.fieldsreadonly string[]NoExplicit field names, in order (overrides the derived set).currencystringNoISO 4217 code used by money fields.lineItemStoredTotals() => StoredLineItemsTotals | undefinedNoFrozen document-money snapshot for the line-items widget. The host reads its own persisted rows (including per-component tax); this screen never recalculates them from visible lines.localestringNoBCP-47 locale for number and date formatting.backLabelstringNoLabel for the back action; defaults to the pluralized class name.deletingbooleanNoMutation in flight; locks the delete confirmation.submittingbooleanNoTrue while the host is persisting the edit; locks the form.fieldErrorsReadonly<Record<string, string>>NoServer-reported field messages for the edit form, keyed by field name.errorstring | nullNoA form-level failure message from the host.onback() => voidNoNot describedonedit() => voidNoWhen set, an Edit action is offered (the host switches `mode`).oncancel() => voidNoCloses the edit form (Cancel, the sheet's close button, Escape).onsaveEditFormProps['onsubmit']NoReceives the edit form's wire-ready values; `EditFormProps['onsubmit']`.ondelete() => void | Promise<void>NoWhen set, Delete (with a confirmation) is offered in the overflow menu.extraActionsSnippetNoExtra actions, rendered in the header's overflow menu before Delete.statusTonesReadonly<Record<string, RecordStatusTone>>NoBadge tone per status value (`paid: 'success'`); unmapped values use `DEFAULT_STATUS_TONES`, else neutral.childrenSnippetNoExtra content under the fields, inside the details card.derivedFieldsreadonly string[]NoThe edit form's derived (read-only, never submitted) fields. Defaults to the subtotal / discount / tax / total role fields when the model has an `items` relation, else none.itemsSnippetNoEditable line items (the host's own editor), rendered under the edit form: in the edit column on desktop and inside the edit sheet on phones, so lines are editable on a phone too.Bindable state
This component has no bindable public state.
Callback events
onoverviewchange(override: OverviewOverride | null) => void | Promise<void>onback() => voidonedit() => voidoncancel() => voidondelete() => void | Promise<void>