UNPKG

@public-ui/components

Version:

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

4 lines 1.25 kB
/*! * KoliBri - The accessible HTML-Standard */ "use strict";const controller=require("./controller-d7e8fba5.js"),spellCheck=require("./spell-check-d54fcffc.js"),prop_validators=require("./prop.validators-3c86f8eb.js"),suggestions=require("./suggestions-eccef9c3.js"),inputTextTypeOptions=["text","search","url","tel"];class InputTextEmailController extends controller.InputPasswordController{constructor(e,t,o){super(e,t,o),this.component=e}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(e,t,o){super(e,t,o),this.hasError=!1,this.component=e}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateType(e){prop_validators.watchValidator(this.component,"_type",(e=>"string"==typeof e&&inputTextTypeOptions.includes(e)),new Set([`String {${inputTextTypeOptions.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;