UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

55 lines (54 loc) 1.97 kB
/*! * KoliBri - The accessible HTML-Standard */ import { validateReadOnly, validateRequired, validateSuggestions } from "../../schema"; import { validateAutoComplete } from "../../schema/props/auto-complete"; import { validatePlaceholder } from "../../schema/props/placeholder"; import { InputIconController } from "../@deprecated/input/controller-icon"; export class InputNumberController extends InputIconController { constructor(component, name, host) { super(component, name, host); this.component = component; } validateAutoComplete(value) { validateAutoComplete(this.component, value); } validateSuggestions(value) { validateSuggestions(this.component, value); } validateMax(value) { this.validateNumber('_max', value); } validateMin(value) { this.validateNumber('_min', value); } validatePlaceholder(value) { validatePlaceholder(this.component, value); } validateReadOnly(value) { validateReadOnly(this.component, value); } validateRequired(value) { validateRequired(this.component, value); } validateStep(value) { this.validateNumber('_step', value); } validateValue(value) { this.validateNumber('_value', value); this.setFormAssociatedValue(this.component.state._value); } componentWillLoad() { super.componentWillLoad(); this.validateAutoComplete(this.component._autoComplete); this.validateMax(this.component._max); this.validateMin(this.component._min); this.validateSuggestions(this.component._suggestions); this.validatePlaceholder(this.component._placeholder); this.validateReadOnly(this.component._readOnly); this.validateRequired(this.component._required); this.validateStep(this.component._step); this.validateValue(this.component._value); } } //# sourceMappingURL=controller.js.map