Layout - FlatLayoutFinalizer
Layout.FlatLayoutFinalizerA
LayoutBuilder to display in the UI from a TableBuilder.Type parameters
Name | Type |
---|---|
T | extends FlatLayoutBuilderType = FlatLayoutBuilderType |
Hierarchy
-
Builder
↳
FlatLayoutFinalizer
Layout
chat
▸ chat(def
):
FlatLayoutFinalizer
Add a
HeaderBuilder to display in the Layout.Parameters
Name | Type | Description |
---|---|---|
def | (panel : ChatBuilder ) => ChatBuilder | the HeaderBuilder to embed. |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
float: FloatType,
min_float: FloatType,
max_float: FloatType,
integer: IntegerType,
boolean: BooleanType,
})
)
);
// a stream containing a number
const number = Stream("My Number Stream", FloatType)
// a stream containing a string
const string = Stream("My String Stream", StringType)
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.integer("Integer", fields => fields.integer)
.boolean("Boolean", fields => fields.boolean)
)
.header(builder => builder
.item("A number", number)
.item("A string", string)
)
.toTemplate()
downloadsToolbar
▸ downloadsToolbar(show
):
FlatLayoutFinalizer
Define if the
Task button and menu will visible within a LayoutBuilder.Parameters
Name | Type | Description |
---|---|---|
show | false | toolbar button will be displayed if true |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
})
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.showKey(false)
)
.downloadsToolbar(true, {
label: "Tasks",
streams: {
"My STream": stream
}
})
.toTemplate()
errorsToolbar
▸ errorsToolbar(show
):
FlatLayoutFinalizer
Define if the
Task button and menu will visible within a LayoutBuilder.Parameters
Name | Type | Description |
---|---|---|
show | false | toolbar button will be displayed if true |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
})
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.showKey(false)
)
.errorsToolbar(true, { label: "Problems" })
.toTemplate()
header
▸ header(def
):
FlatLayoutFinalizer
Add a
HeaderBuilder to display in the Layout.Parameters
Name | Type | Description |
---|---|---|
def | (panel : HeaderBuilder ) => HeaderBuilder | the HeaderBuilder to embed. |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
float: FloatType,
min_float: FloatType,
max_float: FloatType,
integer: IntegerType,
boolean: BooleanType,
})
)
);
// a stream containing a number
const number = Stream("My Number Stream", FloatType)
// a stream containing a string
const string = Stream("My String Stream", StringType)
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.integer("Integer", fields => fields.integer)
.boolean("Boolean", fields => fields.boolean)
)
.header(builder => builder
.item("A number", number)
.item("A string", string)
)
.toTemplate()
targetsToolbar
▸ targetsToolbar(show
):
FlatLayoutFinalizer
Define if the
Stream targets button and menu will visible within a LayoutBuilder.Parameters
Name | Type | Description |
---|---|---|
show | false | toolbar button will be displayed if true |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
})
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.showKey(false)
)
.targetsToolbar(true, { label: "Recommendations", show_targets: true })
.toTemplate()
tasksToolbar
▸ tasksToolbar(show
):
FlatLayoutFinalizer
Define if the
Task button and menu will visible within a LayoutBuilder.Parameters
Name | Type | Description |
---|---|---|
show | false | toolbar button will be displayed if true |
Returns
FlatLayoutFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
})
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
.showKey(false)
)
.tasksToolbar(true, { label: "Tasks", show_idle: false })
.toTemplate()
toTemplate
▸ toTemplate():
Template
Convert the built layout into an
Template, for usage in an EDK project.Returns
Template
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
string: StringType,
date: DateTimeType,
})
)
);
// add a form to a tab
const layout = new LayoutBuilder("My Layout")
.table(50, "My Table", builder => builder
.fromStream(stream)
.date("Date", fields => fields.date)
.string("String", fields => fields.string)
)
.toTemplate()
Overrides
Builder.toTemplate