Mixins / foldkit-mixins-ui

FileUploadView

interface · packages/mixins-ui/src/fileUpload.ts:871

interface FileUploadView<Outer> {
  readonly model: Model
  readonly onMessage: (message: Message) => NoInfer<Outer>
  readonly label: string
  readonly name?: string | undefined
  readonly required?: boolean | undefined
  readonly disabled?: boolean | undefined
  readonly readOnly?: boolean | undefined
  readonly invalid?: boolean | undefined
  readonly description?: string | undefined
  readonly picture?: ((url: Option.Option<string>) => Html) | undefined
  readonly itemActions?: ((entry: Entry) => ReadonlyArray<Html>) | undefined
  readonly progress?: Progress | undefined
  readonly routes?: ReadonlyArray<Route<NoInfer<Outer>>> | undefined
  readonly sort?:
    | {
        readonly input: unknown
        readonly mixin: MixinValue<Outer>
      }
    | undefined
  readonly words?: Partial<FileUploadWords> | undefined
  readonly style?: NamedStyle<typeof FileUploadSlots> | undefined
  readonly mixins?: MixinList<Outer> | undefined
}

Members

FileUploadView.model

property · packages/mixins-ui/src/fileUpload.ts:872

readonly model: Model

FileUploadView.onMessage

property · packages/mixins-ui/src/fileUpload.ts:874

readonly onMessage: (message: Message) => NoInfer<Outer>

Lifts the field's own Messages into the application's.

FileUploadView.label

property · packages/mixins-ui/src/fileUpload.ts:876

readonly label: string

Names the input (the picker's words) and the list.

FileUploadView.name

property · packages/mixins-ui/src/fileUpload.ts:878

readonly name?: string | undefined

The form field the local files submit under. Give none when lanes sends them.

FileUploadView.required

property · packages/mixins-ui/src/fileUpload.ts:880

readonly required?: boolean | undefined

The native required.

FileUploadView.disabled

property · packages/mixins-ui/src/fileUpload.ts:882

readonly disabled?: boolean | undefined

The input takes no pick or drop, and the buttons are off.

FileUploadView.readOnly

property · packages/mixins-ui/src/fileUpload.ts:884

readonly readOnly?: boolean | undefined

No picker, remove or grip is drawn; the input stays, so a form still posts.

FileUploadView.invalid

property · packages/mixins-ui/src/fileUpload.ts:885

readonly invalid?: boolean | undefined

FileUploadView.description

property · packages/mixins-ui/src/fileUpload.ts:886

readonly description?: string | undefined

FileUploadView.picture

property · packages/mixins-ui/src/fileUpload.ts:888

readonly picture?: ((url: Option.Option<string>) => Html) | undefined

Draws the single-image face (an avatar, a cover) in the picker: given the first entry's image address. The list is not drawn.

FileUploadView.itemActions

property · packages/mixins-ui/src/fileUpload.ts:890

readonly itemActions?: ((entry: Entry) => ReadonlyArray<Html>) | undefined

Extra buttons in a row's actions, such as a download or a zoom.

FileUploadView.progress

property · packages/mixins-ui/src/fileUpload.ts:892

readonly progress?: Progress | undefined

Draws an uploading entry's progress; built by the application (FileUploadProgress.make).

FileUploadView.routes

property · packages/mixins-ui/src/fileUpload.ts:894

readonly routes?: ReadonlyArray<Route<NoInfer<Outer>>> | undefined

Keys the application answers in the input, beside Enter and Space (which open the dialog) and Delete or Backspace.

FileUploadView.sort

property · packages/mixins-ui/src/fileUpload.ts:896

readonly sort?:
  | {
      readonly input: unknown
      readonly mixin: MixinValue<Outer>
    }
  | undefined

Draws a grip per row and marks the list sortable: the sort Behavior is the application's (Reorder.behavior), given with the model it reads.

FileUploadView.words

property · packages/mixins-ui/src/fileUpload.ts:897

readonly words?: Partial<FileUploadWords> | undefined

FileUploadView.style

property · packages/mixins-ui/src/fileUpload.ts:899

readonly style?: NamedStyle<typeof FileUploadSlots> | undefined

A style of FileUploadSlots, for the field's look.

FileUploadView.mixins

property · packages/mixins-ui/src/fileUpload.ts:901

readonly mixins?: MixinList<Outer> | undefined

Mixins beside the style.