Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F4637352
radio.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
890 B
Referenced Files
None
Subscribers
None
radio.ts
View Options
import
{
Context
}
from
"koa"
;
import
{
FormField
}
from
"../fields/field.js"
;
import
{
FormDataValue
}
from
"../form-types.js"
;
import
{
Tickable
}
from
"./tickable.js"
;
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
text/x-java
Expires
Tue, May 27, 23:46 (3 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625465
Default Alt Text
radio.ts (890 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment