Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22424056
radio.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
875 B
Referenced Files
None
Subscribers
None
radio.ts
View Options
import
{
Context
}
from
"koa"
;
import
{
FormField
}
from
"../fields/field"
;
import
{
FormDataValue
}
from
"../form"
;
import
{
Tickable
}
from
"./tickable"
;
export
class
Radio
extends
Tickable
<
string
>
{
type
=
<
const
>
"radio"
;
constructor
(
public
field
:
FormField
<
boolean
,
string
>
,
public
value
:
string
,
options
:
{
label
?:
string
}
)
{
super
(
field
,
options
);
}
makeInputID
()
:
string
{
return
this
.
field
.
name
+
"-"
+
this
.
value
.
replaceAll
(
/\W/g
,
"-"
);
}
getValueAttribute
()
:
string
{
return
this
.
value
;
}
getWrapperClasses
(
ctx
:
Context
,
data
:
Record
<
string
,
FormDataValue
>
,
value
:
string
)
:
string
[]
{
return
[
...
super
.
getWrapperClasses
(
ctx
,
data
,
value
),
this
.
value
.
replaceAll
(
/\W/g
,
"-"
),
];
}
isChecked
(
_ctx
:
Context
,
_data
:
Record
<
string
,
FormDataValue
>
,
value
:
string
)
:
boolean
{
return
this
.
value
===
value
;
}
}
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 03:51 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1200824
Default Alt Text
radio.ts (875 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline