0.18.1 • Published 4 years ago

onemsdk v0.18.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Classes

Typedefs

ATagAttrs

Kind: global class

new ATagAttrs(href, method)

ParamTypeDescription
hrefstring
method'GET' | 'POST'default 'GET'

ATag

Kind: global class

new ATag(children, attrs)

ParamType
childrenArray.<string>
attrsATagAttrs

ATag.getAttributes(node)

Kind: static method of ATag

ParamType
nodeHTMLAnchorElement

BrTag

Kind: global class

CardTagAttrs

Kind: global class

new CardTagAttrs(action, method)

ParamTypeDefaultDescription
actionstringOptional path to call when the card is selected
methodstring"\"GET\""Optional method associated with the action

CardTag

Kind: global class
Properties

NameType
childrenArray.<(CardHeaderTag|CardMediaTag|CardContentTag|CardActionsTag)>

new CardTag(attrs)

ParamType
attrsCardTagAttrs

CardTag.getAttributes(node) ⇒ CardTagAttrs

Kind: static method of CardTag

ParamType
nodeHTMLElement

CardActionTagAttrs

Kind: global class

new CardActionTagAttrs(name, path, method)

ParamTypeDescription
namestringname of the card action button
pathstringpath for the callback when the card action is selected
methodstringto use for the callback

CardActionTag

Kind: global class

new CardActionTag(children, attrs)

ParamType
childrenundefined
attrsCardActionTagAttrs

CardActionTag.getAttributes(node) ⇒ CardActionTagAttrs

Kind: static method of CardActionTag

ParamType
nodeHTMLElement

CardActionsTag

Kind: global class

new CardActionsTag(children)

ParamType
childrenArray.<CardActionTag>

CardAvatarTagAttrs

Kind: global class

new CardAvatarTagAttrs(src, name)

ParamTypeDescription
srcstringpublic url of the avatar png image
namestringname of the avatar

CardAvatarTag

Kind: global class

new CardAvatarTag(children, attrs)

ParamType
childrenundefined
attrsCardAvatarTagAttrs

CardAvatarTag.getAttributes(node) ⇒ CardAvatarTagAttrs

Kind: static method of CardAvatarTag

ParamType
nodeHTMLElement

CardContentTagAttrs

Kind: global class

new CardContentTagAttrs(title, subtitle, content)

ParamTypeDescription
titlestringtitle of the card
subtitlestringsubtitle of the card
contentstringtext content to be displayed

CardContentTag

Kind: global class

new CardContentTag(children, attrs)

ParamType
childrenundefined
attrsCardContentTagAttrs

CardContentTag.getAttributes(node) ⇒ CardContentTagAttrs

Kind: static method of CardContentTag

ParamType
nodeHTMLElement

CardHeaderTagAttrs

Kind: global class

new CardHeaderTagAttrs(title, subtitle)

ParamTypeDescription
titlestringTitle text
subtitlestringOptional subtitle text

CardHeaderTag

Kind: global class
Properties

NameType
childrenArray.<CardAvatarTag>

new CardHeaderTag(attrs)

ParamType
attrsCardHeaderTagAttrs

CardHeaderTag.getAttributes(node) ⇒ CardHeaderTagAttrs

Kind: static method of CardHeaderTag

ParamType
nodeHTMLElement

CardMediaTagAttrs

Kind: global class

new CardMediaTagAttrs(src, avatarName)

ParamTypeDescription
srcstringpublic url of the avatar png image
avatarNamestringname of the avatar

CardMediaTag

Kind: global class

new CardMediaTag(children, attrs)

ParamType
childrenundefined
attrsCardMediaTagAttrs

CardMediaTag.getAttributes(node) ⇒ CardMediaTagAttrs

Kind: static method of CardMediaTag

ParamType
nodeHTMLElement

FooterTag

Kind: global class

new FooterTag(children)

Instantiates a new FooterTag

ParamType
childrenArray.<string>

FormTagAttrs

Kind: global class

new FormTagAttrs(action, method, header, footer, completionStatusShow, completionStatusInHeader, skipConfirmation)

Instantiates a new FormTagAttrs

ParamTypeDescription
actionstringthe path where the form data is sent to after the user finishes the form
methodstringthe method use to send the form data
headerstring | undefinedthe global form header which can be overwritten at the SectionTag level
footerstring | undefinedthe global form footer which can be overwritten at the SectionTag level
completionStatusShowboolean | undefinedwhether to display the progress the user made in a form
completionStatusInHeaderboolean | undefinedwhether to display that progress in header (if false it will be displayed in body)
skipConfirmationboolean | undefinedwhether the additional confirmation step at the end of the form will be skipped

FormTag

Kind: global class

new FormTag(children, attrs)

Instantiates a new FormTag. It is the equivalent of the HTML tag and it is always the root (it cannot be placed inside of another tag). The FormTag is be used in all the situations where some data is expected from the user. The FormTag can have one SnackbarTag child followed by multiple SectionTag children and each SectionTag deals with one piece of data from the user.

ParamType
childrenArray.<SectionTag>
attrsFormTagAttrs

HeaderTag

Kind: global class

new HeaderTag(children)

Instantiates a new HeaderTag

ParamType
childrenArray.<string>

ImgTagAttrs

Kind: global class

new ImgTagAttrs(src, alt)

ParamType
srcstring
altstring

ImgTag

Kind: global class

new ImgTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

ImgTag.getAttributes(node) ⇒ ImgTagAttrs

Kind: static method of ImgTag

ParamType
nodeHTMLImgElement

InputTagAttrs

Kind: global class

new InputTagAttrs(type, min, minError, minlength must be an integer, minlengthError, max, maxError, maxlength must be an integer, maxlengthError, step, value, pattern)

ParamTypeDescription
type'date' | 'datetime' | 'email' | 'hidden' | 'location' | 'number' | 'phone' | 'range' | 'tel' | 'text' | 'textarea' | 'url'
minnumber
minErrorstring
minlength must be an integernumber
minlengthErrorstring
maxnumber
maxErrorstring
maxlength must be an integernumber
maxlengthErrorstring
stepnumber
valuestringrequired if type="hidden"
patternstring

InputTag

Kind: global class

new InputTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

InputTag.getAttributes(node) ⇒ InputTagAttrs

Kind: static method of InputTag

ParamType
nodeHTMLInputElement

LiTagAttrs

Kind: global class

new LiTagAttrs(value, textSearch)

ParamType
valuestring | undefined
textSearchstring | undefined

LiTag

Kind: global class

new LiTag(children, attrs)

ParamType
childrenArray.<(ATag|string)>
attrsLiTagAttrs

LoginTagAttrs

Kind: global class

new LoginTagAttrs(onSuccess, onFailure)

ParamType
onSuccessstring
onFailurestring

LoginTag

Kind: global class

new LoginTag(children, attrs)

ParamType
childrenundefined
attrsLoginTagAttrs

LoginTag.getAttributes(node) ⇒ LoginTagAttrs

Kind: static method of LoginTag

ParamType
nodeHTMLElement

LogoutTagAttrs

Kind: global class

new LogoutTagAttrs(onSuccess, onFailure)

ParamType
onSuccessstring
onFailurestring

LogoutTag

Kind: global class

new LogoutTag(children, attrs)

ParamType
childrenundefined
attrsLogoutTagAttrs

LogoutTag.getAttributes(node) ⇒ LogoutTagAttrs

Kind: static method of LogoutTag

ParamType
nodeHTMLElement

PTag

Kind: global class

new PTag(children)

ParamType
childrenArray.<string>

SectionTagAttrs

Kind: global class

new SectionTagAttrs(props)

Instantiates a new SectionTagAttrs

ParamTypeDefaultDescription
propsobject
props.namestringthis attribute is relevant only if the SectionTag is part of a FormTag
props.headerstringtext that will be included in header
props.footerstringtext that will be included in footer
props.autoSelectbooleanfalse
props.multiSelectbooleanfalse
props.numberedbooleanfalse
props.chunkingFooterstring
props.confirmationLabelstring
props.methodstring
props.requiredbooleanfalse
props.defaultstring
props.statusExcludebooleanfalse
props.statusPrependbooleanfalse
props.urlstring
props.validateTypeErrorstring
props.validateTypeErrorFooterstring
props.validateUrlstring

SectionTag

Kind: global class

new SectionTag(children, attrs)

Instantiates a new SectionTag. A SectionTag may represent a step in a form, a menu or a block of text. A user will always receive the content of a SectionTag at a time.

ParamType
childrenArray.<(PTag|BrTag|UlTag|LabelTag|LoginTag|LogoutTag|HeaderTag|FooterTag|TextareaTag|InputTag|ImgTag|VideoTag|CardTag)>
attrsSectionTagAttrs

SnackbarTagAttrs

Kind: global class

new SnackbarTagAttrs(message, severity)

ParamType
messagestring
severitystring

SnackbarTag

Kind: global class

new SnackbarTag(children, attrs)

ParamType
childrenundefined
attrsSnackbarTagAttrs

SnackbarTag.getAttributes(node) ⇒ SnackbarTagAttrs

Kind: static method of SnackbarTag

ParamType
nodeHTMLElement

Tag

Kind: global class

new Tag(children, attrs)

Instantiates a Tag

ParamType
childrenArray.<Tag> | undefined
attrsObject | undefined

Tag.fromNode(node) ⇒ FormTag | CardTag | CardHeaderTag | CardAvatarTag | CardMediaTag | CardContentTag | CardActionsTag | CardActionTag | SectionTag | SnackbarTag | UlTag | LiTag | LoginTag | LogoutTag | ATag | PTag | BrTag | HeaderTag | FooterTag | InputTag | LabelTag | TextareaTag | ImgTag | VideoTag

Kind: static method of Tag

ParamType
nodeHTMLElement

Tag.getAttributes(node) ⇒ Object | undefined

Returns the attributes specific to a certain tag

Kind: static method of Tag

ParamType
nodeHTMLElement

TextareaTag

Kind: global class

new TextareaTag(children)

ParamType
childrenArray.<string>

UlTag

Kind: global class

new UlTag(children)

ParamType
childrenArray.<LiTag>

VideoTagAttrs

Kind: global class

new VideoTagAttrs(src, alt)

ParamType
srcstring
altstring

VideoTag

Kind: global class

new VideoTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

VideoTag.getAttributes(node) ⇒ VideoTagAttrs

Kind: static method of VideoTag

ParamType
nodeHTMLVideoElement

ATag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsATagAttrs

new ATag(children, attrs)

ParamType
childrenArray.<string>
attrsATagAttrs

ATag.getAttributes(node)

Kind: static method of ATag

ParamType
nodeHTMLAnchorElement

BrTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsundefined

CardTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<(CardHeaderTag|CardMediaTag|CardContentTag|CardActionsTag)>
attrsCardTagAttrs

new CardTag(attrs)

ParamType
attrsCardTagAttrs

CardTag.getAttributes(node) ⇒ CardTagAttrs

Kind: static method of CardTag

ParamType
nodeHTMLElement

CardActionTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsCardActionTagAttrs

new CardActionTag(children, attrs)

ParamType
childrenundefined
attrsCardActionTagAttrs

CardActionTag.getAttributes(node) ⇒ CardActionTagAttrs

Kind: static method of CardActionTag

ParamType
nodeHTMLElement

CardActionsTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<CardActionTag>
attrsundefined

new CardActionsTag(children)

ParamType
childrenArray.<CardActionTag>

CardAvatarTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsCardAvatarTagAttrs

new CardAvatarTag(children, attrs)

ParamType
childrenundefined
attrsCardAvatarTagAttrs

CardAvatarTag.getAttributes(node) ⇒ CardAvatarTagAttrs

Kind: static method of CardAvatarTag

ParamType
nodeHTMLElement

CardContentTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsCardContentTagAttrs

new CardContentTag(children, attrs)

ParamType
childrenundefined
attrsCardContentTagAttrs

CardContentTag.getAttributes(node) ⇒ CardContentTagAttrs

Kind: static method of CardContentTag

ParamType
nodeHTMLElement

CardHeaderTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<CardAvatarTag>
attrsCardHeaderTagAttrs

new CardHeaderTag(attrs)

ParamType
attrsCardHeaderTagAttrs

CardHeaderTag.getAttributes(node) ⇒ CardHeaderTagAttrs

Kind: static method of CardHeaderTag

ParamType
nodeHTMLElement

CardMediaTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsCardMediaTagAttrs

new CardMediaTag(children, attrs)

ParamType
childrenundefined
attrsCardMediaTagAttrs

CardMediaTag.getAttributes(node) ⇒ CardMediaTagAttrs

Kind: static method of CardMediaTag

ParamType
nodeHTMLElement

FooterTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsundefined

new FooterTag(children)

Instantiates a new FooterTag

ParamType
childrenArray.<string>

FormTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<SectionTag>
attrsFormTagAttrs

new FormTag(children, attrs)

Instantiates a new FormTag. It is the equivalent of the HTML tag and it is always the root (it cannot be placed inside of another tag). The FormTag is be used in all the situations where some data is expected from the user. The FormTag can have one SnackbarTag child followed by multiple SectionTag children and each SectionTag deals with one piece of data from the user.

ParamType
childrenArray.<SectionTag>
attrsFormTagAttrs

HeaderTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsundefined

new HeaderTag(children)

Instantiates a new HeaderTag

ParamType
childrenArray.<string>

ImgTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsInputTagAttrs

new ImgTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

ImgTag.getAttributes(node) ⇒ ImgTagAttrs

Kind: static method of ImgTag

ParamType
nodeHTMLImgElement

InputTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsInputTagAttrs

new InputTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

InputTag.getAttributes(node) ⇒ InputTagAttrs

Kind: static method of InputTag

ParamType
nodeHTMLInputElement

LabelTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsundefined

LiTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<(ATag|string)>
attrsLiTagAttrs

new LiTag(children, attrs)

ParamType
childrenArray.<(ATag|string)>
attrsLiTagAttrs

LoginTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsLoginTagAttrs

new LoginTag(children, attrs)

ParamType
childrenundefined
attrsLoginTagAttrs

LoginTag.getAttributes(node) ⇒ LoginTagAttrs

Kind: static method of LoginTag

ParamType
nodeHTMLElement

LogoutTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsLogoutTagAttrs

new LogoutTag(children, attrs)

ParamType
childrenundefined
attrsLogoutTagAttrs

LogoutTag.getAttributes(node) ⇒ LogoutTagAttrs

Kind: static method of LogoutTag

ParamType
nodeHTMLElement

PTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsundefined

new PTag(children)

ParamType
childrenArray.<string>

SectionTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<(HeaderTag|FooterTag|UlTag|PTag|BrTag|InputTag|TextareaTag|LabelTag|LoginTag|LogoutTag|ImgTag|VideoTag)>
attrsSectionTagAttrs

new SectionTag(children, attrs)

Instantiates a new SectionTag. A SectionTag may represent a step in a form, a menu or a block of text. A user will always receive the content of a SectionTag at a time.

ParamType
childrenArray.<(PTag|BrTag|UlTag|LabelTag|LoginTag|LogoutTag|HeaderTag|FooterTag|TextareaTag|InputTag|ImgTag|VideoTag|CardTag)>
attrsSectionTagAttrs

SnackbarTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsSnackbarTagAttrs

new SnackbarTag(children, attrs)

ParamType
childrenundefined
attrsSnackbarTagAttrs

SnackbarTag.getAttributes(node) ⇒ SnackbarTagAttrs

Kind: static method of SnackbarTag

ParamType
nodeHTMLElement

Tag

Kind: global typedef
Properties

NameType
childrenArray.<Tag> | undefined
attrsObject | undefined
tagNamestring

new Tag(children, attrs)

Instantiates a Tag

ParamType
childrenArray.<Tag> | undefined
attrsObject | undefined

Tag.fromNode(node) ⇒ FormTag | CardTag | CardHeaderTag | CardAvatarTag | CardMediaTag | CardContentTag | CardActionsTag | CardActionTag | SectionTag | SnackbarTag | UlTag | LiTag | LoginTag | LogoutTag | ATag | PTag | BrTag | HeaderTag | FooterTag | InputTag | LabelTag | TextareaTag | ImgTag | VideoTag

Kind: static method of Tag

ParamType
nodeHTMLElement

Tag.getAttributes(node) ⇒ Object | undefined

Returns the attributes specific to a certain tag

Kind: static method of Tag

ParamType
nodeHTMLElement

TextareaTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<string>
attrsundefined

new TextareaTag(children)

ParamType
childrenArray.<string>

UlTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenArray.<LiTag>
attrsundefined

new UlTag(children)

ParamType
childrenArray.<LiTag>

VideoTag ⇐ Tag

Kind: global typedef
Extends: Tag
Properties

NameType
childrenundefined
attrsInputTagAttrs

new VideoTag(children, attrs)

ParamType
childrenundefined
attrsInputTagAttrs

VideoTag.getAttributes(node) ⇒ VideoTagAttrs

Kind: static method of VideoTag

ParamType
nodeHTMLVideoElement
0.18.1

4 years ago

0.18.0

4 years ago

0.17.2

4 years ago

0.17.1

4 years ago

0.17.0

4 years ago

0.16.0

4 years ago

0.15.0

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.0

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.9

5 years ago

0.2.7

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago