"git@scm.cms.hu-berlin.de:jakimowb/eo-time-series-viewer.git" did not exist on "65b5a6befeb9a7f650e0a8a41d6e82de9f937356"
Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {
FontElement,
FontProperties,
InputElement, PositionedElement,
PositionProperties,
SurfaceElement,
SurfaceProperties,
UIElement
} from '../../models/uI-element';
import { initFontElement, initPositionedElement, initSurfaceElement } from '../../util/unit-interface-initializer';
export class TextFieldElement extends InputElement implements PositionedElement, FontElement, SurfaceElement {
appearance: 'standard' | 'legacy' | 'fill' | 'outline' = 'outline';
minLength: number = 0;
minLengthWarnMessage: string = 'Eingabe zu kurz';
maxLength: number = 0;
maxLengthWarnMessage: string = 'Eingabe zu lang';
pattern: string = '';
patternWarnMessage: string = 'Eingabe entspricht nicht der Vorgabe';
inputAssistancePreset: 'none' | 'french' | 'numbers' | 'numbersAndOperators' = 'none';
inputAssistancePosition: 'floating' | 'right' = 'floating';
clearable: boolean = false;
positionProps: PositionProperties;
fontProps: FontProperties;
surfaceProps: SurfaceProperties;
constructor(serializedElement: UIElement) {
super(serializedElement);
Object.assign(this, serializedElement);
this.positionProps = initPositionedElement(serializedElement);
this.fontProps = initFontElement(serializedElement);
this.surfaceProps = initSurfaceElement(serializedElement);
this.height = serializedElement.height || 100;
this.surfaceProps.backgroundColor =
serializedElement.surfaceProps?.backgroundColor as string ||
serializedElement.backgroundColor as string ||
'transparent';
}
}