Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583858
calculated-field-type.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
786 B
Referenced Files
None
Subscribers
None
calculated-field-type.js
View Options
const
CalculatedFieldType
=
function
(
App
,
declaration
){
this
.
App
=
App
;
if
(
typeof
declaration
===
"string"
){
return
App
.
ChipManager
.
get_chip
(
"calculated_field_type"
,
declaration
);
}
this
.
declaration
=
declaration
;
this
.
name
=
declaration
.
name
;
};
CalculatedFieldType
.
type_name
=
"calculated_field_type"
;
CalculatedFieldType
.
pure
=
{
get_value
:
function
(
declaration
,
context
,
params
,
item
){
// some caching strategy can be employed here in the future
return
Promise
.
resolve
(
declaration
.
calculate
(
context
,
params
,
item
));
}
};
// for brevity
const
pure
=
CalculatedFieldType
.
pure
;
CalculatedFieldType
.
prototype
=
{
get_value
:
function
(
context
,
params
,
item
){
return
pure
.
get_value
(
this
.
declaration
,
context
,
params
,
item
);},
};
module
.
exports
=
CalculatedFieldType
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 10:59 (18 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984249
Default Alt Text
calculated-field-type.js (786 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment