Layout - FieldFinalizer
Layout.FieldFinalizerDefine a fields within a Table Collection within a
LayoutBuilder.Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
string: StringType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.string("String", fields => fields.string)
)
)
.toTemplate()
Type parameters
| Name | Type |
|---|---|
T | extends StructType = StructType |
Inputs | extends Record = Record |
Fields | extends Record = Record |
Layout
boolean
▸ boolean(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
BooleanType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf | (fields: StructToFields) => EastFunction ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
boolean: BooleanType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.boolean("Boolean", fields => fields.boolean)
)
)
.toTemplate()
date
▸ date(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
DateTimeType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; max?: Date | (fields: StructToFields, inputs: Inputs) => EastFunction ; min?: Date | (fields: StructToFields, inputs: Inputs) => EastFunction ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: Date | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf | (fields: StructToFields) => EastFunction ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
date: DateTimeType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.date("Date", fields => fields.date)
)
)
.toTemplate()
disableDelete
▸ disableDelete():
FieldFinalizer
Disable row delete for the
FieldFinalizer within a LayoutBuilder.Returns
FieldFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
date: DateTimeType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder
.date("Date", fields => fields.date)
.disableDelete()
)
)
.toTemplate()
disableInsert
▸ disableInsert():
FieldFinalizer
Disable row insert for the
FieldFinalizer within a LayoutBuilder.Returns
FieldFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
date: DateTimeType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder
.date("Date", fields => fields.date)
.disableInsert()
)
)
.toTemplate()
float
▸ float(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
FloatType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; max?: number | (fields: StructToFields, inputs: Inputs) => EastFunction ; min?: number | (fields: StructToFields, inputs: Inputs) => EastFunction ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: number | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf | (fields: StructToFields) => EastFunction ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
float: FloatType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.float("Float", fields => fields.float)
)
)
.toTemplate()
integer
▸ integer(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
IntegerType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; max?: bigint | (fields: StructToFields, inputs: Inputs) => EastFunction ; min?: bigint | (fields: StructToFields, inputs: Inputs) => EastFunction ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: bigint | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf | (fields: StructToFields) => EastFunction ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
integer: IntegerType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.integer("Integer", fields => fields.integer)
)
)
.toTemplate()
set
▸ set(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
StringType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; range?: Set | Map<string, Set> | (fields: StructToFields, inputs: Inputs) => EastFunction<SetType> | EastFunction<DictType<StringType, SetType>> ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: Set | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf<PrimitiveType | SetType> | (fields: StructToFields) => EastFunction<PrimitiveType | SetType> ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
set: SetType(StringType)
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.set("Set", fields => fields.set)
)
)
.toTemplate()
string
▸ string(name, def):
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Define a
StringType input in a FieldFinalizer within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type | Description |
|---|---|---|
name | Name extends keyof Fields ? never : Name | the display name for the field label |
def | Omit<{ background?: string | (fields: StructToFields) => EastFunction ; color?: string | (fields: StructToFields) => EastFunction ; display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; hidden?: boolean ; hidden_detail?: boolean ; range?: Set | Map<string, Set> | (fields: StructToFields, inputs: Inputs) => EastFunction<SetType> | EastFunction<DictType<StringType, SetType>> ; readonly?: boolean | (fields: StructToFields, inputs: Inputs) => EastFunction ; target?: string | (fields: StructToFields, inputs: Inputs) => EastFunction ; target_display?: (fields: StructToFields, inputs: Inputs) => EastFunction ; tooltip?: ValueTypeOf | (fields: StructToFields) => EastFunction ; value: (fields: StructToFields) => Variable }, "hidden"> | the definition of the field input |
Returns
FieldFinalizer<T, Inputs, Fields & { [K in string]: PrimitiveFieldType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
dict: DictType(
StringType,
StructType({
string: StringType
})
),
})
)
);
// create a form in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.dict("Array", fields => fields.dict, builder =>
builder.string("String", fields => fields.string)
)
)
.toTemplate()