Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FormElement

フォーム要素の抽象クラス

version

0.1.0

since

0.0.1

Hierarchy

Implements

Index

Constructors

constructor

Properties

$el

$el: JQuery

管理するDOM要素のjQueryオブジェクト

since

0.0.1

$label

$label: JQuery

ラベル要素のjQueryオブジェクト

since

0.0.1

$wrapper

$wrapper: JQuery

ラッパー要素のjQueryオブジェクト

since

0.0.4

Protected _config

オプション情報

since

0.4.1

defaultValue

defaultValue: string

初期の値

since

0.4.0

disabled

disabled: boolean

無効状態

since

0.4.0

hasFocus

hasFocus: boolean

フォーカスがあたっている状態かどうか

since

0.1.0

hasLabelByForAttr

hasLabelByForAttr: boolean

for属性に基づくラベル要素に属しているかどうか

since

0.5.1

id

id: string

管理するDOM要素のid属性値

since

0.0.1

isWrappedByLabel

isWrappedByLabel: boolean

ラベル要素にラップされているかどうか

since

0.0.4

label

label: string

ラベルのテキスト

since

0.0.1

labelAfterText

labelAfterText: string

後ろにあるラベルのテキスト

since

0.4.0

labelBeforeText

labelBeforeText: string

前にあるラベルのテキスト

since

0.4.0

name

name: string

管理するDOM要素のname属性値

since

0.0.1

Static classNameDefaultCase

classNameDefaultCase: ElementClassNameCase

クラス名のデフォルトの単語繋ぎの形式

version

0.1.0

since

0.1.0

Static classNameDefaultPrefix

classNameDefaultPrefix: string

クラス名のデフォルトのプレフィックス

version

0.1.0

since

0.1.0

Static classNameDefaultSeparatorForElement

classNameDefaultSeparatorForElement: ClassNameSeparatorForBEM

BEMのエレメントのクラス名の繋ぎ文字

version

0.1.0

since

0.1.0

Static classNameDefaultSeparatorForModifier

classNameDefaultSeparatorForModifier: ClassNameSeparatorForBEM

BEMのモディファイアのクラス名の繋ぎ文字

version

0.1.0

since

0.1.0

Static classNameElementCommon

classNameElementCommon: string

インスタンスに付加するデフォルトのクラス名

version

0.1.0

since

0.1.0

Static classNameFormElementCommon

classNameFormElementCommon: string

FormElement関連の要素の共通のクラス

version

0.1.0

since

0.1.0

Static classNameLabel

classNameLabel: string

FormElement関連のラベル要素の共通のクラス

version

0.1.0

since

0.1.0

Static classNameStateBlur

classNameStateBlur: string

FormElement関連の要素のフォーカスがはずれた時に付加されるクラス

version

0.1.0

since

0.1.0

Static classNameStateDisabled

classNameStateDisabled: string

FormElement関連の要素の無効状態の時に付加されるクラス

version

0.4.0

since

0.4.0

Static classNameStateFocus

classNameStateFocus: string

FormElement関連の要素のフォーカス時に付加されるクラス

version

0.1.0

since

0.1.0

Static classNameWrapper

classNameWrapper: string

FormElement関連のラッパー要素の共通のクラス

version

0.1.0

since

0.1.0

Static elements

elements: FormElement[]

フォーム関連要素リスト

version

0.7.0

since

0.7.0

Static eventHandlers

eventHandlers: object

Type declaration

Static types

types: object

Type declaration

Methods

Private _asignLabel

  • _asignLabel(): void

Protected _bindEvents

  • _bindEvents(): void

Protected _createPsuedoElements

  • _createPsuedoElements(): void

Protected _createWrapper

  • _createWrapper(): void

Protected _fireChangeEvent

  • _fireChangeEvent(isSilent?: boolean): void

Protected _onSilentChange

  • _onSilentChange(): void
  • 他のオブジェクトにchangeイベントを発火・伝達せずに実行されるチェンジ処理

    version

    0.4.0

    since

    0.4.0

    Returns void

Protected _onblur

  • _onblur(): void

Protected _onfocus

  • _onfocus(): void

Protected _setClassName

  • _setClassName(): void

Private _setLabelText

  • _setLabelText(): void

addClass

  • addClass(blockNames: string, elementNames?: string, modifierName?: string): void
  • クラス名を付加する

    version

    0.1.0

    since

    0.1.0

    Parameters

    • blockNames: string
    • Default value elementNames: string = ""
    • Default value modifierName: string = ""

    Returns void

getBoolAttr

  • getBoolAttr(attrName: string): boolean
  • 要素の属性の真偽を判定する

    baser.ui.element.Element.getBoolAttr のインスタンスメソッド版

    version

    0.2.0

    since

    0.2.0

    Parameters

    • attrName: string

    Returns boolean

off

on

setDisabled

  • setDisabled(isDisabled: boolean): void

setValue

  • setValue(value: string | number | boolean, isSilent?: boolean): void
  • 値を設定する

    version

    0.4.1

    since

    0.4.0

    Parameters

    • value: string | number | boolean
    • Default value isSilent: boolean = false

    Returns void

trigger

Static addClassTo

  • addClassTo($elem: JQuery, blockNames: string, elementNames?: string, modifierName?: string): void
  • クラス名を付加する

    version

    0.1.0

    since

    0.1.0

    Parameters

    • $elem: JQuery
    • blockNames: string
    • Default value elementNames: string = ""
    • Default value modifierName: string = ""

    Returns void

Static createClassName

  • createClassName(blockNames: string, elementNames?: string, modifierName?: string): string
  • クラス名文字列を生成する

    version

    0.1.0

    since

    0.1.0

    Parameters

    • blockNames: string
    • Default value elementNames: string = ""
    • Default value modifierName: string = ""

    Returns string

Static getBoolAttr

  • getBoolAttr($elem: JQuery, attrName: string): boolean
  • 要素の属性の真偽を判定する

    DOM APIの標準で判定できるものはそれで判断

    値なし属性の場合は存在すれば真

    値あり属性の場合は偽相等の文字列でなければ全て真とする

    ただし値なし属性の場合は値が空文字列のため、偽相等の文字列の例外とする

    version

    0.2.0

    since

    0.2.0

    Parameters

    • $elem: JQuery
    • attrName: string

    Returns boolean

Static removeCSSProperty

  • removeCSSProperty(propertyName: string, $elem: JQuery): void

Static removeCSSPropertyFromDOMElement

  • removeCSSPropertyFromDOMElement(propertyName: string, elem: HTMLElement): void

Static removeClassFrom

  • removeClassFrom($elem: JQuery, blockNames: string, elementNames?: string, modifierName?: string): void
  • クラス名を取り除く

    version

    0.1.0

    since

    0.1.0

    Parameters

    • $elem: JQuery
    • blockNames: string
    • Default value elementNames: string = ""
    • Default value modifierName: string = ""

    Returns void

Object literals

Static defaultOption

defaultOption: object

オプションのデフォルト値

version

0.0.5

since

0.0.1

autoLabeling

autoLabeling: boolean

label

label: string

labelClass

labelClass: string

labelTag

labelTag: string

Generated using TypeDoc