5.2.1 • Published 5 years ago

ku4es-react v5.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Classes

Functions

AbstractAnalytics

Kind: global abstract class

new AbstractAnalytics(dispatcher)

AbstractAnalytics from which all analytics classes should subclass.

ParamType
dispatcherApplicationDispatcher

GoogleAnalytics ⇐ AbstractAnalytics

Kind: global class
Extends: AbstractAnalytics

new GoogleAnalytics(dispatcher)

Base GoogleAnalytics class from which all Google Analytics classes should subclass.

ParamType
dispatcherApplicationDispatcher

googleAnalytics.$event(category, action, label, value, fields)

Sends an event to Google Analytics

Kind: instance method of GoogleAnalytics
Access: protected

ParamType
categoryString
actionString
labelString
valueString
fieldsString

googleAnalytics.$pageView(url)

Sends a pageView event to Google Analytics

Kind: instance method of GoogleAnalytics
Access: protected

ParamType
urlString

Action

Kind: global class

new Action(type, payload, meta, error)

The object that should be returned for any Service Promise fulfillment or rejection.

ParamTypeDefaultDescription
typeStringUnique identifier to distinguish different events.
payloadObject{}Payload data.
metaObject{}Meta data.
errorErroran Error describing the error if there is one.

action.isType(type) ⇒ boolean

Type checking method that will return true if this._type === type

Kind: instance method of Action
Access: public

ParamTypeDescription
typeStringan action type.

Action.isError ⇒ boolean

Returns true if this._error exists.

Kind: static property of Action
Access: public

Dispatcher

Kind: global class

new Dispatcher()

An abstraction of the Flux Observer.

dispatcher.register(callback) ⇒ DispatchToken

Kind: instance method of Dispatcher
Access: public

ParamType
callbackfunction

dispatcher.unregister(registrationToken) ⇒ Dispatcher

Kind: instance method of Dispatcher
Access: public

ParamType
registrationTokenString

dispatcher.dispatch(payload) ⇒ Dispatcher

Kind: instance method of Dispatcher
Access: public

ParamType
payloadObject

FormValidator

Kind: global class

new FormValidator(rules)

Form validation manager

ParamTypeDefault
rulesObject{}

formValidator.rule(name) ⇒ *

Returns a validation rule for the specified name

Kind: instance method of FormValidator
Access: public

Param
name

formValidator.validate(values) ⇒ FormValidator

Validates the passed values against this validator's rules

Kind: instance method of FormValidator
Access: public

Param
values

Payload

Kind: global class

new Payload(data)

Payload to be used as a value for the payload member of an Action

Param
data

Payload.data ⇒ *

Returns the data associated with this Payload

Kind: static property of Payload
Access: public

Payload.success(response) ⇒ Payload

Create a success Payload

Kind: static method of Payload
Access: public

ParamTypeDefault
responseObject{}

Payload.error(error) ⇒ Payload

Create an error Payload

Kind: static method of Payload
Access: public

ParamTypeDefault
errorObject{}

ConfigurableViewReadPolicy ⇐ AbstractSpecification

Kind: global class
Extends: AbstractSpecification

configurableViewReadPolicy.isSatisfiedBy(cid, configuration) ⇒ void | * | boolean

Returns true if the configuration value for this cid is 'read'

Kind: instance method of ConfigurableViewReadPolicy
Access: public

Param
cid
configuration

ConfigurableViewWritePolicy ⇐ AbstractSpecification

Kind: global class
Extends: AbstractSpecification

configurableViewWritePolicy.isSatisfiedBy(cid, configuration) ⇒ boolean

Returns true if the configuration value for this cid is 'read'

Kind: instance method of ConfigurableViewWritePolicy
Access: public

ParamType
cidString
configurationObject

ReadWriteSettingsViewStrategy ⇐ AbstractStrategy

Kind: global class
Extends: AbstractStrategy

ReadWriteSettingsViewStrategy.execute(component, setting)

Updates a the readable or writable state of a ConfigurableView per the current readable or writable state and the value of the setting argument.

Kind: static method of ReadWriteSettingsViewStrategy

ParamTypeDescription
componentConfigurableView= the component delegating behavior to this strategy.
settingboolean= true indicates that readable or writable should remain so.

Service

Kind: global class

new Service(dispatcher, config)

Service abstraction

ParamTypeDefaultDescription
dispatcherDispatcher
configObject{}Additional configurations to set for all calls. See axios documentation for list of available values.

service.$dispatch(action) ⇒ Service

Dispatches an action to observers

Kind: instance method of Service
Access: protected

ParamType
actionAction

Store ⇐ EventEmitter

Kind: global class
Extends: EventEmitter

new Store(persistenceKey, maxRegistrants)

Base store from which all application stores should subclass.

ParamTypeDefaultDescription
dispatcher.Dispatcher
persistenceKeyStringa unique key to be used for identifying the store's values when persisting to persistent storage.
maxRegistrantsNumber10maximum number of registrants allowed before a Possible Memory Leak warning is thrown.

store.$on(actionType, method) ⇒ Store

Subscribe to an event

Kind: instance method of Store
Access: protected

Param
actionType
method

store.$notify()

Protected method to notify state changes. This method should only be invoked by subclasses.

Kind: instance method of Store
Access: protected

store.$setState(state) ⇒ Store

Safely set this store's state

Kind: instance method of Store
Access: protected

ParamType
stateObject

store.init(state) ⇒ Store

Initialize this store with state

Kind: instance method of Store
Access: public

ParamTypeDefault
stateObject{}

store.read() ⇒ * | Object

Read the data in this store.

Kind: instance method of Store
Access: public

store.clear() ⇒ *

Clear the in-memory data for this store.

Kind: instance method of Store
Access: public

store.register(callback, event) ⇒ Store

Register a view to monitor state changes of this store. This method should not be overridden by subclasses.

Kind: instance method of Store
Returns: Store - - a reference to self for fluid interface method chaining.
Access: public

ParamTypeDefaultDescription
callbackfunctiona Function to be called every time the state of this store changes.
eventStringstate_changename of the event to subscribe to

store.unregister(callback, event) ⇒ Store

Unregister a view from monitoring state changes of this store. This method should not be overridden by subclasses.

Kind: instance method of Store
Returns: Store - - a reference to self for fluid interface method chaining.
Access: public

ParamTypeDefaultDescription
callbackfunctionthe original registered callback to be unregistered.
eventStringstate_changename of the event to unsubscribe from

WebStore ⇐ Store

Kind: global class
Extends: Store

new WebStore(persistenceKey, maxRegistrants)

Base store from which all application stores should subclass.

ParamTypeDefaultDescription
dispatcher.Dispatcher
persistenceKeyStringa unique key to be used for identifying the store's values when persisting to localStorage.
maxRegistrantsNumber10maximum number of registrants allowed before a Possible Memory Leak warning is thrown.

webStore.save() ⇒ WebStore

Save this store to localStorage at the key indicated by the persistenceKey member of this class instance.

Kind: instance method of WebStore
Access: public

webStore.saveAs(persistenceKey) ⇒ WebStore

Save this store to localStorage at the key indicated by the persistenceKey.

Kind: instance method of WebStore
Access: public

ParamType
persistenceKeyString

webStore.load(persistenceKey) ⇒ WebStore

Initialize this store with data persisted in localStorage at the key indicated by the persistenceKey.

Kind: instance method of WebStore
Access: public

ParamType
persistenceKeyString

webStore.drop() ⇒ WebStore

Drop the localStorage persisted data for this store.

Kind: instance method of WebStore
Access: public

webStore.$on(actionType, method) ⇒ Store

Subscribe to an event

Kind: instance method of WebStore
Access: protected

Param
actionType
method

webStore.$notify()

Protected method to notify state changes. This method should only be invoked by subclasses.

Kind: instance method of WebStore
Access: protected

webStore.$setState(state) ⇒ Store

Safely set this store's state

Kind: instance method of WebStore
Access: protected

ParamType
stateObject

webStore.init(state) ⇒ Store

Initialize this store with state

Kind: instance method of WebStore
Access: public

ParamTypeDefault
stateObject{}

webStore.read() ⇒ * | Object

Read the data in this store.

Kind: instance method of WebStore
Access: public

webStore.clear() ⇒ *

Clear the in-memory data for this store.

Kind: instance method of WebStore
Access: public

webStore.register(callback, event) ⇒ Store

Register a view to monitor state changes of this store. This method should not be overridden by subclasses.

Kind: instance method of WebStore
Returns: Store - - a reference to self for fluid interface method chaining.
Access: public

ParamTypeDefaultDescription
callbackfunctiona Function to be called every time the state of this store changes.
eventStringstate_changename of the event to subscribe to

webStore.unregister(callback, event) ⇒ Store

Unregister a view from monitoring state changes of this store. This method should not be overridden by subclasses.

Kind: instance method of WebStore
Returns: Store - - a reference to self for fluid interface method chaining.
Access: public

ParamTypeDefaultDescription
callbackfunctionthe original registered callback to be unregistered.
eventStringstate_changename of the event to unsubscribe from

AbstractSecureView ⇐ FeatureView

Kind: global class
Extends: FeatureView

new AbstractSecureView(props)

SecureView extends FeatureView and enables all extending classes to be readable or writable per both its feature configuration and the satisfaction of its security or authorization policy

ParamType
propsObject

abstractSecureView.$isWritable : boolean

Indicates that the component is writable. Writable components can be updated throughout their life. The can be rendered and re-rendered. A component that is writable is always also readable.

Kind: instance property of AbstractSecureView
Default: false
Overrides: $isWritable
Access: protected

abstractSecureView.$isReadable : boolean

Indicates that the component is readable. Readable components can NOT be updated throughout their life. They are rendered once to the screen and cannot be rendered again during their life. Neither the system nor a user can update readable components such that they are re-rendered to the screen. A component that is readable may or may not be writable.

Kind: instance property of AbstractSecureView
Default: false
Overrides: $isReadable
Access: protected

abstractSecureView.$state ⇒ Object

Returns a safe copy of this view's state. This enables safe passing of state from this view to children.

Kind: instance property of AbstractSecureView
Access: protected

abstractSecureView.dom ⇒ *

Returns a reference to the DOM node of this component

Kind: instance property of AbstractSecureView
Access: public

abstractSecureView.$isAuthorized()

This method must be implemented and return a boolean value that indicates whether or not a user is authorized to use this view. This boolean value should be calculated using the extending classes $policy and object(s) containing the values necessary to calculate the satisfaction of the policy.

Kind: instance method of AbstractSecureView
Access: protected

abstractSecureView.$configure()

This method can be used to override the default configuration rules whereby the ConfigurableView is set to be readable or writable per explicit property values or a passed configuration. If there are further rules or configurations that must be made prior to rendering these can be set by overriding this protected 'virtual' method.

Kind: instance method of AbstractSecureView
Overrides: $configure
Access: protected

abstractSecureView.$initState(...state)

Safely initialize state so as to not overwrite state of a parent class;

Kind: instance abstract method of AbstractSecureView
Access: protected

ParamType
...stateObject

abstractSecureView.$setProps(props)

Set and update $props

Kind: instance abstract method of AbstractSecureView
Access: protected

ParamType
propsObject

abstractSecureView.$pruneProps()

Use this method to prune $props of all extraneous $props. It can and should be called in all classes where there are props passed that should not be used as pass-through props. That is, for those props that only intended for the defining class. -- It is intended that $props will be used as pass-through props and this mechanism enables a component to be instantiated with props that only it cares about, and then prune out these props before sending the remaining pass-through props to child elements.

Kind: instance abstract method of AbstractSecureView
Access: protected

abstractSecureView.$init()

Implement this method in a child class to set up initial state that CANNOT be initialized in the constructor before the component renders. Favor the constructor! This method should only be used for those occasions where the initialization of the target member(s) simply CANNOT occur in the constructor.

Kind: instance abstract method of AbstractSecureView
Access: protected

abstractSecureView.$bind()

Use this method to bind all of your local member member methods and handlers using the this.$member$ = () => this._member idiom.

Kind: instance abstract method of AbstractSecureView
Access: protected

abstractSecureView.$mount()

Implement this method in a child class to register to any dispatchers or other object that extend EventEmitter. These registrations should unregistered in $unmount to prevent any memory leaks.

Kind: instance abstract method of AbstractSecureView
Access: protected

abstractSecureView.$unmount()

Implement this method in a child class to unregister from any dispatchers or other object that extend EventEmitter. These unregistrations should unregister any registrations that occur in $mount to prevent any memory leaks.

Kind: instance abstract method of AbstractSecureView
Access: protected

abstractSecureView.$preRender(props)

This method will be called before any post-mount render. This will allow you to update the Component state via setState() with any new prop data received from a parent class or dependent class before this component is rendered.

Kind: instance abstract method of AbstractSecureView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

abstractSecureView.$postRender(props)

This method will be called after any post-mount render. This will allow you to update the DOM. You cannot call setState() or any derivative thereof in this method.

Kind: instance abstract method of AbstractSecureView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

abstractSecureView.$error(error, info)

This method is called for any lifecycle error in an extending component.

Kind: instance method of AbstractSecureView
Access: protected

ParamType
errorError
infoString

abstractSecureView.setStateOnce(state)

Will setState of the property and then remove the property from state after setting so that this property is only applied for one round of rendering.

Kind: instance method of AbstractSecureView
Access: protected

ParamType
stateObject

abstractSecureView.destroy()

It is unlikely that there will be any reason to call this method outside of the scope of unit testing.

Kind: instance method of AbstractSecureView
Access: public

AbstractView ⇐ React.Component

Kind: global abstract class
Extends: React.Component

new AbstractView(props)

This AbstractView wires a component to the Application State to give all child classes access to the application components: stores and controllers. It also abstract the React Component Lifecycle to better express the intention of the role of this process as it relates to the development.md of a react-application. All views, i.e. Components in a react-application extend this class.

ParamType
propsObject

abstractView.$state ⇒ Object

Returns a safe copy of this view's state. This enables safe passing of state from this view to children.

Kind: instance property of AbstractView
Access: protected

abstractView.dom ⇒ *

Returns a reference to the DOM node of this component

Kind: instance property of AbstractView
Access: public

abstractView.$initState(...state)

Safely initialize state so as to not overwrite state of a parent class;

Kind: instance abstract method of AbstractView
Access: protected

ParamType
...stateObject

abstractView.$setProps(props)

Set and update $props

Kind: instance abstract method of AbstractView
Access: protected

ParamType
propsObject

abstractView.$pruneProps()

Use this method to prune $props of all extraneous $props. It can and should be called in all classes where there are props passed that should not be used as pass-through props. That is, for those props that only intended for the defining class. -- It is intended that $props will be used as pass-through props and this mechanism enables a component to be instantiated with props that only it cares about, and then prune out these props before sending the remaining pass-through props to child elements.

Kind: instance abstract method of AbstractView
Access: protected

abstractView.$init()

Implement this method in a child class to set up initial state that CANNOT be initialized in the constructor before the component renders. Favor the constructor! This method should only be used for those occasions where the initialization of the target member(s) simply CANNOT occur in the constructor.

Kind: instance abstract method of AbstractView
Access: protected

abstractView.$bind()

Use this method to bind all of your local member member methods and handlers using the this.$member$ = () => this._member idiom.

Kind: instance abstract method of AbstractView
Access: protected

abstractView.$mount()

Implement this method in a child class to register to any dispatchers or other object that extend EventEmitter. These registrations should unregistered in $unmount to prevent any memory leaks.

Kind: instance abstract method of AbstractView
Access: protected

abstractView.$unmount()

Implement this method in a child class to unregister from any dispatchers or other object that extend EventEmitter. These unregistrations should unregister any registrations that occur in $mount to prevent any memory leaks.

Kind: instance abstract method of AbstractView
Access: protected

abstractView.$preRender(props)

This method will be called before any post-mount render. This will allow you to update the Component state via setState() with any new prop data received from a parent class or dependent class before this component is rendered.

Kind: instance abstract method of AbstractView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

abstractView.$postRender(props)

This method will be called after any post-mount render. This will allow you to update the DOM. You cannot call setState() or any derivative thereof in this method.

Kind: instance abstract method of AbstractView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

abstractView.$error(error, info)

This method is called for any lifecycle error in an extending component.

Kind: instance method of AbstractView
Access: protected

ParamType
errorError
infoString

abstractView.setStateOnce(state)

Will setState of the property and then remove the property from state after setting so that this property is only applied for one round of rendering.

Kind: instance method of AbstractView
Access: protected

ParamType
stateObject

abstractView.destroy()

It is unlikely that there will be any reason to call this method outside of the scope of unit testing.

Kind: instance method of AbstractView
Access: public

ConfigurableView ⇐ AbstractView

Kind: global class
Extends: AbstractView

new ConfigurableView(props)

ConfigurableView is an abstract class that enables any extending class to understand how it should be configured per the configuration values it receives as arguments via properties. These configurations can be in the form of an object literal configuration read by a configurationPolicy via its configurationId or more simply by passing a boolean value for a readable or writable attribute. Extending classes can use this protected member data to determine how it should behave per this arguments.

ParamType
propsObject

configurableView.$isWritable : boolean

Indicates that the component is writable. Writable components can be updated throughout their life. The can be rendered and re-rendered. A component that is writable is always also readable.

Kind: instance property of ConfigurableView
Default: false
Access: protected

configurableView.$isReadable : boolean

Indicates that the component is readable. Readable components can NOT be updated throughout their life. They are rendered once to the screen and cannot be rendered again during their life. Neither the system nor a user can update readable components such that they are re-rendered to the screen. A component that is readable may or may not be writable.

Kind: instance property of ConfigurableView
Default: false
Access: protected

configurableView.$state ⇒ Object

Returns a safe copy of this view's state. This enables safe passing of state from this view to children.

Kind: instance property of ConfigurableView
Access: protected

configurableView.dom ⇒ *

Returns a reference to the DOM node of this component

Kind: instance property of ConfigurableView
Access: public

configurableView.$configure()

This method can be used to override the default configuration rules whereby the ConfigurableView is set to be readable or writable per explicit property values or a passed configuration. If there are further rules or configurations that must be made prior to rendering these can be set by overriding this protected 'virtual' method.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$initState(...state)

Safely initialize state so as to not overwrite state of a parent class;

Kind: instance abstract method of ConfigurableView
Access: protected

ParamType
...stateObject

configurableView.$setProps(props)

Set and update $props

Kind: instance abstract method of ConfigurableView
Access: protected

ParamType
propsObject

configurableView.$pruneProps()

Use this method to prune $props of all extraneous $props. It can and should be called in all classes where there are props passed that should not be used as pass-through props. That is, for those props that only intended for the defining class. -- It is intended that $props will be used as pass-through props and this mechanism enables a component to be instantiated with props that only it cares about, and then prune out these props before sending the remaining pass-through props to child elements.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$init()

Implement this method in a child class to set up initial state that CANNOT be initialized in the constructor before the component renders. Favor the constructor! This method should only be used for those occasions where the initialization of the target member(s) simply CANNOT occur in the constructor.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$bind()

Use this method to bind all of your local member member methods and handlers using the this.$member$ = () => this._member idiom.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$mount()

Implement this method in a child class to register to any dispatchers or other object that extend EventEmitter. These registrations should unregistered in $unmount to prevent any memory leaks.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$unmount()

Implement this method in a child class to unregister from any dispatchers or other object that extend EventEmitter. These unregistrations should unregister any registrations that occur in $mount to prevent any memory leaks.

Kind: instance abstract method of ConfigurableView
Access: protected

configurableView.$preRender(props)

This method will be called before any post-mount render. This will allow you to update the Component state via setState() with any new prop data received from a parent class or dependent class before this component is rendered.

Kind: instance abstract method of ConfigurableView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

configurableView.$postRender(props)

This method will be called after any post-mount render. This will allow you to update the DOM. You cannot call setState() or any derivative thereof in this method.

Kind: instance abstract method of ConfigurableView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

configurableView.$error(error, info)

This method is called for any lifecycle error in an extending component.

Kind: instance method of ConfigurableView
Access: protected

ParamType
errorError
infoString

configurableView.setStateOnce(state)

Will setState of the property and then remove the property from state after setting so that this property is only applied for one round of rendering.

Kind: instance method of ConfigurableView
Access: protected

ParamType
stateObject

configurableView.destroy()

It is unlikely that there will be any reason to call this method outside of the scope of unit testing.

Kind: instance method of ConfigurableView
Access: public

FeatureView ⇐ ConfigurableView

Kind: global class
Extends: ConfigurableView

new FeatureView(props)

FeatureView is an AbstractView class that enables an extending view to determine it's render-ability per the feature configuration defined in the Application State. Features are assumed ON by default and must explicitly be set to a false value in the config to be turned off.

ParamType
propsObject

featureView.$isWritable : boolean

Indicates that the component is writable. Writable components can be updated throughout their life. The can be rendered and re-rendered. A component that is writable is always also readable.

Kind: instance property of FeatureView
Default: false
Access: protected

featureView.$isReadable : boolean

Indicates that the component is readable. Readable components can NOT be updated throughout their life. They are rendered once to the screen and cannot be rendered again during their life. Neither the system nor a user can update readable components such that they are re-rendered to the screen. A component that is readable may or may not be writable.

Kind: instance property of FeatureView
Default: false
Access: protected

featureView.$state ⇒ Object

Returns a safe copy of this view's state. This enables safe passing of state from this view to children.

Kind: instance property of FeatureView
Access: protected

featureView.dom ⇒ *

Returns a reference to the DOM node of this component

Kind: instance property of FeatureView
Access: public

featureView.$configure()

This method can be used to override the default configuration rules whereby the ConfigurableView is set to be readable or writable per explicit property values or a passed configuration. If there are further rules or configurations that must be made prior to rendering these can be set by overriding this protected 'virtual' method.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$initState(...state)

Safely initialize state so as to not overwrite state of a parent class;

Kind: instance abstract method of FeatureView
Access: protected

ParamType
...stateObject

featureView.$setProps(props)

Set and update $props

Kind: instance abstract method of FeatureView
Access: protected

ParamType
propsObject

featureView.$pruneProps()

Use this method to prune $props of all extraneous $props. It can and should be called in all classes where there are props passed that should not be used as pass-through props. That is, for those props that only intended for the defining class. -- It is intended that $props will be used as pass-through props and this mechanism enables a component to be instantiated with props that only it cares about, and then prune out these props before sending the remaining pass-through props to child elements.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$init()

Implement this method in a child class to set up initial state that CANNOT be initialized in the constructor before the component renders. Favor the constructor! This method should only be used for those occasions where the initialization of the target member(s) simply CANNOT occur in the constructor.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$bind()

Use this method to bind all of your local member member methods and handlers using the this.$member$ = () => this._member idiom.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$mount()

Implement this method in a child class to register to any dispatchers or other object that extend EventEmitter. These registrations should unregistered in $unmount to prevent any memory leaks.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$unmount()

Implement this method in a child class to unregister from any dispatchers or other object that extend EventEmitter. These unregistrations should unregister any registrations that occur in $mount to prevent any memory leaks.

Kind: instance abstract method of FeatureView
Access: protected

featureView.$preRender(props)

This method will be called before any post-mount render. This will allow you to update the Component state via setState() with any new prop data received from a parent class or dependent class before this component is rendered.

Kind: instance abstract method of FeatureView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

featureView.$postRender(props)

This method will be called after any post-mount render. This will allow you to update the DOM. You cannot call setState() or any derivative thereof in this method.

Kind: instance abstract method of FeatureView
Access: protected

ParamTypeDescription
propsObjectProperties received from a dependent class.

featureView.$error(error, info)

This method is called for any lifecycle error in an extending component.

Kind: instance method of FeatureView
Access: protected

ParamType
errorError
infoString

featureView.setStateOnce(state)

Will setState of the property and then remove the property from state after setting so that this property is only applied for one round of rendering.

Kind: instance method of FeatureView
Access: protected

ParamType
stateObject

featureView.destroy()

It is unlikely that there will be any reason to call this method outside of the scope of unit testing.

Kind: instance method of FeatureView
Access: public

AbstractForm ⇐ View

Kind: global abstract class
Extends: View

new AbstractForm(props)

AbstractForm should be implemented as the base class for all form implementations. It will expose a stateful form with all expected form behaviors: read, write, clear, and field value reads. Subclasses should take care to not override this.state, instead augmenting this.state by leveraging object assignments; this.state = Object.assign(this.state, { <augments> })

ParamType
propsObject

abstractForm.$isWritable : boolean

Indicates that the component is writable. Writable components can be updated throughout their life. The can be rendered and re-rendered. A component that is writable is always also readable.

Kind: instance property of AbstractForm
Default: false
Access: protected

abstractForm.$isReadable : boolean

Indicates that the component is readable. Readable components can NOT be updated throughout their life. They are rendered once to the screen and cannot be rendered again during their life. Neither the system nor a user can update readable components such that they are re-rendered to the screen. A component that is readable may or may not be writable.

Kind: instance property of AbstractForm
Default: false
Access: protected

abstractForm.$state ⇒ Object

Returns a safe copy of this view's state. This enables safe passing of state from this view to children.

Kind: instance property of AbstractForm
Access: protected

abstractForm.dom ⇒ *

Returns a reference to the DOM node of this component

Kind: instance property of AbstractForm
Access: public

abstractForm.$onChange(e)

Protected method to be implemented by each child field class as the value for their onChange attribute as follows: onChange={ (e) => { this.$onChange(e); } } doing this will wire the field into the state updates such that the target field will have it's value added to this form's values per the target fields name attribute value. That is, the value for the target field can be accessed via this.read() and this.value(<fieldName>)

Kind: instance abstract method of AbstractForm
Access: protected

ParamTypeDescription
eEvent= event

abstractForm.write(values) ⇒ AbstractForm

Write to a value programmatically.

Kind: instance method of AbstractForm
Access: public

ParamTypeDescription
valuesObject= key is the value of the target field's name attribute, and the value is the intended value of the target field.

abstractForm.clear(fieldName) ⇒ AbstractForm

Clear a specific child field programmatically by passing the value of the name attribute for the target field, e.g. name=value.

Kind: instance method of AbstractForm
Access: public

ParamTypeDescription
fieldNameString= value of the name attribute of the target field.

abstractForm.value(name) ⇒ *

Retrieve the value of a target name field whose name attribute value is the argument name.

Kind: instance method of AbstractForm
Access: public

ParamTypeDescription
nameString= value of the name attribute of the target field.

abstractForm.read() ⇒ AbstractForm.state.values | Object

Retrieve the value of all field values of this form as an object literal of key:value pairs where key=target input name and value=the value of the target input.

Kind: instance method of AbstractForm
Access: public

abstractForm.$isAuthorized()

This method must be implemented and return a boolean value that indicates whether or not a user is authorized to use this view. This boolean value should be calculated using the extending classes $policy and object(s) containing the values necessary to calculate the satisfaction of the policy.

Kind: instance method of AbstractForm
Access: protected

abstractForm.$configure()

This method can be used to override the default configuration rules whereby the ConfigurableView is set to be readable or writable per explicit property values or a passed configuration. If there are further rules or configurations that must be made prior to rendering these can be set by overriding this protected 'virtual' method.

Kind: instance method of AbstractForm
Access: protected

abstractForm.$initState(...state)

Safely initialize state so as to not overwrite state of a parent class;

Kind: instance abstract method of AbstractForm
Access: protected

ParamType
...stateObject

abstractForm.$setProps(props)

Set and update $props

Kind: instance abstract method of AbstractForm
Access: protected

ParamType
propsObject

abstractForm.$pruneProps()

Use this method to prune $props of all extraneous $props. It can and should be called in all classes where there are props passed that should not be used as pass-through props. That is, for those props that only intended for the defining class. -- It is intended that $props will be used as pass-through props and this mechanism enables a component to be instantiated with props that only it cares about, and then prune out these props before sending the remaining pass-through props to child elements.

Kind: instance abstract method of AbstractForm
Access: protected

abstractForm.$init()

Implement this method in a child class to set up initial state that CANNOT be initialized in the constructor before the component