Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22396213
pick-from-list-sealious.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
772 B
Referenced Files
None
Subscribers
None
pick-from-list-sealious.ts
View Options
import
{
FieldTypes
as
SealiousFieldTypes
}
from
"sealious"
;
import
{
PickFromListField
}
from
"./pick-from-list.js"
;
import
{
ExtractedFieldInfo
}
from
"../../utils/extract-fields-from-collection.js"
;
export
class
PickFromListSealious
<
Required
extends
boolean
,
>
extends
PickFromListField
<
Required
>
{
constructor
(
public
sealious_field
:
SealiousFieldTypes
.
Enum
<
string
>
)
{
super
(
sealious_field
.
required
as
Required
,
async
(
ctx
)
=>
sealious_field
.
getAllowedValues
(
ctx
.
$app
)
.
map
((
value
)
=>
({
value
,
label
:
value
}))
);
}
generateFieldDeclaration
(
field_info
:
ExtractedFieldInfo
,
vars
:
{
form_field_types
:
string
;
sealious_field
:
string
}
)
:
string
{
return
`new
${
vars
.
form_field_types
}
.
${
this
.
constructor
.
name
}
(
${
vars
.
sealious_field
}
)`
;
}
}
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 16:39 (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1200153
Default Alt Text
pick-from-list-sealious.ts (772 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline