UNPKG

@tangential/configurable-input-widgets

Version:

Input Widgets with persistable, dynamic configuration.

21 lines (20 loc) 1.05 kB
import { Type } from '@angular/core'; import { Jsonified } from '@tangential/core'; import { StampedMediaType, StampedMediaTypeJson } from '@tangential/media-types'; import { ConfigurableInputIval } from './configurable-input-ival'; export interface ConfigurableInputTypeJson extends StampedMediaTypeJson { _inputTypeKey?: string; defaultValue?: any; } export declare abstract class ConfigurableInputType extends StampedMediaType implements Jsonified<ConfigurableInputType, ConfigurableInputTypeJson>, ConfigurableInputTypeJson { static $model: ConfigurableInputTypeJson; static TYPE_NAME: string; defaultValue?: any; _inputTypeKey?: string; constructor(config: any, key?: string); abstract getInputTypeKey(): string; abstract isNumeric(): boolean; abstract createValue(valueConfig?: any, key?: string): ConfigurableInputIval; static register<T extends ConfigurableInputType>(inputTypeCtor: Type<T>): void; static create(typeConfig: ConfigurableInputTypeJson, key?: string, inputTypeKey?: string): any; }