Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010608
form-control.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
713 B
Referenced Files
None
Subscribers
None
form-control.ts
View Options
import
Router
from
"@koa/router"
;
import
{
Context
}
from
"koa"
;
import
{
FlatTemplatable
}
from
"tempstream"
;
import
{
FormDataValue
,
FormMessage
}
from
"../form-types.js"
;
export
class
FormControlContext
{
constructor
(
public
ctx
:
Context
,
public
data
:
Record
<
string
,
FormDataValue
>
,
public
messages
:
FormMessage
[],
public
field_name_prefix
:
string
,
public
form_id
:
string
,
public
validate
:
boolean
)
{}
}
export
abstract
class
FormControl
{
abstract
render
(
fctx
:
FormControlContext
)
:
FlatTemplatable
|
Promise
<
FlatTemplatable
>
;
abstract
role
:
"input"
|
"decoration"
|
"messages"
|
"submit"
;
// eslint-disable-next-line @typescript-eslint/no-empty-function
mount
(
_router
:
Router
)
{}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:45 (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
635439
Default Alt Text
form-control.ts (713 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment