mixin

Item

@Js
const mixin Item

Item wraps a data value for presentation with text, icon, and meta.

constructors make

Construct wrapped data

fields nullVal

Constant for null value

methods compare

Sorting

data

Wrapped data value

dis

Presentation text string

get

Convenience for meta.get

has

Convenience for meta.has

icon

Presentation icon if available

id

Get the item id

isCollection

Return if this item an subtype of ItemCollection

isNull

Is this the special nullVal constant

meta

Metadata

missing

Convenience for meta.missing

sni

Get the item subject navigation identifier

spec

Spec type for this item resolved from data

text

Presentation text

toStr

Return text display

compare Int compare(Obj that)

Sorting

data abstract Obj data()

Wrapped data value. Use isNull to check for null data

dis virtual Str dis()

Presentation text string

get @Operator
virtual Obj? get(Str name)

Convenience for meta.get

has virtual Bool has(Str name)

Convenience for meta.has

icon abstract Icon? icon()

Presentation icon if available

id abstract Ref id()

Get the item id

isCollection virtual Bool isCollection()

Return if this item an subtype of ItemCollection

isNull Bool isNull()

Is this the special nullVal constant

make static new make(Obj? data, Icon? icon := null, Obj? text := null, Dict? meta := null)

Construct wrapped data:

  • if data is null then return nullVal constant
  • if data is Item, return it
  • text is normalized via Text.fromData
  • if meta is data if Dict, otherwise empty dict
  • id/sni comes from meta or is auto-generated

meta abstract Dict meta()

Metadata

missing virtual Bool missing(Str name)

Convenience for meta.missing

nullVal const static Item : nullVal

Constant for null value

sni abstract Sni sni()

Get the item subject navigation identifier

spec virtual Spec spec()

Spec type for this item resolved from data

text abstract Text text()

Presentation text

toStr virtual Str toStr()

Return text display

Haxall 4.0.7 ∙ 27-Oct-2026 09:10 EDT