UNPKG

@pilotlab/lux-attributes

Version:

A luxurious user experience framework, developed by your friends at Pilot.

36 lines (28 loc) 1.01 kB
import { DataType } from './attributeEnums'; import { NodeCreateOptions } from '@pilotlab/lux-nodes'; import IAttributeCreateOptions from './interfaces/iAttributeCreateOptions'; import IAttributeChangeOptions from './interfaces/iAttributeChangeOptions'; import AttributeChangeOptions from './attributeChangeOptions'; export class AttributeCreateOptions extends NodeCreateOptions implements IAttributeCreateOptions { constructor( value?:any, dataType:DataType = DataType.COLLECTION, label?:string, changeOptions:IAttributeChangeOptions = AttributeChangeOptions.default ) { super(); this.value = value; this.dataType = dataType; this.label = label; this.changeOptions = AttributeChangeOptions.default; } value:any; dataType:DataType; label:string; validate:(value:any) => any; omit:(value:any) => boolean; changeOptions:IAttributeChangeOptions; } // End class export default AttributeCreateOptions;