kd-inputs
v0.1.3
Published
inputs module for kd
Downloads
3
Maintainers
Readme
inputs
Exposes:
KDCheckBox
KDContentEditableView
KDDelimitedInputView
KDHitEnterInputView
KDInputCheckboxGroup
KDInputRadioGroup
KDInputSwitch
KDInputValidator
KDInputView
KDLabelView
KDMultipleChoice
KDOnOffSwitch
KDSelectBox
KDTokenizedInput
KDWmdInput
## API
KDCheckBox(options, data)
extends KDInputView
KDContentEditableView(options, data)
extends KDView
Instance Methods
viewAppended()
getEditableElement()
getEditableDomElement()
setEditingMode(state)
getValue(forceType)
setContent(content)
focus()
blur()
click()
input(event)
keyDown(event)
paste(event)
drop(event)
setPlaceholder()
unsetPlaceholder()
validate(event)
notify(message, options)
appendNewline()
viewAppended()
KDDelimitedInputView(options, data)
extends KDInputView
Instance Methods
change()
getPadding(options)
split(value, options)
join(value, options)
getValue()
setValue(value)
KDHitEnterInputView(options, data)
extends KDInputView
Instance Methods
enableEnterKey()
disableEnterKey()
setToggler()
hideButton()
showButton()
toggleEnterKey()
keyDown(event)
KDInputCheckboxGroup(options, data)
extends KDInputRadioGroup
Instance Methods
click(event)
getValue()
setValue(value)
Private Methods
_setValue(value)
KDInputRadioGroup(options)
extends KDInputView
Instance Methods
setDomElement()
click(event)
setDefaultValue(value)
getValue()
setValue(value, isDefault)
getInputElements()
KDInputSwitch(options)
extends KDInputView
Instance Methods
setDomElement()
setDefaultValue(value)
getDefaultValue()
getValue()
setValue(value)
switchAnimateOff()
switchAnimateOn()
switchStateChanged()
mouseDown()
Private Methods
_setDefaultValue(val)
KDInputValidator
Static Methods
KDInputValidator.ruleRequired(input, event)
KDInputValidator.ruleEmail(input, event)
KDInputValidator.ruleMinLength(input, event)
KDInputValidator.ruleMaxLength(input, event)
KDInputValidator.ruleRangeLength(input, event)
KDInputValidator.ruleMatch(input, event)
KDInputValidator.ruleCreditCard(input, event)
KDInputValidator.ruleJSON(input, event)
KDInputValidator.ruleRegExp(input, event)
KDInputValidator.ruleUri(input, event)
KDInputView(o, data)
extends KDView
Instance Methods
setDomElement(cssClass)
bindValidationEvents()
setLabel(label)
getLabel()
setCallback()
getCallback()
setType(@inputType)
getType()
setName(@inputName)
getName()
setFocus()
setBlur()
setSelectOptions(options)
setDefaultValue(value)
getDefaultValue()
setPlaceholder(value)
makeDisabled()
makeEnabled()
getValue()
setValue(value)
setCase(forceCase)
unsetValidation()
setValidation(ruleSet)
validate(rule, event)
createRuleChain(ruleSet)
setValidationResult(rule, err, showNotification)
showValidationError(message)
clearValidationFeedback()
giveValidationFeedback(err)
setCaretPosition(pos)
getCaretPosition()
selectAll()
selectRange(selectionStart, selectionEnd)
setAutoGrow()
enableTabKey()
disableTabKey()
change()
keyUp()
keyDown(event)
focus()
blur()
mouseDown()
checkTabKey(event)
KDLabelView(options)
extends KDView
Instance Methods
setDomElement(cssClass)
setTitle(title)
updateTitle(title)
getTitle()
KDMultipleChoice(options, data)
extends KDInputView
Instance Methods
setDomElement(cssClass)
getDefaultValue()
getValue()
setDisabled(disable)
setValue(label, wCallback)
switchStateChanged()
fallBackToOldState()
mouseDown(event)
KDOnOffSwitch(options, data)
extends KDInputView
Instance Methods
setDomElement(cssClass)
getValue()
setValue(value, wCallback)
setDefaultValue(value)
setOff(wCallback)
setOn(wCallback)
switchStateChanged()
mouseDown(event)
KDSelectBox(options)
extends KDInputView
Instance Methods
setDomElement(cssClass)
bindEvents()
setDefaultValue(value)
getDefaultValue()
getValue()
setValue(value)
makeDisabled()
makeEnabled()
setSelectOptions(options)
removeSelectOptions()
change()
focus()
blur()
KDTokenizedInput(options, data)
extends KDContentEditableView
Instance Methods
getValue(options)
getValueOfNode(node)
getValueOfElement(element)
getValueOfTokenElement(key)
getTokens()
findTokensInElement(element)
getTokenView(key)
matchPrefix()
matchToken()
sanitizeInput()
showMenu(options, data)
hideMenu()
menuItemClicked(item, tokenViewClass)
addToken(item, tokenViewClass)
keyDown(event)
keyUp(event)
cancel()
reset()
viewAppended()
KDWmdInput(options, data)
extends KDInputView
Instance Methods
setWMD()
License
The MIT License (MIT)
Copyright (c) 2014 Koding [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.