API Reference
Resources
Button
A button can be used to perform an action.
Initializers
bring ui;
new ui.Button(label: str, handler: IButtonHandler);
Name | Type | Description |
---|---|---|
| str | No description. |
|
| No description. |
label
Required
- Type: str
handler
Required
- Type: IButtonHandler
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.Button.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.Button.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Button.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
Field
A field can be used to display a value.
Initializers
bring ui;
new ui.Field(label: str, handler: IFieldHandler, props?: FieldProps);
Name | Type | Description |
---|---|---|
| str | No description. |
|
| No description. |
|
| No description. |
label
Required
- Type: str
handler
Required
- Type: IFieldHandler
props
Optional
- Type: FieldProps
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.Field.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.Field.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Field.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
FileBrowser
A file browser can be used to browse files.
Initializers
bring ui;
new ui.FileBrowser(label: str, handlers: FileBrowserHandlers);
Name | Type | Description |
---|---|---|
| str | No description. |
|
| No description. |
label
Required
- Type: str
handlers
Required
- Type: FileBrowserHandlers
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.FileBrowser.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.FileBrowser.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.FileBrowser.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
HttpClient
An HttpClient can be used to make HTTP requests.
Initializers
bring ui;
new ui.HttpClient(label: str, getUrlHandler: IHttpClientGetUrlHandler, getApiSpecHandler: IHttpClientGetApiSpecHandler);
Name | Type | Description |
---|---|---|
| str | No description. |
|
| No description. |
|
| No description. |
label
Required
- Type: str
getUrlHandler
Required
- Type: IHttpClientGetUrlHandler
getApiSpecHandler
Required
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.HttpClient.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.HttpClient.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.HttpClient.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
Section
A section can be used to group other visual components.
Initializers
bring ui;
new ui.Section(props?: SectionProps);
Name | Type | Description |
---|---|---|
|
| No description. |
props
Optional
- Type: SectionProps
Methods
Name | Description |
---|---|
| Adds a visual component to the section. |
| Adds a button to the section. |
| Adds a field to the section. |
add
add(...components: Array<VisualComponent>): void
Adds a visual component to the section.
The components will be rendered in the order they were added.
components
Required
- Type: VisualComponent
addButton
addButton(label: str, handler: IButtonHandler): void
Adds a button to the section.
Shorthand for add(new ui.Button(...))
.
label
Required
- Type: str
handler
Required
- Type: IButtonHandler
addField
addField(label: str, handler: IFieldHandler, props?: FieldProps): void
Adds a field to the section.
Shorthand for add(new ui.Field(...))
.
label
Required
- Type: str
handler
Required
- Type: IFieldHandler
props
Optional
- Type: FieldProps
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.Section.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.Section.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Section.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
Table
A table can be used to browse files.
Initializers
bring ui;
new ui.Table(handlers: TableHandlers);
Name | Type | Description |
---|---|---|
|
| No description. |
handlers
Required
- Type: TableHandlers
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.Table.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.Table.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Table.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
ValueField
A value field can be used to display a string value.
Initializers
bring ui;
new ui.ValueField(label: str, value: str);
Name | Type | Description |
---|---|---|
| str | No description. |
| str | No description. |
label
Required
- Type: str
value
Required
- Type: str
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.ValueField.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.ValueField.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.ValueField.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
VisualComponent
A visual component is used to customize the view of other classes in the Wing Console.
This is a base class for all other visual components.
Initializers
bring ui;
new ui.VisualComponent();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. |
| Returns whether the given construct is a visual component. |
onLiftType
bring ui;
ui.VisualComponent.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops
.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
host
Required
- Type: IInflightHost
ops
Required
- Type: MutArray<str>
toInflight
bring ui;
ui.VisualComponent.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.VisualComponent.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
node: Node;
- Type: constructs.Node
The tree node.
Structs
FieldProps
Props for Field
.
Initializer
bring ui;
let FieldProps = ui.FieldProps{ ... };
Properties
Name | Type | Description |
---|---|---|
| bool | Indicates that this field is a link. |
|
| How often the field should be refreshed. |
link
Optional
link: bool;
- Type: bool
- Default: false
Indicates that this field is a link.
refreshRate
Optional
refreshRate: duration;
- Type: duration
- Default: no automatic refresh
How often the field should be refreshed.
FileBrowserHandlers
File browser handlers.
Initializer
bring ui;
let FileBrowserHandlers = ui.FileBrowserHandlers{ ... };
Properties
Name | Type | Description |
---|---|---|
|
| Handler for deleting a file. |
|
| Handler for getting a file. |
|
| Handler for listing files. |
|
| Handler for putting a file. |
delete
Required
delete: IFileBrowserDeleteHandler;
Handler for deleting a file.
get
Required
get: IFileBrowserGetHandler;
- Type: IFileBrowserGetHandler
Handler for getting a file.
list
Required
list: IFileBrowserListHandler;
- Type: IFileBrowserListHandler
Handler for listing files.
put
Required
put: IFileBrowserPutHandler;
- Type: IFileBrowserPutHandler
Handler for putting a file.
SectionProps
Props for Section
.
Initializer
bring ui;
let SectionProps = ui.SectionProps{ ... };
Properties
Name | Type | Description |
---|---|---|
| str | The label of the section. |
label
Optional
label: str;
- Type: str
- Default: no label
The label of the section.
TableHandlers
Table handlers.
Initializer
bring ui;
let TableHandlers = ui.TableHandlers{ ... };
Properties
Name | Type | Description |
---|---|---|
|
| Handler for scanning rows. |
scan
Required
scan: ITableScanHandler;
- Type: ITableScanHandler
Handler for scanning rows.
Protocols
IButtonHandler
-
Extends: IInflight
-
Implemented By: IButtonHandler
Inflight client: @winglang/sdk.ui.IButtonHandlerClient
A resource with an inflight "handle" method that can be passed to Button
.
IButtonHandlerClient
- Implemented By: IButtonHandlerClient
Inflight client for IButtonHandler
.
Methods
Name | Description |
---|---|
| Function that peforms an action. |
handle
inflight handle(): void
Function that peforms an action.
IFieldHandler
-
Extends: IInflight
-
Implemented By: IFieldHandler
Inflight client: @winglang/sdk.ui.IFieldHandlerClient
A resource with an inflight "handle" method that can be passed to addField
.