UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

79 lines (78 loc) 3.71 kB
/// <reference types="lodash" /> import { MessageViewModel } from './message-view-model'; import { ColorService } from '../color.service'; import { ErrorService } from '../error.service'; import { ILocalFilter } from '../mask.service'; import { ChoiceViewModel } from './choice-view-model'; import { IDraggableViewModel } from './idraggable-view-model'; import { AbstractControl } from '@angular/forms'; import * as Models from '../models'; import * as Ro from '../ro-interfaces'; import { Dictionary } from 'lodash'; import { ContextService } from '../context.service'; import { ConfigService } from '../config.service'; import { Pane } from '../route-data'; export declare abstract class FieldViewModel extends MessageViewModel { private readonly rep; protected readonly colorService: ColorService; protected readonly error: ErrorService; protected readonly context: ContextService; private readonly configService; readonly onPaneId: Pane; readonly isScalar: boolean; readonly id: string; readonly isCollectionContributed: boolean; readonly entryType: Models.EntryType; protected constructor(rep: Models.IHasExtensions, colorService: ColorService, error: ErrorService, context: ContextService, configService: ConfigService, onPaneId: Pane, isScalar: boolean, id: string, isCollectionContributed: boolean, entryType: Models.EntryType); readonly argId: string; paneArgId: string; readonly optional: boolean; description: string; readonly presentationHint: string; readonly mask: string; readonly title: string; readonly returnType: string; readonly format: Ro.FormatType | null; readonly multipleLines: number; readonly password: boolean; readonly type: "scalar" | "ref"; clientValid: boolean; reference: string; minLength: number; color: string; promptArguments: Dictionary<Models.Value>; currentValue: Models.Value; originalValue: Models.Value; localFilter: ILocalFilter; formattedValue: string; private currentChoice; private currentMultipleChoices; private currentRawValue; private choiceOptions; hasValue: boolean; file: Models.Link; refresh: (newValue: Models.Value) => void; prompt: (searchTerm: string) => Promise<ChoiceViewModel[]>; conditionalChoices: (args: Dictionary<Models.Value>) => Promise<ChoiceViewModel[]>; readonly drop: (newValue: IDraggableViewModel) => Promise<boolean | void>; readonly validate: (modelValue: string | string[] | ChoiceViewModel | ChoiceViewModel[], viewValue: string, mandatoryOnly: boolean) => boolean; choices: ChoiceViewModel[]; selectedChoice: ChoiceViewModel | null; value: Ro.ScalarValueType | Date | null; selectedMultiChoices: ChoiceViewModel[]; private isValid(viewValue); readonly validator: (c: AbstractControl) => { [index: string]: any; } | null; readonly setNewValue: (newValue: IDraggableViewModel) => void; readonly clear: () => void; protected update(): void; protected setupChoices(choices: Dictionary<Models.Value>): void; protected setupAutocomplete(rep: Models.IField, parentValues: () => Dictionary<Models.Value>, digest?: string | null): void; protected setupConditionalChoices(rep: Models.IField, digest?: string | null): void; protected getRequiredIndicator(): "" | "* "; private setColor(); readonly setValueFromControl: (newValue: string | number | boolean | Date | ChoiceViewModel | ChoiceViewModel[] | null) => void; readonly getValueForControl: () => ChoiceViewModel[]; readonly getValue: () => Models.Value; }