Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›JSDoc

JSDoc

  • Home
  • API Server
  • API Attributes
  • Api Patch Ops
  • API Redux
  • Array Util
  • Base62 Util
  • Cache
  • Cluster Manager
  • Data Store
  • Exit
  • Factory
  • Limit
  • Lock
  • Message Queue
  • Messages
  • Path
  • Permissions
  • Reasoner
  • String Util
  • UI Active Theme
  • UI Elements
  • UI Linear View Elements
  • UI Mapbox Elements
  • Validator

UI Elements

Classes

ResourceTheme

the resource theme checks elements props and validates them against their theme, and will make some overrides based off props porvided from ui-builder

ScrollSync

Sends events between multiple components to allow them to scroll in unison.

  • To use, create a ScrollSync in the constructor of your component.
  • In componentDidMount(), call this.scrollSync.start(),
  • In componentWillUnmount(), call this.scrollSync.stop()
  • Call this.scrollSync.onScroll( event ) when your local component scrolls.
  • The onRemoteScroll function given in the ScrollSync's constructor should immediately set the scroll position of your component as desired.
AbstractFilterController
FilterController
AbstractSortController
SortController
Breadcrumbs

React class that renders a button

Button

React class that renders a button

Checkbox

Checkbox - React class that renders a checkbox

Combobox

React class that renders a dropdown element and allows for the selection of one item

Content

has a header, content and footer.

DataBlock

renders a column or row seperated title and data format

DateTimePicker

React class that renders a date time picker

DateTimeRangePicker

React class that renders a date range picker

Dialog

React class that renders a popup with a message or a question

Message

React class to render a dialog message

Question

React class to render a Dialog question

Dropdown

React class that renders a dropdown element and allows for the selection of one item

Flex

React class that renders a div with display flex

Header

React class that renders a Hx html tag

Label

React class that renders a label element

Item

The Item represents a clickable and/or selectable element in the List. An Item that supplies an item prop is selectable and clickable. An Item that supplies an eventData prop without an item prop will be clickable but not selectable.

Dynamic

This takes an items array and a factory and produces item elements for the list. The Factory.create() will be called with an item and props ( onClick, onEvent, selected ) and should return a List.Item (if the item should be selectable/clickable) or other React component

List

React class that renders a List element

SingleSelector

The SingleSelector will manage a state variable in you're controlling components state. This will allow at most one item to be selected. Meta-click will unselect a selected item.

MultiSelector

The MultiSelector will manage a state variable in you're controlling components state. This will allow multiple items to be selected. Meta-click will unselect a selected item.

Login

React login widget with several input and methods

MultiSelect

React class that renders a multiselect widget

NumericInput

React class that renders an Input that only accepts numbers

Pane

React class that renders a pane

Item

react class that renders an anchor tag with an onClick

Popup

React class to render a popup

RadioButton

Creates a Radio button element in react

ResetPassword

React class that renders a widget to reset a user's password

Slider

React class that renders a Slider

SplitPane

React class that renders a SplitPane

Table

React class that renders a table

Tab

react class to render a tab for the tab pane

TabPane

React class for a component with as many tabs as desired. manages which tab is displayed

Text

React class to render a block of text

TextArea

React class to render a block of text

TextInput

This TextInput field will allow you to install a function to prohibit keys, validate the input, and to fire changes only on a carriage return or blur.

ToggleButton

React class that renders a button with an on and an off state

Functions

create()
classes(component, type, variant, ...rest) ⇒ string

Returns the classnames needed for the component's type and variant.

subclasses(component, type, ...rest) ⇒ string

Returns the classnames needed for the component's sub element. The variant is not needed here because it will be in the css rule as a parent.

props(component, variant) ⇒ object

Returns any default props for the supplied Component and Variant. If the third argument is an object, it will be overlaid on top of the component's default props and the component's variant props.

If the second argument is an object, it is considered to be the React component's actual props object, and the variant is looked up from it. This means from render, you can invoke: const { markClass } = theme.props( 'Checkbox', this.props )

renderLayout(theme, layout, children)

Renders the layouts

ensureHierarchy(theme, results, parents, options, name)

Makes sure that the parent layouts have been created and are in the layout children arrays or the top level results array

createSublayouts(elem)

Creates React elements from the sublayout object

Typedefs

FormData

ResourceTheme

the resource theme checks elements props and validates them against their theme, and will make some overrides based off props porvided from ui-builder

Kind: global class

  • ResourceTheme
    • .classes(componentType, type, variant, ...rest) ⇒ string
    • .subclasses(component, type, ...rest) ⇒ string
    • .props(component, variant) ⇒ object
    • .variantClassNames(componentType, classes, variant)

resourceTheme.classes(componentType, type, variant, ...rest) ⇒ string

Returns the classnames needed for the component's type and variant.

Kind: instance method of ResourceTheme
Returns: string - the classname

ParamTypeDescription
componentTypestringthe name of the component type. eg "Button"
typestringthe part of the component to get. eg "button"
variantstringthe variant name to requsest. eg "small"
...reststringsother strings to add to the classname

resourceTheme.subclasses(component, type, ...rest) ⇒ string

Returns the classnames needed for the component's sub element. The variant is not needed here because it will be in the css rule as a parent.

Kind: instance method of ResourceTheme
Returns: string - the classname

ParamTypeDescription
componentstringthe name of the component type. eg "Button"
typestringthe sub-component of the component to get. eg "button"
...reststringsother strings to add to the classname

resourceTheme.props(component, variant) ⇒ object

Returns any default props for the supplied Component and Variant. If the third argument is an object, it will be overlaid on top of the component's default props and the component's variant props.

If the second argument is an object, it is considered to be the React component's actual props object, and the variant is looked up from it. This means from render, you can invoke: const { markClass } = theme.props( 'Checkbox', this.props )

Kind: instance method of ResourceTheme
Returns: object - an object containing the default props. This will be a merger of the default variant's props and the specified variants props. This will always return an object

ParamTypeDescription
componentstringthe name of the component type. eg "Button"
variantstring \objectthe variant name to requsest. eg "small"

resourceTheme.variantClassNames(componentType, classes, variant)

Turns the variant's hierarchy into a hashified set of classnames.

Kind: instance method of ResourceTheme

ParamTypeDescription
componentTypeobjectthe component type
classesobjectthe jss classname lookup
variantstringthe component variant

ScrollSync

Sends events between multiple components to allow them to scroll in unison.

  • To use, create a ScrollSync in the constructor of your component.
  • In componentDidMount(), call this.scrollSync.start(),
  • In componentWillUnmount(), call this.scrollSync.stop()
  • Call this.scrollSync.onScroll( event ) when your local component scrolls.
  • The onRemoteScroll function given in the ScrollSync's constructor should immediately set the scroll position of your component as desired.

Kind: global class

  • ScrollSync
    • new ScrollSync(options)
    • .onReceivedRemoteScroll
    • .onScroll
    • .start()
    • .stop()

new ScrollSync(options)

Create a ScrollSync

ParamTypeDescription
optionsobjectthe options object
options.namestringthe name of the synchronization. Defaults to 'main'
options.onRemoteScrollfunctionthis function should set the scroll position of your component

scrollSync.onReceivedRemoteScroll

Private function that listens to events. This will call the onRemoteScroll if the sync is not locked

Kind: instance property of ScrollSync

scrollSync.onScroll

Call this when your local scroll region updates

Kind: instance property of ScrollSync

scrollSync.start()

Call this in componentDidMount()

Kind: instance method of ScrollSync

scrollSync.stop()

Call this in componentWillUnmount()

Kind: instance method of ScrollSync

AbstractFilterController

Kind: global class

new AbstractFilterController()

Generic filtering class

FilterController

Kind: global class

  • FilterController
    • new FilterController(component, stateKey, options)
    • .key(column) ⇒ string
    • .isColumnFiltered(column) ⇒ boolean
    • .filter(data, columns)
    • .applyFilters(data, columns, filterModel)
    • .getFilterValue(column)
    • .add(column, value)

new FilterController(component, stateKey, options)

Filtering class which can filter multiple columns and stores its filtering state on the state of a provided React component

ParamTypeDescription
componentReact.ComponentParent component where filtering state changes will be managed
stateKeystringThe key within the parent component's state where filtering state will be stored.
optionsObjectidKey - The key within the column object to find the column's id idFunc - A function that returns a column's id

filterController.key(column) ⇒ string

Returns a unique id key for the given column

Kind: instance method of FilterController
Returns: string - - The id key for the column

ParamTypeDescription
columnObjectThe column object for which to return a key

filterController.isColumnFiltered(column) ⇒ boolean

Kind: instance method of FilterController
Returns: boolean - - Whether or not the column is filtered

ParamType
columnObject

filterController.filter(data, columns)

Filters the tabular data. By default uses String.includes

Kind: instance method of FilterController

ParamTypeDescription
dataArrayThe table data
columnsArrayThe table columns

filterController.applyFilters(data, columns, filterModel)

Kind: instance method of FilterController

ParamTypeDescription
dataArrayThe table data
columnsArrayThe table columns
filterModelObjectThe stored filter model in the form of an object with column id keys and filter values

filterController.getFilterValue(column)

Returns the current filter value for the column

Kind: instance method of FilterController

ParamTypeDescription
columnObjectThe column for which to get the filter value.

filterController.add(column, value)

Updates the filter model state

Kind: instance method of FilterController

ParamTypeDescription
columnObjectThe column to filter
valuestring \numberThe value to filter on

AbstractSortController

Kind: global class

new AbstractSortController()

Generic sorting class

SortController

Kind: global class

  • SortController
    • new SortController(component, stateKey, options)
    • .key(column) ⇒ string
    • .isColumnSorted(column) ⇒ boolean
    • .sort(data, columns, [sortOverride])
    • .getSortDirection(column) ⇒ string
    • .set(column, [direciton])

new SortController(component, stateKey, options)

Sorting class which sorts one column at a time and stores its sort state on the state of a provided React component.

ParamTypeDescription
componentReact.ComponentParent component where sorting state changes will be managed
stateKeystringThe key within the parent component's state where sorting state will be stored.
optionsObjectidKey - The key within the column object to find the column's id idFunc - A function that returns a column's id

sortController.key(column) ⇒ string

  • Returns a unique id key for the given column

Kind: instance method of SortController
Returns: string - - The id key for the column

ParamTypeDescription
columnObjectThe column object for which to return a key

sortController.isColumnSorted(column) ⇒ boolean

Kind: instance method of SortController
Returns: boolean - - Whether or not the column is sorted

ParamTypeDescription
columnObjectThe column object

sortController.sort(data, columns, [sortOverride])

Sorts the tabular data based on established sort model using

Kind: instance method of SortController

ParamTypeDescription
dataArrayThe table data
columnsArrayThe table columns
[sortOverride]functionAn override function to be used for sorting. Method signature is itemA, itemB, accessor

sortController.getSortDirection(column) ⇒ string

Returns the direction that a given column is sorted based on sort state

Kind: instance method of SortController
Returns: string - - one of 'asc', 'desc' or null

ParamTypeDescription
columnObjectThe column for which to get sort direction

sortController.set(column, [direciton])

Sets a column's sort direction in state, starting with ascending.

Kind: instance method of SortController

ParamTypeDescription
columnObjectThe column to sort by
[direciton]stringasc or desc. Optional and the default is ascending OR the opposite of the current direction

Breadcrumbs

React class that renders a button

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
onClickfunctionfunction to be called when the button is clicked
eventDataanywill be passed through as the data key to the onClick function
internalnodecomponent children, will be handled by react
fontstringstring corresponding to the icon to be rendered

breadcrumbs.onClick

(Internal) onClick of the element just adds the eventData prop to the event, and then calls the onClick prop

Kind: instance property of Breadcrumbs

Button

React class that renders a button

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
onClickfunctionfunction to be called when the button is clicked
eventDataanywill be passed through as the data key to the onClick function
internalnodecomponent children, will be handled by react
fontstringstring corresponding to the icon to be rendered

button.onClick

(Internal) onClick of the element just adds the eventData prop to the event, and then calls the onClick prop

Kind: instance property of Button

Checkbox

Checkbox - React class that renders a checkbox

Kind: global class
Properties

NameTypeDescription
valuebooleanthe value that the checkbox will display
disabledbooleanwhether the checkbox will be disabled
variantstringTheme variant name to be added to the component
classNamestringcss class to be applied to this component
eventDataanywill be passed through as the data key to the onClick function
onChangefunctionfunction to be called when the button is clicked

checkbox.onClick

(Internal) onClick of the element, adds the eventData prop to the event, adds a value to the event, and then calls the onChange prop

Kind: instance property of Checkbox

Combobox

React class that renders a dropdown element and allows for the selection of one item

Kind: global class
See: https://jquense.github.io/react-widgets/api/Combobox/
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
eventDataanywill be passed through as the data key to the onClick function
childrennodeinternal component children, will be handled by react
sendValueFieldboolean
onChangefunctionfunction to be called when the button is clicked
valueFieldstringkey corresponding to the value field in the data
textFieldstringkey corresponding to the text field in the data
valueanyvalue to be assigned to the input
dataarrayarray of objects with a value and a text, the keys of which should correspond to valueField and textField
selectIconstringstring corresponding to a font class for the icon desired

combobox.onSelect

(Internal) calls the onChange prop with an object with value and data

Kind: instance property of Combobox

Content

has a header, content and footer.

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
horizontalboolean
inlineboolean
relativeboolean
vFillboolean

DataBlock

renders a column or row seperated title and data format

Kind: global class
Properties

NameTypeDescription
verticalbooleandetermines if the block has a vertical layout or horizontal layout
fieldsarraythe fields to be rendered or read from the item and rendered each element is an object
itemobjectthe data item that is to be rendered by the data block
titlestring \nodetext or element to be the block
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component

DateTimePicker

React class that renders a date time picker

Kind: global class
See: https://jquense.github.io/react-widgets/api/DateTimePicker/
Properties

NameTypeDescription
timezonestring
variantstringTheme variant name to be added to the component
classNamestringcss class to be applied to this component
eventDataanywill be passed through as the data key to the onClick function
onChangefunctionfunction to be called when the button is clicked
sendValueFieldboolthe field from the value object to be passed to the onChange field

dateTimePicker.onSelect

(Internal) event that gets fired whenever the user makes a selection on the widget

Kind: instance property of DateTimePicker

DateTimeRangePicker

React class that renders a date range picker

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
onClickfunctionfunction to be called when the button is clicked
eventDataanywill be passed through as the data key to the onClick function
internalnodecomponent children, will be handled by react
fontstringstring corresponding to the icon to be rendered

Dialog

React class that renders a popup with a message or a question

Kind: global class
Properties

NameTypeDescription
variantstringTheme variant name to be added to the component
showbooleanif true, the popup will be displayed on the page
titlestringthe title of the popup
onClosefunctionfunction to be executed when the popup gets closed
closeOnEscapebooleanif true, popup will close when the esc key is hit
closeOnDocumentClickbooleanif true popup will close when the document is clicked
onSubmitfunctionfunction to be ran when the question answer is submitted
formPropsobjectif there is an onSubmit function provided, a form will wrap the children, and this data will be passed into the form
childrennodeReact children of the element

Message

React class to render a dialog message

Kind: global class
Properties

NameTypeDescription
variantstringTheme variant name to be added to the component
okayVariantstringTheme variant name to be applied to the dialog okay button
titlestringthe title of the popup
okaystringthe text that will be on the okay button
showbooleanif true, the popup will be displayed on the page
onClosefunctionfunction to be executed when the popup gets closed
messagestringtext or react element to be displayed to the user
childrennodeReact children of the element

Question

React class to render a Dialog question

Kind: global class
Properties

NameTypeDescription
variantstringTheme variant name to be added to the component
okayVariantstringTheme variant name to be applied to the dialog okay button
cancelVariantstringTheme variant name to be applied to the dialog cancel button
titlestringthe title of the popup
okaystringthe text that will be on the okay button
cancelstringthe text that will be on the cancel button
eventDataanywill be passed through as the data key to the onClick function
showbooleanif true, the popup will be displayed on the page
onOkayfunctionfunction to be run on hitting okay
onCancelfunctionfunction to be executed when the cancel button on the popup is clicked
messagestringtext or react element to be displayed to the user
childrennodeReact children of the element

Dropdown

React class that renders a dropdown element and allows for the selection of one item

Kind: global class
See: https://jquense.github.io/react-widgets/api/DropdownList/
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
eventDataanywill be passed through as the data key to the onClick function
childrennodeinternal component children, will be handled by react
sendValueFieldboolean
onChangefunctionfunction to be called when the button is clicked
valueFieldstringkey corresponding to the value field in the data
textFieldstringkey corresponding to the text field in the data
valueanyvalue to be assigned to the input
dataarrayarray of objects with a value and a text, the keys of which should correspond to valueField and textField
selectIconstringstring corresponding to a font class for the icon desired

dropdown.onSelect

(Internal) calls the onChange prop with an object with value and data

Kind: instance property of Dropdown

Flex

React class that renders a div with display flex

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
directionstringflex-direction css property
wrapstringflex-wrap css property
inlinebooleanif true will change the display property to be inline-flex
vFillbooleanif true, minHeight is set to 100%
alignstringalign-items css property
alignSelfstringalign-self css property
alignContentstringalign-content css property
justifystringjustify-content css property
styleobjectcss styles object
childrennodereact children

Header

React class that renders a Hx html tag

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
levelnumberhtml header level

Label

React class that renders a label element

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component

Item

The Item represents a clickable and/or selectable element in the List. An Item that supplies an item prop is selectable and clickable. An Item that supplies an eventData prop without an item prop will be clickable but not selectable.

Kind: global class

item.onClick

onClick - (Internal) onClick of the element

Kind: instance property of Item

Dynamic

This takes an items array and a factory and produces item elements for the list. The Factory.create() will be called with an item and props ( onClick, onEvent, selected ) and should return a List.Item (if the item should be selectable/clickable) or other React component

Kind: global class

List

React class that renders a List element

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
[selector]objecteither null (no selection), SingleSelector, MultiSelector, or a custom selector
selector.onSelectfunctioncalled with an object containing { value : , data : <item's eventData>, listData : <List's eventData>, sourceEvent }. This function should control the state of the selection.
selector.isSelectedfunctionreturns true if the given item is selected

SingleSelector

The SingleSelector will manage a state variable in you're controlling components state. This will allow at most one item to be selected. Meta-click will unselect a selected item.

Kind: global class
Properties

NameTypeDescription
componentComponentthe component whose state is managed
stateKeystringthe name of the selection group in the state
optionsobject
options.onSelectfunctioncalled with the item to select or null if remove is occurring. If this function returns false, the selection is cancelled. This will be invoked prior to calling component.setState()
[options.idFunc]functiona function used to return item's id. The id will be stored in the selection group.
[options.idKey]stringthe key of the item's id. The id will be stored in the selection group. This is unused if idFunc is supplied
options.useMetaobjectif false, the use of meta to remove items will be disabled

MultiSelector

The MultiSelector will manage a state variable in you're controlling components state. This will allow multiple items to be selected. Meta-click will unselect a selected item.

Kind: global class
Properties

NameTypeDescription
componentComponentthe component whose state is managed
stateKeystringthe name of the selection group in the state
optionsobject
options.onSelectfunctioncalled with three arguemnts: the array of the new selections ids, the item being added or removed, and true or false indicating if the event is an add or remove. If this function returns false, the selection is cancelled. This will be invoked prior to calling component.setState()
[options.idFunc]functiona function used to return item's id. The id will be stored in the selection group.
[options.idKey]stringthe key of the item's id. The id will be stored in the selection group. This is unused if idFunc is supplied

Login

React login widget with several input and methods

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
headerClassNamestringcss class to be applied to the header component
userClassNamestringcss class to be applied to the username input
passwordClassNamestringcss class to be applied to the password input
loginClassNamestringcss class to be applied to the login button
resetClassNamestringcss class to be applied to the reset password button
warningClassNamestringcss class to be applied to the warning/error text
forgotClassNamestringcss class to be applied to the forgot password button
backClassNamestringcss class to be applied to the back button
paneVariantstringTheme variant name to be applied to the pane element
headerVariantstringTheme variant name to be applied to the header
usernameVariantstringTheme variant name to be applied to the username input
passwordVariantstringTheme variant name to be applied to the password input
warningVariantstringTheme variant name to be applied to the warning text
forgotVariantstringTheme variant name to be applied to the forgot button
backVariantstringTheme variant name to be applied to the back button
userTextstringtext to be displayed above the username input
userHintstringtext to be the username input placeholder
emailTextstringtext to be displayed above the email input
emailHintstringtext to be the email input placeholder
passwordTextstringtext to be display above the password input
passwordHintstringtext to be the password input placeholder
loginTextstringtext to be on the login button
resetTextstringtext to be on the reset button
forgotTextstringtext to be on the forgot password button
backTextstringtext to be on the back button
errorTextstringtext to be displayed in red
onLoginfunctionfunction to be run when the user clicks on the login button
onLogoutfunctionfunction to ensure the user is logged out when they switch between login mode, or reset mode
onResetPasswordfunctionfunction to be ran when the user submits a password reset
logoanydisplayed at the top of the ui-element, usually an img elemet or react element with an image
loginInstructionanytext or react element to be displayed at the top of the login pane
resetInstructionanytext or react element to be displayed at the top of the reset password pane
  • Login
    • .onInput
    • .onSubmit
    • .toggleMode

login.onInput

(Internal) onChange method of the inputs, maintians state and where focus is

Kind: instance property of Login

login.onSubmit

(Internal) onClick method of the buttons keeps track of which mode the widget is in and performs the appropriate funcionality

Kind: instance property of Login

login.toggleMode

(Internal) maintains the correct mode the widget is in

Kind: instance property of Login

MultiSelect

React class that renders a multiselect widget

Kind: global class
See: https://jquense.github.io/react-widgets/api/Multiselect/
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
eventDataanydata to be included with events
onChangefunctionfunction to be executed with the widget's onChange
onCreatefunctionfunction to be executed with the widget's onCreate
childrennodeinternal component children, will be handled by react
selectIconstringfont icon string of the icon to be used for dropdown arrow
  • MultiSelect
    • .onSelect
    • .onCreate

multiSelect.onSelect

(Internal) onChange of the element, add event data to the payload and calls onChange

Kind: instance property of MultiSelect

multiSelect.onCreate

(Internal) onCreate of the element, adds eventData to the onCreate call

Kind: instance property of MultiSelect

NumericInput

React class that renders an Input that only accepts numbers

Kind: global class
See: TextInput Class derived from
Properties

NameTypeDescription
onChangefunctionfunction to be called with the widgets onChange
changeOnBlurboolean
changeOnReturnboolean
hintstringhint text for the widget
minnumberminimum value that the input can be
maxnumbermaximum value that the input can be
maxLengthnumber
sizenumber
focusboolean
floatbooleandetermines if the value can be a float or not
  • NumericInput
    • .onChange
    • .acceptKey
    • .validator

numericInput.onChange

(Internal) onChange of the element, calls the onChange prop

Kind: instance property of NumericInput

numericInput.acceptKey

(Internal) - determines which key presses to accept this method filters out all non-numbers

Kind: instance property of NumericInput

numericInput.validator

(Internal) validation function that well not let invalid values be submitted

Kind: instance property of NumericInput

Pane

React class that renders a pane

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
inlinebooleanadds inline properties to the pane
variantstringTheme variant name to be added to the component

Item

react class that renders an anchor tag with an onClick

Kind: global class
Properties

NameTypeDescription
closebooleanif true will call the onClose function
onClickfunctioncalled when the element is clicked with event data and value
eventDataanypassed into the onClick function when it is triggered
valueanypassed into the onClick function
onClosefunctioncalled when the element is clicked and close is true
classNamestringclassName of the element
childrennodeReact children of the element

item.onClick

onClick - (Internal) onClick of the element

Kind: instance property of Item

Popup

React class to render a popup

Kind: global class
See: https://github.com/danreeves/react-tether
Properties

NameTypeDescription
titlestring \nodeto be rendered at the top of the popup
triggerfunctionby default, a ToggleButton is used to render the button to surface the popup. If this function is supplied, its result will be used instead. The function is given and object containing { ref, onToggle, setOpened, isOpened }. The Ref needs to be assigned to the top most DOM element
styleobjectcss style object to be applied to the ToggleButton
idstringunique id of the ToggleButton
variantstringTheme variant name to be added to the popup component
toggleVariantstringTheme variant name to be added to the ToggleButton component
onChangefunctioncalled when the element is clicked with event data and value
eventDataanypassed into the onClick function when it is triggered
valueanypassed into the onClick function
childrennodeReact children of the element
renderfunctionif this is supplied, the function will be invoked with a close callback and the return value will be placed into the popup.
  • Popup
    • .onToggle
    • .setOpened
    • .onDocumentClick
    • .addEvents()
    • .removeEvents()

popup.onToggle

(Internal) flips the isOpened property of the state

Kind: instance property of Popup

popup.setOpened

(internal) sets the isOpened property of the state

Kind: instance property of Popup

popup.onDocumentClick

(Internal) closes the popup

Kind: instance property of Popup

popup.addEvents()

(internal) adds a click event to the page

Kind: instance method of Popup

popup.removeEvents()

(internal) removes a click event to the page

Kind: instance method of Popup

RadioButton

Creates a Radio button element in react

Kind: global class
Properties

NameTypeDescription
classNamestringa class to be assigned to the element
variantstringa global class to be assigned to the element
iconOnstringthe icon displayed when the radio value === on
iconOffstringthe icon displayed when radio value !== on
onanyvalue is compared to this to determine if the radio is selected
onChangefunctioncallback called when element is clicked
eventDataanydata fed to the onChange function
valueanya value used to determine if button is in an on state
idstringto be used by the element
disabledbooleandetermines if the element is disabled or not
onany@default [true] if equal to value, button is in and on state, defaults to true

radioButton.onClick

(Internal) the onChange of the element, calls the onChange prop

Kind: instance property of RadioButton

ResetPassword

React class that renders a widget to reset a user's password

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringThem variant name to be added to the component
logoanytext or react element to be rendered at the top of the widget
resetInstructionanytext or react element to be rendered below the logo
headerVariantstringvariant to be applied to the element header
headerClassNamestringcss class to be applied to the element header
headerTextstringtext to be rendered in the header
passwordClassNamestringcss class to be applied to the password inputs
passwordVariantstringTheme variant to be applied to the password inputs
passwordHintstringtext to be the password input hint
confirmPasswordHintstringtext to be the confirm password hint
resetClassNamestringcss class to be applied to the button
resetVariantstringTheme variant to be applied to the button
resetTextstringtext for the button
errorVariantstringTheme variant to be applied to the error text
errorClassNamestringcss class to be applied to the error text
errorTextstringtext to be displayed as the error
onSubmitfunctionfunction to be called when the form is submitted
  • ResetPassword
    • .onInput
    • .onSubmit

resetPassword.onInput

(Internal) onChange method of the inputs, maintians state and where focus is

Kind: instance property of ResetPassword

resetPassword.onSubmit

(Internal) onClick method of the buttons keeps track of which mode the widget is in and performs the appropriate funcionality

Kind: instance property of ResetPassword

Slider

React class that renders a Slider

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
onChangefunctionfunction to be called when the button is clicked
eventDataanywill be passed through as the data key to the onClick function
minnumber \stringthe minimum value of the slider range
maxnumber \stringthe maximum value of the slider range
valuenumber \stringthe current value of the slider

slider.onChange

(Internal) onClick of the element just adds the eventData prop to the event, and then calls the onClick prop

Kind: instance property of Slider

SplitPane

React class that renders a SplitPane

Kind: global class
See: https://github.com/tomkp/react-split-pane is the base widget this uses
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
split'vertical' \'horizontal'
minSizenumbersets the minimum size of the primary pane
maxSizenumbersets the maximum size of the primary pane
defaultSizenumbersets the default size of the primary pane
onChangefunctionfunction to be called with the onChange method
autoSaveKeyfunctionkey which saves the last value to local storage
eventDataanywill be passed through as the data key to the onClick function

splitPane.onChange

(Internal) gets called by the widget's onChange. sets the last pane size to local storage and calls the onChange prop with eventData

Kind: instance property of SplitPane

Table

React class that renders a table

Kind: global class
See: https://github.com/tannerlinsley/react-table
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
tableRefanyreact reference
dataarraythe data to be displayed on the table
columnsarrayarray of objects the defines the column header and which portion of the data to display

Tab

react class to render a tab for the tab pane

Kind: global class
Properties

NameTypeDescription
tabIdstringid of the tab
tabNamestringname that will be displayed on the tab button
classNamestringcss class to be applied to this component

TabPane

React class for a component with as many tabs as desired. manages which tab is displayed

Kind: global class
Properties

NameTypeDescription
activeTabstringid of the tab that should be active when the component is created
variantstringTheme variant name to be added to the component
classNamestringcss class to be applied to this component
activeIdstringid of the tab that will be active
defaultIdstringid of the tab that will be active if there isn't an activeId specified
eventDataanywill be passed through as the data key to the onClick function
onTabClickedfunctionfunction to be executed when a Tab gets clicked

tabPane.onTabClicked

(Internal) sets the activeTab, then calls onTabClicked with an object with a value property and data property the value property is the tabId of the tab clicked, and the data is the eventData prop

Kind: instance property of TabPane

Text

React class to render a block of text

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component

TextArea

React class to render a block of text

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component

TextInput

This TextInput field will allow you to install a function to prohibit keys, validate the input, and to fire changes only on a carriage return or blur.

Kind: global class
Properties

NameType
onChangefunction
onfocusfunction
validatorfunction
acceptKeyfunction
changeOnReturnboolean
changeOnBlurboolean
alwaysFireOnReturnboolean
placeCaretAtEndboolean
focusboolean
disabledboolean
hintstring
placeholderstring
valuestring
maxLengthnumber
sizenumber

ToggleButton

React class that renders a button with an on and an off state

Kind: global class
Properties

NameTypeDescription
classNamestringcss class to be applied to this component
variantstringTheme variant name to be added to the component
onChangefunctionfunction to be called when the button is clicked
eventDataanywill be passed through as the data key to the onClick function
valuebooleantells the button if it is an on or off state
onnodereact element to be displayed if value is true
offnodereact element to be displayed if value is false
iconOnstringstring of font to be displayed if value is true
iconOffstringstring of font to be displayed if value is false
childrennodeinternal component children, will be handled by react

toggleButton.onClick

(Internal) onClick of the element just adds the eventData prop to the event, and then calls the onClick prop

Kind: instance property of ToggleButton

create()

Kind: global function

  • create()
    • ~getData()
    • ~setDefaultData()
    • ~getDefaultData()
    • ~applyErrorState(data, name, err, isSubmit)
    • ~dataToForm()
    • ~isValid()
    • ~dataProps() ⇒ object
    • ~hasChanges()
    • ~getFromData(type, name)
    • ~message()

create~getData()

Returns the current form data, either from the component state or from the currentData return {FormData}

Kind: inner method of create

create~setDefaultData()

Sets the current (external) data. This is the default state and the revert state

Kind: inner method of create

create~getDefaultData()

Gets the current (external) data

Kind: inner method of create

create~applyErrorState(data, name, err, isSubmit)

Applys the error condition to the data

Kind: inner method of create

ParamTypeDescription
data*the data to modify
name*the name of the item to change
err*if false, this indicates and error. If a string it indicates and error with a message
isSubmit*if true, this is for submit validators

create~dataToForm()

Converts the value object into a { values : { }, errors : { }, msgs : { } }

Kind: inner method of create

create~isValid()

Returns true if there are no immediate errors. Normally this is used to enable the submit button. This only checks the states of the immediate validators, not the submit validators

Kind: inner method of create

create~dataProps() ⇒ object

Kind: inner method of create
Returns: object - an object that contains data-error : true if the named component is in an error state.

create~hasChanges()

Returns true if the the users has made changes to the values

Kind: inner method of create

create~getFromData(type, name)

Returns the value for the named form elements field.

Kind: inner method of create

ParamTypeDescription
typestringone of 'errors', 'msgs', 'values'
namestringthe name of the attribute

create~message()

Returns the message for the named field. If the name is not supplied or is null, the overall error message will be returned

Kind: inner method of create

classes(component, type, variant, ...rest) ⇒ string

Returns the classnames needed for the component's type and variant.

Kind: global function
Returns: string - the classname

ParamTypeDescription
componentstringthe name of the component type. eg "Button"
typestringthe part of the component to get. eg "button"
variantstringthe variant name to requsest. eg "small"
...reststringsother strings to add to the classname

subclasses(component, type, ...rest) ⇒ string

Returns the classnames needed for the component's sub element. The variant is not needed here because it will be in the css rule as a parent.

Kind: global function
Returns: string - the classname

ParamTypeDescription
componentstringthe name of the component type. eg "Button"
typestringthe sub-component of the component to get. eg "button"
...reststringsother strings to add to the classname

props(component, variant) ⇒ object

Returns any default props for the supplied Component and Variant. If the third argument is an object, it will be overlaid on top of the component's default props and the component's variant props.

If the second argument is an object, it is considered to be the React component's actual props object, and the variant is looked up from it. This means from render, you can invoke: const { markClass } = theme.props( 'Checkbox', this.props )

Kind: global function
Returns: object - an object containing the default props. This will be a merger of the default variant's props and the specified variants props. This will always return an object

ParamTypeDescription
componentstringthe name of the component type. eg "Button"
variantstring \objectthe variant name to requsest. eg "small"

renderLayout(theme, layout, children)

Renders the layouts

Kind: global function

ParamTypeDescription
themeTheme
layoutstringthe layout name
childrenarraythe react children to place

ensureHierarchy(theme, results, parents, options, name)

Makes sure that the parent layouts have been created and are in the layout children arrays or the top level results array

Kind: global function

ParamTypeDescription
themeThemethe theme, used to get the layout's classname
resultsArraythe top level results array
parentsObjectthe top level parent layout lookup object
optionsObjectthe options for the particular layout
namestringthe name of the element we need to place.

createSublayouts(elem)

Creates React elements from the sublayout object

Kind: global function

ParamTypeDescription
elemObjectthe sublayout object created in ensureHistory

FormData

Kind: global typedef
Properties

NameTypeDescription
valuesobjectobject containing current values
errorsobjectobject containing error states for each value
msgsobjectobject containing error messages for each value
hasChangesbooleantrue if the user has modified the values
hasErrorbooleantrue if the there is an error
← UI Active ThemeUI Linear View Elements →
  • Classes
  • Functions
  • Typedefs
  • ResourceTheme
    • resourceTheme.classes(componentType, type, variant, ...rest) ⇒ string
    • resourceTheme.subclasses(component, type, ...rest) ⇒ string
    • resourceTheme.props(component, variant) ⇒ object
    • resourceTheme.variantClassNames(componentType, classes, variant)
  • ScrollSync
    • new ScrollSync(options)
    • scrollSync.onReceivedRemoteScroll
    • scrollSync.onScroll
    • scrollSync.start()
    • scrollSync.stop()
  • AbstractFilterController
    • new AbstractFilterController()
  • FilterController
    • new FilterController(component, stateKey, options)
    • filterController.key(column) ⇒ string
    • filterController.isColumnFiltered(column) ⇒ boolean
    • filterController.filter(data, columns)
    • filterController.applyFilters(data, columns, filterModel)
    • filterController.getFilterValue(column)
    • filterController.add(column, value)
  • AbstractSortController
    • new AbstractSortController()
  • SortController
    • new SortController(component, stateKey, options)
    • sortController.key(column) ⇒ string
    • sortController.isColumnSorted(column) ⇒ boolean
    • sortController.sort(data, columns, [sortOverride])
    • sortController.getSortDirection(column) ⇒ string
    • sortController.set(column, [direciton])
  • Breadcrumbs
    • breadcrumbs.onClick
  • Button
    • button.onClick
  • Checkbox
    • checkbox.onClick
  • Combobox
    • combobox.onSelect
  • Content
  • DataBlock
  • DateTimePicker
    • dateTimePicker.onSelect
  • DateTimeRangePicker
  • Dialog
  • Message
  • Question
  • Dropdown
    • dropdown.onSelect
  • Flex
  • Header
  • Label
  • Item
    • item.onClick
  • Dynamic
  • List
  • SingleSelector
  • MultiSelector
  • Login
    • login.onInput
    • login.onSubmit
    • login.toggleMode
  • MultiSelect
    • multiSelect.onSelect
    • multiSelect.onCreate
  • NumericInput
    • numericInput.onChange
    • numericInput.acceptKey
    • numericInput.validator
  • Pane
  • Item
    • item.onClick
  • Popup
    • popup.onToggle
    • popup.setOpened
    • popup.onDocumentClick
    • popup.addEvents()
    • popup.removeEvents()
  • RadioButton
    • radioButton.onClick
  • ResetPassword
    • resetPassword.onInput
    • resetPassword.onSubmit
  • Slider
    • slider.onChange
  • SplitPane
    • splitPane.onChange
  • Table
  • Tab
  • TabPane
    • tabPane.onTabClicked
  • Text
  • TextArea
  • TextInput
  • ToggleButton
    • toggleButton.onClick
  • create()
    • create~getData()
    • create~setDefaultData()
    • create~getDefaultData()
    • create~applyErrorState(data, name, err, isSubmit)
    • create~dataToForm()
    • create~isValid()
    • create~dataProps() ⇒ object
    • create~hasChanges()
    • create~getFromData(type, name)
    • create~message()
  • classes(component, type, variant, ...rest) ⇒ string
  • subclasses(component, type, ...rest) ⇒ string
  • props(component, variant) ⇒ object
  • renderLayout(theme, layout, children)
  • ensureHierarchy(theme, results, parents, options, name)
  • createSublayouts(elem)
  • FormData
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source