Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / build / dist / new-forms / forms / deps.js
Size: Mime:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * @todo 1. belongs in input deps?
 * @todo 2. could be as an input method?
 * @todo 3. how to put this at the plugin level?
 */
function resetInput(inputState) {
    // To reset textbox
    if (inputState.type !== 'button' &&
        inputState.type !== 'label' &&
        inputState.type !== 'select') {
        if (!inputState.setValue) {
            console.warn('inputState missing setValue');
            console.log(inputState);
            console.log('\n\n\n');
        }
        else {
            inputState.setValue('');
        }
        // inputState.isValidInput = true
    }
    // To reset groupElements
    if (inputState.elementList && inputState.elementList.length > 0) {
        inputState.elementList.forEach(resetInput);
    }
    if (inputState.type === 'select') {
        inputState.setValue(inputState.label);
    }
    // To reset the 'show password' state
    if (inputState.name === 'password') {
        inputState.type = 'password';
    }
}
exports.resetInput = resetInput;
//# sourceMappingURL=deps.js.map