Sha256: 53fcb959ba87d1ac02cb01b146af6c276d9f2024a0e46f49b494377e30ce9a52
Contents?: true
Size: 551 Bytes
Versions: 3
Compression:
Stored size: 551 Bytes
Contents
import { BaseModel, identifiedBy, session, belongsTo, identifier, } from '../base'; @identifiedBy('hippo/query/operators/operator') export default class Operator extends BaseModel { @identifier({ type: 'string' }) id; @session label; @session selected; @session({ type: 'array' }) types; @belongsTo({ model: 'hippo/query/field' }) field; isValidForField(field) { if (!field) { return false; } if (!this.types.length) { return true; } return !!this.types.find(t => t === field.queryType); } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hippo-fw-0.9.7 | client/hippo/models/query/operator.js |
hippo-fw-0.9.6 | client/hippo/models/query/operator.js |
hippo-fw-0.9.5 | client/hippo/models/query/operator.js |